@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
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { getClientBase } from '#~/runtime-config.js'
|
|
2
|
+
|
|
3
|
+
const normalizeSessionPath = (sessionId: string) => `${getClientBase()}/session/${sessionId}`
|
|
4
|
+
|
|
5
|
+
export const getMessageAnchorId = (messageId: string, part?: string) => {
|
|
6
|
+
const suffix = part?.trim()
|
|
7
|
+
return suffix != null && suffix !== '' ? `message-${messageId}-${suffix}` : `message-${messageId}`
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const buildSessionUrl = (
|
|
11
|
+
sessionId: string,
|
|
12
|
+
options?: {
|
|
13
|
+
anchorId?: string
|
|
14
|
+
}
|
|
15
|
+
) => {
|
|
16
|
+
const url = new URL(globalThis.location.origin)
|
|
17
|
+
url.pathname = normalizeSessionPath(sessionId)
|
|
18
|
+
url.search = ''
|
|
19
|
+
url.hash = options?.anchorId != null && options.anchorId !== '' ? `#${options.anchorId}` : ''
|
|
20
|
+
return url.toString()
|
|
21
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export async function copyTextWithFeedback(params: {
|
|
2
|
+
failureMessage: string
|
|
3
|
+
messageApi: {
|
|
4
|
+
error: (content: string) => unknown
|
|
5
|
+
success: (content: string) => unknown
|
|
6
|
+
}
|
|
7
|
+
successMessage: string
|
|
8
|
+
text: string
|
|
9
|
+
}) {
|
|
10
|
+
try {
|
|
11
|
+
await navigator.clipboard.writeText(params.text)
|
|
12
|
+
void params.messageApi.success(params.successMessage)
|
|
13
|
+
return true
|
|
14
|
+
} catch {
|
|
15
|
+
void params.messageApi.error(params.failureMessage)
|
|
16
|
+
return false
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -8,6 +8,14 @@ export interface ShortcutSpec {
|
|
|
8
8
|
shiftKey: boolean
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
export interface ShortcutDisplayToken {
|
|
12
|
+
value: string
|
|
13
|
+
compact: boolean
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const SEND_SHORTCUT_DEFAULT = 'cmd+enter'
|
|
17
|
+
export const SEND_SHORTCUT_INVALID_FALLBACK = 'enter'
|
|
18
|
+
|
|
11
19
|
const normalizeKey = (key: string) => {
|
|
12
20
|
if (key === ' ') return 'space'
|
|
13
21
|
return key.toLowerCase()
|
|
@@ -55,11 +63,83 @@ export const formatShortcutLabel = (shortcut: string | undefined, isMac: boolean
|
|
|
55
63
|
if (lower === 'alt' || lower === 'option') return 'Alt'
|
|
56
64
|
if (lower === 'shift') return 'Shift'
|
|
57
65
|
if (lower === 'space') return 'Space'
|
|
66
|
+
if (lower === 'enter') return 'Enter'
|
|
67
|
+
if (lower === 'escape' || lower === 'esc') return 'Esc'
|
|
68
|
+
if (lower === 'tab') return 'Tab'
|
|
69
|
+
if (lower === 'backspace') return 'Backspace'
|
|
70
|
+
if (lower === 'delete' || lower === 'del') return 'Delete'
|
|
71
|
+
if (lower === 'arrowup') return 'Up'
|
|
72
|
+
if (lower === 'arrowdown') return 'Down'
|
|
73
|
+
if (lower === 'arrowleft') return 'Left'
|
|
74
|
+
if (lower === 'arrowright') return 'Right'
|
|
58
75
|
if (token.length === 1) return token.toUpperCase()
|
|
59
|
-
return token
|
|
76
|
+
return token.charAt(0).toUpperCase() + token.slice(1)
|
|
60
77
|
}).join('+')
|
|
61
78
|
}
|
|
62
79
|
|
|
80
|
+
export const getShortcutDisplayTokens = (shortcut: string | undefined, isMac: boolean): ShortcutDisplayToken[] => {
|
|
81
|
+
if (shortcut == null || shortcut.trim() === '') return []
|
|
82
|
+
|
|
83
|
+
const tokens = shortcut.split('+').map(token => token.trim()).filter(Boolean)
|
|
84
|
+
return tokens.map((token) => {
|
|
85
|
+
const lower = token.toLowerCase()
|
|
86
|
+
|
|
87
|
+
if (lower === 'mod') {
|
|
88
|
+
return { value: isMac ? '⌘' : 'Ctrl', compact: isMac }
|
|
89
|
+
}
|
|
90
|
+
if (lower === 'cmd' || lower === 'command' || lower === 'meta') {
|
|
91
|
+
return { value: '⌘', compact: true }
|
|
92
|
+
}
|
|
93
|
+
if (lower === 'ctrl' || lower === 'control') {
|
|
94
|
+
return { value: isMac ? '⌃' : 'Ctrl', compact: isMac }
|
|
95
|
+
}
|
|
96
|
+
if (lower === 'alt' || lower === 'option') {
|
|
97
|
+
return { value: isMac ? '⌥' : 'Alt', compact: isMac }
|
|
98
|
+
}
|
|
99
|
+
if (lower === 'shift') {
|
|
100
|
+
return { value: isMac ? '⇧' : 'Shift', compact: isMac }
|
|
101
|
+
}
|
|
102
|
+
if (lower === 'space') {
|
|
103
|
+
return { value: 'Space', compact: false }
|
|
104
|
+
}
|
|
105
|
+
if (lower === 'enter') {
|
|
106
|
+
return { value: 'Enter', compact: false }
|
|
107
|
+
}
|
|
108
|
+
if (lower === 'escape' || lower === 'esc') {
|
|
109
|
+
return { value: isMac ? '⎋' : 'Esc', compact: isMac }
|
|
110
|
+
}
|
|
111
|
+
if (lower === 'tab') {
|
|
112
|
+
return { value: isMac ? '⇥' : 'Tab', compact: isMac }
|
|
113
|
+
}
|
|
114
|
+
if (lower === 'backspace') {
|
|
115
|
+
return { value: isMac ? '⌫' : 'Backspace', compact: isMac }
|
|
116
|
+
}
|
|
117
|
+
if (lower === 'delete' || lower === 'del') {
|
|
118
|
+
return { value: isMac ? '⌦' : 'Delete', compact: isMac }
|
|
119
|
+
}
|
|
120
|
+
if (lower === 'arrowup') {
|
|
121
|
+
return { value: '↑', compact: true }
|
|
122
|
+
}
|
|
123
|
+
if (lower === 'arrowdown') {
|
|
124
|
+
return { value: '↓', compact: true }
|
|
125
|
+
}
|
|
126
|
+
if (lower === 'arrowleft') {
|
|
127
|
+
return { value: '←', compact: true }
|
|
128
|
+
}
|
|
129
|
+
if (lower === 'arrowright') {
|
|
130
|
+
return { value: '→', compact: true }
|
|
131
|
+
}
|
|
132
|
+
if (token.length === 1) {
|
|
133
|
+
return { value: token.toUpperCase(), compact: true }
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return {
|
|
137
|
+
value: token.charAt(0).toUpperCase() + token.slice(1),
|
|
138
|
+
compact: false
|
|
139
|
+
}
|
|
140
|
+
})
|
|
141
|
+
}
|
|
142
|
+
|
|
63
143
|
export const isShortcutMatch = (
|
|
64
144
|
e: KeyboardEvent | ReactKeyboardEvent,
|
|
65
145
|
shortcut: string | undefined,
|
|
@@ -86,3 +166,33 @@ export const getShortcutFromEvent = (
|
|
|
86
166
|
tokens.push(key)
|
|
87
167
|
return tokens.join('+')
|
|
88
168
|
}
|
|
169
|
+
|
|
170
|
+
export const normalizeSendShortcut = (shortcut: string | undefined, isMac: boolean) => {
|
|
171
|
+
const parsed = parseShortcut(shortcut, isMac)
|
|
172
|
+
|
|
173
|
+
if (parsed == null || parsed.key !== 'enter' || parsed.altKey || parsed.ctrlKey) {
|
|
174
|
+
return null
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
if (!parsed.metaKey && !parsed.shiftKey) {
|
|
178
|
+
return 'enter'
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
if (!isMac || !parsed.metaKey) {
|
|
182
|
+
return null
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
if (parsed.shiftKey) {
|
|
186
|
+
return 'cmd+shift+enter'
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
return 'cmd+enter'
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export const resolveSendShortcut = (shortcut: string | undefined, isMac: boolean) => {
|
|
193
|
+
if (shortcut == null || shortcut.trim() === '') {
|
|
194
|
+
return isMac ? SEND_SHORTCUT_DEFAULT : SEND_SHORTCUT_INVALID_FALLBACK
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
return normalizeSendShortcut(shortcut, isMac) ?? SEND_SHORTCUT_INVALID_FALLBACK
|
|
198
|
+
}
|
package/src/vite-env.d.ts
CHANGED
package/src/ws.ts
CHANGED
|
@@ -4,16 +4,17 @@ import { getServerHostEnv, getServerPortEnv, getServerWsPath } from '#~/runtime-
|
|
|
4
4
|
|
|
5
5
|
const SERVER_HOST = getServerHostEnv() || window.location.hostname
|
|
6
6
|
const SERVER_PORT = getServerPortEnv() || '8787'
|
|
7
|
-
const
|
|
7
|
+
const WS_PROTOCOL = window.location.protocol === 'https:' ? 'wss' : 'ws'
|
|
8
|
+
const WS_URL = `${WS_PROTOCOL}://${SERVER_HOST}:${SERVER_PORT}${getServerWsPath()}`
|
|
8
9
|
|
|
9
|
-
export interface WSHandlers {
|
|
10
|
+
export interface WSHandlers<TMessage = WSEvent> {
|
|
10
11
|
onOpen?: () => void
|
|
11
|
-
onMessage?: (data:
|
|
12
|
+
onMessage?: (data: TMessage) => void
|
|
12
13
|
onError?: (err: Event) => void
|
|
13
14
|
onClose?: () => void
|
|
14
15
|
}
|
|
15
16
|
|
|
16
|
-
export function createSocket(handlers: WSHandlers
|
|
17
|
+
export function createSocket<TMessage = WSEvent>(handlers: WSHandlers<TMessage>, params?: Record<string, string>) {
|
|
17
18
|
let url = WS_URL
|
|
18
19
|
if (params) {
|
|
19
20
|
const searchParams = new URLSearchParams(params)
|
|
@@ -24,7 +25,7 @@ export function createSocket(handlers: WSHandlers, params?: Record<string, strin
|
|
|
24
25
|
ws.addEventListener('message', (ev) => {
|
|
25
26
|
try {
|
|
26
27
|
const data = JSON.parse(String(ev.data)) as unknown
|
|
27
|
-
handlers.onMessage?.(data as
|
|
28
|
+
handlers.onMessage?.(data as TMessage)
|
|
28
29
|
} catch (e) {
|
|
29
30
|
console.error(e)
|
|
30
31
|
}
|
package/vite.config.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { execFileSync } from 'node:child_process'
|
|
1
2
|
import process from 'node:process'
|
|
2
3
|
import { fileURLToPath } from 'node:url'
|
|
3
4
|
|
|
@@ -8,20 +9,83 @@ const isDev = process.env.__VF_PROJECT_AI_CLIENT_MODE__ === 'dev'
|
|
|
8
9
|
const clientBase = isDev
|
|
9
10
|
? (process.env.__VF_PROJECT_AI_CLIENT_BASE__ ?? '/')
|
|
10
11
|
: '/__VF_PROJECT_AI_CLIENT_BASE__/'
|
|
12
|
+
const repoRoot = fileURLToPath(new URL('../..', import.meta.url))
|
|
13
|
+
|
|
14
|
+
const readGit = (args: string[]) =>
|
|
15
|
+
execFileSync('git', args, {
|
|
16
|
+
cwd: repoRoot,
|
|
17
|
+
encoding: 'utf8',
|
|
18
|
+
stdio: ['ignore', 'pipe', 'ignore']
|
|
19
|
+
}).trim()
|
|
20
|
+
|
|
21
|
+
const resolveDevGitRef = () => {
|
|
22
|
+
try {
|
|
23
|
+
return readGit(['symbolic-ref', '--short', 'HEAD'])
|
|
24
|
+
} catch {
|
|
25
|
+
try {
|
|
26
|
+
return `detached@${readGit(['rev-parse', '--short', 'HEAD'])}`
|
|
27
|
+
} catch {
|
|
28
|
+
return ''
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const devGitRef = isDev ? resolveDevGitRef() : ''
|
|
34
|
+
process.env.__VF_PROJECT_AI_DEV_GIT_REF__ = devGitRef
|
|
35
|
+
const normalizeTitle = (title: string) => title.trim().replace(/\s+\[[^\]]+\]$/, '')
|
|
11
36
|
|
|
12
37
|
export default defineConfig({
|
|
13
38
|
plugins: [
|
|
14
|
-
react()
|
|
39
|
+
react(),
|
|
40
|
+
{
|
|
41
|
+
name: 'vibe-forge-dev-document-title',
|
|
42
|
+
transformIndexHtml(html) {
|
|
43
|
+
if (!isDev || devGitRef === '') {
|
|
44
|
+
return html
|
|
45
|
+
}
|
|
46
|
+
return html.replace(/<title>([^<]*)<\/title>/, (_match, title: string) => {
|
|
47
|
+
return `<title>${normalizeTitle(title)} [${devGitRef}]</title>`
|
|
48
|
+
})
|
|
49
|
+
}
|
|
50
|
+
}
|
|
15
51
|
],
|
|
16
52
|
root: '.',
|
|
17
53
|
base: clientBase,
|
|
18
54
|
resolve: {
|
|
19
|
-
alias:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
55
|
+
alias: [
|
|
56
|
+
{
|
|
57
|
+
find: '@vibe-forge/core/channel',
|
|
58
|
+
replacement: fileURLToPath(new URL('../../packages/core/src/channel.ts', import.meta.url))
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
find: '@vibe-forge/plugin-chrome-devtools/schema',
|
|
62
|
+
replacement: fileURLToPath(new URL('../../packages/plugins/chrome-devtools/src/schema.ts', import.meta.url))
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
find: '@vibe-forge/utils/model-selection',
|
|
66
|
+
replacement: fileURLToPath(new URL('../../packages/utils/src/model-selection.ts', import.meta.url))
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
find: '@vibe-forge/utils/log-level',
|
|
70
|
+
replacement: fileURLToPath(new URL('../../packages/utils/src/log-level.ts', import.meta.url))
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
find: '@vibe-forge/channel-lark',
|
|
74
|
+
replacement: fileURLToPath(new URL('../../packages/channels/lark/src/index.ts', import.meta.url))
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
find: '@vibe-forge/core',
|
|
78
|
+
replacement: fileURLToPath(new URL('../../packages/core/src/index.ts', import.meta.url))
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
find: '@vibe-forge/types',
|
|
82
|
+
replacement: fileURLToPath(new URL('../../packages/types/src/index.ts', import.meta.url))
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
find: '@vibe-forge/utils',
|
|
86
|
+
replacement: fileURLToPath(new URL('../../packages/utils/src/index.ts', import.meta.url))
|
|
87
|
+
}
|
|
88
|
+
],
|
|
25
89
|
conditions: ['browser', '__vibe-forge__', 'module', 'import', 'development']
|
|
26
90
|
},
|
|
27
91
|
server: {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{al as o,am as n}from"./mermaid.core-BR0Qh3Rd.js";const l=(a,r)=>o.lang.round(n.parse(a)[r]);export{l as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as r}from"./graph-D8GCszcN.js";var a=4;function n(o){return r(o,a)}export{n as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as o,p as e}from"./flowDb-c6c81e3f-8Vdx29oZ.js";import{f as a,g as t}from"./styles-d45a18b0-yqL8KH6x.js";import{ar as i}from"./mermaid.core-BR0Qh3Rd.js";import"./graph-D8GCszcN.js";import"./layout-Cw-SwAFD.js";import"./index-DV3eI2aD.js";import"./index-5325376f-OOoAXU1u.js";import"./clone-B065n6L-.js";import"./edges-96097737-CTpq6Ih_.js";import"./createText-1719965b-DuRFplcD.js";import"./line-Q-uZLuUr.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./channel-Di8KkPU4.js";const n={parser:e,db:o,renderer:t,styles:a,init:r=>{r.flowchart||(r.flowchart={}),r.flowchart.arrowMarkerAbsolute=r.arrowMarkerAbsolute,i({flowchart:{arrowMarkerAbsolute:r.arrowMarkerAbsolute}}),t.setConf(r.flowchart),o.clear(),o.setGen("gen-2")}};export{n as diagram};
|