@vibe-forge/client 0.9.0 → 0.10.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/AGENTS.md +75 -0
- package/dist/assets/abap-DLDM7-KI.js +1 -0
- package/dist/assets/apex-DNDY2TF8.js +1 -0
- package/dist/assets/{arc-D9HxM0yv.js → arc-C1rWFTer.js} +1 -1
- package/dist/assets/azcli-Y6nb8tq_.js +1 -0
- package/dist/assets/bat-BwHxbl9M.js +1 -0
- package/dist/assets/bicep-CFznDFnq.js +2 -0
- package/dist/assets/{blockDiagram-c4efeb88-C_pTeiD4.js → blockDiagram-c4efeb88-DlZ9x70F.js} +1 -1
- package/dist/assets/{c4Diagram-c83219d4-_oYrCrLr.js → c4Diagram-c83219d4-BKKxi__y.js} +1 -1
- package/dist/assets/cameligo-Bf6VGUru.js +1 -0
- package/dist/assets/channel-F1aqMANO.js +1 -0
- package/dist/assets/{classDiagram-beda092f-9dnkgPhR.js → classDiagram-beda092f-CVGPySZq.js} +1 -1
- package/dist/assets/{classDiagram-v2-2358418a-BUIeZpdO.js → classDiagram-v2-2358418a-7kp8GVVj.js} +1 -1
- package/dist/assets/clojure-Dnu-v4kV.js +1 -0
- package/dist/assets/clone-B-GCuXNo.js +1 -0
- package/dist/assets/codicon-ngg6Pgfi.ttf +0 -0
- package/dist/assets/coffee-Bd8akH9Z.js +1 -0
- package/dist/assets/cpp-BbWJElDN.js +1 -0
- package/dist/assets/{createText-1719965b-DuRFplcD.js → createText-1719965b-Dykv8kT9.js} +1 -1
- package/dist/assets/csharp-Co3qMtFm.js +1 -0
- package/dist/assets/csp-D-4FJmMZ.js +1 -0
- package/dist/assets/css-DdJfP1eB.js +3 -0
- package/dist/assets/css.worker-BvV5MPou.js +93 -0
- package/dist/assets/cssMode-B59COYVW.js +1 -0
- package/dist/assets/cypher-cTPe9QuQ.js +1 -0
- package/dist/assets/dart-BOtBlQCF.js +1 -0
- package/dist/assets/dockerfile-BG73LgW2.js +1 -0
- package/dist/assets/ecl-BEgZUVRK.js +1 -0
- package/dist/assets/{edges-96097737-CTpq6Ih_.js → edges-96097737-CkZ1ZBro.js} +1 -1
- package/dist/assets/editor.worker-CKy7Pnvo.js +26 -0
- package/dist/assets/elixir-BkW5O-1t.js +1 -0
- package/dist/assets/{erDiagram-0228fc6a-CWFgdO1E.js → erDiagram-0228fc6a-281ADcRp.js} +1 -1
- package/dist/assets/flow9-BeJ5waoc.js +1 -0
- package/dist/assets/{flowDb-c6c81e3f-8Vdx29oZ.js → flowDb-c6c81e3f-BQjX_flP.js} +1 -1
- package/dist/assets/{flowDiagram-50d868cf-6S9wOVNl.js → flowDiagram-50d868cf-DMHZTjES.js} +1 -1
- package/dist/assets/flowDiagram-v2-4f6560a1-C5FzdVl1.js +1 -0
- package/dist/assets/{flowchart-elk-definition-6af322e1-DVcZ-ZBQ.js → flowchart-elk-definition-6af322e1-CI3yz4z8.js} +1 -1
- package/dist/assets/freemarker2-DWnWjibn.js +3 -0
- package/dist/assets/fsharp-PahG7c26.js +1 -0
- package/dist/assets/{ganttDiagram-a2739b55-DY1QSl-x.js → ganttDiagram-a2739b55-B3IING9L.js} +1 -1
- package/dist/assets/{gitGraphDiagram-82fe8481-BP08OBKL.js → gitGraphDiagram-82fe8481-CnArIr_T.js} +1 -1
- package/dist/assets/go-acbASCJo.js +1 -0
- package/dist/assets/{graph-D8GCszcN.js → graph-BZ1F0Yve.js} +1 -1
- package/dist/assets/graphql-BxJiqAUM.js +1 -0
- package/dist/assets/handlebars-C1QH9qTz.js +1 -0
- package/dist/assets/hcl-DtV1sZF8.js +1 -0
- package/dist/assets/html-D1NkqHjC.js +1 -0
- package/dist/assets/html.worker-BLJhxQJQ.js +470 -0
- package/dist/assets/htmlMode-DAZCE_rA.js +1 -0
- package/dist/assets/{index-5325376f-OOoAXU1u.js → index-5325376f-Da9zSHjA.js} +1 -1
- package/dist/assets/index-C0vjF3D0.js +1511 -0
- package/dist/assets/index-vzEbM21t.css +32 -0
- package/dist/assets/{infoDiagram-8eee0895-BHgkXjhJ.js → infoDiagram-8eee0895-DYbFvRM7.js} +1 -1
- package/dist/assets/ini-Kd9XrMLS.js +1 -0
- package/dist/assets/java-CXBNlu9o.js +1 -0
- package/dist/assets/javascript-CoMjGRHa.js +1 -0
- package/dist/assets/{journeyDiagram-c64418c1-BljInElp.js → journeyDiagram-c64418c1-Boebox0b.js} +1 -1
- package/dist/assets/json.worker-usMZ-FED.js +58 -0
- package/dist/assets/jsonMode-D__gAvuz.js +7 -0
- package/dist/assets/julia-cl7-CwDS.js +1 -0
- package/dist/assets/kotlin-s7OhZKlX.js +1 -0
- package/dist/assets/{layout-Cw-SwAFD.js → layout-CTcHNbHp.js} +1 -1
- package/dist/assets/less-9HpZscsL.js +2 -0
- package/dist/assets/lexon-OrD6JF1K.js +1 -0
- package/dist/assets/{line-Q-uZLuUr.js → line-4AwinCz2.js} +1 -1
- package/dist/assets/{linear-BahOnNn3.js → linear-CeSMLzJW.js} +1 -1
- package/dist/assets/liquid-DZF6egdE.js +1 -0
- package/dist/assets/lspLanguageFeatures-6K4lv5S2.js +4 -0
- package/dist/assets/lua-Cyyb5UIc.js +1 -0
- package/dist/assets/m3-B8OfTtLu.js +1 -0
- package/dist/assets/markdown-BFxVWTOG.js +1 -0
- package/dist/assets/mdx-Cnt4ka6w.js +1 -0
- package/dist/assets/{mermaid.core-BR0Qh3Rd.js → mermaid.core-B0yG5s4D.js} +6 -6
- package/dist/assets/{mindmap-definition-8da855dc-Brq2OJUZ.js → mindmap-definition-8da855dc-KJEvXMKj.js} +1 -1
- package/dist/assets/mips-CiqrrVzr.js +1 -0
- package/dist/assets/msdax-DmeGPVcC.js +1 -0
- package/dist/assets/mysql-C_tMU-Nz.js +1 -0
- package/dist/assets/objective-c-BDtDVThU.js +1 -0
- package/dist/assets/pascal-vHIfCaH5.js +1 -0
- package/dist/assets/pascaligo-DtZ0uQbO.js +1 -0
- package/dist/assets/perl-Ub6l9XKa.js +1 -0
- package/dist/assets/pgsql-BlNEE0v7.js +1 -0
- package/dist/assets/php-BBUBE1dy.js +1 -0
- package/dist/assets/{pieDiagram-a8764435-uhYdiXro.js → pieDiagram-a8764435-17nFAXPJ.js} +1 -1
- package/dist/assets/pla-DSh2-awV.js +1 -0
- package/dist/assets/postiats-CocnycG-.js +1 -0
- package/dist/assets/powerquery-tScXyioY.js +1 -0
- package/dist/assets/powershell-COWaemsV.js +1 -0
- package/dist/assets/protobuf-Brw8urJB.js +2 -0
- package/dist/assets/pug-8SOpv6rk.js +1 -0
- package/dist/assets/python-DA3TtjDv.js +1 -0
- package/dist/assets/qsharp-Bw9ernYp.js +1 -0
- package/dist/assets/{quadrantDiagram-1e28029f-TwqtEe7e.js → quadrantDiagram-1e28029f-Dt4vubi-.js} +1 -1
- package/dist/assets/r-j7ic8hl3.js +1 -0
- package/dist/assets/razor-CWDJgvX_.js +1 -0
- package/dist/assets/redis-Bu5POkcn.js +1 -0
- package/dist/assets/redshift-Bs9aos_-.js +1 -0
- package/dist/assets/{requirementDiagram-08caed73-DSXnPRDS.js → requirementDiagram-08caed73-H6aDyDK-.js} +1 -1
- package/dist/assets/restructuredtext-CqXO7rUv.js +1 -0
- package/dist/assets/ruby-zBfavPgS.js +1 -0
- package/dist/assets/rust-BzKRNQWT.js +1 -0
- package/dist/assets/{sankeyDiagram-a04cb91d-EADpJeAn.js → sankeyDiagram-a04cb91d-DxsVtbjI.js} +1 -1
- package/dist/assets/sb-BBc9UKZt.js +1 -0
- package/dist/assets/scala-D9hQfWCl.js +1 -0
- package/dist/assets/scheme-BPhDTwHR.js +1 -0
- package/dist/assets/scss-CBJaRo0y.js +3 -0
- package/dist/assets/{sequenceDiagram-c5b8d532-C8qXvt9z.js → sequenceDiagram-c5b8d532-BHa148XJ.js} +1 -1
- package/dist/assets/shell-DiJ1NA_G.js +1 -0
- package/dist/assets/solidity-Db0IVjzk.js +1 -0
- package/dist/assets/sophia-CnS9iZB_.js +1 -0
- package/dist/assets/sparql-CJmd_6j2.js +1 -0
- package/dist/assets/sql-ClhHkBeG.js +1 -0
- package/dist/assets/st-CHwy0fLd.js +1 -0
- package/dist/assets/{stateDiagram-1ecb1508-5W0ghy_S.js → stateDiagram-1ecb1508-DgwBm8LO.js} +1 -1
- package/dist/assets/{stateDiagram-v2-c2b004d7-BfwOQJw4.js → stateDiagram-v2-c2b004d7-BK7IQLVc.js} +1 -1
- package/dist/assets/{styles-b4e223ce-EkKH_ULb.js → styles-b4e223ce-DzW27Bc-.js} +1 -1
- package/dist/assets/{styles-ca3715f6-DwhrtqlU.js → styles-ca3715f6-Dex2GiLT.js} +1 -1
- package/dist/assets/{styles-d45a18b0-yqL8KH6x.js → styles-d45a18b0-B6fGtDKS.js} +1 -1
- package/dist/assets/{svgDrawCommon-b86b1483--5VjnjhC.js → svgDrawCommon-b86b1483-B4HYgfV5.js} +1 -1
- package/dist/assets/swift-Bqt4WxQ4.js +3 -0
- package/dist/assets/systemverilog-Bs9z6M-B.js +1 -0
- package/dist/assets/tcl-Dm6ycUr_.js +1 -0
- package/dist/assets/{timeline-definition-faaaa080-CWOTwik9.js → timeline-definition-faaaa080--QSbWb25.js} +1 -1
- package/dist/assets/ts.worker-DGHjMaqB.js +67731 -0
- package/dist/assets/tsMode-ZM7ocZCH.js +11 -0
- package/dist/assets/twig-Csy3S7wG.js +1 -0
- package/dist/assets/typescript-CKWDmBCc.js +1 -0
- package/dist/assets/typespec-Btyra-wh.js +1 -0
- package/dist/assets/vb-Db0cS2oM.js +1 -0
- package/dist/assets/wgsl-BTesnYfV.js +298 -0
- package/dist/assets/xml-DuEUAzPi.js +1 -0
- package/dist/assets/{xychartDiagram-f5964ef8-CZg47H1t.js → xychartDiagram-f5964ef8-D09Zkv2K.js} +1 -1
- package/dist/assets/yaml-DL7QPRYk.js +1 -0
- package/dist/favicon.svg +3 -3
- package/dist/index.html +2 -2
- package/package.json +14 -10
- package/public/favicon.svg +3 -3
- package/src/api/sessions.ts +36 -0
- package/src/api/workspace.ts +19 -0
- package/src/api.ts +4 -0
- package/src/components/NavRail.scss +9 -10
- package/src/components/ShortcutDisplay.scss +38 -0
- package/src/components/ShortcutDisplay.tsx +37 -0
- package/src/components/ShortcutTooltip.scss +36 -0
- package/src/components/ShortcutTooltip.tsx +84 -0
- package/src/components/Sidebar.scss +55 -13
- package/src/components/Sidebar.tsx +141 -52
- package/src/components/chat/AGENTS.md +163 -0
- package/src/components/chat/ChatHeader.scss +308 -49
- package/src/components/chat/ChatHeader.tsx +394 -80
- package/src/components/chat/ChatHistoryView.tsx +353 -69
- package/src/components/chat/ChatSettingsView.tsx +5 -3
- package/src/components/chat/ChatTimelineView.scss +3 -2
- package/src/components/chat/{sender/ThinkingStatus.tsx → ThinkingStatus.tsx} +1 -1
- package/src/components/chat/messages/MessageContextMenu.scss +145 -0
- package/src/components/chat/messages/MessageContextMenu.tsx +108 -0
- package/src/components/chat/messages/MessageContextMenuContent.tsx +87 -0
- package/src/components/chat/messages/MessageFooter.tsx +44 -24
- package/src/components/chat/messages/MessageItem.scss +157 -10
- package/src/components/chat/messages/MessageItem.tsx +382 -13
- package/src/components/chat/messages/build-message-context-menu-entries.ts +166 -0
- package/src/components/chat/messages/message-content-utils.ts +121 -0
- package/src/components/chat/messages/message-turns.ts +88 -0
- package/src/components/chat/messages/message-utils.ts +19 -1
- package/src/components/chat/sender/@components/adapter-select/AdapterSelectControl.scss +86 -0
- package/src/components/chat/sender/@components/adapter-select/AdapterSelectControl.tsx +54 -0
- package/src/components/chat/sender/@components/adapter-select/AdapterSelectDropdown.scss +42 -0
- package/src/components/chat/sender/@components/effort-select/EffortSelectControl.scss +68 -0
- package/src/components/chat/sender/@components/effort-select/EffortSelectControl.tsx +137 -0
- package/src/components/chat/sender/@components/effort-select/EffortSelectDropdown.scss +96 -0
- package/src/components/chat/sender/@components/model-select/ModelSelectControl.scss +82 -0
- package/src/components/chat/sender/@components/model-select/ModelSelectControl.tsx +171 -0
- package/src/components/chat/sender/@components/model-select/ModelSelectMenu.scss +95 -0
- package/src/components/chat/sender/@components/model-select/ModelSelectMenuLabels.scss +144 -0
- package/src/components/chat/sender/@components/model-select/ModelSelectOptionLabel.tsx +109 -0
- package/src/components/chat/sender/@components/reference-actions/ReferenceActionsControl.scss +106 -0
- package/src/components/chat/sender/@components/reference-actions/ReferenceActionsControl.tsx +156 -0
- package/src/components/chat/sender/@components/reference-actions/ReferenceActionsOption.scss +34 -0
- package/src/components/chat/sender/@components/reference-actions/ReferencePermissionActionsPopover.tsx +111 -0
- package/src/components/chat/sender/@components/sender-attachments/SenderAttachments.scss +103 -0
- package/src/components/chat/sender/@components/sender-attachments/SenderAttachments.tsx +47 -0
- package/src/components/chat/sender/@components/sender-body/SenderBody.tsx +137 -0
- package/src/components/chat/sender/@components/sender-interaction-panel/SenderInteractionPanel.scss +178 -0
- package/src/components/chat/sender/@components/sender-interaction-panel/SenderInteractionPanel.tsx +145 -0
- package/src/components/chat/sender/@components/sender-monaco-editor/SenderMonacoEditor.scss +47 -0
- package/src/components/chat/sender/@components/sender-monaco-editor/SenderMonacoEditor.tsx +121 -0
- package/src/components/chat/sender/@components/sender-monaco-editor/monaco-runtime.ts +99 -0
- package/src/components/chat/sender/@components/sender-monaco-editor/use-sender-editor-handle.ts +48 -0
- package/src/components/chat/sender/@components/sender-monaco-editor/use-sender-monaco-editor.ts +209 -0
- package/src/components/chat/sender/@components/sender-monaco-editor/use-sender-monaco-theme.ts +24 -0
- package/src/components/chat/sender/@components/sender-submit-action/SenderSubmitAction.scss +54 -0
- package/src/components/chat/sender/@components/sender-submit-action/SenderSubmitAction.tsx +80 -0
- package/src/components/chat/sender/@components/sender-toolbar/SenderSelectBase.scss +71 -0
- package/src/components/chat/sender/@components/sender-toolbar/SenderSelectShared.scss +118 -0
- package/src/components/chat/sender/@components/sender-toolbar/SenderToolbar.scss +99 -0
- package/src/components/chat/sender/@components/sender-toolbar/SenderToolbar.tsx +87 -0
- package/src/components/chat/sender/@core/build-sender-controller-result.ts +119 -0
- package/src/components/chat/sender/@core/build-sender-toolbar.ts +122 -0
- package/src/components/chat/sender/@core/content-attachments.ts +76 -0
- package/src/components/chat/sender/@core/create-sender-toolbar-handlers.ts +115 -0
- package/src/components/chat/sender/@core/get-sender-interaction-state.ts +18 -0
- package/src/components/chat/sender/@core/get-sender-runtime-state.ts +14 -0
- package/src/components/chat/sender/@core/sender-toolbar-bindings.ts +155 -0
- package/src/components/chat/sender/@hooks/use-model-select-browser.tsx +189 -0
- package/src/components/chat/sender/@hooks/use-sender-attachments.ts +143 -0
- package/src/components/chat/sender/@hooks/use-sender-autofocus.ts +34 -0
- package/src/components/chat/sender/@hooks/use-sender-completion.ts +62 -0
- package/src/components/chat/sender/@hooks/use-sender-composer-state.ts +34 -0
- package/src/components/chat/sender/@hooks/use-sender-controller.ts +193 -0
- package/src/components/chat/sender/@hooks/use-sender-focus-restore.ts +72 -0
- package/src/components/chat/sender/@hooks/use-sender-history.ts +79 -0
- package/src/components/chat/sender/@hooks/use-sender-keydown.ts +113 -0
- package/src/components/chat/sender/@hooks/use-sender-reference-actions.ts +191 -0
- package/src/components/chat/sender/@hooks/use-sender-reference-focus-restore.ts +21 -0
- package/src/components/chat/sender/@hooks/use-sender-refs.ts +19 -0
- package/src/components/chat/sender/@hooks/use-sender-select-overlays.ts +83 -0
- package/src/components/chat/sender/@hooks/use-sender-shortcuts.ts +78 -0
- package/src/components/chat/sender/@hooks/use-sender-submit.ts +81 -0
- package/src/components/chat/sender/@types/sender-composer.ts +19 -0
- package/src/components/chat/sender/@types/sender-editor.ts +12 -0
- package/src/components/chat/sender/@types/sender-props.ts +50 -0
- package/src/components/chat/sender/@types/sender-toolbar-types.ts +83 -0
- package/src/components/chat/sender/@types/sender-types.ts +21 -0
- package/src/components/chat/sender/@utils/sender-completion.ts +164 -0
- package/src/components/chat/sender/@utils/sender-constants.ts +18 -0
- package/src/components/chat/sender/@utils/sender-utils.ts +45 -0
- package/src/components/chat/sender/Sender.scss +6 -737
- package/src/components/chat/sender/Sender.tsx +53 -921
- package/src/components/chat/session-metadata.ts +55 -0
- package/src/components/chat/terminal/@hooks/use-terminal-instance.ts +152 -0
- package/src/components/chat/terminal/@hooks/use-terminal-session.ts +196 -0
- package/src/components/chat/terminal/ChatTerminalView.scss +62 -0
- package/src/components/chat/terminal/ChatTerminalView.tsx +114 -0
- package/src/components/chat/tools/core/ToolGroup.scss +7 -0
- package/src/components/chat/tools/core/ToolGroup.tsx +94 -44
- package/src/components/config/ConfigSectionForm.tsx +8 -1
- package/src/components/config/ConfigShortcutInput.tsx +9 -2
- package/src/components/config/configSchema.ts +12 -2
- package/src/components/config/record-editors/ModelServicesRecordEditor.tsx +0 -14
- package/src/components/dock-panel/DockPanel.scss +152 -0
- package/src/components/dock-panel/DockPanel.tsx +195 -0
- package/src/components/layout/AppShell.scss +40 -2
- package/src/components/layout/AppShell.tsx +25 -10
- package/src/components/sidebar/SessionContextMenu.scss +143 -0
- package/src/components/sidebar/SessionContextMenu.tsx +196 -0
- package/src/components/sidebar/SessionContextMenuContent.tsx +89 -0
- package/src/components/sidebar/SessionItem.scss +150 -67
- package/src/components/sidebar/SessionItem.tsx +183 -134
- package/src/components/sidebar/SessionList.scss +47 -17
- package/src/components/sidebar/SessionList.tsx +31 -16
- package/src/components/sidebar/SidebarHeader.scss +329 -49
- package/src/components/sidebar/SidebarHeader.tsx +108 -86
- package/src/components/sidebar/SidebarHeaderBatchActions.tsx +81 -0
- package/src/components/sidebar/SidebarHeaderSearchActions.tsx +176 -0
- package/src/components/sidebar/SidebarHeaderSelectField.tsx +24 -0
- package/src/components/sidebar/filter-utils.ts +23 -0
- package/src/components/workspace/ContextFilePicker.scss +64 -0
- package/src/components/workspace/ContextFilePicker.tsx +171 -0
- package/src/connectionManager.ts +4 -2
- package/src/hooks/chat/interaction-state.ts +67 -0
- package/src/hooks/chat/model-selector-data-builders.ts +146 -0
- package/src/hooks/chat/model-selector-data-option-utils.ts +62 -0
- package/src/hooks/chat/model-selector-data-types.ts +27 -0
- package/src/hooks/chat/model-selector-data.ts +109 -0
- package/src/hooks/chat/model-selector-recommendations.ts +69 -0
- package/src/hooks/chat/model-selector.ts +9 -0
- package/src/hooks/chat/use-chat-interaction.ts +13 -8
- package/src/hooks/chat/use-chat-model-adapter-selection.tsx +167 -164
- package/src/hooks/chat/use-chat-models.tsx +46 -23
- package/src/hooks/chat/use-chat-session-actions.ts +69 -23
- package/src/hooks/chat/use-chat-session-messages.ts +158 -60
- package/src/hooks/chat/use-chat-session.ts +34 -9
- package/src/hooks/chat/use-chat-view.ts +26 -6
- package/src/hooks/chat/use-composer-control-shortcuts.ts +69 -0
- package/src/hooks/chat/use-terminal-dock-visibility.ts +39 -0
- package/src/hooks/use-roving-focus-list.ts +104 -0
- package/src/hooks/use-sidebar-navigation.ts +9 -4
- package/src/hooks/use-sidebar-query-state.ts +79 -0
- package/src/main.tsx +6 -1
- package/src/resources/locales/en.json +140 -6
- package/src/resources/locales/zh.json +140 -6
- package/src/routes/ChatRoute.scss +159 -4
- package/src/routes/ChatRoute.tsx +72 -10
- package/src/runtime-config.ts +21 -0
- package/src/store/index.ts +1 -3
- package/src/styles/global.scss +12 -2
- package/src/utils/chat-links.ts +21 -0
- package/src/utils/copy.ts +18 -0
- package/src/utils/shortcutUtils.ts +111 -1
- package/src/vite-env.d.ts +1 -0
- package/src/ws.ts +6 -5
- package/vite.config.ts +71 -7
- package/dist/assets/channel-Di8KkPU4.js +0 -1
- package/dist/assets/clone-B065n6L-.js +0 -1
- package/dist/assets/flowDiagram-v2-4f6560a1-nj-oVLPK.js +0 -1
- package/dist/assets/index-BZe1Qtye.css +0 -1
- package/dist/assets/index-DV3eI2aD.js +0 -557
- package/src/components/chat/sender/CompletionMenu.scss +0 -70
- package/src/components/chat/sender/CompletionMenu.tsx +0 -58
- /package/src/components/chat/{sender/ThinkingStatus.scss → ThinkingStatus.scss} +0 -0
- /package/src/components/chat/sender/{interaction-request.ts → @core/interaction-request.ts} +0 -0
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { App } from 'antd'
|
|
2
|
+
import React, { useEffect, useMemo, useRef, useState } from 'react'
|
|
2
3
|
import { useTranslation } from 'react-i18next'
|
|
4
|
+
import { useLocation } from 'react-router-dom'
|
|
3
5
|
|
|
6
|
+
import type { ChatErrorBannerState } from '#~/hooks/chat/interaction-state'
|
|
4
7
|
import type { ChatEffort } from '#~/hooks/chat/use-chat-effort'
|
|
8
|
+
import type { ModelSelectMenuGroup, ModelSelectOption } from '#~/hooks/chat/use-chat-model-adapter-selection'
|
|
5
9
|
import type { PermissionMode } from '#~/hooks/chat/use-chat-permission-mode'
|
|
6
10
|
import { useChatScroll } from '#~/hooks/chat/use-chat-scroll'
|
|
7
11
|
import { useChatSessionActions } from '#~/hooks/chat/use-chat-session-actions'
|
|
@@ -10,35 +14,31 @@ import type { SessionInfo } from '@vibe-forge/types'
|
|
|
10
14
|
import { CurrentTodoList } from './CurrentTodoList'
|
|
11
15
|
import { NewSessionGuide } from './NewSessionGuide'
|
|
12
16
|
import { MessageItem } from './messages/MessageItem'
|
|
17
|
+
import { buildMessageTurns } from './messages/message-turns'
|
|
13
18
|
import { processMessages } from './messages/message-utils'
|
|
14
19
|
import { Sender } from './sender/Sender'
|
|
15
20
|
import { ToolGroup } from './tools/core/ToolGroup'
|
|
16
21
|
|
|
17
|
-
interface ModelSelectOption {
|
|
18
|
-
value: string
|
|
19
|
-
label: React.ReactNode
|
|
20
|
-
searchText: string
|
|
21
|
-
displayLabel: string
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
interface ModelSelectGroup {
|
|
25
|
-
label: React.ReactNode
|
|
26
|
-
options: ModelSelectOption[]
|
|
27
|
-
}
|
|
28
|
-
|
|
29
22
|
export function ChatHistoryView({
|
|
30
23
|
isReady,
|
|
31
24
|
messages,
|
|
32
25
|
session,
|
|
26
|
+
targetMessageId,
|
|
27
|
+
targetToolUseId,
|
|
33
28
|
sessionInfo,
|
|
34
|
-
|
|
29
|
+
errorBanner,
|
|
35
30
|
onRetryConnection,
|
|
36
31
|
interactionRequest,
|
|
37
32
|
onInteractionResponse,
|
|
38
33
|
setMessages,
|
|
39
34
|
onClearMessages,
|
|
40
35
|
placeholder,
|
|
41
|
-
|
|
36
|
+
modelMenuGroups,
|
|
37
|
+
modelSearchOptions,
|
|
38
|
+
recommendedModelOptions,
|
|
39
|
+
servicePreviewModelOptions,
|
|
40
|
+
onToggleRecommendedModel,
|
|
41
|
+
updatingRecommendedModelValue,
|
|
42
42
|
selectedModel,
|
|
43
43
|
modelForQuery,
|
|
44
44
|
onModelChange,
|
|
@@ -57,15 +57,22 @@ export function ChatHistoryView({
|
|
|
57
57
|
isReady: boolean
|
|
58
58
|
messages: ChatMessage[]
|
|
59
59
|
session?: Session
|
|
60
|
+
targetMessageId?: string
|
|
61
|
+
targetToolUseId?: string
|
|
60
62
|
sessionInfo: SessionInfo | null
|
|
61
|
-
|
|
63
|
+
errorBanner?: ChatErrorBannerState | null
|
|
62
64
|
onRetryConnection: () => void
|
|
63
65
|
interactionRequest: { id: string; payload: AskUserQuestionParams } | null
|
|
64
66
|
onInteractionResponse: (id: string, data: string | string[]) => void
|
|
65
67
|
setMessages: React.Dispatch<React.SetStateAction<ChatMessage[]>>
|
|
66
68
|
onClearMessages: () => void
|
|
67
69
|
placeholder?: string
|
|
68
|
-
|
|
70
|
+
modelMenuGroups: ModelSelectMenuGroup[]
|
|
71
|
+
modelSearchOptions: ModelSelectOption[]
|
|
72
|
+
recommendedModelOptions: ModelSelectOption[]
|
|
73
|
+
servicePreviewModelOptions: ModelSelectOption[]
|
|
74
|
+
onToggleRecommendedModel: (option: ModelSelectOption) => void | Promise<void>
|
|
75
|
+
updatingRecommendedModelValue?: string
|
|
69
76
|
selectedModel?: string
|
|
70
77
|
modelForQuery?: string
|
|
71
78
|
onModelChange: (model: string) => void
|
|
@@ -82,10 +89,21 @@ export function ChatHistoryView({
|
|
|
82
89
|
hasAvailableModels: boolean
|
|
83
90
|
}) {
|
|
84
91
|
const { t } = useTranslation()
|
|
92
|
+
const { message } = App.useApp()
|
|
93
|
+
const location = useLocation()
|
|
85
94
|
const { messagesEndRef, messagesContainerRef, messagesContentRef, showScrollBottom, scrollToBottom } = useChatScroll({
|
|
86
95
|
messagesLength: messages.length
|
|
87
96
|
})
|
|
88
|
-
const {
|
|
97
|
+
const {
|
|
98
|
+
isCreating,
|
|
99
|
+
send,
|
|
100
|
+
sendContent,
|
|
101
|
+
editMessage,
|
|
102
|
+
forkMessage,
|
|
103
|
+
interrupt,
|
|
104
|
+
clearMessages,
|
|
105
|
+
recallMessage
|
|
106
|
+
} = useChatSessionActions({
|
|
89
107
|
session,
|
|
90
108
|
modelForQuery,
|
|
91
109
|
hasAvailableModels,
|
|
@@ -95,6 +113,10 @@ export function ChatHistoryView({
|
|
|
95
113
|
onClearMessages
|
|
96
114
|
})
|
|
97
115
|
const initialScrollDoneRef = useRef(false)
|
|
116
|
+
const handledHashAnchorIdRef = useRef('')
|
|
117
|
+
const handledTargetScrollKeyRef = useRef('')
|
|
118
|
+
const [editingMessageId, setEditingMessageId] = useState<string | null>(null)
|
|
119
|
+
const [expandedTurnIds, setExpandedTurnIds] = useState<Set<string>>(new Set())
|
|
98
120
|
const buildUserMessage = (content: string | ChatMessageContent[]): ChatMessage => {
|
|
99
121
|
const id = globalThis.crypto?.randomUUID
|
|
100
122
|
? globalThis.crypto.randomUUID()
|
|
@@ -141,19 +163,269 @@ export function ChatHistoryView({
|
|
|
141
163
|
}
|
|
142
164
|
useEffect(() => {
|
|
143
165
|
initialScrollDoneRef.current = false
|
|
166
|
+
handledHashAnchorIdRef.current = ''
|
|
167
|
+
handledTargetScrollKeyRef.current = ''
|
|
168
|
+
setEditingMessageId(null)
|
|
169
|
+
setExpandedTurnIds(new Set())
|
|
144
170
|
}, [session?.id])
|
|
145
171
|
useEffect(() => {
|
|
146
|
-
if (!initialScrollDoneRef.current && isReady) {
|
|
172
|
+
if (!initialScrollDoneRef.current && isReady && location.hash === '') {
|
|
147
173
|
scrollToBottom('auto')
|
|
148
174
|
initialScrollDoneRef.current = true
|
|
149
175
|
}
|
|
150
|
-
}, [isReady, messages.length, scrollToBottom])
|
|
176
|
+
}, [isReady, location.hash, messages.length, scrollToBottom])
|
|
151
177
|
useEffect(() => {
|
|
152
|
-
if (!showScrollBottom) {
|
|
178
|
+
if (location.hash === '' && !showScrollBottom) {
|
|
153
179
|
scrollToBottom('auto')
|
|
154
180
|
}
|
|
155
|
-
}, [messages.length, scrollToBottom, showScrollBottom])
|
|
181
|
+
}, [location.hash, messages.length, scrollToBottom, showScrollBottom])
|
|
182
|
+
const handleStartEditing = (messageId: string) => {
|
|
183
|
+
let isBlocked = false
|
|
184
|
+
|
|
185
|
+
setEditingMessageId((current) => {
|
|
186
|
+
if (current != null && current !== messageId) {
|
|
187
|
+
isBlocked = true
|
|
188
|
+
return current
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
return messageId
|
|
192
|
+
})
|
|
193
|
+
|
|
194
|
+
if (isBlocked) {
|
|
195
|
+
void message.warning(t('chat.messageActions.editInProgress'))
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
const isInlineEditing = editingMessageId != null
|
|
156
199
|
const renderItems = useMemo(() => processMessages(messages), [messages])
|
|
200
|
+
const hashAnchorId = useMemo(() => decodeURIComponent(location.hash.replace(/^#/, '')), [location.hash])
|
|
201
|
+
const targetAnchorId = useMemo(() => {
|
|
202
|
+
if (targetToolUseId != null && targetToolUseId !== '') {
|
|
203
|
+
const targetToolGroup = renderItems.find((item) => {
|
|
204
|
+
return item.type === 'tool-group' && item.items.some(toolItem => toolItem.item.id === targetToolUseId)
|
|
205
|
+
})
|
|
206
|
+
return targetToolGroup?.anchorId ?? ''
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
if (targetMessageId != null && targetMessageId !== '') {
|
|
210
|
+
const targetMessage = renderItems.find((item) => {
|
|
211
|
+
return item.type === 'message' && item.originalMessage.id === targetMessageId
|
|
212
|
+
})
|
|
213
|
+
return targetMessage?.anchorId ?? ''
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
return ''
|
|
217
|
+
}, [renderItems, targetMessageId, targetToolUseId])
|
|
218
|
+
const messageTurns = useMemo(() =>
|
|
219
|
+
buildMessageTurns({
|
|
220
|
+
renderItems,
|
|
221
|
+
expandedTurnIds,
|
|
222
|
+
hashAnchorId: hashAnchorId !== '' ? hashAnchorId : targetAnchorId,
|
|
223
|
+
keepLastTurnExpanded: isCreating || session?.status === 'running' || session?.status === 'waiting_input'
|
|
224
|
+
}), [expandedTurnIds, hashAnchorId, isCreating, renderItems, session?.status, targetAnchorId])
|
|
225
|
+
const lastAssistantActionAnchorId = useMemo(() => {
|
|
226
|
+
for (let index = renderItems.length - 1; index >= 0; index -= 1) {
|
|
227
|
+
const item = renderItems[index]
|
|
228
|
+
if (item == null) continue
|
|
229
|
+
if (item.type === 'tool-group') continue
|
|
230
|
+
if (item.message.role === 'user') continue
|
|
231
|
+
return item.anchorId
|
|
232
|
+
}
|
|
233
|
+
return null
|
|
234
|
+
}, [renderItems])
|
|
235
|
+
|
|
236
|
+
useEffect(() => {
|
|
237
|
+
const hash = hashAnchorId
|
|
238
|
+
if (hash === '') {
|
|
239
|
+
handledHashAnchorIdRef.current = ''
|
|
240
|
+
return
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
if (!isReady || handledHashAnchorIdRef.current === hash) return
|
|
244
|
+
|
|
245
|
+
let removeHighlightTimer: ReturnType<typeof setTimeout> | null = null
|
|
246
|
+
let retryTimer: ReturnType<typeof setTimeout> | null = null
|
|
247
|
+
let frameId: number | null = null
|
|
248
|
+
|
|
249
|
+
const scrollToAnchor = () => {
|
|
250
|
+
const target = document.getElementById(hash)
|
|
251
|
+
if (target == null) {
|
|
252
|
+
return false
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
handledHashAnchorIdRef.current = hash
|
|
256
|
+
target.scrollIntoView({ block: 'center', behavior: 'auto' })
|
|
257
|
+
target.classList.add('is-anchor-target')
|
|
258
|
+
removeHighlightTimer = setTimeout(() => {
|
|
259
|
+
target.classList.remove('is-anchor-target')
|
|
260
|
+
}, 1800)
|
|
261
|
+
return true
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
if (!scrollToAnchor()) {
|
|
265
|
+
frameId = requestAnimationFrame(() => {
|
|
266
|
+
if (!scrollToAnchor()) {
|
|
267
|
+
retryTimer = setTimeout(() => {
|
|
268
|
+
void scrollToAnchor()
|
|
269
|
+
}, 120)
|
|
270
|
+
}
|
|
271
|
+
})
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
return () => {
|
|
275
|
+
if (frameId != null) {
|
|
276
|
+
cancelAnimationFrame(frameId)
|
|
277
|
+
}
|
|
278
|
+
if (retryTimer != null) {
|
|
279
|
+
clearTimeout(retryTimer)
|
|
280
|
+
}
|
|
281
|
+
if (removeHighlightTimer != null) {
|
|
282
|
+
clearTimeout(removeHighlightTimer)
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}, [hashAnchorId, isReady, messageTurns])
|
|
286
|
+
|
|
287
|
+
useEffect(() => {
|
|
288
|
+
const targetAttr = targetToolUseId != null && targetToolUseId !== ''
|
|
289
|
+
? { key: 'data-tool-use-id', value: targetToolUseId, targetKey: `tool:${targetToolUseId}` }
|
|
290
|
+
: targetMessageId != null && targetMessageId !== ''
|
|
291
|
+
? { key: 'data-message-id', value: targetMessageId, targetKey: `message:${targetMessageId}` }
|
|
292
|
+
: undefined
|
|
293
|
+
if (targetAttr == null) {
|
|
294
|
+
handledTargetScrollKeyRef.current = ''
|
|
295
|
+
return
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
if (handledTargetScrollKeyRef.current === targetAttr.targetKey) {
|
|
299
|
+
return
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
const frame = window.requestAnimationFrame(() => {
|
|
303
|
+
const container = messagesContentRef.current
|
|
304
|
+
if (container == null) {
|
|
305
|
+
return
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
const target = Array.from(container.querySelectorAll<HTMLElement>(`[${targetAttr.key}]`))
|
|
309
|
+
.find(element => element.getAttribute(targetAttr.key) === targetAttr.value)
|
|
310
|
+
if (target == null) {
|
|
311
|
+
return
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
handledTargetScrollKeyRef.current = targetAttr.targetKey
|
|
315
|
+
target.scrollIntoView({ block: 'center', behavior: 'smooth' })
|
|
316
|
+
})
|
|
317
|
+
|
|
318
|
+
return () => {
|
|
319
|
+
window.cancelAnimationFrame(frame)
|
|
320
|
+
}
|
|
321
|
+
}, [messageTurns, messagesContentRef, targetMessageId, targetToolUseId])
|
|
322
|
+
|
|
323
|
+
const toggleTurnCollapsed = (turnId: string) => {
|
|
324
|
+
setExpandedTurnIds((prev) => {
|
|
325
|
+
const next = new Set(prev)
|
|
326
|
+
if (next.has(turnId)) {
|
|
327
|
+
next.delete(turnId)
|
|
328
|
+
} else {
|
|
329
|
+
next.add(turnId)
|
|
330
|
+
}
|
|
331
|
+
return next
|
|
332
|
+
})
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
const formatTurnDuration = (durationMs: number | null) => {
|
|
336
|
+
if (durationMs == null) return null
|
|
337
|
+
const totalSeconds = Math.floor(durationMs / 1000)
|
|
338
|
+
if (totalSeconds <= 0) {
|
|
339
|
+
return t('chat.turnDurationUnderSecond')
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
const hours = Math.floor(totalSeconds / 3600)
|
|
343
|
+
const minutes = Math.floor((totalSeconds % 3600) / 60)
|
|
344
|
+
const seconds = totalSeconds % 60
|
|
345
|
+
|
|
346
|
+
if (hours > 0) {
|
|
347
|
+
return [
|
|
348
|
+
t('chat.turnDurationHours', { count: hours }),
|
|
349
|
+
minutes > 0 ? t('chat.turnDurationMinutes', { count: minutes }) : null
|
|
350
|
+
].filter(Boolean).join(' ')
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
if (minutes > 0) {
|
|
354
|
+
return [
|
|
355
|
+
t('chat.turnDurationMinutes', { count: minutes }),
|
|
356
|
+
seconds > 0 ? t('chat.turnDurationSeconds', { count: seconds }) : null
|
|
357
|
+
].filter(Boolean).join(' ')
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
return t('chat.turnDurationSeconds', { count: seconds })
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
const renderTurnSummary = (turn: (typeof messageTurns)[number]) => (
|
|
364
|
+
<div className={`chat-turn-summary ${turn.isCollapsed ? 'is-collapsed' : 'is-expanded'}`}>
|
|
365
|
+
<div className='chat-turn-summary__content'>
|
|
366
|
+
<div className='chat-turn-summary__meta'>
|
|
367
|
+
{formatTurnDuration(turn.durationMs) != null && (
|
|
368
|
+
<span className='chat-turn-summary__time'>
|
|
369
|
+
{t('chat.turnProcessedDuration', { duration: formatTurnDuration(turn.durationMs) })}
|
|
370
|
+
</span>
|
|
371
|
+
)}
|
|
372
|
+
<span className='chat-turn-summary__count'>
|
|
373
|
+
{t('chat.turnSummaryCount', { count: turn.hiddenCount })}
|
|
374
|
+
</span>
|
|
375
|
+
</div>
|
|
376
|
+
<button
|
|
377
|
+
type='button'
|
|
378
|
+
className='chat-turn-summary__toggle'
|
|
379
|
+
aria-expanded={!turn.isCollapsed}
|
|
380
|
+
onClick={() => toggleTurnCollapsed(turn.id)}
|
|
381
|
+
>
|
|
382
|
+
<span className='material-symbols-rounded'>
|
|
383
|
+
chevron_right
|
|
384
|
+
</span>
|
|
385
|
+
</button>
|
|
386
|
+
</div>
|
|
387
|
+
</div>
|
|
388
|
+
)
|
|
389
|
+
|
|
390
|
+
const renderTurnItem = (item: (typeof renderItems)[number], key?: string) => {
|
|
391
|
+
if (item.type === 'message') {
|
|
392
|
+
return (
|
|
393
|
+
<MessageItem
|
|
394
|
+
key={key ?? item.anchorId}
|
|
395
|
+
anchorId={item.anchorId}
|
|
396
|
+
msg={item.message}
|
|
397
|
+
isFirstInGroup={item.isFirstInGroup}
|
|
398
|
+
isTargeted={item.originalMessage.id === targetMessageId}
|
|
399
|
+
originalMessage={item.originalMessage}
|
|
400
|
+
sessionInfo={sessionInfo}
|
|
401
|
+
isEditing={editingMessageId === item.originalMessage.id}
|
|
402
|
+
isSessionBusy={isCreating || session?.status === 'running' ||
|
|
403
|
+
session?.status === 'waiting_input'}
|
|
404
|
+
showAssistantActions={item.anchorId === lastAssistantActionAnchorId}
|
|
405
|
+
onEditMessage={editMessage}
|
|
406
|
+
onForkMessage={forkMessage}
|
|
407
|
+
onRecallMessage={recallMessage}
|
|
408
|
+
onStartEditing={handleStartEditing}
|
|
409
|
+
onCancelEditing={(messageId) => {
|
|
410
|
+
setEditingMessageId((current) => current === messageId ? null : current)
|
|
411
|
+
}}
|
|
412
|
+
sessionId={session?.id}
|
|
413
|
+
/>
|
|
414
|
+
)
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
return (
|
|
418
|
+
<ToolGroup
|
|
419
|
+
key={key ?? item.id}
|
|
420
|
+
anchorId={item.anchorId}
|
|
421
|
+
items={item.items}
|
|
422
|
+
originalMessage={item.originalMessage}
|
|
423
|
+
sessionId={session?.id}
|
|
424
|
+
targetToolUseId={targetToolUseId}
|
|
425
|
+
footer={item.footer}
|
|
426
|
+
/>
|
|
427
|
+
)
|
|
428
|
+
}
|
|
157
429
|
|
|
158
430
|
return (
|
|
159
431
|
<>
|
|
@@ -165,26 +437,31 @@ export function ChatHistoryView({
|
|
|
165
437
|
<span>{t('common.creatingChat')}</span>
|
|
166
438
|
</div>
|
|
167
439
|
)}
|
|
168
|
-
{
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
<
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
440
|
+
{messageTurns.map((turn) => (
|
|
441
|
+
turn.isExpandable
|
|
442
|
+
? (
|
|
443
|
+
<div key={turn.id} className={`chat-turn ${turn.isCollapsed ? 'is-collapsed' : 'is-expanded'}`}>
|
|
444
|
+
{renderTurnItem(turn.items[0]!, `${turn.id}:leading`)}
|
|
445
|
+
<div className={`chat-turn__summary-region ${turn.isCollapsed ? 'is-collapsed' : 'is-expanded'}`}>
|
|
446
|
+
{renderTurnSummary(turn)}
|
|
447
|
+
<div
|
|
448
|
+
className={`chat-turn__collapsible ${turn.isCollapsed ? 'is-collapsed' : 'is-expanded'}`}
|
|
449
|
+
aria-hidden={turn.isCollapsed}
|
|
450
|
+
>
|
|
451
|
+
<div className='chat-turn__collapsible-inner'>
|
|
452
|
+
{turn.items.slice(1, -1).map((item) => renderTurnItem(item))}
|
|
453
|
+
</div>
|
|
454
|
+
</div>
|
|
455
|
+
</div>
|
|
456
|
+
{renderTurnItem(turn.items[turn.items.length - 1]!, `${turn.id}:trailing`)}
|
|
457
|
+
</div>
|
|
176
458
|
)
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
items={item.items}
|
|
182
|
-
footer={item.footer}
|
|
183
|
-
/>
|
|
459
|
+
: (
|
|
460
|
+
<React.Fragment key={turn.id}>
|
|
461
|
+
{turn.items.map((item) => renderTurnItem(item))}
|
|
462
|
+
</React.Fragment>
|
|
184
463
|
)
|
|
185
|
-
|
|
186
|
-
return null
|
|
187
|
-
})}
|
|
464
|
+
))}
|
|
188
465
|
<div ref={messagesEndRef} />
|
|
189
466
|
</div>
|
|
190
467
|
|
|
@@ -202,35 +479,42 @@ export function ChatHistoryView({
|
|
|
202
479
|
)}
|
|
203
480
|
|
|
204
481
|
<CurrentTodoList messages={messages} />
|
|
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
|
-
|
|
482
|
+
{!isInlineEditing && (
|
|
483
|
+
<div className='sender-container'>
|
|
484
|
+
<Sender
|
|
485
|
+
onSend={handleSend}
|
|
486
|
+
onSendContent={handleSendContent}
|
|
487
|
+
adapterLocked={session?.id != null}
|
|
488
|
+
sessionStatus={isCreating ? 'running' : session?.status}
|
|
489
|
+
onInterrupt={interrupt}
|
|
490
|
+
onClear={clearMessages}
|
|
491
|
+
sessionInfo={sessionInfo}
|
|
492
|
+
errorBanner={errorBanner}
|
|
493
|
+
onRetryConnection={onRetryConnection}
|
|
494
|
+
interactionRequest={interactionRequest}
|
|
495
|
+
onInteractionResponse={onInteractionResponse}
|
|
496
|
+
placeholder={placeholder}
|
|
497
|
+
modelMenuGroups={modelMenuGroups}
|
|
498
|
+
modelSearchOptions={modelSearchOptions}
|
|
499
|
+
recommendedModelOptions={recommendedModelOptions}
|
|
500
|
+
servicePreviewModelOptions={servicePreviewModelOptions}
|
|
501
|
+
onToggleRecommendedModel={onToggleRecommendedModel}
|
|
502
|
+
updatingRecommendedModelValue={updatingRecommendedModelValue}
|
|
503
|
+
selectedModel={selectedModel}
|
|
504
|
+
onModelChange={onModelChange}
|
|
505
|
+
effort={effort}
|
|
506
|
+
effortOptions={effortOptions}
|
|
507
|
+
onEffortChange={onEffortChange}
|
|
508
|
+
permissionMode={permissionMode}
|
|
509
|
+
permissionModeOptions={permissionModeOptions}
|
|
510
|
+
onPermissionModeChange={onPermissionModeChange}
|
|
511
|
+
selectedAdapter={selectedAdapter}
|
|
512
|
+
adapterOptions={adapterOptions}
|
|
513
|
+
onAdapterChange={onAdapterChange}
|
|
514
|
+
modelUnavailable={modelUnavailable}
|
|
515
|
+
/>
|
|
516
|
+
</div>
|
|
517
|
+
)}
|
|
234
518
|
</>
|
|
235
519
|
)
|
|
236
520
|
}
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import type { Session } from '@vibe-forge/core'
|
|
2
|
+
import type { SessionInfo } from '@vibe-forge/types'
|
|
2
3
|
|
|
3
4
|
import { SessionSettingsPanel } from './ChatHeader'
|
|
4
5
|
|
|
5
6
|
export function ChatSettingsView({
|
|
6
7
|
session,
|
|
8
|
+
sessionInfo,
|
|
7
9
|
onClose
|
|
8
10
|
}: {
|
|
9
11
|
session: Session
|
|
12
|
+
sessionInfo: SessionInfo | null
|
|
10
13
|
onClose: () => void
|
|
11
14
|
}) {
|
|
12
15
|
return (
|
|
13
16
|
<div className='chat-settings-panel'>
|
|
14
17
|
<SessionSettingsPanel
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
initialTags={session.tags}
|
|
18
|
+
session={session}
|
|
19
|
+
sessionInfo={sessionInfo}
|
|
18
20
|
onClose={onClose}
|
|
19
21
|
/>
|
|
20
22
|
</div>
|