@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,378 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// AllBlue - 理想之海
|
|
3
|
+
// Copyright (C) 2026 AllBlue Contributors
|
|
4
|
+
|
|
5
|
+
// InstalledSection(Section A:DSH 兼容已装插件——任务 5 真实化,设计 §3.3)。含安装来源
|
|
6
|
+
// 形态标签 installSourceLabel / 激活诊断归桶 dshActivationStatus(均仅本 Section 消费,随之
|
|
7
|
+
// 迁出)。由 PluginPage 装配,report 未下发时全行 unknown(同旧面板兜底)。
|
|
8
|
+
|
|
9
|
+
import { useState } from "react"
|
|
10
|
+
import type { ReactElement, ReactNode } from "react"
|
|
11
|
+
import { ArrowUpCircle, MoreHorizontal, Puzzle, Trash2 } from "lucide-react"
|
|
12
|
+
import { useMutation, useQueryClient } from "@tanstack/react-query"
|
|
13
|
+
import {
|
|
14
|
+
AlertDialog,
|
|
15
|
+
AlertDialogAction,
|
|
16
|
+
AlertDialogCancel,
|
|
17
|
+
AlertDialogContent,
|
|
18
|
+
AlertDialogDescription,
|
|
19
|
+
AlertDialogFooter,
|
|
20
|
+
AlertDialogHeader,
|
|
21
|
+
AlertDialogTitle,
|
|
22
|
+
} from "@/components/ui/alert-dialog"
|
|
23
|
+
import { Badge } from "@/components/ui/badge"
|
|
24
|
+
import { Button } from "@/components/ui/button"
|
|
25
|
+
import {
|
|
26
|
+
DropdownMenu,
|
|
27
|
+
DropdownMenuContent,
|
|
28
|
+
DropdownMenuItem,
|
|
29
|
+
DropdownMenuTrigger,
|
|
30
|
+
} from "@/components/ui/dropdown-menu"
|
|
31
|
+
import { toast } from "@/components/ui/toast"
|
|
32
|
+
import {
|
|
33
|
+
DSH_INSTALLED_QUERY_KEY,
|
|
34
|
+
DSH_PENDING_BUILDS_QUERY_KEY,
|
|
35
|
+
HARNESS_PLUGIN_REPORT_QUERY_KEY,
|
|
36
|
+
} from "@/lib/queries/harness"
|
|
37
|
+
import {
|
|
38
|
+
removeDshPluginFn,
|
|
39
|
+
setDshPluginEnabledFn,
|
|
40
|
+
updateDshPluginFn,
|
|
41
|
+
} from "@/server/serverFns/harness/dsh-plugins"
|
|
42
|
+
import type { DshInstalledEntry } from "@/server/serverFns/harness/dsh-plugins"
|
|
43
|
+
import { PluginRow, PluginStatusDot } from "./plugin-row"
|
|
44
|
+
import { m } from "@/paraglide/messages.js"
|
|
45
|
+
import type { HarnessReport } from "./plugin-types"
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* 安装来源形态标签(对齐 installer specKind 判定:git+ / .tgz / 路径 / registry)。
|
|
49
|
+
* 纯字符串判定,无运行时依赖,客户端安全。(迁旧面板 plugin-panel.tsx L364-376 原样)
|
|
50
|
+
*/
|
|
51
|
+
function installSourceLabel(spec: string | undefined): string {
|
|
52
|
+
const s = (spec ?? "").trim()
|
|
53
|
+
if (s.startsWith("git+") || s.startsWith("git://")) {
|
|
54
|
+
return m.harness_plugin_dshSourceGit()
|
|
55
|
+
}
|
|
56
|
+
if (s.endsWith(".tgz")) {
|
|
57
|
+
return m.harness_plugin_dshSourceTarball()
|
|
58
|
+
}
|
|
59
|
+
if (s.startsWith("/") || s.startsWith("./") || s.startsWith("../")) {
|
|
60
|
+
return m.harness_plugin_dshSourcePath()
|
|
61
|
+
}
|
|
62
|
+
return m.harness_plugin_dshSourceRegistry()
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* 单个已装 bundle 的激活诊断(把 AssemblyReport 四桶归到该 bundle 名下)。
|
|
67
|
+
* id/name 命中即归桶:activated > failed > disabled > deactivated(inject 缺服务);
|
|
68
|
+
* 四桶都未命中 = 组装期未见该 bundle(如 patch 文件读失败被隔离跳过)→ unknown。
|
|
69
|
+
* (迁旧面板 plugin-panel.tsx L383-406 原样;label 部分由 PluginStatusDot 五态接管)
|
|
70
|
+
*/
|
|
71
|
+
function dshActivationStatus(
|
|
72
|
+
report: HarnessReport,
|
|
73
|
+
name: string,
|
|
74
|
+
): {
|
|
75
|
+
key: "activated" | "deactivated" | "failed" | "disabled" | "unknown"
|
|
76
|
+
missing: string[]
|
|
77
|
+
error: string
|
|
78
|
+
} {
|
|
79
|
+
if (report.activated.some((p) => p.id === name || p.name === name)) {
|
|
80
|
+
return { key: "activated", missing: [], error: "" }
|
|
81
|
+
}
|
|
82
|
+
const failed = report.failed.find((p) => p.id === name || p.name === name)
|
|
83
|
+
if (failed) {
|
|
84
|
+
return { key: "failed", missing: [], error: failed.error }
|
|
85
|
+
}
|
|
86
|
+
if (report.disabled.some((p) => p.id === name)) {
|
|
87
|
+
return { key: "disabled", missing: [], error: "" }
|
|
88
|
+
}
|
|
89
|
+
const deactivated = report.deactivated.find((p) => p.id === name || p.name === name)
|
|
90
|
+
if (deactivated) {
|
|
91
|
+
return { key: "deactivated", missing: [...deactivated.missing], error: "" }
|
|
92
|
+
}
|
|
93
|
+
return { key: "unknown", missing: [], error: "" }
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Section A:已安装插件(DSH 兼容 bundle,设计 §3.3)。数据 = getDshInstalledFn 清单
|
|
98
|
+
* ⨝ getHarnessPluginReportFn 激活诊断(dshActivationStatus 归桶,report 未下发时全行
|
|
99
|
+
* unknown——同旧面板兜底)。行结构经 PluginRow:icon=Puzzle / badges=v{version} 徽标 /
|
|
100
|
+
* description=来源标签(+clientHalf 提示)/ meta=五态状态点 / switch=启停(无确认,规格
|
|
101
|
+
* §3.3 保留既有交互)/ menu=⋯(更新/移除,确认弹窗迁旧面板 L761-816 原样)/ detail=spec
|
|
102
|
+
* 原文 + 激活诊断逐条 + clientHalf 说明。
|
|
103
|
+
*
|
|
104
|
+
* 行级进行态(DSH applyingChange):该行任一写操作在途 → 该行 Switch 禁用 + ⋯ 触发器与
|
|
105
|
+
* 菜单项禁用,他行不受影响(toggleMutation.variables 持有本次入参,react-query v5)。
|
|
106
|
+
* 写操作 onSuccess invalidate DSH_INSTALLED + HARNESS_PLUGIN_REPORT 两键(更新按旧面板
|
|
107
|
+
* 语义额外 invalidate DSH_PENDING_BUILDS 第三键——更新可产生新待批构建);onError →
|
|
108
|
+
* toast.error。更新返回 blockedBuilds 非空 → onBlockedBuilds 上抛页级 PRE-3 批准链。
|
|
109
|
+
* 只读(canManage=false):Switch 禁用、菜单项 disabled(可开菜单看诊断,动作不可用)。
|
|
110
|
+
* 空态分态:可管理给指路句,只读去掉指路句——避免指向禁用按钮(复审 R3-M5)。
|
|
111
|
+
*/
|
|
112
|
+
export function InstalledSection({
|
|
113
|
+
installed,
|
|
114
|
+
report,
|
|
115
|
+
canManage,
|
|
116
|
+
onBlockedBuilds,
|
|
117
|
+
}: {
|
|
118
|
+
installed: DshInstalledEntry[]
|
|
119
|
+
report?: HarnessReport
|
|
120
|
+
canManage: boolean
|
|
121
|
+
onBlockedBuilds: (names: string[]) => void
|
|
122
|
+
}): ReactElement {
|
|
123
|
+
const queryClient = useQueryClient()
|
|
124
|
+
const [expandedId, setExpandedId] = useState<string | null>(null)
|
|
125
|
+
// 待确认的更新/移除操作(AlertDialog):bundle name(迁旧面板 DshTab state 原样)
|
|
126
|
+
const [updateTarget, setUpdateTarget] = useState<string | null>(null)
|
|
127
|
+
const [removeTarget, setRemoveTarget] = useState<string | null>(null)
|
|
128
|
+
// 更新优雅失败(ok:false)时 updateDshPluginFn 返回的 reason 原文,内联展示于更新确认
|
|
129
|
+
// AlertDialog(对齐 install-dialog 三态模型 + 规格 §3.3「更新 = 确认 AlertDialog 内联
|
|
130
|
+
// 结果」)。成功/Cancel/抛错均清空,防残留污染下一次打开。
|
|
131
|
+
const [updateFailedReason, setUpdateFailedReason] = useState<string | null>(null)
|
|
132
|
+
|
|
133
|
+
/** 关更新确认弹窗(Cancel 或成功):清 target + 失败原因,避免残留污染下次打开。 */
|
|
134
|
+
const closeUpdateDialog = () => {
|
|
135
|
+
setUpdateTarget(null)
|
|
136
|
+
setUpdateFailedReason(null)
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// 启停(无确认链):invalidate 两键(迁旧面板 toggleMutation,onError 改走 toast)
|
|
140
|
+
const toggleMutation = useMutation({
|
|
141
|
+
mutationFn: (input: { name: string; enabled: boolean }) =>
|
|
142
|
+
setDshPluginEnabledFn({ data: input }),
|
|
143
|
+
onSuccess: () => {
|
|
144
|
+
queryClient.invalidateQueries({ queryKey: DSH_INSTALLED_QUERY_KEY })
|
|
145
|
+
queryClient.invalidateQueries({ queryKey: HARNESS_PLUGIN_REPORT_QUERY_KEY })
|
|
146
|
+
},
|
|
147
|
+
onError: (error) => toast.error(String(error)),
|
|
148
|
+
})
|
|
149
|
+
|
|
150
|
+
// 更新(五步确认):blockedBuilds 非空上抛页级 PRE-3(迁旧面板 updateMutation L477-488)。
|
|
151
|
+
// 旧面板 onSuccess invalidate 三键(report/installed/pending-builds,L484-486):更新产生
|
|
152
|
+
// 新待批构建 ⇒ 必须刷新 PendingBuildsBlock 数据源(复审 fix round 1:两键口径漏此键)。
|
|
153
|
+
// ok:false(updateDshPluginFn 优雅失败不抛错)→ 不关弹窗 + reason 原文内联展示(对齐
|
|
154
|
+
// install-dialog 三态模型 + 规格 §3.3);抛错仍走 onError toast.error。
|
|
155
|
+
const updateMutation = useMutation({
|
|
156
|
+
mutationFn: (name: string) => updateDshPluginFn({ data: { name } }),
|
|
157
|
+
onSuccess: (result) => {
|
|
158
|
+
if (!result.ok) {
|
|
159
|
+
// !ok:弹窗保持 open,reason 原文内联展示(见更新 AlertDialog 渲染)
|
|
160
|
+
setUpdateFailedReason(result.reason)
|
|
161
|
+
return
|
|
162
|
+
}
|
|
163
|
+
closeUpdateDialog()
|
|
164
|
+
if (result.blockedBuilds.length > 0) {
|
|
165
|
+
onBlockedBuilds(result.blockedBuilds)
|
|
166
|
+
}
|
|
167
|
+
queryClient.invalidateQueries({ queryKey: DSH_PENDING_BUILDS_QUERY_KEY })
|
|
168
|
+
queryClient.invalidateQueries({ queryKey: DSH_INSTALLED_QUERY_KEY })
|
|
169
|
+
queryClient.invalidateQueries({ queryKey: HARNESS_PLUGIN_REPORT_QUERY_KEY })
|
|
170
|
+
},
|
|
171
|
+
onError: (error) => {
|
|
172
|
+
setUpdateFailedReason(null)
|
|
173
|
+
toast.error(String(error))
|
|
174
|
+
},
|
|
175
|
+
})
|
|
176
|
+
|
|
177
|
+
// 移除(确认弹窗):迁旧面板 removeMutation L468-475
|
|
178
|
+
const removeMutation = useMutation({
|
|
179
|
+
mutationFn: (name: string) => removeDshPluginFn({ data: { name } }),
|
|
180
|
+
onSuccess: () => {
|
|
181
|
+
setRemoveTarget(null)
|
|
182
|
+
queryClient.invalidateQueries({ queryKey: DSH_INSTALLED_QUERY_KEY })
|
|
183
|
+
queryClient.invalidateQueries({ queryKey: HARNESS_PLUGIN_REPORT_QUERY_KEY })
|
|
184
|
+
},
|
|
185
|
+
onError: (error) => toast.error(String(error)),
|
|
186
|
+
})
|
|
187
|
+
|
|
188
|
+
if (installed.length === 0) {
|
|
189
|
+
return (
|
|
190
|
+
<section className="space-y-1">
|
|
191
|
+
<h3 className="text-sm font-semibold">{m.harness_panel_plugin_installed_title()}</h3>
|
|
192
|
+
<p className="text-xs text-muted-foreground">
|
|
193
|
+
{canManage
|
|
194
|
+
? m.harness_panel_plugin_installed_empty()
|
|
195
|
+
: m.harness_panel_plugin_installed_empty_readonly()}
|
|
196
|
+
</p>
|
|
197
|
+
</section>
|
|
198
|
+
)
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
return (
|
|
202
|
+
<section className="space-y-1">
|
|
203
|
+
<h3 className="text-sm font-semibold">{m.harness_panel_plugin_installed_title()}</h3>
|
|
204
|
+
<div className="space-y-1">
|
|
205
|
+
{installed.map((p) => {
|
|
206
|
+
const status = report
|
|
207
|
+
? dshActivationStatus(report, p.name)
|
|
208
|
+
: { key: "unknown" as const, missing: [], error: "" }
|
|
209
|
+
// 行级进行态:该行任一写操作在途(variables 持有本次入参,按 bundle 名匹配)
|
|
210
|
+
const rowPending =
|
|
211
|
+
(toggleMutation.isPending && toggleMutation.variables?.name === p.name) ||
|
|
212
|
+
(updateMutation.isPending && updateMutation.variables === p.name) ||
|
|
213
|
+
(removeMutation.isPending && removeMutation.variables === p.name)
|
|
214
|
+
const description = p.hasClientHalf
|
|
215
|
+
? `${installSourceLabel(p.spec)} · ${m.harness_plugin_dshClientHalf()}`
|
|
216
|
+
: installSourceLabel(p.spec)
|
|
217
|
+
// detail:spec 原文 + 激活诊断逐条(failed error / deactivated missing / 用户停用)
|
|
218
|
+
// + clientHalf 说明;四者皆空则不给展开(PluginRow 不渲染 chevron)
|
|
219
|
+
const detail: ReactNode =
|
|
220
|
+
p.spec ||
|
|
221
|
+
p.hasClientHalf ||
|
|
222
|
+
(status.key === "failed" && status.error) ||
|
|
223
|
+
(status.key === "deactivated" && status.missing.length > 0) ||
|
|
224
|
+
status.key === "disabled" ? (
|
|
225
|
+
<div className="space-y-1">
|
|
226
|
+
{p.spec && (
|
|
227
|
+
<p className="break-all font-mono text-xs text-muted-foreground">{p.spec}</p>
|
|
228
|
+
)}
|
|
229
|
+
{status.key === "failed" && status.error && (
|
|
230
|
+
<p className="break-all font-mono text-xs text-red-500">
|
|
231
|
+
{m.harness_plugin_errorLabel({ error: status.error })}
|
|
232
|
+
</p>
|
|
233
|
+
)}
|
|
234
|
+
{status.key === "deactivated" && status.missing.length > 0 && (
|
|
235
|
+
<p className="break-all font-mono text-xs text-orange-500">
|
|
236
|
+
{m.harness_plugin_missingServices({ services: status.missing.join(", ") })}
|
|
237
|
+
</p>
|
|
238
|
+
)}
|
|
239
|
+
{status.key === "disabled" && (
|
|
240
|
+
<p className="text-xs text-muted-foreground">
|
|
241
|
+
{m.harness_plugin_dshDisabledReason()}
|
|
242
|
+
</p>
|
|
243
|
+
)}
|
|
244
|
+
{p.hasClientHalf && (
|
|
245
|
+
<p className="text-xs text-orange-600">{m.harness_plugin_dshClientHalf()}</p>
|
|
246
|
+
)}
|
|
247
|
+
</div>
|
|
248
|
+
) : null
|
|
249
|
+
return (
|
|
250
|
+
<PluginRow
|
|
251
|
+
key={p.name}
|
|
252
|
+
testId={`installed-row-${p.name}`}
|
|
253
|
+
icon={<Puzzle className="size-6 text-muted-foreground" />}
|
|
254
|
+
title={p.name}
|
|
255
|
+
badges={
|
|
256
|
+
p.version ? (
|
|
257
|
+
<Badge variant="outline" className="px-1.5 py-0 text-[10px]">
|
|
258
|
+
{m.harness_plugin_version({ version: p.version })}
|
|
259
|
+
</Badge>
|
|
260
|
+
) : undefined
|
|
261
|
+
}
|
|
262
|
+
description={description}
|
|
263
|
+
meta={<PluginStatusDot status={status.key} />}
|
|
264
|
+
detail={detail}
|
|
265
|
+
expanded={expandedId === p.name}
|
|
266
|
+
onExpandedChange={(v) => setExpandedId(v ? p.name : null)}
|
|
267
|
+
switch={{
|
|
268
|
+
checked: !p.disabled,
|
|
269
|
+
disabled: !canManage || rowPending,
|
|
270
|
+
onCheckedChange: (enabled) =>
|
|
271
|
+
toggleMutation.mutate({ name: p.name, enabled }),
|
|
272
|
+
}}
|
|
273
|
+
menu={
|
|
274
|
+
<DropdownMenu>
|
|
275
|
+
<DropdownMenuTrigger
|
|
276
|
+
render={
|
|
277
|
+
<Button
|
|
278
|
+
variant="ghost"
|
|
279
|
+
size="icon"
|
|
280
|
+
className="size-6"
|
|
281
|
+
disabled={rowPending}
|
|
282
|
+
aria-label={m.harness_workspace_moreActions()}
|
|
283
|
+
/>
|
|
284
|
+
}
|
|
285
|
+
>
|
|
286
|
+
<MoreHorizontal className="size-3.5 text-muted-foreground" />
|
|
287
|
+
</DropdownMenuTrigger>
|
|
288
|
+
<DropdownMenuContent align="end">
|
|
289
|
+
<DropdownMenuItem
|
|
290
|
+
disabled={!canManage || rowPending}
|
|
291
|
+
onClick={() => setUpdateTarget(p.name)}
|
|
292
|
+
>
|
|
293
|
+
<ArrowUpCircle />
|
|
294
|
+
{m.harness_plugin_dshUpdateAction()}
|
|
295
|
+
</DropdownMenuItem>
|
|
296
|
+
<DropdownMenuItem
|
|
297
|
+
variant="destructive"
|
|
298
|
+
disabled={!canManage || rowPending}
|
|
299
|
+
onClick={() => setRemoveTarget(p.name)}
|
|
300
|
+
>
|
|
301
|
+
<Trash2 />
|
|
302
|
+
{m.harness_plugin_dshRemoveConfirm()}
|
|
303
|
+
</DropdownMenuItem>
|
|
304
|
+
</DropdownMenuContent>
|
|
305
|
+
</DropdownMenu>
|
|
306
|
+
}
|
|
307
|
+
/>
|
|
308
|
+
)
|
|
309
|
+
})}
|
|
310
|
+
</div>
|
|
311
|
+
|
|
312
|
+
{/* 更新确认(迁旧面板 L761-787 原样):五步更新含移旧/装新/回滚,提示中断回合。
|
|
313
|
+
ok:false 优雅失败 → 弹窗保持 open + reason 原文内联展示(对齐 install-dialog 三态模型) */}
|
|
314
|
+
<AlertDialog
|
|
315
|
+
open={updateTarget !== null}
|
|
316
|
+
onOpenChange={(open) => {
|
|
317
|
+
if (!open) closeUpdateDialog()
|
|
318
|
+
}}
|
|
319
|
+
>
|
|
320
|
+
<AlertDialogContent>
|
|
321
|
+
<AlertDialogHeader>
|
|
322
|
+
<AlertDialogTitle>{m.harness_plugin_dshUpdateTitle()}</AlertDialogTitle>
|
|
323
|
+
<AlertDialogDescription>
|
|
324
|
+
{m.harness_plugin_dshUpdateBody({ name: updateTarget ?? "" })}
|
|
325
|
+
</AlertDialogDescription>
|
|
326
|
+
</AlertDialogHeader>
|
|
327
|
+
{/* ok:false 内联原因原文(复用 harness_plugin_dshUpdateFailed,零新增 i18n 键) */}
|
|
328
|
+
{updateFailedReason && (
|
|
329
|
+
<p className="break-all text-sm text-red-500">
|
|
330
|
+
{m.harness_plugin_dshUpdateFailed({ reason: updateFailedReason })}
|
|
331
|
+
</p>
|
|
332
|
+
)}
|
|
333
|
+
<AlertDialogFooter>
|
|
334
|
+
<AlertDialogCancel onClick={closeUpdateDialog}>
|
|
335
|
+
{m.harness_plugin_dshUpdateCancel()}
|
|
336
|
+
</AlertDialogCancel>
|
|
337
|
+
<AlertDialogAction
|
|
338
|
+
onClick={() => {
|
|
339
|
+
if (updateTarget) updateMutation.mutate(updateTarget)
|
|
340
|
+
}}
|
|
341
|
+
>
|
|
342
|
+
{m.harness_plugin_dshUpdateConfirm()}
|
|
343
|
+
</AlertDialogAction>
|
|
344
|
+
</AlertDialogFooter>
|
|
345
|
+
</AlertDialogContent>
|
|
346
|
+
</AlertDialog>
|
|
347
|
+
|
|
348
|
+
{/* 移除确认(迁旧面板 L790-816 原样,禁原生 confirm) */}
|
|
349
|
+
<AlertDialog
|
|
350
|
+
open={removeTarget !== null}
|
|
351
|
+
onOpenChange={(open) => {
|
|
352
|
+
if (!open) setRemoveTarget(null)
|
|
353
|
+
}}
|
|
354
|
+
>
|
|
355
|
+
<AlertDialogContent>
|
|
356
|
+
<AlertDialogHeader>
|
|
357
|
+
<AlertDialogTitle>{m.harness_plugin_dshRemoveTitle()}</AlertDialogTitle>
|
|
358
|
+
<AlertDialogDescription>
|
|
359
|
+
{m.harness_plugin_dshRemoveBody({ name: removeTarget ?? "" })}
|
|
360
|
+
</AlertDialogDescription>
|
|
361
|
+
</AlertDialogHeader>
|
|
362
|
+
<AlertDialogFooter>
|
|
363
|
+
<AlertDialogCancel onClick={() => setRemoveTarget(null)}>
|
|
364
|
+
{m.harness_plugin_dshRemoveCancel()}
|
|
365
|
+
</AlertDialogCancel>
|
|
366
|
+
<AlertDialogAction
|
|
367
|
+
onClick={() => {
|
|
368
|
+
if (removeTarget) removeMutation.mutate(removeTarget)
|
|
369
|
+
}}
|
|
370
|
+
>
|
|
371
|
+
{m.harness_plugin_dshRemoveConfirm()}
|
|
372
|
+
</AlertDialogAction>
|
|
373
|
+
</AlertDialogFooter>
|
|
374
|
+
</AlertDialogContent>
|
|
375
|
+
</AlertDialog>
|
|
376
|
+
</section>
|
|
377
|
+
)
|
|
378
|
+
}
|
|
@@ -15,15 +15,21 @@
|
|
|
15
15
|
// You should have received a copy of the GNU Affero General Public License
|
|
16
16
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
17
|
|
|
18
|
-
// plugin kind(设计 §3.3):恒 on
|
|
19
|
-
// S28 裁决:
|
|
18
|
+
// plugin kind(设计 §3.3):恒 on。Guide 卡(order 50 第五卡)+ More 菜单行按 2026-11-19 裁决并存。
|
|
19
|
+
// S28 裁决:PluginPage onClose = 关闭自身 tab(按 kind 关——单实例 kind 固定 id = kind 名)。
|
|
20
|
+
// 注:无 shortcutId 属有意——plugin 无专属热键(registry 八条不含)。
|
|
21
|
+
// 注:不加 keepMounted 属有意——与 files/browser 一致,重挂载由 react-query 缓存兜底,无 PTY/滚动位置约束。
|
|
20
22
|
|
|
21
23
|
import { Puzzle } from "lucide-react"
|
|
22
|
-
import {
|
|
24
|
+
import { PluginPage } from "./plugin-page"
|
|
23
25
|
import type { DockPanelKind } from "@/components/harness/extension-panel/dock/dock-registry"
|
|
24
26
|
|
|
25
27
|
export interface PluginKindDeps {
|
|
26
28
|
title: string
|
|
29
|
+
/** Guide 卡标题(复用 More 行同款键 harness_panel_guide_plugin)。 */
|
|
30
|
+
guideTitle: string
|
|
31
|
+
/** Guide 卡描述(复用页头副标题键 harness_panel_plugin_subtitle)。 */
|
|
32
|
+
guideDescription: string
|
|
27
33
|
onClose: () => void
|
|
28
34
|
}
|
|
29
35
|
|
|
@@ -32,6 +38,13 @@ export function createPluginKind(deps: PluginKindDeps): DockPanelKind {
|
|
|
32
38
|
kind: "plugin",
|
|
33
39
|
title: deps.title,
|
|
34
40
|
icon: <Puzzle />,
|
|
35
|
-
render: () => <
|
|
41
|
+
render: () => <PluginPage onClose={deps.onClose} />,
|
|
42
|
+
// Guide 第五卡(order 50,居 files/terminal/browser/media 之后):与 More 行并存(三入口)
|
|
43
|
+
guide: {
|
|
44
|
+
order: 50,
|
|
45
|
+
title: deps.guideTitle,
|
|
46
|
+
description: deps.guideDescription,
|
|
47
|
+
icon: <Puzzle />,
|
|
48
|
+
},
|
|
36
49
|
}
|
|
37
50
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// AllBlue - 理想之海
|
|
3
|
+
// Copyright (C) 2026 AllBlue Contributors
|
|
4
|
+
|
|
5
|
+
// PendingBuildsBlock:PRE-3 待批准构建脚本常驻块(迁旧面板 DshTab 常驻块,逻辑不变、
|
|
6
|
+
// 位置改到页头下)。pending.length > 0 才由页面渲染;非管理员也可看待决策集,批准入口
|
|
7
|
+
// canManage 门控。由 PluginPage 装配。
|
|
8
|
+
|
|
9
|
+
import type { ReactElement } from "react"
|
|
10
|
+
import { ShieldAlert } from "lucide-react"
|
|
11
|
+
import { Button } from "@/components/ui/button"
|
|
12
|
+
import { m } from "@/paraglide/messages.js"
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* PRE-3 待批准构建脚本常驻块(迁旧面板 DshTab 常驻块,逻辑不变、位置改到页头下)。
|
|
16
|
+
* pending.length > 0 才由页面渲染;非管理员也可看待决策集,批准入口 canManage 门控。
|
|
17
|
+
*/
|
|
18
|
+
export function PendingBuildsBlock({
|
|
19
|
+
pending,
|
|
20
|
+
canManage,
|
|
21
|
+
approving,
|
|
22
|
+
onApprove,
|
|
23
|
+
}: {
|
|
24
|
+
pending: string[]
|
|
25
|
+
canManage: boolean
|
|
26
|
+
approving: boolean
|
|
27
|
+
onApprove: () => void
|
|
28
|
+
}): ReactElement {
|
|
29
|
+
return (
|
|
30
|
+
<section className="rounded-md border border-orange-500/40 bg-orange-500/5 p-2">
|
|
31
|
+
<p className="mb-1 flex items-center gap-1.5 text-xs font-medium text-orange-600">
|
|
32
|
+
<ShieldAlert className="size-3.5 shrink-0" />
|
|
33
|
+
{m.harness_plugin_dshPendingTitle()}
|
|
34
|
+
</p>
|
|
35
|
+
{/* text-[11px]/text-[10px] 系迁旧面板原样(构建名单 mono 密度对齐小字,非标准刻度既有先例) */}
|
|
36
|
+
<p className="mb-1.5 break-all font-mono text-[11px] text-muted-foreground">
|
|
37
|
+
{pending.join(", ")}
|
|
38
|
+
</p>
|
|
39
|
+
<p className="mb-2 text-[11px] text-muted-foreground">
|
|
40
|
+
{m.harness_plugin_dshPendingDescription()}
|
|
41
|
+
</p>
|
|
42
|
+
{canManage && (
|
|
43
|
+
<Button size="sm" variant="outline" className="h-7" disabled={approving} onClick={onApprove}>
|
|
44
|
+
{m.harness_plugin_dshApproveAction()}
|
|
45
|
+
</Button>
|
|
46
|
+
)}
|
|
47
|
+
</section>
|
|
48
|
+
)
|
|
49
|
+
}
|