@vibe-forge/client 0.11.2 → 1.0.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/cli.cjs +6 -11
- package/dist/assets/{arc-De_WjPJ3.js → arc-CbOXL0l9.js} +1 -1
- package/dist/assets/{blockDiagram-c4efeb88-C4aR2zTE.js → blockDiagram-c4efeb88-CqxINvsS.js} +1 -1
- package/dist/assets/{c4Diagram-c83219d4-BZH3rq_m.js → c4Diagram-c83219d4-BKazU0hb.js} +1 -1
- package/dist/assets/channel-Dnopc5A6.js +1 -0
- package/dist/assets/{classDiagram-beda092f-BzJgBrIK.js → classDiagram-beda092f-fAFX5BpB.js} +1 -1
- package/dist/assets/{classDiagram-v2-2358418a-5ZtXcnT3.js → classDiagram-v2-2358418a-w1VkNGJj.js} +1 -1
- package/dist/assets/clone-sQthahUA.js +1 -0
- package/dist/assets/{createText-1719965b-DUVvEtmR.js → createText-1719965b-CEinakVP.js} +1 -1
- package/dist/assets/{cssMode-GoTNjuXX.js → cssMode-DPqRki4y.js} +1 -1
- package/dist/assets/{edges-96097737-Dd7m4Cvs.js → edges-96097737-Cb0F1_3K.js} +1 -1
- package/dist/assets/{erDiagram-0228fc6a-DxqFlG_f.js → erDiagram-0228fc6a-C-N2fx-J.js} +1 -1
- package/dist/assets/{flowDb-c6c81e3f-DU0C5kCI.js → flowDb-c6c81e3f-D1Xz_8Gf.js} +1 -1
- package/dist/assets/{flowDiagram-50d868cf-Di1uDa_X.js → flowDiagram-50d868cf-DyPSZyAj.js} +1 -1
- package/dist/assets/flowDiagram-v2-4f6560a1-OazrdWQO.js +1 -0
- package/dist/assets/{flowchart-elk-definition-6af322e1-CwG8aty5.js → flowchart-elk-definition-6af322e1-Dr1DDXwE.js} +1 -1
- package/dist/assets/{freemarker2-j39cqTlI.js → freemarker2-C3DvPFaK.js} +1 -1
- package/dist/assets/{ganttDiagram-a2739b55-baO_lzL-.js → ganttDiagram-a2739b55-DmvY1GRj.js} +1 -1
- package/dist/assets/{gitGraphDiagram-82fe8481-COoHjYMf.js → gitGraphDiagram-82fe8481-CoXfPYYi.js} +1 -1
- package/dist/assets/{graph-KxESr4M5.js → graph-BkDQy7Qt.js} +1 -1
- package/dist/assets/{handlebars-BgjdZO8G.js → handlebars-BcTFdqjl.js} +1 -1
- package/dist/assets/{html-Ba7tYObe.js → html-Dg-O6XFr.js} +1 -1
- package/dist/assets/{htmlMode-Bztvbig1.js → htmlMode-B_wqYWvn.js} +1 -1
- package/dist/assets/{index-5325376f-BMTAx2mL.js → index-5325376f-kxPTR3_e.js} +1 -1
- package/dist/assets/index-o93dlo92.css +32 -0
- package/dist/assets/{index-Pm_kLJvG.js → index-wkhI4dr6.js} +350 -329
- package/dist/assets/{infoDiagram-8eee0895-CC74qbHY.js → infoDiagram-8eee0895-BEvqkwPI.js} +1 -1
- package/dist/assets/{javascript-C1e1cllX.js → javascript-DhlOH8_z.js} +1 -1
- package/dist/assets/{journeyDiagram-c64418c1-C4MyOdE6.js → journeyDiagram-c64418c1-gKtLYmmp.js} +1 -1
- package/dist/assets/{jsonMode-BC98AlvF.js → jsonMode-DxTbF9OD.js} +1 -1
- package/dist/assets/{layout-CxAyTlr7.js → layout-CDaZEk6E.js} +1 -1
- package/dist/assets/{line-DhaUfI71.js → line-DNRQu8iq.js} +1 -1
- package/dist/assets/{linear-MYukzldK.js → linear-Cph9Z6_j.js} +1 -1
- package/dist/assets/{liquid-DahfJEYl.js → liquid-ByZ6JgRG.js} +1 -1
- package/dist/assets/{lspLanguageFeatures-BWDJcswW.js → lspLanguageFeatures-DzvhkgnM.js} +1 -1
- package/dist/assets/{mdx-BELlF_FD.js → mdx-D8RGHTl6.js} +1 -1
- package/dist/assets/{mermaid.core-BrQnSGSY.js → mermaid.core-BgcryF__.js} +4 -4
- package/dist/assets/{mindmap-definition-8da855dc-B0FoxTiy.js → mindmap-definition-8da855dc-WrxK0FcB.js} +1 -1
- package/dist/assets/{pieDiagram-a8764435-Ddr2cjSL.js → pieDiagram-a8764435-VsZBsiQy.js} +1 -1
- package/dist/assets/{python--C9if_AD.js → python-CXVtk_cg.js} +1 -1
- package/dist/assets/{quadrantDiagram-1e28029f-BlEs7Mrl.js → quadrantDiagram-1e28029f-BVlgwOvU.js} +1 -1
- package/dist/assets/{razor-B9U9JxKn.js → razor-0tind7h2.js} +1 -1
- package/dist/assets/{requirementDiagram-08caed73-kEFOAu2v.js → requirementDiagram-08caed73-CpPMPoYp.js} +1 -1
- package/dist/assets/{sankeyDiagram-a04cb91d-BBghez8I.js → sankeyDiagram-a04cb91d-Cm5nnRmc.js} +1 -1
- package/dist/assets/{sequenceDiagram-c5b8d532-CJqgzdUE.js → sequenceDiagram-c5b8d532-DpMlJvJB.js} +1 -1
- package/dist/assets/{stateDiagram-1ecb1508-BER4XEI6.js → stateDiagram-1ecb1508-DU1zc7vq.js} +1 -1
- package/dist/assets/{stateDiagram-v2-c2b004d7-EBV2vSks.js → stateDiagram-v2-c2b004d7-D-0RgmAp.js} +1 -1
- package/dist/assets/{styles-b4e223ce-k0eswZsE.js → styles-b4e223ce-BSO-yNWV.js} +1 -1
- package/dist/assets/{styles-ca3715f6-Ckr7GA-0.js → styles-ca3715f6-CHnsn2Ro.js} +1 -1
- package/dist/assets/{styles-d45a18b0-C1bpSwV3.js → styles-d45a18b0-B-rVGjEq.js} +1 -1
- package/dist/assets/{svgDrawCommon-b86b1483-CDtKpGvy.js → svgDrawCommon-b86b1483-CA3Pl89f.js} +1 -1
- package/dist/assets/{timeline-definition-faaaa080-BeGR-vua.js → timeline-definition-faaaa080-BcihLR6s.js} +1 -1
- package/dist/assets/{tsMode-D_gJXIy3.js → tsMode-D9GGa5Ur.js} +1 -1
- package/dist/assets/{typescript-BoKcNXkN.js → typescript-BT9CK_EL.js} +1 -1
- package/dist/assets/{xml-DZvURlJ-.js → xml-DNO75J-T.js} +1 -1
- package/dist/assets/{xychartDiagram-f5964ef8-DxfeLuYV.js → xychartDiagram-f5964ef8-DJTwe32X.js} +1 -1
- package/dist/assets/{yaml-CTC8PAGY.js → yaml-7CVzhiP2.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +13 -10
- package/src/api/git.ts +12 -0
- package/src/api/sessions.ts +131 -4
- package/src/api/types.ts +2 -1
- package/src/api.ts +13 -0
- package/src/components/ArchiveView.scss +143 -54
- package/src/components/ArchiveView.tsx +181 -167
- package/src/components/CodeBlock.scss +5 -0
- package/src/components/ConfigView.scss +142 -31
- package/src/components/ConfigView.tsx +161 -86
- package/src/components/MarkdownContent.tsx +7 -0
- package/src/components/NavRail.scss +248 -0
- package/src/components/NavRail.tsx +80 -107
- package/src/components/NavRailCompact.tsx +107 -0
- package/src/components/NavRailCompactMoreSheet.tsx +141 -0
- package/src/components/ShortcutTooltip.tsx +4 -2
- package/src/components/Sidebar.scss +51 -0
- package/src/components/Sidebar.tsx +43 -16
- package/src/components/automation-view/RuleFormPanel.scss +40 -13
- package/src/components/automation-view/RuleSidebar.scss +73 -47
- package/src/components/automation-view/RuleSidebar.tsx +9 -13
- package/src/components/automation-view/RunHistoryPanel.scss +141 -13
- package/src/components/automation-view/RunHistoryPanel.tsx +203 -161
- package/src/components/automation-view/TaskList.scss +44 -13
- package/src/components/automation-view/TriggerList.scss +46 -14
- package/src/components/automation-view/index.scss +82 -10
- package/src/components/automation-view/index.tsx +108 -55
- package/src/components/benchmark-view/BenchmarkCasePanel.scss +36 -16
- package/src/components/benchmark-view/BenchmarkSidebar.scss +44 -22
- package/src/components/benchmark-view/BenchmarkSidebar.tsx +0 -6
- package/src/components/benchmark-view/BenchmarkView.scss +63 -20
- package/src/components/benchmark-view/index.tsx +71 -34
- package/src/components/chat/AGENTS.md +14 -2
- package/src/components/chat/ChatComposerCard.scss +77 -0
- package/src/components/chat/ChatComposerCard.tsx +59 -0
- package/src/components/chat/ChatHeader.scss +187 -0
- package/src/components/chat/ChatHeader.tsx +209 -57
- package/src/components/chat/ChatHistoryView.tsx +279 -52
- package/src/components/chat/ChatTimelineView.scss +94 -1
- package/src/components/chat/ChatTimelineView.tsx +42 -0
- package/src/components/chat/CurrentTodoList.scss +210 -200
- package/src/components/chat/CurrentTodoList.tsx +116 -48
- package/src/components/chat/NewSessionGuide.scss +139 -1
- package/src/components/chat/NewSessionGuide.tsx +57 -100
- package/src/components/chat/NewSessionGuideCompactPanel.tsx +130 -0
- package/src/components/chat/NewSessionGuideGrid.tsx +141 -0
- package/src/components/chat/QueuedMessagesCard.scss +195 -0
- package/src/components/chat/QueuedMessagesCard.tsx +170 -0
- package/src/components/chat/git-controls/BranchSwitcherDropdown.tsx +61 -56
- package/src/components/chat/git-controls/BranchSwitcherResults.tsx +167 -0
- package/src/components/chat/git-controls/BranchTreeEntries.tsx +99 -0
- package/src/components/chat/git-controls/ChatGitControls.scss +437 -5
- package/src/components/chat/git-controls/ChatGitControls.tsx +136 -109
- package/src/components/chat/git-controls/DraftGitControls.tsx +91 -0
- package/src/components/chat/git-controls/GitOperationsDropdown.tsx +10 -2
- package/src/components/chat/git-controls/GitWorktreeDropdown.tsx +301 -28
- package/src/components/chat/git-controls/git-branch-tree.ts +148 -0
- package/src/components/chat/git-controls/use-chat-draft-git-controls.ts +168 -0
- package/src/components/chat/git-controls/use-chat-git-controls.ts +76 -3
- package/src/components/chat/messages/MessageContextMenu.tsx +3 -1
- package/src/components/chat/messages/MessageItem.scss +78 -4
- package/src/components/chat/messages/MessageItem.tsx +47 -3
- package/src/components/chat/sender/@components/adapter-select/AdapterSelectControl.scss +23 -0
- package/src/components/chat/sender/@components/reference-actions/ReferenceActionsControl.scss +17 -0
- package/src/components/chat/sender/@components/reference-actions/ReferencePermissionActionsPopover.tsx +4 -1
- package/src/components/chat/sender/@components/sender-attachments/SenderAttachments.scss +167 -30
- package/src/components/chat/sender/@components/sender-attachments/SenderAttachments.tsx +95 -23
- package/src/components/chat/sender/@components/sender-body/SenderBody.tsx +10 -0
- package/src/components/chat/sender/@components/sender-interaction-panel/SenderInteractionPanel.scss +161 -45
- package/src/components/chat/sender/@components/sender-interaction-panel/SenderInteractionPanel.tsx +310 -71
- package/src/components/chat/sender/@components/sender-monaco-editor/SenderMonacoEditor.tsx +18 -0
- package/src/components/chat/sender/@components/sender-monaco-editor/use-sender-monaco-editor.ts +86 -9
- package/src/components/chat/sender/@components/sender-monaco-editor/use-sender-monaco-theme.ts +52 -3
- package/src/components/chat/sender/@components/sender-submit-action/SenderSubmitAction.scss +110 -1
- package/src/components/chat/sender/@components/sender-submit-action/SenderSubmitAction.tsx +137 -17
- package/src/components/chat/sender/@components/sender-toolbar/SenderSelectBase.scss +21 -0
- package/src/components/chat/sender/@components/sender-toolbar/SenderSelectShared.scss +21 -0
- package/src/components/chat/sender/@components/sender-toolbar/SenderToolbar.scss +63 -0
- package/src/components/chat/sender/@components/sender-toolbar/SenderToolbar.tsx +12 -6
- package/src/components/chat/sender/@core/build-sender-controller-result.ts +6 -0
- package/src/components/chat/sender/@core/build-sender-toolbar.ts +25 -2
- package/src/components/chat/sender/@core/create-sender-toolbar-handlers.ts +9 -2
- package/src/components/chat/sender/@core/get-sender-runtime-state.ts +1 -1
- package/src/components/chat/sender/@core/interaction-request.ts +2 -2
- package/src/components/chat/sender/@core/sender-toolbar-bindings.ts +28 -4
- package/src/components/chat/sender/@hooks/use-model-select-browser.tsx +4 -2
- package/src/components/chat/sender/@hooks/use-sender-controller.ts +56 -11
- package/src/components/chat/sender/@hooks/use-sender-keydown.ts +64 -0
- package/src/components/chat/sender/@hooks/use-sender-shortcuts.ts +16 -1
- package/src/components/chat/sender/@hooks/use-sender-submit.ts +16 -8
- package/src/components/chat/sender/@types/sender-props.ts +20 -3
- package/src/components/chat/sender/@types/sender-toolbar-types.ts +12 -1
- package/src/components/chat/sender/Sender.scss +4 -1
- package/src/components/chat/sender/Sender.tsx +3 -12
- package/src/components/chat/session-timeline-panel/EventList.scss +88 -0
- package/src/components/chat/session-timeline-panel/EventList.tsx +99 -47
- package/src/components/chat/session-timeline-panel/gantt.ts +23 -7
- package/src/components/chat/session-timeline-panel/git-graph.ts +6 -1
- package/src/components/chat/session-timeline-panel/index.scss +14 -1
- package/src/components/chat/session-timeline-panel/index.tsx +86 -10
- package/src/components/chat/session-timeline-panel/types.ts +4 -0
- package/src/components/chat/status-bar/ChatStatusBar.scss +27 -0
- package/src/components/chat/status-bar/ChatStatusBar.tsx +39 -0
- package/src/components/chat/terminal/ChatTerminalView.tsx +6 -0
- package/src/components/chat/tools/core/ToolCallBox.scss +19 -0
- package/src/components/chat/tools/core/ToolGroup.scss +32 -0
- package/src/components/chat/tools/task/components/TaskToolCard.scss +59 -1
- package/src/components/config/ConfigEditors.scss +20 -6
- package/src/components/config/ConfigFieldRow.scss +57 -17
- package/src/components/config/ConfigSectionForm.scss +10 -4
- package/src/components/config/ConfigSectionPanel.tsx +18 -11
- package/src/components/config/configSchema.ts +1 -0
- package/src/components/config/record-editors/RecordEditors.scss +42 -9
- package/src/components/dock-panel/DockPanel.scss +6 -2
- package/src/components/dock-panel/DockPanel.tsx +12 -16
- package/src/components/knowledge-base/KnowledgeBaseView.scss +180 -6
- package/src/components/knowledge-base/KnowledgeBaseView.tsx +98 -26
- package/src/components/knowledge-base/components/ActionButton.scss +4 -0
- package/src/components/knowledge-base/components/EmptyState.scss +5 -8
- package/src/components/knowledge-base/components/EntitiesTab.tsx +8 -2
- package/src/components/knowledge-base/components/EntityItem.scss +10 -3
- package/src/components/knowledge-base/components/FilterBar.scss +13 -2
- package/src/components/knowledge-base/components/FlowsTab.tsx +8 -2
- package/src/components/knowledge-base/components/KnowledgeBaseHeader.scss +2 -23
- package/src/components/knowledge-base/components/KnowledgeBaseHeader.tsx +0 -5
- package/src/components/knowledge-base/components/KnowledgeList.scss +15 -6
- package/src/components/knowledge-base/components/LoadingState.scss +4 -0
- package/src/components/knowledge-base/components/RuleItem.scss +86 -0
- package/src/components/knowledge-base/components/RuleItem.tsx +2 -0
- package/src/components/knowledge-base/components/RulesTab.tsx +8 -2
- package/src/components/knowledge-base/components/SectionHeader.scss +3 -18
- package/src/components/knowledge-base/components/SectionHeader.tsx +3 -7
- package/src/components/knowledge-base/components/SkillsTab.tsx +8 -3
- package/src/components/knowledge-base/components/SpecItem.scss +16 -7
- package/src/components/layout/@hooks/use-mobile-sidebar-modal.ts +190 -0
- package/src/components/layout/AppShell.scss +106 -6
- package/src/components/layout/AppShell.tsx +118 -10
- package/src/components/layout/PageShell.scss +41 -0
- package/src/components/layout/PageShell.tsx +32 -0
- package/src/components/layout/mobile-sidebar-constants.ts +1 -0
- package/src/components/nav-rail-compact-config.ts +114 -0
- package/src/components/nav-rail-items.tsx +181 -0
- package/src/components/sidebar/SessionContextMenu.tsx +3 -1
- package/src/components/sidebar/SessionItem.scss +62 -0
- package/src/components/sidebar/SessionItem.tsx +97 -52
- package/src/components/sidebar/SessionList.tsx +6 -0
- package/src/components/sidebar/SidebarHeader.scss +49 -0
- package/src/components/sidebar/SidebarHeader.tsx +27 -5
- package/src/components/sidebar/SidebarHeaderBatchActions.tsx +8 -4
- package/src/components/sidebar/SidebarHeaderSearchActions.tsx +6 -3
- package/src/components/sidebar/SidebarUtilityFooter.tsx +69 -0
- package/src/components/workspace/ContextFilePicker.tsx +12 -4
- package/src/hooks/chat/chat-session-workspace-draft.ts +25 -0
- package/src/hooks/chat/session-view-cache.ts +4 -1
- package/src/hooks/chat/use-chat-adapter.ts +5 -1
- package/src/hooks/chat/use-chat-model-adapter-selection.tsx +5 -1
- package/src/hooks/chat/use-chat-scroll.ts +24 -7
- package/src/hooks/chat/use-chat-session-actions.ts +118 -6
- package/src/hooks/chat/use-chat-session-messages.ts +20 -1
- package/src/hooks/chat/use-chat-session.ts +2 -0
- package/src/hooks/use-responsive-layout.ts +115 -0
- package/src/main.tsx +8 -0
- package/src/resources/adapters.ts +15 -0
- package/src/resources/locales/en.json +84 -1
- package/src/resources/locales/zh.json +84 -1
- package/src/routes/ChatRoute.scss +152 -9
- package/src/routes/ChatRoute.tsx +31 -34
- package/src/store/index.ts +2 -0
- package/dist/assets/channel-BvERb8WU.js +0 -1
- package/dist/assets/clone-B9_0v-6Y.js +0 -1
- package/dist/assets/flowDiagram-v2-4f6560a1-LpS8Kb00.js +0 -1
- package/dist/assets/index-C1oh0w9H.css +0 -32
- package/src/components/chat/ThinkingStatus.scss +0 -70
- package/src/components/chat/ThinkingStatus.tsx +0 -13
|
@@ -1,9 +1,48 @@
|
|
|
1
1
|
.config-view {
|
|
2
|
-
height: 100%;
|
|
3
|
-
display: flex;
|
|
4
|
-
flex-direction: column;
|
|
5
2
|
color: var(--text-color);
|
|
6
|
-
|
|
3
|
+
|
|
4
|
+
&__body {
|
|
5
|
+
flex: 1;
|
|
6
|
+
min-height: 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
&__compact-shell {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex: 1;
|
|
12
|
+
min-height: 0;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
gap: 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&__compact-controls {
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
gap: 10px;
|
|
21
|
+
padding: 12px;
|
|
22
|
+
padding-bottom: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&__compact-select {
|
|
26
|
+
width: 100%;
|
|
27
|
+
|
|
28
|
+
.ant-select-selector {
|
|
29
|
+
min-height: 36px !important;
|
|
30
|
+
border-radius: 8px !important;
|
|
31
|
+
padding-inline: 10px !important;
|
|
32
|
+
background: var(--subpage-content-card-bg) !important;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&__compact-panel {
|
|
37
|
+
display: flex;
|
|
38
|
+
flex: 1;
|
|
39
|
+
min-height: 0;
|
|
40
|
+
margin: var(--subpage-content-card-gap);
|
|
41
|
+
margin-top: 12px;
|
|
42
|
+
border-radius: var(--subpage-content-card-radius);
|
|
43
|
+
background: var(--subpage-content-card-bg);
|
|
44
|
+
overflow: hidden;
|
|
45
|
+
}
|
|
7
46
|
|
|
8
47
|
&__state {
|
|
9
48
|
display: grid;
|
|
@@ -14,13 +53,19 @@
|
|
|
14
53
|
&__tabs-wrap {
|
|
15
54
|
display: flex;
|
|
16
55
|
min-height: 0;
|
|
56
|
+
min-width: 0;
|
|
17
57
|
flex: 1;
|
|
58
|
+
|
|
18
59
|
.ant-tabs-content-holder > .ant-tabs-content {
|
|
19
60
|
height: 100%;
|
|
61
|
+
min-height: 0;
|
|
62
|
+
|
|
20
63
|
& > .ant-tabs-tabpane {
|
|
21
|
-
|
|
22
|
-
|
|
64
|
+
display: flex;
|
|
65
|
+
min-height: 0;
|
|
66
|
+
padding: 12px;
|
|
23
67
|
height: 100%;
|
|
68
|
+
box-sizing: border-box;
|
|
24
69
|
}
|
|
25
70
|
}
|
|
26
71
|
}
|
|
@@ -28,6 +73,7 @@
|
|
|
28
73
|
&__tabs {
|
|
29
74
|
width: 100%;
|
|
30
75
|
height: 100%;
|
|
76
|
+
min-width: 0;
|
|
31
77
|
}
|
|
32
78
|
}
|
|
33
79
|
|
|
@@ -37,6 +83,7 @@
|
|
|
37
83
|
flex: 1;
|
|
38
84
|
gap: 12px;
|
|
39
85
|
height: 100%;
|
|
86
|
+
min-height: 0;
|
|
40
87
|
}
|
|
41
88
|
|
|
42
89
|
.config-view__editor-wrap {
|
|
@@ -57,12 +104,18 @@
|
|
|
57
104
|
}
|
|
58
105
|
}
|
|
59
106
|
|
|
107
|
+
.config-view__section-header--actions-only {
|
|
108
|
+
justify-content: flex-end;
|
|
109
|
+
}
|
|
110
|
+
|
|
60
111
|
.config-view__card {
|
|
61
112
|
flex-grow: 1;
|
|
62
|
-
|
|
63
|
-
padding: 0
|
|
64
|
-
|
|
65
|
-
|
|
113
|
+
min-height: 0;
|
|
114
|
+
padding: 0;
|
|
115
|
+
border: none;
|
|
116
|
+
border-radius: 0;
|
|
117
|
+
background: transparent;
|
|
118
|
+
overflow: auto;
|
|
66
119
|
}
|
|
67
120
|
|
|
68
121
|
.config-view__card + .config-view__card {
|
|
@@ -73,7 +126,7 @@
|
|
|
73
126
|
display: inline-flex;
|
|
74
127
|
align-items: center;
|
|
75
128
|
gap: 8px;
|
|
76
|
-
font-size:
|
|
129
|
+
font-size: 14px;
|
|
77
130
|
font-weight: 600;
|
|
78
131
|
color: var(--text-color);
|
|
79
132
|
}
|
|
@@ -101,43 +154,54 @@
|
|
|
101
154
|
.config-view__tab-label {
|
|
102
155
|
display: inline-flex;
|
|
103
156
|
align-items: center;
|
|
104
|
-
gap:
|
|
157
|
+
gap: 8px;
|
|
105
158
|
width: 100%;
|
|
106
159
|
line-height: 1;
|
|
107
160
|
}
|
|
108
161
|
|
|
162
|
+
.config-view__compact-option {
|
|
163
|
+
display: inline-flex;
|
|
164
|
+
align-items: center;
|
|
165
|
+
gap: 8px;
|
|
166
|
+
}
|
|
167
|
+
|
|
109
168
|
.config-view__tab-icon {
|
|
110
|
-
font-size:
|
|
169
|
+
font-size: 16px;
|
|
111
170
|
color: var(--sub-text-color);
|
|
112
|
-
width:
|
|
113
|
-
height:
|
|
114
|
-
line-height:
|
|
171
|
+
width: 16px;
|
|
172
|
+
height: 16px;
|
|
173
|
+
line-height: 16px;
|
|
115
174
|
display: inline-flex;
|
|
116
175
|
align-items: center;
|
|
117
176
|
justify-content: center;
|
|
118
177
|
}
|
|
119
178
|
|
|
120
179
|
.config-view__tab-text {
|
|
121
|
-
font-size:
|
|
180
|
+
font-size: 12px;
|
|
122
181
|
color: var(--text-color);
|
|
123
|
-
line-height:
|
|
182
|
+
line-height: 16px;
|
|
124
183
|
}
|
|
125
184
|
|
|
126
185
|
.config-view__tabs > .ant-tabs-nav {
|
|
127
|
-
|
|
128
|
-
|
|
186
|
+
width: var(--subpage-secondary-panel-width);
|
|
187
|
+
min-width: var(--subpage-secondary-panel-width);
|
|
188
|
+
max-width: var(--subpage-secondary-panel-width);
|
|
189
|
+
padding: 10px 12px;
|
|
129
190
|
background-color: var(--sub-bg-color);
|
|
130
|
-
border-right: 1px solid var(--sub-border-color);
|
|
131
191
|
|
|
132
192
|
.ant-tabs-tab {
|
|
133
193
|
display: flex;
|
|
134
194
|
align-items: center;
|
|
135
|
-
min-height:
|
|
136
|
-
|
|
195
|
+
min-height: 30px;
|
|
196
|
+
margin: 0 0 6px !important;
|
|
197
|
+
padding: 6px 10px !important;
|
|
198
|
+
border: 1px solid transparent;
|
|
137
199
|
border-radius: 8px;
|
|
138
|
-
|
|
200
|
+
background: var(--bg-color);
|
|
201
|
+
transition: .2s ease;
|
|
139
202
|
&:not(.ant-tabs-tab-disabled):hover {
|
|
140
|
-
|
|
203
|
+
border-color: rgba(37, 99, 235, .18);
|
|
204
|
+
background-color: var(--tag-hover-bg);
|
|
141
205
|
}
|
|
142
206
|
}
|
|
143
207
|
|
|
@@ -150,20 +214,31 @@
|
|
|
150
214
|
|
|
151
215
|
.ant-tabs-tab-disabled {
|
|
152
216
|
cursor: default;
|
|
217
|
+
min-height: auto;
|
|
218
|
+
margin: 0 0 4px !important;
|
|
219
|
+
padding: 4px 2px !important;
|
|
220
|
+
border: none;
|
|
221
|
+
border-radius: 0;
|
|
222
|
+
background: transparent;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.ant-tabs-tab-disabled:hover {
|
|
226
|
+
border-color: transparent;
|
|
227
|
+
background: transparent;
|
|
153
228
|
}
|
|
154
229
|
|
|
155
230
|
.ant-tabs-tab-disabled .ant-tabs-tab-btn {
|
|
156
231
|
cursor: default;
|
|
157
232
|
color: var(--sub-text-color);
|
|
158
233
|
font-size: 11px;
|
|
159
|
-
|
|
160
|
-
letter-spacing: .06em;
|
|
234
|
+
font-weight: 600;
|
|
161
235
|
}
|
|
162
236
|
|
|
163
237
|
.ant-tabs-tab-active {
|
|
164
238
|
font-weight: 600;
|
|
165
|
-
color: var(--
|
|
166
|
-
|
|
239
|
+
color: var(--sidebar-active-text, var(--primary-color));
|
|
240
|
+
border-color: var(--primary-color);
|
|
241
|
+
background: var(--primary-soft-bg);
|
|
167
242
|
.material-symbols-rounded {
|
|
168
243
|
font-variation-settings: 'FILL' 1;
|
|
169
244
|
}
|
|
@@ -175,11 +250,47 @@
|
|
|
175
250
|
}
|
|
176
251
|
|
|
177
252
|
.config-view__tabs > .ant-tabs-content-holder {
|
|
178
|
-
|
|
253
|
+
flex: 1;
|
|
254
|
+
min-width: 0;
|
|
255
|
+
min-height: 0;
|
|
256
|
+
height: auto;
|
|
257
|
+
margin: var(--subpage-content-card-gap);
|
|
258
|
+
margin-left: 0;
|
|
259
|
+
border-left: none;
|
|
260
|
+
border-radius: var(--subpage-content-card-radius);
|
|
261
|
+
background: var(--subpage-content-card-bg);
|
|
262
|
+
overflow: hidden;
|
|
263
|
+
box-sizing: border-box;
|
|
179
264
|
}
|
|
180
265
|
|
|
181
266
|
.config-view__group-label {
|
|
182
267
|
display: flex;
|
|
183
268
|
width: 100%;
|
|
184
|
-
margin-left:
|
|
269
|
+
margin-left: 0;
|
|
270
|
+
padding: 0;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
@media (max-width: 1100px) {
|
|
274
|
+
.config-view__tabs > .ant-tabs-content-holder {
|
|
275
|
+
margin-top: 0;
|
|
276
|
+
margin-left: var(--subpage-content-card-gap);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
@media (max-width: 960px) {
|
|
281
|
+
.config-view--compact {
|
|
282
|
+
.config-view__body {
|
|
283
|
+
padding: 0;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.config-view__content {
|
|
287
|
+
padding: 12px;
|
|
288
|
+
gap: 10px;
|
|
289
|
+
overflow: auto;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.config-view__card {
|
|
293
|
+
overflow: visible;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
185
296
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './ConfigView.scss'
|
|
2
2
|
|
|
3
|
-
import { App, Empty, Space, Spin, Tabs } from 'antd'
|
|
3
|
+
import { App, Empty, Select, Space, Spin, Tabs } from 'antd'
|
|
4
4
|
import { useEffect, useMemo, useRef, useState } from 'react'
|
|
5
5
|
import { useTranslation } from 'react-i18next'
|
|
6
6
|
import useSWR from 'swr'
|
|
@@ -8,6 +8,9 @@ import useSWR from 'swr'
|
|
|
8
8
|
import type { ConfigSource } from '@vibe-forge/core'
|
|
9
9
|
import type { AboutInfo, ConfigResponse } from '@vibe-forge/types'
|
|
10
10
|
|
|
11
|
+
import { PageShell } from '#~/components/layout/PageShell'
|
|
12
|
+
import { useResponsiveLayout } from '#~/hooks/use-responsive-layout'
|
|
13
|
+
|
|
11
14
|
import { getApiErrorMessage, getConfig, updateConfig } from '../api'
|
|
12
15
|
import { useQueryParams } from '../hooks/useQueryParams'
|
|
13
16
|
import { AboutSection, ConfigSectionPanel, ConfigSourceSwitch, DisplayValue } from './config'
|
|
@@ -17,6 +20,7 @@ import { cloneValue, getValueByPath, isEmptyValue } from './config/configUtils'
|
|
|
17
20
|
export function ConfigView() {
|
|
18
21
|
const { t } = useTranslation()
|
|
19
22
|
const { message } = App.useApp()
|
|
23
|
+
const { isCompactLayout, isTouchInteraction } = useResponsiveLayout()
|
|
20
24
|
const { data, isLoading, error, mutate } = useSWR<ConfigResponse>('/api/config', getConfig)
|
|
21
25
|
const { values: queryValues, update: updateQuery, searchParams } = useQueryParams<{ tab: string; source: string }>({
|
|
22
26
|
keys: ['tab', 'source'],
|
|
@@ -105,8 +109,33 @@ export function ConfigView() {
|
|
|
105
109
|
|
|
106
110
|
const activeTabKey = tabKeys.has(queryValues.tab) ? queryValues.tab : 'general'
|
|
107
111
|
const setActiveTabKey = (key: string) => updateQuery({ tab: key })
|
|
112
|
+
const isCompactView = isCompactLayout || isTouchInteraction
|
|
108
113
|
|
|
109
114
|
const activeTab = useMemo(() => tabs.find(tab => tab.key === activeTabKey), [tabs, activeTabKey])
|
|
115
|
+
const compactTabOptions = useMemo(() => {
|
|
116
|
+
const groups: Array<{ label: string; options: Array<{ label: string; value: string }> }> = []
|
|
117
|
+
let currentGroup: { label: string; options: Array<{ label: string; value: string }> } | null = null
|
|
118
|
+
|
|
119
|
+
tabs.forEach((tab) => {
|
|
120
|
+
if (tab.type === 'group') {
|
|
121
|
+
currentGroup = { label: String(tab.label), options: [] }
|
|
122
|
+
groups.push(currentGroup)
|
|
123
|
+
return
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
if (currentGroup == null) {
|
|
127
|
+
currentGroup = { label: t('config.groups.config'), options: [] }
|
|
128
|
+
groups.push(currentGroup)
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
currentGroup.options.push({
|
|
132
|
+
value: tab.key,
|
|
133
|
+
label: String(tab.label)
|
|
134
|
+
})
|
|
135
|
+
})
|
|
136
|
+
|
|
137
|
+
return groups
|
|
138
|
+
}, [tabs, t])
|
|
110
139
|
|
|
111
140
|
useEffect(() => {
|
|
112
141
|
if (activeTab == null) return
|
|
@@ -180,8 +209,62 @@ export function ConfigView() {
|
|
|
180
209
|
scheduleSave(sectionKey, sourceKey, nextValue)
|
|
181
210
|
}
|
|
182
211
|
|
|
212
|
+
const renderTabContent = (tab: typeof tabs[number]) => (
|
|
213
|
+
<div className='config-view__content'>
|
|
214
|
+
{tab.key === 'about' && (
|
|
215
|
+
<AboutSection value={tab.value as AboutInfo | undefined} />
|
|
216
|
+
)}
|
|
217
|
+
{tab.key === 'appearance' && (
|
|
218
|
+
<AppSettingsPanel t={t} />
|
|
219
|
+
)}
|
|
220
|
+
{tab.key !== 'about' && tab.key !== 'appearance' && !configTabKeys.has(tab.key) && (
|
|
221
|
+
<DisplayValue value={tab.value} sectionKey={tab.key} t={t} />
|
|
222
|
+
)}
|
|
223
|
+
{configTabKeys.has(tab.key) && (
|
|
224
|
+
<ConfigSectionPanel
|
|
225
|
+
sectionKey={tab.key}
|
|
226
|
+
value={drafts[getDraftKey(tab.key)] ?? cloneValue(tab.value ?? {}) ?? {}}
|
|
227
|
+
onChange={(next) => handleDraftChange(tab.key, next)}
|
|
228
|
+
mergedModelServices={mergedModelServices as Record<string, unknown>}
|
|
229
|
+
mergedAdapters={mergedAdapters as Record<string, unknown>}
|
|
230
|
+
selectedModelService={selectedModelService}
|
|
231
|
+
t={t}
|
|
232
|
+
headerExtra={isCompactView
|
|
233
|
+
? undefined
|
|
234
|
+
: (
|
|
235
|
+
<Space size={12}>
|
|
236
|
+
<ConfigSourceSwitch
|
|
237
|
+
value={sourceKey}
|
|
238
|
+
onChange={setSourceKey}
|
|
239
|
+
options={[
|
|
240
|
+
{
|
|
241
|
+
value: 'project',
|
|
242
|
+
icon: 'folder',
|
|
243
|
+
label: configPresent?.project === true
|
|
244
|
+
? t('config.sources.project')
|
|
245
|
+
: t('config.sources.projectMissing')
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
value: 'user',
|
|
249
|
+
icon: 'person',
|
|
250
|
+
label: configPresent?.user === true
|
|
251
|
+
? t('config.sources.user')
|
|
252
|
+
: t('config.sources.userMissing')
|
|
253
|
+
}
|
|
254
|
+
]}
|
|
255
|
+
/>
|
|
256
|
+
</Space>
|
|
257
|
+
)}
|
|
258
|
+
/>
|
|
259
|
+
)}
|
|
260
|
+
</div>
|
|
261
|
+
)
|
|
262
|
+
|
|
183
263
|
return (
|
|
184
|
-
<
|
|
264
|
+
<PageShell
|
|
265
|
+
className={`config-view ${isCompactView ? 'config-view--compact' : ''}`}
|
|
266
|
+
bodyClassName='config-view__body'
|
|
267
|
+
>
|
|
185
268
|
{isLoading && (
|
|
186
269
|
<div className='config-view__state'>
|
|
187
270
|
<Spin />
|
|
@@ -193,90 +276,82 @@ export function ConfigView() {
|
|
|
193
276
|
</div>
|
|
194
277
|
)}
|
|
195
278
|
{!isLoading && error == null && (
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
/>
|
|
272
|
-
)}
|
|
273
|
-
</div>
|
|
274
|
-
)
|
|
275
|
-
}
|
|
276
|
-
})}
|
|
277
|
-
/>
|
|
278
|
-
</div>
|
|
279
|
+
isCompactView
|
|
280
|
+
? (
|
|
281
|
+
<div className='config-view__compact-shell'>
|
|
282
|
+
<div className='config-view__compact-controls'>
|
|
283
|
+
<Select
|
|
284
|
+
value={activeTabKey}
|
|
285
|
+
onChange={setActiveTabKey}
|
|
286
|
+
options={compactTabOptions}
|
|
287
|
+
className='config-view__compact-select'
|
|
288
|
+
popupMatchSelectWidth={false}
|
|
289
|
+
/>
|
|
290
|
+
{activeTab != null && configTabKeys.has(activeTab.key) && (
|
|
291
|
+
<ConfigSourceSwitch
|
|
292
|
+
value={sourceKey}
|
|
293
|
+
onChange={setSourceKey}
|
|
294
|
+
options={[
|
|
295
|
+
{
|
|
296
|
+
value: 'project',
|
|
297
|
+
icon: 'folder',
|
|
298
|
+
label: configPresent?.project === true
|
|
299
|
+
? t('config.sources.project')
|
|
300
|
+
: t('config.sources.projectMissing')
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
value: 'user',
|
|
304
|
+
icon: 'person',
|
|
305
|
+
label: configPresent?.user === true
|
|
306
|
+
? t('config.sources.user')
|
|
307
|
+
: t('config.sources.userMissing')
|
|
308
|
+
}
|
|
309
|
+
]}
|
|
310
|
+
/>
|
|
311
|
+
)}
|
|
312
|
+
</div>
|
|
313
|
+
<div className='config-view__compact-panel'>
|
|
314
|
+
{activeTab != null ? renderTabContent(activeTab) : null}
|
|
315
|
+
</div>
|
|
316
|
+
</div>
|
|
317
|
+
)
|
|
318
|
+
: (
|
|
319
|
+
<div className='config-view__tabs-wrap'>
|
|
320
|
+
<Tabs
|
|
321
|
+
tabPosition='left'
|
|
322
|
+
tabBarGutter={4}
|
|
323
|
+
indicator={{ size: 0 }}
|
|
324
|
+
className='config-view__tabs'
|
|
325
|
+
activeKey={activeTabKey}
|
|
326
|
+
onChange={(key) => {
|
|
327
|
+
if (key !== 'group-config' && key !== 'group-app') {
|
|
328
|
+
setActiveTabKey(key)
|
|
329
|
+
}
|
|
330
|
+
}}
|
|
331
|
+
items={tabs.map((tab) => {
|
|
332
|
+
if (tab.type === 'group') {
|
|
333
|
+
return {
|
|
334
|
+
key: tab.key,
|
|
335
|
+
label: <span className='config-view__group-label'>{tab.label}</span>,
|
|
336
|
+
disabled: true,
|
|
337
|
+
children: <div />
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
return {
|
|
341
|
+
key: tab.key,
|
|
342
|
+
label: (
|
|
343
|
+
<span className='config-view__tab-label'>
|
|
344
|
+
<span className='material-symbols-rounded config-view__tab-icon'>{tab.icon}</span>
|
|
345
|
+
<span className='config-view__tab-text'>{tab.label}</span>
|
|
346
|
+
</span>
|
|
347
|
+
),
|
|
348
|
+
children: renderTabContent(tab)
|
|
349
|
+
}
|
|
350
|
+
})}
|
|
351
|
+
/>
|
|
352
|
+
</div>
|
|
353
|
+
)
|
|
279
354
|
)}
|
|
280
|
-
</
|
|
355
|
+
</PageShell>
|
|
281
356
|
)
|
|
282
357
|
}
|
|
@@ -16,6 +16,13 @@ export function MarkdownContent({
|
|
|
16
16
|
pre({ children }) {
|
|
17
17
|
return <>{children}</>
|
|
18
18
|
},
|
|
19
|
+
table({ children, ...props }: any) {
|
|
20
|
+
return (
|
|
21
|
+
<div className='markdown-table-wrapper'>
|
|
22
|
+
<table {...props}>{children}</table>
|
|
23
|
+
</div>
|
|
24
|
+
)
|
|
25
|
+
},
|
|
19
26
|
code({ inline, className, children, ...props }: any) {
|
|
20
27
|
const langClass = typeof className === 'string' ? className : ''
|
|
21
28
|
const match = /language-(\w+)/.exec(langClass)
|