@vibe-forge/client 0.10.1 → 0.11.0
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-M4HYfcHs.js} +1 -1
- package/dist/assets/{blockDiagram-c4efeb88-DlZ9x70F.js → blockDiagram-c4efeb88-CUrDjrxj.js} +1 -1
- package/dist/assets/{c4Diagram-c83219d4-BKKxi__y.js → c4Diagram-c83219d4-BMEtqlFp.js} +1 -1
- package/dist/assets/channel-Cj3Cp2OJ.js +1 -0
- package/dist/assets/{classDiagram-beda092f-CVGPySZq.js → classDiagram-beda092f-BOmDJ0Ml.js} +1 -1
- package/dist/assets/{classDiagram-v2-2358418a-7kp8GVVj.js → classDiagram-v2-2358418a-BODzX2MB.js} +1 -1
- package/dist/assets/clone-B7Q9B1dS.js +1 -0
- package/dist/assets/{createText-1719965b-Dykv8kT9.js → createText-1719965b-B9Dd8zcR.js} +1 -1
- package/dist/assets/{cssMode-B59COYVW.js → cssMode-DLxG92Ot.js} +1 -1
- package/dist/assets/{edges-96097737-CkZ1ZBro.js → edges-96097737-CuZFd43m.js} +1 -1
- package/dist/assets/{erDiagram-0228fc6a-281ADcRp.js → erDiagram-0228fc6a-8g9lu2-Z.js} +1 -1
- package/dist/assets/{flowDb-c6c81e3f-BQjX_flP.js → flowDb-c6c81e3f-BlBS1tdN.js} +1 -1
- package/dist/assets/{flowDiagram-50d868cf-DMHZTjES.js → flowDiagram-50d868cf-u6mWflpF.js} +1 -1
- package/dist/assets/flowDiagram-v2-4f6560a1-G3v545eF.js +1 -0
- package/dist/assets/{flowchart-elk-definition-6af322e1-CI3yz4z8.js → flowchart-elk-definition-6af322e1-BDqI2NFr.js} +1 -1
- package/dist/assets/{freemarker2-DWnWjibn.js → freemarker2-tVtpTMPu.js} +1 -1
- package/dist/assets/{ganttDiagram-a2739b55-B3IING9L.js → ganttDiagram-a2739b55-CDQjx9Wu.js} +1 -1
- package/dist/assets/{gitGraphDiagram-82fe8481-CnArIr_T.js → gitGraphDiagram-82fe8481-DUHFKRVA.js} +1 -1
- package/dist/assets/{graph-BZ1F0Yve.js → graph-2HKPi5B_.js} +1 -1
- package/dist/assets/{handlebars-C1QH9qTz.js → handlebars-D00tgNd8.js} +1 -1
- package/dist/assets/{html-D1NkqHjC.js → html-B-TDzBiR.js} +1 -1
- package/dist/assets/{htmlMode-DAZCE_rA.js → htmlMode-ClycqSTM.js} +1 -1
- package/dist/assets/{index-5325376f-Da9zSHjA.js → index-5325376f-DPrJpRQ-.js} +1 -1
- package/dist/assets/{index-C0vjF3D0.js → index-CAHZZEoo.js} +319 -323
- package/dist/assets/{index-vzEbM21t.css → index-Di7lePfb.css} +1 -1
- package/dist/assets/{infoDiagram-8eee0895-DYbFvRM7.js → infoDiagram-8eee0895-Co5tS1I5.js} +1 -1
- package/dist/assets/{javascript-CoMjGRHa.js → javascript-zbkwarmb.js} +1 -1
- package/dist/assets/{journeyDiagram-c64418c1-Boebox0b.js → journeyDiagram-c64418c1-k_qioHgy.js} +1 -1
- package/dist/assets/{jsonMode-D__gAvuz.js → jsonMode-C3CSpzBF.js} +1 -1
- package/dist/assets/{layout-CTcHNbHp.js → layout-CjOXKxvs.js} +1 -1
- package/dist/assets/{line-4AwinCz2.js → line-C-XnQrKR.js} +1 -1
- package/dist/assets/{linear-CeSMLzJW.js → linear-C7MMERzS.js} +1 -1
- package/dist/assets/{liquid-DZF6egdE.js → liquid-5G37EU6K.js} +1 -1
- package/dist/assets/{lspLanguageFeatures-6K4lv5S2.js → lspLanguageFeatures-zaDMuhCE.js} +1 -1
- package/dist/assets/{mdx-Cnt4ka6w.js → mdx-Bc-LY0gi.js} +1 -1
- package/dist/assets/{mermaid.core-B0yG5s4D.js → mermaid.core-CechbHof.js} +4 -4
- package/dist/assets/{mindmap-definition-8da855dc-KJEvXMKj.js → mindmap-definition-8da855dc-ejftCDGb.js} +1 -1
- package/dist/assets/{pieDiagram-a8764435-17nFAXPJ.js → pieDiagram-a8764435-DY__X3Qj.js} +1 -1
- package/dist/assets/{python-DA3TtjDv.js → python-vK2Ff2J5.js} +1 -1
- package/dist/assets/{quadrantDiagram-1e28029f-Dt4vubi-.js → quadrantDiagram-1e28029f-azIZCv_2.js} +1 -1
- package/dist/assets/{razor-CWDJgvX_.js → razor-BipjBJKu.js} +1 -1
- package/dist/assets/{requirementDiagram-08caed73-H6aDyDK-.js → requirementDiagram-08caed73-C4EB0Xs2.js} +1 -1
- package/dist/assets/{sankeyDiagram-a04cb91d-DxsVtbjI.js → sankeyDiagram-a04cb91d-PNhR6YWu.js} +1 -1
- package/dist/assets/{sequenceDiagram-c5b8d532-BHa148XJ.js → sequenceDiagram-c5b8d532-4c-qV-Ri.js} +1 -1
- package/dist/assets/{stateDiagram-1ecb1508-DgwBm8LO.js → stateDiagram-1ecb1508-CnURumPE.js} +1 -1
- package/dist/assets/{stateDiagram-v2-c2b004d7-BK7IQLVc.js → stateDiagram-v2-c2b004d7-DR2qHTPg.js} +1 -1
- package/dist/assets/{styles-b4e223ce-DzW27Bc-.js → styles-b4e223ce-B2PWXT_i.js} +1 -1
- package/dist/assets/{styles-ca3715f6-Dex2GiLT.js → styles-ca3715f6-DEhgVF5H.js} +1 -1
- package/dist/assets/{styles-d45a18b0-B6fGtDKS.js → styles-d45a18b0-DyzccA5F.js} +1 -1
- package/dist/assets/{svgDrawCommon-b86b1483-B4HYgfV5.js → svgDrawCommon-b86b1483-C_1tMhxp.js} +1 -1
- package/dist/assets/{timeline-definition-faaaa080--QSbWb25.js → timeline-definition-faaaa080-FdaC0dQH.js} +1 -1
- package/dist/assets/{tsMode-ZM7ocZCH.js → tsMode-CrMC5T3_.js} +1 -1
- package/dist/assets/{typescript-CKWDmBCc.js → typescript-CRfPu8v7.js} +1 -1
- package/dist/assets/{xml-DuEUAzPi.js → xml-jlRvQfFI.js} +1 -1
- package/dist/assets/{xychartDiagram-f5964ef8-D09Zkv2K.js → xychartDiagram-f5964ef8-sxjv75h9.js} +1 -1
- package/dist/assets/{yaml-DL7QPRYk.js → yaml-B47_IHOH.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +10 -10
- package/src/components/chat/ChatHistoryView.tsx +22 -13
- 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 +74 -207
- 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 +133 -0
- package/src/components/chat/tools/adapter-claude/claude-tool-edit-builders.ts +102 -0
- package/src/components/chat/tools/adapter-claude/claude-tool-field-sections.tsx +168 -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 +344 -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/tool-content-presence.ts +57 -0
- package/src/components/chat/tools/core/tool-display.ts +192 -0
- package/src/components/chat/tools/core/tool-result-content-utils.ts +171 -0
- package/src/components/chat/tools/core/tool-summary.ts +194 -0
- package/src/components/chat/tools/plugin-chrome-devtools/ChromeDevtoolsTool.tsx +66 -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/use-chat-scroll.ts +2 -2
- package/src/hooks/chat/use-chat-session-messages.ts +24 -18
- package/src/hooks/chat/use-chat-session.ts +2 -2
- package/src/resources/locales/en.json +81 -0
- package/src/resources/locales/zh.json +81 -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/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};
|