@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
|
@@ -5,6 +5,22 @@
|
|
|
5
5
|
overflow: hidden;
|
|
6
6
|
background-color: var(--bg-color);
|
|
7
7
|
|
|
8
|
+
&.tool-group--compact {
|
|
9
|
+
border: none;
|
|
10
|
+
border-radius: 0;
|
|
11
|
+
background: transparent;
|
|
12
|
+
|
|
13
|
+
.tool-call-box {
|
|
14
|
+
background: transparent;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.tool-call-header,
|
|
18
|
+
.tool-result-header,
|
|
19
|
+
.tool-call-body {
|
|
20
|
+
background: transparent;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
8
24
|
.tool-call-box {
|
|
9
25
|
border: none;
|
|
10
26
|
margin: 0;
|
|
@@ -31,7 +47,7 @@
|
|
|
31
47
|
background-color: var(--tag-bg);
|
|
32
48
|
transition: text-shadow .4s ease;
|
|
33
49
|
|
|
34
|
-
&.
|
|
50
|
+
&.is-static {
|
|
35
51
|
cursor: default;
|
|
36
52
|
}
|
|
37
53
|
|
|
@@ -47,16 +63,62 @@
|
|
|
47
63
|
text-shadow: 0 0 .5px currentColor;
|
|
48
64
|
}
|
|
49
65
|
|
|
66
|
+
&.is-static:hover {
|
|
67
|
+
text-shadow: none;
|
|
68
|
+
}
|
|
69
|
+
|
|
50
70
|
.material-symbols-rounded {
|
|
51
71
|
font-size: 16px;
|
|
52
72
|
color: var(--sub-text-color);
|
|
53
73
|
|
|
54
74
|
&.expand-icon {
|
|
55
75
|
font-size: 14px;
|
|
76
|
+
transition: transform .22s ease, opacity .18s ease;
|
|
77
|
+
transform-origin: center;
|
|
78
|
+
|
|
79
|
+
&.is-expanded {
|
|
80
|
+
transform: rotate(180deg);
|
|
81
|
+
}
|
|
56
82
|
}
|
|
57
83
|
}
|
|
58
84
|
}
|
|
59
85
|
|
|
86
|
+
.tool-call-box--inline {
|
|
87
|
+
.tool-call-header {
|
|
88
|
+
height: auto;
|
|
89
|
+
min-height: 24px;
|
|
90
|
+
padding: 2px 0;
|
|
91
|
+
background: transparent;
|
|
92
|
+
border-bottom: none;
|
|
93
|
+
align-items: center;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&.expanded {
|
|
97
|
+
.tool-call-header {
|
|
98
|
+
border-bottom: none;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.tool-call-header-main {
|
|
103
|
+
align-items: center;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.expand-icon {
|
|
107
|
+
margin-top: 0;
|
|
108
|
+
opacity: .72;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.tool-call-body-shell {
|
|
112
|
+
padding-left: 0;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.tool-call-body {
|
|
116
|
+
padding: 0 0 4px;
|
|
117
|
+
background: transparent;
|
|
118
|
+
border-top: none;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
60
122
|
.tool-result-header {
|
|
61
123
|
padding: 6px 10px;
|
|
62
124
|
height: 32px;
|
|
@@ -113,10 +175,40 @@
|
|
|
113
175
|
}
|
|
114
176
|
}
|
|
115
177
|
|
|
178
|
+
.tool-call-body-shell {
|
|
179
|
+
display: grid;
|
|
180
|
+
grid-template-rows: 0fr;
|
|
181
|
+
opacity: 0;
|
|
182
|
+
visibility: hidden;
|
|
183
|
+
pointer-events: none;
|
|
184
|
+
overflow: hidden;
|
|
185
|
+
transition:
|
|
186
|
+
grid-template-rows .22s ease,
|
|
187
|
+
padding-left .22s ease,
|
|
188
|
+
opacity .18s ease,
|
|
189
|
+
visibility 0s linear .22s;
|
|
190
|
+
|
|
191
|
+
&.expanded {
|
|
192
|
+
grid-template-rows: 1fr;
|
|
193
|
+
opacity: 1;
|
|
194
|
+
visibility: visible;
|
|
195
|
+
pointer-events: auto;
|
|
196
|
+
transition:
|
|
197
|
+
grid-template-rows .22s ease,
|
|
198
|
+
padding-left .22s ease,
|
|
199
|
+
opacity .18s ease;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.tool-call-box--inline .tool-call-body-shell.expanded {
|
|
204
|
+
padding-left: 18px;
|
|
205
|
+
padding-top: 6px;
|
|
206
|
+
}
|
|
207
|
+
|
|
116
208
|
.tool-call-body {
|
|
209
|
+
min-height: 0;
|
|
117
210
|
padding: 0;
|
|
118
211
|
overflow: hidden;
|
|
119
|
-
transition: all .2s ease-in-out;
|
|
120
212
|
background-color: var(--bg-color);
|
|
121
213
|
|
|
122
214
|
.tool-call-box.result & {
|
|
@@ -126,47 +218,65 @@
|
|
|
126
218
|
|
|
127
219
|
.tool-content {
|
|
128
220
|
padding: 0;
|
|
221
|
+
}
|
|
129
222
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
223
|
+
.code-block-wrapper {
|
|
224
|
+
border: none;
|
|
225
|
+
border-radius: 0;
|
|
226
|
+
}
|
|
135
227
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
228
|
+
.tool-result-structured {
|
|
229
|
+
display: flex;
|
|
230
|
+
flex-direction: column;
|
|
231
|
+
gap: 8px;
|
|
232
|
+
padding: 2px 0;
|
|
233
|
+
}
|
|
142
234
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
235
|
+
.tool-result-text {
|
|
236
|
+
font-size: 13px;
|
|
237
|
+
color: var(--text-color);
|
|
238
|
+
}
|
|
147
239
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
240
|
+
.tool-result-text-content {
|
|
241
|
+
white-space: pre-wrap;
|
|
242
|
+
line-height: 1.6;
|
|
243
|
+
}
|
|
152
244
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
245
|
+
.tool-result-image-wrapper {
|
|
246
|
+
display: flex;
|
|
247
|
+
flex-direction: column;
|
|
248
|
+
gap: 6px;
|
|
249
|
+
}
|
|
158
250
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
251
|
+
.tool-result-image {
|
|
252
|
+
max-width: 100%;
|
|
253
|
+
border-radius: 6px;
|
|
254
|
+
border: 1px solid var(--border-color);
|
|
255
|
+
background: var(--bg-color);
|
|
256
|
+
}
|
|
165
257
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
258
|
+
.tool-result-image-caption {
|
|
259
|
+
font-size: 12px;
|
|
260
|
+
color: var(--sub-text-color);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.tool-result-list {
|
|
264
|
+
display: flex;
|
|
265
|
+
flex-direction: column;
|
|
266
|
+
gap: 4px;
|
|
267
|
+
padding: 2px 0;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.tool-result-list-item {
|
|
271
|
+
padding: 4px 0 4px 10px;
|
|
272
|
+
border: none;
|
|
273
|
+
border-left: 1px solid var(--border-color);
|
|
274
|
+
border-radius: 0;
|
|
275
|
+
background: transparent;
|
|
276
|
+
color: var(--text-color);
|
|
277
|
+
font-family: var(--font-mono);
|
|
278
|
+
font-size: 12px;
|
|
279
|
+
overflow-wrap: anywhere;
|
|
170
280
|
}
|
|
171
281
|
}
|
|
172
282
|
|
|
@@ -352,4 +462,220 @@
|
|
|
352
462
|
border-radius: 0;
|
|
353
463
|
padding: 0;
|
|
354
464
|
}
|
|
465
|
+
|
|
466
|
+
.tool-summary-header {
|
|
467
|
+
display: flex;
|
|
468
|
+
align-items: center;
|
|
469
|
+
justify-content: space-between;
|
|
470
|
+
gap: 6px;
|
|
471
|
+
width: 100%;
|
|
472
|
+
min-width: 0;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
.tool-summary-header__lead {
|
|
476
|
+
display: flex;
|
|
477
|
+
align-items: center;
|
|
478
|
+
gap: 5px;
|
|
479
|
+
flex: 1;
|
|
480
|
+
min-width: 0;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
.tool-summary-header__action {
|
|
484
|
+
display: inline-flex;
|
|
485
|
+
align-items: center;
|
|
486
|
+
gap: 4px;
|
|
487
|
+
flex-shrink: 0;
|
|
488
|
+
min-width: 0;
|
|
489
|
+
color: var(--text-color);
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
.tool-summary-header__icon {
|
|
493
|
+
display: inline-flex;
|
|
494
|
+
align-items: center;
|
|
495
|
+
justify-content: center;
|
|
496
|
+
width: 14px;
|
|
497
|
+
min-width: 14px;
|
|
498
|
+
color: var(--sub-text-color);
|
|
499
|
+
|
|
500
|
+
.material-symbols-rounded,
|
|
501
|
+
i {
|
|
502
|
+
font-size: 14px;
|
|
503
|
+
line-height: 1;
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
.tool-summary-header__title {
|
|
508
|
+
font-size: 12px;
|
|
509
|
+
line-height: 1.35;
|
|
510
|
+
font-weight: 500;
|
|
511
|
+
color: var(--sub-text-color);
|
|
512
|
+
white-space: nowrap;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
.tool-summary-header__toggle {
|
|
516
|
+
font-size: 13px;
|
|
517
|
+
color: var(--sub-text-color);
|
|
518
|
+
transition: transform .22s ease, opacity .18s ease;
|
|
519
|
+
transform-origin: center;
|
|
520
|
+
opacity: .78;
|
|
521
|
+
flex-shrink: 0;
|
|
522
|
+
|
|
523
|
+
&.is-expanded {
|
|
524
|
+
transform: rotate(180deg);
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
.tool-summary-header__target {
|
|
529
|
+
min-width: 0;
|
|
530
|
+
overflow: hidden;
|
|
531
|
+
text-overflow: ellipsis;
|
|
532
|
+
white-space: nowrap;
|
|
533
|
+
font-size: 10px;
|
|
534
|
+
line-height: 1.4;
|
|
535
|
+
color: var(--sub-text-color);
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
.tool-summary-header__target--mono {
|
|
539
|
+
font-family: var(--font-mono);
|
|
540
|
+
font-size: 10px;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
.tool-summary-header__meta {
|
|
544
|
+
display: inline-flex;
|
|
545
|
+
align-items: center;
|
|
546
|
+
flex-shrink: 0;
|
|
547
|
+
font-size: 11px;
|
|
548
|
+
line-height: 1;
|
|
549
|
+
color: var(--sub-text-color);
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
.tool-detail-sections {
|
|
553
|
+
display: flex;
|
|
554
|
+
flex-direction: column;
|
|
555
|
+
gap: 6px;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
.tool-detail-section {
|
|
559
|
+
display: flex;
|
|
560
|
+
flex-direction: column;
|
|
561
|
+
gap: 4px;
|
|
562
|
+
min-width: 0;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
.tool-detail-section__header {
|
|
566
|
+
display: flex;
|
|
567
|
+
align-items: center;
|
|
568
|
+
min-height: 16px;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
.tool-detail-section__icon {
|
|
572
|
+
display: inline-flex;
|
|
573
|
+
align-items: center;
|
|
574
|
+
justify-content: center;
|
|
575
|
+
width: 16px;
|
|
576
|
+
height: 16px;
|
|
577
|
+
font-size: 15px;
|
|
578
|
+
color: var(--sub-text-color);
|
|
579
|
+
cursor: help;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
.tool-detail-section__text {
|
|
583
|
+
font-size: 12px;
|
|
584
|
+
line-height: 1.55;
|
|
585
|
+
color: var(--text-color);
|
|
586
|
+
white-space: pre-wrap;
|
|
587
|
+
overflow-wrap: anywhere;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
.tool-detail-list {
|
|
591
|
+
display: flex;
|
|
592
|
+
flex-direction: column;
|
|
593
|
+
gap: 4px;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
.tool-detail-list-item {
|
|
597
|
+
padding: 4px 0 4px 10px;
|
|
598
|
+
border: none;
|
|
599
|
+
border-left: 1px solid var(--border-color);
|
|
600
|
+
border-radius: 0;
|
|
601
|
+
background: transparent;
|
|
602
|
+
color: var(--text-color);
|
|
603
|
+
font-family: var(--font-mono);
|
|
604
|
+
font-size: 12px;
|
|
605
|
+
overflow-wrap: anywhere;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
.tool-inline-token-list {
|
|
609
|
+
display: flex;
|
|
610
|
+
flex-wrap: wrap;
|
|
611
|
+
gap: 4px;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
.tool-inline-token {
|
|
615
|
+
display: inline-flex;
|
|
616
|
+
align-items: center;
|
|
617
|
+
gap: 5px;
|
|
618
|
+
max-width: min(100%, 320px);
|
|
619
|
+
min-width: 0;
|
|
620
|
+
padding: 2px 8px 2px 6px;
|
|
621
|
+
border: 1px solid var(--border-color);
|
|
622
|
+
border-radius: 999px;
|
|
623
|
+
background: transparent;
|
|
624
|
+
color: var(--text-color);
|
|
625
|
+
cursor: help;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
.tool-inline-token__icon {
|
|
629
|
+
flex-shrink: 0;
|
|
630
|
+
font-size: 14px;
|
|
631
|
+
color: var(--sub-text-color);
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
.tool-inline-token__value {
|
|
635
|
+
min-width: 0;
|
|
636
|
+
overflow: hidden;
|
|
637
|
+
text-overflow: ellipsis;
|
|
638
|
+
white-space: nowrap;
|
|
639
|
+
font-family: var(--font-mono);
|
|
640
|
+
font-size: 11px;
|
|
641
|
+
line-height: 1.4;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
.tool-tooltip-content {
|
|
645
|
+
display: flex;
|
|
646
|
+
flex-direction: column;
|
|
647
|
+
gap: 4px;
|
|
648
|
+
max-width: min(420px, 70vw);
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
.tool-tooltip-content__title {
|
|
652
|
+
font-size: 11px;
|
|
653
|
+
font-weight: 600;
|
|
654
|
+
line-height: 1.35;
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
.tool-tooltip-content__value {
|
|
658
|
+
white-space: pre-wrap;
|
|
659
|
+
overflow-wrap: anywhere;
|
|
660
|
+
font-family: var(--font-mono);
|
|
661
|
+
font-size: 11px;
|
|
662
|
+
line-height: 1.4;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
.tool-status {
|
|
666
|
+
display: inline-flex;
|
|
667
|
+
align-items: center;
|
|
668
|
+
|
|
669
|
+
.material-symbols-rounded {
|
|
670
|
+
font-size: 16px;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
&.tool-status--success {
|
|
674
|
+
color: var(--success-color);
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
&.tool-status--error {
|
|
678
|
+
color: var(--danger-color);
|
|
679
|
+
}
|
|
680
|
+
}
|
|
355
681
|
}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import './ToolCallBox.scss'
|
|
2
2
|
import React, { useState } from 'react'
|
|
3
3
|
|
|
4
|
+
type ToolCallBoxHeaderRender = (state: {
|
|
5
|
+
isExpanded: boolean
|
|
6
|
+
isCollapsible: boolean
|
|
7
|
+
}) => React.ReactNode
|
|
8
|
+
|
|
4
9
|
export function ToolCallBox({
|
|
5
10
|
header,
|
|
6
11
|
content,
|
|
@@ -8,23 +13,32 @@ export function ToolCallBox({
|
|
|
8
13
|
type = 'call',
|
|
9
14
|
defaultExpanded = false,
|
|
10
15
|
collapsible = true,
|
|
16
|
+
variant = 'default',
|
|
11
17
|
onDoubleClick
|
|
12
18
|
}: {
|
|
13
|
-
header: React.ReactNode
|
|
14
|
-
content
|
|
19
|
+
header: React.ReactNode | ToolCallBoxHeaderRender
|
|
20
|
+
content?: React.ReactNode
|
|
15
21
|
isError?: boolean
|
|
16
22
|
type?: 'call' | 'result'
|
|
17
23
|
defaultExpanded?: boolean
|
|
18
24
|
collapsible?: boolean
|
|
25
|
+
variant?: 'default' | 'inline'
|
|
19
26
|
onDoubleClick?: (e: React.MouseEvent) => void
|
|
20
27
|
}) {
|
|
21
28
|
const [expanded, setExpanded] = useState(defaultExpanded || !collapsible)
|
|
29
|
+
const hasBody = content != null && content !== false
|
|
30
|
+
const isCollapsible = collapsible && hasBody
|
|
22
31
|
|
|
23
|
-
const isExpanded = !
|
|
32
|
+
const isExpanded = hasBody && (!isCollapsible || expanded)
|
|
33
|
+
const headerContent = typeof header === 'function'
|
|
34
|
+
? header({ isExpanded, isCollapsible })
|
|
35
|
+
: header
|
|
24
36
|
|
|
25
37
|
return (
|
|
26
38
|
<div
|
|
27
|
-
className={`tool-call-box ${type === 'result' ? 'result' : ''} ${
|
|
39
|
+
className={`tool-call-box tool-call-box--${variant} ${type === 'result' ? 'result' : ''} ${
|
|
40
|
+
isExpanded ? 'expanded' : 'collapsed'
|
|
41
|
+
}`}
|
|
28
42
|
onDoubleClick={(e) => {
|
|
29
43
|
if (onDoubleClick) {
|
|
30
44
|
e.stopPropagation()
|
|
@@ -33,21 +47,29 @@ export function ToolCallBox({
|
|
|
33
47
|
}}
|
|
34
48
|
>
|
|
35
49
|
<div
|
|
36
|
-
className={`tool-call-header ${type === 'result' && isError ? 'error' : ''}
|
|
37
|
-
|
|
50
|
+
className={`tool-call-header ${type === 'result' && isError ? 'error' : ''} ${
|
|
51
|
+
isCollapsible ? 'is-collapsible' : 'is-static'
|
|
52
|
+
}`}
|
|
53
|
+
aria-expanded={isCollapsible ? isExpanded : undefined}
|
|
54
|
+
onClick={() => isCollapsible && setExpanded(!expanded)}
|
|
38
55
|
>
|
|
39
56
|
<div className='tool-call-header-main'>
|
|
40
|
-
{
|
|
57
|
+
{headerContent}
|
|
41
58
|
</div>
|
|
42
|
-
{
|
|
43
|
-
<span className=
|
|
44
|
-
|
|
59
|
+
{isCollapsible && typeof header !== 'function' && (
|
|
60
|
+
<span className={`material-symbols-rounded expand-icon ${isExpanded ? 'is-expanded' : ''}`}>
|
|
61
|
+
expand_more
|
|
45
62
|
</span>
|
|
46
63
|
)}
|
|
47
64
|
</div>
|
|
48
|
-
{
|
|
49
|
-
<div
|
|
50
|
-
{
|
|
65
|
+
{hasBody && (
|
|
66
|
+
<div
|
|
67
|
+
className={`tool-call-body-shell ${isExpanded ? 'expanded' : 'collapsed'}`}
|
|
68
|
+
aria-hidden={!isExpanded}
|
|
69
|
+
>
|
|
70
|
+
<div className='tool-call-body'>
|
|
71
|
+
{content}
|
|
72
|
+
</div>
|
|
51
73
|
</div>
|
|
52
74
|
)}
|
|
53
75
|
</div>
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
.tool-diff-viewer {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 6px;
|
|
5
|
+
min-width: 0;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.tool-diff-viewer__toolbar {
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: space-between;
|
|
12
|
+
gap: 6px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.tool-diff-viewer__legend {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
gap: 4px;
|
|
19
|
+
min-width: 0;
|
|
20
|
+
flex-wrap: wrap;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.tool-diff-viewer__lang {
|
|
24
|
+
display: inline-flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
padding: 0 6px;
|
|
27
|
+
border: 1px solid var(--border-color);
|
|
28
|
+
border-radius: 999px;
|
|
29
|
+
color: var(--sub-text-color);
|
|
30
|
+
font-family: var(--font-mono);
|
|
31
|
+
font-size: 10px;
|
|
32
|
+
line-height: 1.5;
|
|
33
|
+
min-height: 20px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.tool-diff-viewer__meta-item {
|
|
37
|
+
display: inline-flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
gap: 4px;
|
|
40
|
+
padding: 0 8px 0 6px;
|
|
41
|
+
border: 1px solid var(--border-color);
|
|
42
|
+
border-radius: 999px;
|
|
43
|
+
color: var(--sub-text-color);
|
|
44
|
+
font-size: 11px;
|
|
45
|
+
line-height: 1.5;
|
|
46
|
+
min-height: 20px;
|
|
47
|
+
|
|
48
|
+
.material-symbols-rounded {
|
|
49
|
+
font-size: 14px;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.tool-diff-viewer__meta-item--success {
|
|
54
|
+
color: var(--success-color);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.tool-diff-viewer__meta-item--muted {
|
|
58
|
+
opacity: .8;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.tool-diff-viewer__meta-label {
|
|
62
|
+
color: var(--sub-text-color);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.tool-diff-viewer__meta-value {
|
|
66
|
+
color: var(--text-color);
|
|
67
|
+
font-weight: 500;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.tool-diff-viewer__mode-switch {
|
|
71
|
+
display: inline-flex;
|
|
72
|
+
align-items: center;
|
|
73
|
+
gap: 2px;
|
|
74
|
+
flex-shrink: 0;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.tool-diff-viewer__mode-button {
|
|
78
|
+
display: inline-flex;
|
|
79
|
+
align-items: center;
|
|
80
|
+
justify-content: center;
|
|
81
|
+
width: 22px;
|
|
82
|
+
height: 22px;
|
|
83
|
+
padding: 0;
|
|
84
|
+
border: 1px solid transparent;
|
|
85
|
+
border-radius: 6px;
|
|
86
|
+
background: transparent;
|
|
87
|
+
color: var(--sub-text-color);
|
|
88
|
+
cursor: pointer;
|
|
89
|
+
transition:
|
|
90
|
+
border-color .18s ease,
|
|
91
|
+
color .18s ease,
|
|
92
|
+
background-color .18s ease;
|
|
93
|
+
|
|
94
|
+
&:hover {
|
|
95
|
+
border-color: var(--border-color);
|
|
96
|
+
color: var(--text-color);
|
|
97
|
+
background: var(--bg-color-hover);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&.is-active {
|
|
101
|
+
border-color: var(--border-color);
|
|
102
|
+
color: var(--text-color);
|
|
103
|
+
background: var(--tag-bg);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.material-symbols-rounded {
|
|
107
|
+
font-size: 15px;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.tool-diff-viewer__editor {
|
|
112
|
+
overflow: hidden;
|
|
113
|
+
border: 1px solid var(--border-color);
|
|
114
|
+
border-radius: 6px;
|
|
115
|
+
background: transparent;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.tool-diff-viewer__editor {
|
|
119
|
+
.monaco-diff-editor,
|
|
120
|
+
.monaco-editor,
|
|
121
|
+
.monaco-editor-background,
|
|
122
|
+
.monaco-editor .margin,
|
|
123
|
+
.monaco-editor .inputarea.ime-input {
|
|
124
|
+
background: transparent !important;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.monaco-diff-editor .editor.original,
|
|
128
|
+
.monaco-diff-editor .editor.modified {
|
|
129
|
+
background: transparent !important;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.monaco-diff-editor .diffOverview,
|
|
133
|
+
.monaco-diff-editor .diffOverviewRuler,
|
|
134
|
+
.monaco-editor .scroll-decoration,
|
|
135
|
+
.monaco-editor .minimap-shadow-visible {
|
|
136
|
+
box-shadow: none !important;
|
|
137
|
+
}
|
|
138
|
+
}
|