@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,25 +1,37 @@
|
|
|
1
|
-
.pending-
|
|
1
|
+
.pending-attachments {
|
|
2
2
|
display: flex;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 6px;
|
|
5
|
+
padding: 2px 0 8px;
|
|
6
|
+
align-items: flex-start;
|
|
7
|
+
min-width: 0;
|
|
6
8
|
}
|
|
7
9
|
|
|
8
|
-
.pending-
|
|
10
|
+
.pending-attachments__files,
|
|
11
|
+
.pending-attachments__images {
|
|
12
|
+
width: 100%;
|
|
9
13
|
display: flex;
|
|
14
|
+
gap: 6px;
|
|
15
|
+
align-items: flex-start;
|
|
16
|
+
min-width: 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.pending-attachments__files {
|
|
10
20
|
flex-direction: column;
|
|
11
|
-
|
|
12
|
-
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.pending-attachments__images {
|
|
24
|
+
flex-wrap: wrap;
|
|
13
25
|
}
|
|
14
26
|
|
|
15
27
|
.pending-image {
|
|
16
28
|
position: relative;
|
|
17
|
-
width:
|
|
18
|
-
height:
|
|
29
|
+
width: 60px;
|
|
30
|
+
height: 60px;
|
|
19
31
|
border-radius: 10px;
|
|
20
32
|
overflow: hidden;
|
|
21
|
-
border: 1px solid
|
|
22
|
-
background-color: var(--bg
|
|
33
|
+
border: 1px solid rgba(148, 163, 184, .18);
|
|
34
|
+
background-color: var(--tag-bg, #f3f4f6);
|
|
23
35
|
|
|
24
36
|
img {
|
|
25
37
|
width: 100%;
|
|
@@ -29,15 +41,54 @@
|
|
|
29
41
|
}
|
|
30
42
|
}
|
|
31
43
|
|
|
32
|
-
.pending-
|
|
44
|
+
.pending-image__overlay {
|
|
45
|
+
position: absolute;
|
|
46
|
+
inset: auto 0 0;
|
|
47
|
+
padding: 14px 6px 6px;
|
|
48
|
+
background: linear-gradient(
|
|
49
|
+
180deg,
|
|
50
|
+
rgba(15, 23, 42, 0),
|
|
51
|
+
rgba(15, 23, 42, .76)
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.pending-image__meta {
|
|
33
56
|
display: flex;
|
|
57
|
+
flex-direction: column;
|
|
58
|
+
gap: 1px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.pending-image__name,
|
|
62
|
+
.pending-image__size {
|
|
63
|
+
color: #fff;
|
|
64
|
+
line-height: 1.2;
|
|
65
|
+
text-shadow: 0 1px 2px rgba(15, 23, 42, .32);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.pending-image__name {
|
|
69
|
+
font-size: 9px;
|
|
70
|
+
font-weight: 600;
|
|
71
|
+
overflow: hidden;
|
|
72
|
+
text-overflow: ellipsis;
|
|
73
|
+
white-space: nowrap;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.pending-image__size {
|
|
77
|
+
font-size: 8px;
|
|
78
|
+
opacity: .85;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.pending-context-file {
|
|
82
|
+
display: grid;
|
|
83
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
84
|
+
width: 100%;
|
|
85
|
+
min-width: 0;
|
|
34
86
|
align-items: center;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
border: 1px solid var(--border-color);
|
|
87
|
+
gap: 6px;
|
|
88
|
+
padding: 5px 8px;
|
|
89
|
+
border: 1px solid rgba(148, 163, 184, .2);
|
|
39
90
|
border-radius: 10px;
|
|
40
|
-
background: var(--bg
|
|
91
|
+
background: var(--tag-bg, #f3f4f6);
|
|
41
92
|
}
|
|
42
93
|
|
|
43
94
|
.pending-context-file__meta {
|
|
@@ -45,30 +96,77 @@
|
|
|
45
96
|
display: flex;
|
|
46
97
|
align-items: center;
|
|
47
98
|
gap: 8px;
|
|
99
|
+
flex: 1;
|
|
48
100
|
}
|
|
49
101
|
|
|
50
102
|
.pending-context-file__icon {
|
|
51
|
-
font-size:
|
|
52
|
-
color: var(--
|
|
103
|
+
font-size: 15px;
|
|
104
|
+
color: var(--primary-color, #2563eb);
|
|
105
|
+
width: 24px;
|
|
106
|
+
height: 24px;
|
|
107
|
+
border-radius: 7px;
|
|
108
|
+
background: rgba(37, 99, 235, .1);
|
|
109
|
+
display: inline-flex;
|
|
110
|
+
align-items: center;
|
|
111
|
+
justify-content: center;
|
|
112
|
+
flex-shrink: 0;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.pending-context-file__copy {
|
|
116
|
+
min-width: 0;
|
|
117
|
+
display: flex;
|
|
118
|
+
flex-direction: column;
|
|
119
|
+
gap: 1px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.pending-context-file__name {
|
|
123
|
+
font-size: 10px;
|
|
124
|
+
font-weight: 600;
|
|
125
|
+
color: var(--text-color);
|
|
126
|
+
line-height: 1.4;
|
|
127
|
+
overflow: hidden;
|
|
128
|
+
text-overflow: ellipsis;
|
|
129
|
+
white-space: nowrap;
|
|
53
130
|
}
|
|
54
131
|
|
|
55
132
|
.pending-context-file__path {
|
|
56
133
|
display: block;
|
|
57
134
|
min-width: 0;
|
|
58
|
-
color: var(--text-color);
|
|
59
|
-
font-size:
|
|
60
|
-
line-height: 1.
|
|
61
|
-
overflow
|
|
135
|
+
color: var(--sub-text-color, #6b7280);
|
|
136
|
+
font-size: 9px;
|
|
137
|
+
line-height: 1.4;
|
|
138
|
+
overflow: hidden;
|
|
139
|
+
text-overflow: ellipsis;
|
|
140
|
+
white-space: nowrap;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.pending-context-file__actions {
|
|
144
|
+
display: flex;
|
|
145
|
+
align-items: center;
|
|
146
|
+
gap: 8px;
|
|
147
|
+
flex-shrink: 0;
|
|
148
|
+
min-width: 0;
|
|
149
|
+
justify-self: end;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.pending-context-file__size {
|
|
153
|
+
font-size: 9px;
|
|
154
|
+
font-weight: 600;
|
|
155
|
+
color: var(--sub-text-color, #6b7280);
|
|
156
|
+
white-space: nowrap;
|
|
62
157
|
}
|
|
63
158
|
|
|
64
159
|
.pending-context-file__remove {
|
|
65
|
-
width:
|
|
66
|
-
height:
|
|
160
|
+
width: 22px;
|
|
161
|
+
height: 22px;
|
|
162
|
+
border: none;
|
|
163
|
+
padding: 0;
|
|
67
164
|
border-radius: 999px;
|
|
68
165
|
display: flex;
|
|
69
166
|
align-items: center;
|
|
70
167
|
justify-content: center;
|
|
71
168
|
color: var(--sub-text-color, #6b7280);
|
|
169
|
+
background: transparent;
|
|
72
170
|
cursor: pointer;
|
|
73
171
|
|
|
74
172
|
&:hover {
|
|
@@ -84,20 +182,59 @@
|
|
|
84
182
|
|
|
85
183
|
.pending-image-remove {
|
|
86
184
|
position: absolute;
|
|
87
|
-
top:
|
|
88
|
-
right:
|
|
185
|
+
top: 5px;
|
|
186
|
+
right: 5px;
|
|
89
187
|
width: 18px;
|
|
90
188
|
height: 18px;
|
|
91
|
-
|
|
92
|
-
|
|
189
|
+
padding: 0;
|
|
190
|
+
border: 1px solid rgba(255, 255, 255, .18);
|
|
191
|
+
border-radius: 999px;
|
|
192
|
+
background-color: rgba(15, 23, 42, .64);
|
|
93
193
|
color: #fff;
|
|
94
194
|
display: flex;
|
|
95
195
|
align-items: center;
|
|
96
196
|
justify-content: center;
|
|
97
197
|
cursor: pointer;
|
|
198
|
+
backdrop-filter: blur(10px);
|
|
199
|
+
|
|
200
|
+
&:hover {
|
|
201
|
+
background-color: rgba(15, 23, 42, .84);
|
|
202
|
+
}
|
|
98
203
|
|
|
99
204
|
.material-symbols-rounded {
|
|
100
|
-
font-size:
|
|
205
|
+
font-size: 12px;
|
|
101
206
|
line-height: 1;
|
|
102
207
|
}
|
|
103
208
|
}
|
|
209
|
+
|
|
210
|
+
html.dark {
|
|
211
|
+
.pending-image {
|
|
212
|
+
border-color: rgba(71, 85, 105, .55);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.pending-context-file {
|
|
216
|
+
border-color: rgba(71, 85, 105, .55);
|
|
217
|
+
background: rgba(30, 41, 59, .72);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.pending-context-file__icon {
|
|
221
|
+
background: rgba(59, 130, 246, .16);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
@media (max-width: 640px) {
|
|
226
|
+
.pending-context-file {
|
|
227
|
+
grid-template-columns: minmax(0, 1fr);
|
|
228
|
+
align-items: stretch;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.pending-context-file__actions {
|
|
232
|
+
width: 100%;
|
|
233
|
+
justify-content: space-between;
|
|
234
|
+
justify-self: stretch;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.pending-attachments__images {
|
|
238
|
+
width: 100%;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
@@ -1,7 +1,44 @@
|
|
|
1
1
|
import './SenderAttachments.scss'
|
|
2
2
|
|
|
3
|
+
import { useTranslation } from 'react-i18next'
|
|
4
|
+
|
|
3
5
|
import type { PendingContextFile, PendingImage } from '../../@types/sender-composer'
|
|
4
6
|
|
|
7
|
+
const formatAttachmentSize = (size?: number) => {
|
|
8
|
+
if (size == null || Number.isNaN(size) || size <= 0) {
|
|
9
|
+
return null
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
if (size < 1024) {
|
|
13
|
+
return `${size} B`
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
if (size < 1024 * 1024) {
|
|
17
|
+
return `${(size / 1024).toFixed(size >= 10 * 1024 ? 0 : 1)} KB`
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return `${(size / (1024 * 1024)).toFixed(size >= 10 * 1024 * 1024 ? 0 : 1)} MB`
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const getFileDisplayName = (file: PendingContextFile) => {
|
|
24
|
+
if (file.name != null && file.name !== '') {
|
|
25
|
+
return file.name
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const parts = file.path.split(/[\\/]/)
|
|
29
|
+
return parts.at(-1) ?? file.path
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const getFileParentPath = (path: string) => {
|
|
33
|
+
const normalized = path.replace(/\\/g, '/')
|
|
34
|
+
const lastSlashIndex = normalized.lastIndexOf('/')
|
|
35
|
+
if (lastSlashIndex <= 0) {
|
|
36
|
+
return '.'
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return normalized.slice(0, lastSlashIndex)
|
|
40
|
+
}
|
|
41
|
+
|
|
5
42
|
export function SenderAttachments({
|
|
6
43
|
pendingImages,
|
|
7
44
|
pendingFiles,
|
|
@@ -13,33 +50,68 @@ export function SenderAttachments({
|
|
|
13
50
|
onRemovePendingImage: (id: string) => void
|
|
14
51
|
onRemovePendingFile: (path: string) => void
|
|
15
52
|
}) {
|
|
53
|
+
const { t } = useTranslation()
|
|
54
|
+
|
|
16
55
|
return (
|
|
17
56
|
<>
|
|
18
|
-
{pendingImages.length > 0 && (
|
|
19
|
-
<div className='pending-
|
|
20
|
-
{
|
|
21
|
-
<div
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
57
|
+
{(pendingImages.length > 0 || pendingFiles.length > 0) && (
|
|
58
|
+
<div className='pending-attachments'>
|
|
59
|
+
{pendingFiles.length > 0 && (
|
|
60
|
+
<div className='pending-attachments__files'>
|
|
61
|
+
{pendingFiles.map((file) => {
|
|
62
|
+
const sizeLabel = formatAttachmentSize(file.size)
|
|
63
|
+
|
|
64
|
+
return (
|
|
65
|
+
<div key={file.path} className='pending-context-file'>
|
|
66
|
+
<div className='pending-context-file__meta'>
|
|
67
|
+
<span className='material-symbols-rounded pending-context-file__icon'>attach_file</span>
|
|
68
|
+
<div className='pending-context-file__copy'>
|
|
69
|
+
<span className='pending-context-file__name'>{getFileDisplayName(file)}</span>
|
|
70
|
+
<code className='pending-context-file__path'>{getFileParentPath(file.path)}</code>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
<div className='pending-context-file__actions'>
|
|
74
|
+
{sizeLabel != null && <span className='pending-context-file__size'>{sizeLabel}</span>}
|
|
75
|
+
<button
|
|
76
|
+
type='button'
|
|
77
|
+
className='pending-context-file__remove'
|
|
78
|
+
onClick={() => onRemovePendingFile(file.path)}
|
|
79
|
+
>
|
|
80
|
+
<span className='material-symbols-rounded'>close</span>
|
|
81
|
+
</button>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
)
|
|
85
|
+
})}
|
|
26
86
|
</div>
|
|
27
|
-
)
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
87
|
+
)}
|
|
88
|
+
{pendingImages.length > 0 && (
|
|
89
|
+
<div className='pending-attachments__images'>
|
|
90
|
+
{pendingImages.map((image) => {
|
|
91
|
+
const displayName = image.name ?? t('chat.attachments.pastedImage')
|
|
92
|
+
const sizeLabel = formatAttachmentSize(image.size)
|
|
93
|
+
|
|
94
|
+
return (
|
|
95
|
+
<div key={image.id} className='pending-image'>
|
|
96
|
+
<img src={image.url} alt={image.name ?? ''} />
|
|
97
|
+
<div className='pending-image__overlay'>
|
|
98
|
+
<div className='pending-image__meta'>
|
|
99
|
+
<span className='pending-image__name'>{displayName}</span>
|
|
100
|
+
{sizeLabel != null && <span className='pending-image__size'>{sizeLabel}</span>}
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
<button
|
|
104
|
+
type='button'
|
|
105
|
+
className='pending-image-remove'
|
|
106
|
+
onClick={() => onRemovePendingImage(image.id)}
|
|
107
|
+
>
|
|
108
|
+
<span className='material-symbols-rounded'>close</span>
|
|
109
|
+
</button>
|
|
110
|
+
</div>
|
|
111
|
+
)
|
|
112
|
+
})}
|
|
41
113
|
</div>
|
|
42
|
-
)
|
|
114
|
+
)}
|
|
43
115
|
</div>
|
|
44
116
|
)}
|
|
45
117
|
</>
|
|
@@ -28,6 +28,7 @@ export function SenderBody({
|
|
|
28
28
|
onRemovePendingImage,
|
|
29
29
|
onRemovePendingFile,
|
|
30
30
|
editorRef,
|
|
31
|
+
sessionId,
|
|
31
32
|
sessionInfo,
|
|
32
33
|
placeholder,
|
|
33
34
|
input,
|
|
@@ -35,6 +36,8 @@ export function SenderBody({
|
|
|
35
36
|
onCursorChange,
|
|
36
37
|
onKeyDown,
|
|
37
38
|
onPaste,
|
|
39
|
+
secondarySendShortcut,
|
|
40
|
+
onSecondarySendShortcut,
|
|
38
41
|
resolveCompletionMatch,
|
|
39
42
|
resolveTokenDecorations,
|
|
40
43
|
toolbarState,
|
|
@@ -53,6 +56,7 @@ export function SenderBody({
|
|
|
53
56
|
onRemovePendingImage: (id: string) => void
|
|
54
57
|
onRemovePendingFile: (path: string) => void
|
|
55
58
|
editorRef: MutableRefObject<SenderEditorHandle | null>
|
|
59
|
+
sessionId?: string
|
|
56
60
|
sessionInfo?: SessionInfo | null
|
|
57
61
|
placeholder: string
|
|
58
62
|
input: string
|
|
@@ -60,6 +64,8 @@ export function SenderBody({
|
|
|
60
64
|
onCursorChange: (cursorOffset: number | null) => void
|
|
61
65
|
onKeyDown: (event: KeyboardEvent) => void
|
|
62
66
|
onPaste: (event: ClipboardEvent) => void | Promise<void>
|
|
67
|
+
secondarySendShortcut?: string
|
|
68
|
+
onSecondarySendShortcut?: () => void
|
|
63
69
|
resolveCompletionMatch: (
|
|
64
70
|
value: string,
|
|
65
71
|
cursorOffset: number | null,
|
|
@@ -91,7 +97,10 @@ export function SenderBody({
|
|
|
91
97
|
placeholder={placeholder || t('chat.inputPlaceholder')}
|
|
92
98
|
disabled={(!isInlineEdit && modelUnavailable) || (isInlineEdit && isBusy)}
|
|
93
99
|
sendShortcut={toolbarState.resolvedSendShortcut}
|
|
100
|
+
sendShortcutDisabled={toolbarState.sendBlocked}
|
|
94
101
|
onSendShortcut={toolbarHandlers.onSend}
|
|
102
|
+
secondarySendShortcut={secondarySendShortcut}
|
|
103
|
+
onSecondarySendShortcut={onSecondarySendShortcut}
|
|
95
104
|
onInputChange={onInputChange}
|
|
96
105
|
onCursorChange={onCursorChange}
|
|
97
106
|
onKeyDown={onKeyDown}
|
|
@@ -103,6 +112,7 @@ export function SenderBody({
|
|
|
103
112
|
{!isInlineEdit && (
|
|
104
113
|
<ContextFilePicker
|
|
105
114
|
open={showContextPicker}
|
|
115
|
+
sessionId={sessionId}
|
|
106
116
|
selectedPaths={pendingFiles.map(file => file.path)}
|
|
107
117
|
onCancel={onCancelContextPicker}
|
|
108
118
|
onConfirm={onConfirmContextPicker}
|