дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-26 20:46:22 +02:00
feat(dart): show closing labels at the end of the line (#5766)
Dart files show closing labels after a widget's or call's closing bracket at the end of the line (`), // Column`), from the Dart server's dart/textDocument/publishClosingLabels, now requested at initialization. They are inlay hints of a new closingLabel kind, kept per document and server instance, dropped on the next edit until the server publishes again; several labels closing on one line share one hint. Editor › Inlay Hints › Closing labels (on by default) turns them off. Right-click Disable now writes the kind's own setting (it wrote inlay.type instead of inlay.types for type hints). Part of #4096 Co-authored-by: wildcatDownstairs <[email protected]>
Цей коміт міститься в:
1 джерело
6355534ed5
коміт
2544db3025
15 files changed
+272
-8
No files matched your search
@@ -362,6 +362,8 @@ pub struct InlayHintsSettings {
|
||||
pub parameters: bool,
|
||||
/// Hints of other kinds (chaining, closing labels…).
|
||||
pub other: bool,
|
||||
/// The Dart server's closing labels (`// Column` after a widget's closing bracket).
|
||||
pub closing_labels: bool,
|
||||
pub disabled_languages: Vec<String>,
|
||||
/// Code vision as a whole (usages, author and language-server lenses); the switches below apply while it is on.
|
||||
pub code_vision: bool,
|
||||
@@ -394,6 +396,7 @@ impl Default for InlayHintsSettings {
|
||||
types: true,
|
||||
parameters: true,
|
||||
other: true,
|
||||
closing_labels: true,
|
||||
disabled_languages: Vec::new(),
|
||||
code_vision: true,
|
||||
code_vision_usages: true,
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
//! The Dart analysis server's closing labels (`dart/textDocument/publishClosingLabels`): the
|
||||
//! widget or call a closing `)` / `]` ends, shown after it at the end of the line (`// Column`).
|
||||
|
||||
use crate::convert::Conv;
|
||||
use crate::text::{DocText, Encoding, col_to_byte, units};
|
||||
use crate::types::{InlayHint, InlayKind};
|
||||
use ide_core::Pos;
|
||||
use lsp_types as lsp;
|
||||
use serde::Deserialize;
|
||||
use std::collections::BTreeMap;
|
||||
use std::path::Path;
|
||||
#[cfg(test)]
|
||||
use std::sync::Arc;
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub(crate) struct Params {
|
||||
pub uri: String,
|
||||
pub labels: Vec<Label>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Deserialize)]
|
||||
pub(crate) struct Label {
|
||||
range: lsp::Range,
|
||||
label: String,
|
||||
}
|
||||
|
||||
/// One end-of-line hint per line, as the Flutter plugin shows them: `// Padding // Center` when
|
||||
/// several constructs close on one line. A label whose range no longer ends in `)` or `]` (the
|
||||
/// text changed since the analysis) is left out.
|
||||
pub(crate) fn hints(conv: &Conv, path: &Path, text: &DocText, labels: Vec<Label>) -> Vec<InlayHint> {
|
||||
let mut lines: BTreeMap<u32, Vec<String>> = BTreeMap::new();
|
||||
for l in labels {
|
||||
let end = conv.pos(path, l.range.end);
|
||||
let line = text.line(end.line as usize);
|
||||
let before = &line[..col_to_byte(line, end.col as usize, Encoding::Utf16)];
|
||||
if before.ends_with([')', ']']) {
|
||||
lines.entry(end.line).or_default().push(l.label);
|
||||
}
|
||||
}
|
||||
lines
|
||||
.into_iter()
|
||||
.map(|(line, labels)| InlayHint {
|
||||
position: Pos::new(line, units(text.line(line as usize), Encoding::Utf16) as u32),
|
||||
label: format!("// {}", labels.join(" // ")),
|
||||
kind: InlayKind::ClosingLabel,
|
||||
padding_left: true,
|
||||
padding_right: false,
|
||||
tooltip: None,
|
||||
parts: Vec::new(),
|
||||
text_edits: Vec::new(),
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use serde_json::json;
|
||||
|
||||
fn labels(v: serde_json::Value) -> Vec<Label> {
|
||||
serde_json::from_value(v).unwrap()
|
||||
}
|
||||
|
||||
fn label(line: u32, from: u32, to: u32, label: &str) -> serde_json::Value {
|
||||
json!({ "label": label, "range": { "start": { "line": line, "character": from }, "end": { "line": line, "character": to } } })
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn labels_go_to_the_end_of_the_line_and_share_it() {
|
||||
let text = DocText::new("return Center(\n child: Padding(\n child: Text('a'))), // x\n");
|
||||
let conv = Conv::new(Encoding::Utf16, |_: &Path| None::<Arc<DocText>>);
|
||||
let hints = hints(
|
||||
&conv,
|
||||
Path::new("/a.dart"),
|
||||
&text,
|
||||
labels(json!([label(2, 4, 21, "Padding"), label(2, 4, 22, "Center"), label(2, 11, 20, "Text")])),
|
||||
);
|
||||
assert_eq!(hints.len(), 1);
|
||||
assert_eq!(hints[0].label, "// Padding // Center // Text");
|
||||
assert_eq!(hints[0].position, Pos::new(2, 28));
|
||||
assert_eq!(hints[0].kind, InlayKind::ClosingLabel);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_label_that_no_longer_ends_at_a_bracket_is_dropped() {
|
||||
let text = DocText::new("Column(children: [])\nRow(\n");
|
||||
let conv = Conv::new(Encoding::Utf16, |_: &Path| None::<Arc<DocText>>);
|
||||
let hints = hints(
|
||||
&conv,
|
||||
Path::new("/a.dart"),
|
||||
&text,
|
||||
labels(json!([label(0, 0, 19, "<Widget>[]"), label(1, 0, 3, "Row")])),
|
||||
);
|
||||
assert_eq!(hints.iter().map(|h| h.label.as_str()).collect::<Vec<_>>(), ["// <Widget>[]"]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn utf8_servers_and_wide_characters_give_utf16_columns() {
|
||||
let text = Arc::new(DocText::new("Text('🙂')\n"));
|
||||
let doc = text.clone();
|
||||
let conv = Conv::new(Encoding::Utf8, move |_: &Path| Some(doc.clone()));
|
||||
let hints = hints(&conv, Path::new("/a.dart"), &text, labels(json!([label(0, 0, 12, "Text")])));
|
||||
assert_eq!(hints[0].position, Pos::new(0, 10));
|
||||
}
|
||||
}
|
||||
@@ -414,6 +414,23 @@ impl ClientHandler {
|
||||
}
|
||||
}
|
||||
|
||||
fn publish_closing_labels(&self, mgr: &LspManager, params: Value) {
|
||||
let params: crate::closing_labels::Params = match serde_json::from_value(params) {
|
||||
Ok(p) => p,
|
||||
Err(e) => {
|
||||
tracing::debug!("{}: bad publishClosingLabels: {e}", self.server.name);
|
||||
return;
|
||||
}
|
||||
};
|
||||
let Some(path) = uri_to_path(¶ms.uri) else { return };
|
||||
if !self.server.is_live(self.generation) {
|
||||
return;
|
||||
}
|
||||
if mgr.set_closing_labels(&path, &self.server, self.generation, self.encoding(), params.labels) {
|
||||
mgr.sink().emit(IdeEvent::LspRefresh { server: self.server.id, kind: LspRefreshKind::InlayHints });
|
||||
}
|
||||
}
|
||||
|
||||
/// Once per unresolved plugin, whether m2e marked a `pom.xml` or only logged it.
|
||||
fn build_plan_failure(&self, mgr: &LspManager, (plugin, body): (String, String)) {
|
||||
if mgr.first_message(&self.server.name, &format!("build plan: {plugin}")) {
|
||||
@@ -622,6 +639,7 @@ impl Handler for ClientHandler {
|
||||
}
|
||||
"textDocument/publishDiagnostics" => self.publish_diagnostics(&mgr, params),
|
||||
"dart/textDocument/publishFlutterOutline" => self.publish_flutter_outline(&mgr, params),
|
||||
"dart/textDocument/publishClosingLabels" => self.publish_closing_labels(&mgr, params),
|
||||
"window/showMessage" => self.show_message(&mgr, ¶ms),
|
||||
"window/logMessage" => {
|
||||
let text = params.get("message").and_then(Value::as_str).unwrap_or_default();
|
||||
|
||||
@@ -10,6 +10,7 @@ mod angular;
|
||||
mod arduino;
|
||||
mod caps;
|
||||
mod clang_tidy;
|
||||
mod closing_labels;
|
||||
mod compose;
|
||||
mod convert;
|
||||
mod external_project;
|
||||
@@ -150,6 +151,14 @@ struct DocState {
|
||||
/// When the servers last got new text (open or change): diagnostics published before are stale.
|
||||
changed: std::time::Instant,
|
||||
flutter_outline: Option<FlutterOutline>,
|
||||
/// The Dart server's closing labels for the current text; dropped on the next change.
|
||||
closing_labels: Option<ClosingLabels>,
|
||||
}
|
||||
|
||||
struct ClosingLabels {
|
||||
server: ide_core::ServerId,
|
||||
generation: u64,
|
||||
hints: Vec<InlayHint>,
|
||||
}
|
||||
|
||||
/// The widget tree last published for a document, valid while that server instance runs.
|
||||
@@ -1303,6 +1312,7 @@ impl LspManager {
|
||||
notebook: None,
|
||||
changed: std::time::Instant::now(),
|
||||
flutter_outline: None,
|
||||
closing_labels: None,
|
||||
};
|
||||
let compose_added = {
|
||||
let mut docs = self.docs.lock();
|
||||
@@ -1351,6 +1361,7 @@ impl LspManager {
|
||||
let Some(d) = docs.get_mut(&doc) else { return };
|
||||
d.version = version as i32;
|
||||
d.changed = std::time::Instant::now();
|
||||
d.closing_labels = None;
|
||||
|
||||
// Servers that have this document open on their current instance.
|
||||
let targets: Vec<(Arc<Server>, Running, SyncKind, Encoding)> = d
|
||||
@@ -2453,6 +2464,37 @@ impl LspManager {
|
||||
changed
|
||||
}
|
||||
|
||||
/// Records published closing labels; whether what the open documents of `path` show changed.
|
||||
fn set_closing_labels(
|
||||
&self,
|
||||
path: &Path,
|
||||
server: &Server,
|
||||
generation: u64,
|
||||
enc: Encoding,
|
||||
labels: Vec<closing_labels::Label>,
|
||||
) -> bool {
|
||||
let mut changed = false;
|
||||
for d in self.docs.lock().values_mut().filter(|d| d.path == path && d.notebook.is_none()) {
|
||||
// Not `self.conv`: it would lock `docs` again for a UTF-8 server's text.
|
||||
let text = d.text.clone();
|
||||
let conv = Conv::new(enc, move |_: &Path| Some(text.clone()));
|
||||
let hints = closing_labels::hints(&conv, path, &d.text, labels.clone());
|
||||
changed |= !hints.is_empty() || d.closing_labels.as_ref().is_some_and(|c| !c.hints.is_empty());
|
||||
d.closing_labels = Some(ClosingLabels { server: server.id, generation, hints });
|
||||
}
|
||||
changed
|
||||
}
|
||||
|
||||
fn closing_label_hints(&self, doc: DocId, range: Range) -> Vec<InlayHint> {
|
||||
let docs = self.docs.lock();
|
||||
let Some(d) = docs.get(&doc) else { return Vec::new() };
|
||||
let Some(c) = d.closing_labels.as_ref() else { return Vec::new() };
|
||||
if !d.servers.iter().any(|a| a.server.id == c.server && a.server.is_live(c.generation)) {
|
||||
return Vec::new();
|
||||
}
|
||||
c.hints.iter().filter(|h| range.start <= h.position && h.position <= range.end).cloned().collect()
|
||||
}
|
||||
|
||||
pub async fn workspace_symbols(&self, query: &str, cancel: CancellationToken) -> IdeResult<Vec<WorkspaceSymbol>> {
|
||||
let servers: Vec<Arc<Server>> = self.servers.lock().clone();
|
||||
let targets = self.ready_targets(&servers, |c| c.has("workspaceSymbolProvider")).await;
|
||||
@@ -3315,6 +3357,7 @@ impl LspManager {
|
||||
}
|
||||
}
|
||||
let mut v = out.finish(Vec::new())?;
|
||||
v.extend(self.closing_label_hints(doc, range));
|
||||
v.sort_by_key(|h| h.position);
|
||||
Ok(v)
|
||||
}
|
||||
|
||||
@@ -237,6 +237,7 @@ impl LspManager {
|
||||
notebook: Some(path.to_owned()),
|
||||
changed: std::time::Instant::now(),
|
||||
flutter_outline: None,
|
||||
closing_labels: None,
|
||||
},
|
||||
);
|
||||
state.cells.push((cell.id.clone(), doc));
|
||||
|
||||
@@ -247,6 +247,8 @@ pub enum InlayKind {
|
||||
Type,
|
||||
Parameter,
|
||||
Other,
|
||||
/// What a closing bracket ends, at the end of its line (the Dart server's closing labels).
|
||||
ClosingLabel,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, Type)]
|
||||
|
||||
@@ -1549,6 +1549,40 @@ async fn flutter_outline_follows_the_document_and_the_server_instance() {
|
||||
assert!(h.mgr.flutter_outline(reopened).is_none());
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn closing_labels_join_the_inlay_hints_until_the_next_edit() {
|
||||
let h = harness(&[("mock", incremental_caps())]);
|
||||
let (doc, path) = h.open("a.mk", "Center(\n child: Text('x'))\n");
|
||||
h.wait_status("mock", ServerStatus::Ready).await;
|
||||
let s = h.launcher.state("mock");
|
||||
s.respond("textDocument/inlayHint", json!([]));
|
||||
let refreshes = || {
|
||||
h.events
|
||||
.lock()
|
||||
.iter()
|
||||
.filter(|e| matches!(e, IdeEvent::LspRefresh { kind: LspRefreshKind::InlayHints, .. }))
|
||||
.count()
|
||||
};
|
||||
let at = |l0: u32, c0: u32, c1: u32| json!({"start":{"line":l0,"character":c0},"end":{"line":1,"character":c1}});
|
||||
let labels = json!({ "uri": uri_of(&path), "labels": [
|
||||
{ "range": at(1, 9, 18), "label": "Text" },
|
||||
{ "range": at(0, 0, 19), "label": "Center" },
|
||||
]});
|
||||
s.peer().notify("dart/textDocument/publishClosingLabels", labels).unwrap();
|
||||
eventually(|| refreshes() == 1).await;
|
||||
let whole = Range::new(Pos::new(0, 0), Pos::new(2, 0));
|
||||
let hints = h.mgr.inlay_hints(doc, whole).await.unwrap();
|
||||
assert_eq!(hints.len(), 1);
|
||||
assert_eq!(hints[0].label, "// Text // Center");
|
||||
assert_eq!(hints[0].position, Pos::new(1, 19));
|
||||
assert_eq!(hints[0].kind, InlayKind::ClosingLabel);
|
||||
assert!(h.mgr.inlay_hints(doc, Range::new(Pos::new(0, 0), Pos::new(0, 7))).await.unwrap().is_empty());
|
||||
|
||||
// Edited text: the labels wait for the next analysis.
|
||||
h.mgr.did_change(doc, 2, &[change(rng(0, 0, 0, 0), " ")], &|| unreachable!());
|
||||
assert!(h.mgr.inlay_hints(doc, whole).await.unwrap().is_empty());
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn diagnostics_become_events_and_feed_code_actions() {
|
||||
let h = harness(&[("mock", incremental_caps())]);
|
||||
|
||||
@@ -12,7 +12,7 @@ name = "dart"
|
||||
command = "dart"
|
||||
args = ["language-server", "--protocol=lsp"]
|
||||
root-markers = ["pubspec.yaml", "analysis_options.yaml"]
|
||||
initialization-options = { flutterOutline = true }
|
||||
initialization-options = { flutterOutline = true, closingLabels = true }
|
||||
install-hint = "Install the Dart SDK (https://dart.dev/get-dart) or Flutter"
|
||||
|
||||
# `dart` here; a project that depends on the Flutter SDK is switched to
|
||||
|
||||
@@ -8322,6 +8322,8 @@ export type InlayHintsSettings = {
|
||||
parameters?: boolean,
|
||||
/** Hints of other kinds (chaining, closing labels…). */
|
||||
other?: boolean,
|
||||
/** The Dart server's closing labels (`// Column` after a widget's closing bracket). */
|
||||
closingLabels?: boolean,
|
||||
disabledLanguages?: string[],
|
||||
/** Code vision as a whole (usages, author and language-server lenses); the switches below apply while it is on. */
|
||||
codeVision?: boolean,
|
||||
@@ -8337,7 +8339,9 @@ export type InlayHintsSettings = {
|
||||
codeVisionAuthorPosition?: CodeVisionPosition,
|
||||
};
|
||||
|
||||
export type InlayKind = "type" | "parameter" | "other";
|
||||
export type InlayKind = "type" | "parameter" | "other" |
|
||||
/** What a closing bracket ends, at the end of its line (the Dart server's closing labels). */
|
||||
"closingLabel";
|
||||
|
||||
/** One part of an inlay hint label, e.g. a type name that navigates to its declaration. */
|
||||
export type InlayLabelPart = {
|
||||
|
||||
@@ -12,6 +12,7 @@ vi.mock("@/workbench/contributions", async (orig) => {
|
||||
});
|
||||
const ipc = vi.hoisted(() => ({
|
||||
lspInlayHints: vi.fn(),
|
||||
settingsSet: vi.fn(),
|
||||
}));
|
||||
vi.mock("@/platform/ipc", async (orig) => {
|
||||
const real = await orig<typeof import("@/platform/ipc")>();
|
||||
@@ -24,6 +25,7 @@ const { usePlatform } = await import("@/platform/platformInfo");
|
||||
const { resetNavigationModifier } = await import("@/platform/navigationModifier");
|
||||
const { useContextMenuStore } = await import("@/ui");
|
||||
const { emitLocalIdeEvent } = await import("@/platform/ipc");
|
||||
const { useProject } = await import("@/platform/project");
|
||||
|
||||
const hint: InlayHint = {
|
||||
position: { line: 0, col: 5 },
|
||||
@@ -125,6 +127,25 @@ describe("background inlay hints", () => {
|
||||
expect(shown(view)).toBe(0);
|
||||
});
|
||||
|
||||
it("shows closing labels at the end of the line unless they are turned off", async () => {
|
||||
const closing: InlayHint = {
|
||||
...hint,
|
||||
kind: "closingLabel",
|
||||
label: "// foo",
|
||||
position: { line: 0, col: 14 },
|
||||
parts: [],
|
||||
};
|
||||
ipc.lspInlayHints.mockResolvedValue(ok([hint, closing]));
|
||||
const view = editor();
|
||||
await afterPass();
|
||||
expect(view.dom.querySelector(".cm-lsp-inlay-closingLabel")?.textContent).toBe("// foo");
|
||||
useProject.setState({ settings: { editor: { inlay: { closingLabels: false } } } as never });
|
||||
await afterPass();
|
||||
expect(shown(view)).toBe(1);
|
||||
expect(view.dom.querySelector(".cm-lsp-inlay-closingLabel")).toBeNull();
|
||||
useProject.setState({ settings: null });
|
||||
});
|
||||
|
||||
it("clears the hints of a server that is down and not coming back", async () => {
|
||||
ipc.lspInlayHints.mockResolvedValue(ok([hint]));
|
||||
const view = editor();
|
||||
@@ -178,6 +199,16 @@ describe("inlay hints", () => {
|
||||
expect((inlayMenuItems("parameter")[0] as { label: string }).label).toBe("Disable Parameter name hints");
|
||||
});
|
||||
|
||||
it.each([
|
||||
["type", "types"],
|
||||
["closingLabel", "closingLabels"],
|
||||
] as const)("turns %s hints off with the editor.inlay.%s setting", async (kind, key) => {
|
||||
ipc.settingsSet.mockResolvedValue(ok({}));
|
||||
const disable = inlayMenuItems(kind)[0] as { run: () => void };
|
||||
disable.run();
|
||||
await vi.waitFor(() => expect(ipc.settingsSet).toHaveBeenCalledWith("global", `editor.inlay.${key}`, "false"));
|
||||
});
|
||||
|
||||
it("uses type declaration navigation for a plain type hint after an identifier", () => {
|
||||
usePlatform.setState({ os: "macos" });
|
||||
const view = editorWith([{ ...hint, label: ": Foo", parts: [] }]);
|
||||
|
||||
@@ -23,8 +23,17 @@ const KIND_LABEL: Record<InlayHint["kind"], string> = {
|
||||
type: "Type hints",
|
||||
parameter: "Parameter name hints",
|
||||
other: "Other hints",
|
||||
closingLabel: "Closing labels",
|
||||
};
|
||||
|
||||
/** The `editor.inlay.*` switch for each kind. */
|
||||
const KIND_SETTING = {
|
||||
type: "types",
|
||||
parameter: "parameters",
|
||||
other: "other",
|
||||
closingLabel: "closingLabels",
|
||||
} as const satisfies Record<InlayHint["kind"], string>;
|
||||
|
||||
async function setEditorSetting(key: string, value: unknown) {
|
||||
if (!isTauri()) return;
|
||||
useProject.setState({ settings: await call(commands.settingsSet("global", `editor.${key}`, JSON.stringify(value))) });
|
||||
@@ -42,7 +51,10 @@ function typeHintOffset(view: EditorView, at: number): number | null {
|
||||
/** Right-click on a hint: turn its kind off (IDEA's "Disable '…' hints"), or open the settings. */
|
||||
export function inlayMenuItems(kind: InlayHint["kind"]): MenuItem[] {
|
||||
return [
|
||||
{ label: tx`Disable ${txPart(KIND_LABEL[kind])}`, run: () => void setEditorSetting(`inlay.${kind}`, false) },
|
||||
{
|
||||
label: tx`Disable ${txPart(KIND_LABEL[kind])}`,
|
||||
run: () => void setEditorSetting(`inlay.${KIND_SETTING[kind]}`, false),
|
||||
},
|
||||
{ kind: "separator" },
|
||||
{ label: "Inlay Hints Settings…", run: () => void executeAction("file.settings", "editor.inlayHints") },
|
||||
];
|
||||
@@ -147,11 +159,8 @@ const enabled = (language: string) =>
|
||||
useProject.getState().settings?.editor?.inlayHints !== false &&
|
||||
!editorPrefs().inlay.disabledLanguages.includes(language);
|
||||
|
||||
/** Inlay Hints settings: per kind (types / parameters / other). */
|
||||
function shownKind(kind: InlayHint["kind"]): boolean {
|
||||
const p = editorPrefs().inlay;
|
||||
return kind === "type" ? p.types : kind === "parameter" ? p.parameters : p.other;
|
||||
}
|
||||
/** Inlay Hints settings: per kind (types / parameters / other / closing labels). */
|
||||
const shownKind = (kind: InlayHint["kind"]): boolean => editorPrefs().inlay[KIND_SETTING[kind]];
|
||||
|
||||
const inlayPlugin = ViewPlugin.fromClass(
|
||||
class {
|
||||
|
||||
@@ -22,6 +22,17 @@ const EXAMPLES = [
|
||||
file: "layout.rs",
|
||||
parts: ["fn layout() {\n resize(", { annotation: "width:" }, "640, ", { annotation: "height:" }, "480);\n}"],
|
||||
},
|
||||
{
|
||||
id: "closingLabels",
|
||||
label: "Closing labels",
|
||||
language: "dart",
|
||||
file: "home.dart",
|
||||
parts: [
|
||||
"Widget build(BuildContext context) {\n return Center(\n child: Text('Hi'),\n );",
|
||||
{ annotation: "// Center" },
|
||||
"\n}",
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "other",
|
||||
label: "Other hints (chaining, closing labels…)",
|
||||
|
||||
@@ -223,6 +223,7 @@ export const EDITOR_EXTRA_DEFAULTS = {
|
||||
types: true,
|
||||
parameters: true,
|
||||
other: true,
|
||||
closingLabels: true,
|
||||
disabledLanguages: [] as string[],
|
||||
codeVision: true,
|
||||
codeVisionUsages: true,
|
||||
|
||||
@@ -3964,6 +3964,7 @@
|
||||
"Resize hover card from the bottom": "Resize hover card from the bottom",
|
||||
"Resize hover card from the left": "Resize hover card from the left",
|
||||
"Resize hover card from the corner": "Resize hover card from the corner",
|
||||
"Closing labels": "Closing labels",
|
||||
"Roll Back to Here": "Roll Back to Here",
|
||||
"Couldn't roll back": "Couldn't roll back",
|
||||
"This message and the ones after it are removed, and the files the agent changed since go back to how they were before it was sent. The message returns to the composer.": "This message and the ones after it are removed, and the files the agent changed since go back to how they were before it was sent. The message returns to the composer.",
|
||||
|
||||
@@ -10253,6 +10253,7 @@
|
||||
"Gradle project sync failed": "Gradle 项目同步失败",
|
||||
"Gradle could not sync {project}. Java code insight may not work until the build syncs. Fix the build, then reload the Gradle project. Cause: {cause}": "Gradle 无法同步 {project}。构建同步成功前,Java 代码分析可能无法正常工作。请修复构建,然后重新加载 Gradle 项目。原因:{cause}",
|
||||
"Gradle could not sync {project}. Java code insight may not work until the build syncs. Fix the build, then reload the Gradle project.": "Gradle 无法同步 {project}。构建同步成功前,Java 代码分析可能无法正常工作。请修复构建,然后重新加载 Gradle 项目。",
|
||||
"Closing labels": "结束标签",
|
||||
"Roll Back to Here": "回滚到这里",
|
||||
"Couldn't roll back": "无法回滚",
|
||||
"This message and the ones after it are removed, and the files the agent changed since go back to how they were before it was sent. The message returns to the composer.": "这条消息及之后的消息会被移除,Agent 在此之后改动的文件会恢复到这条消息发送前的状态。消息会放回输入框。"
|
||||
|
||||
Reference in new issue
Заблокувати користувача