The IDE you know, rebuilt in Rust. IntelliJ IDEA–style keymap, tool windows and search-everywhere in a fast native app: editor, code insight, debugger, Git, terminal, database and HTTP clients for 60+ languages.
TypeScript code-editorcross-platformdapdatabase-clientdebuggerdesktop-appdeveloper-toolsgithttp-clientideintellijlsprusttauriterminal
fix(vcs): surface stage/unstage failures instead of swallowing them (#1893)
arookieofc39dc5db0799e
diff --git a/src/features/vcs/CommitView.tsx b/src/features/vcs/CommitView.tsxindex bda64cb79..d9beae481 100644--- a/src/features/vcs/CommitView.tsx+++ b/src/features/vcs/CommitView.tsx@@ -76,6 +76,7 @@ import { KIND_COLOR, KIND_LABEL, fileCount, formatTime, stashLabel, stripSlash }import { call, commands } from "@/platform/ipc";import type { FileStatus } from "@/bindings";import { OperationBanner } from "./operations";+import { runOp } from "./ops";import { ShelfPanel, loadShelves, useShelf } from "./shelf";import { refreshNow, repoName, selectRepo, useVcs } from "./store";import styles from "./CommitView.module.css";@@ -220,13 +221,13 @@ export function listMenu(id: string, active: boolean, files: readonly FileStatuslabel: "Stage",icon: "plus",disabled: !files.some((f) => f.unstaged),- run: () => void call(commands.vcsStage(paths)).finally(() => void refreshNow()),+ run: () => void runOp(tx`Stage ${count} files`, () => call(commands.vcsStage(paths))),},{label: "Unstage",icon: "minus",disabled: !files.some((f) => f.staged),- run: () => void call(commands.vcsUnstage(paths)).finally(() => void refreshNow()),+ run: () => void runOp(tx`Unstage ${count} files`, () => call(commands.vcsUnstage(paths))),},{ kind: "separator" },...(count@@ -335,13 +336,13 @@ export function nodeMenu(label: "Stage",icon: "plus",disabled: !files.some((f) => f.unstaged),- run: () => void call(commands.vcsStage(paths)).finally(() => void refreshNow()),+ run: () => void runOp(tx`Stage ${paths.length} files`, () => call(commands.vcsStage(paths))),},{label: "Unstage",icon: "minus",disabled: !files.some((f) => f.staged),- run: () => void call(commands.vcsUnstage(paths)).finally(() => void refreshNow()),+ run: () => void runOp(tx`Unstage ${paths.length} files`, () => call(commands.vcsUnstage(paths))),},{ kind: "separator" },...(nodes.some((n) => n.changelist)diff --git a/src/platform/locales/text/zh.json b/src/platform/locales/text/zh.jsonindex 09544039f..0d87f187e 100644--- a/src/platform/locales/text/zh.json+++ b/src/platform/locales/text/zh.json@@ -6421,5 +6421,7 @@"Recommended": "推荐","No preview": "无预览","Running in the background": "后台运行中",- "Couldn't stop the background task": "无法停止后台任务"+ "Couldn't stop the background task": "无法停止后台任务",+ "Stage {count} files": "暂存 {count} 个文件",+ "Unstage {count} files": "取消暂存 {count} 个文件"}