@vibe-forge/client 0.10.1 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{arc-C1rWFTer.js → arc-CSepokz3.js} +1 -1
- package/dist/assets/{blockDiagram-c4efeb88-DlZ9x70F.js → blockDiagram-c4efeb88-D0ARcoNf.js} +1 -1
- package/dist/assets/{c4Diagram-c83219d4-BKKxi__y.js → c4Diagram-c83219d4-BysYF9kP.js} +1 -1
- package/dist/assets/channel-CeKPk6Nd.js +1 -0
- package/dist/assets/{classDiagram-beda092f-CVGPySZq.js → classDiagram-beda092f-BG1GhIOL.js} +1 -1
- package/dist/assets/{classDiagram-v2-2358418a-7kp8GVVj.js → classDiagram-v2-2358418a-Dd08uGSH.js} +1 -1
- package/dist/assets/clone-CrkD2PuD.js +1 -0
- package/dist/assets/{createText-1719965b-Dykv8kT9.js → createText-1719965b-CigPEIEn.js} +1 -1
- package/dist/assets/{cssMode-B59COYVW.js → cssMode-MjflyEfm.js} +1 -1
- package/dist/assets/{edges-96097737-CkZ1ZBro.js → edges-96097737-DuTBJJRv.js} +1 -1
- package/dist/assets/{erDiagram-0228fc6a-281ADcRp.js → erDiagram-0228fc6a-Cp1bL7Y7.js} +1 -1
- package/dist/assets/{flowDb-c6c81e3f-BQjX_flP.js → flowDb-c6c81e3f-BfKbhiq5.js} +1 -1
- package/dist/assets/{flowDiagram-50d868cf-DMHZTjES.js → flowDiagram-50d868cf-m7gGc3PK.js} +1 -1
- package/dist/assets/flowDiagram-v2-4f6560a1-4ZU4bdp1.js +1 -0
- package/dist/assets/{flowchart-elk-definition-6af322e1-CI3yz4z8.js → flowchart-elk-definition-6af322e1-EVeTDRRK.js} +1 -1
- package/dist/assets/{freemarker2-DWnWjibn.js → freemarker2-Bb3-QAIN.js} +1 -1
- package/dist/assets/{ganttDiagram-a2739b55-B3IING9L.js → ganttDiagram-a2739b55-DslB2U0R.js} +1 -1
- package/dist/assets/{gitGraphDiagram-82fe8481-CnArIr_T.js → gitGraphDiagram-82fe8481-C-KFWMXL.js} +1 -1
- package/dist/assets/{graph-BZ1F0Yve.js → graph-CukaUc0o.js} +1 -1
- package/dist/assets/{handlebars-C1QH9qTz.js → handlebars-C4le-2Y6.js} +1 -1
- package/dist/assets/{html-D1NkqHjC.js → html-CjNiRs5S.js} +1 -1
- package/dist/assets/{htmlMode-DAZCE_rA.js → htmlMode-B73_3-We.js} +1 -1
- package/dist/assets/{index-5325376f-Da9zSHjA.js → index-5325376f-CVISZFPw.js} +1 -1
- package/dist/assets/{index-C0vjF3D0.js → index-BZosmb5_.js} +336 -336
- package/dist/assets/index-C1oh0w9H.css +32 -0
- package/dist/assets/{infoDiagram-8eee0895-DYbFvRM7.js → infoDiagram-8eee0895-DoirLE1K.js} +1 -1
- package/dist/assets/{javascript-CoMjGRHa.js → javascript-BDjnqJFP.js} +1 -1
- package/dist/assets/{journeyDiagram-c64418c1-Boebox0b.js → journeyDiagram-c64418c1-Ckn-p2CM.js} +1 -1
- package/dist/assets/{jsonMode-D__gAvuz.js → jsonMode-C-ftOc5j.js} +1 -1
- package/dist/assets/{layout-CTcHNbHp.js → layout-Z7yUG7hB.js} +1 -1
- package/dist/assets/{line-4AwinCz2.js → line-DPG_cfAy.js} +1 -1
- package/dist/assets/{linear-CeSMLzJW.js → linear--GSeVfMi.js} +1 -1
- package/dist/assets/{liquid-DZF6egdE.js → liquid-COiLZ9py.js} +1 -1
- package/dist/assets/{lspLanguageFeatures-6K4lv5S2.js → lspLanguageFeatures-DGmhryFq.js} +1 -1
- package/dist/assets/{mdx-Cnt4ka6w.js → mdx-BpL87Gej.js} +1 -1
- package/dist/assets/{mermaid.core-B0yG5s4D.js → mermaid.core-Cg1CCDo6.js} +4 -4
- package/dist/assets/{mindmap-definition-8da855dc-KJEvXMKj.js → mindmap-definition-8da855dc-CKDof1lD.js} +1 -1
- package/dist/assets/{pieDiagram-a8764435-17nFAXPJ.js → pieDiagram-a8764435-DwvCaZVE.js} +1 -1
- package/dist/assets/{python-DA3TtjDv.js → python-63dBmWV_.js} +1 -1
- package/dist/assets/{quadrantDiagram-1e28029f-Dt4vubi-.js → quadrantDiagram-1e28029f-CkzYBQpy.js} +1 -1
- package/dist/assets/{razor-CWDJgvX_.js → razor-C50tBqEZ.js} +1 -1
- package/dist/assets/{requirementDiagram-08caed73-H6aDyDK-.js → requirementDiagram-08caed73-Brgdjqf4.js} +1 -1
- package/dist/assets/{sankeyDiagram-a04cb91d-DxsVtbjI.js → sankeyDiagram-a04cb91d-CGkYexrs.js} +1 -1
- package/dist/assets/{sequenceDiagram-c5b8d532-BHa148XJ.js → sequenceDiagram-c5b8d532-D0wE-_J8.js} +1 -1
- package/dist/assets/{stateDiagram-1ecb1508-DgwBm8LO.js → stateDiagram-1ecb1508-BYb3NCXZ.js} +1 -1
- package/dist/assets/{stateDiagram-v2-c2b004d7-BK7IQLVc.js → stateDiagram-v2-c2b004d7-DrPqi4Pt.js} +1 -1
- package/dist/assets/{styles-b4e223ce-DzW27Bc-.js → styles-b4e223ce-DD66TIO4.js} +1 -1
- package/dist/assets/{styles-ca3715f6-Dex2GiLT.js → styles-ca3715f6-iy02LHIV.js} +1 -1
- package/dist/assets/{styles-d45a18b0-B6fGtDKS.js → styles-d45a18b0-BgqAgJyW.js} +1 -1
- package/dist/assets/{svgDrawCommon-b86b1483-B4HYgfV5.js → svgDrawCommon-b86b1483-CDq7ugnw.js} +1 -1
- package/dist/assets/{timeline-definition-faaaa080--QSbWb25.js → timeline-definition-faaaa080-DzcLLjK0.js} +1 -1
- package/dist/assets/{tsMode-ZM7ocZCH.js → tsMode-BFRFI4ct.js} +1 -1
- package/dist/assets/{typescript-CKWDmBCc.js → typescript-CBZQRAPv.js} +1 -1
- package/dist/assets/{xml-DuEUAzPi.js → xml-BpWm6upt.js} +1 -1
- package/dist/assets/{xychartDiagram-f5964ef8-D09Zkv2K.js → xychartDiagram-f5964ef8-zBN8FmLQ.js} +1 -1
- package/dist/assets/{yaml-DL7QPRYk.js → yaml-CqbJPiIP.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +10 -10
- package/src/api/git.ts +78 -0
- package/src/api.ts +24 -0
- package/src/components/chat/ChatHeader.tsx +4 -0
- package/src/components/chat/ChatHistoryView.tsx +22 -13
- package/src/components/chat/git-controls/BranchSwitcherDropdown.tsx +157 -0
- package/src/components/chat/git-controls/ChatGitControls.scss +616 -0
- package/src/components/chat/git-controls/ChatGitControls.tsx +151 -0
- package/src/components/chat/git-controls/GitCommitModal.tsx +199 -0
- package/src/components/chat/git-controls/GitCommitModalParts.tsx +151 -0
- package/src/components/chat/git-controls/GitOperationsDropdown.tsx +123 -0
- package/src/components/chat/git-controls/GitPushModal.tsx +106 -0
- package/src/components/chat/git-controls/GitWorktreeDropdown.tsx +68 -0
- package/src/components/chat/git-controls/git-branch-utils.ts +88 -0
- package/src/components/chat/git-controls/git-commit-utils.ts +79 -0
- package/src/components/chat/git-controls/git-mutation-utils.ts +69 -0
- package/src/components/chat/git-controls/git-operation-utils.ts +98 -0
- package/src/components/chat/git-controls/git-worktree-utils.ts +49 -0
- package/src/components/chat/git-controls/use-chat-git-commit.ts +185 -0
- package/src/components/chat/git-controls/use-chat-git-controls.ts +200 -0
- package/src/components/chat/git-controls/use-chat-git-push-state.ts +19 -0
- package/src/components/chat/git-controls/use-chat-git-worktrees.ts +39 -0
- package/src/components/chat/messages/MessageStatusNotice.scss +163 -0
- package/src/components/chat/messages/MessageStatusNotice.tsx +48 -0
- package/src/components/chat/messages/build-chat-history-status-notices.ts +138 -0
- package/src/components/chat/sender/@components/sender-body/SenderBody.tsx +0 -24
- package/src/components/chat/sender/@core/build-sender-controller-result.ts +0 -6
- package/src/components/chat/sender/@hooks/use-sender-controller.ts +0 -2
- package/src/components/chat/sender/@types/sender-props.ts +0 -3
- package/src/components/chat/sender/Sender.scss +0 -58
- package/src/components/chat/sender/Sender.tsx +0 -2
- package/src/components/chat/tools/DefaultTool.tsx +84 -208
- package/src/components/chat/tools/adapter-claude/ClaudeEditDiff.tsx +30 -0
- package/src/components/chat/tools/adapter-claude/GenericClaudeTool.scss +128 -0
- package/src/components/chat/tools/adapter-claude/GenericClaudeTool.tsx +119 -0
- package/src/components/chat/tools/adapter-claude/claude-tool-edit-builders.ts +109 -0
- package/src/components/chat/tools/adapter-claude/claude-tool-field-sections.tsx +83 -0
- package/src/components/chat/tools/adapter-claude/claude-tool-operation-builders.ts +135 -0
- package/src/components/chat/tools/adapter-claude/claude-tool-presentation.ts +61 -0
- package/src/components/chat/tools/adapter-claude/claude-tool-shared.ts +185 -0
- package/src/components/chat/tools/adapter-claude/claude-tool-summary.ts +76 -0
- package/src/components/chat/tools/adapter-claude/claude-tool-system-builders.ts +125 -0
- package/src/components/chat/tools/adapter-claude/claude-tool-task-builders.ts +148 -0
- package/src/components/chat/tools/adapter-claude/index.ts +24 -15
- package/src/components/chat/tools/core/ToolCallBox.scss +362 -36
- package/src/components/chat/tools/core/ToolCallBox.tsx +35 -13
- package/src/components/chat/tools/core/ToolDiffViewer.scss +138 -0
- package/src/components/chat/tools/core/ToolDiffViewer.tsx +180 -0
- package/src/components/chat/tools/core/ToolGroup.scss +52 -74
- package/src/components/chat/tools/core/ToolGroup.tsx +25 -40
- package/src/components/chat/tools/core/ToolRenderer.tsx +3 -3
- package/src/components/chat/tools/core/ToolResultContent.tsx +66 -0
- package/src/components/chat/tools/core/ToolSummaryHeader.tsx +67 -0
- package/src/components/chat/tools/core/generic-tool-presentation.ts +661 -0
- package/src/components/chat/tools/core/tool-content-presence.ts +57 -0
- package/src/components/chat/tools/core/tool-display.ts +203 -0
- package/src/components/chat/tools/core/tool-field-sections.tsx +132 -0
- package/src/components/chat/tools/core/tool-result-content-utils.ts +171 -0
- package/src/components/chat/tools/core/tool-summary.ts +206 -0
- package/src/components/chat/tools/plugin-chrome-devtools/ChromeDevtoolsTool.tsx +59 -53
- package/src/components/chat/tools/task/GetTaskInfoTool.tsx +26 -9
- package/src/components/chat/tools/task/ListTasksTool.tsx +22 -9
- package/src/components/chat/tools/task/StartTasksTool.tsx +22 -9
- package/src/hooks/chat/interaction-state.ts +29 -9
- package/src/hooks/chat/session-view-cache.ts +80 -0
- package/src/hooks/chat/use-chat-scroll.ts +2 -2
- package/src/hooks/chat/use-chat-session-messages.ts +139 -39
- package/src/hooks/chat/use-chat-session.ts +2 -2
- package/src/resources/locales/en.json +149 -0
- package/src/resources/locales/zh.json +149 -0
- package/src/routes/ChatRoute.tsx +24 -27
- package/src/utils/strip-ansi.ts +26 -0
- package/dist/assets/channel-F1aqMANO.js +0 -1
- package/dist/assets/clone-B-GCuXNo.js +0 -1
- package/dist/assets/flowDiagram-v2-4f6560a1-C5FzdVl1.js +0 -1
- package/dist/assets/index-vzEbM21t.css +0 -32
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"batchRestoreSuccess": "批量还原成功",
|
|
25
25
|
"batchRestoreFailed": "部分会话还原失败",
|
|
26
26
|
"cancel": "取消",
|
|
27
|
+
"continue": "继续",
|
|
27
28
|
"confirm": "确定",
|
|
28
29
|
"confirmAction": "确认{{action}}",
|
|
29
30
|
"startNewChat": "暂时没有未归档的历史会话,聊点什么吧",
|
|
@@ -325,11 +326,22 @@
|
|
|
325
326
|
"modelSearchPlaceholder": "搜索模型或服务",
|
|
326
327
|
"modelUnavailable": "暂无可用模型",
|
|
327
328
|
"modelConfigRequired": "请先在配置中添加模型服务后再开始会话",
|
|
329
|
+
"modelConfigRequiredTitle": "需要先配置模型服务",
|
|
330
|
+
"modelConfigRequiredHelp": "至少添加一个模型服务后,再回到输入框重新发送消息。",
|
|
328
331
|
"connectionErrorTitle": "连接异常",
|
|
332
|
+
"connectionClosedTitle": "连接已断开",
|
|
329
333
|
"sessionErrorTitle": "任务失败",
|
|
330
334
|
"connectionError": "WebSocket 连接失败,请检查服务状态后重试",
|
|
331
335
|
"connectionClosed": "WebSocket 连接已关闭,请重试",
|
|
336
|
+
"connectionErrorHelp": "当前流式更新还没恢复就中断了。重试连接后可以重新订阅这个会话的实时输出。",
|
|
337
|
+
"connectionClosedHelp": "当前消息流意外结束了。重试连接后,可以继续接收这个会话后续的新消息。",
|
|
338
|
+
"sessionErrorHelp": "可以先检查最近一次工具输出或终端日志,再决定是否从最近一条用户消息继续。",
|
|
339
|
+
"sessionErrorCode": "错误码:{{code}}",
|
|
332
340
|
"retryConnection": "重试连接",
|
|
341
|
+
"debugMockLabel": "调试预览",
|
|
342
|
+
"debugMockConnectionErrorMessage": "无法连上当前会话的消息流,WebSocket 握手在收到任何更新前就超时了。",
|
|
343
|
+
"debugMockConnectionClosedMessage": "assistant 已经开始回复,但连接中途断开;在重新连接前,不会再收到新的 token。",
|
|
344
|
+
"debugMockSessionErrorMessage": "runtime 在等待下游工具结果时触发了会话超时,这一轮任务已经停止。",
|
|
333
345
|
"permissionRequestBadge": "权限请求",
|
|
334
346
|
"permissionRequestTitleWithTool": "正在请求使用【{{tool}}】的调用权限,请选择通过",
|
|
335
347
|
"permissionSubject": "审批范围",
|
|
@@ -428,6 +440,73 @@
|
|
|
428
440
|
"viewTimeline": "时序",
|
|
429
441
|
"viewTerminal": "终端",
|
|
430
442
|
"viewSettings": "配置",
|
|
443
|
+
"gitBranchSwitcher": "切换分支",
|
|
444
|
+
"gitOperations": "Git 操作",
|
|
445
|
+
"gitWorktree": "Worktree",
|
|
446
|
+
"gitDetachedHead": "DETACHED",
|
|
447
|
+
"gitSearchBranches": "搜索本地或远程分支",
|
|
448
|
+
"gitBranchesLocal": "本地分支",
|
|
449
|
+
"gitBranchesWorktrees": "其他 worktree",
|
|
450
|
+
"gitBranchesRemote": "远程分支",
|
|
451
|
+
"gitBranchCheckedOutInOtherWorktree": "已在 {{path}}",
|
|
452
|
+
"gitRemoteBranchCheckedOutInOtherWorktree": "本地分支已在 {{path}}",
|
|
453
|
+
"gitNoBranches": "没有匹配的分支",
|
|
454
|
+
"gitCreateBranch": "创建分支",
|
|
455
|
+
"gitCreateBranchWithName": "创建分支 {{branch}}",
|
|
456
|
+
"gitSwitchBranchSuccess": "已切换到 {{branch}}",
|
|
457
|
+
"gitCreateBranchSuccess": "已创建并切换到 {{branch}}",
|
|
458
|
+
"gitCommitShort": "提交",
|
|
459
|
+
"gitCommitAllChanges": "提交全部变更",
|
|
460
|
+
"gitCommitDialogTitle": "提交全部变更",
|
|
461
|
+
"gitCommitDescription": "会先暂存当前仓库的全部变更,再执行提交。",
|
|
462
|
+
"gitCommitPanelTitle": "提交更改",
|
|
463
|
+
"gitCommitPanelBranch": "分支",
|
|
464
|
+
"gitCommitPanelChanges": "更改",
|
|
465
|
+
"gitChangedFilesCount": "{{count}} 个文件",
|
|
466
|
+
"gitCommitIncludeUnstagedChanges": "包含未暂存的更改",
|
|
467
|
+
"gitCommitIncludeUnstagedChangesDescription": "带上未暂存和未跟踪文件。",
|
|
468
|
+
"gitCommitOnlyStagedChangesDescription": "只提交已暂存内容。",
|
|
469
|
+
"gitCommitSkipHooks": "跳过 Git hooks",
|
|
470
|
+
"gitCommitSkipHooksDescription": "跳过 pre-commit / commit-msg。",
|
|
471
|
+
"gitCommitAmend": "修订最近一次提交",
|
|
472
|
+
"gitCommitAmendDescription": "并入最近一次提交。当前:{{subject}}",
|
|
473
|
+
"gitCommitAmendUnavailableDescription": "当前仓库还没有可修订的提交。",
|
|
474
|
+
"gitCommitMessageLabel": "提交消息",
|
|
475
|
+
"gitCommitMessageOptional": "可选",
|
|
476
|
+
"gitCommitMessagePlaceholder": "输入提交说明",
|
|
477
|
+
"gitCommitMessagePlaceholderAmend": "留空则保留上一条提交消息",
|
|
478
|
+
"gitCommitMessageAmendHint": "留空会沿用最近一次提交消息。",
|
|
479
|
+
"gitCommitMessageRequired": "请输入提交说明",
|
|
480
|
+
"gitCommitSuccess": "提交成功",
|
|
481
|
+
"gitCommitNoChanges": "当前没有可提交的更改",
|
|
482
|
+
"gitCommitNoStagedChanges": "当前没有已暂存的更改",
|
|
483
|
+
"gitCommitNextStep": "后续步骤",
|
|
484
|
+
"gitCommitAndPush": "提交并推送",
|
|
485
|
+
"gitCommitAndPushSuccess": "提交并推送成功",
|
|
486
|
+
"gitCommitPushFailedAfterCommit": "提交已完成,但推送失败:{{error}}",
|
|
487
|
+
"gitAmendSuccess": "修订成功",
|
|
488
|
+
"gitAmendAndPushSuccess": "修订并推送成功",
|
|
489
|
+
"gitAmendUnavailable": "当前没有可修订的提交",
|
|
490
|
+
"gitForcePush": "强制推送",
|
|
491
|
+
"gitForcePushDescription": "用 force-with-lease 覆盖远端。",
|
|
492
|
+
"gitForcePushHint": "仅远端没有新提交时覆盖。",
|
|
493
|
+
"gitPushNeedsSyncOrForce": "当前分支落后上游,请先同步或开启强制推送。",
|
|
494
|
+
"gitPushShort": "推送",
|
|
495
|
+
"gitPush": "推送当前分支",
|
|
496
|
+
"gitPushPanelTitle": "推送更改",
|
|
497
|
+
"gitPushPanelUpstream": "上游",
|
|
498
|
+
"gitPushPanelUpstreamHint": "首次推送会自动设置上游。",
|
|
499
|
+
"gitForcePushSuccess": "强制推送成功",
|
|
500
|
+
"gitPushSuccess": "推送成功",
|
|
501
|
+
"gitSyncShort": "同步",
|
|
502
|
+
"gitSync": "同步当前分支",
|
|
503
|
+
"gitSyncSuccess": "同步成功",
|
|
504
|
+
"gitStatusDirty": "有未提交变更",
|
|
505
|
+
"gitStatusClean": "工作区干净",
|
|
506
|
+
"gitUpstreamStatus": "领先 {{ahead}} / 落后 {{behind}}",
|
|
507
|
+
"gitNoUpstream": "未设置上游",
|
|
508
|
+
"gitLocalBranch": "本地",
|
|
509
|
+
"gitRemoteBranch": "远程 · {{remote}}",
|
|
431
510
|
"deleteSessionTitle": "删除会话",
|
|
432
511
|
"deleteSessionDesc": "删除会话会永久移除全部消息与上下文,请确认后再继续。",
|
|
433
512
|
"timelineEmpty": "暂无事件记录",
|
|
@@ -548,9 +627,30 @@
|
|
|
548
627
|
"startTasksFailed": "失败",
|
|
549
628
|
"startTasksLogs": "任务日志",
|
|
550
629
|
"task": "任务",
|
|
630
|
+
"taskCount": "{{count}} 个任务",
|
|
551
631
|
"taskExitCode": "退出码: {{code}}",
|
|
552
632
|
"writeSuccess": "写入成功",
|
|
553
633
|
"writeFailed": "写入失败",
|
|
634
|
+
"askUserQuestion": "询问问题",
|
|
635
|
+
"globTool": "Glob",
|
|
636
|
+
"grepTool": "Grep",
|
|
637
|
+
"editTool": "编辑文件",
|
|
638
|
+
"lsTool": "浏览目录",
|
|
639
|
+
"notebookEdit": "编辑 Notebook",
|
|
640
|
+
"webFetch": "抓取网页",
|
|
641
|
+
"webSearch": "网页搜索",
|
|
642
|
+
"booleanOn": "开启",
|
|
643
|
+
"booleanOff": "关闭",
|
|
644
|
+
"diffSplit": "双栏",
|
|
645
|
+
"diffInline": "单栏",
|
|
646
|
+
"skill": "技能",
|
|
647
|
+
"enterPlanMode": "进入计划模式",
|
|
648
|
+
"exitPlanMode": "退出计划模式",
|
|
649
|
+
"taskCreate": "创建任务",
|
|
650
|
+
"taskGet": "获取任务",
|
|
651
|
+
"taskUpdate": "更新任务",
|
|
652
|
+
"taskList": "列出任务",
|
|
653
|
+
"claudeTask": "Claude 任务",
|
|
554
654
|
"todo": "任务规划",
|
|
555
655
|
"call": "调用",
|
|
556
656
|
"reading": "正在读取文件...",
|
|
@@ -560,6 +660,55 @@
|
|
|
560
660
|
"runInBackground": "后台执行",
|
|
561
661
|
"dangerouslyDisableSandbox": "禁用沙箱",
|
|
562
662
|
"viewCommand": "查看指令",
|
|
663
|
+
"noParameters": "无参数",
|
|
664
|
+
"groupSummaryCount": "{{name}} {{count}} 次",
|
|
665
|
+
"groupSummaryMoreCount": "+{{count}} 次",
|
|
666
|
+
"singleSelect": "单选",
|
|
667
|
+
"multiSelect": "多选",
|
|
668
|
+
"fields": {
|
|
669
|
+
"activeForm": "当前表述",
|
|
670
|
+
"addBlockedBy": "新增阻塞源",
|
|
671
|
+
"addBlocks": "新增阻塞项",
|
|
672
|
+
"allowedDomains": "允许域名",
|
|
673
|
+
"allowedPrompts": "允许的提示",
|
|
674
|
+
"answers": "回答",
|
|
675
|
+
"args": "参数",
|
|
676
|
+
"blockedDomains": "屏蔽域名",
|
|
677
|
+
"cellId": "单元 ID",
|
|
678
|
+
"cellType": "单元类型",
|
|
679
|
+
"command": "命令",
|
|
680
|
+
"content": "内容",
|
|
681
|
+
"description": "说明",
|
|
682
|
+
"disableSandbox": "禁用沙箱",
|
|
683
|
+
"details": "详情",
|
|
684
|
+
"editMode": "编辑模式",
|
|
685
|
+
"glob": "Glob",
|
|
686
|
+
"ignore": "忽略项",
|
|
687
|
+
"limit": "Limit",
|
|
688
|
+
"maxTurns": "最大轮次",
|
|
689
|
+
"metadata": "元数据",
|
|
690
|
+
"model": "模型",
|
|
691
|
+
"mode": "模式",
|
|
692
|
+
"newSource": "新内容",
|
|
693
|
+
"newString": "新字符串",
|
|
694
|
+
"oldString": "旧字符串",
|
|
695
|
+
"owner": "负责人",
|
|
696
|
+
"offset": "Offset",
|
|
697
|
+
"path": "路径",
|
|
698
|
+
"prompt": "提示词",
|
|
699
|
+
"pushToRemote": "推送到远端",
|
|
700
|
+
"questions": "问题",
|
|
701
|
+
"remoteSession": "远端会话",
|
|
702
|
+
"remoteSessionUrl": "远端会话地址",
|
|
703
|
+
"replaceAll": "全量替换",
|
|
704
|
+
"resume": "恢复",
|
|
705
|
+
"runInBackground": "后台执行",
|
|
706
|
+
"status": "状态",
|
|
707
|
+
"subagentType": "子代理类型",
|
|
708
|
+
"subject": "主题",
|
|
709
|
+
"timeout": "超时",
|
|
710
|
+
"todos": "待办事项"
|
|
711
|
+
},
|
|
563
712
|
"unknown": "未知工具"
|
|
564
713
|
},
|
|
565
714
|
"terminal": {
|
package/src/routes/ChatRoute.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './ChatRoute.scss'
|
|
2
2
|
|
|
3
3
|
import { Button, Empty } from 'antd'
|
|
4
|
-
import { useEffect, useRef } from 'react'
|
|
4
|
+
import { useEffect, useMemo, useRef } from 'react'
|
|
5
5
|
import { useTranslation } from 'react-i18next'
|
|
6
6
|
import { useNavigate, useParams, useSearchParams } from 'react-router-dom'
|
|
7
7
|
import useSWR from 'swr'
|
|
@@ -13,6 +13,7 @@ import { ChatHeader } from '#~/components/chat/ChatHeader.js'
|
|
|
13
13
|
import { ChatHistoryView } from '#~/components/chat/ChatHistoryView.js'
|
|
14
14
|
import { ChatSettingsView } from '#~/components/chat/ChatSettingsView.js'
|
|
15
15
|
import { ChatTimelineView } from '#~/components/chat/ChatTimelineView.js'
|
|
16
|
+
import { buildChatHistoryStatusNotices } from '#~/components/chat/messages/build-chat-history-status-notices'
|
|
16
17
|
import { ChatTerminalView } from '#~/components/chat/terminal/ChatTerminalView.js'
|
|
17
18
|
import { useChatSession } from '#~/hooks/chat/use-chat-session'
|
|
18
19
|
import { useTerminalDockVisibility } from '#~/hooks/chat/use-terminal-dock-visibility'
|
|
@@ -27,9 +28,7 @@ export function ChatRoute() {
|
|
|
27
28
|
)
|
|
28
29
|
const session = sessionId == null ? undefined : sessionsRes?.sessions.find(item => item.id === sessionId)
|
|
29
30
|
|
|
30
|
-
if (sessionId != null && isLoading)
|
|
31
|
-
return null
|
|
32
|
-
}
|
|
31
|
+
if (sessionId != null && isLoading) return null
|
|
33
32
|
|
|
34
33
|
if (sessionId != null && session == null) {
|
|
35
34
|
return (
|
|
@@ -43,18 +42,15 @@ export function ChatRoute() {
|
|
|
43
42
|
return <ChatRouteView session={session} />
|
|
44
43
|
}
|
|
45
44
|
|
|
46
|
-
function ChatRouteView({
|
|
47
|
-
|
|
48
|
-
}: {
|
|
49
|
-
session?: Session
|
|
50
|
-
}) {
|
|
45
|
+
function ChatRouteView({ session }: { session?: Session }) {
|
|
46
|
+
const { t } = useTranslation()
|
|
51
47
|
const [searchParams] = useSearchParams()
|
|
52
48
|
const {
|
|
53
49
|
messages,
|
|
54
50
|
sessionInfo,
|
|
55
51
|
interactionRequest,
|
|
56
52
|
isReady,
|
|
57
|
-
|
|
53
|
+
errorState,
|
|
58
54
|
retryConnection,
|
|
59
55
|
activeView,
|
|
60
56
|
isTerminalOpen,
|
|
@@ -86,12 +82,20 @@ function ChatRouteView({
|
|
|
86
82
|
} = useChatSession({ session })
|
|
87
83
|
const targetMessageId = searchParams.get('messageId') ?? undefined
|
|
88
84
|
const targetToolUseId = searchParams.get('toolUseId') ?? undefined
|
|
85
|
+
const isDebugMode = searchParams.get('debug') === 'true'
|
|
89
86
|
const deepLinkTargetKey = targetToolUseId?.trim()
|
|
90
87
|
? `tool:${targetToolUseId.trim()}`
|
|
91
88
|
: targetMessageId?.trim()
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
const
|
|
89
|
+
? `message:${targetMessageId.trim()}`
|
|
90
|
+
: ''
|
|
91
|
+
const historyStatusNotices = useMemo(() =>
|
|
92
|
+
buildChatHistoryStatusNotices({
|
|
93
|
+
errorState,
|
|
94
|
+
isDebugMode,
|
|
95
|
+
modelUnavailable,
|
|
96
|
+
t
|
|
97
|
+
}), [errorState, isDebugMode, modelUnavailable, t])
|
|
98
|
+
const isEmptyNewSession = !session?.id && messages.length === 0 && historyStatusNotices.length === 0
|
|
95
99
|
const resolvedActiveView = session?.id != null ? activeView : 'history'
|
|
96
100
|
const shouldShowTerminal = session?.id != null && isTerminalOpen
|
|
97
101
|
const { isRendered: isTerminalRendered, isVisible: isTerminalVisible } = useTerminalDockVisibility(shouldShowTerminal)
|
|
@@ -100,16 +104,11 @@ function ChatRouteView({
|
|
|
100
104
|
useEffect(() => {
|
|
101
105
|
if (deepLinkTargetKey === '') {
|
|
102
106
|
handledDeepLinkTargetRef.current = ''
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
handledDeepLinkTargetRef.current = deepLinkTargetKey
|
|
111
|
-
if (activeView !== 'history') {
|
|
112
|
-
setActiveView('history')
|
|
107
|
+
} else if (handledDeepLinkTargetRef.current !== deepLinkTargetKey) {
|
|
108
|
+
handledDeepLinkTargetRef.current = deepLinkTargetKey
|
|
109
|
+
if (activeView !== 'history') {
|
|
110
|
+
setActiveView('history')
|
|
111
|
+
}
|
|
113
112
|
}
|
|
114
113
|
}, [activeView, deepLinkTargetKey, setActiveView])
|
|
115
114
|
|
|
@@ -132,9 +131,7 @@ function ChatRouteView({
|
|
|
132
131
|
activeView={resolvedActiveView}
|
|
133
132
|
isTerminalOpen={isTerminalOpen}
|
|
134
133
|
onViewChange={setActiveView}
|
|
135
|
-
onToggleTerminal={() =>
|
|
136
|
-
setIsTerminalOpen(!isTerminalOpen)
|
|
137
|
-
}}
|
|
134
|
+
onToggleTerminal={() => setIsTerminalOpen(!isTerminalOpen)}
|
|
138
135
|
/>
|
|
139
136
|
)}
|
|
140
137
|
|
|
@@ -146,7 +143,7 @@ function ChatRouteView({
|
|
|
146
143
|
targetMessageId={targetMessageId}
|
|
147
144
|
targetToolUseId={targetToolUseId}
|
|
148
145
|
sessionInfo={sessionInfo}
|
|
149
|
-
|
|
146
|
+
historyStatusNotices={historyStatusNotices}
|
|
150
147
|
onRetryConnection={retryConnection}
|
|
151
148
|
interactionRequest={interactionRequest}
|
|
152
149
|
onInteractionResponse={handleInteractionResponse}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const ESCAPE = 27
|
|
2
|
+
|
|
3
|
+
export const stripAnsi = (value: string) => {
|
|
4
|
+
let output = ''
|
|
5
|
+
let index = 0
|
|
6
|
+
|
|
7
|
+
while (index < value.length) {
|
|
8
|
+
if (value.charCodeAt(index) === ESCAPE && value[index + 1] === '[') {
|
|
9
|
+
index += 2
|
|
10
|
+
while (index < value.length) {
|
|
11
|
+
const code = value.charCodeAt(index)
|
|
12
|
+
if (code >= 64 && code <= 126) {
|
|
13
|
+
index += 1
|
|
14
|
+
break
|
|
15
|
+
}
|
|
16
|
+
index += 1
|
|
17
|
+
}
|
|
18
|
+
continue
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
output += value[index]
|
|
22
|
+
index += 1
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return output
|
|
26
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{al as o,am as n}from"./mermaid.core-B0yG5s4D.js";const l=(a,r)=>o.lang.round(n.parse(a)[r]);export{l as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as r}from"./graph-BZ1F0Yve.js";var a=4;function n(o){return r(o,a)}export{n as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as o,p as e}from"./flowDb-c6c81e3f-BQjX_flP.js";import{f as a,g as t}from"./styles-d45a18b0-B6fGtDKS.js";import{ar as i}from"./mermaid.core-B0yG5s4D.js";import"./graph-BZ1F0Yve.js";import"./layout-CTcHNbHp.js";import"./index-C0vjF3D0.js";import"./index-5325376f-Da9zSHjA.js";import"./clone-B-GCuXNo.js";import"./edges-96097737-CkZ1ZBro.js";import"./createText-1719965b-Dykv8kT9.js";import"./line-4AwinCz2.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./channel-F1aqMANO.js";const n={parser:e,db:o,renderer:t,styles:a,init:r=>{r.flowchart||(r.flowchart={}),r.flowchart.arrowMarkerAbsolute=r.arrowMarkerAbsolute,i({flowchart:{arrowMarkerAbsolute:r.arrowMarkerAbsolute}}),t.setConf(r.flowchart),o.clear(),o.setGen("gen-2")}};export{n as diagram};
|