Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

feat(desktop): 分支选择与 worktree 勾选双向联动(实测后定稿语义)

Kafeifei66455ac23cd4
diff --git a/apps/desktop/src/renderer/__tests__/branchPick.test.ts b/apps/desktop/src/renderer/__tests__/branchPick.test.ts
index cdad1a990c..c622ebd74f 100644
--- a/apps/desktop/src/renderer/__tests__/branchPick.test.ts
+++ b/apps/desktop/src/renderer/__tests__/branchPick.test.ts
@@ -1,11 +1,12 @@
/**
* branchPick.test.ts — 分支区点选语义(纯函数)回归。
*
- * 语义契约(2026-07-29 用户裁决,与 WorktreeChipsRow 的联合控件配合):
- * - worktree 勾选状态只属于用户,分支选择永不隐式改动它
- * (effect 种类里没有 enable-worktree,这是硬性回归线)
- * - worktree ON:选分支 = 改源分支;选当前源分支 no-op
- * - worktree OFF:分支区只读;防御性触达一律 no-op
+ * 语义契约(2026-07-29 用户裁决第二版,实测后定稿):
+ * - 分支菜单永远可点;勾选框**跟随用户的分支选择**双向联动(本次草稿内生效,
+ * 持久化档位由调用方 source 分档控制,不在本函数职责内)
+ * - OFF + 选非当前分支 → enable-worktree(从别的分支启动必须隔离)
+ * - ON + 选回当前 HEAD → disable-worktree(回到当前 checkout 直接启动,对称)
+ * - ON + 选其它分支 = 改源分支;选当前源分支(非 HEAD)= no-op
* - 永远不产生"checkout 用户 checkout"的效果
*/
import { describe, expect, it } from 'vitest';
@@ -16,10 +17,10 @@ describe('resolveBranchPick', () => {
it('worktree ON: picking a different branch changes the source branch', () => {
expect(
resolveBranchPick(
- { worktreeEnabled: true, currentBranch: 'main', sourceBranch: 'main' },
- 'feat/x',
+ { worktreeEnabled: true, currentBranch: 'main', sourceBranch: 'feat/x' },
+ 'feat/y',
),
- ).toEqual({ kind: 'set-source', branch: 'feat/x' });
+ ).toEqual({ kind: 'set-source', branch: 'feat/y' });
});
it('worktree ON: picking the current source branch is a no-op', () => {
@@ -31,26 +32,55 @@ describe('resolveBranchPick', () => {
).toEqual({ kind: 'noop' });
});
- it('worktree OFF: any pick is a no-op — selection must never flip the checkbox', () => {
- // 用户裁决:勾选状态只有用户本人能改。旧的「OFF 选其它分支自动开 worktree」
- // 已删除;OFF 时分支区只读,防御性触达也绝不产生状态副作用。
+ it('worktree ON: picking the repo HEAD branch leaves worktree (symmetric follow)', () => {
+ // 用户最初的吐槽点:从 worktree 切回 main 时勾选仍亮着。定稿语义:选回当前
+ // HEAD = 不再需要隔离,勾选跟随熄灭(仅本次草稿,不写记忆)。
+ expect(
+ resolveBranchPick(
+ { worktreeEnabled: true, currentBranch: 'main', sourceBranch: 'feat/x' },
+ 'main',
+ ),
+ ).toEqual({ kind: 'disable-worktree' });
+ // source 恰好等于 HEAD 时同理:选它 = 回当前 checkout。
+ expect(
+ resolveBranchPick(
+ { worktreeEnabled: true, currentBranch: 'main', sourceBranch: 'main' },
+ 'main',
+ ),
+ ).toEqual({ kind: 'disable-worktree' });
+ });
+
+ it('worktree OFF: picking the repo HEAD branch is a no-op', () => {
expect(
resolveBranchPick(
{ worktreeEnabled: false, currentBranch: 'main', sourceBranch: '' },
'main',
),
).toEqual({ kind: 'noop' });
+ });
+
+ it('worktree OFF: picking another branch enables worktree from it', () => {
expect(
resolveBranchPick(
{ worktreeEnabled: false, currentBranch: 'main', sourceBranch: '' },
'feat/x',
),
- ).toEqual({ kind: 'noop' });
+ ).toEqual({ kind: 'enable-worktree', branch: 'feat/x' });
+ });
+
+ it('detached HEAD (currentBranch=null): no "current branch" special cases fire', () => {
+ // OFF:任何选择都按隔离启动;ON:任何选择都只是改源,绝不因 null 误触发退出。
expect(
resolveBranchPick(
{ worktreeEnabled: false, currentBranch: null, sourceBranch: '' },
'main',
),
- ).toEqual({ kind: 'noop' });
+ ).toEqual({ kind: 'enable-worktree', branch: 'main' });
+ expect(
+ resolveBranchPick(
+ { worktreeEnabled: true, currentBranch: null, sourceBranch: 'feat/x' },
+ 'main',
+ ),
+ ).toEqual({ kind: 'set-source', branch: 'main' });
});
});
diff --git a/apps/desktop/src/renderer/__tests__/newMakerProjectPicker.test.ts b/apps/desktop/src/renderer/__tests__/newMakerProjectPicker.test.ts
index 5a2e95eab3..d84a1a2eb3 100644
--- a/apps/desktop/src/renderer/__tests__/newMakerProjectPicker.test.ts
+++ b/apps/desktop/src/renderer/__tests__/newMakerProjectPicker.test.ts
@@ -143,18 +143,23 @@ describe('Shared create project picker', () => {
);
});
- it('keeps the worktree checkbox owned by the user alone (2026-07-29 invariant)', () => {
- // 用户裁决:勾选状态只属于用户——
- // 1) 组件内不存在任何自动改写 enabled 的 effect(资格变化只禁用、不改状态);
- // 2) 分支选择不承担隐式开关语义(branchPick 无 enable-worktree effect);
- // 3) 用户点击 checkbox 是唯一改动路径,且必写穿工作端记忆(本地 patchDraft /
+ it('keeps the worktree checkbox owned by the user alone (2026-07-29 invariant, v2)', () => {
+ // 用户裁决(实测后第二版):勾选状态只属于用户——
+ // 1) 组件内不存在任何 useEffect 自动改写 enabled 的路径(资格变化只禁用、
+ // 不改状态;旧 handleAutoDisable 机制不得复活);
+ // 2) 用户点击 checkbox(source='chip')→ 写穿工作端记忆(本地 patchDraft /
// device-link 远程 apply-new-maker-worktree-pref);
+ // 3) 用户选分支(source='branch-pick')→ 勾选双向联动但仅本次草稿、不落记忆
+ // (route 侧 source !== 'chip' 直接 return);
// 4) checkbox 原样直出记忆(播种无 baseRepo 点亮门槛),发送侧按
// 「勾选 && baseRepo 就绪」静默降级,不报错拦截。
- expect(worktreeChipsSource).not.toMatch(/onEnabledChange\(false\)/);
expect(worktreeChipsSource).not.toContain('handleAutoDisable');
- expect(worktreeChipsSource).toContain('onToggle(!checked)');
- expect(branchPickSource).not.toContain('enable-worktree');
+ expect(worktreeChipsSource).not.toMatch(/useEffect\([^)]*onEnabledChange/s);
+ expect(worktreeChipsSource).toContain("onToggle={(v) => onEnabledChange(v, 'chip')}");
+ expect(worktreeChipsSource).toContain("onEnabledChange(true, 'branch-pick')");
+ expect(worktreeChipsSource).toContain("onEnabledChange(false, 'branch-pick')");
+ expect(branchPickSource).toContain("kind: 'disable-worktree'");
+ expect(newMakerDraftRouteSource).toContain("if (source !== 'chip') return;");
expect(newMakerDraftRouteSource).toContain("'maker:apply-new-maker-worktree-pref'");
expect(newMakerDraftRouteSource).toContain('setWtEnabled(worktreePref)');
expect(newMakerDraftRouteSource).toContain('wt.enabled && wt.baseRepo');
@@ -162,13 +167,14 @@ describe('Shared create project picker', () => {
});
it('merges branch and worktree into a single joined pill (Claude Code style)', () => {
- // 2026-07-29 用户裁决:[⎇ 分支 │ ☑ worktree] 是一个 pill、两个点击区。
- // 未勾时分支区只读(菜单不可开);已勾时分支菜单 = worktree 源分支选择器。
+ // 2026-07-29 用户裁决:[⎇ 分支 │ ☑ worktree] 是一个 pill、两个点击区;
+ // 分支菜单永远可点(worktree 开不了的仓库除外);悬停任一半区时分隔线隐去。
expect(worktreeChipsSource).toContain('function BranchWorktreeChip');
expect(worktreeChipsSource).toContain('data-testid="create-agent-branch-worktree"');
expect(worktreeChipsSource).toContain(
- 'const branchInteractive = !disabled && effectiveWorktreeEnabled',
+ 'const branchInteractive = !disabled && (effectiveWorktreeEnabled || !switchDisabled)',
);
+ expect(worktreeChipsSource).toContain('group-hover:opacity-0');
expect(worktreeChipsSource).not.toContain('function BranchChip');
expect(worktreeChipsSource).not.toContain('function WorktreeChip(');
});
diff --git a/apps/desktop/src/renderer/components/new-chat/WorktreeChipsRow.tsx b/apps/desktop/src/renderer/components/new-chat/WorktreeChipsRow.tsx
index 16fec23431..b83fadd64d 100644
--- a/apps/desktop/src/renderer/components/new-chat/WorktreeChipsRow.tsx
+++ b/apps/desktop/src/renderer/components/new-chat/WorktreeChipsRow.tsx
@@ -6,15 +6,17 @@
* 2026-07-29 用户裁决(对齐 Claude Code):分支与 worktree 合并为**一个** pill——
* 左半分支区、竖分隔线、右半 checkbox + "worktree",两个点击区各管各的。
*
- * 状态不变量(2026-07-29 用户裁决,最高优先):**勾选状态只属于用户**——
- * - checkbox 原样直出工作端勾选记忆;选分支 / 切项目 / 资格变化都不改它;
- * - 唯一改动路径 = 用户点击 checkbox 本体(onEnabledChange,上层必持久化);
- * - 旧的「选非当前分支自动开 worktree」「资格不满足自动关」全部删除;
- * - 环境不合格(已在 worktree 内 / SSH / 探测中)只是禁用 checkbox + tooltip,
- * 发送时由上层按「勾选 && 合格」静默降级,记忆永不被抹。
+ * 状态不变量(2026-07-29 用户裁决,实测后第二版):**勾选状态只属于用户**——
+ * - 系统/环境因素(切项目、探测结果、播种)永远不改 checkbox;资格不满足只是
+ * 禁用 + tooltip,发送时由上层按「勾选 && 合格」静默降级,记忆永不被抹;
+ * - 用户点击 checkbox 本体(source='chip')→ 改状态并写工作端勾选记忆;
+ * - 用户选分支(source='branch-pick')→ 勾选**跟随本次选择**双向联动
+ * (选非当前分支必须隔离 → 亮;选回当前 HEAD → 灭;见 branchPick.ts),
+ * 但只对本次草稿生效、不写记忆——分支选择表达的是"这一次从哪启动",
+ * 不是"以后都默认 worktree"。
*
- * 分支区语义:未勾 = 只读展示仓库当前 HEAD(会话就跑在它上面);已勾 = worktree
- * 源分支选择器(默认当前分支,点开可换;见 branchPick.ts)。
+ * 分支区语义:菜单永远可点(资格允许时);未勾时菜单脚注说明"选其他分支将以
+ * worktree 隔离启动",已勾时脚注说明"选当前分支将退回直接启动"。
*
* worktree 名称 **自动生成**(不暴露 UI),由 useSuggestName 拉取后透传给上层。
*/
@@ -58,10 +60,13 @@ export interface WorktreeChipsRowProps {
emptyProjectLabel?: string;
enabled: boolean;
/**
- * 用户点击 checkbox 本体切换 worktree——**唯一**的状态改动路径,上层必持久化
- * (写工作端勾选记忆)。系统任何路径都不得调用它替用户翻状态。
+ * 用户切换 worktree。source 决定是否写工作端勾选记忆:
+ * - 'chip':点 checkbox 本体 → 持久化;
+ * - 'branch-pick':分支选择的双向联动(用户动作,但表达的是"这一次从哪启动")
+ * → 仅本次草稿,不落记忆。
+ * 系统/环境路径不得调用它替用户翻状态。
*/
- onEnabledChange: (v: boolean) => void;
+ onEnabledChange: (v: boolean, source: 'chip' | 'branch-pick') => void;
sourceBranch: string;
onSourceBranchChange: (v: string) => void;
onBaseRepoChange?: (baseRepo: string | null) => void;
@@ -182,9 +187,9 @@ export function WorktreeChipsRow({
? sourceBranch || branches.current || 'main'
: (currentBranch ?? '');
const showBranchChip = !advancedHidden && !!detect.data?.isGitRepo && branchLabel !== '';
- // 分支菜单只在 worktree 已勾时可交互(= 源分支选择器);未勾时分支区只读展示当前
- // HEAD——选分支不再承担任何隐式开关语义(状态不变量,见文件头)。
- const branchInteractive = !disabled && effectiveWorktreeEnabled;
+ // 分支菜单永远可点(worktree 开不了的仓库除外——已在 worktree 内等场景选分支
+ // 无法产生任何效果,菜单保持只读展示)。
+ const branchInteractive = !disabled && (effectiveWorktreeEnabled || !switchDisabled);
const handleBranchPick = useCallback(
(picked: string) => {
@@ -192,9 +197,20 @@ export function WorktreeChipsRow({
{ worktreeEnabled: effectiveWorktreeEnabled, currentBranch, sourceBranch: branchLabel },
picked,
);
- if (effect.kind === 'set-source') onSourceBranchChange(effect.branch);
+ if (effect.kind === 'set-source') {
+ onSourceBranchChange(effect.branch);
+ } else if (effect.kind === 'enable-worktree') {
+ // 同帧一起写:sourceBranch 非空会让"worktree 开启后回填 current"的
+ // effect 自然跳过,不会覆盖用户的选择。branch-pick 档 → 不落记忆。
+ onEnabledChange(true, 'branch-pick');
+ onSourceBranchChange(effect.branch);
+ } else if (effect.kind === 'disable-worktree') {
+ // 选回当前 HEAD → 勾选跟随熄灭(仅本次草稿);清源分支,下次开启重新回填。
+ onEnabledChange(false, 'branch-pick');
+ onSourceBranchChange('');
+ }
},
- [effectiveWorktreeEnabled, currentBranch, branchLabel, onSourceBranchChange],
+ [effectiveWorktreeEnabled, currentBranch, branchLabel, onSourceBranchChange, onEnabledChange],
);
const branchWorktree = showBranchChip ? (
@@ -214,7 +230,7 @@ export function WorktreeChipsRow({
// 上次拉取失败的话,重新打开菜单就自动重试一次,不逼用户去点重试项。
if (branches.failed && !branches.loading) branches.refetch();
}}
- onToggle={onEnabledChange}
+ onToggle={(v) => onEnabledChange(v, 'chip')}
compact={compact}
/>
) : null;
@@ -470,6 +486,13 @@ function BranchWorktreeChip({
</DropdownMenuItem>
))
)}
+ {/* 脚注说明双向联动语义:未勾 → 选其他分支将开 worktree;已勾 → 选回
+ 当前分支将退回直接启动。用户第一次遇到"勾选跟着分支走"时不至于意外。 */}
+ <div className="mt-1 border-t border-border px-3 pb-1 pt-1.5 text-[11px] leading-snug text-muted-foreground">
+ {checked
+ ? t('newChat.branchChip.exitWorktreeHint')
+ : t('newChat.branchChip.worktreeHint')}
+ </div>
</DropdownMenuContent>
</DropdownMenu>
) : (
@@ -549,7 +572,7 @@ function BranchWorktreeChip({
<div
data-testid="create-agent-branch-worktree"
className={cn(
- 'inline-flex items-stretch overflow-hidden rounded-full border transition-colors',
+ 'group inline-flex items-stretch overflow-hidden rounded-full border transition-colors',
compact
? 'h-[30px] border-[var(--create-agent-control-border)] bg-[var(--create-agent-control-bg)] text-[var(--create-agent-control-text)]'
: 'h-[42px] border-border bg-[var(--chat-input-bg)] text-foreground',
@@ -558,10 +581,11 @@ function BranchWorktreeChip({
)}
>
{branchArea}
+ {/* 悬停激活任一半区时分隔线隐去,让 hover 填充看起来是一体的(对齐 Claude Code)。 */}
<span
aria-hidden
className={cn(
- 'w-px shrink-0 self-center',
+ 'w-px shrink-0 self-center transition-opacity group-hover:opacity-0',
compact ? 'h-[14px] bg-[var(--create-agent-control-border)]' : 'h-[18px] bg-border',
)}
/>
diff --git a/apps/desktop/src/renderer/components/new-chat/branchPick.ts b/apps/desktop/src/renderer/components/new-chat/branchPick.ts
index c80b13aeb7..42edd6fbc2 100644
--- a/apps/desktop/src/renderer/components/new-chat/branchPick.ts
+++ b/apps/desktop/src/renderer/components/new-chat/branchPick.ts
@@ -1,16 +1,19 @@
/**
* branchPick — 分支区点选语义的纯函数(与 UI 解耦,便于单测)。
*
- * 2026-07-29 用户裁决(worktree 勾选状态只属于用户,系统永不隐式改动):
- * - worktree 已勾:分支菜单 = worktree 源分支选择器,选当前源分支为 no-op;
- * - worktree 未勾:分支区只读展示当前 HEAD,菜单不打开——旧的「选其它分支
- * 自动开启 worktree」隐式联动已删除,任何路径都不再替用户翻动勾选状态。
- * 想从别的分支启动 = 先勾 worktree、再选源分支(全部显式)。
+ * 2026-07-29 用户裁决(第二版,实测后定稿):分支菜单永远可点,勾选框**跟随用户的
+ * 分支选择**双向联动——这是用户亲手的动作,不算系统擅改;但联动只对本次草稿生效,
+ * **不写工作端勾选记忆**(记忆只在用户点 checkbox 本体时保存,见调用方 source 分档):
+ * - 选非当前分支 → 开 worktree 并以其为源(从别的分支启动必须隔离,
+ * 绝不 checkout 用户的 checkout);
+ * - 选回当前 HEAD 分支 → 关 worktree(回到当前 checkout 直接启动,对称);
+ * - worktree 已勾时选其它分支 = 改源分支;选当前源分支(非 HEAD)= no-op。
+ * - 系统/环境因素(切项目、探测结果、播种)永远无权触达本函数之外的开关路径。
* - 永远不产生"checkout 用户 checkout"的效果(effect 种类里根本没有这个选项)。
*/
export interface BranchPickState {
- /** worktree 勾选状态(用户记忆原样直出;未勾时分支区只读,不应触达本函数)。 */
+ /** worktree 勾选框当前显示状态(用户记忆或本次草稿内联动后的值)。 */
worktreeEnabled: boolean;
/** 仓库当前 HEAD 分支;detached / 未知时为 null。 */
currentBranch: string | null;
@@ -20,11 +23,20 @@ export interface BranchPickState {
export type BranchPickEffect =
| { kind: 'noop' }
- | { kind: 'set-source'; branch: string };
+ | { kind: 'set-source'; branch: string }
+ | { kind: 'enable-worktree'; branch: string }
+ | { kind: 'disable-worktree' };
export function resolveBranchPick(state: BranchPickState, picked: string): BranchPickEffect {
- // 未勾时分支区只读(UI 不开菜单);防御性兜底:即使被触达也绝不改勾选状态。
- if (!state.worktreeEnabled) return { kind: 'noop' };
- if (picked === state.sourceBranch) return { kind: 'noop' };
- return { kind: 'set-source', branch: picked };
+ if (state.worktreeEnabled) {
+ // 选回当前 HEAD = 不再需要隔离,勾选跟随熄灭(解决「从 worktree 切回 main
+ // 仍勾着」的不对称);detached(currentBranch=null)时无"当前分支"可言,不触发。
+ if (state.currentBranch !== null && picked === state.currentBranch) {
+ return { kind: 'disable-worktree' };
+ }
+ if (picked === state.sourceBranch) return { kind: 'noop' };
+ return { kind: 'set-source', branch: picked };
+ }
+ if (state.currentBranch !== null && picked === state.currentBranch) return { kind: 'noop' };
+ return { kind: 'enable-worktree', branch: picked };
}
diff --git a/apps/desktop/src/renderer/features/cc-agent/NewMakerDraftRoute.tsx b/apps/desktop/src/renderer/features/cc-agent/NewMakerDraftRoute.tsx
index 4215b02b14..48ddc927ae 100644
--- a/apps/desktop/src/renderer/features/cc-agent/NewMakerDraftRoute.tsx
+++ b/apps/desktop/src/renderer/features/cc-agent/NewMakerDraftRoute.tsx
@@ -1194,12 +1194,16 @@ export function NewMakerDraftRoute() {
[handleWorkingDirChange],
);
- // 用户点击 checkbox——**唯一**的勾选状态改动路径(2026-07-29 裁决),必写穿「工作端
- // 勾选记忆」:本地草稿写本地 newMakerDraft 根字段;device-link 远程草稿把状态写到
- // 被控端(状态归工作端所有,控制端只是远程操作器,与手机端同语义)。
- // 旧的 source 分档已随「分支菜单不再隐式开 worktree」删除。
- const handleWtEnabledChange = useCallback((enabled: boolean) => {
+ // 用户切换 worktree(2026-07-29 实测后第二版):
+ // - source='chip'(点 checkbox 本体)→ 写穿「工作端勾选记忆」——本地草稿写本地
+ // newMakerDraft 根字段;device-link 远程草稿写到被控端(状态归工作端所有,
+ // 控制端只是远程操作器,与手机端同语义);
+ // - source='branch-pick'(分支选择的双向联动)→ 仅本次草稿的 UI 态,不落记忆
+ // ——分支选择表达"这一次从哪启动",不改全局默认。
+ // 系统/环境路径没有任何入口能触达这里(不变量)。
+ const handleWtEnabledChange = useCallback((enabled: boolean, source: 'chip' | 'branch-pick') => {
setWtEnabled(enabled);
+ if (source !== 'chip') return;
if (isDeviceLinkDraft && effectiveDeviceLinkDeviceId) {
window.electronAPI.deviceLink
.invoke(effectiveDeviceLinkDeviceId, 'maker:apply-new-maker-worktree-pref', [
diff --git a/apps/desktop/src/renderer/i18n/locales/en/common.json b/apps/desktop/src/renderer/i18n/locales/en/common.json
index 20df9932d5..a61c40d7ab 100644
--- a/apps/desktop/src/renderer/i18n/locales/en/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/en/common.json
@@ -4040,7 +4040,9 @@
"loading": "Loading branches…",
"loadFailed": "Failed to load branches — tap to retry",
"currentTooltip": "Current branch",
- "sourceTooltip": "Worktree source branch"
+ "sourceTooltip": "Worktree source branch",
+ "worktreeHint": "Picking another branch starts this chat in an isolated worktree",
+ "exitWorktreeHint": "Picking the current branch leaves worktree and starts directly on it"
},
"folderPicker": {
"selectFolder": "Select folder",
diff --git a/apps/desktop/src/renderer/i18n/locales/ja/common.json b/apps/desktop/src/renderer/i18n/locales/ja/common.json
index bdaeeed0db..59c9b09a97 100644
--- a/apps/desktop/src/renderer/i18n/locales/ja/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/ja/common.json
@@ -4039,7 +4039,9 @@
"loading": "ブランチを読み込み中…",
"loadFailed": "ブランチの読み込みに失敗しました。タップして再試行",
"currentTooltip": "現在のブランチ",
- "sourceTooltip": "worktree のソースブランチ"
+ "sourceTooltip": "worktree のソースブランチ",
+ "worktreeHint": "別のブランチを選ぶと worktree 分離で開始します",
+ "exitWorktreeHint": "現在のブランチを選ぶと worktree を解除し、そのまま開始します"
},
"folderPicker": {
"selectFolder": "フォルダを選択",
diff --git a/apps/desktop/src/renderer/i18n/locales/ko/common.json b/apps/desktop/src/renderer/i18n/locales/ko/common.json
index 03c9855995..9f024e9f4d 100644
--- a/apps/desktop/src/renderer/i18n/locales/ko/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/ko/common.json
@@ -4039,7 +4039,9 @@
"loading": "브랜치 불러오는 중…",
"loadFailed": "브랜치를 불러오지 못했습니다. 눌러서 다시 시도",
"currentTooltip": "현재 브랜치",
- "sourceTooltip": "worktree 소스 브랜치"
+ "sourceTooltip": "worktree 소스 브랜치",
+ "worktreeHint": "다른 브랜치를 선택하면 worktree 격리로 시작합니다",
+ "exitWorktreeHint": "현재 브랜치를 선택하면 worktree를 해제하고 바로 시작합니다"
},
"folderPicker": {
"selectFolder": "폴더 선택",
diff --git a/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json b/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json
index 8a0957fa4f..66b90b0b3f 100644
--- a/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json
@@ -4039,7 +4039,9 @@
"loading": "加载分支中…",
"loadFailed": "分支列表加载失败,点此重试",
"currentTooltip": "当前分支",
- "sourceTooltip": "worktree 源分支"
+ "sourceTooltip": "worktree 源分支",
+ "worktreeHint": "选择其他分支将以 worktree 隔离启动",
+ "exitWorktreeHint": "选择当前分支将退出 worktree,直接在当前分支上启动"
},
"folderPicker": {
"selectFolder": "选择文件夹",