@vibe-forge/client 0.8.4 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +75 -0
- package/dist/assets/abap-DLDM7-KI.js +1 -0
- package/dist/assets/apex-DNDY2TF8.js +1 -0
- package/dist/assets/{arc-DCuZPvAs.js → arc-CCXV7u3V.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-C39d7-Bu.js → blockDiagram-c4efeb88-Bm52FmvT.js} +1 -1
- package/dist/assets/{c4Diagram-c83219d4-jWPBJdeq.js → c4Diagram-c83219d4-C8tTEpcK.js} +1 -1
- package/dist/assets/cameligo-Bf6VGUru.js +1 -0
- package/dist/assets/channel-gq_WMRvv.js +1 -0
- package/dist/assets/{classDiagram-beda092f-Bo7Yvv2T.js → classDiagram-beda092f-CNAIBAH1.js} +1 -1
- package/dist/assets/{classDiagram-v2-2358418a-DfoCP9XM.js → classDiagram-v2-2358418a-BHeZAVdc.js} +1 -1
- package/dist/assets/clojure-Dnu-v4kV.js +1 -0
- package/dist/assets/clone-XxGY7A5N.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-8_Ez5rxh.js → createText-1719965b-BS2hLG8t.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-WHcTFAOU.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-BEegO-R-.js → edges-96097737-C07f4iWA.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-derRgkLz.js → erDiagram-0228fc6a-BytsAWUs.js} +1 -1
- package/dist/assets/flow9-BeJ5waoc.js +1 -0
- package/dist/assets/{flowDb-c6c81e3f-ChtOxgsJ.js → flowDb-c6c81e3f-CQJkOpAs.js} +1 -1
- package/dist/assets/{flowDiagram-50d868cf-Bm4ufmmA.js → flowDiagram-50d868cf-CD5Tng2S.js} +1 -1
- package/dist/assets/flowDiagram-v2-4f6560a1-DIBOANLV.js +1 -0
- package/dist/assets/{flowchart-elk-definition-6af322e1-BRYLO-BL.js → flowchart-elk-definition-6af322e1-ylso-GWH.js} +1 -1
- package/dist/assets/freemarker2-U_9Jyyr3.js +3 -0
- package/dist/assets/fsharp-PahG7c26.js +1 -0
- package/dist/assets/{ganttDiagram-a2739b55-CbP6dzRO.js → ganttDiagram-a2739b55-Cg98bJx5.js} +1 -1
- package/dist/assets/{gitGraphDiagram-82fe8481-Du44v02s.js → gitGraphDiagram-82fe8481-7Yp4hz0N.js} +1 -1
- package/dist/assets/go-acbASCJo.js +1 -0
- package/dist/assets/{graph-0_VzJX6O.js → graph-Ig3nvzvL.js} +1 -1
- package/dist/assets/graphql-BxJiqAUM.js +1 -0
- package/dist/assets/handlebars-DQyCBwHe.js +1 -0
- package/dist/assets/hcl-DtV1sZF8.js +1 -0
- package/dist/assets/html-CNC2AT5k.js +1 -0
- package/dist/assets/html.worker-BLJhxQJQ.js +470 -0
- package/dist/assets/htmlMode-DlATk4xW.js +1 -0
- package/dist/assets/{index-5325376f-DLP7F7of.js → index-5325376f-C4zed9sb.js} +1 -1
- package/dist/assets/index-DRLsOoqb.css +32 -0
- package/dist/assets/index-Dbx0JG0p.js +1511 -0
- package/dist/assets/{infoDiagram-8eee0895-DY19rRl6.js → infoDiagram-8eee0895-C8oSBaFs.js} +1 -1
- package/dist/assets/ini-Kd9XrMLS.js +1 -0
- package/dist/assets/java-CXBNlu9o.js +1 -0
- package/dist/assets/javascript-9wv9uKW4.js +1 -0
- package/dist/assets/{journeyDiagram-c64418c1-4Asnwc86.js → journeyDiagram-c64418c1-D5kJldvy.js} +1 -1
- package/dist/assets/json.worker-usMZ-FED.js +58 -0
- package/dist/assets/jsonMode-45dv39mU.js +7 -0
- package/dist/assets/julia-cl7-CwDS.js +1 -0
- package/dist/assets/kotlin-s7OhZKlX.js +1 -0
- package/dist/assets/{layout-BILp7GjD.js → layout-DYNFLnIl.js} +1 -1
- package/dist/assets/less-9HpZscsL.js +2 -0
- package/dist/assets/lexon-OrD6JF1K.js +1 -0
- package/dist/assets/{line-D0Xqr8mi.js → line-1gvOYQYZ.js} +1 -1
- package/dist/assets/{linear-LpL8RZsq.js → linear-DHGm6Zdw.js} +1 -1
- package/dist/assets/liquid-BGoxrdXO.js +1 -0
- package/dist/assets/lspLanguageFeatures-CpCCXhrd.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-Dc2iMbEw.js +1 -0
- package/dist/assets/{mermaid.core-Bk0Y_0sz.js → mermaid.core-Cq2bBFF1.js} +6 -6
- package/dist/assets/{mindmap-definition-8da855dc-eCAgn5kY.js → mindmap-definition-8da855dc-y5l6GRVh.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-BeGFFS1p.js → pieDiagram-a8764435-PNROcv9y.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-DjYAge7h.js +1 -0
- package/dist/assets/qsharp-Bw9ernYp.js +1 -0
- package/dist/assets/{quadrantDiagram-1e28029f-tLqbYOHC.js → quadrantDiagram-1e28029f-CFJ3VPpp.js} +1 -1
- package/dist/assets/r-j7ic8hl3.js +1 -0
- package/dist/assets/razor-OIY8fx_i.js +1 -0
- package/dist/assets/redis-Bu5POkcn.js +1 -0
- package/dist/assets/redshift-Bs9aos_-.js +1 -0
- package/dist/assets/{requirementDiagram-08caed73-DCverr_g.js → requirementDiagram-08caed73-BpzDIINS.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-DidhF5PL.js → sankeyDiagram-a04cb91d-CH69-iIn.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-CEKaiwTo.js → sequenceDiagram-c5b8d532-yBBEeVFU.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-Cj9ZY7RH.js → stateDiagram-1ecb1508-BvF4sign.js} +1 -1
- package/dist/assets/{stateDiagram-v2-c2b004d7-Gsmps-dk.js → stateDiagram-v2-c2b004d7-BeyT7Ghx.js} +1 -1
- package/dist/assets/{styles-b4e223ce-D7E8Th0j.js → styles-b4e223ce-C58zxmK6.js} +1 -1
- package/dist/assets/{styles-ca3715f6-tTC26Jsm.js → styles-ca3715f6-DCE5sFi5.js} +1 -1
- package/dist/assets/{styles-d45a18b0-Bf6oqNdR.js → styles-d45a18b0-CG-C1aM8.js} +1 -1
- package/dist/assets/{svgDrawCommon-b86b1483-BxKi01m2.js → svgDrawCommon-b86b1483-F-K8GeDd.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-D6PePEip.js → timeline-definition-faaaa080-DPv4uqVX.js} +1 -1
- package/dist/assets/ts.worker-DGHjMaqB.js +67731 -0
- package/dist/assets/tsMode-BtU8ZELV.js +11 -0
- package/dist/assets/twig-Csy3S7wG.js +1 -0
- package/dist/assets/typescript-CJHgISWo.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-C_TJw4Bi.js +1 -0
- package/dist/assets/{xychartDiagram-f5964ef8-BuP4qfXm.js → xychartDiagram-f5964ef8-BmXlhBzX.js} +1 -1
- package/dist/assets/yaml-BujeJOJ6.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 +284 -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 +147 -10
- package/src/components/chat/messages/MessageItem.tsx +378 -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/interaction-request.ts +5 -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 +8 -605
- package/src/components/chat/sender/Sender.tsx +54 -880
- 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 +97 -56
- 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 +104 -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 +165 -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 +151 -6
- package/src/resources/locales/zh.json +151 -6
- package/src/routes/ChatRoute.scss +159 -4
- package/src/routes/ChatRoute.tsx +43 -9
- 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-bLjHfx-Q.js +0 -1
- package/dist/assets/clone-upfY39Je.js +0 -1
- package/dist/assets/flowDiagram-v2-4f6560a1-F66FzZTY.js +0 -1
- package/dist/assets/index-C1O04Df8.js +0 -557
- package/dist/assets/index-sE8VA1N7.css +0 -1
- 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
|
@@ -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-Bk0Y_0sz.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-0_VzJX6O.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-ChtOxgsJ.js";import{f as a,g as t}from"./styles-d45a18b0-Bf6oqNdR.js";import{ar as i}from"./mermaid.core-Bk0Y_0sz.js";import"./graph-0_VzJX6O.js";import"./layout-BILp7GjD.js";import"./index-C1O04Df8.js";import"./index-5325376f-DLP7F7of.js";import"./clone-upfY39Je.js";import"./edges-96097737-BEegO-R-.js";import"./createText-1719965b-8_Ez5rxh.js";import"./line-D0Xqr8mi.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./channel-bLjHfx-Q.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};
|