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:
@@ -1,4 +1,4 @@
|
||||
export { I18nProvider } from './context';
|
||||
export { useI18n } from './useI18n';
|
||||
export { initializeLocale } from './store';
|
||||
export type { I18nKey, Locale } from './store';
|
||||
export { formatMessage, initializeLocale, useI18nStore } from './store';
|
||||
export type { I18nKey, I18nParams, Locale } from './store';
|
||||
|
||||
@@ -765,6 +765,9 @@ export const dict = {
|
||||
'gitView.empty.worktreeFeaturesUnavailable': 'Worktree features are unavailable in this workspace mode.',
|
||||
'gitView.empty.worktreeSetupDescription': 'Finishing worktree setup and preparing repository state.',
|
||||
'gitView.empty.worktreeSetupInProgress': 'Worktree setup in progress',
|
||||
'worktree.bootstrap.toast.failed': 'Worktree setup failed',
|
||||
'worktree.bootstrap.toast.failedDescription': 'The worktree was created, but background setup did not finish.',
|
||||
'worktree.bootstrap.toast.timeoutDescription': 'The worktree was created, but background setup timed out.',
|
||||
'gitView.gitmoji.empty': 'No gitmoji found',
|
||||
'gitView.gitmoji.searchPlaceholder': 'Search gitmoji...',
|
||||
'gitView.gitmoji.title': 'Insert gitmoji',
|
||||
@@ -1716,6 +1719,7 @@ export const dict = {
|
||||
'chat.messageBody.actions.startNewMultiRun': 'Start new multi-run from this answer',
|
||||
'chat.messageBody.forkDialog.instructions.label': 'Instructions',
|
||||
'chat.messageBody.forkDialog.instructions.placeholder': 'Add instructions for the new session…',
|
||||
'chat.messageBody.forkDialog.createWorktree': 'Create worktree',
|
||||
'chat.generatedResult.actions.copy': 'Copy',
|
||||
'chat.generatedResult.actions.copied': 'Copied',
|
||||
'chat.generatedResult.commit.title': 'Generated commit message',
|
||||
|
||||
@@ -766,6 +766,9 @@ export const dict: Record<I18nKey, string> = {
|
||||
"gitView.empty.worktreeFeaturesUnavailable": "Las características de worktree no están disponibles en este modo de espacio de trabajo.",
|
||||
"gitView.empty.worktreeSetupDescription": "Finalizando la configuración de worktree y preparando el estado del repositorio.",
|
||||
"gitView.empty.worktreeSetupInProgress": "Configuración de worktree en progreso",
|
||||
"worktree.bootstrap.toast.failed": "Error al configurar el worktree",
|
||||
"worktree.bootstrap.toast.failedDescription": "El worktree se creó, pero la configuración en segundo plano no terminó.",
|
||||
"worktree.bootstrap.toast.timeoutDescription": "El worktree se creó, pero la configuración en segundo plano agotó el tiempo de espera.",
|
||||
"gitView.gitmoji.empty": "No se encontraron gitmojis",
|
||||
"gitView.gitmoji.searchPlaceholder": "Buscar gitmojis...",
|
||||
"gitView.gitmoji.title": "Insertar gitmoji",
|
||||
@@ -1682,6 +1685,7 @@ export const dict: Record<I18nKey, string> = {
|
||||
"chat.messageBody.actions.startNewMultiRun": "Iniciar nuevo multi-run desde esta respuesta",
|
||||
"chat.messageBody.forkDialog.instructions.label": "Instrucciones",
|
||||
"chat.messageBody.forkDialog.instructions.placeholder": "Añade instrucciones para la nueva sesión…",
|
||||
"chat.messageBody.forkDialog.createWorktree": "Crear worktree",
|
||||
"chat.generatedResult.actions.copy": "Copiar",
|
||||
"chat.generatedResult.actions.copied": "Copiado",
|
||||
"chat.generatedResult.commit.title": "Mensaje de commit generado",
|
||||
|
||||
@@ -766,6 +766,9 @@ export const dict: Record<I18nKey, string> = {
|
||||
'gitView.empty.worktreeFeaturesUnavailable': '이 워크스페이스 모드에서는 워크트리 기능을 사용할 수 없습니다.',
|
||||
'gitView.empty.worktreeSetupDescription': '워크트리 설정을 마치고 레포지토리 상태를 준비하고 있습니다.',
|
||||
'gitView.empty.worktreeSetupInProgress': '워크트리 설정 중',
|
||||
'worktree.bootstrap.toast.failed': '워크트리 설정 실패',
|
||||
'worktree.bootstrap.toast.failedDescription': '워크트리는 생성되었지만 백그라운드 설정이 완료되지 않았습니다.',
|
||||
'worktree.bootstrap.toast.timeoutDescription': '워크트리는 생성되었지만 백그라운드 설정 시간이 초과되었습니다.',
|
||||
'gitView.gitmoji.empty': 'gitmoji 없음',
|
||||
'gitView.gitmoji.searchPlaceholder': 'gitmoji 검색…',
|
||||
'gitView.gitmoji.title': 'gitmoji 삽입',
|
||||
@@ -1716,6 +1719,7 @@ export const dict: Record<I18nKey, string> = {
|
||||
'chat.messageBody.actions.startNewMultiRun': '이 응답에서 새 멀티런 시작',
|
||||
'chat.messageBody.forkDialog.instructions.label': '지침',
|
||||
'chat.messageBody.forkDialog.instructions.placeholder': '새 세션에 대한 지침을 입력하세요…',
|
||||
'chat.messageBody.forkDialog.createWorktree': '워크트리 만들기',
|
||||
'chat.generatedResult.actions.copy': '복사',
|
||||
'chat.generatedResult.actions.copied': '복사됨',
|
||||
'chat.generatedResult.commit.title': '생성된 커밋 메시지',
|
||||
|
||||
@@ -700,6 +700,7 @@ export const dict: Record<I18nKey, string> = {
|
||||
'chat.messageBody.actions.startNewMultiRun': 'Rozpocznij nowe wielokrotne uruchomienie z tej odpowiedzi',
|
||||
'chat.messageBody.forkDialog.instructions.label': 'Instrukcje',
|
||||
'chat.messageBody.forkDialog.instructions.placeholder': 'Dodaj instrukcje dla nowej sesji…',
|
||||
'chat.messageBody.forkDialog.createWorktree': 'Utwórz drzewo pracy',
|
||||
'chat.generatedResult.actions.copy': 'Kopiuj',
|
||||
'chat.generatedResult.actions.copied': 'Skopiowano',
|
||||
'chat.generatedResult.commit.title': 'Wygenerowana wiadomość commita',
|
||||
@@ -1639,6 +1640,9 @@ export const dict: Record<I18nKey, string> = {
|
||||
'gitView.empty.worktreeFeaturesUnavailable': 'Worktree features are unavailable in this workspace mode.',
|
||||
'gitView.empty.worktreeSetupDescription': 'Finishing worktree setup and preparing repository state.',
|
||||
'gitView.empty.worktreeSetupInProgress': 'Worktree setup in progress',
|
||||
'worktree.bootstrap.toast.failed': 'Konfiguracja drzewa pracy nie powiodła się',
|
||||
'worktree.bootstrap.toast.failedDescription': 'Drzewo pracy zostało utworzone, ale konfiguracja w tle nie została ukończona.',
|
||||
'worktree.bootstrap.toast.timeoutDescription': 'Drzewo pracy zostało utworzone, ale konfiguracja w tle przekroczyła limit czasu.',
|
||||
'gitView.gitmoji.empty': 'No gitmoji found',
|
||||
'gitView.gitmoji.searchPlaceholder': 'Search gitmoji...',
|
||||
'gitView.gitmoji.title': 'Insert gitmoji',
|
||||
|
||||
@@ -766,6 +766,9 @@ export const dict: Record<I18nKey, string> = {
|
||||
"gitView.empty.worktreeFeaturesUnavailable": "Os recursos de worktree não estão disponíveis neste modo de workspace.",
|
||||
"gitView.empty.worktreeSetupDescription": "Finalizando a configuração de worktree e preparando o status do repositório.",
|
||||
"gitView.empty.worktreeSetupInProgress": "Configuração de worktree em andamento",
|
||||
"worktree.bootstrap.toast.failed": "Falha na configuração do worktree",
|
||||
"worktree.bootstrap.toast.failedDescription": "O worktree foi criado, mas a configuração em segundo plano não terminou.",
|
||||
"worktree.bootstrap.toast.timeoutDescription": "O worktree foi criado, mas a configuração em segundo plano atingiu o tempo limite.",
|
||||
"gitView.gitmoji.empty": "Nenhum gitmoji encontrado",
|
||||
"gitView.gitmoji.searchPlaceholder": "Buscar gitmojis...",
|
||||
"gitView.gitmoji.title": "Insertar gitmoji",
|
||||
@@ -1682,6 +1685,7 @@ export const dict: Record<I18nKey, string> = {
|
||||
"chat.messageBody.actions.startNewMultiRun": "Iniciar novo multi-run a partir desta resposta",
|
||||
"chat.messageBody.forkDialog.instructions.label": "Instruções",
|
||||
"chat.messageBody.forkDialog.instructions.placeholder": "Adicione instruções para a nova sessão…",
|
||||
"chat.messageBody.forkDialog.createWorktree": "Criar worktree",
|
||||
"chat.generatedResult.actions.copy": "Copiar",
|
||||
"chat.generatedResult.actions.copied": "Copiado",
|
||||
"chat.generatedResult.commit.title": "Mensagem de commit gerada",
|
||||
|
||||
@@ -766,6 +766,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",
|
||||
@@ -1682,6 +1685,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": "Згенероване повідомлення коміту",
|
||||
|
||||
@@ -766,6 +766,9 @@ export const dict: Record<I18nKey, string> = {
|
||||
'gitView.empty.worktreeFeaturesUnavailable': '当前工作区模式下,工作树功能不可用。',
|
||||
'gitView.empty.worktreeSetupDescription': '正在完成工作树设置并准备仓库状态。',
|
||||
'gitView.empty.worktreeSetupInProgress': '工作树设置进行中',
|
||||
'worktree.bootstrap.toast.failed': '工作树设置失败',
|
||||
'worktree.bootstrap.toast.failedDescription': '工作树已创建,但后台设置未完成。',
|
||||
'worktree.bootstrap.toast.timeoutDescription': '工作树已创建,但后台设置超时。',
|
||||
'gitView.gitmoji.empty': '未找到 gitmoji',
|
||||
'gitView.gitmoji.searchPlaceholder': '搜索 gitmoji...',
|
||||
'gitView.gitmoji.title': '插入 gitmoji',
|
||||
@@ -1682,6 +1685,7 @@ export const dict: Record<I18nKey, string> = {
|
||||
'chat.messageBody.actions.startNewMultiRun': '基于此回答开始新的多运行',
|
||||
'chat.messageBody.forkDialog.instructions.label': '说明',
|
||||
'chat.messageBody.forkDialog.instructions.placeholder': '为新会话添加说明…',
|
||||
'chat.messageBody.forkDialog.createWorktree': '创建工作树',
|
||||
'chat.generatedResult.actions.copy': '复制',
|
||||
'chat.generatedResult.actions.copied': '已复制',
|
||||
'chat.generatedResult.commit.title': '生成的提交消息',
|
||||
|
||||
@@ -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