@allbluecn/web-app 0.27.40 → 0.28.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/package.json +1 -1
- package/public/pdfjs/cmaps/78-EUC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/78-EUC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/78-H.bcmap +0 -0
- package/public/pdfjs/cmaps/78-RKSJ-H.bcmap +0 -0
- package/public/pdfjs/cmaps/78-RKSJ-V.bcmap +0 -0
- package/public/pdfjs/cmaps/78-V.bcmap +0 -0
- package/public/pdfjs/cmaps/78ms-RKSJ-H.bcmap +0 -0
- package/public/pdfjs/cmaps/78ms-RKSJ-V.bcmap +0 -0
- package/public/pdfjs/cmaps/83pv-RKSJ-H.bcmap +0 -0
- package/public/pdfjs/cmaps/90ms-RKSJ-H.bcmap +0 -0
- package/public/pdfjs/cmaps/90ms-RKSJ-V.bcmap +0 -0
- package/public/pdfjs/cmaps/90msp-RKSJ-H.bcmap +0 -0
- package/public/pdfjs/cmaps/90msp-RKSJ-V.bcmap +0 -0
- package/public/pdfjs/cmaps/90pv-RKSJ-H.bcmap +0 -0
- package/public/pdfjs/cmaps/90pv-RKSJ-V.bcmap +0 -0
- package/public/pdfjs/cmaps/Add-H.bcmap +0 -0
- package/public/pdfjs/cmaps/Add-RKSJ-H.bcmap +0 -0
- package/public/pdfjs/cmaps/Add-RKSJ-V.bcmap +0 -0
- package/public/pdfjs/cmaps/Add-V.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-CNS1-0.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-CNS1-1.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-CNS1-2.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-CNS1-3.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-CNS1-4.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-CNS1-5.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-CNS1-6.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-GB1-0.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-GB1-1.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-GB1-2.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-GB1-3.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-GB1-4.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-GB1-5.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Japan1-0.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Japan1-1.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Japan1-2.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Japan1-3.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Japan1-4.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Japan1-5.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Japan1-6.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Korea1-0.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Korea1-1.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Korea1-2.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
- package/public/pdfjs/cmaps/B5-H.bcmap +0 -0
- package/public/pdfjs/cmaps/B5-V.bcmap +0 -0
- package/public/pdfjs/cmaps/B5pc-H.bcmap +0 -0
- package/public/pdfjs/cmaps/B5pc-V.bcmap +0 -0
- package/public/pdfjs/cmaps/CNS-EUC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/CNS-EUC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/CNS1-H.bcmap +0 -0
- package/public/pdfjs/cmaps/CNS1-V.bcmap +0 -0
- package/public/pdfjs/cmaps/CNS2-H.bcmap +0 -0
- package/public/pdfjs/cmaps/CNS2-V.bcmap +3 -0
- package/public/pdfjs/cmaps/ETHK-B5-H.bcmap +0 -0
- package/public/pdfjs/cmaps/ETHK-B5-V.bcmap +0 -0
- package/public/pdfjs/cmaps/ETen-B5-H.bcmap +0 -0
- package/public/pdfjs/cmaps/ETen-B5-V.bcmap +0 -0
- package/public/pdfjs/cmaps/ETenms-B5-H.bcmap +3 -0
- package/public/pdfjs/cmaps/ETenms-B5-V.bcmap +0 -0
- package/public/pdfjs/cmaps/EUC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/EUC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/Ext-H.bcmap +0 -0
- package/public/pdfjs/cmaps/Ext-RKSJ-H.bcmap +0 -0
- package/public/pdfjs/cmaps/Ext-RKSJ-V.bcmap +0 -0
- package/public/pdfjs/cmaps/Ext-V.bcmap +0 -0
- package/public/pdfjs/cmaps/GB-EUC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/GB-EUC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/GB-H.bcmap +4 -0
- package/public/pdfjs/cmaps/GB-V.bcmap +0 -0
- package/public/pdfjs/cmaps/GBK-EUC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/GBK-EUC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/GBK2K-H.bcmap +0 -0
- package/public/pdfjs/cmaps/GBK2K-V.bcmap +0 -0
- package/public/pdfjs/cmaps/GBKp-EUC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/GBKp-EUC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/GBT-EUC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/GBT-EUC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/GBT-H.bcmap +0 -0
- package/public/pdfjs/cmaps/GBT-V.bcmap +0 -0
- package/public/pdfjs/cmaps/GBTpc-EUC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/GBTpc-EUC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/GBpc-EUC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/GBpc-EUC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/H.bcmap +0 -0
- package/public/pdfjs/cmaps/HKdla-B5-H.bcmap +0 -0
- package/public/pdfjs/cmaps/HKdla-B5-V.bcmap +0 -0
- package/public/pdfjs/cmaps/HKdlb-B5-H.bcmap +0 -0
- package/public/pdfjs/cmaps/HKdlb-B5-V.bcmap +0 -0
- package/public/pdfjs/cmaps/HKgccs-B5-H.bcmap +0 -0
- package/public/pdfjs/cmaps/HKgccs-B5-V.bcmap +0 -0
- package/public/pdfjs/cmaps/HKm314-B5-H.bcmap +0 -0
- package/public/pdfjs/cmaps/HKm314-B5-V.bcmap +0 -0
- package/public/pdfjs/cmaps/HKm471-B5-H.bcmap +0 -0
- package/public/pdfjs/cmaps/HKm471-B5-V.bcmap +0 -0
- package/public/pdfjs/cmaps/HKscs-B5-H.bcmap +0 -0
- package/public/pdfjs/cmaps/HKscs-B5-V.bcmap +0 -0
- package/public/pdfjs/cmaps/Hankaku.bcmap +0 -0
- package/public/pdfjs/cmaps/Hiragana.bcmap +0 -0
- package/public/pdfjs/cmaps/KSC-EUC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/KSC-EUC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/KSC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/KSC-Johab-H.bcmap +0 -0
- package/public/pdfjs/cmaps/KSC-Johab-V.bcmap +0 -0
- package/public/pdfjs/cmaps/KSC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/KSCms-UHC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
- package/public/pdfjs/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
- package/public/pdfjs/cmaps/KSCms-UHC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/KSCpc-EUC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/KSCpc-EUC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/Katakana.bcmap +0 -0
- package/public/pdfjs/cmaps/LICENSE +36 -0
- package/public/pdfjs/cmaps/NWP-H.bcmap +0 -0
- package/public/pdfjs/cmaps/NWP-V.bcmap +0 -0
- package/public/pdfjs/cmaps/RKSJ-H.bcmap +0 -0
- package/public/pdfjs/cmaps/RKSJ-V.bcmap +0 -0
- package/public/pdfjs/cmaps/Roman.bcmap +0 -0
- package/public/pdfjs/cmaps/UniCNS-UCS2-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniCNS-UCS2-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniCNS-UTF16-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniCNS-UTF16-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniCNS-UTF32-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniCNS-UTF32-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniCNS-UTF8-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniCNS-UTF8-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniGB-UCS2-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniGB-UCS2-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniGB-UTF16-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniGB-UTF16-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniGB-UTF32-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniGB-UTF32-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniGB-UTF8-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniGB-UTF8-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS-UCS2-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS-UCS2-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS-UTF16-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS-UTF16-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS-UTF32-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS-UTF32-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS-UTF8-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS-UTF8-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniKS-UCS2-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniKS-UCS2-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniKS-UTF16-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniKS-UTF16-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniKS-UTF32-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniKS-UTF32-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniKS-UTF8-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniKS-UTF8-V.bcmap +0 -0
- package/public/pdfjs/cmaps/V.bcmap +0 -0
- package/public/pdfjs/cmaps/WP-Symbol.bcmap +0 -0
- package/src/components/ai/ai-prompt-input/index.tsx +3 -87
- package/src/components/ai-elements/__tests__/context.test.tsx +167 -0
- package/src/components/ai-elements/context.tsx +182 -94
- package/src/components/ai-elements/prompt-input.tsx +6 -104
- package/src/components/harness/__tests__/composer-attachments.test.tsx +17 -9
- package/src/components/harness/__tests__/composer-click-focus.test.tsx +175 -0
- package/src/components/harness/__tests__/composer-focus.test.tsx +7 -0
- package/src/components/harness/__tests__/composer-keymap.test.ts +57 -0
- package/src/components/harness/__tests__/composer-paste.test.tsx +7 -0
- package/src/components/harness/__tests__/composer-pending-guard.test.tsx +207 -0
- package/src/components/harness/__tests__/composer-placeholder.test.ts +7 -6
- package/src/components/harness/__tests__/composer-plus-menu.test.tsx +202 -0
- package/src/components/harness/__tests__/composer-primary-button.test.tsx +7 -0
- package/src/components/harness/__tests__/composer-send.test.tsx +12 -4
- package/src/components/harness/__tests__/composer-undo.test.tsx +7 -0
- package/src/components/harness/__tests__/dock-registry.test.ts +3 -0
- package/src/components/harness/__tests__/harness-workbench-auth-error.test.tsx +42 -4
- package/src/components/harness/__tests__/mention-kbid.test.ts +69 -0
- package/src/components/harness/__tests__/undo-last-turn.test.ts +134 -0
- package/src/components/harness/__tests__/voice-activity.test.tsx +2 -2
- package/src/components/harness/conversation-panel/composer/__tests__/file-chip-open.test.tsx +195 -0
- package/src/components/harness/conversation-panel/composer/__tests__/menu-view.test.tsx +107 -0
- package/src/components/harness/conversation-panel/composer/command/__tests__/claim-attachments.test.tsx +271 -0
- package/src/components/harness/conversation-panel/composer/command/__tests__/claim-client-submit.test.tsx +291 -0
- package/src/components/harness/conversation-panel/composer/command/__tests__/claim-guard.test.tsx +275 -0
- package/src/components/harness/conversation-panel/composer/command/__tests__/command-permission.test.tsx +286 -0
- package/src/components/harness/conversation-panel/composer/command/__tests__/command-plan.test.tsx +344 -0
- package/src/components/harness/conversation-panel/composer/command/__tests__/command-popup.test.tsx +193 -0
- package/src/components/harness/conversation-panel/composer/command/__tests__/command-server-source.test.tsx +235 -0
- package/src/components/harness/conversation-panel/composer/command/__tests__/command-suggestion-menu.test.tsx +151 -1
- package/src/components/harness/conversation-panel/composer/command/__tests__/command-undo.test.tsx +168 -0
- package/src/components/harness/conversation-panel/composer/command/__tests__/exclude-composer-seat.test.ts +106 -0
- package/src/components/harness/conversation-panel/composer/command/__tests__/menu-view.test.tsx +55 -2
- package/src/components/harness/conversation-panel/composer/command/__tests__/skill-source.test.tsx +336 -0
- package/src/components/harness/conversation-panel/composer/command/claim.ts +7 -1
- package/src/components/harness/conversation-panel/composer/command/command-popup.tsx +140 -0
- package/src/components/harness/conversation-panel/composer/command/command-suggestion-menu.tsx +261 -75
- package/src/components/harness/conversation-panel/composer/command/menu-view.tsx +188 -50
- package/src/components/harness/conversation-panel/composer/command/popup-panel.tsx +106 -0
- package/src/components/harness/conversation-panel/composer/command/skill-source.ts +231 -0
- package/src/components/harness/conversation-panel/composer/composer-editor.tsx +216 -14
- package/src/components/harness/conversation-panel/composer/composer-keymap.ts +26 -0
- package/src/components/harness/conversation-panel/composer/extension/__tests__/command-menu.test.ts +128 -12
- package/src/components/harness/conversation-panel/composer/extension/command-menu.ts +303 -44
- package/src/components/harness/conversation-panel/composer/extension/index.ts +8 -0
- package/src/components/harness/conversation-panel/composer/harness-composer.tsx +551 -83
- package/src/components/harness/conversation-panel/composer/mention/__tests__/file-mention.test.tsx +517 -0
- package/src/components/harness/conversation-panel/composer/mention/__tests__/mention-source-registration.test.tsx +5 -2
- package/src/components/harness/conversation-panel/composer/mention/__tests__/mention-suggestion-menu.test.tsx +120 -0
- package/src/components/harness/conversation-panel/composer/mention/__tests__/mention-trigger-source.test.ts +52 -9
- package/src/components/harness/conversation-panel/composer/mention/__tests__/story-mention.test.tsx +356 -0
- package/src/components/harness/conversation-panel/composer/mention/__tests__/thread-mention.test.tsx +377 -0
- package/src/components/harness/conversation-panel/composer/mention/file-mention.ts +162 -0
- package/src/components/harness/conversation-panel/composer/mention/mention-resolvers.ts +6 -0
- package/src/components/harness/conversation-panel/composer/mention/mention-suggestion-menu.tsx +212 -107
- package/src/components/harness/conversation-panel/composer/mention/mention-trigger-source.ts +71 -8
- package/src/components/harness/conversation-panel/composer/mention/story-mention.ts +131 -0
- package/src/components/harness/conversation-panel/composer/mention/thread-mention.ts +159 -0
- package/src/components/harness/conversation-panel/composer/mention/use-mention-sources.ts +9 -1
- package/src/components/harness/conversation-panel/composer/model-selector/__tests__/model-selector.test.tsx +401 -0
- package/src/components/harness/conversation-panel/composer/model-selector/__tests__/wiring.test.ts +117 -0
- package/src/components/harness/conversation-panel/composer/model-selector/model-selector-panel.tsx +411 -0
- package/src/components/harness/conversation-panel/composer/model-selector/model-selector-trigger.tsx +254 -0
- package/src/components/harness/conversation-panel/composer/model-selector/wiring.ts +112 -0
- package/src/components/harness/conversation-panel/composer/permission/__tests__/permission-select.test.tsx +264 -0
- package/src/components/harness/conversation-panel/composer/permission/permission-policy.ts +76 -0
- package/src/components/harness/conversation-panel/composer/permission/permission-popup.tsx +302 -0
- package/src/components/harness/conversation-panel/composer/permission/permission-select-button.tsx +140 -0
- package/src/components/harness/conversation-panel/composer/workspace/__tests__/workspace-select.test.tsx +390 -0
- package/src/components/harness/conversation-panel/composer/workspace/workspace-select-button.tsx +367 -0
- package/src/components/harness/conversation-panel/messages/harness-chain/__tests__/use-harness-session-putmedia.test.tsx +17 -0
- package/src/components/harness/conversation-panel/messages/harness-chain/use-harness-chat-adapter.ts +26 -6
- package/src/components/harness/conversation-panel/messages/harness-chain/use-harness-session.ts +21 -3
- package/src/components/harness/extension-panel/dock/__tests__/dock-persist.test.ts +2 -1
- package/src/components/harness/extension-panel/dock/__tests__/guide-page.test.tsx +44 -3
- package/src/components/harness/extension-panel/dock/dock-persist.ts +6 -4
- package/src/components/harness/extension-panel/dock/dock-registry.ts +35 -14
- package/src/components/harness/extension-panel/dock/dock-surface.tsx +2 -0
- package/src/components/harness/extension-panel/dock/guide-page.tsx +75 -45
- package/src/components/harness/extension-panel/panels/browser/__tests__/webview-frame.test.tsx +5 -2
- package/src/components/harness/extension-panel/panels/plugin/__tests__/install-dialog.test.tsx +260 -0
- package/src/components/harness/extension-panel/panels/plugin/__tests__/plugin-page.test.tsx +912 -0
- package/src/components/harness/extension-panel/panels/plugin/__tests__/plugin-row.test.tsx +215 -0
- package/src/components/harness/extension-panel/panels/plugin/builtin-section.tsx +204 -0
- package/src/components/harness/extension-panel/panels/plugin/install-dialog.tsx +195 -0
- package/src/components/harness/extension-panel/panels/plugin/installed-section.tsx +378 -0
- package/src/components/harness/extension-panel/panels/plugin/kind.tsx +17 -4
- package/src/components/harness/extension-panel/panels/plugin/pending-builds-block.tsx +49 -0
- package/src/components/harness/extension-panel/panels/plugin/plugin-page.tsx +257 -0
- package/src/components/harness/extension-panel/panels/plugin/plugin-row.tsx +206 -0
- package/src/components/harness/extension-panel/panels/plugin/plugin-types.ts +13 -0
- package/src/components/harness/extension-panel/panels/plugin/worker-section.tsx +322 -0
- package/src/components/harness/workbench/__tests__/provider-model-groups.test.ts +301 -0
- package/src/components/harness/workbench/harness-workbench-page.tsx +164 -2
- package/src/components/harness/workbench/provider-model-groups.ts +140 -0
- package/src/components/harness/workbench/undo-last-turn.ts +79 -0
- package/src/components/harness/workbench/workbench-context.tsx +53 -3
- package/src/components/tiptap/hooks/__tests__/use-floating-element.test.tsx +131 -0
- package/src/components/tiptap/hooks/use-floating-element.ts +15 -2
- package/src/components/tiptap/hooks/use-menu-navigation.ts +5 -0
- package/src/components/tiptap/node/mention-extension.ts +33 -0
- package/src/components/tiptap/ui/suggestion-menu/__tests__/suggestion-menu.test.tsx +366 -0
- package/src/components/tiptap/ui/suggestion-menu/suggestion-menu-types.ts +54 -0
- package/src/components/tiptap/ui/suggestion-menu/suggestion-menu.tsx +176 -45
- package/src/lib/changelog/sdk-versions.ts +2 -2
- package/src/lib/queries/__tests__/harness-plugin-queries.test.ts +49 -0
- package/src/lib/queries/harness.ts +50 -0
- package/src/paraglide/messages/_index.js +1574 -311
- package/src/paraglide/messages/en.js +513 -103
- package/src/paraglide/messages/zh.js +514 -104
- package/src/routeTree.gen.ts +31 -0
- package/src/routes/_nav/harness/route.lazy.tsx +13 -0
- package/src/server/ai-gateway/sandbox/policy.ts +6 -6
- package/src/server/harness/__tests__/compact-plugin.server.test.ts +46 -0
- package/src/server/harness/__tests__/define-expose.test.ts +17 -0
- package/src/server/harness/__tests__/thread-reference.server.test.ts +258 -0
- package/src/server/harness/define.server.ts +21 -3
- package/src/server/harness/thread-reference.server.ts +446 -0
- package/src/server/serverFns/chat/__tests__/conversations-sandbox-default.test.ts +23 -0
- package/src/server/serverFns/chat/conversations.ts +18 -3
- package/src/server/serverFns/harness/search-mention-candidates.ts +14 -1
- package/src/shared/harness/__tests__/thread-reference-format.test.ts +128 -0
- package/src/shared/harness/thread-reference-format.ts +98 -0
- package/LICENSE +0 -661
- package/src/components/agents/slash-skill-menu.tsx +0 -75
- package/src/components/harness/conversation-panel/composer/extension/__tests__/demo-story-reference.test.tsx +0 -177
- package/src/components/harness/conversation-panel/composer/extension/demo-story-reference.tsx +0 -227
- package/src/components/harness/conversation-panel/composer/plugin-mention-menu.tsx +0 -109
- package/src/components/harness/extension-panel/panels/plugin-panel.tsx +0 -1021
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// AllBlue - 理想之海
|
|
3
|
+
// Copyright (C) 2026 AllBlue Contributors
|
|
4
|
+
//
|
|
5
|
+
// This program is free software: you can redistribute it and/or modify
|
|
6
|
+
// it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
// the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
// (at your option) any later version.
|
|
9
|
+
//
|
|
10
|
+
// This program is distributed in the hope that it will be useful,
|
|
11
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
// GNU Affero General Public License for more details.
|
|
14
|
+
//
|
|
15
|
+
// You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @story 需求提及候选源(P1 任务 5,demo「插入需求引用」扩展转正):把 story 域
|
|
20
|
+
* 既有 `searchStoriesFn`(serverFn,与 BUG 关联需求选择器 / story search-popover
|
|
21
|
+
* 同源)包装成 @ 菜单「需求」组候选。纯查询→候选映射,单一职责(thread-mention.ts
|
|
22
|
+
* 同款)。
|
|
23
|
+
*
|
|
24
|
+
* 数据面 = **serverFn 直调**(`searchStoriesFn({ data: { query } })`,逐调用
|
|
25
|
+
* `signal` 传导取消省流量):不建 queryOptions——按需拉取、菜单级 debounce=200
|
|
26
|
+
* 兜频率;服务端 take 10 已限(用户独立项目 scope:不传 projectId →
|
|
27
|
+
* ensureBuiltinIndependentProject),客户端不再截断。竞态兜底:插件 async manager
|
|
28
|
+
* 对晚归 resolve 一律丢弃——signal 只是省流量,正确性不依赖它。
|
|
29
|
+
*
|
|
30
|
+
* gating:**无**(用户级 serverFn 双链可用——legacy 链不依赖 harness 工作区、空态
|
|
31
|
+
* 新对话无 threadId 依赖,区别于 file/thread 源的 gate/threadId 守卫)。
|
|
32
|
+
*
|
|
33
|
+
* 过滤:fuzzy 子序列 ∪ includes(label = `${identifier} ${title}` 单字段,mention
|
|
34
|
+
* 内置源同口径——服务端 contains 只保底,子序列命中靠客户端补齐);空 query 全量
|
|
35
|
+
* 首屏(contains "" 匹配全部)。
|
|
36
|
+
*
|
|
37
|
+
* 错误 fail-closed:fetch 失败(401/网络)→ 空目录 → 菜单无「需求」组,不阻塞
|
|
38
|
+
* 菜单其余候选(**不 rethrow**——插件对 items 抛错会派发空 items 清旧行,catch
|
|
39
|
+
* 返回与之一致,thread-mention 同款)。
|
|
40
|
+
*
|
|
41
|
+
* chip 插入(mention-trigger-source.insertMentionCandidateChip):attrs
|
|
42
|
+
* { id: story id 本身(candidate.id 的 'story:' 前缀只是菜单候选键隔离,与
|
|
43
|
+
* file:/thread: 同款,不进 attrs.id), label, docType: 'story' }。**不加新
|
|
44
|
+
* schema attr**——story 引用无结构化数据要往返(id 已在 attrs.id 往返),
|
|
45
|
+
* renderText 落兜底 `@${label}` 字面(mention-extension)。
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
import { searchStoriesFn } from "@/server/serverFns/story/story-search"
|
|
49
|
+
import type { TriggerCandidate } from "../extension"
|
|
50
|
+
import { fuzzyMatch } from "../fuzzy"
|
|
51
|
+
import { m } from "@/paraglide/messages.js"
|
|
52
|
+
|
|
53
|
+
/** searchStoriesFn 返回的需求命中条目(id/title/identifier,服务端 take 10 已限)。 */
|
|
54
|
+
export interface StoryMentionHit {
|
|
55
|
+
id: string
|
|
56
|
+
title: string
|
|
57
|
+
identifier: string
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** storyMentionCandidates 入参(getStories 注入,生产/测试各一实现)。 */
|
|
61
|
+
export interface StoryMentionCandidateInput {
|
|
62
|
+
/** 触发词后查询串('@' 后字符;空串 = 首屏) */
|
|
63
|
+
query: string
|
|
64
|
+
/** 取消信号(透传 serverFn 逐调用取消;正确性不依赖) */
|
|
65
|
+
signal?: AbortSignal
|
|
66
|
+
/**
|
|
67
|
+
* 需求搜索 getter 注入(生产缺省:searchStoriesFn 直调;测试可替换为同步桩)。
|
|
68
|
+
* 返回命中条目(服务端 take 10,顺序保留服务端序;同步数组或 Promise 均可,
|
|
69
|
+
* thread-mention getSessions 同款 union)。
|
|
70
|
+
*/
|
|
71
|
+
getStories?: (
|
|
72
|
+
query: string,
|
|
73
|
+
signal?: AbortSignal,
|
|
74
|
+
) => readonly StoryMentionHit[] | Promise<readonly StoryMentionHit[]>
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* 默认需求取数(searchStoriesFn 直调,模块级稳定):不 catch——fail-closed 收口在
|
|
79
|
+
* storyMentionCandidates 单点(thread-mention 的双层 catch 是 fetchQuery seam 需要,
|
|
80
|
+
* serverFn 直调一层即足)。
|
|
81
|
+
*/
|
|
82
|
+
async function fetchStoriesDefault(
|
|
83
|
+
query: string,
|
|
84
|
+
signal?: AbortSignal,
|
|
85
|
+
): Promise<readonly StoryMentionHit[]> {
|
|
86
|
+
return await searchStoriesFn({ data: { query }, signal })
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/** 需求命中 → story 候选(label = `${identifier} ${title}`,与 demo 引用 chip 同形)。 */
|
|
90
|
+
function toStoryCandidate(story: StoryMentionHit): TriggerCandidate {
|
|
91
|
+
return {
|
|
92
|
+
// id 前缀 story: 与命令/mention 候选隔离(菜单 key / 重开定位);chip 的
|
|
93
|
+
// attrs.id 用 data.id 本身(story 主键),前缀不进 attrs
|
|
94
|
+
id: `story:${story.id}`,
|
|
95
|
+
label: `${story.identifier} ${story.title}`,
|
|
96
|
+
kind: "story",
|
|
97
|
+
group: m.harness_mention_storyGroup(),
|
|
98
|
+
subtext: story.identifier,
|
|
99
|
+
data: { id: story.id },
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* 需求提及候选(fuzzy 过滤 + 抛错兜底;无 gating)。返回 items(kind:'story'),
|
|
105
|
+
* 顺序保留服务端序。
|
|
106
|
+
*/
|
|
107
|
+
export async function storyMentionCandidates(
|
|
108
|
+
input: StoryMentionCandidateInput,
|
|
109
|
+
): Promise<TriggerCandidate[]> {
|
|
110
|
+
const { query, signal } = input
|
|
111
|
+
|
|
112
|
+
let hits: readonly StoryMentionHit[]
|
|
113
|
+
try {
|
|
114
|
+
hits = await (input.getStories ?? fetchStoriesDefault)(query, signal)
|
|
115
|
+
} catch {
|
|
116
|
+
// 插件对 items 抛错会派发空 items 清旧行——catch 返回空与之一致,不 rethrow
|
|
117
|
+
return []
|
|
118
|
+
}
|
|
119
|
+
if (signal?.aborted) return []
|
|
120
|
+
|
|
121
|
+
const q = query.trim().toLowerCase()
|
|
122
|
+
return hits
|
|
123
|
+
.map(toStoryCandidate)
|
|
124
|
+
// fuzzy 子序列 ∪ includes(大小写不敏感);空 query 全量首屏
|
|
125
|
+
.filter(
|
|
126
|
+
(candidate) =>
|
|
127
|
+
!q ||
|
|
128
|
+
fuzzyMatch(q, candidate.label) !== null ||
|
|
129
|
+
candidate.label.toLowerCase().includes(q),
|
|
130
|
+
)
|
|
131
|
+
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// AllBlue - 理想之海
|
|
3
|
+
// Copyright (C) 2026 AllBlue Contributors
|
|
4
|
+
//
|
|
5
|
+
// This program is free software: you can redistribute it and/or modify
|
|
6
|
+
// it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
// the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
// (at your option) any later version.
|
|
9
|
+
//
|
|
10
|
+
// This program is distributed in the hope that it will be useful,
|
|
11
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
// GNU Affero General Public License for more details.
|
|
14
|
+
//
|
|
15
|
+
// You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @thread 会话提及候选源(P1 任务 4,@thread Phase 1):把用户会话目录
|
|
20
|
+
* (listHarnessWorkspacesWithThreadsFn 投影)包装成 @ 菜单「会话」组候选。
|
|
21
|
+
* 纯查询→候选映射,单一职责(file-mention.ts 同款)。
|
|
22
|
+
*
|
|
23
|
+
* 数据面 = getQueryClient seam 自拉(fetchThreadsViaQueryClient 缺省 getter,照 T3
|
|
24
|
+
* skill-source fetchSkillsViaQueryClient / P0 fetchDirFromQueryClient 同范式):
|
|
25
|
+
* **不走 useQuery/props 注入**——避免 Provider 陷阱(整页直渲测试无
|
|
26
|
+
* QueryClientProvider 即爆);harnessWorkspacesQueryOptions 已有 SSR 预取
|
|
27
|
+
* (workbench loader)+ 缓存共享,fetchQuery 命中缓存不重复发请求。取数时点在
|
|
28
|
+
* 用户敲 '@' 触发 candidates(纯客户端交互,SSR 不执行)。
|
|
29
|
+
*
|
|
30
|
+
* gating:legacy 链(`!isHarnessClientEnabled()`)→ 恒空不发请求。**rawThreadId
|
|
31
|
+
* null 不 gating**(区别于 file 源)——空态新对话恰是引用历史会话的主要场景;
|
|
32
|
+
* rawThreadId 仅用于排除当前线程(不引用自己)。
|
|
33
|
+
*
|
|
34
|
+
* 过滤:排除当前线程 + 排除 archived + fuzzy(子序列 ∪ includes,title 单字段,
|
|
35
|
+
* mention 内置源同口径);候选截 20 条(DSH search 同款上限,源数据 take 200,
|
|
36
|
+
* 截断提示不做——200 条以上静默截断可接受,Phase 2 再议)。
|
|
37
|
+
*
|
|
38
|
+
* 错误 fail-closed:fetch 失败(401/网络/未装配)→ 空目录 → 菜单无「会话」组,
|
|
39
|
+
* 不阻塞菜单其余候选(**不 rethrow**——插件对 items 抛错会派发空 items 清旧行,
|
|
40
|
+
* catch 返回与之一致,file-mention 同款)。
|
|
41
|
+
*
|
|
42
|
+
* chip 插入(mention-trigger-source.insertMentionCandidateChip):attrs
|
|
43
|
+
* { id: threadId(裁决:thread 主键即 id;candidate.id 的 'thread:' 前缀只是菜单
|
|
44
|
+
* 候选键隔离,与 file:/skill: 同款,不进 attrs.id), label: title, docType:
|
|
45
|
+
* 'thread', threadId }。序列化(mention-extension renderText)输出字面
|
|
46
|
+
* 「参考会话《{title}》」。
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
import { getQueryClient } from "@/lib/query-client-seam"
|
|
50
|
+
import { harnessWorkspacesQueryOptions } from "@/lib/queries/harness"
|
|
51
|
+
import { isHarnessClientEnabled } from "@/lib/harness-gate"
|
|
52
|
+
import type { WorkspaceSessionProjection } from "@/server/serverFns/harness/workspace-threads"
|
|
53
|
+
import type { TriggerCandidate } from "../extension"
|
|
54
|
+
import { fuzzyMatch } from "../fuzzy"
|
|
55
|
+
import { m } from "@/paraglide/messages.js"
|
|
56
|
+
import { getLocale } from "@/paraglide/runtime.js"
|
|
57
|
+
import { formatDistanceToNowStrict } from "date-fns"
|
|
58
|
+
import { enUS, zhCN } from "date-fns/locale"
|
|
59
|
+
|
|
60
|
+
/** 候选上限(DSH search 同款 20 条;源数据 take 200,不做截断提示)。 */
|
|
61
|
+
export const THREAD_MENTION_CANDIDATE_LIMIT = 20
|
|
62
|
+
|
|
63
|
+
/** threadMentionCandidates 入参(getSessions 注入,生产/测试各一实现)。 */
|
|
64
|
+
export interface ThreadMentionCandidateInput {
|
|
65
|
+
/**
|
|
66
|
+
* 未兜底的当前 threadId(null = 空态新对话):排除当前线程不引用自己。
|
|
67
|
+
* null **不 gating**(区别于 file 源——空态恰是引用历史会话的主要场景)。
|
|
68
|
+
*/
|
|
69
|
+
rawThreadId: string | null | undefined
|
|
70
|
+
/** 触发词后查询串('@' 后字符) */
|
|
71
|
+
query: string
|
|
72
|
+
/**
|
|
73
|
+
* 会话投影 getter 注入(生产缺省:fetchThreadsViaQueryClient seam 自拉;测试可
|
|
74
|
+
* 替换为同步桩)。返回 WorkspaceSessionProjection[](服务端按 updatedAt desc 排序,
|
|
75
|
+
* 候选顺序保留服务端序)。
|
|
76
|
+
*/
|
|
77
|
+
getSessions?: () =>
|
|
78
|
+
| readonly WorkspaceSessionProjection[]
|
|
79
|
+
| Promise<readonly WorkspaceSessionProjection[]>
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* 默认会话目录取数(getQueryClient seam 模块级拉取):错误 fail-closed 返回空数组,
|
|
84
|
+
* 不 rethrow(同 fetchSkillsViaQueryClient 口径)。
|
|
85
|
+
*/
|
|
86
|
+
export async function fetchThreadsViaQueryClient(): Promise<readonly WorkspaceSessionProjection[]> {
|
|
87
|
+
try {
|
|
88
|
+
const result = await getQueryClient().fetchQuery(harnessWorkspacesQueryOptions())
|
|
89
|
+
return result.sessions ?? []
|
|
90
|
+
} catch {
|
|
91
|
+
return []
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** 会话投影 → thread 候选(label = title ?? 未命名兜底,i18n 走 paraglide)。 */
|
|
96
|
+
function toThreadCandidate(session: WorkspaceSessionProjection): TriggerCandidate {
|
|
97
|
+
const title = session.title ?? m.harness_mention_threadUntitled()
|
|
98
|
+
return {
|
|
99
|
+
// id 前缀 thread: 与命令/mention 候选隔离(菜单 key / 重开定位);chip 的
|
|
100
|
+
// attrs.id 用 data.threadId 本身(裁决:thread 主键即 id),前缀不进 attrs
|
|
101
|
+
id: `thread:${session.id}`,
|
|
102
|
+
label: title,
|
|
103
|
+
kind: "thread",
|
|
104
|
+
group: m.harness_mention_threadGroup(),
|
|
105
|
+
// 副文本 = 最近消息相对时间(用户裁决 2026-11-20:副文本要真实描述——原为
|
|
106
|
+
// 组名「会话」复读;时间帮用户区分「要引哪次会话」)。解析失败回落 undefined
|
|
107
|
+
// (MenuView 副文本空值不渲染,单行零噪音)。
|
|
108
|
+
subtext: threadRelativeTime(session.lastMessageAt),
|
|
109
|
+
data: { threadId: session.id, title },
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/** 最近消息相对时间(zh/en 随 paraglide locale);无效时间戳返回 undefined。 */
|
|
114
|
+
function threadRelativeTime(iso: string | undefined): string | undefined {
|
|
115
|
+
if (!iso) return undefined
|
|
116
|
+
const date = new Date(iso)
|
|
117
|
+
if (Number.isNaN(date.getTime())) return undefined
|
|
118
|
+
return formatDistanceToNowStrict(date, {
|
|
119
|
+
addSuffix: true,
|
|
120
|
+
locale: getLocale() === "zh" ? zhCN : enUS,
|
|
121
|
+
})
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* 会话提及候选(gating + 排除/过滤 + 上限截断 + 抛错兜底)。返回 items(kind:'thread'),
|
|
126
|
+
* 顺序保留服务端 updatedAt desc 序。
|
|
127
|
+
*/
|
|
128
|
+
export async function threadMentionCandidates(
|
|
129
|
+
input: ThreadMentionCandidateInput,
|
|
130
|
+
): Promise<TriggerCandidate[]> {
|
|
131
|
+
const { rawThreadId, query } = input
|
|
132
|
+
|
|
133
|
+
// gating:legacy 链(gate 关)→ 恒空,不发任何请求(getSessions 不调用)
|
|
134
|
+
if (!isHarnessClientEnabled()) return []
|
|
135
|
+
|
|
136
|
+
let sessions: readonly WorkspaceSessionProjection[]
|
|
137
|
+
try {
|
|
138
|
+
sessions = await (input.getSessions ?? fetchThreadsViaQueryClient)()
|
|
139
|
+
} catch {
|
|
140
|
+
// 插件对 items 抛错会派发空 items 清旧行——catch 返回空与之一致,不 rethrow
|
|
141
|
+
return []
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
const q = query.trim().toLowerCase()
|
|
145
|
+
return sessions
|
|
146
|
+
// 排除 archived(归档会话不进候选)
|
|
147
|
+
.filter((session) => !session.isArchived)
|
|
148
|
+
// 排除当前线程(不引用自己);rawThreadId null(空态)自然无操作
|
|
149
|
+
.filter((session) => rawThreadId == null || session.id !== rawThreadId)
|
|
150
|
+
.map(toThreadCandidate)
|
|
151
|
+
// fuzzy 子序列 ∪ includes(大小写不敏感);空 query 全量首屏
|
|
152
|
+
.filter(
|
|
153
|
+
(candidate) =>
|
|
154
|
+
!q ||
|
|
155
|
+
fuzzyMatch(q, candidate.label) !== null ||
|
|
156
|
+
candidate.label.toLowerCase().includes(q),
|
|
157
|
+
)
|
|
158
|
+
.slice(0, THREAD_MENTION_CANDIDATE_LIMIT)
|
|
159
|
+
}
|
|
@@ -35,7 +35,15 @@ export function useMentionSources() {
|
|
|
35
35
|
|
|
36
36
|
return useMemo(() => {
|
|
37
37
|
const all: MentionCandidate[] = [
|
|
38
|
-
...kbDocs.map((d) => ({
|
|
38
|
+
...kbDocs.map((d) => ({
|
|
39
|
+
kind: "kb-doc" as const,
|
|
40
|
+
id: d.id,
|
|
41
|
+
label: d.label,
|
|
42
|
+
kbId: d.kbId,
|
|
43
|
+
kbName: d.kbName,
|
|
44
|
+
// 加入的工作空间(副文本展示;用户裁决 2026-11-21)
|
|
45
|
+
workspaceNames: d.workspaceNames ?? [],
|
|
46
|
+
})),
|
|
39
47
|
...prds.map((p) => ({ kind: "design" as const, id: p.id, label: p.title })),
|
|
40
48
|
]
|
|
41
49
|
// 透传加载态:首载/失败不再被硬编码 false 吞掉,mention 菜单可区分加载中
|