@vibe-forge/client 0.4.0 → 0.6.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/AGENTS.md +37 -0
- package/cli.cjs +1 -0
- package/dist/assets/{arc-DgIxeTMg.js → arc-CMAHd5G3.js} +1 -1
- package/dist/assets/{blockDiagram-c4efeb88-CEAob3X9.js → blockDiagram-c4efeb88-DKww-VCP.js} +1 -1
- package/dist/assets/{c4Diagram-c83219d4-DwIxpDKd.js → c4Diagram-c83219d4-DKrjVHyY.js} +1 -1
- package/dist/assets/channel-Bi4g8rj9.js +1 -0
- package/dist/assets/{classDiagram-beda092f-Cz1q8u_0.js → classDiagram-beda092f-BXx5rdo3.js} +1 -1
- package/dist/assets/{classDiagram-v2-2358418a-CImgTuwd.js → classDiagram-v2-2358418a-CnR3WLsr.js} +1 -1
- package/dist/assets/clone-DPrpP2ky.js +1 -0
- package/dist/assets/{createText-1719965b-C1_HJcCc.js → createText-1719965b-CmOsl1W7.js} +1 -1
- package/dist/assets/{edges-96097737-BU8qStzd.js → edges-96097737-CQeQgpjD.js} +1 -1
- package/dist/assets/{erDiagram-0228fc6a-DNA1Fz2L.js → erDiagram-0228fc6a-ZUNB-ucF.js} +1 -1
- package/dist/assets/{flowDb-c6c81e3f-DjiCStMN.js → flowDb-c6c81e3f-DuuKeSLX.js} +1 -1
- package/dist/assets/{flowDiagram-50d868cf-CSDi0-RD.js → flowDiagram-50d868cf-Bc6n85yR.js} +1 -1
- package/dist/assets/flowDiagram-v2-4f6560a1-BZqaeqoh.js +1 -0
- package/dist/assets/{flowchart-elk-definition-6af322e1-DrhIMas7.js → flowchart-elk-definition-6af322e1-cAG5afW9.js} +1 -1
- package/dist/assets/{ganttDiagram-a2739b55-CTZnUP5z.js → ganttDiagram-a2739b55-Dp6xhY5I.js} +1 -1
- package/dist/assets/{gitGraphDiagram-82fe8481-COOW7jTi.js → gitGraphDiagram-82fe8481-MlIIRBdG.js} +1 -1
- package/dist/assets/{graph-CIkpD4Kx.js → graph-D7Es8jZ-.js} +1 -1
- package/dist/assets/{index-5325376f-aVVRRTIu.js → index-5325376f-DC18ottv.js} +1 -1
- package/dist/assets/index-D37AbgPQ.js +545 -0
- package/dist/assets/{index-D1giUI7r.css → index-fcJ9v94I.css} +1 -1
- package/dist/assets/{infoDiagram-8eee0895-DQpZ1LVD.js → infoDiagram-8eee0895-CXk21kFp.js} +1 -1
- package/dist/assets/{journeyDiagram-c64418c1-DoKguIuk.js → journeyDiagram-c64418c1-899BKBHL.js} +1 -1
- package/dist/assets/{layout-Tnmha8Nh.js → layout-DLaxdy48.js} +1 -1
- package/dist/assets/{line-BQR2SOyl.js → line-_lw5YbRM.js} +1 -1
- package/dist/assets/{linear-DlG0eemV.js → linear-D5iu84ui.js} +1 -1
- package/dist/assets/{mermaid.core-BnwYO0He.js → mermaid.core-C6sW3GFM.js} +4 -4
- package/dist/assets/{mindmap-definition-8da855dc-BllYwDID.js → mindmap-definition-8da855dc-BS9Xy9KN.js} +1 -1
- package/dist/assets/{pieDiagram-a8764435-DwCkhPVc.js → pieDiagram-a8764435-DZt9cEgs.js} +1 -1
- package/dist/assets/{quadrantDiagram-1e28029f-c40GKTU0.js → quadrantDiagram-1e28029f-BTIeHOgn.js} +1 -1
- package/dist/assets/{requirementDiagram-08caed73-DnQp2Tk6.js → requirementDiagram-08caed73-BHJAKD2g.js} +1 -1
- package/dist/assets/{sankeyDiagram-a04cb91d-CnJrs13b.js → sankeyDiagram-a04cb91d-DnAkVOK8.js} +1 -1
- package/dist/assets/{sequenceDiagram-c5b8d532-1YBwnpKu.js → sequenceDiagram-c5b8d532-92tE3oFv.js} +1 -1
- package/dist/assets/{stateDiagram-1ecb1508-BFBxQ6Fh.js → stateDiagram-1ecb1508-DG0ObiMg.js} +1 -1
- package/dist/assets/{stateDiagram-v2-c2b004d7-Dmechvv2.js → stateDiagram-v2-c2b004d7-BKoJx2ci.js} +1 -1
- package/dist/assets/{styles-b4e223ce-DWWfWX8O.js → styles-b4e223ce-Ba6G4ri9.js} +1 -1
- package/dist/assets/{styles-ca3715f6-CKKvZxaU.js → styles-ca3715f6-Bn6RIIVW.js} +1 -1
- package/dist/assets/{styles-d45a18b0-dKMOUh9p.js → styles-d45a18b0-_dELBUI6.js} +1 -1
- package/dist/assets/{svgDrawCommon-b86b1483-CBgjChPM.js → svgDrawCommon-b86b1483-CRK-ZoIs.js} +1 -1
- package/dist/assets/{timeline-definition-faaaa080-NCt-HHmb.js → timeline-definition-faaaa080-DvQ_RA_i.js} +1 -1
- package/dist/assets/{xychartDiagram-f5964ef8-BJhXS4dG.js → xychartDiagram-f5964ef8-CJxeDLfg.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +10 -7
- package/src/App.tsx +20 -168
- package/src/api/base.ts +116 -7
- package/src/api/sessions.ts +3 -1
- package/src/api.ts +3 -1
- package/src/components/ArchiveView.tsx +5 -5
- package/src/components/ConfigView.tsx +28 -28
- package/src/components/{AutomationView → automation-view}/index.tsx +10 -9
- package/src/components/{BenchmarkView → benchmark-view}/index.tsx +5 -4
- package/src/components/chat/ChatHeader.tsx +6 -6
- package/src/components/chat/ChatHistoryView.tsx +74 -16
- package/src/components/chat/ChatTimelineView.tsx +3 -3
- package/src/components/chat/CurrentTodoList.scss +56 -27
- package/src/components/chat/{Sender → sender}/Sender.scss +278 -85
- package/src/components/chat/{Sender → sender}/Sender.tsx +125 -41
- package/src/components/chat/tools/core/ToolGroup.tsx +1 -1
- package/src/components/config/ConfigSectionForm.tsx +1 -1
- package/src/components/config/ConfigSourceSwitch.tsx +12 -34
- package/src/components/config/channelDefinitions.ts +2 -2
- package/src/components/layout/AppShell.scss +19 -0
- package/src/components/layout/AppShell.tsx +45 -0
- package/src/components/sidebar/SessionItem.scss +17 -0
- package/src/components/sidebar/SessionItem.tsx +21 -13
- package/src/hooks/chat/model-selector.ts +150 -0
- package/src/hooks/chat/use-chat-adapter.ts +93 -0
- package/src/hooks/chat/use-chat-models.tsx +126 -57
- package/src/hooks/chat/use-chat-permission-mode.ts +14 -10
- package/src/hooks/chat/use-chat-session-actions.ts +22 -13
- package/src/hooks/chat/use-chat-session-messages.ts +62 -10
- package/src/hooks/chat/use-chat-session.ts +49 -2
- package/src/hooks/use-app-preferences.ts +41 -0
- package/src/hooks/use-session-subscription.ts +101 -0
- package/src/hooks/use-sidebar-navigation.ts +35 -0
- package/src/resources/adapters.ts +20 -0
- package/src/resources/locales/en.json +6 -0
- package/src/resources/locales/zh.json +6 -0
- package/src/routes/AppRoutes.tsx +22 -0
- package/src/routes/ArchiveRoute.tsx +5 -0
- package/src/routes/AutomationRoute.tsx +5 -0
- package/src/routes/BenchmarkRoute.tsx +5 -0
- package/src/{components/Chat.scss → routes/ChatRoute.scss} +35 -0
- package/src/routes/ChatRoute.tsx +132 -0
- package/src/routes/ConfigRoute.tsx +5 -0
- package/src/routes/KnowledgeRoute.tsx +5 -0
- package/dist/assets/channel-DhtnrNJ6.js +0 -1
- package/dist/assets/clone-7bHB6YkC.js +0 -1
- package/dist/assets/flowDiagram-v2-4f6560a1-_13Sz5Wh.js +0 -1
- package/dist/assets/index-DRSI_ZIL.js +0 -514
- package/src/components/Chat.tsx +0 -100
- package/src/components/{AutomationView → automation-view}/RuleFormPanel.scss +0 -0
- package/src/components/{AutomationView → automation-view}/RuleFormPanel.tsx +0 -0
- package/src/components/{AutomationView → automation-view}/RuleSidebar.scss +0 -0
- package/src/components/{AutomationView → automation-view}/RuleSidebar.tsx +0 -0
- package/src/components/{AutomationView → automation-view}/RunHistoryPanel.scss +0 -0
- package/src/components/{AutomationView → automation-view}/RunHistoryPanel.tsx +0 -0
- package/src/components/{AutomationView → automation-view}/TaskList.scss +0 -0
- package/src/components/{AutomationView → automation-view}/TaskList.tsx +0 -0
- package/src/components/{AutomationView → automation-view}/TriggerList.scss +0 -0
- package/src/components/{AutomationView → automation-view}/TriggerList.tsx +0 -0
- package/src/components/{AutomationView/AutomationView.scss → automation-view/index.scss} +0 -0
- package/src/components/{AutomationView → automation-view}/types.ts +0 -0
- package/src/components/{BenchmarkView → benchmark-view}/BenchmarkCasePanel.scss +0 -0
- package/src/components/{BenchmarkView → benchmark-view}/BenchmarkCasePanel.tsx +0 -0
- package/src/components/{BenchmarkView → benchmark-view}/BenchmarkSidebar.scss +0 -0
- package/src/components/{BenchmarkView → benchmark-view}/BenchmarkSidebar.tsx +0 -0
- package/src/components/{BenchmarkView → benchmark-view}/BenchmarkView.scss +0 -0
- package/src/components/{BenchmarkView → benchmark-view}/types.ts +0 -0
- package/src/components/{BenchmarkView → benchmark-view}/utils.ts +0 -0
- package/src/components/chat/{Messages → messages}/MessageFooter.tsx +0 -0
- package/src/components/chat/{Messages → messages}/MessageItem.scss +0 -0
- package/src/components/chat/{Messages → messages}/MessageItem.tsx +0 -0
- package/src/components/chat/{Messages → messages}/message-utils.ts +0 -0
- package/src/components/chat/{Sender → sender}/CompletionMenu.scss +0 -0
- package/src/components/chat/{Sender → sender}/CompletionMenu.tsx +0 -0
- package/src/components/chat/{Sender → sender}/ThinkingStatus.scss +0 -0
- package/src/components/chat/{Sender → sender}/ThinkingStatus.tsx +0 -0
- package/src/components/chat/{SessionTimelinePanel → session-timeline-panel}/EventList.scss +0 -0
- package/src/components/chat/{SessionTimelinePanel → session-timeline-panel}/EventList.tsx +0 -0
- package/src/components/chat/{SessionTimelinePanel → session-timeline-panel}/gantt.ts +0 -0
- package/src/components/chat/{SessionTimelinePanel → session-timeline-panel}/git-graph.ts +0 -0
- package/src/components/chat/{SessionTimelinePanel → session-timeline-panel}/index.scss +0 -0
- package/src/components/chat/{SessionTimelinePanel → session-timeline-panel}/index.tsx +0 -0
- package/src/components/chat/{SessionTimelinePanel → session-timeline-panel}/mermaid.ts +0 -0
- package/src/components/chat/{SessionTimelinePanel → session-timeline-panel}/types.ts +0 -0
- package/src/components/chat/{SessionTimelinePanel → session-timeline-panel}/utils.ts +0 -0
- package/src/components/config/{recordEditors → record-editors}/BooleanRecordEditor.scss +0 -0
- package/src/components/config/{recordEditors → record-editors}/BooleanRecordEditor.tsx +0 -0
- package/src/components/config/{recordEditors → record-editors}/ChannelRecordEditor.scss +0 -0
- package/src/components/config/{recordEditors → record-editors}/ChannelRecordEditor.tsx +33 -33
- /package/src/components/config/{recordEditors → record-editors}/KeyValueEditor.scss +0 -0
- /package/src/components/config/{recordEditors → record-editors}/KeyValueEditor.tsx +0 -0
- /package/src/components/config/{recordEditors → record-editors}/McpServersRecordEditor.scss +0 -0
- /package/src/components/config/{recordEditors → record-editors}/McpServersRecordEditor.tsx +0 -0
- /package/src/components/config/{recordEditors → record-editors}/ModelServicesRecordEditor.scss +0 -0
- /package/src/components/config/{recordEditors → record-editors}/ModelServicesRecordEditor.tsx +0 -0
- /package/src/components/config/{recordEditors → record-editors}/RecordEditors.scss +0 -0
- /package/src/components/config/{recordEditors → record-editors}/RecordJsonEditor.scss +0 -0
- /package/src/components/config/{recordEditors → record-editors}/RecordJsonEditor.tsx +0 -0
- /package/src/components/config/{recordEditors → record-editors}/index.tsx +0 -0
package/src/components/Chat.tsx
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import './Chat.scss'
|
|
2
|
-
|
|
3
|
-
import type { ChatMessage, ChatMessageContent, Session } from '@vibe-forge/core'
|
|
4
|
-
import { ChatHeader } from './chat/ChatHeader.js'
|
|
5
|
-
import { ChatHistoryView } from './chat/ChatHistoryView.js'
|
|
6
|
-
import { ChatSettingsView } from './chat/ChatSettingsView.js'
|
|
7
|
-
import { ChatTimelineView } from './chat/ChatTimelineView.js'
|
|
8
|
-
import { useChatSession } from '#~/hooks/chat/use-chat-session'
|
|
9
|
-
|
|
10
|
-
export function Chat({
|
|
11
|
-
session
|
|
12
|
-
}: {
|
|
13
|
-
session?: Session
|
|
14
|
-
}) {
|
|
15
|
-
const {
|
|
16
|
-
messages,
|
|
17
|
-
sessionInfo,
|
|
18
|
-
interactionRequest,
|
|
19
|
-
isReady,
|
|
20
|
-
activeView,
|
|
21
|
-
setActiveView,
|
|
22
|
-
handleInteractionResponse,
|
|
23
|
-
setMessages,
|
|
24
|
-
placeholder,
|
|
25
|
-
modelOptions,
|
|
26
|
-
selectedModel,
|
|
27
|
-
modelForQuery,
|
|
28
|
-
setSelectedModel,
|
|
29
|
-
permissionMode,
|
|
30
|
-
setPermissionMode,
|
|
31
|
-
permissionModeOptions,
|
|
32
|
-
hasAvailableModels,
|
|
33
|
-
modelUnavailable
|
|
34
|
-
} = useChatSession({ session })
|
|
35
|
-
const buildUserMessage = (content: string | ChatMessageContent[]): ChatMessage => {
|
|
36
|
-
const id = globalThis.crypto?.randomUUID
|
|
37
|
-
? globalThis.crypto.randomUUID()
|
|
38
|
-
: `local-${Date.now()}-${Math.random().toString(16).slice(2)}`
|
|
39
|
-
return {
|
|
40
|
-
id,
|
|
41
|
-
role: 'user' as const,
|
|
42
|
-
content,
|
|
43
|
-
createdAt: Date.now()
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return (
|
|
48
|
-
<div className={`chat-container ${isReady ? 'ready' : ''} ${!session?.id ? 'is-new-session' : ''}`}>
|
|
49
|
-
{session?.id && (
|
|
50
|
-
<ChatHeader
|
|
51
|
-
sessionInfo={sessionInfo}
|
|
52
|
-
sessionId={session?.id}
|
|
53
|
-
sessionTitle={session?.title}
|
|
54
|
-
isStarred={session?.isStarred}
|
|
55
|
-
isArchived={session?.isArchived}
|
|
56
|
-
tags={session?.tags}
|
|
57
|
-
lastMessage={session?.lastMessage}
|
|
58
|
-
lastUserMessage={session?.lastUserMessage}
|
|
59
|
-
activeView={activeView}
|
|
60
|
-
onViewChange={setActiveView}
|
|
61
|
-
/>
|
|
62
|
-
)}
|
|
63
|
-
|
|
64
|
-
{activeView === 'history' && (
|
|
65
|
-
<ChatHistoryView
|
|
66
|
-
isReady={isReady}
|
|
67
|
-
messages={messages}
|
|
68
|
-
session={session}
|
|
69
|
-
sessionInfo={sessionInfo}
|
|
70
|
-
interactionRequest={interactionRequest}
|
|
71
|
-
onInteractionResponse={handleInteractionResponse}
|
|
72
|
-
onClearMessages={() => setMessages([])}
|
|
73
|
-
onSend={(text) => setMessages((prev) => [...prev, buildUserMessage(text)])}
|
|
74
|
-
onSendContent={(content) => setMessages((prev) => [...prev, buildUserMessage(content)])}
|
|
75
|
-
placeholder={placeholder}
|
|
76
|
-
modelOptions={modelOptions}
|
|
77
|
-
selectedModel={selectedModel}
|
|
78
|
-
modelForQuery={modelForQuery}
|
|
79
|
-
onModelChange={setSelectedModel}
|
|
80
|
-
permissionMode={permissionMode}
|
|
81
|
-
permissionModeOptions={permissionModeOptions}
|
|
82
|
-
onPermissionModeChange={setPermissionMode}
|
|
83
|
-
modelUnavailable={modelUnavailable}
|
|
84
|
-
hasAvailableModels={hasAvailableModels}
|
|
85
|
-
/>
|
|
86
|
-
)}
|
|
87
|
-
|
|
88
|
-
{activeView === 'timeline' && (
|
|
89
|
-
<ChatTimelineView messages={messages} />
|
|
90
|
-
)}
|
|
91
|
-
|
|
92
|
-
{activeView === 'settings' && session?.id && (
|
|
93
|
-
<ChatSettingsView
|
|
94
|
-
session={session}
|
|
95
|
-
onClose={() => setActiveView('history')}
|
|
96
|
-
/>
|
|
97
|
-
)}
|
|
98
|
-
</div>
|
|
99
|
-
)
|
|
100
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -257,6 +257,39 @@ export const ChannelRecordEditor = ({
|
|
|
257
257
|
|
|
258
258
|
return (
|
|
259
259
|
<div className='config-view__record-list'>
|
|
260
|
+
<div className='config-view__record-add'>
|
|
261
|
+
<div className='config-view__record-add-inputs'>
|
|
262
|
+
<Input
|
|
263
|
+
value={newKey}
|
|
264
|
+
placeholder={keyPlaceholder}
|
|
265
|
+
onChange={(event) => setNewKey(event.target.value)}
|
|
266
|
+
/>
|
|
267
|
+
<Select
|
|
268
|
+
value={newType}
|
|
269
|
+
options={typeOptions}
|
|
270
|
+
onChange={(nextValue) => setNewType(nextValue)}
|
|
271
|
+
/>
|
|
272
|
+
<Tooltip title={t('common.confirm')}>
|
|
273
|
+
<Button
|
|
274
|
+
size='small'
|
|
275
|
+
type='primary'
|
|
276
|
+
className='config-view__icon-button'
|
|
277
|
+
aria-label={t('common.confirm')}
|
|
278
|
+
icon={<span className='material-symbols-rounded'>check</span>}
|
|
279
|
+
disabled={newKey.trim() === '' || Object.hasOwn(value, newKey) || newType === ''}
|
|
280
|
+
onClick={() => {
|
|
281
|
+
const definition = getChannelDefinition(newType)
|
|
282
|
+
if (!definition) return
|
|
283
|
+
onChange({
|
|
284
|
+
...value,
|
|
285
|
+
[newKey]: buildRecordDefaults(definition)
|
|
286
|
+
})
|
|
287
|
+
setNewKey('')
|
|
288
|
+
}}
|
|
289
|
+
/>
|
|
290
|
+
</Tooltip>
|
|
291
|
+
</div>
|
|
292
|
+
</div>
|
|
260
293
|
{entries.map(([key, itemValue]) => {
|
|
261
294
|
const recordValue = (itemValue != null && typeof itemValue === 'object')
|
|
262
295
|
? itemValue as ChannelRecordValue
|
|
@@ -359,39 +392,6 @@ export const ChannelRecordEditor = ({
|
|
|
359
392
|
</div>
|
|
360
393
|
)
|
|
361
394
|
})}
|
|
362
|
-
<div className='config-view__record-add'>
|
|
363
|
-
<div className='config-view__record-add-inputs'>
|
|
364
|
-
<Input
|
|
365
|
-
value={newKey}
|
|
366
|
-
placeholder={keyPlaceholder}
|
|
367
|
-
onChange={(event) => setNewKey(event.target.value)}
|
|
368
|
-
/>
|
|
369
|
-
<Select
|
|
370
|
-
value={newType}
|
|
371
|
-
options={typeOptions}
|
|
372
|
-
onChange={(nextValue) => setNewType(nextValue)}
|
|
373
|
-
/>
|
|
374
|
-
<Tooltip title={t('common.confirm')}>
|
|
375
|
-
<Button
|
|
376
|
-
size='small'
|
|
377
|
-
type='primary'
|
|
378
|
-
className='config-view__icon-button'
|
|
379
|
-
aria-label={t('common.confirm')}
|
|
380
|
-
icon={<span className='material-symbols-rounded'>check</span>}
|
|
381
|
-
disabled={newKey.trim() === '' || Object.hasOwn(value, newKey) || newType === ''}
|
|
382
|
-
onClick={() => {
|
|
383
|
-
const definition = getChannelDefinition(newType)
|
|
384
|
-
if (!definition) return
|
|
385
|
-
onChange({
|
|
386
|
-
...value,
|
|
387
|
-
[newKey]: buildRecordDefaults(definition)
|
|
388
|
-
})
|
|
389
|
-
setNewKey('')
|
|
390
|
-
}}
|
|
391
|
-
/>
|
|
392
|
-
</Tooltip>
|
|
393
|
-
</div>
|
|
394
|
-
</div>
|
|
395
395
|
</div>
|
|
396
396
|
)
|
|
397
397
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/components/config/{recordEditors → record-editors}/ModelServicesRecordEditor.scss
RENAMED
|
File without changes
|
/package/src/components/config/{recordEditors → record-editors}/ModelServicesRecordEditor.tsx
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|