@vibe-forge/client 0.10.0 → 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-CCXV7u3V.js → arc-M4HYfcHs.js} +1 -1
- package/dist/assets/{blockDiagram-c4efeb88-Bm52FmvT.js → blockDiagram-c4efeb88-CUrDjrxj.js} +1 -1
- package/dist/assets/{c4Diagram-c83219d4-C8tTEpcK.js → c4Diagram-c83219d4-BMEtqlFp.js} +1 -1
- package/dist/assets/channel-Cj3Cp2OJ.js +1 -0
- package/dist/assets/{classDiagram-beda092f-CNAIBAH1.js → classDiagram-beda092f-BOmDJ0Ml.js} +1 -1
- package/dist/assets/{classDiagram-v2-2358418a-BHeZAVdc.js → classDiagram-v2-2358418a-BODzX2MB.js} +1 -1
- package/dist/assets/clone-B7Q9B1dS.js +1 -0
- package/dist/assets/{createText-1719965b-BS2hLG8t.js → createText-1719965b-B9Dd8zcR.js} +1 -1
- package/dist/assets/{cssMode-WHcTFAOU.js → cssMode-DLxG92Ot.js} +1 -1
- package/dist/assets/{edges-96097737-C07f4iWA.js → edges-96097737-CuZFd43m.js} +1 -1
- package/dist/assets/{erDiagram-0228fc6a-BytsAWUs.js → erDiagram-0228fc6a-8g9lu2-Z.js} +1 -1
- package/dist/assets/{flowDb-c6c81e3f-CQJkOpAs.js → flowDb-c6c81e3f-BlBS1tdN.js} +1 -1
- package/dist/assets/{flowDiagram-50d868cf-CD5Tng2S.js → flowDiagram-50d868cf-u6mWflpF.js} +1 -1
- package/dist/assets/flowDiagram-v2-4f6560a1-G3v545eF.js +1 -0
- package/dist/assets/{flowchart-elk-definition-6af322e1-ylso-GWH.js → flowchart-elk-definition-6af322e1-BDqI2NFr.js} +1 -1
- package/dist/assets/{freemarker2-U_9Jyyr3.js → freemarker2-tVtpTMPu.js} +1 -1
- package/dist/assets/{ganttDiagram-a2739b55-Cg98bJx5.js → ganttDiagram-a2739b55-CDQjx9Wu.js} +1 -1
- package/dist/assets/{gitGraphDiagram-82fe8481-7Yp4hz0N.js → gitGraphDiagram-82fe8481-DUHFKRVA.js} +1 -1
- package/dist/assets/{graph-Ig3nvzvL.js → graph-2HKPi5B_.js} +1 -1
- package/dist/assets/{handlebars-DQyCBwHe.js → handlebars-D00tgNd8.js} +1 -1
- package/dist/assets/{html-CNC2AT5k.js → html-B-TDzBiR.js} +1 -1
- package/dist/assets/{htmlMode-DlATk4xW.js → htmlMode-ClycqSTM.js} +1 -1
- package/dist/assets/{index-5325376f-C4zed9sb.js → index-5325376f-DPrJpRQ-.js} +1 -1
- package/dist/assets/{index-Dbx0JG0p.js → index-CAHZZEoo.js} +319 -323
- package/dist/assets/{index-DRLsOoqb.css → index-Di7lePfb.css} +1 -1
- package/dist/assets/{infoDiagram-8eee0895-C8oSBaFs.js → infoDiagram-8eee0895-Co5tS1I5.js} +1 -1
- package/dist/assets/{javascript-9wv9uKW4.js → javascript-zbkwarmb.js} +1 -1
- package/dist/assets/{journeyDiagram-c64418c1-D5kJldvy.js → journeyDiagram-c64418c1-k_qioHgy.js} +1 -1
- package/dist/assets/{jsonMode-45dv39mU.js → jsonMode-C3CSpzBF.js} +1 -1
- package/dist/assets/{layout-DYNFLnIl.js → layout-CjOXKxvs.js} +1 -1
- package/dist/assets/{line-1gvOYQYZ.js → line-C-XnQrKR.js} +1 -1
- package/dist/assets/{linear-DHGm6Zdw.js → linear-C7MMERzS.js} +1 -1
- package/dist/assets/{liquid-BGoxrdXO.js → liquid-5G37EU6K.js} +1 -1
- package/dist/assets/{lspLanguageFeatures-CpCCXhrd.js → lspLanguageFeatures-zaDMuhCE.js} +1 -1
- package/dist/assets/{mdx-Dc2iMbEw.js → mdx-Bc-LY0gi.js} +1 -1
- package/dist/assets/{mermaid.core-Cq2bBFF1.js → mermaid.core-CechbHof.js} +4 -4
- package/dist/assets/{mindmap-definition-8da855dc-y5l6GRVh.js → mindmap-definition-8da855dc-ejftCDGb.js} +1 -1
- package/dist/assets/{pieDiagram-a8764435-PNROcv9y.js → pieDiagram-a8764435-DY__X3Qj.js} +1 -1
- package/dist/assets/{python-DjYAge7h.js → python-vK2Ff2J5.js} +1 -1
- package/dist/assets/{quadrantDiagram-1e28029f-CFJ3VPpp.js → quadrantDiagram-1e28029f-azIZCv_2.js} +1 -1
- package/dist/assets/{razor-OIY8fx_i.js → razor-BipjBJKu.js} +1 -1
- package/dist/assets/{requirementDiagram-08caed73-BpzDIINS.js → requirementDiagram-08caed73-C4EB0Xs2.js} +1 -1
- package/dist/assets/{sankeyDiagram-a04cb91d-CH69-iIn.js → sankeyDiagram-a04cb91d-PNhR6YWu.js} +1 -1
- package/dist/assets/{sequenceDiagram-c5b8d532-yBBEeVFU.js → sequenceDiagram-c5b8d532-4c-qV-Ri.js} +1 -1
- package/dist/assets/{stateDiagram-1ecb1508-BvF4sign.js → stateDiagram-1ecb1508-CnURumPE.js} +1 -1
- package/dist/assets/{stateDiagram-v2-c2b004d7-BeyT7Ghx.js → stateDiagram-v2-c2b004d7-DR2qHTPg.js} +1 -1
- package/dist/assets/{styles-b4e223ce-C58zxmK6.js → styles-b4e223ce-B2PWXT_i.js} +1 -1
- package/dist/assets/{styles-ca3715f6-DCE5sFi5.js → styles-ca3715f6-DEhgVF5H.js} +1 -1
- package/dist/assets/{styles-d45a18b0-CG-C1aM8.js → styles-d45a18b0-DyzccA5F.js} +1 -1
- package/dist/assets/{svgDrawCommon-b86b1483-F-K8GeDd.js → svgDrawCommon-b86b1483-C_1tMhxp.js} +1 -1
- package/dist/assets/{timeline-definition-faaaa080-DPv4uqVX.js → timeline-definition-faaaa080-FdaC0dQH.js} +1 -1
- package/dist/assets/{tsMode-BtU8ZELV.js → tsMode-CrMC5T3_.js} +1 -1
- package/dist/assets/{typescript-CJHgISWo.js → typescript-CRfPu8v7.js} +1 -1
- package/dist/assets/{xml-C_TJw4Bi.js → xml-jlRvQfFI.js} +1 -1
- package/dist/assets/{xychartDiagram-f5964ef8-BmXlhBzX.js → xychartDiagram-f5964ef8-sxjv75h9.js} +1 -1
- package/dist/assets/{yaml-BujeJOJ6.js → yaml-B47_IHOH.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +10 -10
- package/src/components/chat/ChatHistoryView.tsx +92 -14
- package/src/components/chat/messages/MessageItem.scss +10 -0
- package/src/components/chat/messages/MessageItem.tsx +5 -1
- 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 +20 -26
- 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 +40 -15
- package/src/utils/strip-ansi.ts +26 -0
- package/dist/assets/channel-gq_WMRvv.js +0 -1
- package/dist/assets/clone-XxGY7A5N.js +0 -1
- package/dist/assets/flowDiagram-v2-4f6560a1-DIBOANLV.js +0 -1
package/src/routes/ChatRoute.tsx
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import './ChatRoute.scss'
|
|
2
2
|
|
|
3
3
|
import { Button, Empty } from 'antd'
|
|
4
|
+
import { useEffect, useMemo, useRef } from 'react'
|
|
4
5
|
import { useTranslation } from 'react-i18next'
|
|
5
|
-
import { useNavigate, useParams } from 'react-router-dom'
|
|
6
|
+
import { useNavigate, useParams, useSearchParams } from 'react-router-dom'
|
|
6
7
|
import useSWR from 'swr'
|
|
7
8
|
|
|
8
9
|
import type { Session } from '@vibe-forge/core'
|
|
@@ -12,6 +13,7 @@ import { ChatHeader } from '#~/components/chat/ChatHeader.js'
|
|
|
12
13
|
import { ChatHistoryView } from '#~/components/chat/ChatHistoryView.js'
|
|
13
14
|
import { ChatSettingsView } from '#~/components/chat/ChatSettingsView.js'
|
|
14
15
|
import { ChatTimelineView } from '#~/components/chat/ChatTimelineView.js'
|
|
16
|
+
import { buildChatHistoryStatusNotices } from '#~/components/chat/messages/build-chat-history-status-notices'
|
|
15
17
|
import { ChatTerminalView } from '#~/components/chat/terminal/ChatTerminalView.js'
|
|
16
18
|
import { useChatSession } from '#~/hooks/chat/use-chat-session'
|
|
17
19
|
import { useTerminalDockVisibility } from '#~/hooks/chat/use-terminal-dock-visibility'
|
|
@@ -26,9 +28,7 @@ export function ChatRoute() {
|
|
|
26
28
|
)
|
|
27
29
|
const session = sessionId == null ? undefined : sessionsRes?.sessions.find(item => item.id === sessionId)
|
|
28
30
|
|
|
29
|
-
if (sessionId != null && isLoading)
|
|
30
|
-
return null
|
|
31
|
-
}
|
|
31
|
+
if (sessionId != null && isLoading) return null
|
|
32
32
|
|
|
33
33
|
if (sessionId != null && session == null) {
|
|
34
34
|
return (
|
|
@@ -42,17 +42,15 @@ export function ChatRoute() {
|
|
|
42
42
|
return <ChatRouteView session={session} />
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
function ChatRouteView({
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
session?: Session
|
|
49
|
-
}) {
|
|
45
|
+
function ChatRouteView({ session }: { session?: Session }) {
|
|
46
|
+
const { t } = useTranslation()
|
|
47
|
+
const [searchParams] = useSearchParams()
|
|
50
48
|
const {
|
|
51
49
|
messages,
|
|
52
50
|
sessionInfo,
|
|
53
51
|
interactionRequest,
|
|
54
52
|
isReady,
|
|
55
|
-
|
|
53
|
+
errorState,
|
|
56
54
|
retryConnection,
|
|
57
55
|
activeView,
|
|
58
56
|
isTerminalOpen,
|
|
@@ -82,10 +80,37 @@ function ChatRouteView({
|
|
|
82
80
|
hasAvailableModels,
|
|
83
81
|
modelUnavailable
|
|
84
82
|
} = useChatSession({ session })
|
|
85
|
-
const
|
|
83
|
+
const targetMessageId = searchParams.get('messageId') ?? undefined
|
|
84
|
+
const targetToolUseId = searchParams.get('toolUseId') ?? undefined
|
|
85
|
+
const isDebugMode = searchParams.get('debug') === 'true'
|
|
86
|
+
const deepLinkTargetKey = targetToolUseId?.trim()
|
|
87
|
+
? `tool:${targetToolUseId.trim()}`
|
|
88
|
+
: targetMessageId?.trim()
|
|
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
|
|
86
99
|
const resolvedActiveView = session?.id != null ? activeView : 'history'
|
|
87
100
|
const shouldShowTerminal = session?.id != null && isTerminalOpen
|
|
88
101
|
const { isRendered: isTerminalRendered, isVisible: isTerminalVisible } = useTerminalDockVisibility(shouldShowTerminal)
|
|
102
|
+
const handledDeepLinkTargetRef = useRef('')
|
|
103
|
+
|
|
104
|
+
useEffect(() => {
|
|
105
|
+
if (deepLinkTargetKey === '') {
|
|
106
|
+
handledDeepLinkTargetRef.current = ''
|
|
107
|
+
} else if (handledDeepLinkTargetRef.current !== deepLinkTargetKey) {
|
|
108
|
+
handledDeepLinkTargetRef.current = deepLinkTargetKey
|
|
109
|
+
if (activeView !== 'history') {
|
|
110
|
+
setActiveView('history')
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}, [activeView, deepLinkTargetKey, setActiveView])
|
|
89
114
|
|
|
90
115
|
return (
|
|
91
116
|
<div
|
|
@@ -106,9 +131,7 @@ function ChatRouteView({
|
|
|
106
131
|
activeView={resolvedActiveView}
|
|
107
132
|
isTerminalOpen={isTerminalOpen}
|
|
108
133
|
onViewChange={setActiveView}
|
|
109
|
-
onToggleTerminal={() =>
|
|
110
|
-
setIsTerminalOpen(!isTerminalOpen)
|
|
111
|
-
}}
|
|
134
|
+
onToggleTerminal={() => setIsTerminalOpen(!isTerminalOpen)}
|
|
112
135
|
/>
|
|
113
136
|
)}
|
|
114
137
|
|
|
@@ -117,8 +140,10 @@ function ChatRouteView({
|
|
|
117
140
|
isReady={isReady}
|
|
118
141
|
messages={messages}
|
|
119
142
|
session={session}
|
|
143
|
+
targetMessageId={targetMessageId}
|
|
144
|
+
targetToolUseId={targetToolUseId}
|
|
120
145
|
sessionInfo={sessionInfo}
|
|
121
|
-
|
|
146
|
+
historyStatusNotices={historyStatusNotices}
|
|
122
147
|
onRetryConnection={retryConnection}
|
|
123
148
|
interactionRequest={interactionRequest}
|
|
124
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-Cq2bBFF1.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-Ig3nvzvL.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-CQJkOpAs.js";import{f as a,g as t}from"./styles-d45a18b0-CG-C1aM8.js";import{ar as i}from"./mermaid.core-Cq2bBFF1.js";import"./graph-Ig3nvzvL.js";import"./layout-DYNFLnIl.js";import"./index-Dbx0JG0p.js";import"./index-5325376f-C4zed9sb.js";import"./clone-XxGY7A5N.js";import"./edges-96097737-C07f4iWA.js";import"./createText-1719965b-BS2hLG8t.js";import"./line-1gvOYQYZ.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./channel-gq_WMRvv.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};
|