feat: support fast worktree-backed session flows
Add a directory-created fast path for worktree creation so session and send flows can continue once the target directory exists while Git attachment and bootstrap finish in the background. Track bootstrap status explicitly in shared UI contracts, including pending, ready, and failed states. Background watchers now surface failures and timeouts, update stored worktree metadata, and keep web and VS Code runtime behavior in parity. Move GitHub issue/PR worktree sessions and assistant-answer fork sessions onto the unified send path so provider, model, agent, and variant selections are preserved. The assistant-answer fork dialog can optionally create a worktree outside VS Code. Make worktree deletion dialogs close after linked-session cleanup while removing the worktree in the background, and clean up failed fast-create artifacts safely without recursively deleting user or agent-written files. Validation: bun test packages/ui/src/lib/worktrees/worktreeBootstrap.test.ts packages/ui/src/lib/worktrees/worktreeManager.test.ts; bun run type-check; bun run lint.
This commit is contained in:
@@ -778,6 +778,9 @@ export const dict: Record<I18nKey, string> = {
|
||||
'gitView.empty.worktreeFeaturesUnavailable': '目前工作區模式下,worktree 功能無法使用。',
|
||||
'gitView.empty.worktreeSetupDescription': '正在完成 worktree 設定並準備儲存庫狀態。',
|
||||
'gitView.empty.worktreeSetupInProgress': 'worktree 設定進行中',
|
||||
'worktree.bootstrap.toast.failed': 'worktree 設定失敗',
|
||||
'worktree.bootstrap.toast.failedDescription': 'worktree 已建立,但背景設定未完成。',
|
||||
'worktree.bootstrap.toast.timeoutDescription': 'worktree 已建立,但背景設定逾時。',
|
||||
'gitView.gitmoji.empty': '找不到 gitmoji',
|
||||
'gitView.gitmoji.searchPlaceholder': '搜尋 gitmoji...',
|
||||
'gitView.gitmoji.title': '插入 gitmoji',
|
||||
@@ -1686,6 +1689,7 @@ export const dict: Record<I18nKey, string> = {
|
||||
'chat.messageBody.actions.startNewMultiRun': '基於此回答開始新的 Multi-run',
|
||||
'chat.messageBody.forkDialog.instructions.label': '說明',
|
||||
'chat.messageBody.forkDialog.instructions.placeholder': '為新工作階段新增說明…',
|
||||
'chat.messageBody.forkDialog.createWorktree': '建立 worktree',
|
||||
'chat.generatedResult.actions.copy': '複製',
|
||||
'chat.generatedResult.actions.copied': '已複製',
|
||||
'chat.generatedResult.commit.title': '生成的提交訊息',
|
||||
|
||||
Reference in New Issue
Block a user