@blade-hq/agent-react 2612.0.0-beta.4 → 2612.0.0-beta.40
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/README.md +22 -0
- package/dist/chat/AgentLoopBlock.d.ts +0 -2
- package/dist/chat/AssistantTurnBlock.d.ts +1 -9
- package/dist/chat/AttachmentPreviewDialog.d.ts +0 -1
- package/dist/chat/ChatLoadingIndicator.d.ts +7 -0
- package/dist/chat/ChatPanel.d.ts +1 -3
- package/dist/chat/ContextAttachmentPills.d.ts +4 -0
- package/dist/chat/CurrentPlanPanel.d.ts +0 -3
- package/dist/chat/FileDeliveryCards.d.ts +0 -4
- package/dist/chat/FinalArtifactCards.d.ts +0 -1
- package/dist/chat/LightComposer.d.ts +1 -1
- package/dist/chat/LiteMessageList.d.ts +1 -3
- package/dist/chat/MessageFileAttachmentList.d.ts +0 -5
- package/dist/chat/SessionReplayBar.d.ts +0 -1
- package/dist/chat/TextAttachmentPills.d.ts +0 -3
- package/dist/chat/TurnNavRail.d.ts +0 -3
- package/dist/chat/WorkflowRunBlock.d.ts +18 -4
- package/dist/chat/ai-elements/reasoning.d.ts +4 -4
- package/dist/chat/ai-elements/shimmer.d.ts +0 -4
- package/dist/chat/customization.d.ts +1 -5
- package/dist/chat/index.d.ts +1 -4
- package/dist/chat/lib/citations.d.ts +5 -22
- package/dist/chat/markdown/ExternalAnchor.d.ts +2 -2
- package/dist/chat/markdown/MarkdownContent.d.ts +3 -0
- package/dist/chat/message-list-blocks.d.ts +0 -1
- package/dist/chat/runtime/actions.d.ts +4 -3
- package/dist/chat/runtime/background-task-dismissals.d.ts +0 -1
- package/dist/chat/runtime/composer-channels.d.ts +4 -3
- package/dist/chat/runtime/input-cache-reset.d.ts +1 -6
- package/dist/chat/runtime/input-history-storage.d.ts +2 -0
- package/dist/chat/runtime/input-services.d.ts +0 -6
- package/dist/chat/runtime/session-source.d.ts +0 -5
- package/dist/chat/runtime/use-chat-actions.d.ts +0 -4
- package/dist/{chat-OCLOVB3H.css → chat-IHPRU35X.css} +5 -18
- package/dist/chat.css +5 -18
- package/dist/{chunk-FQQJP2GJ.js → chunk-5S4H3CJD.js} +676 -630
- package/dist/chunk-5S4H3CJD.js.map +1 -0
- package/dist/{chunk-5J54S5BK.js → chunk-5X6RBFGB.js} +3854 -2816
- package/dist/chunk-5X6RBFGB.js.map +1 -0
- package/dist/chunk-KUZPP6OU.js +577 -0
- package/dist/chunk-KUZPP6OU.js.map +1 -0
- package/dist/components/AccountConnectors.d.ts +13 -0
- package/dist/components/BrowserConnectionDialog.d.ts +7 -0
- package/dist/components/ChatInput.d.ts +4 -16
- package/dist/components/LlmAdvancedSettings.d.ts +0 -1
- package/dist/components/PlanUpdateBlock.d.ts +0 -1
- package/dist/components/SessionPluginConfigForm.d.ts +3 -1
- package/dist/components/TopicAssetSubmitDialog.d.ts +14 -0
- package/dist/components/plugin-connector.d.ts +2 -0
- package/dist/embed/blade-chat-element.d.ts +0 -8
- package/dist/embed/entry.d.ts +8 -19
- package/dist/hooks/use-message-pin.d.ts +1 -1
- package/dist/host.d.ts +0 -4
- package/dist/index.d.ts +2 -0
- package/dist/index.js +8 -4
- package/dist/internal.d.ts +6 -2
- package/dist/internal.js +18 -51
- package/dist/internal.js.map +1 -1
- package/dist/lib/message-shortcuts.d.ts +5 -0
- package/dist/rich-input/ChatInput.d.ts +1 -1
- package/dist/rich-input/ConnectButton.d.ts +0 -2
- package/dist/rich-input/FileCompletionMenu.d.ts +7 -11
- package/dist/rich-input/SkillStatusBar.d.ts +1 -9
- package/dist/rich-input/extensions/plugin-mention.d.ts +15 -0
- package/dist/rich-input/extensions/skill-mention.d.ts +3 -21
- package/dist/rich-input/extensions/topic-asset-mention.d.ts +13 -0
- package/dist/rich-input/index.d.ts +6 -3
- package/dist/rich-input/lib/composer-content.d.ts +15 -21
- package/dist/rich-input/lib/input-history-document.d.ts +3 -0
- package/dist/rich-input/lib/plugin-suggestions.d.ts +7 -0
- package/dist/rich-input/lib/reference-candidates.d.ts +26 -0
- package/dist/rich-input/lib/skill-suggestions.d.ts +1 -1
- package/dist/rich-input/lib/topic-asset-suggestions.d.ts +6 -0
- package/dist/rich-input/lib/user-home.d.ts +0 -17
- package/dist/rich-input/services.d.ts +2 -3
- package/dist/rich-input/use-input-history.d.ts +8 -8
- package/dist/rich-input/use-reference-candidates.d.ts +8 -0
- package/dist/rich-input/voice/VoiceWaveform.d.ts +0 -3
- package/dist/rich-input.js +4949 -4920
- package/dist/rich-input.js.map +1 -1
- package/dist/style.css +16 -55
- package/dist/style.full.css +23 -77
- package/node_modules/@floating-ui/core/LICENSE +20 -0
- package/node_modules/@floating-ui/core/README.md +4 -0
- package/node_modules/@floating-ui/core/dist/floating-ui.core.browser.min.mjs +1 -0
- package/node_modules/@floating-ui/core/dist/floating-ui.core.browser.mjs +1184 -0
- package/node_modules/@floating-ui/core/dist/floating-ui.core.d.mts +531 -0
- package/node_modules/@floating-ui/core/dist/floating-ui.core.d.ts +531 -0
- package/node_modules/@floating-ui/core/dist/floating-ui.core.esm.js +1058 -0
- package/node_modules/@floating-ui/core/dist/floating-ui.core.mjs +1058 -0
- package/node_modules/@floating-ui/core/dist/floating-ui.core.umd.js +1203 -0
- package/node_modules/@floating-ui/core/dist/floating-ui.core.umd.min.js +1 -0
- package/node_modules/@floating-ui/core/package.json +63 -0
- package/node_modules/@floating-ui/dom/LICENSE +20 -0
- package/node_modules/@floating-ui/dom/README.md +4 -0
- package/node_modules/@floating-ui/dom/dist/floating-ui.dom.browser.min.mjs +1 -0
- package/node_modules/@floating-ui/dom/dist/floating-ui.dom.browser.mjs +956 -0
- package/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.mts +358 -0
- package/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts +358 -0
- package/node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js +781 -0
- package/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs +781 -0
- package/node_modules/@floating-ui/dom/dist/floating-ui.dom.umd.js +975 -0
- package/node_modules/@floating-ui/dom/dist/floating-ui.dom.umd.min.js +1 -0
- package/node_modules/@floating-ui/dom/package.json +71 -0
- package/node_modules/@floating-ui/utils/LICENSE +20 -0
- package/node_modules/@floating-ui/utils/README.md +4 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.mts +103 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.ts +103 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.mts +47 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.ts +47 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.esm.js +165 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs +165 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.umd.js +192 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.umd.min.js +1 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.esm.js +136 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs +136 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.umd.js +167 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.umd.min.js +1 -0
- package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.d.ts +47 -0
- package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.esm.js +165 -0
- package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.umd.js +192 -0
- package/node_modules/@floating-ui/utils/dom/package.json +6 -0
- package/node_modules/@floating-ui/utils/package.json +70 -0
- package/node_modules/@radix-ui/primitive/LICENSE +21 -0
- package/node_modules/@radix-ui/primitive/README.md +3 -0
- package/node_modules/@radix-ui/primitive/dist/index.d.mts +20 -0
- package/node_modules/@radix-ui/primitive/dist/index.d.ts +20 -0
- package/node_modules/@radix-ui/primitive/dist/index.js +76 -0
- package/node_modules/@radix-ui/primitive/dist/index.js.map +7 -0
- package/node_modules/@radix-ui/primitive/dist/index.mjs +53 -0
- package/node_modules/@radix-ui/primitive/dist/index.mjs.map +7 -0
- package/node_modules/@radix-ui/primitive/package.json +47 -0
- package/node_modules/@radix-ui/react-collapsible/LICENSE +21 -0
- package/node_modules/@radix-ui/react-collapsible/README.md +3 -0
- package/node_modules/@radix-ui/react-collapsible/dist/index.d.mts +33 -0
- package/node_modules/@radix-ui/react-collapsible/dist/index.d.ts +33 -0
- package/node_modules/@radix-ui/react-collapsible/dist/index.js +187 -0
- package/node_modules/@radix-ui/react-collapsible/dist/index.js.map +7 -0
- package/node_modules/@radix-ui/react-collapsible/dist/index.mjs +155 -0
- package/node_modules/@radix-ui/react-collapsible/dist/index.mjs.map +7 -0
- package/node_modules/@radix-ui/react-collapsible/package.json +75 -0
- package/node_modules/@radix-ui/react-compose-refs/README.md +13 -0
- package/node_modules/@radix-ui/react-compose-refs/dist/index.d.mts +15 -0
- package/node_modules/@radix-ui/react-compose-refs/dist/index.d.ts +15 -0
- package/node_modules/@radix-ui/react-compose-refs/dist/index.js +74 -0
- package/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +7 -0
- package/node_modules/@radix-ui/react-compose-refs/dist/index.mjs +41 -0
- package/node_modules/@radix-ui/react-compose-refs/dist/index.mjs.map +7 -0
- package/node_modules/@radix-ui/react-compose-refs/package.json +75 -0
- package/node_modules/@radix-ui/react-context/README.md +13 -0
- package/node_modules/@radix-ui/react-context/dist/index.d.mts +21 -0
- package/node_modules/@radix-ui/react-context/dist/index.d.ts +21 -0
- package/node_modules/@radix-ui/react-context/dist/index.js +114 -0
- package/node_modules/@radix-ui/react-context/dist/index.js.map +7 -0
- package/node_modules/@radix-ui/react-context/dist/index.mjs +81 -0
- package/node_modules/@radix-ui/react-context/dist/index.mjs.map +7 -0
- package/node_modules/@radix-ui/react-context/package.json +75 -0
- package/node_modules/@radix-ui/react-id/README.md +13 -0
- package/node_modules/@radix-ui/react-id/dist/index.d.mts +3 -0
- package/node_modules/@radix-ui/react-id/dist/index.d.ts +3 -0
- package/node_modules/@radix-ui/react-id/dist/index.js +49 -0
- package/node_modules/@radix-ui/react-id/dist/index.js.map +7 -0
- package/node_modules/@radix-ui/react-id/dist/index.mjs +16 -0
- package/node_modules/@radix-ui/react-id/dist/index.mjs.map +7 -0
- package/node_modules/@radix-ui/react-id/package.json +78 -0
- package/node_modules/@radix-ui/react-presence/LICENSE +21 -0
- package/node_modules/@radix-ui/react-presence/README.md +3 -0
- package/node_modules/@radix-ui/react-presence/dist/index.d.mts +12 -0
- package/node_modules/@radix-ui/react-presence/dist/index.d.ts +12 -0
- package/node_modules/@radix-ui/react-presence/dist/index.js +171 -0
- package/node_modules/@radix-ui/react-presence/dist/index.js.map +7 -0
- package/node_modules/@radix-ui/react-presence/dist/index.mjs +139 -0
- package/node_modules/@radix-ui/react-presence/dist/index.mjs.map +7 -0
- package/node_modules/@radix-ui/react-presence/package.json +69 -0
- package/node_modules/@radix-ui/react-primitive/LICENSE +21 -0
- package/node_modules/@radix-ui/react-primitive/README.md +3 -0
- package/node_modules/@radix-ui/react-primitive/dist/index.d.mts +52 -0
- package/node_modules/@radix-ui/react-primitive/dist/index.d.ts +52 -0
- package/node_modules/@radix-ui/react-primitive/dist/index.js +80 -0
- package/node_modules/@radix-ui/react-primitive/dist/index.js.map +7 -0
- package/node_modules/@radix-ui/react-primitive/dist/index.mjs +47 -0
- package/node_modules/@radix-ui/react-primitive/dist/index.mjs.map +7 -0
- package/node_modules/@radix-ui/react-primitive/package.json +68 -0
- package/node_modules/@radix-ui/react-slot/LICENSE +21 -0
- package/node_modules/@radix-ui/react-slot/README.md +3 -0
- package/node_modules/@radix-ui/react-slot/dist/index.d.mts +17 -0
- package/node_modules/@radix-ui/react-slot/dist/index.d.ts +17 -0
- package/node_modules/@radix-ui/react-slot/dist/index.js +138 -0
- package/node_modules/@radix-ui/react-slot/dist/index.js.map +7 -0
- package/node_modules/@radix-ui/react-slot/dist/index.mjs +105 -0
- package/node_modules/@radix-ui/react-slot/dist/index.mjs.map +7 -0
- package/node_modules/@radix-ui/react-slot/package.json +63 -0
- package/node_modules/@radix-ui/react-use-controllable-state/LICENSE +21 -0
- package/node_modules/@radix-ui/react-use-controllable-state/README.md +3 -0
- package/node_modules/@radix-ui/react-use-controllable-state/dist/index.d.mts +40 -0
- package/node_modules/@radix-ui/react-use-controllable-state/dist/index.d.ts +40 -0
- package/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +169 -0
- package/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +7 -0
- package/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs +136 -0
- package/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs.map +7 -0
- package/node_modules/@radix-ui/react-use-controllable-state/package.json +64 -0
- package/node_modules/@radix-ui/react-use-effect-event/LICENSE +21 -0
- package/node_modules/@radix-ui/react-use-effect-event/README.md +5 -0
- package/node_modules/@radix-ui/react-use-effect-event/dist/index.d.mts +8 -0
- package/node_modules/@radix-ui/react-use-effect-event/dist/index.d.ts +8 -0
- package/node_modules/@radix-ui/react-use-effect-event/dist/index.js +60 -0
- package/node_modules/@radix-ui/react-use-effect-event/dist/index.js.map +7 -0
- package/node_modules/@radix-ui/react-use-effect-event/dist/index.mjs +27 -0
- package/node_modules/@radix-ui/react-use-effect-event/dist/index.mjs.map +7 -0
- package/node_modules/@radix-ui/react-use-effect-event/package.json +65 -0
- package/node_modules/@radix-ui/react-use-effect-event/src/index.ts +1 -0
- package/node_modules/@radix-ui/react-use-effect-event/src/use-effect-event.tsx +36 -0
- package/node_modules/@radix-ui/react-use-layout-effect/README.md +13 -0
- package/node_modules/@radix-ui/react-use-layout-effect/dist/index.d.mts +12 -0
- package/node_modules/@radix-ui/react-use-layout-effect/dist/index.d.ts +12 -0
- package/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +41 -0
- package/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +7 -0
- package/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs +8 -0
- package/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs.map +7 -0
- package/node_modules/@radix-ui/react-use-layout-effect/package.json +75 -0
- package/node_modules/@remirror/core-constants/LICENSE +21 -0
- package/node_modules/@remirror/core-constants/dist/_tsup-dts-rollup.d.cts +612 -0
- package/node_modules/@remirror/core-constants/dist/_tsup-dts-rollup.d.ts +612 -0
- package/node_modules/@remirror/core-constants/dist/remirror-core-constants.cjs +314 -0
- package/node_modules/@remirror/core-constants/dist/remirror-core-constants.d.cts +20 -0
- package/node_modules/@remirror/core-constants/dist/remirror-core-constants.d.ts +20 -0
- package/node_modules/@remirror/core-constants/dist/remirror-core-constants.js +269 -0
- package/node_modules/@remirror/core-constants/dist-types/core-constants.d.ts +431 -0
- package/node_modules/@remirror/core-constants/dist-types/error-constants.d.ts +119 -0
- package/node_modules/@remirror/core-constants/dist-types/index.d.ts +2 -0
- package/node_modules/@remirror/core-constants/dist-types/tsconfig.tsbuildinfo +1 -0
- package/node_modules/@remirror/core-constants/package.json +45 -0
- package/node_modules/@remirror/core-constants/readme.md +17 -0
- package/node_modules/@tiptap/core/LICENSE.md +21 -0
- package/node_modules/@tiptap/core/README.md +18 -0
- package/node_modules/@tiptap/core/dist/index.cjs +7126 -0
- package/node_modules/@tiptap/core/dist/index.cjs.map +1 -0
- package/node_modules/@tiptap/core/dist/index.d.cts +4954 -0
- package/node_modules/@tiptap/core/dist/index.d.ts +4954 -0
- package/node_modules/@tiptap/core/dist/index.js +6992 -0
- package/node_modules/@tiptap/core/dist/index.js.map +1 -0
- package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.cjs +56 -0
- package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.cjs.map +1 -0
- package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.d.cts +23 -0
- package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.d.ts +23 -0
- package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +26 -0
- package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js.map +1 -0
- package/node_modules/@tiptap/core/jsx-dev-runtime/index.cjs +1 -0
- package/node_modules/@tiptap/core/jsx-dev-runtime/index.d.cts +1 -0
- package/node_modules/@tiptap/core/jsx-dev-runtime/index.d.ts +1 -0
- package/node_modules/@tiptap/core/jsx-dev-runtime/index.js +1 -0
- package/node_modules/@tiptap/core/jsx-runtime/index.cjs +1 -0
- package/node_modules/@tiptap/core/jsx-runtime/index.d.cts +1 -0
- package/node_modules/@tiptap/core/jsx-runtime/index.d.ts +1 -0
- package/node_modules/@tiptap/core/jsx-runtime/index.js +1 -0
- package/node_modules/@tiptap/core/package.json +70 -0
- package/node_modules/@tiptap/core/src/CommandManager.ts +138 -0
- package/node_modules/@tiptap/core/src/Editor.ts +806 -0
- package/node_modules/@tiptap/core/src/EventEmitter.ts +58 -0
- package/node_modules/@tiptap/core/src/Extendable.ts +602 -0
- package/node_modules/@tiptap/core/src/Extension.ts +55 -0
- package/node_modules/@tiptap/core/src/ExtensionManager.ts +440 -0
- package/node_modules/@tiptap/core/src/InputRule.ts +290 -0
- package/node_modules/@tiptap/core/src/Mark.ts +211 -0
- package/node_modules/@tiptap/core/src/MarkView.ts +122 -0
- package/node_modules/@tiptap/core/src/Node.ts +377 -0
- package/node_modules/@tiptap/core/src/NodePos.ts +257 -0
- package/node_modules/@tiptap/core/src/NodeView.ts +339 -0
- package/node_modules/@tiptap/core/src/PasteRule.ts +373 -0
- package/node_modules/@tiptap/core/src/Tracker.ts +36 -0
- package/node_modules/@tiptap/core/src/__tests__/transformPastedHTML.test.ts +575 -0
- package/node_modules/@tiptap/core/src/commands/blur.ts +29 -0
- package/node_modules/@tiptap/core/src/commands/clearContent.ts +25 -0
- package/node_modules/@tiptap/core/src/commands/clearNodes.ts +57 -0
- package/node_modules/@tiptap/core/src/commands/command.ts +22 -0
- package/node_modules/@tiptap/core/src/commands/createParagraphNear.ts +21 -0
- package/node_modules/@tiptap/core/src/commands/cut.ts +36 -0
- package/node_modules/@tiptap/core/src/commands/deleteCurrentNode.ts +44 -0
- package/node_modules/@tiptap/core/src/commands/deleteNode.ts +41 -0
- package/node_modules/@tiptap/core/src/commands/deleteRange.ts +26 -0
- package/node_modules/@tiptap/core/src/commands/deleteSelection.ts +21 -0
- package/node_modules/@tiptap/core/src/commands/enter.ts +19 -0
- package/node_modules/@tiptap/core/src/commands/exitCode.ts +21 -0
- package/node_modules/@tiptap/core/src/commands/extendMarkRange.ts +51 -0
- package/node_modules/@tiptap/core/src/commands/first.ts +26 -0
- package/node_modules/@tiptap/core/src/commands/focus.ts +108 -0
- package/node_modules/@tiptap/core/src/commands/forEach.ts +24 -0
- package/node_modules/@tiptap/core/src/commands/index.ts +57 -0
- package/node_modules/@tiptap/core/src/commands/insertContent.ts +46 -0
- package/node_modules/@tiptap/core/src/commands/insertContentAt.ts +212 -0
- package/node_modules/@tiptap/core/src/commands/join.ts +69 -0
- package/node_modules/@tiptap/core/src/commands/joinItemBackward.ts +37 -0
- package/node_modules/@tiptap/core/src/commands/joinItemForward.ts +37 -0
- package/node_modules/@tiptap/core/src/commands/joinTextblockBackward.ts +20 -0
- package/node_modules/@tiptap/core/src/commands/joinTextblockForward.ts +20 -0
- package/node_modules/@tiptap/core/src/commands/keyboardShortcut.ts +100 -0
- package/node_modules/@tiptap/core/src/commands/lift.ts +34 -0
- package/node_modules/@tiptap/core/src/commands/liftEmptyBlock.ts +21 -0
- package/node_modules/@tiptap/core/src/commands/liftListItem.ts +26 -0
- package/node_modules/@tiptap/core/src/commands/newlineInCode.ts +21 -0
- package/node_modules/@tiptap/core/src/commands/resetAttributes.ts +73 -0
- package/node_modules/@tiptap/core/src/commands/scrollIntoView.ts +23 -0
- package/node_modules/@tiptap/core/src/commands/selectAll.ts +27 -0
- package/node_modules/@tiptap/core/src/commands/selectNodeBackward.ts +21 -0
- package/node_modules/@tiptap/core/src/commands/selectNodeForward.ts +21 -0
- package/node_modules/@tiptap/core/src/commands/selectParentNode.ts +21 -0
- package/node_modules/@tiptap/core/src/commands/selectTextblockEnd.ts +23 -0
- package/node_modules/@tiptap/core/src/commands/selectTextblockStart.ts +23 -0
- package/node_modules/@tiptap/core/src/commands/setContent.ts +76 -0
- package/node_modules/@tiptap/core/src/commands/setMark.ts +118 -0
- package/node_modules/@tiptap/core/src/commands/setMeta.ts +25 -0
- package/node_modules/@tiptap/core/src/commands/setNode.ts +57 -0
- package/node_modules/@tiptap/core/src/commands/setNodeSelection.ts +31 -0
- package/node_modules/@tiptap/core/src/commands/setTextDirection.ts +51 -0
- package/node_modules/@tiptap/core/src/commands/setTextSelection.ts +35 -0
- package/node_modules/@tiptap/core/src/commands/sinkListItem.ts +26 -0
- package/node_modules/@tiptap/core/src/commands/splitBlock.ts +115 -0
- package/node_modules/@tiptap/core/src/commands/splitListItem.ts +149 -0
- package/node_modules/@tiptap/core/src/commands/toggleList.ts +159 -0
- package/node_modules/@tiptap/core/src/commands/toggleMark.ts +51 -0
- package/node_modules/@tiptap/core/src/commands/toggleNode.ts +47 -0
- package/node_modules/@tiptap/core/src/commands/toggleWrap.ts +32 -0
- package/node_modules/@tiptap/core/src/commands/undoInputRule.ts +49 -0
- package/node_modules/@tiptap/core/src/commands/unsetAllMarks.ts +32 -0
- package/node_modules/@tiptap/core/src/commands/unsetMark.ts +65 -0
- package/node_modules/@tiptap/core/src/commands/unsetTextDirection.ts +51 -0
- package/node_modules/@tiptap/core/src/commands/updateAttributes.ts +150 -0
- package/node_modules/@tiptap/core/src/commands/wrapIn.ts +27 -0
- package/node_modules/@tiptap/core/src/commands/wrapInList.ts +27 -0
- package/node_modules/@tiptap/core/src/extensions/clipboardTextSerializer.ts +44 -0
- package/node_modules/@tiptap/core/src/extensions/commands.ts +14 -0
- package/node_modules/@tiptap/core/src/extensions/delete.ts +89 -0
- package/node_modules/@tiptap/core/src/extensions/drop.ts +26 -0
- package/node_modules/@tiptap/core/src/extensions/editable.ts +18 -0
- package/node_modules/@tiptap/core/src/extensions/focusEvents.ts +41 -0
- package/node_modules/@tiptap/core/src/extensions/index.ts +10 -0
- package/node_modules/@tiptap/core/src/extensions/keymap.ts +160 -0
- package/node_modules/@tiptap/core/src/extensions/paste.ts +25 -0
- package/node_modules/@tiptap/core/src/extensions/tabindex.ts +18 -0
- package/node_modules/@tiptap/core/src/extensions/textDirection.ts +86 -0
- package/node_modules/@tiptap/core/src/helpers/MappablePosition.ts +66 -0
- package/node_modules/@tiptap/core/src/helpers/combineTransactionSteps.ts +21 -0
- package/node_modules/@tiptap/core/src/helpers/createChainableState.ts +39 -0
- package/node_modules/@tiptap/core/src/helpers/createDocument.ts +24 -0
- package/node_modules/@tiptap/core/src/helpers/createNodeFromContent.ts +119 -0
- package/node_modules/@tiptap/core/src/helpers/defaultBlockAt.ts +18 -0
- package/node_modules/@tiptap/core/src/helpers/findChildren.ts +24 -0
- package/node_modules/@tiptap/core/src/helpers/findChildrenInRange.ts +36 -0
- package/node_modules/@tiptap/core/src/helpers/findParentNode.ts +18 -0
- package/node_modules/@tiptap/core/src/helpers/findParentNodeClosestToPos.ts +37 -0
- package/node_modules/@tiptap/core/src/helpers/flattenExtensions.ts +30 -0
- package/node_modules/@tiptap/core/src/helpers/generateHTML.ts +18 -0
- package/node_modules/@tiptap/core/src/helpers/generateJSON.ts +18 -0
- package/node_modules/@tiptap/core/src/helpers/generateText.ts +34 -0
- package/node_modules/@tiptap/core/src/helpers/getAttributes.ts +29 -0
- package/node_modules/@tiptap/core/src/helpers/getAttributesFromExtensions.ts +122 -0
- package/node_modules/@tiptap/core/src/helpers/getChangedRanges.ts +85 -0
- package/node_modules/@tiptap/core/src/helpers/getDebugJSON.ts +54 -0
- package/node_modules/@tiptap/core/src/helpers/getExtensionField.ts +32 -0
- package/node_modules/@tiptap/core/src/helpers/getHTMLFromFragment.ts +13 -0
- package/node_modules/@tiptap/core/src/helpers/getMarkAttributes.ts +30 -0
- package/node_modules/@tiptap/core/src/helpers/getMarkRange.ts +90 -0
- package/node_modules/@tiptap/core/src/helpers/getMarkType.ts +13 -0
- package/node_modules/@tiptap/core/src/helpers/getMarksBetween.ts +44 -0
- package/node_modules/@tiptap/core/src/helpers/getNodeAtPosition.ts +29 -0
- package/node_modules/@tiptap/core/src/helpers/getNodeAttributes.ts +22 -0
- package/node_modules/@tiptap/core/src/helpers/getNodeType.ts +13 -0
- package/node_modules/@tiptap/core/src/helpers/getRenderedAttributes.ts +23 -0
- package/node_modules/@tiptap/core/src/helpers/getSchema.ts +12 -0
- package/node_modules/@tiptap/core/src/helpers/getSchemaByResolvedExtensions.ts +183 -0
- package/node_modules/@tiptap/core/src/helpers/getSchemaTypeByName.ts +11 -0
- package/node_modules/@tiptap/core/src/helpers/getSchemaTypeNameByName.ts +19 -0
- package/node_modules/@tiptap/core/src/helpers/getSplittedAttributes.ts +28 -0
- package/node_modules/@tiptap/core/src/helpers/getText.ts +28 -0
- package/node_modules/@tiptap/core/src/helpers/getTextBetween.ts +52 -0
- package/node_modules/@tiptap/core/src/helpers/getTextContentFromNodes.ts +29 -0
- package/node_modules/@tiptap/core/src/helpers/getTextSerializersFromSchema.ts +16 -0
- package/node_modules/@tiptap/core/src/helpers/index.ts +55 -0
- package/node_modules/@tiptap/core/src/helpers/injectExtensionAttributesToParseRule.ts +47 -0
- package/node_modules/@tiptap/core/src/helpers/isActive.ts +23 -0
- package/node_modules/@tiptap/core/src/helpers/isAtEndOfNode.ts +29 -0
- package/node_modules/@tiptap/core/src/helpers/isAtStartOfNode.ts +11 -0
- package/node_modules/@tiptap/core/src/helpers/isExtensionRulesEnabled.ts +13 -0
- package/node_modules/@tiptap/core/src/helpers/isList.ts +27 -0
- package/node_modules/@tiptap/core/src/helpers/isMarkActive.ts +94 -0
- package/node_modules/@tiptap/core/src/helpers/isNodeActive.ts +51 -0
- package/node_modules/@tiptap/core/src/helpers/isNodeEmpty.ts +62 -0
- package/node_modules/@tiptap/core/src/helpers/isNodeSelection.ts +5 -0
- package/node_modules/@tiptap/core/src/helpers/isTextSelection.ts +5 -0
- package/node_modules/@tiptap/core/src/helpers/posToDOMRect.ts +35 -0
- package/node_modules/@tiptap/core/src/helpers/resolveExtensions.ts +25 -0
- package/node_modules/@tiptap/core/src/helpers/resolveFocusPosition.ts +31 -0
- package/node_modules/@tiptap/core/src/helpers/rewriteUnknownContent.ts +149 -0
- package/node_modules/@tiptap/core/src/helpers/selectionToInsertionEnd.ts +29 -0
- package/node_modules/@tiptap/core/src/helpers/sortExtensions.ts +26 -0
- package/node_modules/@tiptap/core/src/helpers/splitExtensions.ts +16 -0
- package/node_modules/@tiptap/core/src/index.ts +28 -0
- package/node_modules/@tiptap/core/src/inputRules/index.ts +5 -0
- package/node_modules/@tiptap/core/src/inputRules/markInputRule.ts +68 -0
- package/node_modules/@tiptap/core/src/inputRules/nodeInputRule.ts +73 -0
- package/node_modules/@tiptap/core/src/inputRules/textInputRule.ts +35 -0
- package/node_modules/@tiptap/core/src/inputRules/textblockTypeInputRule.ts +35 -0
- package/node_modules/@tiptap/core/src/inputRules/wrappingInputRule.ts +82 -0
- package/node_modules/@tiptap/core/src/jsx-runtime.ts +65 -0
- package/node_modules/@tiptap/core/src/lib/ResizableNodeView.ts +1060 -0
- package/node_modules/@tiptap/core/src/lib/index.ts +1 -0
- package/node_modules/@tiptap/core/src/pasteRules/index.ts +3 -0
- package/node_modules/@tiptap/core/src/pasteRules/markPasteRule.ts +71 -0
- package/node_modules/@tiptap/core/src/pasteRules/nodePasteRule.ts +44 -0
- package/node_modules/@tiptap/core/src/pasteRules/textPasteRule.ts +34 -0
- package/node_modules/@tiptap/core/src/style.ts +71 -0
- package/node_modules/@tiptap/core/src/types.ts +1058 -0
- package/node_modules/@tiptap/core/src/utilities/callOrReturn.ts +21 -0
- package/node_modules/@tiptap/core/src/utilities/canInsertNode.ts +30 -0
- package/node_modules/@tiptap/core/src/utilities/createStyleTag.ts +21 -0
- package/node_modules/@tiptap/core/src/utilities/deleteProps.ts +16 -0
- package/node_modules/@tiptap/core/src/utilities/elementFromString.ts +27 -0
- package/node_modules/@tiptap/core/src/utilities/escapeForRegEx.ts +4 -0
- package/node_modules/@tiptap/core/src/utilities/findDuplicates.ts +8 -0
- package/node_modules/@tiptap/core/src/utilities/fromString.ts +19 -0
- package/node_modules/@tiptap/core/src/utilities/index.ts +26 -0
- package/node_modules/@tiptap/core/src/utilities/isAndroid.ts +3 -0
- package/node_modules/@tiptap/core/src/utilities/isEmptyObject.ts +3 -0
- package/node_modules/@tiptap/core/src/utilities/isFirefox.ts +11 -0
- package/node_modules/@tiptap/core/src/utilities/isFunction.ts +4 -0
- package/node_modules/@tiptap/core/src/utilities/isMacOS.ts +3 -0
- package/node_modules/@tiptap/core/src/utilities/isNumber.ts +3 -0
- package/node_modules/@tiptap/core/src/utilities/isPlainObject.ts +13 -0
- package/node_modules/@tiptap/core/src/utilities/isRegExp.ts +3 -0
- package/node_modules/@tiptap/core/src/utilities/isSafari.ts +11 -0
- package/node_modules/@tiptap/core/src/utilities/isString.ts +3 -0
- package/node_modules/@tiptap/core/src/utilities/isiOS.ts +7 -0
- package/node_modules/@tiptap/core/src/utilities/markdown/attributeUtils.ts +130 -0
- package/node_modules/@tiptap/core/src/utilities/markdown/createAtomBlockMarkdownSpec.ts +141 -0
- package/node_modules/@tiptap/core/src/utilities/markdown/createBlockMarkdownSpec.ts +225 -0
- package/node_modules/@tiptap/core/src/utilities/markdown/createInlineMarkdownSpec.ts +282 -0
- package/node_modules/@tiptap/core/src/utilities/markdown/index.ts +13 -0
- package/node_modules/@tiptap/core/src/utilities/markdown/parseIndentedBlocks.ts +194 -0
- package/node_modules/@tiptap/core/src/utilities/markdown/renderNestedMarkdownContent.ts +96 -0
- package/node_modules/@tiptap/core/src/utilities/mergeAttributes.ts +109 -0
- package/node_modules/@tiptap/core/src/utilities/mergeDeep.ts +17 -0
- package/node_modules/@tiptap/core/src/utilities/minMax.ts +3 -0
- package/node_modules/@tiptap/core/src/utilities/objectIncludes.ts +30 -0
- package/node_modules/@tiptap/core/src/utilities/removeDuplicates.ts +13 -0
- package/node_modules/@tiptap/extension-bubble-menu/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-bubble-menu/README.md +18 -0
- package/node_modules/@tiptap/extension-bubble-menu/dist/index.cjs +462 -0
- package/node_modules/@tiptap/extension-bubble-menu/dist/index.cjs.map +1 -0
- package/node_modules/@tiptap/extension-bubble-menu/dist/index.d.cts +169 -0
- package/node_modules/@tiptap/extension-bubble-menu/dist/index.d.ts +169 -0
- package/node_modules/@tiptap/extension-bubble-menu/dist/index.js +443 -0
- package/node_modules/@tiptap/extension-bubble-menu/dist/index.js.map +1 -0
- package/node_modules/@tiptap/extension-bubble-menu/package.json +54 -0
- package/node_modules/@tiptap/extension-bubble-menu/src/bubble-menu-plugin.ts +650 -0
- package/node_modules/@tiptap/extension-bubble-menu/src/bubble-menu.ts +50 -0
- package/node_modules/@tiptap/extension-bubble-menu/src/index.ts +6 -0
- package/node_modules/@tiptap/extension-floating-menu/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-floating-menu/README.md +18 -0
- package/node_modules/@tiptap/extension-floating-menu/dist/index.cjs +380 -0
- package/node_modules/@tiptap/extension-floating-menu/dist/index.cjs.map +1 -0
- package/node_modules/@tiptap/extension-floating-menu/dist/index.d.cts +179 -0
- package/node_modules/@tiptap/extension-floating-menu/dist/index.d.ts +179 -0
- package/node_modules/@tiptap/extension-floating-menu/dist/index.js +361 -0
- package/node_modules/@tiptap/extension-floating-menu/dist/index.js.map +1 -0
- package/node_modules/@tiptap/extension-floating-menu/package.json +53 -0
- package/node_modules/@tiptap/extension-floating-menu/src/floating-menu-plugin.ts +525 -0
- package/node_modules/@tiptap/extension-floating-menu/src/floating-menu.ts +77 -0
- package/node_modules/@tiptap/extension-floating-menu/src/index.ts +6 -0
- package/node_modules/@tiptap/extension-mention/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-mention/README.md +18 -0
- package/node_modules/@tiptap/extension-mention/dist/index.cjs +277 -0
- package/node_modules/@tiptap/extension-mention/dist/index.cjs.map +1 -0
- package/node_modules/@tiptap/extension-mention/dist/index.d.cts +93 -0
- package/node_modules/@tiptap/extension-mention/dist/index.d.ts +93 -0
- package/node_modules/@tiptap/extension-mention/dist/index.js +250 -0
- package/node_modules/@tiptap/extension-mention/dist/index.js.map +1 -0
- package/node_modules/@tiptap/extension-mention/package.json +52 -0
- package/node_modules/@tiptap/extension-mention/src/index.ts +5 -0
- package/node_modules/@tiptap/extension-mention/src/mention.ts +357 -0
- package/node_modules/@tiptap/extension-mention/src/utils/get-default-suggestion-attributes.ts +89 -0
- package/node_modules/@tiptap/pm/LICENSE.md +21 -0
- package/node_modules/@tiptap/pm/README.md +22 -0
- package/node_modules/@tiptap/pm/changeset/index.ts +1 -0
- package/node_modules/@tiptap/pm/collab/index.ts +1 -0
- package/node_modules/@tiptap/pm/commands/index.ts +1 -0
- package/node_modules/@tiptap/pm/dist/changeset/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/changeset/index.d.cts +18 -0
- package/node_modules/@tiptap/pm/dist/changeset/index.d.ts +18 -0
- package/node_modules/@tiptap/pm/dist/changeset/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/collab/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/collab/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/collab/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/collab/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/commands/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/commands/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/commands/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/commands/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/dropcursor/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/dropcursor/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/dropcursor/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/dropcursor/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/gapcursor/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/gapcursor/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/gapcursor/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/gapcursor/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/history/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/history/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/history/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/history/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/inputrules/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/inputrules/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/inputrules/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/inputrules/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/keymap/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/keymap/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/keymap/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/keymap/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/markdown/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/markdown/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/markdown/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/markdown/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/menu/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/menu/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/menu/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/menu/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/model/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/model/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/model/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/model/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/schema-basic/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/schema-basic/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/schema-basic/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/schema-basic/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/schema-list/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/schema-list/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/schema-list/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/schema-list/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/state/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/state/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/state/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/state/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/tables/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/tables/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/tables/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/tables/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/trailing-node/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/trailing-node/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/trailing-node/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/trailing-node/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/transform/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/transform/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/transform/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/transform/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/view/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/view/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/view/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/view/index.js +2 -0
- package/node_modules/@tiptap/pm/dropcursor/index.ts +1 -0
- package/node_modules/@tiptap/pm/gapcursor/index.ts +1 -0
- package/node_modules/@tiptap/pm/history/index.ts +1 -0
- package/node_modules/@tiptap/pm/inputrules/index.ts +1 -0
- package/node_modules/@tiptap/pm/keymap/index.ts +1 -0
- package/node_modules/@tiptap/pm/markdown/index.ts +1 -0
- package/node_modules/@tiptap/pm/menu/index.ts +1 -0
- package/node_modules/@tiptap/pm/model/index.ts +1 -0
- package/node_modules/@tiptap/pm/package.json +211 -0
- package/node_modules/@tiptap/pm/schema-basic/index.ts +1 -0
- package/node_modules/@tiptap/pm/schema-list/index.ts +1 -0
- package/node_modules/@tiptap/pm/state/index.ts +1 -0
- package/node_modules/@tiptap/pm/tables/index.ts +1 -0
- package/node_modules/@tiptap/pm/trailing-node/index.ts +1 -0
- package/node_modules/@tiptap/pm/transform/index.ts +1 -0
- package/node_modules/@tiptap/pm/view/index.ts +1 -0
- package/node_modules/@tiptap/react/LICENSE.md +21 -0
- package/node_modules/@tiptap/react/README.md +18 -0
- package/node_modules/@tiptap/react/dist/index.cjs +1195 -0
- package/node_modules/@tiptap/react/dist/index.cjs.map +1 -0
- package/node_modules/@tiptap/react/dist/index.d.cts +534 -0
- package/node_modules/@tiptap/react/dist/index.d.ts +534 -0
- package/node_modules/@tiptap/react/dist/index.js +1131 -0
- package/node_modules/@tiptap/react/dist/index.js.map +1 -0
- package/node_modules/@tiptap/react/dist/menus/index.cjs +499 -0
- package/node_modules/@tiptap/react/dist/menus/index.cjs.map +1 -0
- package/node_modules/@tiptap/react/dist/menus/index.d.cts +19 -0
- package/node_modules/@tiptap/react/dist/menus/index.d.ts +19 -0
- package/node_modules/@tiptap/react/dist/menus/index.js +461 -0
- package/node_modules/@tiptap/react/dist/menus/index.js.map +1 -0
- package/node_modules/@tiptap/react/package.json +76 -0
- package/node_modules/@tiptap/react/src/Context.tsx +60 -0
- package/node_modules/@tiptap/react/src/Editor.ts +13 -0
- package/node_modules/@tiptap/react/src/EditorContent.tsx +229 -0
- package/node_modules/@tiptap/react/src/NodeViewContent.tsx +30 -0
- package/node_modules/@tiptap/react/src/NodeViewWrapper.tsx +27 -0
- package/node_modules/@tiptap/react/src/ReactMarkViewRenderer.tsx +106 -0
- package/node_modules/@tiptap/react/src/ReactNodeViewRenderer.tsx +387 -0
- package/node_modules/@tiptap/react/src/ReactRenderer.tsx +282 -0
- package/node_modules/@tiptap/react/src/Tiptap.tsx +224 -0
- package/node_modules/@tiptap/react/src/index.ts +13 -0
- package/node_modules/@tiptap/react/src/menus/BubbleMenu.spec.ts +174 -0
- package/node_modules/@tiptap/react/src/menus/BubbleMenu.tsx +153 -0
- package/node_modules/@tiptap/react/src/menus/FloatingMenu.spec.ts +164 -0
- package/node_modules/@tiptap/react/src/menus/FloatingMenu.tsx +137 -0
- package/node_modules/@tiptap/react/src/menus/getAutoPluginKey.ts +5 -0
- package/node_modules/@tiptap/react/src/menus/index.ts +2 -0
- package/node_modules/@tiptap/react/src/menus/useMenuElementProps.ts +354 -0
- package/node_modules/@tiptap/react/src/types.ts +6 -0
- package/node_modules/@tiptap/react/src/useEditor.ts +382 -0
- package/node_modules/@tiptap/react/src/useEditorState.ts +173 -0
- package/node_modules/@tiptap/react/src/useReactNodeView.ts +28 -0
- package/node_modules/@tiptap/suggestion/LICENSE.md +21 -0
- package/node_modules/@tiptap/suggestion/README.md +18 -0
- package/node_modules/@tiptap/suggestion/dist/index.cjs +369 -0
- package/node_modules/@tiptap/suggestion/dist/index.cjs.map +1 -0
- package/node_modules/@tiptap/suggestion/dist/index.d.cts +213 -0
- package/node_modules/@tiptap/suggestion/dist/index.d.ts +213 -0
- package/node_modules/@tiptap/suggestion/dist/index.js +339 -0
- package/node_modules/@tiptap/suggestion/dist/index.js.map +1 -0
- package/node_modules/@tiptap/suggestion/package.json +50 -0
- package/node_modules/@tiptap/suggestion/src/__tests__/suggestion.test.ts +127 -0
- package/node_modules/@tiptap/suggestion/src/findSuggestionMatch.ts +79 -0
- package/node_modules/@tiptap/suggestion/src/index.ts +8 -0
- package/node_modules/@tiptap/suggestion/src/suggestion.ts +585 -0
- package/node_modules/@types/linkify-it/LICENSE +21 -0
- package/node_modules/@types/linkify-it/README.md +15 -0
- package/node_modules/@types/linkify-it/build/index.cjs.d.ts +178 -0
- package/node_modules/@types/linkify-it/index.d.mts +174 -0
- package/node_modules/@types/linkify-it/index.d.ts +3 -0
- package/node_modules/@types/linkify-it/package.json +50 -0
- package/node_modules/@types/markdown-it/LICENSE +21 -0
- package/node_modules/@types/markdown-it/README.md +15 -0
- package/node_modules/@types/markdown-it/dist/index.cjs.d.ts +1236 -0
- package/node_modules/@types/markdown-it/dist/markdown-it.d.ts +5 -0
- package/node_modules/@types/markdown-it/dist/markdown-it.min.d.ts +5 -0
- package/node_modules/@types/markdown-it/index.d.mts +1 -0
- package/node_modules/@types/markdown-it/index.d.ts +3 -0
- package/node_modules/@types/markdown-it/lib/common/html_blocks.d.mts +7 -0
- package/node_modules/@types/markdown-it/lib/common/html_re.d.mts +2 -0
- package/node_modules/@types/markdown-it/lib/common/utils.d.mts +62 -0
- package/node_modules/@types/markdown-it/lib/helpers/index.d.mts +5 -0
- package/node_modules/@types/markdown-it/lib/helpers/parse_link_destination.d.mts +7 -0
- package/node_modules/@types/markdown-it/lib/helpers/parse_link_label.d.mts +3 -0
- package/node_modules/@types/markdown-it/lib/helpers/parse_link_title.d.mts +29 -0
- package/node_modules/@types/markdown-it/lib/index.d.mts +404 -0
- package/node_modules/@types/markdown-it/lib/parser_block.d.mts +25 -0
- package/node_modules/@types/markdown-it/lib/parser_core.d.mts +18 -0
- package/node_modules/@types/markdown-it/lib/parser_inline.d.mts +38 -0
- package/node_modules/@types/markdown-it/lib/renderer.d.mts +96 -0
- package/node_modules/@types/markdown-it/lib/ruler.d.mts +158 -0
- package/node_modules/@types/markdown-it/lib/rules_block/state_block.d.mts +124 -0
- package/node_modules/@types/markdown-it/lib/rules_core/state_core.d.mts +18 -0
- package/node_modules/@types/markdown-it/lib/rules_inline/state_inline.d.mts +73 -0
- package/node_modules/@types/markdown-it/lib/token.d.mts +108 -0
- package/node_modules/@types/markdown-it/package.json +54 -0
- package/node_modules/@types/mdurl/LICENSE +21 -0
- package/node_modules/@types/mdurl/README.md +15 -0
- package/node_modules/@types/mdurl/build/index.cjs.d.ts +52 -0
- package/node_modules/@types/mdurl/index.d.mts +6 -0
- package/node_modules/@types/mdurl/index.d.ts +3 -0
- package/node_modules/@types/mdurl/lib/decode.d.mts +10 -0
- package/node_modules/@types/mdurl/lib/encode.d.mts +15 -0
- package/node_modules/@types/mdurl/lib/format.d.mts +3 -0
- package/node_modules/@types/mdurl/lib/parse.d.mts +18 -0
- package/node_modules/@types/mdurl/package.json +36 -0
- package/node_modules/@types/use-sync-external-store/LICENSE +21 -0
- package/node_modules/@types/use-sync-external-store/README.md +15 -0
- package/node_modules/@types/use-sync-external-store/index.d.ts +5 -0
- package/node_modules/@types/use-sync-external-store/package.json +30 -0
- package/node_modules/@types/use-sync-external-store/shim/index.d.ts +1 -0
- package/node_modules/@types/use-sync-external-store/shim/with-selector.d.ts +1 -0
- package/node_modules/@types/use-sync-external-store/with-selector.d.ts +7 -0
- package/node_modules/argparse/LICENSE +254 -0
- package/node_modules/argparse/README.md +84 -0
- package/node_modules/argparse/argparse.js +3707 -0
- package/node_modules/argparse/lib/sub.js +67 -0
- package/node_modules/argparse/lib/textwrap.js +440 -0
- package/node_modules/argparse/package.json +31 -0
- package/node_modules/crelt/LICENSE +19 -0
- package/node_modules/crelt/README.md +23 -0
- package/node_modules/crelt/dist/index.cjs +31 -0
- package/node_modules/crelt/dist/index.d.cts +4 -0
- package/node_modules/crelt/index.d.ts +4 -0
- package/node_modules/crelt/index.js +28 -0
- package/node_modules/crelt/package.json +35 -0
- package/node_modules/crelt/rollup.config.js +13 -0
- package/node_modules/entities/LICENSE +11 -0
- package/node_modules/entities/lib/decode.d.ts +211 -0
- package/node_modules/entities/lib/decode.d.ts.map +1 -0
- package/node_modules/entities/lib/decode.js +536 -0
- package/node_modules/entities/lib/decode.js.map +1 -0
- package/node_modules/entities/lib/decode_codepoint.d.ts +19 -0
- package/node_modules/entities/lib/decode_codepoint.d.ts.map +1 -0
- package/node_modules/entities/lib/decode_codepoint.js +76 -0
- package/node_modules/entities/lib/decode_codepoint.js.map +1 -0
- package/node_modules/entities/lib/encode.d.ts +22 -0
- package/node_modules/entities/lib/encode.d.ts.map +1 -0
- package/node_modules/entities/lib/encode.js +77 -0
- package/node_modules/entities/lib/encode.js.map +1 -0
- package/node_modules/entities/lib/escape.d.ts +43 -0
- package/node_modules/entities/lib/escape.d.ts.map +1 -0
- package/node_modules/entities/lib/escape.js +122 -0
- package/node_modules/entities/lib/escape.js.map +1 -0
- package/node_modules/entities/lib/esm/decode.d.ts +211 -0
- package/node_modules/entities/lib/esm/decode.d.ts.map +1 -0
- package/node_modules/entities/lib/esm/decode.js +496 -0
- package/node_modules/entities/lib/esm/decode.js.map +1 -0
- package/node_modules/entities/lib/esm/decode_codepoint.d.ts +19 -0
- package/node_modules/entities/lib/esm/decode_codepoint.d.ts.map +1 -0
- package/node_modules/entities/lib/esm/decode_codepoint.js +71 -0
- package/node_modules/entities/lib/esm/decode_codepoint.js.map +1 -0
- package/node_modules/entities/lib/esm/encode.d.ts +22 -0
- package/node_modules/entities/lib/esm/encode.d.ts.map +1 -0
- package/node_modules/entities/lib/esm/encode.js +69 -0
- package/node_modules/entities/lib/esm/encode.js.map +1 -0
- package/node_modules/entities/lib/esm/escape.d.ts +43 -0
- package/node_modules/entities/lib/esm/escape.d.ts.map +1 -0
- package/node_modules/entities/lib/esm/escape.js +116 -0
- package/node_modules/entities/lib/esm/escape.js.map +1 -0
- package/node_modules/entities/lib/esm/generated/decode-data-html.d.ts +3 -0
- package/node_modules/entities/lib/esm/generated/decode-data-html.d.ts.map +1 -0
- package/node_modules/entities/lib/esm/generated/decode-data-html.js +7 -0
- package/node_modules/entities/lib/esm/generated/decode-data-html.js.map +1 -0
- package/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts +3 -0
- package/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts.map +1 -0
- package/node_modules/entities/lib/esm/generated/decode-data-xml.js +7 -0
- package/node_modules/entities/lib/esm/generated/decode-data-xml.js.map +1 -0
- package/node_modules/entities/lib/esm/generated/encode-html.d.ts +8 -0
- package/node_modules/entities/lib/esm/generated/encode-html.d.ts.map +1 -0
- package/node_modules/entities/lib/esm/generated/encode-html.js +10 -0
- package/node_modules/entities/lib/esm/generated/encode-html.js.map +1 -0
- package/node_modules/entities/lib/esm/index.d.ts +96 -0
- package/node_modules/entities/lib/esm/index.d.ts.map +1 -0
- package/node_modules/entities/lib/esm/index.js +99 -0
- package/node_modules/entities/lib/esm/index.js.map +1 -0
- package/node_modules/entities/lib/esm/package.json +1 -0
- package/node_modules/entities/lib/generated/decode-data-html.d.ts +3 -0
- package/node_modules/entities/lib/generated/decode-data-html.d.ts.map +1 -0
- package/node_modules/entities/lib/generated/decode-data-html.js +9 -0
- package/node_modules/entities/lib/generated/decode-data-html.js.map +1 -0
- package/node_modules/entities/lib/generated/decode-data-xml.d.ts +3 -0
- package/node_modules/entities/lib/generated/decode-data-xml.d.ts.map +1 -0
- package/node_modules/entities/lib/generated/decode-data-xml.js +9 -0
- package/node_modules/entities/lib/generated/decode-data-xml.js.map +1 -0
- package/node_modules/entities/lib/generated/encode-html.d.ts +8 -0
- package/node_modules/entities/lib/generated/encode-html.d.ts.map +1 -0
- package/node_modules/entities/lib/generated/encode-html.js +12 -0
- package/node_modules/entities/lib/generated/encode-html.js.map +1 -0
- package/node_modules/entities/lib/index.d.ts +96 -0
- package/node_modules/entities/lib/index.d.ts.map +1 -0
- package/node_modules/entities/lib/index.js +126 -0
- package/node_modules/entities/lib/index.js.map +1 -0
- package/node_modules/entities/package.json +90 -0
- package/node_modules/entities/readme.md +122 -0
- package/node_modules/escape-string-regexp/index.d.ts +18 -0
- package/node_modules/escape-string-regexp/index.js +13 -0
- package/node_modules/escape-string-regexp/license +9 -0
- package/node_modules/escape-string-regexp/package.json +38 -0
- package/node_modules/escape-string-regexp/readme.md +34 -0
- package/node_modules/fast-equals/LICENSE +21 -0
- package/node_modules/fast-equals/README.md +477 -0
- package/node_modules/fast-equals/dist/cjs/comparator.d.cts +60 -0
- package/node_modules/fast-equals/dist/cjs/equals.d.cts +62 -0
- package/node_modules/fast-equals/dist/cjs/index.cjs +653 -0
- package/node_modules/fast-equals/dist/cjs/index.cjs.map +1 -0
- package/node_modules/fast-equals/dist/cjs/index.d.cts +66 -0
- package/node_modules/fast-equals/dist/cjs/internalTypes.d.cts +178 -0
- package/node_modules/fast-equals/dist/cjs/utils.d.cts +33 -0
- package/node_modules/fast-equals/dist/es/comparator.d.mts +60 -0
- package/node_modules/fast-equals/dist/es/equals.d.mts +62 -0
- package/node_modules/fast-equals/dist/es/index.d.mts +66 -0
- package/node_modules/fast-equals/dist/es/index.mjs +642 -0
- package/node_modules/fast-equals/dist/es/index.mjs.map +1 -0
- package/node_modules/fast-equals/dist/es/internalTypes.d.mts +178 -0
- package/node_modules/fast-equals/dist/es/utils.d.mts +33 -0
- package/node_modules/fast-equals/dist/umd/comparator.d.ts +26 -0
- package/node_modules/fast-equals/dist/umd/equals.d.ts +62 -0
- package/node_modules/fast-equals/dist/umd/index.d.ts +47 -0
- package/node_modules/fast-equals/dist/umd/index.js +659 -0
- package/node_modules/fast-equals/dist/umd/index.js.map +1 -0
- package/node_modules/fast-equals/dist/umd/internalTypes.d.ts +159 -0
- package/node_modules/fast-equals/dist/umd/utils.d.ts +28 -0
- package/node_modules/fast-equals/index.d.ts +260 -0
- package/node_modules/fast-equals/package.json +113 -0
- package/node_modules/linkify-it/LICENSE +22 -0
- package/node_modules/linkify-it/README.md +196 -0
- package/node_modules/linkify-it/build/index.cjs.js +832 -0
- package/node_modules/linkify-it/index.mjs +642 -0
- package/node_modules/linkify-it/lib/re.mjs +189 -0
- package/node_modules/linkify-it/package.json +58 -0
- package/node_modules/markdown-it/LICENSE +22 -0
- package/node_modules/markdown-it/README.md +324 -0
- package/node_modules/markdown-it/bin/markdown-it.mjs +107 -0
- package/node_modules/markdown-it/dist/index.cjs.js +5547 -0
- package/node_modules/markdown-it/dist/markdown-it.js +6969 -0
- package/node_modules/markdown-it/dist/markdown-it.min.js +2 -0
- package/node_modules/markdown-it/index.mjs +1 -0
- package/node_modules/markdown-it/lib/common/html_blocks.mjs +67 -0
- package/node_modules/markdown-it/lib/common/html_re.mjs +25 -0
- package/node_modules/markdown-it/lib/common/utils.mjs +304 -0
- package/node_modules/markdown-it/lib/helpers/index.mjs +11 -0
- package/node_modules/markdown-it/lib/helpers/parse_link_destination.mjs +77 -0
- package/node_modules/markdown-it/lib/helpers/parse_link_label.mjs +49 -0
- package/node_modules/markdown-it/lib/helpers/parse_link_title.mjs +66 -0
- package/node_modules/markdown-it/lib/index.mjs +565 -0
- package/node_modules/markdown-it/lib/parser_block.mjs +134 -0
- package/node_modules/markdown-it/lib/parser_core.mjs +62 -0
- package/node_modules/markdown-it/lib/parser_inline.mjs +197 -0
- package/node_modules/markdown-it/lib/presets/commonmark.mjs +88 -0
- package/node_modules/markdown-it/lib/presets/default.mjs +47 -0
- package/node_modules/markdown-it/lib/presets/zero.mjs +70 -0
- package/node_modules/markdown-it/lib/renderer.mjs +322 -0
- package/node_modules/markdown-it/lib/ruler.mjs +340 -0
- package/node_modules/markdown-it/lib/rules_block/blockquote.mjs +209 -0
- package/node_modules/markdown-it/lib/rules_block/code.mjs +30 -0
- package/node_modules/markdown-it/lib/rules_block/fence.mjs +94 -0
- package/node_modules/markdown-it/lib/rules_block/heading.mjs +51 -0
- package/node_modules/markdown-it/lib/rules_block/hr.mjs +40 -0
- package/node_modules/markdown-it/lib/rules_block/html_block.mjs +69 -0
- package/node_modules/markdown-it/lib/rules_block/lheading.mjs +82 -0
- package/node_modules/markdown-it/lib/rules_block/list.mjs +331 -0
- package/node_modules/markdown-it/lib/rules_block/paragraph.mjs +46 -0
- package/node_modules/markdown-it/lib/rules_block/reference.mjs +212 -0
- package/node_modules/markdown-it/lib/rules_block/state_block.mjs +220 -0
- package/node_modules/markdown-it/lib/rules_block/table.mjs +228 -0
- package/node_modules/markdown-it/lib/rules_core/block.mjs +13 -0
- package/node_modules/markdown-it/lib/rules_core/inline.mjs +11 -0
- package/node_modules/markdown-it/lib/rules_core/linkify.mjs +134 -0
- package/node_modules/markdown-it/lib/rules_core/normalize.mjs +17 -0
- package/node_modules/markdown-it/lib/rules_core/replacements.mjs +101 -0
- package/node_modules/markdown-it/lib/rules_core/smartquotes.mjs +193 -0
- package/node_modules/markdown-it/lib/rules_core/state_core.mjs +17 -0
- package/node_modules/markdown-it/lib/rules_core/text_join.mjs +43 -0
- package/node_modules/markdown-it/lib/rules_inline/autolink.mjs +72 -0
- package/node_modules/markdown-it/lib/rules_inline/backticks.mjs +60 -0
- package/node_modules/markdown-it/lib/rules_inline/balance_pairs.mjs +124 -0
- package/node_modules/markdown-it/lib/rules_inline/emphasis.mjs +123 -0
- package/node_modules/markdown-it/lib/rules_inline/entity.mjs +51 -0
- package/node_modules/markdown-it/lib/rules_inline/escape.mjs +69 -0
- package/node_modules/markdown-it/lib/rules_inline/fragments_join.mjs +38 -0
- package/node_modules/markdown-it/lib/rules_inline/html_inline.mjs +50 -0
- package/node_modules/markdown-it/lib/rules_inline/image.mjs +138 -0
- package/node_modules/markdown-it/lib/rules_inline/link.mjs +139 -0
- package/node_modules/markdown-it/lib/rules_inline/linkify.mjs +63 -0
- package/node_modules/markdown-it/lib/rules_inline/newline.mjs +42 -0
- package/node_modules/markdown-it/lib/rules_inline/state_inline.mjs +123 -0
- package/node_modules/markdown-it/lib/rules_inline/strikethrough.mjs +127 -0
- package/node_modules/markdown-it/lib/rules_inline/text.mjs +86 -0
- package/node_modules/markdown-it/lib/token.mjs +191 -0
- package/node_modules/markdown-it/package.json +92 -0
- package/node_modules/mdurl/LICENSE +45 -0
- package/node_modules/mdurl/README.md +102 -0
- package/node_modules/mdurl/build/index.cjs.js +534 -0
- package/node_modules/mdurl/index.mjs +11 -0
- package/node_modules/mdurl/lib/decode.mjs +112 -0
- package/node_modules/mdurl/lib/encode.mjs +89 -0
- package/node_modules/mdurl/lib/format.mjs +21 -0
- package/node_modules/mdurl/lib/parse.mjs +308 -0
- package/node_modules/mdurl/package.json +37 -0
- package/node_modules/orderedmap/LICENSE +19 -0
- package/node_modules/orderedmap/README.md +69 -0
- package/node_modules/orderedmap/dist/index.cjs +139 -0
- package/node_modules/orderedmap/dist/index.d.cts +33 -0
- package/node_modules/orderedmap/dist/index.d.ts +33 -0
- package/node_modules/orderedmap/dist/index.js +137 -0
- package/node_modules/orderedmap/package.json +39 -0
- package/node_modules/prosemirror-changeset/CHANGELOG.md +147 -0
- package/node_modules/prosemirror-changeset/LICENSE +19 -0
- package/node_modules/prosemirror-changeset/README.md +175 -0
- package/node_modules/prosemirror-changeset/dist/index.cjs +585 -0
- package/node_modules/prosemirror-changeset/dist/index.d.cts +186 -0
- package/node_modules/prosemirror-changeset/dist/index.d.ts +186 -0
- package/node_modules/prosemirror-changeset/dist/index.js +715 -0
- package/node_modules/prosemirror-changeset/package.json +40 -0
- package/node_modules/prosemirror-changeset/src/README.md +32 -0
- package/node_modules/prosemirror-changeset/src/change.ts +189 -0
- package/node_modules/prosemirror-changeset/src/changeset.ts +212 -0
- package/node_modules/prosemirror-changeset/src/diff.ts +151 -0
- package/node_modules/prosemirror-changeset/src/simplify.ts +132 -0
- package/node_modules/prosemirror-changeset/test/test-changed-range.ts +48 -0
- package/node_modules/prosemirror-changeset/test/test-changes.ts +211 -0
- package/node_modules/prosemirror-changeset/test/test-diff.ts +69 -0
- package/node_modules/prosemirror-changeset/test/test-merge.ts +56 -0
- package/node_modules/prosemirror-changeset/test/test-simplify.ts +71 -0
- package/node_modules/prosemirror-collab/.tern-project +8 -0
- package/node_modules/prosemirror-collab/CHANGELOG.md +77 -0
- package/node_modules/prosemirror-collab/CONTRIBUTING.md +104 -0
- package/node_modules/prosemirror-collab/LICENSE +19 -0
- package/node_modules/prosemirror-collab/README.md +28 -0
- package/node_modules/prosemirror-collab/dist/index.cjs +155 -0
- package/node_modules/prosemirror-collab/dist/index.d.cts +60 -0
- package/node_modules/prosemirror-collab/dist/index.d.ts +60 -0
- package/node_modules/prosemirror-collab/dist/index.js +156 -0
- package/node_modules/prosemirror-collab/package.json +40 -0
- package/node_modules/prosemirror-collab/src/README.md +11 -0
- package/node_modules/prosemirror-collab/src/collab.ts +184 -0
- package/node_modules/prosemirror-commands/.tern-project +8 -0
- package/node_modules/prosemirror-commands/CHANGELOG.md +322 -0
- package/node_modules/prosemirror-commands/CONTRIBUTING.md +104 -0
- package/node_modules/prosemirror-commands/LICENSE +19 -0
- package/node_modules/prosemirror-commands/README.md +28 -0
- package/node_modules/prosemirror-commands/dist/index.cjs +687 -0
- package/node_modules/prosemirror-commands/dist/index.d.cts +215 -0
- package/node_modules/prosemirror-commands/dist/index.d.ts +215 -0
- package/node_modules/prosemirror-commands/dist/index.js +850 -0
- package/node_modules/prosemirror-commands/package.json +39 -0
- package/node_modules/prosemirror-commands/src/README.md +40 -0
- package/node_modules/prosemirror-commands/src/commands.ts +783 -0
- package/node_modules/prosemirror-dropcursor/CHANGELOG.md +137 -0
- package/node_modules/prosemirror-dropcursor/CONTRIBUTING.md +100 -0
- package/node_modules/prosemirror-dropcursor/LICENSE +19 -0
- package/node_modules/prosemirror-dropcursor/README.md +50 -0
- package/node_modules/prosemirror-dropcursor/dist/index.cjs +185 -0
- package/node_modules/prosemirror-dropcursor/dist/index.d.cts +38 -0
- package/node_modules/prosemirror-dropcursor/dist/index.d.ts +38 -0
- package/node_modules/prosemirror-dropcursor/dist/index.js +146 -0
- package/node_modules/prosemirror-dropcursor/package.json +38 -0
- package/node_modules/prosemirror-dropcursor/src/dropcursor.ts +170 -0
- package/node_modules/prosemirror-gapcursor/CHANGELOG.md +122 -0
- package/node_modules/prosemirror-gapcursor/CONTRIBUTING.md +104 -0
- package/node_modules/prosemirror-gapcursor/LICENSE +19 -0
- package/node_modules/prosemirror-gapcursor/README.md +31 -0
- package/node_modules/prosemirror-gapcursor/dist/index.cjs +239 -0
- package/node_modules/prosemirror-gapcursor/dist/index.d.cts +31 -0
- package/node_modules/prosemirror-gapcursor/dist/index.d.ts +31 -0
- package/node_modules/prosemirror-gapcursor/dist/index.js +239 -0
- package/node_modules/prosemirror-gapcursor/package.json +43 -0
- package/node_modules/prosemirror-gapcursor/src/README.md +21 -0
- package/node_modules/prosemirror-gapcursor/src/gapcursor.ts +141 -0
- package/node_modules/prosemirror-gapcursor/src/index.ts +91 -0
- package/node_modules/prosemirror-gapcursor/style/gapcursor.css +25 -0
- package/node_modules/prosemirror-history/.tern-project +8 -0
- package/node_modules/prosemirror-history/CHANGELOG.md +170 -0
- package/node_modules/prosemirror-history/CONTRIBUTING.md +104 -0
- package/node_modules/prosemirror-history/LICENSE +19 -0
- package/node_modules/prosemirror-history/README.md +27 -0
- package/node_modules/prosemirror-history/dist/index.cjs +382 -0
- package/node_modules/prosemirror-history/dist/index.d.cts +64 -0
- package/node_modules/prosemirror-history/dist/index.d.ts +64 -0
- package/node_modules/prosemirror-history/dist/index.js +453 -0
- package/node_modules/prosemirror-history/package.json +40 -0
- package/node_modules/prosemirror-history/src/README.md +23 -0
- package/node_modules/prosemirror-history/src/history.ts +465 -0
- package/node_modules/prosemirror-inputrules/.tern-project +8 -0
- package/node_modules/prosemirror-inputrules/CHANGELOG.md +127 -0
- package/node_modules/prosemirror-inputrules/CONTRIBUTING.md +104 -0
- package/node_modules/prosemirror-inputrules/LICENSE +19 -0
- package/node_modules/prosemirror-inputrules/README.md +29 -0
- package/node_modules/prosemirror-inputrules/dist/index.cjs +194 -0
- package/node_modules/prosemirror-inputrules/dist/index.d.cts +131 -0
- package/node_modules/prosemirror-inputrules/dist/index.d.ts +131 -0
- package/node_modules/prosemirror-inputrules/dist/index.js +239 -0
- package/node_modules/prosemirror-inputrules/package.json +36 -0
- package/node_modules/prosemirror-inputrules/src/README.md +23 -0
- package/node_modules/prosemirror-inputrules/src/index.ts +4 -0
- package/node_modules/prosemirror-inputrules/src/inputrules.ts +167 -0
- package/node_modules/prosemirror-inputrules/src/rulebuilders.ts +59 -0
- package/node_modules/prosemirror-inputrules/src/rules.ts +17 -0
- package/node_modules/prosemirror-keymap/.tern-project +8 -0
- package/node_modules/prosemirror-keymap/CHANGELOG.md +104 -0
- package/node_modules/prosemirror-keymap/CONTRIBUTING.md +104 -0
- package/node_modules/prosemirror-keymap/LICENSE +19 -0
- package/node_modules/prosemirror-keymap/README.md +27 -0
- package/node_modules/prosemirror-keymap/dist/index.cjs +65 -0
- package/node_modules/prosemirror-keymap/dist/index.d.cts +47 -0
- package/node_modules/prosemirror-keymap/dist/index.d.ts +47 -0
- package/node_modules/prosemirror-keymap/dist/index.js +128 -0
- package/node_modules/prosemirror-keymap/package.json +38 -0
- package/node_modules/prosemirror-keymap/src/README.md +5 -0
- package/node_modules/prosemirror-keymap/src/keymap.ts +105 -0
- package/node_modules/prosemirror-markdown/.tern-project +8 -0
- package/node_modules/prosemirror-markdown/CHANGELOG.md +311 -0
- package/node_modules/prosemirror-markdown/CONTRIBUTING.md +100 -0
- package/node_modules/prosemirror-markdown/LICENSE +19 -0
- package/node_modules/prosemirror-markdown/README.md +276 -0
- package/node_modules/prosemirror-markdown/dist/index.cjs +966 -0
- package/node_modules/prosemirror-markdown/dist/index.d.cts +335 -0
- package/node_modules/prosemirror-markdown/dist/index.d.ts +335 -0
- package/node_modules/prosemirror-markdown/dist/index.js +878 -0
- package/node_modules/prosemirror-markdown/package.json +40 -0
- package/node_modules/prosemirror-markdown/src/README.md +42 -0
- package/node_modules/prosemirror-markdown/src/from_markdown.ts +272 -0
- package/node_modules/prosemirror-markdown/src/index.ts +5 -0
- package/node_modules/prosemirror-markdown/src/schema.ts +156 -0
- package/node_modules/prosemirror-markdown/src/to_markdown.ts +483 -0
- package/node_modules/prosemirror-menu/.tern-project +8 -0
- package/node_modules/prosemirror-menu/CHANGELOG.md +107 -0
- package/node_modules/prosemirror-menu/CONTRIBUTING.md +100 -0
- package/node_modules/prosemirror-menu/LICENSE +19 -0
- package/node_modules/prosemirror-menu/README.md +235 -0
- package/node_modules/prosemirror-menu/dist/index.cjs +798 -0
- package/node_modules/prosemirror-menu/dist/index.d.cts +281 -0
- package/node_modules/prosemirror-menu/dist/index.d.ts +281 -0
- package/node_modules/prosemirror-menu/dist/index.js +795 -0
- package/node_modules/prosemirror-menu/package.json +42 -0
- package/node_modules/prosemirror-menu/src/README.md +60 -0
- package/node_modules/prosemirror-menu/src/icons.ts +53 -0
- package/node_modules/prosemirror-menu/src/index.ts +4 -0
- package/node_modules/prosemirror-menu/src/menu.ts +628 -0
- package/node_modules/prosemirror-menu/src/menubar.ts +210 -0
- package/node_modules/prosemirror-menu/style/menu.css +169 -0
- package/node_modules/prosemirror-model/.tern-project +8 -0
- package/node_modules/prosemirror-model/CHANGELOG.md +730 -0
- package/node_modules/prosemirror-model/CONTRIBUTING.md +104 -0
- package/node_modules/prosemirror-model/LICENSE +19 -0
- package/node_modules/prosemirror-model/README.md +29 -0
- package/node_modules/prosemirror-model/dist/index.cjs +2898 -0
- package/node_modules/prosemirror-model/dist/index.d.cts +1679 -0
- package/node_modules/prosemirror-model/dist/index.d.ts +1679 -0
- package/node_modules/prosemirror-model/dist/index.js +3464 -0
- package/node_modules/prosemirror-model/package.json +38 -0
- package/node_modules/prosemirror-model/src/README.md +62 -0
- package/node_modules/prosemirror-model/src/comparedeep.ts +15 -0
- package/node_modules/prosemirror-model/src/content.ts +413 -0
- package/node_modules/prosemirror-model/src/diff.ts +52 -0
- package/node_modules/prosemirror-model/src/dom.ts +1 -0
- package/node_modules/prosemirror-model/src/fragment.ts +268 -0
- package/node_modules/prosemirror-model/src/from_dom.ts +848 -0
- package/node_modules/prosemirror-model/src/index.ts +11 -0
- package/node_modules/prosemirror-model/src/mark.ts +111 -0
- package/node_modules/prosemirror-model/src/node.ts +402 -0
- package/node_modules/prosemirror-model/src/replace.ts +225 -0
- package/node_modules/prosemirror-model/src/resolvedpos.ts +289 -0
- package/node_modules/prosemirror-model/src/schema.ts +705 -0
- package/node_modules/prosemirror-model/src/to_dom.ts +238 -0
- package/node_modules/prosemirror-schema-basic/.tern-project +8 -0
- package/node_modules/prosemirror-schema-basic/CHANGELOG.md +81 -0
- package/node_modules/prosemirror-schema-basic/CONTRIBUTING.md +100 -0
- package/node_modules/prosemirror-schema-basic/LICENSE +19 -0
- package/node_modules/prosemirror-schema-basic/README.md +28 -0
- package/node_modules/prosemirror-schema-basic/dist/index.cjs +246 -0
- package/node_modules/prosemirror-schema-basic/dist/index.d.cts +87 -0
- package/node_modules/prosemirror-schema-basic/dist/index.d.ts +87 -0
- package/node_modules/prosemirror-schema-basic/dist/index.js +183 -0
- package/node_modules/prosemirror-schema-basic/package.json +37 -0
- package/node_modules/prosemirror-schema-basic/src/README.md +8 -0
- package/node_modules/prosemirror-schema-basic/src/schema-basic.ts +166 -0
- package/node_modules/prosemirror-schema-list/.tern-project +8 -0
- package/node_modules/prosemirror-schema-list/CHANGELOG.md +140 -0
- package/node_modules/prosemirror-schema-list/CONTRIBUTING.md +100 -0
- package/node_modules/prosemirror-schema-list/LICENSE +19 -0
- package/node_modules/prosemirror-schema-list/README.md +28 -0
- package/node_modules/prosemirror-schema-list/dist/index.cjs +253 -0
- package/node_modules/prosemirror-schema-list/dist/index.d.cts +71 -0
- package/node_modules/prosemirror-schema-list/dist/index.d.ts +71 -0
- package/node_modules/prosemirror-schema-list/dist/index.js +289 -0
- package/node_modules/prosemirror-schema-list/package.json +40 -0
- package/node_modules/prosemirror-schema-list/src/README.md +29 -0
- package/node_modules/prosemirror-schema-list/src/schema-list.ts +267 -0
- package/node_modules/prosemirror-state/.tern-project +8 -0
- package/node_modules/prosemirror-state/CHANGELOG.md +296 -0
- package/node_modules/prosemirror-state/CONTRIBUTING.md +104 -0
- package/node_modules/prosemirror-state/LICENSE +19 -0
- package/node_modules/prosemirror-state/README.md +28 -0
- package/node_modules/prosemirror-state/dist/index.cjs +884 -0
- package/node_modules/prosemirror-state/dist/index.d.cts +709 -0
- package/node_modules/prosemirror-state/dist/index.d.ts +709 -0
- package/node_modules/prosemirror-state/dist/index.js +1002 -0
- package/node_modules/prosemirror-state/package.json +39 -0
- package/node_modules/prosemirror-state/src/README.md +42 -0
- package/node_modules/prosemirror-state/src/index.ts +7 -0
- package/node_modules/prosemirror-state/src/plugin.ts +142 -0
- package/node_modules/prosemirror-state/src/selection.ts +462 -0
- package/node_modules/prosemirror-state/src/state.ts +266 -0
- package/node_modules/prosemirror-state/src/transaction.ts +215 -0
- package/node_modules/prosemirror-tables/LICENSE +19 -0
- package/node_modules/prosemirror-tables/README.md +254 -0
- package/node_modules/prosemirror-tables/dist/index.cjs +2683 -0
- package/node_modules/prosemirror-tables/dist/index.d.cts +751 -0
- package/node_modules/prosemirror-tables/dist/index.d.cts.map +1 -0
- package/node_modules/prosemirror-tables/dist/index.d.ts +751 -0
- package/node_modules/prosemirror-tables/dist/index.d.ts.map +1 -0
- package/node_modules/prosemirror-tables/dist/index.js +2626 -0
- package/node_modules/prosemirror-tables/dist/index.js.map +1 -0
- package/node_modules/prosemirror-tables/package.json +80 -0
- package/node_modules/prosemirror-tables/style/tables.css +48 -0
- package/node_modules/prosemirror-trailing-node/LICENSE +21 -0
- package/node_modules/prosemirror-trailing-node/dist/_tsup-dts-rollup.d.cts +41 -0
- package/node_modules/prosemirror-trailing-node/dist/_tsup-dts-rollup.d.ts +41 -0
- package/node_modules/prosemirror-trailing-node/dist/prosemirror-trailing-node.cjs +70 -0
- package/node_modules/prosemirror-trailing-node/dist/prosemirror-trailing-node.d.cts +2 -0
- package/node_modules/prosemirror-trailing-node/dist/prosemirror-trailing-node.d.ts +2 -0
- package/node_modules/prosemirror-trailing-node/dist/prosemirror-trailing-node.js +43 -0
- package/node_modules/prosemirror-trailing-node/dist-types/index.d.ts +2 -0
- package/node_modules/prosemirror-trailing-node/dist-types/trailing-node-plugin.d.ts +33 -0
- package/node_modules/prosemirror-trailing-node/dist-types/tsconfig.tsbuildinfo +1 -0
- package/node_modules/prosemirror-trailing-node/package.json +57 -0
- package/node_modules/prosemirror-trailing-node/readme.md +55 -0
- package/node_modules/prosemirror-transform/.tern-project +8 -0
- package/node_modules/prosemirror-transform/CHANGELOG.md +502 -0
- package/node_modules/prosemirror-transform/CONTRIBUTING.md +104 -0
- package/node_modules/prosemirror-transform/LICENSE +19 -0
- package/node_modules/prosemirror-transform/README.md +29 -0
- package/node_modules/prosemirror-transform/dist/index.cjs +1888 -0
- package/node_modules/prosemirror-transform/dist/index.d.cts +847 -0
- package/node_modules/prosemirror-transform/dist/index.d.ts +847 -0
- package/node_modules/prosemirror-transform/dist/index.js +2181 -0
- package/node_modules/prosemirror-transform/package.json +37 -0
- package/node_modules/prosemirror-transform/src/README.md +59 -0
- package/node_modules/prosemirror-transform/src/attr_step.ts +98 -0
- package/node_modules/prosemirror-transform/src/index.ts +11 -0
- package/node_modules/prosemirror-transform/src/map.ts +284 -0
- package/node_modules/prosemirror-transform/src/mark.ts +106 -0
- package/node_modules/prosemirror-transform/src/mark_step.ts +224 -0
- package/node_modules/prosemirror-transform/src/replace.ts +460 -0
- package/node_modules/prosemirror-transform/src/replace_step.ts +178 -0
- package/node_modules/prosemirror-transform/src/step.ts +97 -0
- package/node_modules/prosemirror-transform/src/structure.ts +349 -0
- package/node_modules/prosemirror-transform/src/transform.ts +271 -0
- package/node_modules/prosemirror-view/.tern-project +8 -0
- package/node_modules/prosemirror-view/CHANGELOG.md +2447 -0
- package/node_modules/prosemirror-view/CONTRIBUTING.md +104 -0
- package/node_modules/prosemirror-view/LICENSE +19 -0
- package/node_modules/prosemirror-view/README.md +28 -0
- package/node_modules/prosemirror-view/dist/index.cjs +5381 -0
- package/node_modules/prosemirror-view/dist/index.d.cts +904 -0
- package/node_modules/prosemirror-view/dist/index.d.ts +904 -0
- package/node_modules/prosemirror-view/dist/index.js +5900 -0
- package/node_modules/prosemirror-view/package.json +43 -0
- package/node_modules/prosemirror-view/src/README.md +38 -0
- package/node_modules/prosemirror-view/src/browser.ts +24 -0
- package/node_modules/prosemirror-view/src/capturekeys.ts +345 -0
- package/node_modules/prosemirror-view/src/clipboard.ts +263 -0
- package/node_modules/prosemirror-view/src/decoration.ts +793 -0
- package/node_modules/prosemirror-view/src/dom.ts +159 -0
- package/node_modules/prosemirror-view/src/domchange.ts +383 -0
- package/node_modules/prosemirror-view/src/domcoords.ts +515 -0
- package/node_modules/prosemirror-view/src/domobserver.ts +392 -0
- package/node_modules/prosemirror-view/src/index.ts +825 -0
- package/node_modules/prosemirror-view/src/input.ts +830 -0
- package/node_modules/prosemirror-view/src/selection.ts +216 -0
- package/node_modules/prosemirror-view/src/viewdesc.ts +1590 -0
- package/node_modules/prosemirror-view/style/prosemirror.css +54 -0
- package/node_modules/punycode.js/LICENSE-MIT.txt +20 -0
- package/node_modules/punycode.js/README.md +148 -0
- package/node_modules/punycode.js/package.json +58 -0
- package/node_modules/punycode.js/punycode.es6.js +444 -0
- package/node_modules/punycode.js/punycode.js +443 -0
- package/node_modules/rope-sequence/LICENSE +19 -0
- package/node_modules/rope-sequence/README.md +63 -0
- package/node_modules/rope-sequence/dist/index.cjs +209 -0
- package/node_modules/rope-sequence/dist/index.d.cts +11 -0
- package/node_modules/rope-sequence/dist/index.d.ts +11 -0
- package/node_modules/rope-sequence/dist/index.js +207 -0
- package/node_modules/rope-sequence/index.js +190 -0
- package/node_modules/rope-sequence/package.json +34 -0
- package/node_modules/rope-sequence/test.js +78 -0
- package/node_modules/uc.micro/LICENSE.txt +20 -0
- package/node_modules/uc.micro/README.md +14 -0
- package/node_modules/uc.micro/build/index.cjs.js +20 -0
- package/node_modules/uc.micro/categories/Cc/regex.mjs +1 -0
- package/node_modules/uc.micro/categories/Cf/regex.mjs +1 -0
- package/node_modules/uc.micro/categories/P/regex.mjs +1 -0
- package/node_modules/uc.micro/categories/S/regex.mjs +1 -0
- package/node_modules/uc.micro/categories/Z/regex.mjs +1 -0
- package/node_modules/uc.micro/index.mjs +8 -0
- package/node_modules/uc.micro/package.json +37 -0
- package/node_modules/uc.micro/properties/Any/regex.mjs +1 -0
- package/node_modules/use-sync-external-store/LICENSE +21 -0
- package/node_modules/use-sync-external-store/README.md +5 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +97 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +85 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +95 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.native.development.js +88 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.native.production.js +59 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +66 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js +96 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js +84 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store.development.js +27 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store.production.js +13 -0
- package/node_modules/use-sync-external-store/index.js +7 -0
- package/node_modules/use-sync-external-store/package.json +43 -0
- package/node_modules/use-sync-external-store/shim/index.js +7 -0
- package/node_modules/use-sync-external-store/shim/index.native.js +7 -0
- package/node_modules/use-sync-external-store/shim/with-selector.js +7 -0
- package/node_modules/use-sync-external-store/with-selector.js +7 -0
- package/node_modules/w3c-keyname/.tern-port +1 -0
- package/node_modules/w3c-keyname/LICENSE +19 -0
- package/node_modules/w3c-keyname/README.md +18 -0
- package/node_modules/w3c-keyname/index.cjs +127 -0
- package/node_modules/w3c-keyname/index.d.cts +5 -0
- package/node_modules/w3c-keyname/index.d.ts +5 -0
- package/node_modules/w3c-keyname/index.js +119 -0
- package/node_modules/w3c-keyname/package.json +37 -0
- package/package.json +120 -3
- package/public-api.md +24 -3
- package/dist/chat/tool-renderers/KbSearchRenderer.d.ts +0 -2
- package/dist/chat/tool-renderers/kb-search-result.d.ts +0 -19
- package/dist/chunk-5J54S5BK.js.map +0 -1
- package/dist/chunk-FQQJP2GJ.js.map +0 -1
- package/dist/chunk-WCMGQJLE.js +0 -258
- package/dist/chunk-WCMGQJLE.js.map +0 -1
- package/dist/lib/agent-computer-command.d.ts +0 -34
- package/dist/rich-input/extensions/kb-mention.d.ts +0 -18
- package/dist/rich-input/extensions/workflow-mention.d.ts +0 -10
- package/dist/rich-input/lib/kb-suggestions.d.ts +0 -37
|
@@ -1894,11 +1894,10 @@ var CirclePause = createLucideIcon("CirclePause", [
|
|
|
1894
1894
|
["line", { x1: "14", x2: "14", y1: "15", y2: "9", key: "h65svq" }]
|
|
1895
1895
|
]);
|
|
1896
1896
|
|
|
1897
|
-
// ../../node_modules/.pnpm/lucide-react@0.468.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/circle-
|
|
1898
|
-
var
|
|
1897
|
+
// ../../node_modules/.pnpm/lucide-react@0.468.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/circle-slash.js
|
|
1898
|
+
var CircleSlash = createLucideIcon("CircleSlash", [
|
|
1899
1899
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
1900
|
-
["
|
|
1901
|
-
["path", { d: "m9 9 6 6", key: "z0biqf" }]
|
|
1900
|
+
["line", { x1: "9", x2: "15", y1: "15", y2: "9", key: "1dfufj" }]
|
|
1902
1901
|
]);
|
|
1903
1902
|
|
|
1904
1903
|
// ../../node_modules/.pnpm/lucide-react@0.468.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/circle.js
|
|
@@ -2429,11 +2428,20 @@ var TriangleAlert = createLucideIcon("TriangleAlert", [
|
|
|
2429
2428
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
2430
2429
|
]);
|
|
2431
2430
|
|
|
2432
|
-
// ../../node_modules/.pnpm/lucide-react@0.468.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/
|
|
2433
|
-
var
|
|
2434
|
-
["
|
|
2435
|
-
["path", { d: "
|
|
2436
|
-
[
|
|
2431
|
+
// ../../node_modules/.pnpm/lucide-react@0.468.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/unplug.js
|
|
2432
|
+
var Unplug = createLucideIcon("Unplug", [
|
|
2433
|
+
["path", { d: "m19 5 3-3", key: "yk6iyv" }],
|
|
2434
|
+
["path", { d: "m2 22 3-3", key: "19mgm9" }],
|
|
2435
|
+
[
|
|
2436
|
+
"path",
|
|
2437
|
+
{ d: "M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z", key: "goz73y" }
|
|
2438
|
+
],
|
|
2439
|
+
["path", { d: "M7.5 13.5 10 11", key: "7xgeeb" }],
|
|
2440
|
+
["path", { d: "M10.5 16.5 13 14", key: "10btkg" }],
|
|
2441
|
+
[
|
|
2442
|
+
"path",
|
|
2443
|
+
{ d: "m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z", key: "1snsnr" }
|
|
2444
|
+
]
|
|
2437
2445
|
]);
|
|
2438
2446
|
|
|
2439
2447
|
// ../../node_modules/.pnpm/lucide-react@0.468.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/wrench.js
|
|
@@ -2453,8 +2461,19 @@ var X = createLucideIcon("X", [
|
|
|
2453
2461
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
2454
2462
|
]);
|
|
2455
2463
|
|
|
2464
|
+
// ../../node_modules/.pnpm/lucide-react@0.468.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/zap.js
|
|
2465
|
+
var Zap = createLucideIcon("Zap", [
|
|
2466
|
+
[
|
|
2467
|
+
"path",
|
|
2468
|
+
{
|
|
2469
|
+
d: "M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",
|
|
2470
|
+
key: "1xq2db"
|
|
2471
|
+
}
|
|
2472
|
+
]
|
|
2473
|
+
]);
|
|
2474
|
+
|
|
2456
2475
|
// src/components/PlanUpdateBlock.tsx
|
|
2457
|
-
import { useEffect
|
|
2476
|
+
import { useEffect, useRef, useState } from "react";
|
|
2458
2477
|
|
|
2459
2478
|
// ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
2460
2479
|
function r(e2) {
|
|
@@ -5674,388 +5693,13 @@ async function copyToClipboard(text) {
|
|
|
5674
5693
|
}
|
|
5675
5694
|
}
|
|
5676
5695
|
|
|
5677
|
-
// src/chat/lib/code-language.ts
|
|
5678
|
-
var FILE_EXTENSION_ALIASES = {
|
|
5679
|
-
".bash": "bash",
|
|
5680
|
-
".css": "css",
|
|
5681
|
-
".go": "go",
|
|
5682
|
-
".htm": "html",
|
|
5683
|
-
".html": "html",
|
|
5684
|
-
".js": "javascript",
|
|
5685
|
-
".json": "json",
|
|
5686
|
-
".jsonc": "json",
|
|
5687
|
-
".jsx": "jsx",
|
|
5688
|
-
".md": "markdown",
|
|
5689
|
-
".mdx": "markdown",
|
|
5690
|
-
".py": "python",
|
|
5691
|
-
".rs": "rust",
|
|
5692
|
-
".scss": "css",
|
|
5693
|
-
".sh": "bash",
|
|
5694
|
-
".ts": "typescript",
|
|
5695
|
-
".tsx": "tsx",
|
|
5696
|
-
".yaml": "yaml",
|
|
5697
|
-
".yml": "yaml",
|
|
5698
|
-
".zsh": "bash"
|
|
5699
|
-
};
|
|
5700
|
-
function getCodeLanguageFromFilename(filePath) {
|
|
5701
|
-
if (!filePath) return null;
|
|
5702
|
-
const dotIndex = filePath.lastIndexOf(".");
|
|
5703
|
-
if (dotIndex < 0) return null;
|
|
5704
|
-
return FILE_EXTENSION_ALIASES[filePath.slice(dotIndex).toLowerCase()] ?? null;
|
|
5705
|
-
}
|
|
5706
|
-
|
|
5707
|
-
// src/chat/runtime/environment.tsx
|
|
5708
|
-
import { createContext as createContext3, useContext as useContext3, useMemo as useMemo2 } from "react";
|
|
5709
|
-
|
|
5710
|
-
// src/chat/runtime/session-source.tsx
|
|
5711
|
-
import { createInitialSessionState } from "@blade-hq/agent-client/internal";
|
|
5712
|
-
import {
|
|
5713
|
-
createContext as createContext2,
|
|
5714
|
-
useContext as useContext2,
|
|
5715
|
-
useEffect,
|
|
5716
|
-
useLayoutEffect,
|
|
5717
|
-
useMemo,
|
|
5718
|
-
useRef,
|
|
5719
|
-
useState,
|
|
5720
|
-
useSyncExternalStore
|
|
5721
|
-
} from "react";
|
|
5722
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
5723
|
-
var EMPTY_SOURCE = {
|
|
5724
|
-
subscribe: () => () => {
|
|
5725
|
-
},
|
|
5726
|
-
getSession: () => void 0,
|
|
5727
|
-
isHistoryLoading: () => false,
|
|
5728
|
-
planRevealRevision: () => 0
|
|
5729
|
-
};
|
|
5730
|
-
var SessionSourceContext = createContext2(EMPTY_SOURCE);
|
|
5731
|
-
function SessionSourceProvider({ source, children }) {
|
|
5732
|
-
return /* @__PURE__ */ jsx2(SessionSourceContext.Provider, { value: source, children });
|
|
5733
|
-
}
|
|
5734
|
-
function useSessionSource() {
|
|
5735
|
-
return useContext2(SessionSourceContext);
|
|
5736
|
-
}
|
|
5737
|
-
var SingleSessionSource = class {
|
|
5738
|
-
session = null;
|
|
5739
|
-
loading = false;
|
|
5740
|
-
listeners = /* @__PURE__ */ new Set();
|
|
5741
|
-
revisions = /* @__PURE__ */ new Map();
|
|
5742
|
-
subscribe = (listener) => {
|
|
5743
|
-
this.listeners.add(listener);
|
|
5744
|
-
return () => {
|
|
5745
|
-
this.listeners.delete(listener);
|
|
5746
|
-
};
|
|
5747
|
-
};
|
|
5748
|
-
getSession = (sessionId) => {
|
|
5749
|
-
const current = this.session;
|
|
5750
|
-
return current && (!sessionId || current.sessionId === sessionId) ? current : void 0;
|
|
5751
|
-
};
|
|
5752
|
-
isHistoryLoading = (sessionId) => {
|
|
5753
|
-
if (!this.session) return this.loading;
|
|
5754
|
-
return (!sessionId || this.session.sessionId === sessionId) && this.loading;
|
|
5755
|
-
};
|
|
5756
|
-
planRevealRevision = (sessionId) => sessionId ? this.revisions.get(sessionId) ?? 0 : 0;
|
|
5757
|
-
update(session, loading) {
|
|
5758
|
-
if (this.session === session && this.loading === loading) return;
|
|
5759
|
-
this.session = session;
|
|
5760
|
-
this.loading = loading;
|
|
5761
|
-
this.notify();
|
|
5762
|
-
}
|
|
5763
|
-
/** 只认实时成功的根回路 update_plan:历史加载与断线补数不算「新揭示」。 */
|
|
5764
|
-
watchPlan(session) {
|
|
5765
|
-
return session.on("toolResult", ({ toolCall, turn, source }) => {
|
|
5766
|
-
if (source === "reconnect_replay" || (turn.loop_id || "root") !== "root" || toolCall.status !== "done" || !isPlanUpdateTool(toolCall) || !parsePlanUpdate(toolCall.arguments)) {
|
|
5767
|
-
return;
|
|
5768
|
-
}
|
|
5769
|
-
this.revisions.set(session.sessionId, (this.revisions.get(session.sessionId) ?? 0) + 1);
|
|
5770
|
-
this.notify();
|
|
5771
|
-
});
|
|
5772
|
-
}
|
|
5773
|
-
notify() {
|
|
5774
|
-
for (const listener of [...this.listeners]) listener();
|
|
5775
|
-
}
|
|
5776
|
-
};
|
|
5777
|
-
function useSingleSessionSource(session, loading) {
|
|
5778
|
-
const [source] = useState(() => new SingleSessionSource());
|
|
5779
|
-
useLayoutEffect(() => {
|
|
5780
|
-
source.update(session, loading);
|
|
5781
|
-
}, [source, session, loading]);
|
|
5782
|
-
useEffect(() => session ? source.watchPlan(session) : void 0, [source, session]);
|
|
5783
|
-
return source;
|
|
5784
|
-
}
|
|
5785
|
-
var EMPTY_STATE = createInitialSessionState("");
|
|
5786
|
-
var noopSubscribe = () => () => {
|
|
5787
|
-
};
|
|
5788
|
-
function useSessionHandle(sessionId) {
|
|
5789
|
-
const source = useSessionSource();
|
|
5790
|
-
return useSyncExternalStore(
|
|
5791
|
-
source.subscribe,
|
|
5792
|
-
() => source.getSession(sessionId) ?? null,
|
|
5793
|
-
() => source.getSession(sessionId) ?? null
|
|
5794
|
-
);
|
|
5795
|
-
}
|
|
5796
|
-
function useSessionState(sessionId, selector) {
|
|
5797
|
-
const session = useSessionHandle(sessionId);
|
|
5798
|
-
const selectorRef = useRef(selector);
|
|
5799
|
-
selectorRef.current = selector;
|
|
5800
|
-
const store = useMemo(() => {
|
|
5801
|
-
let lastState = null;
|
|
5802
|
-
let lastSelector = null;
|
|
5803
|
-
let lastSelected;
|
|
5804
|
-
const getSnapshot = () => {
|
|
5805
|
-
const state = session ? session.getState() : EMPTY_STATE;
|
|
5806
|
-
const current = selectorRef.current;
|
|
5807
|
-
if (state !== lastState || current !== lastSelector) {
|
|
5808
|
-
const next = current(state);
|
|
5809
|
-
if (!(lastState !== null && Object.is(next, lastSelected))) lastSelected = next;
|
|
5810
|
-
lastState = state;
|
|
5811
|
-
lastSelector = current;
|
|
5812
|
-
}
|
|
5813
|
-
return lastSelected;
|
|
5814
|
-
};
|
|
5815
|
-
return {
|
|
5816
|
-
subscribe: session ? (listener) => session.subscribe(listener) : noopSubscribe,
|
|
5817
|
-
getSnapshot
|
|
5818
|
-
};
|
|
5819
|
-
}, [session]);
|
|
5820
|
-
return useSyncExternalStore(store.subscribe, store.getSnapshot, store.getSnapshot);
|
|
5821
|
-
}
|
|
5822
|
-
function useIsSessionHistoryLoading(sessionId) {
|
|
5823
|
-
const source = useSessionSource();
|
|
5824
|
-
return useSyncExternalStore(
|
|
5825
|
-
source.subscribe,
|
|
5826
|
-
() => source.isHistoryLoading(sessionId),
|
|
5827
|
-
() => source.isHistoryLoading(sessionId)
|
|
5828
|
-
);
|
|
5829
|
-
}
|
|
5830
|
-
function usePlanRevealRevision(sessionId) {
|
|
5831
|
-
const source = useSessionSource();
|
|
5832
|
-
return useSyncExternalStore(
|
|
5833
|
-
source.subscribe,
|
|
5834
|
-
() => source.planRevealRevision(sessionId),
|
|
5835
|
-
() => source.planRevealRevision(sessionId)
|
|
5836
|
-
);
|
|
5837
|
-
}
|
|
5838
|
-
var CurrentChatSessionContext = createContext2(null);
|
|
5839
|
-
function CurrentChatSessionProvider({ sessionId, children }) {
|
|
5840
|
-
return /* @__PURE__ */ jsx2(CurrentChatSessionContext.Provider, { value: sessionId, children });
|
|
5841
|
-
}
|
|
5842
|
-
function useCurrentChatSessionId() {
|
|
5843
|
-
return useContext2(CurrentChatSessionContext);
|
|
5844
|
-
}
|
|
5845
|
-
|
|
5846
|
-
// src/chat/runtime/environment.tsx
|
|
5847
|
-
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
5848
|
-
var EMPTY_ENVIRONMENT = {};
|
|
5849
|
-
var ChatEnvironmentContext = createContext3(EMPTY_ENVIRONMENT);
|
|
5850
|
-
function ChatEnvironmentProvider({ value, children }) {
|
|
5851
|
-
return /* @__PURE__ */ jsx3(ChatEnvironmentContext.Provider, { value, children });
|
|
5852
|
-
}
|
|
5853
|
-
function useChatEnvironment() {
|
|
5854
|
-
return useContext3(ChatEnvironmentContext);
|
|
5855
|
-
}
|
|
5856
|
-
var NO_HIGHLIGHT = { highlightedHtml: null };
|
|
5857
|
-
function usePlainCode() {
|
|
5858
|
-
return NO_HIGHLIGHT;
|
|
5859
|
-
}
|
|
5860
|
-
function useHighlightedCode(code, language) {
|
|
5861
|
-
const use = useChatEnvironment().useHighlightedCode ?? usePlainCode;
|
|
5862
|
-
return use(code, language);
|
|
5863
|
-
}
|
|
5864
|
-
function useNoDetail() {
|
|
5865
|
-
return null;
|
|
5866
|
-
}
|
|
5867
|
-
function useChatSessionDetail(sessionId) {
|
|
5868
|
-
const use = useChatEnvironment().useSessionDetail ?? useNoDetail;
|
|
5869
|
-
return use(sessionId);
|
|
5870
|
-
}
|
|
5871
|
-
function useShowTodo() {
|
|
5872
|
-
return false;
|
|
5873
|
-
}
|
|
5874
|
-
function useHideTodo() {
|
|
5875
|
-
const use = useChatEnvironment().useHideTodo ?? useShowTodo;
|
|
5876
|
-
return use();
|
|
5877
|
-
}
|
|
5878
|
-
function useChatRenderMode() {
|
|
5879
|
-
return useChatEnvironment().renderMode ?? "normal";
|
|
5880
|
-
}
|
|
5881
|
-
function notifyChat(environment, kind, message, options) {
|
|
5882
|
-
if (environment.notify) environment.notify(kind, message, options);
|
|
5883
|
-
else if (kind === "error") console.error(message);
|
|
5884
|
-
}
|
|
5885
|
-
function useComposerBridge(sessionId) {
|
|
5886
|
-
const environment = useChatEnvironment();
|
|
5887
|
-
const session = useSessionHandle(sessionId);
|
|
5888
|
-
return useMemo2(
|
|
5889
|
-
() => ({
|
|
5890
|
-
appendText(text, separate = false) {
|
|
5891
|
-
if (!sessionId) return;
|
|
5892
|
-
if (environment.appendToComposer) environment.appendToComposer(sessionId, text, separate);
|
|
5893
|
-
else session?.insertText(separate ? `
|
|
5894
|
-
|
|
5895
|
-
${text}` : text);
|
|
5896
|
-
},
|
|
5897
|
-
addContext(context) {
|
|
5898
|
-
if (!sessionId) return;
|
|
5899
|
-
if (environment.addComposerContext) environment.addComposerContext(sessionId, context);
|
|
5900
|
-
else session?.attach(context.label, context.content);
|
|
5901
|
-
}
|
|
5902
|
-
}),
|
|
5903
|
-
[environment, session, sessionId]
|
|
5904
|
-
);
|
|
5905
|
-
}
|
|
5906
|
-
var NO_VIRTUAL_ITEMS = [];
|
|
5907
|
-
var NO_VIRTUALIZER = {
|
|
5908
|
-
getVirtualItems: () => NO_VIRTUAL_ITEMS,
|
|
5909
|
-
getTotalSize: () => 0,
|
|
5910
|
-
measureElement: () => {
|
|
5911
|
-
},
|
|
5912
|
-
scrollToIndex: () => {
|
|
5913
|
-
},
|
|
5914
|
-
getOffsetForIndex: () => void 0
|
|
5915
|
-
};
|
|
5916
|
-
function useNoVirtualizer() {
|
|
5917
|
-
return NO_VIRTUALIZER;
|
|
5918
|
-
}
|
|
5919
|
-
function useChatVirtualizer(options) {
|
|
5920
|
-
const injected = useChatEnvironment().useVirtualizer;
|
|
5921
|
-
const use = injected ?? useNoVirtualizer;
|
|
5922
|
-
const virtualizer = use(options);
|
|
5923
|
-
return { virtualizer, enabled: Boolean(injected) };
|
|
5924
|
-
}
|
|
5925
|
-
|
|
5926
|
-
// src/chat/tool-renderers/shared.tsx
|
|
5927
|
-
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
5928
|
-
function getResultText(result) {
|
|
5929
|
-
if (typeof result === "string") return result;
|
|
5930
|
-
if (Array.isArray(result)) {
|
|
5931
|
-
const texts = result.filter(
|
|
5932
|
-
(p2) => typeof p2 === "object" && p2 !== null && p2.type === "text" && typeof p2.text === "string"
|
|
5933
|
-
).map((p2) => p2.text);
|
|
5934
|
-
return texts.length > 0 ? texts.join("\n") : null;
|
|
5935
|
-
}
|
|
5936
|
-
return result != null ? String(result) : null;
|
|
5937
|
-
}
|
|
5938
|
-
function getResultImages(result) {
|
|
5939
|
-
if (!Array.isArray(result)) return [];
|
|
5940
|
-
return result.filter(
|
|
5941
|
-
(p2) => typeof p2 === "object" && p2 !== null && p2.type === "image_url" && typeof p2.image_url?.url === "string"
|
|
5942
|
-
).map((p2) => p2.image_url);
|
|
5943
|
-
}
|
|
5944
|
-
function parseJsonValue(value) {
|
|
5945
|
-
if (!value) return null;
|
|
5946
|
-
try {
|
|
5947
|
-
return JSON.parse(value);
|
|
5948
|
-
} catch {
|
|
5949
|
-
return null;
|
|
5950
|
-
}
|
|
5951
|
-
}
|
|
5952
|
-
function isPlainObject(value) {
|
|
5953
|
-
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
5954
|
-
}
|
|
5955
|
-
function getStringValue(data, key) {
|
|
5956
|
-
const value = data?.[key];
|
|
5957
|
-
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
5958
|
-
}
|
|
5959
|
-
function getNumberValue(data, key) {
|
|
5960
|
-
const value = data?.[key];
|
|
5961
|
-
return typeof value === "number" && Number.isFinite(value) ? value : null;
|
|
5962
|
-
}
|
|
5963
|
-
function getBooleanValue(data, key) {
|
|
5964
|
-
return data?.[key] === true;
|
|
5965
|
-
}
|
|
5966
|
-
function extractErrorMessage(value) {
|
|
5967
|
-
const text = typeof value === "string" ? value : getResultText(value);
|
|
5968
|
-
if (!text?.trim()) return null;
|
|
5969
|
-
const parsed = parseJsonValue(text);
|
|
5970
|
-
if (!isPlainObject(parsed)) return null;
|
|
5971
|
-
return typeof parsed.error === "string" && parsed.error.trim() ? parsed.error.trim() : null;
|
|
5972
|
-
}
|
|
5973
|
-
function getFileName(filePath) {
|
|
5974
|
-
if (!filePath) return "\u672A\u547D\u540D\u6587\u4EF6";
|
|
5975
|
-
return filePath.split(/[\\/]/).pop() ?? filePath;
|
|
5976
|
-
}
|
|
5977
|
-
function getCodeLanguage(filePath) {
|
|
5978
|
-
return getCodeLanguageFromFilename(filePath);
|
|
5979
|
-
}
|
|
5980
|
-
function formatBytes(size4) {
|
|
5981
|
-
if (typeof size4 !== "number" || !Number.isFinite(size4) || size4 < 0) return null;
|
|
5982
|
-
if (size4 < 1024) return `${size4} B`;
|
|
5983
|
-
if (size4 < 1024 * 1024) return `${(size4 / 1024).toFixed(1)} KB`;
|
|
5984
|
-
return `${(size4 / (1024 * 1024)).toFixed(1)} MB`;
|
|
5985
|
-
}
|
|
5986
|
-
function CodePreview({
|
|
5987
|
-
content,
|
|
5988
|
-
filePath,
|
|
5989
|
-
emptyLabel = "\uFF08\u6682\u65E0\u5185\u5BB9\uFF09",
|
|
5990
|
-
className
|
|
5991
|
-
}) {
|
|
5992
|
-
const { highlightedHtml } = useHighlightedCode(content, getCodeLanguage(filePath));
|
|
5993
|
-
if (!content.trim()) {
|
|
5994
|
-
return /* @__PURE__ */ jsx4(
|
|
5995
|
-
"pre",
|
|
5996
|
-
{
|
|
5997
|
-
className: cn(
|
|
5998
|
-
"overflow-auto rounded-lg border border-[hsl(var(--border))]",
|
|
5999
|
-
"bg-[hsl(var(--muted))]/35 p-3 font-mono text-[11px] text-[hsl(var(--muted-foreground))]",
|
|
6000
|
-
className
|
|
6001
|
-
),
|
|
6002
|
-
children: /* @__PURE__ */ jsx4("code", { children: emptyLabel })
|
|
6003
|
-
}
|
|
6004
|
-
);
|
|
6005
|
-
}
|
|
6006
|
-
return /* @__PURE__ */ jsx4(
|
|
6007
|
-
"pre",
|
|
6008
|
-
{
|
|
6009
|
-
className: cn(
|
|
6010
|
-
"overflow-auto rounded-lg border border-[hsl(var(--border))]",
|
|
6011
|
-
"bg-[hsl(var(--muted))]/35 p-3 text-[11px]",
|
|
6012
|
-
className
|
|
6013
|
-
),
|
|
6014
|
-
children: highlightedHtml ? /* @__PURE__ */ jsx4(
|
|
6015
|
-
"code",
|
|
6016
|
-
{
|
|
6017
|
-
className: "font-mono",
|
|
6018
|
-
dangerouslySetInnerHTML: { __html: highlightedHtml }
|
|
6019
|
-
}
|
|
6020
|
-
) : /* @__PURE__ */ jsx4("code", { className: "whitespace-pre-wrap break-words font-mono text-[hsl(var(--foreground))]", children: content })
|
|
6021
|
-
}
|
|
6022
|
-
);
|
|
6023
|
-
}
|
|
6024
|
-
|
|
6025
|
-
// src/chat/tool-renderers/kb-search-result.ts
|
|
6026
|
-
function parseKbSearchResult(result) {
|
|
6027
|
-
const value = parseJsonValue(getResultText(result));
|
|
6028
|
-
if (!isPlainObject(value) || !Array.isArray(value.hits)) return null;
|
|
6029
|
-
const hits = value.hits.filter(isPlainObject).map((hit, index2) => ({
|
|
6030
|
-
n: typeof hit.n === "number" ? hit.n : index2 + 1,
|
|
6031
|
-
kbName: getStringValue(hit, "kb_name") ?? "",
|
|
6032
|
-
title: getStringValue(hit, "title") ?? getStringValue(hit, "path") ?? "\u672A\u547D\u540D\u6587\u6863",
|
|
6033
|
-
path: getStringValue(hit, "path") ?? "",
|
|
6034
|
-
page: typeof hit.page === "number" ? hit.page : null,
|
|
6035
|
-
heading: getStringValue(hit, "heading"),
|
|
6036
|
-
text: getStringValue(hit, "text") ?? "",
|
|
6037
|
-
previewUrl: getStringValue(hit, "preview_url")
|
|
6038
|
-
}));
|
|
6039
|
-
return {
|
|
6040
|
-
summary: getStringValue(value, "summary"),
|
|
6041
|
-
query: getStringValue(value, "query"),
|
|
6042
|
-
hits
|
|
6043
|
-
};
|
|
6044
|
-
}
|
|
6045
|
-
function formatKbSearchLabel(result) {
|
|
6046
|
-
const parsed = parseKbSearchResult(result);
|
|
6047
|
-
if (!parsed) return null;
|
|
6048
|
-
const names = [...new Set(parsed.hits.map((hit) => hit.kbName).filter(Boolean))];
|
|
6049
|
-
const scope = names.length > 0 ? names.map((name) => `\u300A${name}\u300B`).join("") : "\u77E5\u8BC6\u5E93";
|
|
6050
|
-
return `\u{1F50D} \u5728${scope}\u68C0\u7D22\u5230 ${parsed.hits.length} \u6761`;
|
|
6051
|
-
}
|
|
6052
|
-
|
|
6053
5696
|
// src/chat/display-utils.ts
|
|
6054
5697
|
var TOOL_NAME_ALIASES = {
|
|
6055
5698
|
agent: "Agent",
|
|
6056
5699
|
ask_user_question: "AskUserQuestion",
|
|
6057
5700
|
bash: "Bash",
|
|
6058
5701
|
bg_bash: "BgBash",
|
|
5702
|
+
code_mode_run: "CodeMode",
|
|
6059
5703
|
edit: "Edit",
|
|
6060
5704
|
exit_plan_mode: "ExitPlanMode",
|
|
6061
5705
|
file_edit: "Edit",
|
|
@@ -6064,7 +5708,6 @@ var TOOL_NAME_ALIASES = {
|
|
|
6064
5708
|
finish_task: "FinishTask",
|
|
6065
5709
|
glob: "Glob",
|
|
6066
5710
|
grep: "Grep",
|
|
6067
|
-
kb_search: "KbSearch",
|
|
6068
5711
|
ls: "Ls",
|
|
6069
5712
|
multi_edit: "MultiEdit",
|
|
6070
5713
|
read: "Read",
|
|
@@ -6077,6 +5720,7 @@ var TOOL_NAME_ALIASES = {
|
|
|
6077
5720
|
var TOOL_DISPLAY_LABELS = {
|
|
6078
5721
|
Bash: "\u6267\u884C\u547D\u4EE4",
|
|
6079
5722
|
BgBash: "\u540E\u53F0\u6267\u884C\u547D\u4EE4",
|
|
5723
|
+
CodeMode: "\u6267\u884C\u7A0B\u5E8F",
|
|
6080
5724
|
Read: "\u8BFB\u53D6\u6587\u4EF6",
|
|
6081
5725
|
Write: "\u5199\u5165\u6587\u4EF6",
|
|
6082
5726
|
Edit: "\u7F16\u8F91\u6587\u4EF6",
|
|
@@ -6084,7 +5728,6 @@ var TOOL_DISPLAY_LABELS = {
|
|
|
6084
5728
|
Ls: "\u5217\u51FA\u76EE\u5F55",
|
|
6085
5729
|
Glob: "\u5339\u914D\u6587\u4EF6",
|
|
6086
5730
|
Grep: "\u641C\u7D22\u6587\u672C",
|
|
6087
|
-
KbSearch: "\u68C0\u7D22\u77E5\u8BC6\u5E93",
|
|
6088
5731
|
WebSearch: "\u641C\u7D22\u7F51\u9875",
|
|
6089
5732
|
WebFetch: "\u6574\u7406\u7F51\u9875\u5185\u5BB9",
|
|
6090
5733
|
Agent: "\u6D3E\u751F\u5B50\u667A\u80FD\u4F53",
|
|
@@ -6122,7 +5765,7 @@ function safeParseJson(value) {
|
|
|
6122
5765
|
return null;
|
|
6123
5766
|
}
|
|
6124
5767
|
}
|
|
6125
|
-
function
|
|
5768
|
+
function isPlainObject(value) {
|
|
6126
5769
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
6127
5770
|
}
|
|
6128
5771
|
function getStringArgValue(args, key) {
|
|
@@ -6134,7 +5777,7 @@ function getCommandDescription(args) {
|
|
|
6134
5777
|
}
|
|
6135
5778
|
function getToolDescription(toolCall) {
|
|
6136
5779
|
const args = safeParseJson(toolCall.arguments);
|
|
6137
|
-
if (!
|
|
5780
|
+
if (!isPlainObject(args)) return null;
|
|
6138
5781
|
return getCommandDescription(args) || null;
|
|
6139
5782
|
}
|
|
6140
5783
|
function formatFileName(filePath) {
|
|
@@ -6161,6 +5804,7 @@ function isInternalStatusFile(filePath) {
|
|
|
6161
5804
|
function formatToolName(name) {
|
|
6162
5805
|
const trimmed = name.trim();
|
|
6163
5806
|
if (!trimmed) return name;
|
|
5807
|
+
if (trimmed === "code:run" || trimmed === "code__run") return "CodeMode";
|
|
6164
5808
|
const stripped = trimmed.split(":").pop()?.split("/").pop()?.split(".").pop()?.trim() || trimmed;
|
|
6165
5809
|
const normalized = stripped.replace(/([a-z0-9])([A-Z])/g, "$1_$2").replace(/[^a-zA-Z0-9]+/g, "_").replace(/^_+|_+$/g, "").toLowerCase();
|
|
6166
5810
|
return TOOL_NAME_ALIASES[normalized] ?? stripped;
|
|
@@ -6169,7 +5813,8 @@ function getToolDisplayLabel(toolCall) {
|
|
|
6169
5813
|
const normalized = formatToolName(toolCall.name);
|
|
6170
5814
|
const args = safeParseJson(toolCall.arguments);
|
|
6171
5815
|
const displayName = toolCall.display_name?.trim() ?? "";
|
|
6172
|
-
const
|
|
5816
|
+
const explicitLabel = displayName === toolCall.name ? "" : displayName;
|
|
5817
|
+
const baseLabel = explicitLabel || TOOL_DISPLAY_LABELS[normalized] || displayName || normalized;
|
|
6173
5818
|
const metaDisplayName = getStringArgValue(args, "_meta_display_name");
|
|
6174
5819
|
if (metaDisplayName) {
|
|
6175
5820
|
return metaDisplayName;
|
|
@@ -6192,12 +5837,6 @@ function getToolDisplayLabel(toolCall) {
|
|
|
6192
5837
|
const title = args && typeof args.title === "string" ? args.title : "";
|
|
6193
5838
|
return title ? `${baseLabel}\uFF1A${title}` : baseLabel;
|
|
6194
5839
|
}
|
|
6195
|
-
if (normalized === "KbSearch") {
|
|
6196
|
-
const resultLabel = formatKbSearchLabel(toolCall.result);
|
|
6197
|
-
if (resultLabel) return resultLabel;
|
|
6198
|
-
const query = getStringArgValue(args, "query");
|
|
6199
|
-
return query ? `${baseLabel}\uFF1A${query}` : baseLabel;
|
|
6200
|
-
}
|
|
6201
5840
|
return description || baseLabel;
|
|
6202
5841
|
}
|
|
6203
5842
|
function getToolTone(status) {
|
|
@@ -6234,7 +5873,7 @@ function extractToolFilePaths(toolCall) {
|
|
|
6234
5873
|
for (const item of value) collect(item, depth + 1, allowPlainString);
|
|
6235
5874
|
return;
|
|
6236
5875
|
}
|
|
6237
|
-
if (!
|
|
5876
|
+
if (!isPlainObject(value)) return;
|
|
6238
5877
|
for (const key of PRIORITY_FILE_KEYS) collect(value[key], depth + 1, true);
|
|
6239
5878
|
for (const [key, nested] of Object.entries(value)) {
|
|
6240
5879
|
if (!PRIORITY_FILE_KEYS.includes(key) && nested && typeof nested === "object") collect(nested, depth + 1, false);
|
|
@@ -6249,7 +5888,7 @@ function extractToolFilePaths(toolCall) {
|
|
|
6249
5888
|
}
|
|
6250
5889
|
} else if (Array.isArray(value)) {
|
|
6251
5890
|
for (const item of value) collectPatchHeaders(item);
|
|
6252
|
-
} else if (
|
|
5891
|
+
} else if (isPlainObject(value)) {
|
|
6253
5892
|
for (const [key, nested] of Object.entries(value)) {
|
|
6254
5893
|
if (key.toLowerCase().includes("patch") || key.toLowerCase().includes("diff")) collectPatchHeaders(nested);
|
|
6255
5894
|
}
|
|
@@ -6273,7 +5912,7 @@ function getToolOutputTag(toolCall) {
|
|
|
6273
5912
|
}
|
|
6274
5913
|
|
|
6275
5914
|
// src/components/PlanUpdateBlock.tsx
|
|
6276
|
-
import { jsx as
|
|
5915
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
6277
5916
|
var PLAN_STEP_STATUSES = /* @__PURE__ */ new Set(["pending", "in_progress", "completed"]);
|
|
6278
5917
|
var PLAN_AUTO_COLLAPSE_MS = 5e3;
|
|
6279
5918
|
function isPlanUpdateTool(toolCall) {
|
|
@@ -6328,12 +5967,12 @@ function PlanStepIcon({
|
|
|
6328
5967
|
running = false
|
|
6329
5968
|
}) {
|
|
6330
5969
|
if (status === "completed") {
|
|
6331
|
-
return /* @__PURE__ */
|
|
5970
|
+
return /* @__PURE__ */ jsx2(Check, { size: size4, strokeWidth: 2, className: "shrink-0 text-emerald-500" });
|
|
6332
5971
|
}
|
|
6333
5972
|
if (status === "in_progress") {
|
|
6334
|
-
return running ? /* @__PURE__ */
|
|
5973
|
+
return running ? /* @__PURE__ */ jsx2(LoaderCircle, { size: size4, className: "shrink-0 animate-spin text-[hsl(var(--muted-foreground))]" }) : /* @__PURE__ */ jsx2(CircleDot, { size: size4, className: "shrink-0 text-amber-500" });
|
|
6335
5974
|
}
|
|
6336
|
-
return /* @__PURE__ */
|
|
5975
|
+
return /* @__PURE__ */ jsx2(Circle, { size: size4, className: "shrink-0 text-[hsl(var(--muted-foreground))]/60" });
|
|
6337
5976
|
}
|
|
6338
5977
|
function PlanUpdateBlock({
|
|
6339
5978
|
toolCall,
|
|
@@ -6343,10 +5982,10 @@ function PlanUpdateBlock({
|
|
|
6343
5982
|
}) {
|
|
6344
5983
|
const updateKey = `${toolCall.id}:${toolCall.arguments}`;
|
|
6345
5984
|
const revealKey = autoReveal ? updateKey : null;
|
|
6346
|
-
const [collapsed, setCollapsed] =
|
|
6347
|
-
const collapseTimerRef =
|
|
5985
|
+
const [collapsed, setCollapsed] = useState(!autoReveal);
|
|
5986
|
+
const collapseTimerRef = useRef(null);
|
|
6348
5987
|
const data = parsePlanUpdate(toolCall.arguments);
|
|
6349
|
-
|
|
5988
|
+
useEffect(() => {
|
|
6350
5989
|
if (!revealKey) return;
|
|
6351
5990
|
if (collapseTimerRef.current) clearTimeout(collapseTimerRef.current);
|
|
6352
5991
|
setCollapsed(false);
|
|
@@ -6355,7 +5994,7 @@ function PlanUpdateBlock({
|
|
|
6355
5994
|
collapseTimerRef.current = null;
|
|
6356
5995
|
}, PLAN_AUTO_COLLAPSE_MS);
|
|
6357
5996
|
}, [revealKey]);
|
|
6358
|
-
|
|
5997
|
+
useEffect(
|
|
6359
5998
|
() => () => {
|
|
6360
5999
|
if (collapseTimerRef.current) clearTimeout(collapseTimerRef.current);
|
|
6361
6000
|
},
|
|
@@ -6384,20 +6023,20 @@ function PlanUpdateBlock({
|
|
|
6384
6023
|
),
|
|
6385
6024
|
children: [
|
|
6386
6025
|
collapsed && currentStep ? /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-1 items-center gap-1.5 text-xs text-[hsl(var(--foreground))]", children: [
|
|
6387
|
-
/* @__PURE__ */
|
|
6388
|
-
/* @__PURE__ */
|
|
6389
|
-
pausedAtCurrentStep ? /* @__PURE__ */
|
|
6026
|
+
/* @__PURE__ */ jsx2(PlanStepIcon, { status: currentStep.status, size: 14, running }),
|
|
6027
|
+
/* @__PURE__ */ jsx2("span", { className: "truncate", children: currentStep.step }),
|
|
6028
|
+
pausedAtCurrentStep ? /* @__PURE__ */ jsx2("span", { className: "shrink-0 text-[11px] text-amber-500", children: "\u5DF2\u6682\u505C" }) : null
|
|
6390
6029
|
] }) : /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-1 items-center gap-1.5 text-[11px] text-[hsl(var(--muted-foreground))]", children: [
|
|
6391
|
-
/* @__PURE__ */
|
|
6392
|
-
/* @__PURE__ */
|
|
6393
|
-
pausedAtCurrentStep ? /* @__PURE__ */
|
|
6030
|
+
/* @__PURE__ */ jsx2(ListChecks, { size: 14, className: "shrink-0", "aria-hidden": "true" }),
|
|
6031
|
+
/* @__PURE__ */ jsx2("span", { className: "truncate", children: "\u4EFB\u52A1\u8FDB\u5EA6" }),
|
|
6032
|
+
pausedAtCurrentStep ? /* @__PURE__ */ jsx2("span", { className: "shrink-0 text-amber-500", children: "\u5DF2\u6682\u505C" }) : null
|
|
6394
6033
|
] }),
|
|
6395
6034
|
/* @__PURE__ */ jsxs("span", { className: "shrink-0 text-[11px] tabular-nums text-[hsl(var(--muted-foreground))]", children: [
|
|
6396
6035
|
completed,
|
|
6397
6036
|
"/",
|
|
6398
6037
|
data.plan.length
|
|
6399
6038
|
] }),
|
|
6400
|
-
/* @__PURE__ */
|
|
6039
|
+
/* @__PURE__ */ jsx2(
|
|
6401
6040
|
ChevronDown,
|
|
6402
6041
|
{
|
|
6403
6042
|
size: 14,
|
|
@@ -6410,7 +6049,7 @@ function PlanUpdateBlock({
|
|
|
6410
6049
|
]
|
|
6411
6050
|
}
|
|
6412
6051
|
),
|
|
6413
|
-
/* @__PURE__ */
|
|
6052
|
+
/* @__PURE__ */ jsx2(
|
|
6414
6053
|
"div",
|
|
6415
6054
|
{
|
|
6416
6055
|
"aria-hidden": collapsed,
|
|
@@ -6418,9 +6057,9 @@ function PlanUpdateBlock({
|
|
|
6418
6057
|
"grid transition-[grid-template-rows,opacity] duration-300 ease-out motion-reduce:transition-none",
|
|
6419
6058
|
collapsed ? "grid-rows-[0fr] opacity-0" : "grid-rows-[1fr] opacity-100"
|
|
6420
6059
|
),
|
|
6421
|
-
children: /* @__PURE__ */
|
|
6422
|
-
/* @__PURE__ */
|
|
6423
|
-
/* @__PURE__ */
|
|
6060
|
+
children: /* @__PURE__ */ jsx2("div", { className: "min-h-0 overflow-hidden", children: /* @__PURE__ */ jsx2("div", { className: "flex max-h-40 flex-col gap-0.5 overflow-y-auto px-3 py-2", children: data.plan.length === 0 ? /* @__PURE__ */ jsx2("span", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: "\u6682\u65E0\u4EFB\u52A1\u6B65\u9AA4" }) : data.plan.map((item, index2) => /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 py-0.5", children: [
|
|
6061
|
+
/* @__PURE__ */ jsx2("span", { className: "mt-[3px] flex shrink-0", children: /* @__PURE__ */ jsx2(PlanStepIcon, { status: item.status, size: 14, running }) }),
|
|
6062
|
+
/* @__PURE__ */ jsx2(
|
|
6424
6063
|
"span",
|
|
6425
6064
|
{
|
|
6426
6065
|
className: cn(
|
|
@@ -6436,6 +6075,102 @@ function PlanUpdateBlock({
|
|
|
6436
6075
|
] });
|
|
6437
6076
|
}
|
|
6438
6077
|
|
|
6078
|
+
// src/chat/runtime/input-history-storage.ts
|
|
6079
|
+
var generation = 0;
|
|
6080
|
+
function getInputHistoryGeneration() {
|
|
6081
|
+
return generation;
|
|
6082
|
+
}
|
|
6083
|
+
|
|
6084
|
+
// src/chat/runtime/input-cache-reset.ts
|
|
6085
|
+
var resetters = /* @__PURE__ */ new WeakMap();
|
|
6086
|
+
function onInputCachesReset(client, reset) {
|
|
6087
|
+
let set = resetters.get(client);
|
|
6088
|
+
if (!set) {
|
|
6089
|
+
set = /* @__PURE__ */ new Set();
|
|
6090
|
+
resetters.set(client, set);
|
|
6091
|
+
}
|
|
6092
|
+
set.add(reset);
|
|
6093
|
+
return () => {
|
|
6094
|
+
set.delete(reset);
|
|
6095
|
+
};
|
|
6096
|
+
}
|
|
6097
|
+
|
|
6098
|
+
// src/rich-input/lib/plugin-suggestions.ts
|
|
6099
|
+
var accountPreparation = /* @__PURE__ */ new WeakMap();
|
|
6100
|
+
var registeredClients = /* @__PURE__ */ new WeakSet();
|
|
6101
|
+
function pluginRefsForSend(refs, turns = []) {
|
|
6102
|
+
const latest = [...turns].reverse().find((turn) => turn.role === "user");
|
|
6103
|
+
return refs.length || latest?.refs?.length ? refs : void 0;
|
|
6104
|
+
}
|
|
6105
|
+
function prepareAccount(client) {
|
|
6106
|
+
if (!registeredClients.has(client)) {
|
|
6107
|
+
registeredClients.add(client);
|
|
6108
|
+
onInputCachesReset(client, () => accountPreparation.delete(client));
|
|
6109
|
+
}
|
|
6110
|
+
const current = accountPreparation.get(client);
|
|
6111
|
+
if (current && current.token === client.token) return current.ready;
|
|
6112
|
+
const ready = client.plugins.catalog().catch((error) => {
|
|
6113
|
+
accountPreparation.delete(client);
|
|
6114
|
+
throw error;
|
|
6115
|
+
});
|
|
6116
|
+
accountPreparation.set(client, { token: client.token, ready });
|
|
6117
|
+
return ready;
|
|
6118
|
+
}
|
|
6119
|
+
async function getPluginSuggestionItems(client, session, query, pendingPlugins = []) {
|
|
6120
|
+
if (!session && pendingPlugins.length === 0) return [];
|
|
6121
|
+
const path = session ? `/api/sessions/${encodeURIComponent(session)}/plugin-tools/mentions` : "/api/plugin-mentions/mentions";
|
|
6122
|
+
try {
|
|
6123
|
+
if (!session) await prepareAccount(client);
|
|
6124
|
+
const data = await client.json("POST", path, { arguments: { query, cursor: "" }, ...!session ? { plugin_selection: pendingPlugins } : {} });
|
|
6125
|
+
return [...data.items.map((item) => ({ ...item, kind: "plugin", name: item.label })), ...data.errors.map((message) => ({ kind: "pluginError", message }))];
|
|
6126
|
+
} catch {
|
|
6127
|
+
return [{ kind: "pluginError", message: "\u63D2\u4EF6\u6761\u76EE\u6682\u65F6\u65E0\u6CD5\u52A0\u8F7D\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165 @ \u91CD\u8BD5" }];
|
|
6128
|
+
}
|
|
6129
|
+
}
|
|
6130
|
+
|
|
6131
|
+
// src/components/BrowserConnectionDialog.tsx
|
|
6132
|
+
import { useEffect as useEffect2, useRef as useRef2 } from "react";
|
|
6133
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
6134
|
+
function BrowserConnectionDialog({ client, name, label = "\u4E1A\u52A1\u8D26\u53F7", onClose }) {
|
|
6135
|
+
const dialog = useRef2(null);
|
|
6136
|
+
const frame = useRef2(null);
|
|
6137
|
+
const url = new URL(client.connectors.browserAuthorizationUrl(name), window.location.href);
|
|
6138
|
+
url.searchParams.set("embedded", "1");
|
|
6139
|
+
const origin = url.origin;
|
|
6140
|
+
useEffect2(() => {
|
|
6141
|
+
const element = dialog.current;
|
|
6142
|
+
element?.showModal();
|
|
6143
|
+
return () => element?.close();
|
|
6144
|
+
}, []);
|
|
6145
|
+
useEffect2(() => {
|
|
6146
|
+
if (!frame.current) return;
|
|
6147
|
+
return client.connectors.bindBrowserAuthorizationFrame(frame.current, name);
|
|
6148
|
+
}, [client, name]);
|
|
6149
|
+
useEffect2(() => {
|
|
6150
|
+
const receive = (event) => {
|
|
6151
|
+
if (event.origin === origin && event.source === frame.current?.contentWindow && event.data?.type === "blade:connector-auth-close") onClose();
|
|
6152
|
+
};
|
|
6153
|
+
window.addEventListener("message", receive);
|
|
6154
|
+
return () => window.removeEventListener("message", receive);
|
|
6155
|
+
}, [origin, onClose]);
|
|
6156
|
+
return /* @__PURE__ */ jsx3("dialog", { ref: dialog, "aria-label": `\u8FDE\u63A5 ${label}`, onCancel: (event) => {
|
|
6157
|
+
event.preventDefault();
|
|
6158
|
+
onClose();
|
|
6159
|
+
}, className: "fixed inset-0 m-auto h-[min(820px,90dvh)] max-h-none w-[min(960px,calc(100%_-_32px))] max-w-none overflow-hidden rounded-2xl border border-[hsl(var(--border))] bg-[hsl(var(--background))] p-0 text-[hsl(var(--foreground))] shadow-xl backdrop:bg-black/45", children: /* @__PURE__ */ jsxs2("div", { className: "flex h-full min-h-0 flex-col", children: [
|
|
6160
|
+
/* @__PURE__ */ jsxs2("header", { className: "flex shrink-0 items-center justify-between gap-3 border-b border-[hsl(var(--border))] px-4 py-3", children: [
|
|
6161
|
+
/* @__PURE__ */ jsxs2("h2", { className: "text-sm font-medium", children: [
|
|
6162
|
+
"\u8FDE\u63A5 ",
|
|
6163
|
+
label
|
|
6164
|
+
] }),
|
|
6165
|
+
/* @__PURE__ */ jsxs2("button", { type: "button", className: "inline-flex h-8 shrink-0 items-center justify-center gap-1.5 rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--background))] px-3 text-xs font-medium hover:bg-[hsl(var(--accent))]", onClick: onClose, children: [
|
|
6166
|
+
/* @__PURE__ */ jsx3(X, { size: 14, "aria-hidden": "true" }),
|
|
6167
|
+
"\u8FD4\u56DE\u8FDE\u63A5\u5668"
|
|
6168
|
+
] })
|
|
6169
|
+
] }),
|
|
6170
|
+
/* @__PURE__ */ jsx3("iframe", { ref: frame, title: `${label}\u767B\u5F55\u9875\u9762`, className: "min-h-0 w-full flex-1 border-0" })
|
|
6171
|
+
] }) });
|
|
6172
|
+
}
|
|
6173
|
+
|
|
6439
6174
|
// ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/deep-compare-strict.js
|
|
6440
6175
|
function deepCompareStrict(a, b) {
|
|
6441
6176
|
const typeofa = typeof a;
|
|
@@ -7646,7 +7381,7 @@ function canExpand(schema, uiSchema = {}, formData) {
|
|
|
7646
7381
|
}
|
|
7647
7382
|
|
|
7648
7383
|
// ../../node_modules/.pnpm/@rjsf+utils@6.10.0_react@19.2.4/node_modules/@rjsf/utils/lib/isPlainObject.js
|
|
7649
|
-
function
|
|
7384
|
+
function isPlainObject2(thing) {
|
|
7650
7385
|
if (typeof thing !== "object" || thing === null) {
|
|
7651
7386
|
return false;
|
|
7652
7387
|
}
|
|
@@ -11540,7 +11275,7 @@ var ErrorSchemaBuilder = class {
|
|
|
11540
11275
|
|
|
11541
11276
|
// ../../node_modules/.pnpm/@rjsf+utils@6.10.0_react@19.2.4/node_modules/@rjsf/utils/lib/getChangedFields.js
|
|
11542
11277
|
function getChangedDescendants(a, b) {
|
|
11543
|
-
if (
|
|
11278
|
+
if (isPlainObject2(a) && isPlainObject2(b)) {
|
|
11544
11279
|
return getChangedFields(a, b, true);
|
|
11545
11280
|
}
|
|
11546
11281
|
if (Array.isArray(a) && Array.isArray(b) && a.length === b.length) {
|
|
@@ -11558,10 +11293,10 @@ function getChangedFields(a, b, deep = false) {
|
|
|
11558
11293
|
if (a === b) {
|
|
11559
11294
|
return [];
|
|
11560
11295
|
}
|
|
11561
|
-
if (!
|
|
11562
|
-
return
|
|
11296
|
+
if (!isPlainObject2(a)) {
|
|
11297
|
+
return isPlainObject2(b) ? Object.keys(b) : [];
|
|
11563
11298
|
}
|
|
11564
|
-
if (!
|
|
11299
|
+
if (!isPlainObject2(b)) {
|
|
11565
11300
|
return Object.keys(a);
|
|
11566
11301
|
}
|
|
11567
11302
|
const aKeys = Object.keys(a);
|
|
@@ -12152,7 +11887,7 @@ function errorsFrom(errorSchema, fieldPath) {
|
|
|
12152
11887
|
const errorList = Array.isArray(errors) ? errors.map((message) => ({ property, message, stack: `${property} ${message}` })) : [];
|
|
12153
11888
|
return Object.keys(errorSchema).reduce((currentList, key) => {
|
|
12154
11889
|
const childSchema = errorSchema[key];
|
|
12155
|
-
if (key !== ERRORS_KEY &&
|
|
11890
|
+
if (key !== ERRORS_KEY && isPlainObject2(childSchema)) {
|
|
12156
11891
|
return currentList.concat(errorsFrom(childSchema, [...fieldPath, key]));
|
|
12157
11892
|
}
|
|
12158
11893
|
return currentList;
|
|
@@ -12174,7 +11909,7 @@ function toFieldPathId(fieldPath, globalFormOptions, parentPath, isMultiValue) {
|
|
|
12174
11909
|
|
|
12175
11910
|
// ../../node_modules/.pnpm/@rjsf+utils@6.10.0_react@19.2.4/node_modules/@rjsf/utils/lib/useAltDateWidgetProps.js
|
|
12176
11911
|
import { jsx as _jsx3 } from "react/jsx-runtime";
|
|
12177
|
-
import { useCallback, useEffect as useEffect3, useMemo
|
|
11912
|
+
import { useCallback, useEffect as useEffect3, useMemo, useState as useState2 } from "react";
|
|
12178
11913
|
function readyForChange(state) {
|
|
12179
11914
|
return Object.values(state).every((value) => value !== -1);
|
|
12180
11915
|
}
|
|
@@ -12187,7 +11922,7 @@ function DateElement(props) {
|
|
|
12187
11922
|
}
|
|
12188
11923
|
function useAltDateWidgetProps(props) {
|
|
12189
11924
|
const { time: time2 = false, disabled = false, readonly = false, options, onChange, value } = props;
|
|
12190
|
-
const [state, setState] =
|
|
11925
|
+
const [state, setState] = useState2(parseDateString(value, time2));
|
|
12191
11926
|
useEffect3(() => {
|
|
12192
11927
|
setState(parseDateString(value, time2));
|
|
12193
11928
|
}, [time2, value]);
|
|
@@ -12217,7 +11952,7 @@ function useAltDateWidgetProps(props) {
|
|
|
12217
11952
|
const nextState = parseDateString((/* @__PURE__ */ new Date()).toJSON(), time2);
|
|
12218
11953
|
onChange(toDateString(nextState, time2));
|
|
12219
11954
|
}, [disabled, readonly, time2, onChange]);
|
|
12220
|
-
const elements =
|
|
11955
|
+
const elements = useMemo(() => getDateElementProps(state, time2, options.yearsRange, options.format), [state, time2, options.yearsRange, options.format]);
|
|
12221
11956
|
return { elements, handleChange, handleClear, handleSetNow };
|
|
12222
11957
|
}
|
|
12223
11958
|
|
|
@@ -12232,7 +11967,7 @@ function useDeepCompareMemo(newValue) {
|
|
|
12232
11967
|
}
|
|
12233
11968
|
|
|
12234
11969
|
// ../../node_modules/.pnpm/@rjsf+utils@6.10.0_react@19.2.4/node_modules/@rjsf/utils/lib/useFileWidgetProps.js
|
|
12235
|
-
import { useCallback as useCallback2, useMemo as
|
|
11970
|
+
import { useCallback as useCallback2, useMemo as useMemo2 } from "react";
|
|
12236
11971
|
function addNameToDataURL(dataURL, name) {
|
|
12237
11972
|
return dataURL.replace(";base64", `;name=${encodeURIComponent(name)};base64`);
|
|
12238
11973
|
}
|
|
@@ -12286,13 +12021,13 @@ function extractFileInfo(dataURLs) {
|
|
|
12286
12021
|
}, []);
|
|
12287
12022
|
}
|
|
12288
12023
|
function useFileWidgetProps(value, onChange, multiple = false) {
|
|
12289
|
-
const values =
|
|
12024
|
+
const values = useMemo2(() => {
|
|
12290
12025
|
if (multiple && value) {
|
|
12291
12026
|
return Array.isArray(value) ? value : [value];
|
|
12292
12027
|
}
|
|
12293
12028
|
return [];
|
|
12294
12029
|
}, [value, multiple]);
|
|
12295
|
-
const filesInfo =
|
|
12030
|
+
const filesInfo = useMemo2(() => Array.isArray(value) ? extractFileInfo(value) : extractFileInfo([value || ""]), [value]);
|
|
12296
12031
|
const handleChange = useCallback2(async (files) => {
|
|
12297
12032
|
const filesInfoEvent = await processFiles(files);
|
|
12298
12033
|
const newValue = filesInfoEvent.map((fileInfo) => fileInfo.dataURL || null);
|
|
@@ -12418,7 +12153,7 @@ var TranslatableString;
|
|
|
12418
12153
|
|
|
12419
12154
|
// ../../node_modules/.pnpm/@rjsf+core@6.10.0_@rjsf+utils@6.10.0_react@19.2.4__react@19.2.4_vue@3.5.40_typescript@5.9.3_/node_modules/@rjsf/core/lib/components/fields/ArrayField.js
|
|
12420
12155
|
import { jsx as _jsx4 } from "react/jsx-runtime";
|
|
12421
|
-
import { memo, useCallback as useCallback3, useMemo as
|
|
12156
|
+
import { memo, useCallback as useCallback3, useMemo as useMemo3, useRef as useRef4, useState as useState3 } from "react";
|
|
12422
12157
|
var rowIdCounter = 0;
|
|
12423
12158
|
function generateRowId() {
|
|
12424
12159
|
rowIdCounter += 1;
|
|
@@ -12512,8 +12247,8 @@ function ArrayAsFiles(props) {
|
|
|
12512
12247
|
function ArrayFieldItemInner(props) {
|
|
12513
12248
|
const { itemKey, index: index2, name, disabled, hideError, readonly, registry, uiOptions, parentUiSchema, canAdd, canRemove = true, canMoveUp, canMoveDown, rawItemSchema, itemData, itemUiSchema, parentFieldPathId, itemErrorSchema, autofocus, onBlur, onFocus, onChange, rawErrors, totalItems, title, handleAddItem, handleCopyItem, handleRemoveItem, handleReorderItems } = props;
|
|
12514
12249
|
const { schemaUtils, fields: { ArraySchemaField, SchemaField: SchemaField2 }, globalUiOptions, globalFormOptions } = registry;
|
|
12515
|
-
const itemSchema =
|
|
12516
|
-
const fieldPathId =
|
|
12250
|
+
const itemSchema = useMemo3(() => schemaUtils.retrieveSchema(rawItemSchema, itemData), [schemaUtils, rawItemSchema, itemData]);
|
|
12251
|
+
const fieldPathId = useMemo3(() => toFieldPathId(index2, globalFormOptions, parentFieldPathId), [index2, globalFormOptions, parentFieldPathId]);
|
|
12517
12252
|
const ItemSchemaField = ArraySchemaField || SchemaField2;
|
|
12518
12253
|
const ArrayFieldItemTemplate2 = getTemplate("ArrayFieldItemTemplate", registry, uiOptions);
|
|
12519
12254
|
const displayLabel = schemaUtils.getDisplayLabel(itemSchema, itemUiSchema, globalUiOptions);
|
|
@@ -12587,13 +12322,13 @@ function NormalArray(props) {
|
|
|
12587
12322
|
const fieldTitle = schema.title || title || name;
|
|
12588
12323
|
const { schemaUtils, fields: fields2, formContext, globalUiOptions } = registry;
|
|
12589
12324
|
const { OptionalDataControlsField: OptionalDataControlsField2 } = fields2;
|
|
12590
|
-
const uiOptions =
|
|
12591
|
-
const schemaItems =
|
|
12592
|
-
const itemsSchema =
|
|
12593
|
-
const formData =
|
|
12325
|
+
const uiOptions = useMemo3(() => getUiOptions(uiSchema, globalUiOptions), [uiSchema, globalUiOptions]);
|
|
12326
|
+
const schemaItems = useMemo3(() => isObject(schema.items) ? schema.items : {}, [schema.items]);
|
|
12327
|
+
const itemsSchema = useMemo3(() => schemaUtils.retrieveSchema(schemaItems), [schemaUtils, schemaItems]);
|
|
12328
|
+
const formData = useMemo3(() => keyedToPlainFormData(keyedFormData), [keyedFormData]);
|
|
12594
12329
|
const renderOptionalField = shouldRenderOptionalField(registry, schema, required, uiSchema);
|
|
12595
12330
|
const hasFormData = isFormDataAvailable(formDataFromProps);
|
|
12596
|
-
const canAdd =
|
|
12331
|
+
const canAdd = useMemo3(() => canAddItem(registry, schema, formData, uiSchema) && (!renderOptionalField || hasFormData), [registry, schema, formData, uiSchema, renderOptionalField, hasFormData]);
|
|
12597
12332
|
const actualFormData = hasFormData ? keyedFormData : [];
|
|
12598
12333
|
const extraClass = renderOptionalField ? " rjsf-optional-array-field" : "";
|
|
12599
12334
|
const childFieldPathId = props.childFieldPathId ?? fieldPathId;
|
|
@@ -12660,11 +12395,11 @@ function FixedArray(props) {
|
|
|
12660
12395
|
let { formData: items = [] } = props;
|
|
12661
12396
|
const fieldTitle = schema.title || title || name;
|
|
12662
12397
|
const { fields: fields2, formContext, globalUiOptions } = registry;
|
|
12663
|
-
const uiOptions =
|
|
12398
|
+
const uiOptions = useMemo3(() => getUiOptions(uiSchema, globalUiOptions), [uiSchema, globalUiOptions]);
|
|
12664
12399
|
const { OptionalDataControlsField: OptionalDataControlsField2 } = fields2;
|
|
12665
12400
|
const renderOptionalField = shouldRenderOptionalField(registry, schema, required, uiSchema);
|
|
12666
12401
|
const hasFormData = isFormDataAvailable(formData);
|
|
12667
|
-
const schemaItems =
|
|
12402
|
+
const schemaItems = useMemo3(() => Array.isArray(schema.items) ? schema.items : [], [schema.items]);
|
|
12668
12403
|
const hasAdditionalItems = isObject(schema.additionalItems);
|
|
12669
12404
|
const childFieldPathId = props.childFieldPathId ?? fieldPathId;
|
|
12670
12405
|
if (items.length < schemaItems.length) {
|
|
@@ -12743,8 +12478,8 @@ function FixedArray(props) {
|
|
|
12743
12478
|
return _jsx4(Template, { ...arrayProps });
|
|
12744
12479
|
}
|
|
12745
12480
|
function useKeyedFormData(formData = []) {
|
|
12746
|
-
const newHash =
|
|
12747
|
-
const [state, setState] =
|
|
12481
|
+
const newHash = useMemo3(() => hashObject(formData), [formData]);
|
|
12482
|
+
const [state, setState] = useState3(() => ({
|
|
12748
12483
|
formDataHash: newHash,
|
|
12749
12484
|
keyedFormData: generateKeyedFormData(formData)
|
|
12750
12485
|
}));
|
|
@@ -12991,9 +12726,9 @@ var BooleanField_default = BooleanField;
|
|
|
12991
12726
|
|
|
12992
12727
|
// ../../node_modules/.pnpm/@rjsf+core@6.10.0_@rjsf+utils@6.10.0_react@19.2.4__react@19.2.4_vue@3.5.40_typescript@5.9.3_/node_modules/@rjsf/core/lib/components/fields/CyclicSchemaField.js
|
|
12993
12728
|
import { jsx as _jsx6 } from "react/jsx-runtime";
|
|
12994
|
-
import { useState as
|
|
12729
|
+
import { useState as useState4 } from "react";
|
|
12995
12730
|
function CyclicSchemaField(props) {
|
|
12996
|
-
const [expanded, setExpanded] =
|
|
12731
|
+
const [expanded, setExpanded] = useState4(false);
|
|
12997
12732
|
const { name, registry, schema, uiSchema, fieldPathId } = props;
|
|
12998
12733
|
const { globalUiOptions } = registry;
|
|
12999
12734
|
const uiOptions = getUiOptions(uiSchema, globalUiOptions);
|
|
@@ -13008,7 +12743,7 @@ function CyclicSchemaField(props) {
|
|
|
13008
12743
|
|
|
13009
12744
|
// ../../node_modules/.pnpm/@rjsf+core@6.10.0_@rjsf+utils@6.10.0_react@19.2.4__react@19.2.4_vue@3.5.40_typescript@5.9.3_/node_modules/@rjsf/core/lib/components/fields/FallbackField.js
|
|
13010
12745
|
import { jsx as _jsx7 } from "react/jsx-runtime";
|
|
13011
|
-
import { useMemo as
|
|
12746
|
+
import { useMemo as useMemo4, useState as useState5 } from "react";
|
|
13012
12747
|
function getFallbackTypeSelectionSchema(title) {
|
|
13013
12748
|
return {
|
|
13014
12749
|
type: "string",
|
|
@@ -13044,11 +12779,11 @@ function castToNewType(formData, newType) {
|
|
|
13044
12779
|
function FallbackField(props) {
|
|
13045
12780
|
const { id, formData, displayLabel = true, schema, name, uiSchema, required, disabled = false, readonly = false, onBlur, onFocus, registry, fieldPathId, onChange, errorSchema } = props;
|
|
13046
12781
|
const { translateString, fields: fields2, globalFormOptions } = registry;
|
|
13047
|
-
const [type, setType] =
|
|
12782
|
+
const [type, setType] = useState5(getTypeOfFormData(formData));
|
|
13048
12783
|
const uiOptions = getUiOptions(uiSchema);
|
|
13049
12784
|
const typeSelectorInnerFieldPathId = useDeepCompareMemo(toFieldPathId("__internal_type_selector", globalFormOptions, fieldPathId));
|
|
13050
12785
|
const schemaTitle = translateString(TranslatableString.Type);
|
|
13051
|
-
const typesOptionSchema =
|
|
12786
|
+
const typesOptionSchema = useMemo4(() => getFallbackTypeSelectionSchema(schemaTitle), [schemaTitle]);
|
|
13052
12787
|
const onTypeChange = (newType) => {
|
|
13053
12788
|
if (newType != null) {
|
|
13054
12789
|
setType(newType);
|
|
@@ -13135,7 +12870,7 @@ function conditionMatches(operator, datum, value = "$0m3tH1nG Un3xP3cT3d") {
|
|
|
13135
12870
|
function findChildrenAndProps(layoutGridSchema, schemaKey, registry) {
|
|
13136
12871
|
let gridProps = {};
|
|
13137
12872
|
let children = layoutGridSchema[schemaKey];
|
|
13138
|
-
if (
|
|
12873
|
+
if (isPlainObject2(children)) {
|
|
13139
12874
|
const { children: elements, className: toMapClassNames, ...otherProps } = children;
|
|
13140
12875
|
children = elements;
|
|
13141
12876
|
if (toMapClassNames) {
|
|
@@ -13387,7 +13122,7 @@ function LayoutHeaderField(props) {
|
|
|
13387
13122
|
|
|
13388
13123
|
// ../../node_modules/.pnpm/@rjsf+core@6.10.0_@rjsf+utils@6.10.0_react@19.2.4__react@19.2.4_vue@3.5.40_typescript@5.9.3_/node_modules/@rjsf/core/lib/components/fields/LayoutMultiSchemaField.js
|
|
13389
13124
|
import { jsx as _jsx10 } from "react/jsx-runtime";
|
|
13390
|
-
import { useState as
|
|
13125
|
+
import { useState as useState6, useEffect as useEffect4 } from "react";
|
|
13391
13126
|
function getSelectedOption(options, selectorField, value) {
|
|
13392
13127
|
const defaultValue = "!@#!@$@#$!@$#";
|
|
13393
13128
|
const schemaOptions = options.map(({ schema }) => schema);
|
|
@@ -13414,7 +13149,7 @@ function computeEnumOptions(schema, options, schemaUtils, uiSchema, formData) {
|
|
|
13414
13149
|
function LayoutMultiSchemaField(props) {
|
|
13415
13150
|
const { name, baseType, disabled = false, formData, fieldPathId, onBlur, onChange, options, onFocus, registry, uiSchema, schema, autofocus, readonly, required, errorSchema, hideError = false } = props;
|
|
13416
13151
|
const { widgets: widgets2, schemaUtils, globalUiOptions } = registry;
|
|
13417
|
-
const [enumOptions, setEnumOptions] =
|
|
13152
|
+
const [enumOptions, setEnumOptions] = useState6(computeEnumOptions(schema, options, schemaUtils, uiSchema, formData));
|
|
13418
13153
|
const id = fieldPathId[ID_KEY];
|
|
13419
13154
|
const discriminator = getDiscriminatorFieldFromSchema(schema);
|
|
13420
13155
|
const FieldErrorTemplate2 = getTemplate("FieldErrorTemplate", registry, options);
|
|
@@ -13462,17 +13197,17 @@ function LayoutMultiSchemaField(props) {
|
|
|
13462
13197
|
|
|
13463
13198
|
// ../../node_modules/.pnpm/@rjsf+core@6.10.0_@rjsf+utils@6.10.0_react@19.2.4__react@19.2.4_vue@3.5.40_typescript@5.9.3_/node_modules/@rjsf/core/lib/components/fields/MultiSchemaField.js
|
|
13464
13199
|
import { jsx as _jsx11 } from "react/jsx-runtime";
|
|
13465
|
-
import { useCallback as useCallback5, useEffect as useEffect5, useMemo as
|
|
13200
|
+
import { useCallback as useCallback5, useEffect as useEffect5, useMemo as useMemo5, useRef as useRef5, useState as useState7 } from "react";
|
|
13466
13201
|
function AnyOfField(props) {
|
|
13467
13202
|
const { name, disabled = false, errorSchema, formData, fieldPathId, onBlur, onChange, onFocus, options, readonly, registry, required = false, schema, uiSchema } = props;
|
|
13468
13203
|
const { schemaUtils } = registry;
|
|
13469
13204
|
const formDataHash = hashObject(formData ?? null);
|
|
13470
|
-
const retrievedOptions =
|
|
13205
|
+
const retrievedOptions = useMemo5(
|
|
13471
13206
|
() => options.map((opt) => schemaUtils.retrieveSchema(opt, formData)),
|
|
13472
13207
|
// oxlint-disable-next-line react-hooks/exhaustive-deps -- formDataHash is the value-stable proxy for formData
|
|
13473
13208
|
[options, schemaUtils, formDataHash]
|
|
13474
13209
|
);
|
|
13475
|
-
const [selectedOption, setSelectedOption] =
|
|
13210
|
+
const [selectedOption, setSelectedOption] = useState7(() => {
|
|
13476
13211
|
const discriminator = getDiscriminatorFieldFromSchema(schema);
|
|
13477
13212
|
return schemaUtils.getClosestMatchingOption(formData, retrievedOptions, 0, discriminator);
|
|
13478
13213
|
});
|
|
@@ -13591,12 +13326,12 @@ var NullField_default = NullField;
|
|
|
13591
13326
|
|
|
13592
13327
|
// ../../node_modules/.pnpm/@rjsf+core@6.10.0_@rjsf+utils@6.10.0_react@19.2.4__react@19.2.4_vue@3.5.40_typescript@5.9.3_/node_modules/@rjsf/core/lib/components/fields/NumberField.js
|
|
13593
13328
|
import { jsx as _jsx12 } from "react/jsx-runtime";
|
|
13594
|
-
import { useState as
|
|
13329
|
+
import { useState as useState8, useCallback as useCallback6 } from "react";
|
|
13595
13330
|
var trailingCharMatcherWithPrefix = /\.([0-9]*0)*$/;
|
|
13596
13331
|
var trailingCharMatcher = /[0.]0*$/;
|
|
13597
13332
|
function NumberField(props) {
|
|
13598
13333
|
const { registry, onChange, formData, value: initialValue } = props;
|
|
13599
|
-
const [lastValue, setLastValue] =
|
|
13334
|
+
const [lastValue, setLastValue] = useState8(initialValue);
|
|
13600
13335
|
const { StringField: StringField2 } = registry.fields;
|
|
13601
13336
|
const separator = getDecimalSeparator();
|
|
13602
13337
|
const escapedSeparator = separator === "." ? "\\." : separator;
|
|
@@ -13631,7 +13366,7 @@ var NumberField_default = NumberField;
|
|
|
13631
13366
|
|
|
13632
13367
|
// ../../node_modules/.pnpm/@rjsf+core@6.10.0_@rjsf+utils@6.10.0_react@19.2.4__react@19.2.4_vue@3.5.40_typescript@5.9.3_/node_modules/@rjsf/core/lib/components/fields/ObjectField.js
|
|
13633
13368
|
import { jsx as _jsx13, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13634
|
-
import { memo as memo2, useCallback as useCallback7, useMemo as
|
|
13369
|
+
import { memo as memo2, useCallback as useCallback7, useMemo as useMemo7, useRef as useRef7, useState as useState9 } from "react";
|
|
13635
13370
|
|
|
13636
13371
|
// ../../node_modules/.pnpm/markdown-to-jsx@9.10.2_react@19.2.4_vue@3.5.40_typescript@5.9.3_/node_modules/markdown-to-jsx/dist/react.js
|
|
13637
13372
|
import * as i0 from "react";
|
|
@@ -16766,7 +16501,7 @@ function getAdditionalPropertyOrder(schemaProperties) {
|
|
|
16766
16501
|
}
|
|
16767
16502
|
function ObjectFieldPropertyFn(props) {
|
|
16768
16503
|
const { fieldPathId, schema, registry, uiSchema, errorSchema, formData, onChange, onBlur, onFocus, disabled, readonly, required, hideError, propertyName, handleKeyRename, handleRemoveProperty, addedByAdditionalProperties } = props;
|
|
16769
|
-
const [wasPropertyKeyModified, setWasPropertyKeyModified] =
|
|
16504
|
+
const [wasPropertyKeyModified, setWasPropertyKeyModified] = useState9(false);
|
|
16770
16505
|
const { globalFormOptions, fields: fields2 } = registry;
|
|
16771
16506
|
const { SchemaField: SchemaField2 } = fields2;
|
|
16772
16507
|
const innerFieldIdPathId = useDeepCompareMemo(toFieldPathId(propertyName, globalFormOptions, fieldPathId.path));
|
|
@@ -16799,13 +16534,13 @@ function ObjectField(props) {
|
|
|
16799
16534
|
const { OptionalDataControlsField: OptionalDataControlsField2 } = fields2;
|
|
16800
16535
|
const formDataRef = useRef7(formData);
|
|
16801
16536
|
formDataRef.current = formData;
|
|
16802
|
-
const schema =
|
|
16803
|
-
const uiOptions =
|
|
16804
|
-
const schemaProperties =
|
|
16537
|
+
const schema = useMemo7(() => schemaUtils.retrieveSchema(rawSchema, formData, true), [schemaUtils, rawSchema, formData]);
|
|
16538
|
+
const uiOptions = useMemo7(() => getUiOptions(uiSchema, globalUiOptions), [uiSchema, globalUiOptions]);
|
|
16539
|
+
const schemaProperties = useMemo7(() => schema.properties ?? {}, [schema.properties]);
|
|
16805
16540
|
const childFieldPathId = props.childFieldPathId ?? fieldPathId;
|
|
16806
16541
|
const lastRenamedProperty = useRef7({ previousKey: "", currentKey: void 0 });
|
|
16807
|
-
const [additionalPropertyOrder, setAdditionalPropertyOrder] =
|
|
16808
|
-
const definedPropertyOrder =
|
|
16542
|
+
const [additionalPropertyOrder, setAdditionalPropertyOrder] = useState9(() => getAdditionalPropertyOrder(schemaProperties));
|
|
16543
|
+
const definedPropertyOrder = useMemo7(() => {
|
|
16809
16544
|
const additionalPropertySet = new Set(getAdditionalPropertyOrder(schemaProperties));
|
|
16810
16545
|
return Object.keys(schemaProperties).filter((property) => !additionalPropertySet.has(property));
|
|
16811
16546
|
}, [schemaProperties]);
|
|
@@ -18759,7 +18494,7 @@ var Form = class _Form extends Component {
|
|
|
18759
18494
|
};
|
|
18760
18495
|
|
|
18761
18496
|
// src/components/SessionPluginConfigForm.tsx
|
|
18762
|
-
import { isValidElement, useMemo as
|
|
18497
|
+
import { isValidElement, useMemo as useMemo8, useState as useState10 } from "react";
|
|
18763
18498
|
|
|
18764
18499
|
// src/components/plugin-config-schema.ts
|
|
18765
18500
|
function asSchema(value) {
|
|
@@ -18954,7 +18689,7 @@ function configDraftOperations(initial, values, retained, removed) {
|
|
|
18954
18689
|
}
|
|
18955
18690
|
|
|
18956
18691
|
// src/components/SessionPluginConfigForm.tsx
|
|
18957
|
-
import { Fragment as Fragment2, jsx as
|
|
18692
|
+
import { Fragment as Fragment2, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
18958
18693
|
var defaults = getDefaultRegistry();
|
|
18959
18694
|
var validator = {
|
|
18960
18695
|
isValid(schema, data, rootSchema) {
|
|
@@ -19010,8 +18745,8 @@ function presentationSchema(schema) {
|
|
|
19010
18745
|
return result;
|
|
19011
18746
|
}
|
|
19012
18747
|
function ConfigMultiSchemaField(props) {
|
|
19013
|
-
return /* @__PURE__ */
|
|
19014
|
-
/* @__PURE__ */
|
|
18748
|
+
return /* @__PURE__ */ jsxs3("div", { className: "rjsf-field", children: [
|
|
18749
|
+
/* @__PURE__ */ jsx4("label", { htmlFor: isValidElement(props.selector) ? props.selector.props.id : void 0, children: "\u914D\u7F6E\u65B9\u5F0F" }),
|
|
19015
18750
|
props.selector,
|
|
19016
18751
|
props.optionSchemaField
|
|
19017
18752
|
] });
|
|
@@ -19039,12 +18774,12 @@ function ConfigSchemaField(inputProps) {
|
|
|
19039
18774
|
const pointer = pointerOf(originalConfigPath(fieldPathId.path, context.removed));
|
|
19040
18775
|
const originalMarker = [...context.retained].find(([, path2]) => path2 === pointer)?.[0];
|
|
19041
18776
|
if (schema.const !== void 0 && schema.writeOnly !== true)
|
|
19042
|
-
return /* @__PURE__ */
|
|
18777
|
+
return /* @__PURE__ */ jsx4(Fragment2, { children: context.errors.filter((error) => error.path === pointer).map((error) => /* @__PURE__ */ jsx4("p", { role: "alert", children: error.message }, error.message)) });
|
|
19043
18778
|
if (schema.writeOnly === true) {
|
|
19044
18779
|
const kept = typeof formData === "string" && context.retained.has(formData);
|
|
19045
|
-
return /* @__PURE__ */
|
|
19046
|
-
Array.isArray(schema.type) && schema.type.includes("null") ? /* @__PURE__ */
|
|
19047
|
-
/* @__PURE__ */
|
|
18780
|
+
return /* @__PURE__ */ jsxs3("div", { className: "rjsf-field", children: [
|
|
18781
|
+
Array.isArray(schema.type) && schema.type.includes("null") ? /* @__PURE__ */ jsxs3("label", { children: [
|
|
18782
|
+
/* @__PURE__ */ jsx4(
|
|
19048
18783
|
"input",
|
|
19049
18784
|
{
|
|
19050
18785
|
type: "checkbox",
|
|
@@ -19056,8 +18791,8 @@ function ConfigSchemaField(inputProps) {
|
|
|
19056
18791
|
schema.title ?? props.name,
|
|
19057
18792
|
"\uFF1A\u7F6E\u4E3A\u7A7A\u503C"
|
|
19058
18793
|
] }) : null,
|
|
19059
|
-
/* @__PURE__ */
|
|
19060
|
-
/* @__PURE__ */
|
|
18794
|
+
/* @__PURE__ */ jsx4("label", { htmlFor: fieldPathId.$id, "data-required": props.required, children: schema.title ?? props.name }),
|
|
18795
|
+
/* @__PURE__ */ jsx4(
|
|
19061
18796
|
"input",
|
|
19062
18797
|
{
|
|
19063
18798
|
id: fieldPathId.$id,
|
|
@@ -19070,8 +18805,8 @@ function ConfigSchemaField(inputProps) {
|
|
|
19070
18805
|
onChange: (event) => onChange(event.target.value || originalMarker, fieldPathId.path)
|
|
19071
18806
|
}
|
|
19072
18807
|
),
|
|
19073
|
-
kept ? /* @__PURE__ */
|
|
19074
|
-
formData !== void 0 ? /* @__PURE__ */
|
|
18808
|
+
kept ? /* @__PURE__ */ jsx4("p", { children: "\u5DF2\u4FDD\u5B58\uFF0C\u7559\u7A7A\u4FDD\u6301\u4E0D\u53D8" }) : null,
|
|
18809
|
+
formData !== void 0 ? /* @__PURE__ */ jsx4(
|
|
19075
18810
|
"button",
|
|
19076
18811
|
{
|
|
19077
18812
|
type: "button",
|
|
@@ -19080,17 +18815,17 @@ function ConfigSchemaField(inputProps) {
|
|
|
19080
18815
|
children: "\u6E05\u9664\u5DF2\u4FDD\u5B58\u7684\u503C"
|
|
19081
18816
|
}
|
|
19082
18817
|
) : null,
|
|
19083
|
-
schema.description ? /* @__PURE__ */
|
|
19084
|
-
context.errors.filter((error) => error.path === pointer).map((error) => /* @__PURE__ */
|
|
18818
|
+
schema.description ? /* @__PURE__ */ jsx4("p", { children: schema.description }) : null,
|
|
18819
|
+
context.errors.filter((error) => error.path === pointer).map((error) => /* @__PURE__ */ jsx4("p", { role: "alert", children: error.message }, error.message))
|
|
19085
18820
|
] });
|
|
19086
18821
|
}
|
|
19087
18822
|
const types = Array.isArray(schema.type) ? schema.type : [schema.type];
|
|
19088
18823
|
if (types.includes("null")) {
|
|
19089
18824
|
const nonNull = types.filter((type) => type !== "null");
|
|
19090
18825
|
const inner = { ...schema, type: nonNull[0] };
|
|
19091
|
-
return /* @__PURE__ */
|
|
19092
|
-
/* @__PURE__ */
|
|
19093
|
-
/* @__PURE__ */
|
|
18826
|
+
return /* @__PURE__ */ jsxs3("div", { className: "rjsf-field", children: [
|
|
18827
|
+
/* @__PURE__ */ jsxs3("label", { children: [
|
|
18828
|
+
/* @__PURE__ */ jsx4(
|
|
19094
18829
|
"input",
|
|
19095
18830
|
{
|
|
19096
18831
|
type: "checkbox",
|
|
@@ -19105,28 +18840,28 @@ function ConfigSchemaField(inputProps) {
|
|
|
19105
18840
|
schema.title ?? props.name,
|
|
19106
18841
|
"\uFF1A\u7F6E\u4E3A\u7A7A\u503C"
|
|
19107
18842
|
] }),
|
|
19108
|
-
nonNull.length && formData !== null ? /* @__PURE__ */
|
|
18843
|
+
nonNull.length && formData !== null ? /* @__PURE__ */ jsx4(defaults.fields.SchemaField, { ...props, schema: inner }) : null
|
|
19109
18844
|
] });
|
|
19110
18845
|
}
|
|
19111
|
-
return /* @__PURE__ */
|
|
18846
|
+
return /* @__PURE__ */ jsx4(defaults.fields.SchemaField, { ...props });
|
|
19112
18847
|
}
|
|
19113
18848
|
function ConfigFieldTemplate(props) {
|
|
19114
18849
|
const pointer = pointerOf(
|
|
19115
18850
|
originalConfigPath(props.fieldPathId.path, props.registry.formContext.removed)
|
|
19116
18851
|
);
|
|
19117
|
-
return /* @__PURE__ */
|
|
19118
|
-
props.displayLabel ? /* @__PURE__ */
|
|
18852
|
+
return /* @__PURE__ */ jsxs3("div", { className: props.classNames, hidden: props.hidden, children: [
|
|
18853
|
+
props.displayLabel ? /* @__PURE__ */ jsx4("label", { htmlFor: props.id, "data-required": props.required, children: props.label }) : null,
|
|
19119
18854
|
props.displayLabel ? props.description : null,
|
|
19120
18855
|
props.children,
|
|
19121
18856
|
props.help,
|
|
19122
|
-
props.registry.formContext.errors.filter((error) => error.path === pointer).map((error) => /* @__PURE__ */
|
|
18857
|
+
props.registry.formContext.errors.filter((error) => error.path === pointer).map((error) => /* @__PURE__ */ jsx4("p", { role: "alert", children: error.message }, error.message))
|
|
19123
18858
|
] });
|
|
19124
18859
|
}
|
|
19125
18860
|
function ConfigArrayItem(props) {
|
|
19126
18861
|
const { buttonsProps: buttons, registry } = props;
|
|
19127
|
-
return /* @__PURE__ */
|
|
18862
|
+
return /* @__PURE__ */ jsxs3("div", { className: "rjsf-array-item", children: [
|
|
19128
18863
|
props.children,
|
|
19129
|
-
buttons.hasRemove ? /* @__PURE__ */
|
|
18864
|
+
buttons.hasRemove ? /* @__PURE__ */ jsx4(
|
|
19130
18865
|
"button",
|
|
19131
18866
|
{
|
|
19132
18867
|
type: "button",
|
|
@@ -19141,7 +18876,7 @@ function ConfigArrayItem(props) {
|
|
|
19141
18876
|
if (previous !== void 0) registry.formContext.removed.add(pointerOf(path));
|
|
19142
18877
|
buttons.onRemoveItem(event);
|
|
19143
18878
|
},
|
|
19144
|
-
children: /* @__PURE__ */
|
|
18879
|
+
children: /* @__PURE__ */ jsx4(Trash2, { size: 14 })
|
|
19145
18880
|
}
|
|
19146
18881
|
) : null
|
|
19147
18882
|
] });
|
|
@@ -19152,14 +18887,16 @@ function SessionPluginConfigForm({
|
|
|
19152
18887
|
errors,
|
|
19153
18888
|
failure,
|
|
19154
18889
|
onSubmit,
|
|
19155
|
-
onCancel
|
|
18890
|
+
onCancel,
|
|
18891
|
+
submitLabel = "\u4FDD\u5B58",
|
|
18892
|
+
submittingLabel = "\u4FDD\u5B58\u4E2D\u2026"
|
|
19156
18893
|
}) {
|
|
19157
|
-
const [initial] =
|
|
19158
|
-
const [values, setValues] =
|
|
19159
|
-
const [removed] =
|
|
19160
|
-
const [draftFailure, setDraftFailure] =
|
|
19161
|
-
const support =
|
|
19162
|
-
const schema =
|
|
18894
|
+
const [initial] = useState10(() => createConfigDraft(config));
|
|
18895
|
+
const [values, setValues] = useState10(initial.values);
|
|
18896
|
+
const [removed] = useState10(() => /* @__PURE__ */ new Set());
|
|
18897
|
+
const [draftFailure, setDraftFailure] = useState10(null);
|
|
18898
|
+
const support = useMemo8(() => formSupport(config.schema), [config.schema]);
|
|
18899
|
+
const schema = useMemo8(() => {
|
|
19163
18900
|
try {
|
|
19164
18901
|
return config.schema ? presentationSchema(config.schema) : null;
|
|
19165
18902
|
} catch {
|
|
@@ -19175,12 +18912,12 @@ function SessionPluginConfigForm({
|
|
|
19175
18912
|
changeRoot: setValues
|
|
19176
18913
|
};
|
|
19177
18914
|
if (!schema || support)
|
|
19178
|
-
return /* @__PURE__ */
|
|
19179
|
-
/* @__PURE__ */
|
|
19180
|
-
/* @__PURE__ */
|
|
18915
|
+
return /* @__PURE__ */ jsxs3("div", { className: "space-y-3 text-xs", children: [
|
|
18916
|
+
/* @__PURE__ */ jsx4("p", { children: support ?? "\u914D\u7F6E\u58F0\u660E\u7684\u7EC4\u5408\u65E0\u6CD5\u5448\u73B0\uFF0C\u8BF7\u8054\u7CFB\u63D2\u4EF6\u63D0\u4F9B\u65B9" }),
|
|
18917
|
+
/* @__PURE__ */ jsx4("button", { type: "button", onClick: onCancel, children: "\u5173\u95ED" })
|
|
19181
18918
|
] });
|
|
19182
|
-
return /* @__PURE__ */
|
|
19183
|
-
/* @__PURE__ */
|
|
18919
|
+
return /* @__PURE__ */ jsxs3("div", { className: "blade-plugin-config text-xs", children: [
|
|
18920
|
+
/* @__PURE__ */ jsx4("style", { children: `
|
|
19184
18921
|
.blade-plugin-config .rjsf-field, .blade-plugin-config fieldset { min-width:0; margin:0 0 10px; padding:0; border:0 }
|
|
19185
18922
|
.blade-plugin-config label, .blade-plugin-config legend { display:block; font-size:12px; font-weight:500; overflow-wrap:anywhere; margin-bottom:4px }
|
|
19186
18923
|
.blade-plugin-config label[data-required=true]::after { content:' *'; color:hsl(var(--destructive)) }
|
|
@@ -19193,8 +18930,8 @@ function SessionPluginConfigForm({
|
|
|
19193
18930
|
.blade-plugin-config button:disabled { opacity:.5 }
|
|
19194
18931
|
.blade-plugin-config .control-label { display:block }
|
|
19195
18932
|
` }),
|
|
19196
|
-
failure || draftFailure ? /* @__PURE__ */
|
|
19197
|
-
/* @__PURE__ */
|
|
18933
|
+
failure || draftFailure ? /* @__PURE__ */ jsx4("p", { role: "alert", children: failure ?? draftFailure }) : null,
|
|
18934
|
+
/* @__PURE__ */ jsx4(
|
|
19198
18935
|
Form,
|
|
19199
18936
|
{
|
|
19200
18937
|
schema,
|
|
@@ -19208,7 +18945,7 @@ function SessionPluginConfigForm({
|
|
|
19208
18945
|
MultiSchemaFieldTemplate: ConfigMultiSchemaField,
|
|
19209
18946
|
ButtonTemplates: {
|
|
19210
18947
|
...defaults.templates.ButtonTemplates,
|
|
19211
|
-
AddButton: (props) => /* @__PURE__ */
|
|
18948
|
+
AddButton: (props) => /* @__PURE__ */ jsx4(
|
|
19212
18949
|
"button",
|
|
19213
18950
|
{
|
|
19214
18951
|
type: "button",
|
|
@@ -19216,7 +18953,7 @@ function SessionPluginConfigForm({
|
|
|
19216
18953
|
"aria-label": "\u6DFB\u52A0\u4E00\u9879",
|
|
19217
18954
|
disabled: props.disabled,
|
|
19218
18955
|
onClick: props.onClick,
|
|
19219
|
-
children: /* @__PURE__ */
|
|
18956
|
+
children: /* @__PURE__ */ jsx4(Plus, { size: 14 })
|
|
19220
18957
|
}
|
|
19221
18958
|
)
|
|
19222
18959
|
}
|
|
@@ -19257,9 +18994,9 @@ function SessionPluginConfigForm({
|
|
|
19257
18994
|
setDraftFailure(error.message);
|
|
19258
18995
|
}
|
|
19259
18996
|
},
|
|
19260
|
-
children: /* @__PURE__ */
|
|
19261
|
-
/* @__PURE__ */
|
|
19262
|
-
/* @__PURE__ */
|
|
18997
|
+
children: /* @__PURE__ */ jsxs3("div", { className: "flex justify-end gap-2", children: [
|
|
18998
|
+
/* @__PURE__ */ jsx4("button", { type: "button", onClick: onCancel, children: "\u53D6\u6D88" }),
|
|
18999
|
+
/* @__PURE__ */ jsx4("button", { type: "submit", disabled: submitting, children: submitting ? submittingLabel : submitLabel })
|
|
19263
19000
|
] })
|
|
19264
19001
|
}
|
|
19265
19002
|
)
|
|
@@ -19267,8 +19004,8 @@ function SessionPluginConfigForm({
|
|
|
19267
19004
|
}
|
|
19268
19005
|
|
|
19269
19006
|
// src/components/SessionPluginIcon.tsx
|
|
19270
|
-
import { useEffect as useEffect7, useState as
|
|
19271
|
-
import { jsx as
|
|
19007
|
+
import { useEffect as useEffect7, useState as useState11 } from "react";
|
|
19008
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
19272
19009
|
function sessionPluginLabel(plugin) {
|
|
19273
19010
|
const display = typeof plugin.display_name === "string" ? plugin.display_name.trim() : "";
|
|
19274
19011
|
return display || plugin.name;
|
|
@@ -19293,7 +19030,7 @@ function iconBlob(client, sessionId, name, token) {
|
|
|
19293
19030
|
return pending;
|
|
19294
19031
|
}
|
|
19295
19032
|
function SessionPluginIcon({ client, sessionId, plugin, size: size4 = 20, shape = "rounded", className }) {
|
|
19296
|
-
const [url, setUrl] =
|
|
19033
|
+
const [url, setUrl] = useState11(null);
|
|
19297
19034
|
const token = plugin.icon;
|
|
19298
19035
|
useEffect7(() => {
|
|
19299
19036
|
setUrl(null);
|
|
@@ -19313,14 +19050,14 @@ function SessionPluginIcon({ client, sessionId, plugin, size: size4 = 20, shape
|
|
|
19313
19050
|
const frame = `flex shrink-0 items-center justify-center overflow-hidden ${shape === "circle" ? "rounded-full" : "rounded"} ${className ?? ""}`;
|
|
19314
19051
|
const frameStyle = { width: size4, height: size4 };
|
|
19315
19052
|
if (!url) {
|
|
19316
|
-
return /* @__PURE__ */
|
|
19053
|
+
return /* @__PURE__ */ jsx5("span", { className: `${frame} bg-[hsl(var(--muted))] text-[hsl(var(--muted-foreground))]`, style: frameStyle, "data-plugin-icon": "placeholder", children: /* @__PURE__ */ jsx5(Puzzle, { "aria-hidden": true, size: Math.round(size4 * 0.7) }) });
|
|
19317
19054
|
}
|
|
19318
|
-
return /* @__PURE__ */
|
|
19055
|
+
return /* @__PURE__ */ jsx5("span", { className: frame, style: frameStyle, "data-plugin-icon": "image", children: /* @__PURE__ */ jsx5("img", { src: url, alt: "", "aria-hidden": true, className: "h-full w-full object-cover", onError: () => setUrl(null) }) });
|
|
19319
19056
|
}
|
|
19320
19057
|
|
|
19321
19058
|
// src/components/SessionPluginConfigDialog.tsx
|
|
19322
|
-
import { useEffect as useEffect8, useRef as useRef8, useState as
|
|
19323
|
-
import { Fragment as Fragment3, jsx as
|
|
19059
|
+
import { useEffect as useEffect8, useRef as useRef8, useState as useState12 } from "react";
|
|
19060
|
+
import { Fragment as Fragment3, jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
19324
19061
|
async function readFailure(error) {
|
|
19325
19062
|
const response = error?.response;
|
|
19326
19063
|
if (!response || typeof response.json !== "function") {
|
|
@@ -19347,7 +19084,7 @@ function SessionPluginConfigDialog({
|
|
|
19347
19084
|
plugin,
|
|
19348
19085
|
...props
|
|
19349
19086
|
}) {
|
|
19350
|
-
return /* @__PURE__ */
|
|
19087
|
+
return /* @__PURE__ */ jsx6(
|
|
19351
19088
|
ConfigDialogState,
|
|
19352
19089
|
{
|
|
19353
19090
|
client,
|
|
@@ -19365,15 +19102,38 @@ function ConfigDialogState({
|
|
|
19365
19102
|
onSaved,
|
|
19366
19103
|
onClose
|
|
19367
19104
|
}) {
|
|
19368
|
-
const [
|
|
19369
|
-
const [
|
|
19370
|
-
const [
|
|
19371
|
-
const
|
|
19372
|
-
|
|
19373
|
-
|
|
19374
|
-
|
|
19105
|
+
const [host, setHost] = useState12(null);
|
|
19106
|
+
const [restarting, setRestarting] = useState12(false);
|
|
19107
|
+
const [scope, setScope] = useState12("personal");
|
|
19108
|
+
const waitingForHost = host?.state === "starting" || host?.state === "updating";
|
|
19109
|
+
useEffect8(() => {
|
|
19110
|
+
if (!waitingForHost) return;
|
|
19111
|
+
const abort = new AbortController();
|
|
19112
|
+
let timer;
|
|
19113
|
+
const refresh = async () => {
|
|
19114
|
+
try {
|
|
19115
|
+
const next = await client.sessions.getSessionPluginConfig(sessionId, plugin.name, { signal: abort.signal }, scope);
|
|
19116
|
+
if (!abort.signal.aborted) setHost(next.host ?? null);
|
|
19117
|
+
} catch {
|
|
19118
|
+
}
|
|
19119
|
+
if (!abort.signal.aborted) timer = setTimeout(refresh, 2e3);
|
|
19120
|
+
};
|
|
19121
|
+
timer = setTimeout(refresh, 2e3);
|
|
19122
|
+
return () => {
|
|
19123
|
+
abort.abort();
|
|
19124
|
+
clearTimeout(timer);
|
|
19125
|
+
};
|
|
19126
|
+
}, [client, sessionId, plugin.name, scope, waitingForHost]);
|
|
19127
|
+
const [canConfigureGlobal, setCanConfigureGlobal] = useState12(false);
|
|
19128
|
+
const [config, setConfig] = useState12(null);
|
|
19129
|
+
const [loading, setLoading] = useState12(true);
|
|
19130
|
+
const [loadFailure, setLoadFailure] = useState12(null);
|
|
19131
|
+
const [saving, setSaving] = useState12(false);
|
|
19132
|
+
const [failure, setFailure] = useState12(null);
|
|
19133
|
+
const [fieldErrors, setFieldErrors] = useState12([]);
|
|
19134
|
+
const [formVersion, setFormVersion] = useState12(0);
|
|
19375
19135
|
const alive = useRef8(true);
|
|
19376
|
-
const
|
|
19136
|
+
const generation2 = useRef8(0);
|
|
19377
19137
|
const dialog = useRef8(null);
|
|
19378
19138
|
useEffect8(() => {
|
|
19379
19139
|
const element = dialog.current;
|
|
@@ -19382,21 +19142,23 @@ function ConfigDialogState({
|
|
|
19382
19142
|
else element.setAttribute("open", "");
|
|
19383
19143
|
}, []);
|
|
19384
19144
|
const load = async () => {
|
|
19385
|
-
const current = ++
|
|
19145
|
+
const current = ++generation2.current;
|
|
19386
19146
|
setLoading(true);
|
|
19387
19147
|
setLoadFailure(null);
|
|
19388
19148
|
try {
|
|
19389
|
-
const { config: state } = await client.sessions.getSessionPluginConfig(sessionId, plugin.name);
|
|
19390
|
-
if (!alive.current ||
|
|
19149
|
+
const { config: state, can_configure_global, host: hostState } = await client.sessions.getSessionPluginConfig(sessionId, plugin.name, void 0, scope);
|
|
19150
|
+
if (!alive.current || generation2.current !== current) return;
|
|
19151
|
+
setCanConfigureGlobal(can_configure_global ?? false);
|
|
19152
|
+
setHost(hostState ?? null);
|
|
19391
19153
|
setConfig(state);
|
|
19392
19154
|
setFormVersion((value) => value + 1);
|
|
19393
19155
|
} catch (error) {
|
|
19394
|
-
if (!alive.current ||
|
|
19156
|
+
if (!alive.current || generation2.current !== current) return;
|
|
19395
19157
|
const detail = await readFailure(error);
|
|
19396
|
-
if (!alive.current ||
|
|
19158
|
+
if (!alive.current || generation2.current !== current) return;
|
|
19397
19159
|
setLoadFailure(detail.message ?? "\u914D\u7F6E\u6682\u4E0D\u53EF\u7528");
|
|
19398
19160
|
} finally {
|
|
19399
|
-
if (alive.current &&
|
|
19161
|
+
if (alive.current && generation2.current === current) setLoading(false);
|
|
19400
19162
|
}
|
|
19401
19163
|
};
|
|
19402
19164
|
useEffect8(() => {
|
|
@@ -19407,12 +19169,12 @@ function ConfigDialogState({
|
|
|
19407
19169
|
void load();
|
|
19408
19170
|
return () => {
|
|
19409
19171
|
alive.current = false;
|
|
19410
|
-
|
|
19172
|
+
generation2.current++;
|
|
19411
19173
|
};
|
|
19412
|
-
}, [client, sessionId, plugin.name]);
|
|
19174
|
+
}, [client, sessionId, plugin.name, scope]);
|
|
19413
19175
|
const save = async (draft) => {
|
|
19414
19176
|
if (!config) return;
|
|
19415
|
-
const current =
|
|
19177
|
+
const current = generation2.current;
|
|
19416
19178
|
setSaving(true);
|
|
19417
19179
|
setFailure(null);
|
|
19418
19180
|
setFieldErrors([]);
|
|
@@ -19424,16 +19186,18 @@ function ConfigDialogState({
|
|
|
19424
19186
|
expected_revision: config.revision,
|
|
19425
19187
|
set: draft.set,
|
|
19426
19188
|
remove: draft.remove
|
|
19427
|
-
}
|
|
19189
|
+
},
|
|
19190
|
+
void 0,
|
|
19191
|
+
scope
|
|
19428
19192
|
);
|
|
19429
|
-
if (!alive.current ||
|
|
19193
|
+
if (!alive.current || generation2.current !== current) return;
|
|
19430
19194
|
setConfig(state);
|
|
19431
19195
|
setFormVersion((value) => value + 1);
|
|
19432
|
-
onSaved?.(state);
|
|
19196
|
+
if (scope === "personal") onSaved?.(state);
|
|
19433
19197
|
} catch (error) {
|
|
19434
|
-
if (!alive.current ||
|
|
19198
|
+
if (!alive.current || generation2.current !== current) return;
|
|
19435
19199
|
const detail = await readFailure(error);
|
|
19436
|
-
if (!alive.current ||
|
|
19200
|
+
if (!alive.current || generation2.current !== current) return;
|
|
19437
19201
|
setFailure(detail.message ?? "\u914D\u7F6E\u672A\u4FDD\u5B58\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");
|
|
19438
19202
|
setFieldErrors(detail.errors ?? []);
|
|
19439
19203
|
if (detail.code === "plugin_config_conflict") await load();
|
|
@@ -19441,9 +19205,9 @@ function ConfigDialogState({
|
|
|
19441
19205
|
if (alive.current) setSaving(false);
|
|
19442
19206
|
}
|
|
19443
19207
|
};
|
|
19444
|
-
return /* @__PURE__ */
|
|
19445
|
-
/* @__PURE__ */
|
|
19446
|
-
/* @__PURE__ */
|
|
19208
|
+
return /* @__PURE__ */ jsxs4(Fragment3, { children: [
|
|
19209
|
+
/* @__PURE__ */ jsx6("style", { children: ".blade-plugin-dialog::backdrop { background: rgb(0 0 0 / 40%); }" }),
|
|
19210
|
+
/* @__PURE__ */ jsxs4(
|
|
19447
19211
|
"dialog",
|
|
19448
19212
|
{
|
|
19449
19213
|
ref: dialog,
|
|
@@ -19468,9 +19232,9 @@ function ConfigDialogState({
|
|
|
19468
19232
|
},
|
|
19469
19233
|
className: "blade-plugin-dialog max-h-[80vh] overflow-y-auto rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--popover))] p-4 text-[hsl(var(--popover-foreground))] shadow-lg",
|
|
19470
19234
|
children: [
|
|
19471
|
-
/* @__PURE__ */
|
|
19472
|
-
/* @__PURE__ */
|
|
19473
|
-
/* @__PURE__ */
|
|
19235
|
+
/* @__PURE__ */ jsxs4("div", { className: "mb-3 flex items-center gap-2", children: [
|
|
19236
|
+
/* @__PURE__ */ jsx6(SessionPluginIcon, { client, sessionId, plugin }),
|
|
19237
|
+
/* @__PURE__ */ jsx6(
|
|
19474
19238
|
"span",
|
|
19475
19239
|
{
|
|
19476
19240
|
className: "min-w-0 flex-1 truncate text-sm font-medium",
|
|
@@ -19478,7 +19242,7 @@ function ConfigDialogState({
|
|
|
19478
19242
|
children: sessionPluginLabel(plugin)
|
|
19479
19243
|
}
|
|
19480
19244
|
),
|
|
19481
|
-
/* @__PURE__ */
|
|
19245
|
+
/* @__PURE__ */ jsx6(
|
|
19482
19246
|
"button",
|
|
19483
19247
|
{
|
|
19484
19248
|
type: "button",
|
|
@@ -19489,10 +19253,44 @@ function ConfigDialogState({
|
|
|
19489
19253
|
}
|
|
19490
19254
|
)
|
|
19491
19255
|
] }),
|
|
19492
|
-
|
|
19493
|
-
|
|
19494
|
-
/* @__PURE__ */
|
|
19495
|
-
|
|
19256
|
+
canConfigureGlobal ? /* @__PURE__ */ jsxs4("div", { className: "mb-3 flex gap-2 text-xs", children: [
|
|
19257
|
+
/* @__PURE__ */ jsx6("button", { type: "button", disabled: saving, "aria-pressed": scope === "personal", onClick: () => setScope("personal"), children: "\u6211\u7684\u767B\u5F55" }),
|
|
19258
|
+
/* @__PURE__ */ jsx6("button", { type: "button", disabled: saving, "aria-pressed": scope === "global", onClick: () => setScope("global"), children: "\u7EC4\u7EC7\u5171\u4EAB\u914D\u7F6E" })
|
|
19259
|
+
] }) : null,
|
|
19260
|
+
host ? /* @__PURE__ */ jsxs4("div", { className: "mb-3 space-y-1 text-xs", children: [
|
|
19261
|
+
/* @__PURE__ */ jsxs4("p", { children: [
|
|
19262
|
+
"\u670D\u52A1\uFF1A",
|
|
19263
|
+
host.reason,
|
|
19264
|
+
" \xB7 \u5DF2\u6062\u590D ",
|
|
19265
|
+
host.restarts,
|
|
19266
|
+
" \u6B21"
|
|
19267
|
+
] }),
|
|
19268
|
+
canConfigureGlobal ? /* @__PURE__ */ jsxs4(Fragment3, { children: [
|
|
19269
|
+
/* @__PURE__ */ jsxs4("p", { className: "break-all text-[hsl(var(--muted-foreground))]", children: [
|
|
19270
|
+
"\u5305\u6458\u8981\uFF1A",
|
|
19271
|
+
host.digest,
|
|
19272
|
+
" \xB7 \u914D\u7F6E\uFF1A",
|
|
19273
|
+
host.revision
|
|
19274
|
+
] }),
|
|
19275
|
+
/* @__PURE__ */ jsx6("button", { type: "button", disabled: restarting || saving, onClick: () => {
|
|
19276
|
+
setRestarting(true);
|
|
19277
|
+
void client.sessions.restartSessionPluginHost(sessionId, plugin.name).then(() => load()).catch(() => setFailure("\u670D\u52A1\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5")).finally(() => {
|
|
19278
|
+
if (alive.current) setRestarting(false);
|
|
19279
|
+
});
|
|
19280
|
+
}, children: restarting ? "\u6B63\u5728\u91CD\u542F\u2026" : "\u91CD\u542F\u670D\u52A1" }),
|
|
19281
|
+
host.recent?.length ? /* @__PURE__ */ jsxs4("details", { children: [
|
|
19282
|
+
/* @__PURE__ */ jsx6("summary", { children: "\u6700\u8FD1\u6D3B\u52A8" }),
|
|
19283
|
+
host.recent.map((line, index2) => /* @__PURE__ */ jsx6("p", { children: line }, `${index2}-${line}`))
|
|
19284
|
+
] }) : null
|
|
19285
|
+
] }) : null
|
|
19286
|
+
] }) : null,
|
|
19287
|
+
scope === "personal" && config?.auth_status === "expired" ? /* @__PURE__ */ jsx6("p", { className: "mb-2 text-xs", children: "\u767B\u5F55\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u586B\u5199" }) : null,
|
|
19288
|
+
scope === "personal" && config?.global_ready === false ? /* @__PURE__ */ jsx6("p", { className: "mb-2 text-xs", children: "\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u586B\u5199\u5171\u4EAB\u914D\u7F6E" }) : null,
|
|
19289
|
+
scope === "global" ? /* @__PURE__ */ jsx6("p", { className: "mb-2 text-xs", children: "\u5171\u4EAB\u5BC6\u94A5\u7528\u4E8E\u63D2\u4EF6\u670D\u52A1\u3002\u547D\u4EE4\u7C7B\u63D2\u4EF6\u7684\u6C99\u76D2\u4EE3\u7801\u53EF\u4EE5\u8BFB\u53D6\u5B83\uFF1B\u9700\u4FDD\u5BC6\u65F6\u8BF7\u4F7F\u7528\u6258\u7BA1\u670D\u52A1\u3002" }) : null,
|
|
19290
|
+
loading ? /* @__PURE__ */ jsx6("p", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: "\u6B63\u5728\u8BFB\u53D6\u914D\u7F6E\u2026" }) : null,
|
|
19291
|
+
loadFailure ? /* @__PURE__ */ jsxs4("div", { className: "space-y-2 text-xs", children: [
|
|
19292
|
+
/* @__PURE__ */ jsx6("p", { children: loadFailure }),
|
|
19293
|
+
/* @__PURE__ */ jsx6(
|
|
19496
19294
|
"button",
|
|
19497
19295
|
{
|
|
19498
19296
|
type: "button",
|
|
@@ -19502,7 +19300,7 @@ function ConfigDialogState({
|
|
|
19502
19300
|
}
|
|
19503
19301
|
)
|
|
19504
19302
|
] }) : null,
|
|
19505
|
-
config && !loading ? /* @__PURE__ */
|
|
19303
|
+
config && !loading ? /* @__PURE__ */ jsx6(
|
|
19506
19304
|
SessionPluginConfigForm,
|
|
19507
19305
|
{
|
|
19508
19306
|
config,
|
|
@@ -19521,17 +19319,16 @@ function ConfigDialogState({
|
|
|
19521
19319
|
}
|
|
19522
19320
|
|
|
19523
19321
|
// src/components/PluginConnectorList.tsx
|
|
19524
|
-
import { jsx as
|
|
19322
|
+
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
19525
19323
|
function PluginSwitch({
|
|
19526
19324
|
label,
|
|
19527
19325
|
checked,
|
|
19528
19326
|
pending,
|
|
19529
19327
|
disabled,
|
|
19530
|
-
/** 首页的开关只是"这次输入的待选",不是"已经启用",措辞必须跟着分。 */
|
|
19531
19328
|
draft = false,
|
|
19532
19329
|
onToggle
|
|
19533
19330
|
}) {
|
|
19534
|
-
return /* @__PURE__ */
|
|
19331
|
+
return /* @__PURE__ */ jsx7(
|
|
19535
19332
|
"button",
|
|
19536
19333
|
{
|
|
19537
19334
|
type: "button",
|
|
@@ -19541,12 +19338,12 @@ function PluginSwitch({
|
|
|
19541
19338
|
disabled,
|
|
19542
19339
|
onClick: () => onToggle(!checked),
|
|
19543
19340
|
className: `relative inline-flex h-[18px] w-8 shrink-0 cursor-pointer items-center rounded-full border transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${checked ? "border-transparent bg-[hsl(213_94%_55%)]" : "border-[hsl(var(--border))] bg-[hsl(var(--muted))]"}`,
|
|
19544
|
-
children: /* @__PURE__ */
|
|
19341
|
+
children: /* @__PURE__ */ jsx7(
|
|
19545
19342
|
"span",
|
|
19546
19343
|
{
|
|
19547
19344
|
"aria-hidden": "true",
|
|
19548
19345
|
className: `pointer-events-none flex h-3.5 w-3.5 items-center justify-center rounded-full bg-white shadow transition-transform ${checked ? "translate-x-[16px]" : "translate-x-[2px]"}`,
|
|
19549
|
-
children: pending ? /* @__PURE__ */
|
|
19346
|
+
children: pending ? /* @__PURE__ */ jsx7(LoaderCircle, { size: 9, className: "animate-spin text-[hsl(var(--muted-foreground))]" }) : null
|
|
19550
19347
|
}
|
|
19551
19348
|
)
|
|
19552
19349
|
}
|
|
@@ -19571,17 +19368,17 @@ function PluginConnectorList({
|
|
|
19571
19368
|
draft = false
|
|
19572
19369
|
}) {
|
|
19573
19370
|
const configuringItem = configuring ? items.find((item) => item.name === configuring.name) ?? null : null;
|
|
19574
|
-
return /* @__PURE__ */
|
|
19575
|
-
disabledReason ? /* @__PURE__ */
|
|
19576
|
-
items.length === 0 ? /* @__PURE__ */
|
|
19371
|
+
return /* @__PURE__ */ jsxs5("div", { className: "py-0.5", children: [
|
|
19372
|
+
disabledReason ? /* @__PURE__ */ jsx7("div", { className: "px-3 py-1.5 text-[11px] text-[hsl(var(--muted-foreground))]", children: disabledReason }) : null,
|
|
19373
|
+
items.length === 0 ? /* @__PURE__ */ jsx7("div", { className: "px-3 py-1.5 text-[11px] text-[hsl(var(--muted-foreground))]", children: unavailableText ?? emptyText }) : null,
|
|
19577
19374
|
items.map((item) => {
|
|
19578
19375
|
const label = sessionPluginLabel(item);
|
|
19579
19376
|
const actionable = !disabledReason && item.installed !== false || item.active;
|
|
19580
19377
|
const pending = Boolean(inFlight[item.name]);
|
|
19581
19378
|
const checked = item.active;
|
|
19582
|
-
return /* @__PURE__ */
|
|
19583
|
-
/* @__PURE__ */
|
|
19584
|
-
/* @__PURE__ */
|
|
19379
|
+
return /* @__PURE__ */ jsxs5("div", { className: "group px-3 py-1", children: [
|
|
19380
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-2", children: [
|
|
19381
|
+
/* @__PURE__ */ jsx7(
|
|
19585
19382
|
SessionPluginIcon,
|
|
19586
19383
|
{
|
|
19587
19384
|
client,
|
|
@@ -19589,8 +19386,9 @@ function PluginConnectorList({
|
|
|
19589
19386
|
plugin: item
|
|
19590
19387
|
}
|
|
19591
19388
|
),
|
|
19592
|
-
/* @__PURE__ */
|
|
19593
|
-
|
|
19389
|
+
/* @__PURE__ */ jsx7("span", { className: "min-w-0 flex-1 truncate text-[11px]", title: label, children: label }),
|
|
19390
|
+
item.auth_status === "expired" || item.auth_status === "login_required" || item.auth_status === "unavailable" ? /* @__PURE__ */ jsx7("button", { type: "button", disabled: !sessionId || busy, onClick: () => onEditConfig(item), className: "shrink-0 text-[10px] underline", children: item.auth_status === "expired" ? "\u767B\u5F55\u5DF2\u8FC7\u671F" : item.auth_status === "unavailable" ? "\u6682\u65F6\u4E0D\u53EF\u7528" : "\u672A\u767B\u5F55" }) : null,
|
|
19391
|
+
!draft && item.config === "configured" ? /* @__PURE__ */ jsx7(
|
|
19594
19392
|
"button",
|
|
19595
19393
|
{
|
|
19596
19394
|
type: "button",
|
|
@@ -19601,7 +19399,7 @@ function PluginConnectorList({
|
|
|
19601
19399
|
children: "\u66F4\u65B0\u914D\u7F6E"
|
|
19602
19400
|
}
|
|
19603
19401
|
) : null,
|
|
19604
|
-
!draft && (item.config === "required" || item.config === "error") ? /* @__PURE__ */
|
|
19402
|
+
!draft && (item.config === "required" || item.config === "error") ? /* @__PURE__ */ jsx7(
|
|
19605
19403
|
"button",
|
|
19606
19404
|
{
|
|
19607
19405
|
type: "button",
|
|
@@ -19612,7 +19410,7 @@ function PluginConnectorList({
|
|
|
19612
19410
|
children: "\u586B\u5199\u914D\u7F6E"
|
|
19613
19411
|
}
|
|
19614
19412
|
) : null,
|
|
19615
|
-
/* @__PURE__ */
|
|
19413
|
+
/* @__PURE__ */ jsx7(
|
|
19616
19414
|
PluginSwitch,
|
|
19617
19415
|
{
|
|
19618
19416
|
label,
|
|
@@ -19624,9 +19422,9 @@ function PluginConnectorList({
|
|
|
19624
19422
|
}
|
|
19625
19423
|
)
|
|
19626
19424
|
] }),
|
|
19627
|
-
!draft && item.active && item.status !== "valid" && item.status !== "required" ? /* @__PURE__ */
|
|
19628
|
-
/* @__PURE__ */
|
|
19629
|
-
/* @__PURE__ */
|
|
19425
|
+
!draft && item.active && item.status !== "valid" && item.status !== "required" ? /* @__PURE__ */ jsxs5("div", { className: "mt-0.5 flex items-center gap-2 pl-7 text-[10px] text-[hsl(var(--muted-foreground))]", children: [
|
|
19426
|
+
/* @__PURE__ */ jsx7("span", { children: item.reason || "\u63D2\u4EF6\u6682\u4E0D\u53EF\u7528" }),
|
|
19427
|
+
/* @__PURE__ */ jsx7(
|
|
19630
19428
|
"button",
|
|
19631
19429
|
{
|
|
19632
19430
|
type: "button",
|
|
@@ -19639,8 +19437,8 @@ function PluginConnectorList({
|
|
|
19639
19437
|
] }) : null
|
|
19640
19438
|
] }, item.name);
|
|
19641
19439
|
}),
|
|
19642
|
-
mutationError ? /* @__PURE__ */
|
|
19643
|
-
configuring && configuringItem && sessionId ? /* @__PURE__ */
|
|
19440
|
+
mutationError ? /* @__PURE__ */ jsx7("div", { className: "px-3 pt-1 text-[10px] text-[hsl(var(--destructive))]", children: "\u64CD\u4F5C\u672A\u5B8C\u6210\uFF0C\u8BF7\u91CD\u8BD5" }) : null,
|
|
19441
|
+
configuring && configuringItem && sessionId ? /* @__PURE__ */ jsx7(
|
|
19644
19442
|
SessionPluginConfigDialog,
|
|
19645
19443
|
{
|
|
19646
19444
|
client,
|
|
@@ -19661,6 +19459,8 @@ function catalogToConnectorItems(catalog) {
|
|
|
19661
19459
|
icon: entry.icon,
|
|
19662
19460
|
iconSource: "account",
|
|
19663
19461
|
installed: entry.installed,
|
|
19462
|
+
connector: entry.connector,
|
|
19463
|
+
auth_status: entry.auth_status,
|
|
19664
19464
|
active: false,
|
|
19665
19465
|
status: "not_prepared",
|
|
19666
19466
|
projected: false
|
|
@@ -19690,6 +19490,8 @@ function mergeConnectorItems(sessionPlugins, catalog) {
|
|
|
19690
19490
|
icon: entry.icon,
|
|
19691
19491
|
iconSource: "account",
|
|
19692
19492
|
installed: entry.installed,
|
|
19493
|
+
connector: entry.connector,
|
|
19494
|
+
auth_status: entry.auth_status,
|
|
19693
19495
|
active: plugin.active,
|
|
19694
19496
|
status: plugin.status,
|
|
19695
19497
|
reason: plugin.reason,
|
|
@@ -19707,21 +19509,22 @@ function filterConnectorItems(items, query) {
|
|
|
19707
19509
|
}
|
|
19708
19510
|
|
|
19709
19511
|
// src/components/use-session-plugin-activation.ts
|
|
19710
|
-
import {
|
|
19512
|
+
import { isLocalConnectorName } from "@blade-hq/agent-client/internal";
|
|
19513
|
+
import { useCallback as useCallback19, useEffect as useEffect9, useMemo as useMemo9, useRef as useRef9, useState as useState13 } from "react";
|
|
19711
19514
|
function useSessionPluginActivation({
|
|
19712
19515
|
client,
|
|
19713
19516
|
sessionId,
|
|
19714
19517
|
onChange
|
|
19715
19518
|
}) {
|
|
19716
|
-
const [plugins, setPlugins] =
|
|
19717
|
-
const [catalog, setCatalog] =
|
|
19718
|
-
const [loading, setLoading] =
|
|
19719
|
-
const [listError, setListError] =
|
|
19720
|
-
const [mutationError, setMutationError] =
|
|
19721
|
-
const [inFlight, setInFlight] =
|
|
19722
|
-
const [configuring, setConfiguring] =
|
|
19519
|
+
const [plugins, setPlugins] = useState13([]);
|
|
19520
|
+
const [catalog, setCatalog] = useState13(null);
|
|
19521
|
+
const [loading, setLoading] = useState13(false);
|
|
19522
|
+
const [listError, setListError] = useState13(false);
|
|
19523
|
+
const [mutationError, setMutationError] = useState13(false);
|
|
19524
|
+
const [inFlight, setInFlight] = useState13({});
|
|
19525
|
+
const [configuring, setConfiguring] = useState13(null);
|
|
19723
19526
|
const alive = useRef9(true);
|
|
19724
|
-
const
|
|
19527
|
+
const generation2 = useRef9(0);
|
|
19725
19528
|
const mutationGenerations = useRef9(/* @__PURE__ */ new Map());
|
|
19726
19529
|
const desiredActivations = useRef9(/* @__PURE__ */ new Map());
|
|
19727
19530
|
const pendingMutations = useRef9(/* @__PURE__ */ new Map());
|
|
@@ -19729,7 +19532,7 @@ function useSessionPluginActivation({
|
|
|
19729
19532
|
const serverActive = useRef9(/* @__PURE__ */ new Set());
|
|
19730
19533
|
const lifetime = useRef9(0);
|
|
19731
19534
|
const request = useRef9(null);
|
|
19732
|
-
const [desiredVersion, setDesiredVersion] =
|
|
19535
|
+
const [desiredVersion, setDesiredVersion] = useState13(0);
|
|
19733
19536
|
const setDesired = useCallback19((name, value) => {
|
|
19734
19537
|
if (value === null) {
|
|
19735
19538
|
if (!desiredActivations.current.delete(name)) return;
|
|
@@ -19739,7 +19542,7 @@ function useSessionPluginActivation({
|
|
|
19739
19542
|
}
|
|
19740
19543
|
setDesiredVersion((version) => version + 1);
|
|
19741
19544
|
}, []);
|
|
19742
|
-
const items =
|
|
19545
|
+
const items = useMemo9(() => {
|
|
19743
19546
|
void desiredVersion;
|
|
19744
19547
|
const merged = mergeConnectorItems(plugins, catalog);
|
|
19745
19548
|
return merged.map((item) => {
|
|
@@ -19775,7 +19578,7 @@ function useSessionPluginActivation({
|
|
|
19775
19578
|
return () => {
|
|
19776
19579
|
alive.current = false;
|
|
19777
19580
|
lifetime.current++;
|
|
19778
|
-
|
|
19581
|
+
generation2.current++;
|
|
19779
19582
|
request.current?.abort();
|
|
19780
19583
|
};
|
|
19781
19584
|
}, [client]);
|
|
@@ -19784,14 +19587,14 @@ function useSessionPluginActivation({
|
|
|
19784
19587
|
request.current?.abort();
|
|
19785
19588
|
const controller = new AbortController();
|
|
19786
19589
|
request.current = controller;
|
|
19787
|
-
const current = ++
|
|
19590
|
+
const current = ++generation2.current;
|
|
19788
19591
|
setLoading(true);
|
|
19789
19592
|
setListError(false);
|
|
19790
19593
|
try {
|
|
19791
19594
|
const result = await client.sessions.listSessionPlugins(sessionId, { signal: controller.signal });
|
|
19792
19595
|
const withConfig = await Promise.all(
|
|
19793
19596
|
result.plugins.map(async (item) => {
|
|
19794
|
-
if (item.config !== void 0 && item.config !== "unchecked") return item;
|
|
19597
|
+
if (isLocalConnectorName(item.name) || item.config !== void 0 && item.config !== "unchecked") return item;
|
|
19795
19598
|
try {
|
|
19796
19599
|
const { config } = await client.sessions.getSessionPluginConfig(sessionId, item.name, {
|
|
19797
19600
|
signal: controller.signal
|
|
@@ -19802,7 +19605,7 @@ function useSessionPluginActivation({
|
|
|
19802
19605
|
}
|
|
19803
19606
|
})
|
|
19804
19607
|
);
|
|
19805
|
-
if (alive.current && current ===
|
|
19608
|
+
if (alive.current && current === generation2.current) {
|
|
19806
19609
|
serverActive.current = new Set(withConfig.filter((item) => item.active).map((item) => item.name));
|
|
19807
19610
|
setPlugins(withConfig.map((item) => {
|
|
19808
19611
|
const desired = desiredActivations.current.get(item.name);
|
|
@@ -19810,9 +19613,9 @@ function useSessionPluginActivation({
|
|
|
19810
19613
|
}));
|
|
19811
19614
|
}
|
|
19812
19615
|
} catch {
|
|
19813
|
-
if (alive.current && current ===
|
|
19616
|
+
if (alive.current && current === generation2.current && !controller.signal.aborted) setListError(true);
|
|
19814
19617
|
} finally {
|
|
19815
|
-
if (alive.current && current ===
|
|
19618
|
+
if (alive.current && current === generation2.current) setLoading(false);
|
|
19816
19619
|
}
|
|
19817
19620
|
}, [client, sessionId]);
|
|
19818
19621
|
const loadCatalog = useCallback19(async () => {
|
|
@@ -19887,7 +19690,7 @@ function useSessionPluginActivation({
|
|
|
19887
19690
|
setMutationError(false);
|
|
19888
19691
|
markInFlight(name, true);
|
|
19889
19692
|
request.current?.abort();
|
|
19890
|
-
|
|
19693
|
+
generation2.current++;
|
|
19891
19694
|
setLoading(false);
|
|
19892
19695
|
let state;
|
|
19893
19696
|
try {
|
|
@@ -19917,7 +19720,7 @@ function useSessionPluginActivation({
|
|
|
19917
19720
|
const disable = useCallback19((name) => {
|
|
19918
19721
|
const startedAt = lifetime.current;
|
|
19919
19722
|
request.current?.abort();
|
|
19920
|
-
|
|
19723
|
+
generation2.current++;
|
|
19921
19724
|
setLoading(false);
|
|
19922
19725
|
if (!submittedActivations.current.has(name) && !serverActive.current.has(name)) {
|
|
19923
19726
|
abandon(name);
|
|
@@ -19945,6 +19748,7 @@ function useSessionPluginActivation({
|
|
|
19945
19748
|
const target = configuring;
|
|
19946
19749
|
if (!target) return;
|
|
19947
19750
|
setConfiguring(null);
|
|
19751
|
+
void loadCatalog();
|
|
19948
19752
|
setPlugins((current) => current.map((item) => item.name === target.name ? { ...item, config: state.state } : item));
|
|
19949
19753
|
if (!target.pendingActivation || state.state !== "configured") {
|
|
19950
19754
|
void load();
|
|
@@ -19957,7 +19761,7 @@ function useSessionPluginActivation({
|
|
|
19957
19761
|
setDesired(target.name, true);
|
|
19958
19762
|
markInFlight(target.name, true);
|
|
19959
19763
|
void commitActivation(target.name, true, mutation, startedAt);
|
|
19960
|
-
}, [commitActivation, configuring, load, markInFlight, setDesired]);
|
|
19764
|
+
}, [commitActivation, configuring, load, loadCatalog, markInFlight, setDesired]);
|
|
19961
19765
|
const onConfigClose = useCallback19(() => {
|
|
19962
19766
|
const target = configuring;
|
|
19963
19767
|
if (!target) return;
|
|
@@ -19982,6 +19786,234 @@ function useSessionPluginActivation({
|
|
|
19982
19786
|
};
|
|
19983
19787
|
}
|
|
19984
19788
|
|
|
19789
|
+
// src/chat/runtime/session-source.tsx
|
|
19790
|
+
import { createInitialSessionState } from "@blade-hq/agent-client/internal";
|
|
19791
|
+
import {
|
|
19792
|
+
createContext as createContext3,
|
|
19793
|
+
useContext as useContext3,
|
|
19794
|
+
useEffect as useEffect10,
|
|
19795
|
+
useLayoutEffect,
|
|
19796
|
+
useMemo as useMemo10,
|
|
19797
|
+
useRef as useRef10,
|
|
19798
|
+
useState as useState14,
|
|
19799
|
+
useSyncExternalStore
|
|
19800
|
+
} from "react";
|
|
19801
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
19802
|
+
var EMPTY_SOURCE = {
|
|
19803
|
+
subscribe: () => () => {
|
|
19804
|
+
},
|
|
19805
|
+
getSession: () => void 0,
|
|
19806
|
+
isHistoryLoading: () => false,
|
|
19807
|
+
planRevealRevision: () => 0
|
|
19808
|
+
};
|
|
19809
|
+
var SessionSourceContext = createContext3(EMPTY_SOURCE);
|
|
19810
|
+
function SessionSourceProvider({ source, children }) {
|
|
19811
|
+
return /* @__PURE__ */ jsx8(SessionSourceContext.Provider, { value: source, children });
|
|
19812
|
+
}
|
|
19813
|
+
function useSessionSource() {
|
|
19814
|
+
return useContext3(SessionSourceContext);
|
|
19815
|
+
}
|
|
19816
|
+
var SingleSessionSource = class {
|
|
19817
|
+
session = null;
|
|
19818
|
+
loading = false;
|
|
19819
|
+
listeners = /* @__PURE__ */ new Set();
|
|
19820
|
+
revisions = /* @__PURE__ */ new Map();
|
|
19821
|
+
subscribe = (listener) => {
|
|
19822
|
+
this.listeners.add(listener);
|
|
19823
|
+
return () => {
|
|
19824
|
+
this.listeners.delete(listener);
|
|
19825
|
+
};
|
|
19826
|
+
};
|
|
19827
|
+
getSession = (sessionId) => {
|
|
19828
|
+
const current = this.session;
|
|
19829
|
+
return current && (!sessionId || current.sessionId === sessionId) ? current : void 0;
|
|
19830
|
+
};
|
|
19831
|
+
isHistoryLoading = (sessionId) => {
|
|
19832
|
+
if (!this.session) return this.loading;
|
|
19833
|
+
return (!sessionId || this.session.sessionId === sessionId) && this.loading;
|
|
19834
|
+
};
|
|
19835
|
+
planRevealRevision = (sessionId) => sessionId ? this.revisions.get(sessionId) ?? 0 : 0;
|
|
19836
|
+
update(session, loading) {
|
|
19837
|
+
if (this.session === session && this.loading === loading) return;
|
|
19838
|
+
this.session = session;
|
|
19839
|
+
this.loading = loading;
|
|
19840
|
+
this.notify();
|
|
19841
|
+
}
|
|
19842
|
+
watchPlan(session) {
|
|
19843
|
+
return session.on("toolResult", ({ toolCall, turn, source }) => {
|
|
19844
|
+
if (source === "reconnect_replay" || (turn.loop_id || "root") !== "root" || toolCall.status !== "done" || !isPlanUpdateTool(toolCall) || !parsePlanUpdate(toolCall.arguments)) {
|
|
19845
|
+
return;
|
|
19846
|
+
}
|
|
19847
|
+
this.revisions.set(session.sessionId, (this.revisions.get(session.sessionId) ?? 0) + 1);
|
|
19848
|
+
this.notify();
|
|
19849
|
+
});
|
|
19850
|
+
}
|
|
19851
|
+
notify() {
|
|
19852
|
+
for (const listener of [...this.listeners]) listener();
|
|
19853
|
+
}
|
|
19854
|
+
};
|
|
19855
|
+
function useSingleSessionSource(session, loading) {
|
|
19856
|
+
const [source] = useState14(() => new SingleSessionSource());
|
|
19857
|
+
useLayoutEffect(() => {
|
|
19858
|
+
source.update(session, loading);
|
|
19859
|
+
}, [source, session, loading]);
|
|
19860
|
+
useEffect10(() => session ? source.watchPlan(session) : void 0, [source, session]);
|
|
19861
|
+
return source;
|
|
19862
|
+
}
|
|
19863
|
+
var EMPTY_STATE = createInitialSessionState("");
|
|
19864
|
+
var noopSubscribe = () => () => {
|
|
19865
|
+
};
|
|
19866
|
+
function useSessionHandle(sessionId) {
|
|
19867
|
+
const source = useSessionSource();
|
|
19868
|
+
return useSyncExternalStore(
|
|
19869
|
+
source.subscribe,
|
|
19870
|
+
() => source.getSession(sessionId) ?? null,
|
|
19871
|
+
() => source.getSession(sessionId) ?? null
|
|
19872
|
+
);
|
|
19873
|
+
}
|
|
19874
|
+
function useSessionState(sessionId, selector) {
|
|
19875
|
+
const session = useSessionHandle(sessionId);
|
|
19876
|
+
const selectorRef = useRef10(selector);
|
|
19877
|
+
selectorRef.current = selector;
|
|
19878
|
+
const store = useMemo10(() => {
|
|
19879
|
+
let lastState = null;
|
|
19880
|
+
let lastSelector = null;
|
|
19881
|
+
let lastSelected;
|
|
19882
|
+
const getSnapshot = () => {
|
|
19883
|
+
const state = session ? session.getState() : EMPTY_STATE;
|
|
19884
|
+
const current = selectorRef.current;
|
|
19885
|
+
if (state !== lastState || current !== lastSelector) {
|
|
19886
|
+
const next = current(state);
|
|
19887
|
+
if (!(lastState !== null && Object.is(next, lastSelected))) lastSelected = next;
|
|
19888
|
+
lastState = state;
|
|
19889
|
+
lastSelector = current;
|
|
19890
|
+
}
|
|
19891
|
+
return lastSelected;
|
|
19892
|
+
};
|
|
19893
|
+
return {
|
|
19894
|
+
subscribe: session ? (listener) => session.subscribe(listener) : noopSubscribe,
|
|
19895
|
+
getSnapshot
|
|
19896
|
+
};
|
|
19897
|
+
}, [session]);
|
|
19898
|
+
return useSyncExternalStore(store.subscribe, store.getSnapshot, store.getSnapshot);
|
|
19899
|
+
}
|
|
19900
|
+
function useIsSessionHistoryLoading(sessionId) {
|
|
19901
|
+
const source = useSessionSource();
|
|
19902
|
+
return useSyncExternalStore(
|
|
19903
|
+
source.subscribe,
|
|
19904
|
+
() => source.isHistoryLoading(sessionId),
|
|
19905
|
+
() => source.isHistoryLoading(sessionId)
|
|
19906
|
+
);
|
|
19907
|
+
}
|
|
19908
|
+
function usePlanRevealRevision(sessionId) {
|
|
19909
|
+
const source = useSessionSource();
|
|
19910
|
+
return useSyncExternalStore(
|
|
19911
|
+
source.subscribe,
|
|
19912
|
+
() => source.planRevealRevision(sessionId),
|
|
19913
|
+
() => source.planRevealRevision(sessionId)
|
|
19914
|
+
);
|
|
19915
|
+
}
|
|
19916
|
+
var CurrentChatSessionContext = createContext3(null);
|
|
19917
|
+
function CurrentChatSessionProvider({ sessionId, children }) {
|
|
19918
|
+
return /* @__PURE__ */ jsx8(CurrentChatSessionContext.Provider, { value: sessionId, children });
|
|
19919
|
+
}
|
|
19920
|
+
function useCurrentChatSessionId() {
|
|
19921
|
+
return useContext3(CurrentChatSessionContext);
|
|
19922
|
+
}
|
|
19923
|
+
|
|
19924
|
+
// src/chat/runtime/environment.tsx
|
|
19925
|
+
import { createContext as createContext4, useContext as useContext4, useMemo as useMemo11 } from "react";
|
|
19926
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
19927
|
+
var EMPTY_ENVIRONMENT = {};
|
|
19928
|
+
var ChatEnvironmentContext = createContext4(EMPTY_ENVIRONMENT);
|
|
19929
|
+
function ChatEnvironmentProvider({ value, children }) {
|
|
19930
|
+
return /* @__PURE__ */ jsx9(ChatEnvironmentContext.Provider, { value, children });
|
|
19931
|
+
}
|
|
19932
|
+
function useChatEnvironment() {
|
|
19933
|
+
return useContext4(ChatEnvironmentContext);
|
|
19934
|
+
}
|
|
19935
|
+
var NO_HIGHLIGHT = { highlightedHtml: null };
|
|
19936
|
+
function usePlainCode() {
|
|
19937
|
+
return NO_HIGHLIGHT;
|
|
19938
|
+
}
|
|
19939
|
+
function useHighlightedCode(code, language) {
|
|
19940
|
+
const use = useChatEnvironment().useHighlightedCode ?? usePlainCode;
|
|
19941
|
+
return use(code, language);
|
|
19942
|
+
}
|
|
19943
|
+
function useNoDetail() {
|
|
19944
|
+
return null;
|
|
19945
|
+
}
|
|
19946
|
+
function useChatSessionDetail(sessionId) {
|
|
19947
|
+
const use = useChatEnvironment().useSessionDetail ?? useNoDetail;
|
|
19948
|
+
return use(sessionId);
|
|
19949
|
+
}
|
|
19950
|
+
function useShowTodo() {
|
|
19951
|
+
return false;
|
|
19952
|
+
}
|
|
19953
|
+
function useHideTodo() {
|
|
19954
|
+
const use = useChatEnvironment().useHideTodo ?? useShowTodo;
|
|
19955
|
+
return use();
|
|
19956
|
+
}
|
|
19957
|
+
function useChatRenderMode() {
|
|
19958
|
+
return useChatEnvironment().renderMode ?? "normal";
|
|
19959
|
+
}
|
|
19960
|
+
function notifyChat(environment, kind, message, options) {
|
|
19961
|
+
if (environment.notify) environment.notify(kind, message, options);
|
|
19962
|
+
else if (kind === "error") console.error(message);
|
|
19963
|
+
}
|
|
19964
|
+
function useComposerBridge(sessionId) {
|
|
19965
|
+
const environment = useChatEnvironment();
|
|
19966
|
+
const session = useSessionHandle(sessionId);
|
|
19967
|
+
return useMemo11(
|
|
19968
|
+
() => ({
|
|
19969
|
+
appendText(text, separate = false) {
|
|
19970
|
+
if (!sessionId) return;
|
|
19971
|
+
if (environment.appendToComposer) environment.appendToComposer(sessionId, text, separate);
|
|
19972
|
+
else session?.insertText(separate ? `
|
|
19973
|
+
|
|
19974
|
+
${text}` : text);
|
|
19975
|
+
},
|
|
19976
|
+
addContext(context) {
|
|
19977
|
+
if (!sessionId) return;
|
|
19978
|
+
if (environment.addComposerContext) environment.addComposerContext(sessionId, context);
|
|
19979
|
+
else session?.attach(context.label, context.content);
|
|
19980
|
+
}
|
|
19981
|
+
}),
|
|
19982
|
+
[environment, session, sessionId]
|
|
19983
|
+
);
|
|
19984
|
+
}
|
|
19985
|
+
var NO_VIRTUAL_ITEMS = [];
|
|
19986
|
+
var NO_VIRTUALIZER = {
|
|
19987
|
+
getVirtualItems: () => NO_VIRTUAL_ITEMS,
|
|
19988
|
+
getTotalSize: () => 0,
|
|
19989
|
+
measureElement: () => {
|
|
19990
|
+
},
|
|
19991
|
+
scrollToIndex: () => {
|
|
19992
|
+
},
|
|
19993
|
+
getOffsetForIndex: () => void 0
|
|
19994
|
+
};
|
|
19995
|
+
function useNoVirtualizer() {
|
|
19996
|
+
return NO_VIRTUALIZER;
|
|
19997
|
+
}
|
|
19998
|
+
function useChatVirtualizer(options) {
|
|
19999
|
+
const injected = useChatEnvironment().useVirtualizer;
|
|
20000
|
+
const use = injected ?? useNoVirtualizer;
|
|
20001
|
+
const virtualizer = use(options);
|
|
20002
|
+
return { virtualizer, enabled: Boolean(injected) };
|
|
20003
|
+
}
|
|
20004
|
+
|
|
20005
|
+
// src/lib/message-shortcuts.ts
|
|
20006
|
+
function usesCommandKey() {
|
|
20007
|
+
if (typeof navigator === "undefined") return false;
|
|
20008
|
+
return /Mac|iPhone|iPad|iPod/i.test(navigator.platform || navigator.userAgent);
|
|
20009
|
+
}
|
|
20010
|
+
function queueShortcutLabel() {
|
|
20011
|
+
return usesCommandKey() ? "\u2318 Enter" : "Ctrl Enter";
|
|
20012
|
+
}
|
|
20013
|
+
function isQueueShortcut(event) {
|
|
20014
|
+
return usesCommandKey() ? event.metaKey : event.ctrlKey;
|
|
20015
|
+
}
|
|
20016
|
+
|
|
19985
20017
|
// src/chat/runtime/actions.ts
|
|
19986
20018
|
function buildPendingAskUserAnswer(state, message) {
|
|
19987
20019
|
if (state.status !== "waiting_for_input") return void 0;
|
|
@@ -20010,7 +20042,9 @@ function sendToSession(session, message, mode, askUserAnswer, extras = {}) {
|
|
|
20010
20042
|
model: extras.model,
|
|
20011
20043
|
thinkingOverride: extras.thinkingOverride,
|
|
20012
20044
|
reasoningLevel: extras.reasoningLevel,
|
|
20013
|
-
|
|
20045
|
+
refs: extras.refs,
|
|
20046
|
+
contextAttachments: extras.contextAttachments,
|
|
20047
|
+
topicAssetRefs: extras.topicAssetRefs,
|
|
20014
20048
|
whatif: extras.whatif,
|
|
20015
20049
|
replayDecision: extras.replayDecision,
|
|
20016
20050
|
queueWhenRunning: extras.queueWhenRunning
|
|
@@ -24431,7 +24465,7 @@ VisuallyHidden.displayName = NAME2;
|
|
|
24431
24465
|
var Root3 = VisuallyHidden;
|
|
24432
24466
|
|
|
24433
24467
|
// ../../node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.2.3_@types+react@19.2.14__@types+reac_9074d9fb06315b089b2bee17c4c65951/node_modules/@radix-ui/react-tooltip/dist/index.mjs
|
|
24434
|
-
import { jsx as jsx20, jsxs as
|
|
24468
|
+
import { jsx as jsx20, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
24435
24469
|
var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [
|
|
24436
24470
|
createPopperScope
|
|
24437
24471
|
]);
|
|
@@ -24743,7 +24777,7 @@ var TooltipContentImpl = React30.forwardRef(
|
|
|
24743
24777
|
onPointerDownOutside,
|
|
24744
24778
|
onFocusOutside: (event) => event.preventDefault(),
|
|
24745
24779
|
onDismiss: onClose,
|
|
24746
|
-
children: /* @__PURE__ */
|
|
24780
|
+
children: /* @__PURE__ */ jsxs6(
|
|
24747
24781
|
Content,
|
|
24748
24782
|
{
|
|
24749
24783
|
"data-state": context.stateAttribute,
|
|
@@ -25076,7 +25110,7 @@ __export(dist_exports7, {
|
|
|
25076
25110
|
createDialogScope: () => createDialogScope
|
|
25077
25111
|
});
|
|
25078
25112
|
import * as React32 from "react";
|
|
25079
|
-
import { Fragment as Fragment7, jsx as jsx22, jsxs as
|
|
25113
|
+
import { Fragment as Fragment7, jsx as jsx22, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
25080
25114
|
var DIALOG_NAME = "Dialog";
|
|
25081
25115
|
var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
|
|
25082
25116
|
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
|
@@ -25268,7 +25302,7 @@ var DialogContentImpl = React32.forwardRef(
|
|
|
25268
25302
|
const contentRef = React32.useRef(null);
|
|
25269
25303
|
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
25270
25304
|
useFocusGuards();
|
|
25271
|
-
return /* @__PURE__ */
|
|
25305
|
+
return /* @__PURE__ */ jsxs7(Fragment7, { children: [
|
|
25272
25306
|
/* @__PURE__ */ jsx22(
|
|
25273
25307
|
FocusScope,
|
|
25274
25308
|
{
|
|
@@ -25292,7 +25326,7 @@ var DialogContentImpl = React32.forwardRef(
|
|
|
25292
25326
|
)
|
|
25293
25327
|
}
|
|
25294
25328
|
),
|
|
25295
|
-
/* @__PURE__ */
|
|
25329
|
+
/* @__PURE__ */ jsxs7(Fragment7, { children: [
|
|
25296
25330
|
/* @__PURE__ */ jsx22(TitleWarning, { titleId: context.titleId }),
|
|
25297
25331
|
/* @__PURE__ */ jsx22(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
|
|
25298
25332
|
] })
|
|
@@ -26571,7 +26605,7 @@ var cn2 = /* @__PURE__ */ wrapClsx(instance.mergeString, instance);
|
|
|
26571
26605
|
var twMerge2 = instance.merge;
|
|
26572
26606
|
|
|
26573
26607
|
// ../ui/src/components/dialog.tsx
|
|
26574
|
-
import { jsx as jsx23, jsxs as
|
|
26608
|
+
import { jsx as jsx23, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
26575
26609
|
function Dialog2({
|
|
26576
26610
|
...props
|
|
26577
26611
|
}) {
|
|
@@ -26583,6 +26617,9 @@ function DialogClose2({
|
|
|
26583
26617
|
return /* @__PURE__ */ jsx23(dist_exports7.Close, { "data-slot": "dialog-close", ...props });
|
|
26584
26618
|
}
|
|
26585
26619
|
|
|
26620
|
+
// ../ui/src/composites/dialog.tsx
|
|
26621
|
+
import { forwardRef as forwardRef17 } from "react";
|
|
26622
|
+
|
|
26586
26623
|
// ../ui/src/lib/shadow-focus.ts
|
|
26587
26624
|
var TABBABLE = [
|
|
26588
26625
|
"a[href]",
|
|
@@ -26617,14 +26654,12 @@ function loopTabInShadowRoot(event) {
|
|
|
26617
26654
|
}
|
|
26618
26655
|
|
|
26619
26656
|
// ../ui/src/composites/dialog.tsx
|
|
26620
|
-
import { jsx as jsx24, jsxs as
|
|
26621
|
-
|
|
26622
|
-
className,
|
|
26623
|
-
...props
|
|
26624
|
-
}) {
|
|
26657
|
+
import { jsx as jsx24, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
26658
|
+
var DialogOverlay2 = forwardRef17(function DialogOverlay3({ className, ...props }, ref) {
|
|
26625
26659
|
return /* @__PURE__ */ jsx24(
|
|
26626
26660
|
dist_exports7.Overlay,
|
|
26627
26661
|
{
|
|
26662
|
+
ref,
|
|
26628
26663
|
"data-slot": "dialog-overlay",
|
|
26629
26664
|
className: cn2(
|
|
26630
26665
|
"fixed inset-0 z-50 bg-black/45 backdrop-blur-sm duration-(--motion-duration-fast) data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
|
|
@@ -26633,7 +26668,7 @@ function DialogOverlay2({
|
|
|
26633
26668
|
...props
|
|
26634
26669
|
}
|
|
26635
26670
|
);
|
|
26636
|
-
}
|
|
26671
|
+
});
|
|
26637
26672
|
function DialogContent2({
|
|
26638
26673
|
className,
|
|
26639
26674
|
children,
|
|
@@ -26643,9 +26678,9 @@ function DialogContent2({
|
|
|
26643
26678
|
...props
|
|
26644
26679
|
}) {
|
|
26645
26680
|
const overlayRoot = useOverlayRoot();
|
|
26646
|
-
return /* @__PURE__ */
|
|
26681
|
+
return /* @__PURE__ */ jsxs9(dist_exports7.Portal, { "data-slot": "dialog-portal", container: overlayRoot, children: [
|
|
26647
26682
|
/* @__PURE__ */ jsx24(DialogOverlay2, { className: overlayClassName }),
|
|
26648
|
-
/* @__PURE__ */
|
|
26683
|
+
/* @__PURE__ */ jsxs9(
|
|
26649
26684
|
dist_exports7.Content,
|
|
26650
26685
|
{
|
|
26651
26686
|
onKeyDown: (event) => {
|
|
@@ -26660,7 +26695,7 @@ function DialogContent2({
|
|
|
26660
26695
|
...props,
|
|
26661
26696
|
children: [
|
|
26662
26697
|
children,
|
|
26663
|
-
showCloseButton && /* @__PURE__ */
|
|
26698
|
+
showCloseButton && /* @__PURE__ */ jsxs9(
|
|
26664
26699
|
dist_exports7.Close,
|
|
26665
26700
|
{
|
|
26666
26701
|
"data-slot": "dialog-close",
|
|
@@ -26686,6 +26721,19 @@ function DialogTitle2({ className, ...props }) {
|
|
|
26686
26721
|
}
|
|
26687
26722
|
);
|
|
26688
26723
|
}
|
|
26724
|
+
function DialogDescription2({
|
|
26725
|
+
className,
|
|
26726
|
+
...props
|
|
26727
|
+
}) {
|
|
26728
|
+
return /* @__PURE__ */ jsx24(
|
|
26729
|
+
dist_exports7.Description,
|
|
26730
|
+
{
|
|
26731
|
+
"data-slot": "dialog-description",
|
|
26732
|
+
className: cn2("text-sm text-[hsl(var(--muted-foreground))]", className),
|
|
26733
|
+
...props
|
|
26734
|
+
}
|
|
26735
|
+
);
|
|
26736
|
+
}
|
|
26689
26737
|
|
|
26690
26738
|
// src/chat/chat-theme.tsx
|
|
26691
26739
|
var NEUTRAL = {
|
|
@@ -26750,7 +26798,7 @@ export {
|
|
|
26750
26798
|
CircleAlert,
|
|
26751
26799
|
CircleCheck,
|
|
26752
26800
|
CirclePause,
|
|
26753
|
-
|
|
26801
|
+
CircleSlash,
|
|
26754
26802
|
Copy,
|
|
26755
26803
|
Download,
|
|
26756
26804
|
Earth,
|
|
@@ -26803,32 +26851,12 @@ export {
|
|
|
26803
26851
|
Terminal,
|
|
26804
26852
|
Trash2,
|
|
26805
26853
|
TriangleAlert,
|
|
26806
|
-
|
|
26854
|
+
Unplug,
|
|
26807
26855
|
Wrench,
|
|
26808
26856
|
X,
|
|
26857
|
+
Zap,
|
|
26809
26858
|
cn,
|
|
26810
26859
|
copyToClipboard,
|
|
26811
|
-
ChatEnvironmentProvider,
|
|
26812
|
-
useChatEnvironment,
|
|
26813
|
-
useHighlightedCode,
|
|
26814
|
-
useChatSessionDetail,
|
|
26815
|
-
useHideTodo,
|
|
26816
|
-
useChatRenderMode,
|
|
26817
|
-
notifyChat,
|
|
26818
|
-
useComposerBridge,
|
|
26819
|
-
useChatVirtualizer,
|
|
26820
|
-
getResultText,
|
|
26821
|
-
getResultImages,
|
|
26822
|
-
parseJsonValue,
|
|
26823
|
-
isPlainObject,
|
|
26824
|
-
getStringValue,
|
|
26825
|
-
getNumberValue,
|
|
26826
|
-
getBooleanValue,
|
|
26827
|
-
extractErrorMessage,
|
|
26828
|
-
getFileName,
|
|
26829
|
-
formatBytes,
|
|
26830
|
-
CodePreview,
|
|
26831
|
-
parseKbSearchResult,
|
|
26832
26860
|
getToolDescription,
|
|
26833
26861
|
formatToolFileName,
|
|
26834
26862
|
formatToolName,
|
|
@@ -26852,6 +26880,21 @@ export {
|
|
|
26852
26880
|
usePlanRevealRevision,
|
|
26853
26881
|
CurrentChatSessionProvider,
|
|
26854
26882
|
useCurrentChatSessionId,
|
|
26883
|
+
ChatEnvironmentProvider,
|
|
26884
|
+
useChatEnvironment,
|
|
26885
|
+
useHighlightedCode,
|
|
26886
|
+
useChatSessionDetail,
|
|
26887
|
+
useHideTodo,
|
|
26888
|
+
useChatRenderMode,
|
|
26889
|
+
notifyChat,
|
|
26890
|
+
useComposerBridge,
|
|
26891
|
+
useChatVirtualizer,
|
|
26892
|
+
getInputHistoryGeneration,
|
|
26893
|
+
onInputCachesReset,
|
|
26894
|
+
pluginRefsForSend,
|
|
26895
|
+
getPluginSuggestionItems,
|
|
26896
|
+
queueShortcutLabel,
|
|
26897
|
+
isQueueShortcut,
|
|
26855
26898
|
sendToSession,
|
|
26856
26899
|
useControllableState,
|
|
26857
26900
|
dist_exports6 as dist_exports,
|
|
@@ -26862,6 +26905,7 @@ export {
|
|
|
26862
26905
|
Portal3 as Portal,
|
|
26863
26906
|
Content22 as Content2,
|
|
26864
26907
|
dist_exports4 as dist_exports3,
|
|
26908
|
+
BrowserConnectionDialog,
|
|
26865
26909
|
useOverlayRoot,
|
|
26866
26910
|
usePortalContainer,
|
|
26867
26911
|
cn2,
|
|
@@ -26869,6 +26913,7 @@ export {
|
|
|
26869
26913
|
DialogClose2 as DialogClose,
|
|
26870
26914
|
DialogContent2 as DialogContent,
|
|
26871
26915
|
DialogTitle2 as DialogTitle,
|
|
26916
|
+
DialogDescription2 as DialogDescription,
|
|
26872
26917
|
chatTone,
|
|
26873
26918
|
useEffectEvent2 as useEffectEvent,
|
|
26874
26919
|
SessionPluginConfigForm,
|
|
@@ -26916,7 +26961,7 @@ lucide-react/dist/esm/icons/circle-alert.js:
|
|
|
26916
26961
|
lucide-react/dist/esm/icons/circle-check.js:
|
|
26917
26962
|
lucide-react/dist/esm/icons/circle-dot.js:
|
|
26918
26963
|
lucide-react/dist/esm/icons/circle-pause.js:
|
|
26919
|
-
lucide-react/dist/esm/icons/circle-
|
|
26964
|
+
lucide-react/dist/esm/icons/circle-slash.js:
|
|
26920
26965
|
lucide-react/dist/esm/icons/circle.js:
|
|
26921
26966
|
lucide-react/dist/esm/icons/copy.js:
|
|
26922
26967
|
lucide-react/dist/esm/icons/download.js:
|
|
@@ -26972,9 +27017,10 @@ lucide-react/dist/esm/icons/square.js:
|
|
|
26972
27017
|
lucide-react/dist/esm/icons/terminal.js:
|
|
26973
27018
|
lucide-react/dist/esm/icons/trash-2.js:
|
|
26974
27019
|
lucide-react/dist/esm/icons/triangle-alert.js:
|
|
26975
|
-
lucide-react/dist/esm/icons/
|
|
27020
|
+
lucide-react/dist/esm/icons/unplug.js:
|
|
26976
27021
|
lucide-react/dist/esm/icons/wrench.js:
|
|
26977
27022
|
lucide-react/dist/esm/icons/x.js:
|
|
27023
|
+
lucide-react/dist/esm/icons/zap.js:
|
|
26978
27024
|
lucide-react/dist/esm/lucide-react.js:
|
|
26979
27025
|
(**
|
|
26980
27026
|
* @license lucide-react v0.468.0 - ISC
|
|
@@ -26983,4 +27029,4 @@ lucide-react/dist/esm/lucide-react.js:
|
|
|
26983
27029
|
* See the LICENSE file in the root directory of this source tree.
|
|
26984
27030
|
*)
|
|
26985
27031
|
*/
|
|
26986
|
-
//# sourceMappingURL=chunk-
|
|
27032
|
+
//# sourceMappingURL=chunk-5S4H3CJD.js.map
|