@dxos/plugin-assistant 0.8.4-main.422d1c7879 → 0.8.4-main.4668b7de9b
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/LICENSE +102 -5
- package/PLUGIN.mdl +439 -0
- package/README.md +1 -1
- package/dist/lib/neutral/AgentArticle-OYQPCK3Q.mjs +161 -0
- package/dist/lib/neutral/AgentArticle-OYQPCK3Q.mjs.map +7 -0
- package/dist/lib/neutral/AgentProperties-W6LD56IB.mjs +40 -0
- package/dist/lib/neutral/AgentProperties-W6LD56IB.mjs.map +7 -0
- package/dist/lib/neutral/AssistantPlugin.mjs +10 -0
- package/dist/lib/neutral/AssistantPlugin.node.mjs +66 -0
- package/dist/lib/neutral/AssistantPlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/AssistantPlugin.workerd.mjs +40 -0
- package/dist/lib/neutral/AssistantPlugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/AssistantSettings-GG52BLKS.mjs +40 -0
- package/dist/lib/neutral/AssistantSettings-GG52BLKS.mjs.map +7 -0
- package/dist/lib/neutral/BlueprintArticle-ZBOZNZM7.mjs +27 -0
- package/dist/lib/neutral/BlueprintArticle-ZBOZNZM7.mjs.map +7 -0
- package/dist/lib/neutral/ChatArticle-PWD4OEFZ.mjs +8 -0
- package/dist/lib/neutral/ChatCompanion-TPY7HF3C.mjs +122 -0
- package/dist/lib/neutral/ChatCompanion-TPY7HF3C.mjs.map +7 -0
- package/dist/lib/neutral/ChatDialog-DCA6FLOV.mjs +73 -0
- package/dist/lib/neutral/ChatDialog-DCA6FLOV.mjs.map +7 -0
- package/dist/lib/neutral/PlanArticle-TS5ULWYS.mjs +28 -0
- package/dist/lib/neutral/PlanArticle-TS5ULWYS.mjs.map +7 -0
- package/dist/lib/neutral/RoutineArticle-5NYXHRG6.mjs +119 -0
- package/dist/lib/neutral/RoutineArticle-5NYXHRG6.mjs.map +7 -0
- package/dist/lib/neutral/RoutineList-SO5ETHNT.mjs +48 -0
- package/dist/lib/neutral/RoutineList-SO5ETHNT.mjs.map +7 -0
- package/dist/lib/neutral/RoutineProperties-FISLMW2R.mjs +17 -0
- package/dist/lib/neutral/RoutineProperties-FISLMW2R.mjs.map +7 -0
- package/dist/lib/neutral/TracePanel-CHJHFTTQ.mjs +136 -0
- package/dist/lib/neutral/TracePanel-CHJHFTTQ.mjs.map +7 -0
- package/dist/lib/neutral/TriggerStatus-X7Y5JFZJ.mjs +93 -0
- package/dist/lib/neutral/TriggerStatus-X7Y5JFZJ.mjs.map +7 -0
- package/dist/lib/neutral/ai-context-IABBIEHG.mjs +42 -0
- package/dist/lib/neutral/ai-context-IABBIEHG.mjs.map +7 -0
- package/dist/lib/neutral/ai-service-3SH2UQIR.mjs +42 -0
- package/dist/lib/neutral/ai-service-3SH2UQIR.mjs.map +7 -0
- package/dist/lib/neutral/app-graph-builder-RJW5O57E.mjs +199 -0
- package/dist/lib/neutral/app-graph-builder-RJW5O57E.mjs.map +7 -0
- package/dist/lib/neutral/blueprint-definition-VXJYQ5AE.mjs +32 -0
- package/dist/lib/neutral/blueprint-definition-VXJYQ5AE.mjs.map +7 -0
- package/dist/lib/{browser → neutral}/blueprints/index.mjs +1 -1
- package/dist/lib/neutral/capabilities/index.mjs +37 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-47OH7ZF6.mjs +8 -0
- package/dist/lib/neutral/chunk-47OH7ZF6.mjs.map +7 -0
- package/dist/lib/{browser/chunk-EZRS3J25.mjs → neutral/chunk-5H6UJHLF.mjs} +3 -3
- package/dist/lib/neutral/chunk-5H6UJHLF.mjs.map +7 -0
- package/dist/lib/neutral/chunk-6BUTAYVO.mjs +123 -0
- package/dist/lib/neutral/chunk-6BUTAYVO.mjs.map +7 -0
- package/dist/lib/neutral/chunk-A2XIILMZ.mjs +107 -0
- package/dist/lib/neutral/chunk-A2XIILMZ.mjs.map +7 -0
- package/dist/lib/neutral/chunk-UWI53RCD.mjs +386 -0
- package/dist/lib/neutral/chunk-UWI53RCD.mjs.map +7 -0
- package/dist/lib/neutral/chunk-XYHPOGTK.mjs +43 -0
- package/dist/lib/neutral/chunk-XYHPOGTK.mjs.map +7 -0
- package/dist/lib/neutral/companion-chat-provisioner-7RTSXL6M.mjs +116 -0
- package/dist/lib/neutral/companion-chat-provisioner-7RTSXL6M.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +2384 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +29 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/create-chat-67GZNG3T.mjs +54 -0
- package/dist/lib/neutral/create-chat-67GZNG3T.mjs.map +7 -0
- package/dist/lib/neutral/create-object-XPVVVEKF.mjs +89 -0
- package/dist/lib/neutral/create-object-XPVVVEKF.mjs.map +7 -0
- package/dist/lib/neutral/edge-model-resolver-7SMCGDRL.mjs +50 -0
- package/dist/lib/neutral/edge-model-resolver-7SMCGDRL.mjs.map +7 -0
- package/dist/lib/{browser/ensure-companion-chat-ZEZA34MZ.mjs → neutral/ensure-companion-chat-AMOF3C66.mjs} +14 -21
- package/dist/lib/neutral/ensure-companion-chat-AMOF3C66.mjs.map +7 -0
- package/dist/lib/neutral/execution-graph/index.mjs +658 -0
- package/dist/lib/neutral/execution-graph/index.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +965 -0
- package/dist/lib/neutral/hooks/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +32 -0
- package/dist/lib/neutral/local-model-resolver-I2BENFFS.mjs +24 -0
- package/dist/lib/neutral/local-model-resolver-I2BENFFS.mjs.map +7 -0
- package/dist/lib/neutral/markdown-KTBFOMFM.mjs +110 -0
- package/dist/lib/neutral/markdown-KTBFOMFM.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +12 -0
- package/dist/lib/neutral/migrations-7DEMVBOG.mjs +28 -0
- package/dist/lib/neutral/migrations-7DEMVBOG.mjs.map +7 -0
- package/dist/lib/{browser/on-create-space-54RNX5JI.mjs → neutral/on-create-space-Q2R7OSP6.mjs} +5 -8
- package/dist/lib/neutral/on-create-space-Q2R7OSP6.mjs.map +7 -0
- package/dist/lib/neutral/operation-handler-SF36MOB5.mjs +13 -0
- package/dist/lib/neutral/operation-handler-SF36MOB5.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +8 -0
- package/dist/lib/neutral/operations/index.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +16 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-XRTBW5OJ.mjs +174 -0
- package/dist/lib/neutral/react-surface-XRTBW5OJ.mjs.map +7 -0
- package/dist/lib/{browser/resolve-navigation-targets-NZOD66NY.mjs → neutral/resolve-navigation-targets-ZHIMMH7L.mjs} +6 -6
- package/dist/lib/neutral/resolve-navigation-targets-ZHIMMH7L.mjs.map +7 -0
- package/dist/lib/{browser/run-prompt-in-new-chat-THLK5YQC.mjs → neutral/run-prompt-in-new-chat-NRDYPCJK.mjs} +21 -55
- package/dist/lib/neutral/run-prompt-in-new-chat-NRDYPCJK.mjs.map +7 -0
- package/dist/lib/{browser/set-current-chat-LRS3VFSH.mjs → neutral/set-current-chat-VWBPSIMZ.mjs} +7 -13
- package/dist/lib/neutral/set-current-chat-VWBPSIMZ.mjs.map +7 -0
- package/dist/lib/neutral/settings-W4BLWQ53.mjs +28 -0
- package/dist/lib/neutral/settings-W4BLWQ53.mjs.map +7 -0
- package/dist/lib/neutral/state-H3G7QCU6.mjs +28 -0
- package/dist/lib/neutral/state-H3G7QCU6.mjs.map +7 -0
- package/dist/lib/neutral/testing.mjs +8 -0
- package/dist/lib/neutral/testing.mjs.map +7 -0
- package/dist/lib/neutral/toggle-trace-panel-debug-JGTB6KVJ.mjs +21 -0
- package/dist/lib/neutral/toggle-trace-panel-debug-JGTB6KVJ.mjs.map +7 -0
- package/dist/lib/neutral/toolkit-GVWXPDLJ.mjs +14 -0
- package/dist/lib/neutral/toolkit-GVWXPDLJ.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +175 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +20 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/lib/{browser/update-chat-name-3Y36KFAS.mjs → neutral/update-chat-name-ENXRUMDJ.mjs} +8 -25
- package/dist/lib/neutral/update-chat-name-ENXRUMDJ.mjs.map +7 -0
- package/dist/types/src/AssistantPlugin.d.ts +3 -1
- package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
- package/dist/types/src/AssistantPlugin.node.d.ts +5 -0
- package/dist/types/src/AssistantPlugin.node.d.ts.map +1 -0
- package/dist/types/src/AssistantPlugin.test.d.ts +2 -0
- package/dist/types/src/AssistantPlugin.test.d.ts.map +1 -0
- package/dist/types/src/AssistantPlugin.workerd.d.ts +4 -0
- package/dist/types/src/AssistantPlugin.workerd.d.ts.map +1 -0
- package/dist/types/src/blueprints/assistant/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/assistant/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/assistant/blueprint.node.test.d.ts +2 -0
- package/dist/types/src/blueprints/assistant/blueprint.node.test.d.ts.map +1 -0
- package/dist/types/src/capabilities/ai-context.d.ts +6 -0
- package/dist/types/src/capabilities/ai-context.d.ts.map +1 -0
- package/dist/types/src/capabilities/ai-service.d.ts +2 -2
- package/dist/types/src/capabilities/ai-service.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -1
- package/dist/types/src/capabilities/companion-chat-provisioner.d.ts.map +1 -1
- package/dist/types/src/capabilities/create-object.d.ts +31 -0
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
- package/dist/types/src/capabilities/edge-model-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +30 -2
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/local-model-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/markdown.d.ts.map +1 -1
- package/dist/types/src/capabilities/migrations.d.ts +2 -1
- package/dist/types/src/capabilities/migrations.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/capabilities/toolkit.d.ts.map +1 -1
- package/dist/types/src/components/AgentProperties/AgentProperties.d.ts +7 -0
- package/dist/types/src/components/AgentProperties/AgentProperties.d.ts.map +1 -0
- package/dist/types/src/{containers → components}/AgentProperties/AgentProperties.stories.d.ts +1 -2
- package/dist/types/src/components/AgentProperties/AgentProperties.stories.d.ts.map +1 -0
- package/dist/types/src/components/AgentProperties/index.d.ts +2 -0
- package/dist/types/src/components/AgentProperties/index.d.ts.map +1 -0
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts +1 -1
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +1 -1
- package/dist/types/src/components/AssistantSettings/AssistantSettings.stories.d.ts.map +1 -1
- package/dist/types/src/components/Chat/Chat.d.ts +36 -40
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/src/components/Chat/context.d.ts +29 -0
- package/dist/types/src/components/Chat/context.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatMcpErrors.d.ts +12 -0
- package/dist/types/src/components/ChatPrompt/ChatMcpErrors.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts +8 -7
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatOptions.stories.d.ts +1 -1
- package/dist/types/src/components/ChatPrompt/ChatOptions.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatPresets.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatPrompt.d.ts +28 -0
- package/dist/types/src/components/ChatPrompt/ChatPrompt.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts +2 -2
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatStatus.d.ts +20 -0
- package/dist/types/src/components/ChatPrompt/ChatStatus.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/index.d.ts +3 -0
- package/dist/types/src/components/ChatPrompt/index.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/Anchor.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.d.ts +6 -3
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +5 -5
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/Link.d.ts +2 -2
- package/dist/types/src/components/ChatThread/Link.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/MarkdownStream.stories.d.ts +1 -1
- package/dist/types/src/components/ChatThread/MarkdownStream.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/registry.d.ts +18 -0
- package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/sync.d.ts +3 -3
- package/dist/types/src/components/ChatThread/sync.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/tool-widget-state.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/FallbackWidget.d.ts +4 -4
- package/dist/types/src/components/ChatThread/widgets/FallbackWidget.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/ReferenceWidget.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/SelectWidget.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/StatsWidget.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/StatusWidget.d.ts +2 -15
- package/dist/types/src/components/ChatThread/widgets/StatusWidget.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/SuggestionWidget.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/SummaryWidget.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/ToolWidget.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/ToolWidget.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/defaults.d.ts +5 -0
- package/dist/types/src/components/ChatThread/widgets/defaults.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/index.d.ts +1 -2
- package/dist/types/src/components/ChatThread/widgets/index.d.ts.map +1 -1
- package/dist/types/src/components/ProcessTree/ProcessTree.d.ts +4 -3
- package/dist/types/src/components/ProcessTree/ProcessTree.d.ts.map +1 -1
- package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts +0 -1
- package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts.map +1 -1
- package/dist/types/src/components/RoutineProperties/RoutineProperties.d.ts +7 -0
- package/dist/types/src/components/RoutineProperties/RoutineProperties.d.ts.map +1 -0
- package/dist/types/src/components/RoutineProperties/RoutineProperties.stories.d.ts +15 -0
- package/dist/types/src/components/RoutineProperties/RoutineProperties.stories.d.ts.map +1 -0
- package/dist/types/src/components/RoutineProperties/index.d.ts +2 -0
- package/dist/types/src/components/RoutineProperties/index.d.ts.map +1 -0
- package/dist/types/src/components/TaskList/TaskList.d.ts +10 -0
- package/dist/types/src/components/TaskList/TaskList.d.ts.map +1 -0
- package/dist/types/src/components/TaskList/TaskList.stories.d.ts +16 -0
- package/dist/types/src/components/TaskList/TaskList.stories.d.ts.map +1 -0
- package/dist/types/src/components/TaskList/index.d.ts +2 -0
- package/dist/types/src/components/TaskList/index.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +5 -3
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +4 -5
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/extensions/handlebars-extension.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/extensions/xml-extension.d.ts.map +1 -1
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts +4 -4
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.d.ts +3 -3
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +3 -0
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/AgentArticle/AgentArticle.d.ts.map +1 -1
- package/dist/types/src/containers/AgentArticle/AgentArticle.stories.d.ts +0 -2
- package/dist/types/src/containers/AgentArticle/AgentArticle.stories.d.ts.map +1 -1
- package/dist/types/src/containers/AgentProperties/AgentProperties.d.ts +1 -1
- package/dist/types/src/containers/AgentProperties/AgentProperties.d.ts.map +1 -1
- package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts +1 -1
- package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts.map +1 -1
- package/dist/types/src/containers/{ChatContainer/ChatContainer.d.ts → ChatArticle/ChatArticle.d.ts} +3 -3
- package/dist/types/src/containers/ChatArticle/ChatArticle.d.ts.map +1 -0
- package/dist/types/src/containers/ChatArticle/ChatArticle.stories.d.ts +15 -0
- package/dist/types/src/containers/ChatArticle/ChatArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ChatArticle/index.d.ts +2 -0
- package/dist/types/src/containers/ChatArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts +11 -3
- package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts.map +1 -1
- package/dist/types/src/containers/ChatDialog/ChatDialog.d.ts.map +1 -1
- package/dist/types/src/containers/PlanArticle/PlanArticle.d.ts +6 -0
- package/dist/types/src/containers/PlanArticle/PlanArticle.d.ts.map +1 -0
- package/dist/types/src/containers/PlanArticle/index.d.ts +2 -0
- package/dist/types/src/containers/PlanArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineArticle/RoutineArticle.d.ts +6 -0
- package/dist/types/src/containers/RoutineArticle/RoutineArticle.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineArticle/RoutineArticle.stories.d.ts +15 -0
- package/dist/types/src/containers/RoutineArticle/RoutineArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineArticle/index.d.ts +2 -0
- package/dist/types/src/containers/RoutineArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineList/RoutineList.d.ts +6 -0
- package/dist/types/src/containers/RoutineList/RoutineList.d.ts.map +1 -0
- package/dist/types/src/containers/{PromptList/PromptList.stories.d.ts → RoutineList/RoutineList.stories.d.ts} +1 -1
- package/dist/types/src/containers/RoutineList/RoutineList.stories.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineList/index.d.ts +2 -0
- package/dist/types/src/containers/RoutineList/index.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/TracePanel.d.ts +3 -2
- package/dist/types/src/containers/TracePanel/TracePanel.d.ts.map +1 -1
- package/dist/types/src/containers/TracePanel/TracePanel.stories.d.ts +3 -4
- package/dist/types/src/containers/TracePanel/TracePanel.stories.d.ts.map +1 -1
- package/dist/types/src/containers/TracePanel/dxn-extractor.d.ts +5 -5
- package/dist/types/src/containers/TracePanel/dxn-extractor.d.ts.map +1 -1
- package/dist/types/src/containers/TracePanel/index.d.ts.map +1 -1
- package/dist/types/src/containers/TracePanel/testing/index.d.ts +3 -0
- package/dist/types/src/containers/TracePanel/testing/index.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/testing/simulated-agent.d.ts +14 -0
- package/dist/types/src/containers/TracePanel/testing/simulated-agent.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/testing/snapshot-playback.d.ts +12 -0
- package/dist/types/src/containers/TracePanel/testing/snapshot-playback.d.ts.map +1 -0
- package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts.map +1 -1
- package/dist/types/src/containers/index.d.ts +6 -5
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/execution-graph/execution-graph.d.ts +108 -0
- package/dist/types/src/execution-graph/execution-graph.d.ts.map +1 -0
- package/dist/types/src/execution-graph/execution-graph.test.d.ts +2 -0
- package/dist/types/src/execution-graph/execution-graph.test.d.ts.map +1 -0
- package/dist/types/src/execution-graph/index.d.ts +3 -0
- package/dist/types/src/execution-graph/index.d.ts.map +1 -0
- package/dist/types/src/execution-graph/remote-snapshot.test.d.ts +2 -0
- package/dist/types/src/execution-graph/remote-snapshot.test.d.ts.map +1 -0
- package/dist/types/src/execution-graph/span-tree.d.ts +76 -0
- package/dist/types/src/execution-graph/span-tree.d.ts.map +1 -0
- package/dist/types/src/execution-graph/span-tree.test.d.ts +2 -0
- package/dist/types/src/execution-graph/span-tree.test.d.ts.map +1 -0
- package/dist/types/src/execution-graph/testing/collect-trace-events.d.ts +40 -0
- package/dist/types/src/execution-graph/testing/collect-trace-events.d.ts.map +1 -0
- package/dist/types/src/execution-graph/testing/index.d.ts +2 -0
- package/dist/types/src/execution-graph/testing/index.d.ts.map +1 -0
- package/dist/types/src/extensions/prompt-extension.d.ts.map +1 -1
- package/dist/types/src/feed-logger.d.ts +13 -0
- package/dist/types/src/feed-logger.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +2 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts +56 -15
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatKeymap.d.ts +12 -0
- package/dist/types/src/hooks/useChatKeymap.d.ts.map +1 -0
- package/dist/types/src/hooks/useChatProcessor.d.ts +5 -5
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts +7 -3
- package/dist/types/src/hooks/useChatServices.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatToolbarActions.d.ts.map +1 -1
- package/dist/types/src/hooks/useContextBinder.d.ts +2 -2
- package/dist/types/src/hooks/useContextBinder.d.ts.map +1 -1
- package/dist/types/src/hooks/useContextObjects.d.ts +5 -4
- package/dist/types/src/hooks/useContextObjects.d.ts.map +1 -1
- package/dist/types/src/hooks/useDebug.d.ts +10 -0
- package/dist/types/src/hooks/useDebug.d.ts.map +1 -0
- package/dist/types/src/hooks/useFilteredTypes.d.ts +1 -1
- package/dist/types/src/hooks/useFilteredTypes.d.ts.map +1 -1
- package/dist/types/src/hooks/useFlush.d.ts +1 -1
- package/dist/types/src/hooks/useFlush.d.ts.map +1 -1
- package/dist/types/src/hooks/usePresets.d.ts.map +1 -1
- package/dist/types/src/hooks/useReferencesProvider.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +0 -4
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +3 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/create-chat.d.ts +3 -3
- package/dist/types/src/operations/create-chat.d.ts.map +1 -1
- package/dist/types/src/operations/ensure-companion-chat.d.ts +3 -3
- package/dist/types/src/operations/ensure-companion-chat.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts +1 -2
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/operations/on-create-space.d.ts +3 -3
- package/dist/types/src/operations/on-create-space.d.ts.map +1 -1
- package/dist/types/src/operations/prompt.node.test.d.ts +2 -0
- package/dist/types/src/operations/prompt.node.test.d.ts.map +1 -0
- package/dist/types/src/operations/resolve-navigation-targets.d.ts +4 -2
- package/dist/types/src/operations/resolve-navigation-targets.d.ts.map +1 -1
- package/dist/types/src/operations/run-prompt-in-new-chat.d.ts +3 -3
- package/dist/types/src/operations/run-prompt-in-new-chat.d.ts.map +1 -1
- package/dist/types/src/operations/set-current-chat.d.ts +3 -3
- package/dist/types/src/operations/set-current-chat.d.ts.map +1 -1
- package/dist/types/src/operations/toggle-trace-panel-debug.d.ts +5 -0
- package/dist/types/src/operations/toggle-trace-panel-debug.d.ts.map +1 -0
- package/dist/types/src/operations/update-chat-name.d.ts +3 -3
- package/dist/types/src/operations/update-chat-name.d.ts.map +1 -1
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/processor/processor.d.ts +263 -20
- package/dist/types/src/processor/processor.d.ts.map +1 -1
- package/dist/types/src/processor/processor.node.test.d.ts +2 -0
- package/dist/types/src/processor/processor.node.test.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +2 -0
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/snapshot.d.ts +21 -0
- package/dist/types/src/testing/snapshot.d.ts.map +1 -0
- package/dist/types/src/testing/test-generator.d.ts +2 -3
- package/dist/types/src/testing/test-generator.d.ts.map +1 -1
- package/dist/types/src/testing/test-sequence.d.ts +10 -3
- package/dist/types/src/testing/test-sequence.d.ts.map +1 -1
- package/dist/types/src/testing/test-services.d.ts.map +1 -1
- package/dist/types/src/testing/test-trace.d.ts +5 -0
- package/dist/types/src/testing/test-trace.d.ts.map +1 -0
- package/dist/types/src/testing/trace-timeline.node.test.d.ts +2 -0
- package/dist/types/src/testing/trace-timeline.node.test.d.ts.map +1 -0
- package/dist/types/src/testing.d.ts +2 -0
- package/dist/types/src/testing.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Assistant.d.ts +25 -8
- package/dist/types/src/types/Assistant.d.ts.map +1 -1
- package/dist/types/src/types/AssistantCapabilities.d.ts +30 -0
- package/dist/types/src/types/AssistantCapabilities.d.ts.map +1 -0
- package/dist/types/src/types/AssistantEvents.d.ts +3 -0
- package/dist/types/src/types/AssistantEvents.d.ts.map +1 -0
- package/dist/types/src/{operations/definitions.d.ts → types/AssistantOperation.d.ts} +61 -59
- package/dist/types/src/types/AssistantOperation.d.ts.map +1 -0
- package/dist/types/src/types/Settings.d.ts +21 -5
- package/dist/types/src/types/Settings.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +7 -3
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/service.d.ts +2 -3
- package/dist/types/src/types/service.d.ts.map +1 -1
- package/dist/types/src/util/suggestions.d.ts +9 -0
- package/dist/types/src/util/suggestions.d.ts.map +1 -0
- package/dist/types/src/util/suggestions.test.d.ts +2 -0
- package/dist/types/src/util/suggestions.test.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +168 -128
- package/src/AssistantPlugin.conversations.json +1 -0
- package/src/AssistantPlugin.node.ts +77 -0
- package/src/AssistantPlugin.test.ts +152 -0
- package/src/AssistantPlugin.ts +147 -0
- package/src/AssistantPlugin.workerd.ts +41 -0
- package/src/blueprints/assistant/{blueprint.test.ts → blueprint.node.test.ts} +5 -5
- package/src/blueprints/assistant/blueprint.ts +4 -4
- package/src/capabilities/ai-context.ts +85 -0
- package/src/capabilities/ai-service.ts +36 -9
- package/src/capabilities/app-graph-builder.ts +55 -20
- package/src/capabilities/blueprint-definition.ts +2 -4
- package/src/capabilities/companion-chat-provisioner.ts +4 -5
- package/src/capabilities/create-object.ts +98 -0
- package/src/capabilities/edge-model-resolver.ts +47 -11
- package/src/capabilities/index.ts +10 -2
- package/src/capabilities/markdown.ts +1 -1
- package/src/capabilities/migrations.ts +4 -11
- package/src/capabilities/operation-handler.ts +1 -1
- package/src/capabilities/react-surface.tsx +33 -20
- package/src/components/AgentProperties/AgentProperties.stories.tsx +74 -0
- package/src/components/AgentProperties/AgentProperties.tsx +104 -0
- package/src/components/AgentProperties/index.ts +5 -0
- package/src/components/AssistantSettings/AssistantSettings.stories.tsx +3 -2
- package/src/components/AssistantSettings/AssistantSettings.tsx +22 -111
- package/src/components/Chat/Chat.tsx +85 -259
- package/src/components/Chat/context.ts +39 -0
- package/src/components/ChatPrompt/ChatActions.tsx +10 -10
- package/src/components/ChatPrompt/ChatMcpErrors.tsx +50 -0
- package/src/components/ChatPrompt/ChatOptions.stories.tsx +32 -18
- package/src/components/ChatPrompt/ChatOptions.tsx +103 -82
- package/src/components/ChatPrompt/ChatPrompt.tsx +182 -0
- package/src/components/ChatPrompt/ChatReferences.tsx +9 -13
- package/src/components/ChatPrompt/ChatStatus.tsx +123 -0
- package/src/components/ChatPrompt/ChatStatusIndicator.tsx +1 -1
- package/src/components/ChatPrompt/index.ts +3 -0
- package/src/components/ChatThread/Anchor.stories.tsx +7 -7
- package/src/components/ChatThread/ChatThread.stories.tsx +27 -31
- package/src/components/ChatThread/ChatThread.tsx +43 -21
- package/src/components/ChatThread/DEBUG.md +41 -0
- package/src/components/ChatThread/Link.tsx +5 -5
- package/src/components/ChatThread/MarkdownStream.stories.tsx +5 -4
- package/src/components/ChatThread/registry.tsx +62 -19
- package/src/components/ChatThread/sync.test.ts +84 -18
- package/src/components/ChatThread/sync.ts +3 -3
- package/src/components/ChatThread/widgets/ReasoningWidget.ts +13 -7
- package/src/components/ChatThread/widgets/ReferenceWidget.ts +3 -1
- package/src/components/ChatThread/widgets/SelectWidget.ts +4 -2
- package/src/components/ChatThread/widgets/StatsWidget.ts +3 -1
- package/src/components/ChatThread/widgets/StatusWidget.ts +6 -84
- package/src/components/ChatThread/widgets/SuggestionWidget.ts +2 -2
- package/src/components/ChatThread/widgets/SummaryWidget.tsx +3 -4
- package/src/components/ChatThread/widgets/ToolWidget.stories.tsx +2 -1
- package/src/components/ChatThread/widgets/ToolWidget.tsx +19 -4
- package/src/components/ChatThread/widgets/defaults.ts +8 -0
- package/src/components/ChatThread/widgets/index.ts +1 -2
- package/src/components/ProcessTree/ProcessTree.stories.tsx +13 -39
- package/src/components/ProcessTree/ProcessTree.tsx +101 -67
- package/src/components/RoutineProperties/RoutineProperties.stories.tsx +59 -0
- package/src/components/RoutineProperties/RoutineProperties.tsx +23 -0
- package/src/components/RoutineProperties/index.ts +5 -0
- package/src/components/TaskList/TaskList.stories.tsx +44 -0
- package/src/components/TaskList/TaskList.tsx +45 -0
- package/src/{cli → components/TaskList}/index.ts +1 -1
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +5 -4
- package/src/components/TemplateEditor/TemplateEditor.tsx +11 -9
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +6 -9
- package/src/components/TemplateEditor/TemplateForm.tsx +52 -73
- package/src/components/ToolBlock/ToolBlock.tsx +1 -1
- package/src/components/Toolbox/Toolbox.stories.tsx +6 -5
- package/src/components/Toolbox/Toolbox.tsx +6 -5
- package/src/components/index.ts +3 -0
- package/src/containers/AgentArticle/AgentArticle.stories.tsx +19 -15
- package/src/containers/AgentArticle/AgentArticle.tsx +37 -48
- package/src/containers/AgentProperties/AgentProperties.tsx +19 -103
- package/src/containers/BlueprintArticle/BlueprintArticle.tsx +2 -2
- package/src/containers/ChatArticle/ChatArticle.stories.tsx +76 -0
- package/src/containers/{ChatContainer/ChatContainer.tsx → ChatArticle/ChatArticle.tsx} +30 -17
- package/src/containers/ChatArticle/index.ts +5 -0
- package/src/containers/ChatCompanion/ChatCompanion.tsx +39 -60
- package/src/containers/ChatDialog/ChatDialog.tsx +6 -11
- package/src/containers/PlanArticle/PlanArticle.tsx +33 -0
- package/src/containers/PlanArticle/index.ts +5 -0
- package/src/containers/RoutineArticle/RoutineArticle.stories.tsx +75 -0
- package/src/containers/RoutineArticle/RoutineArticle.tsx +109 -0
- package/src/containers/RoutineArticle/index.ts +5 -0
- package/src/containers/{PromptList/PromptList.stories.tsx → RoutineList/RoutineList.stories.tsx} +13 -12
- package/src/containers/{PromptList/PromptList.tsx → RoutineList/RoutineList.tsx} +9 -8
- package/src/containers/RoutineList/index.ts +5 -0
- package/src/containers/TracePanel/TracePanel.stories.tsx +251 -204
- package/src/containers/TracePanel/TracePanel.tsx +172 -72
- package/src/containers/TracePanel/dxn-extractor.test.ts +7 -7
- package/src/containers/TracePanel/dxn-extractor.ts +25 -35
- package/src/containers/TracePanel/testing/index.ts +6 -0
- package/src/containers/TracePanel/testing/simulated-agent.ts +114 -0
- package/src/containers/TracePanel/testing/snapshot-playback.ts +45 -0
- package/src/containers/TriggerStatus/TriggerStatus.tsx +2 -1
- package/src/containers/index.ts +6 -5
- package/src/execution-graph/SPEC.md +678 -0
- package/src/execution-graph/execution-graph.test.ts +799 -0
- package/src/execution-graph/execution-graph.ts +714 -0
- package/src/execution-graph/index.ts +24 -0
- package/src/execution-graph/remote-snapshot.test.ts +116 -0
- package/src/execution-graph/span-tree.test.ts +249 -0
- package/src/execution-graph/span-tree.ts +259 -0
- package/src/execution-graph/testing/collect-trace-events.ts +74 -0
- package/src/execution-graph/testing/index.ts +5 -0
- package/src/{queue-logger.ts → feed-logger.ts} +39 -25
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useBlueprintRegistry.ts +62 -46
- package/src/hooks/useChatKeymap.ts +52 -0
- package/src/hooks/useChatProcessor.ts +30 -14
- package/src/hooks/useChatServices.ts +8 -6
- package/src/hooks/useChatToolbarActions.ts +87 -89
- package/src/hooks/useContextBinder.ts +4 -4
- package/src/hooks/useContextObjects.ts +6 -5
- package/src/hooks/useDebug.ts +38 -0
- package/src/hooks/useFilteredTypes.ts +17 -16
- package/src/hooks/useReferencesProvider.ts +7 -15
- package/src/index.ts +0 -5
- package/src/meta.ts +27 -8
- package/src/operations/create-chat.ts +14 -37
- package/src/operations/ensure-companion-chat.ts +49 -47
- package/src/operations/index.ts +2 -3
- package/src/operations/on-create-space.ts +4 -4
- package/src/operations/{prompt.test.ts → prompt.node.test.ts} +24 -23
- package/src/operations/resolve-navigation-targets.ts +8 -3
- package/src/operations/run-prompt-in-new-chat.ts +86 -86
- package/src/operations/set-current-chat.ts +6 -7
- package/src/operations/toggle-trace-panel-debug.ts +27 -0
- package/src/operations/update-chat-name.ts +4 -4
- package/src/plugin.ts +11 -0
- package/src/processor/{processor.test.ts → processor.node.test.ts} +6 -6
- package/src/processor/processor.ts +112 -33
- package/src/testing/data/trace-timeline-multiple.dx.json +1 -0
- package/src/testing/data/trace-timeline-remote.dx.json +1 -0
- package/src/testing/data/trace-timeline.dx.json +3737 -1200
- package/src/testing/index.ts +2 -0
- package/src/testing/snapshot.ts +35 -0
- package/src/testing/test-generator.test.ts +42 -52
- package/src/testing/test-generator.ts +177 -192
- package/src/testing/test-sequence.ts +3 -3
- package/src/testing/test-services.ts +1 -1
- package/src/testing/test-trace.ts +20 -0
- package/src/testing/trace-timeline.node.conversations.json +1 -0
- package/src/testing/{trace-timeline.test.ts → trace-timeline.node.test.ts} +44 -49
- package/src/testing.ts +9 -0
- package/src/translations.ts +34 -37
- package/src/types/Assistant.ts +13 -1
- package/src/types/AssistantCapabilities.ts +35 -0
- package/src/types/AssistantEvents.ts +11 -0
- package/src/{operations/definitions.ts → types/AssistantOperation.ts} +57 -20
- package/src/types/Settings.ts +68 -7
- package/src/types/index.ts +11 -3
- package/src/types/service.ts +5 -10
- package/src/util/suggestions.test.ts +52 -0
- package/src/util/suggestions.ts +42 -0
- package/src/vite-env.d.ts +5 -0
- package/dist/lib/browser/AssistantSettings-7QMO3LGF.mjs +0 -97
- package/dist/lib/browser/AssistantSettings-7QMO3LGF.mjs.map +0 -7
- package/dist/lib/browser/chunk-ATHYBVGN.mjs +0 -176
- package/dist/lib/browser/chunk-ATHYBVGN.mjs.map +0 -7
- package/dist/lib/browser/chunk-EZRS3J25.mjs.map +0 -7
- package/dist/lib/browser/chunk-LMVTXH54.mjs +0 -154
- package/dist/lib/browser/chunk-LMVTXH54.mjs.map +0 -7
- package/dist/lib/browser/cli/index.mjs +0 -74
- package/dist/lib/browser/cli/index.mjs.map +0 -7
- package/dist/lib/browser/create-chat-LBZHGVSN.mjs +0 -82
- package/dist/lib/browser/create-chat-LBZHGVSN.mjs.map +0 -7
- package/dist/lib/browser/ensure-companion-chat-ZEZA34MZ.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -3446
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/on-create-space-54RNX5JI.mjs.map +0 -7
- package/dist/lib/browser/operations/index.mjs +0 -13
- package/dist/lib/browser/operations/index.mjs.map +0 -7
- package/dist/lib/browser/resolve-navigation-targets-NZOD66NY.mjs.map +0 -7
- package/dist/lib/browser/run-prompt-in-new-chat-THLK5YQC.mjs.map +0 -7
- package/dist/lib/browser/set-current-chat-LRS3VFSH.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -20
- package/dist/lib/browser/update-chat-name-3Y36KFAS.mjs.map +0 -7
- package/dist/lib/node-esm/AssistantSettings-UVUTKO7E.mjs +0 -98
- package/dist/lib/node-esm/AssistantSettings-UVUTKO7E.mjs.map +0 -7
- package/dist/lib/node-esm/blueprints/index.mjs +0 -9
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
- package/dist/lib/node-esm/chunk-NZIKC7AN.mjs +0 -32
- package/dist/lib/node-esm/chunk-NZIKC7AN.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PXAJSTGZ.mjs +0 -177
- package/dist/lib/node-esm/chunk-PXAJSTGZ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-W3JZ2F4T.mjs +0 -155
- package/dist/lib/node-esm/chunk-W3JZ2F4T.mjs.map +0 -7
- package/dist/lib/node-esm/cli/index.mjs +0 -75
- package/dist/lib/node-esm/cli/index.mjs.map +0 -7
- package/dist/lib/node-esm/create-chat-3BEG4R6J.mjs +0 -83
- package/dist/lib/node-esm/create-chat-3BEG4R6J.mjs.map +0 -7
- package/dist/lib/node-esm/ensure-companion-chat-6K2WEWFP.mjs +0 -66
- package/dist/lib/node-esm/ensure-companion-chat-6K2WEWFP.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -3447
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/on-create-space-YRPZ6HZY.mjs +0 -23
- package/dist/lib/node-esm/on-create-space-YRPZ6HZY.mjs.map +0 -7
- package/dist/lib/node-esm/operations/index.mjs +0 -14
- package/dist/lib/node-esm/operations/index.mjs.map +0 -7
- package/dist/lib/node-esm/resolve-navigation-targets-3PPK7XLH.mjs +0 -23
- package/dist/lib/node-esm/resolve-navigation-targets-3PPK7XLH.mjs.map +0 -7
- package/dist/lib/node-esm/run-prompt-in-new-chat-OUYKCMQ7.mjs +0 -137
- package/dist/lib/node-esm/run-prompt-in-new-chat-OUYKCMQ7.mjs.map +0 -7
- package/dist/lib/node-esm/set-current-chat-SMXZJD3F.mjs +0 -55
- package/dist/lib/node-esm/set-current-chat-SMXZJD3F.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -21
- package/dist/lib/node-esm/update-chat-name-HM2P4NSI.mjs +0 -72
- package/dist/lib/node-esm/update-chat-name-HM2P4NSI.mjs.map +0 -7
- package/dist/types/src/blueprints/assistant/blueprint.test.d.ts +0 -2
- package/dist/types/src/blueprints/assistant/blueprint.test.d.ts.map +0 -1
- package/dist/types/src/cli/index.d.ts +0 -2
- package/dist/types/src/cli/index.d.ts.map +0 -1
- package/dist/types/src/cli/plugin.d.ts +0 -10
- package/dist/types/src/cli/plugin.d.ts.map +0 -1
- package/dist/types/src/components/ChatProgress/ChatProgress.d.ts +0 -10
- package/dist/types/src/components/ChatProgress/ChatProgress.d.ts.map +0 -1
- package/dist/types/src/components/ChatProgress/index.d.ts +0 -2
- package/dist/types/src/components/ChatProgress/index.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/widgets/PromptWidget.d.ts +0 -15
- package/dist/types/src/components/ChatThread/widgets/PromptWidget.d.ts.map +0 -1
- package/dist/types/src/containers/AgentProperties/AgentProperties.stories.d.ts.map +0 -1
- package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts.map +0 -1
- package/dist/types/src/containers/ChatContainer/index.d.ts +0 -2
- package/dist/types/src/containers/ChatContainer/index.d.ts.map +0 -1
- package/dist/types/src/containers/PromptArticle/PromptArticle.d.ts +0 -6
- package/dist/types/src/containers/PromptArticle/PromptArticle.d.ts.map +0 -1
- package/dist/types/src/containers/PromptArticle/index.d.ts +0 -2
- package/dist/types/src/containers/PromptArticle/index.d.ts.map +0 -1
- package/dist/types/src/containers/PromptList/PromptList.d.ts +0 -6
- package/dist/types/src/containers/PromptList/PromptList.d.ts.map +0 -1
- package/dist/types/src/containers/PromptList/PromptList.stories.d.ts.map +0 -1
- package/dist/types/src/containers/PromptList/index.d.ts +0 -2
- package/dist/types/src/containers/PromptList/index.d.ts.map +0 -1
- package/dist/types/src/containers/TracePanel/execution-graph.d.ts +0 -17
- package/dist/types/src/containers/TracePanel/execution-graph.d.ts.map +0 -1
- package/dist/types/src/operations/definitions.d.ts.map +0 -1
- package/dist/types/src/operations/prompt.test.d.ts +0 -2
- package/dist/types/src/operations/prompt.test.d.ts.map +0 -1
- package/dist/types/src/processor/processor.test.d.ts +0 -2
- package/dist/types/src/processor/processor.test.d.ts.map +0 -1
- package/dist/types/src/queue-logger.d.ts +0 -11
- package/dist/types/src/queue-logger.d.ts.map +0 -1
- package/dist/types/src/testing/trace-timeline.test.d.ts +0 -2
- package/dist/types/src/testing/trace-timeline.test.d.ts.map +0 -1
- package/dist/types/src/types/capabilities.d.ts +0 -32
- package/dist/types/src/types/capabilities.d.ts.map +0 -1
- package/dist/types/src/types/defs.d.ts +0 -2
- package/dist/types/src/types/defs.d.ts.map +0 -1
- package/dist/types/src/types/events.d.ts +0 -5
- package/dist/types/src/types/events.d.ts.map +0 -1
- package/src/AssistantPlugin.tsx +0 -238
- package/src/cli/plugin.ts +0 -84
- package/src/components/ChatProgress/ChatProgress.tsx +0 -56
- package/src/components/ChatProgress/index.ts +0 -5
- package/src/components/ChatThread/widgets/PromptWidget.ts +0 -30
- package/src/containers/AgentProperties/AgentProperties.stories.tsx +0 -100
- package/src/containers/ChatContainer/index.ts +0 -5
- package/src/containers/PromptArticle/PromptArticle.tsx +0 -59
- package/src/containers/PromptArticle/index.ts +0 -5
- package/src/containers/PromptList/index.ts +0 -5
- package/src/containers/TracePanel/execution-graph.ts +0 -452
- package/src/testing/trace-timeline.conversations.json +0 -1
- package/src/types/capabilities.ts +0 -35
- package/src/types/defs.ts +0 -5
- package/src/types/events.ts +0 -11
- /package/dist/lib/{browser/blueprints/index.mjs.map → neutral/AssistantPlugin.mjs.map} +0 -0
- /package/dist/lib/{browser/chunk-J5LGTIGS.mjs.map → neutral/ChatArticle-PWD4OEFZ.mjs.map} +0 -0
- /package/dist/lib/{browser/types → neutral/blueprints}/index.mjs.map +0 -0
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
- /package/dist/lib/{node-esm/blueprints/index.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/{node-esm/types → neutral}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/chunk-HSLMI22Q.mjs.map → neutral/meta.mjs.map} +0 -0
|
@@ -8,11 +8,11 @@ import { log } from '@dxos/log';
|
|
|
8
8
|
import { ContentBlock, type Message } from '@dxos/types';
|
|
9
9
|
import { type XmlWidgetRegistry, getXmlTextChild } from '@dxos/ui-editor';
|
|
10
10
|
|
|
11
|
+
import { type Assistant } from '../../types';
|
|
11
12
|
import { type BlockRenderer, type MessageThreadContext } from './sync';
|
|
12
13
|
import { applyToolBlockToWidgetState } from './tool-widget-state';
|
|
13
14
|
import {
|
|
14
15
|
FallbackWidget,
|
|
15
|
-
PromptWidget,
|
|
16
16
|
ReasoningWidget,
|
|
17
17
|
ReferenceWidget,
|
|
18
18
|
SelectWidget,
|
|
@@ -25,19 +25,28 @@ import {
|
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Custom XML tags registry.
|
|
28
|
+
*
|
|
29
|
+
* NOTE: `<prompt>` has no widget — it is rendered via mark + line decorations
|
|
30
|
+
* (`xmlBlockDecoration`) in MarkdownStream so the prompt text remains part of the document
|
|
31
|
+
* and can be highlighted by `xmlFormatting`. It is still listed here so the markdown block
|
|
32
|
+
* parser (`xmlBlockParsers`) knows to keep `<prompt>...</prompt>` as a single HTMLBlock
|
|
33
|
+
* — otherwise an unregistered prompt opens a Paragraph that lazy-continues into the
|
|
34
|
+
* following lines and breaks parsing of subsequent multi-line tags (e.g. a `<reasoning>`
|
|
35
|
+
* block whose content contains an ordered list).
|
|
28
36
|
*/
|
|
29
37
|
export const componentRegistry: XmlWidgetRegistry = {
|
|
30
38
|
//
|
|
31
|
-
//
|
|
39
|
+
// Block-only (no widget — see note above).
|
|
32
40
|
//
|
|
33
41
|
|
|
34
42
|
prompt: {
|
|
35
43
|
block: true,
|
|
36
|
-
factory: ({ children }) => {
|
|
37
|
-
const text = getXmlTextChild(children);
|
|
38
|
-
return text ? new PromptWidget(text) : null;
|
|
39
|
-
},
|
|
40
44
|
},
|
|
45
|
+
|
|
46
|
+
//
|
|
47
|
+
// DOM Widgets
|
|
48
|
+
//
|
|
49
|
+
|
|
41
50
|
synthetic: {
|
|
42
51
|
block: true,
|
|
43
52
|
factory: ({ children, range }) => {
|
|
@@ -89,9 +98,9 @@ export const componentRegistry: XmlWidgetRegistry = {
|
|
|
89
98
|
status: {
|
|
90
99
|
block: true,
|
|
91
100
|
streaming: true,
|
|
92
|
-
factory: ({ children
|
|
101
|
+
factory: ({ children }) => {
|
|
93
102
|
const text = getXmlTextChild(children);
|
|
94
|
-
return text ? new StatusWidget(text
|
|
103
|
+
return text ? new StatusWidget(text) : null;
|
|
95
104
|
},
|
|
96
105
|
},
|
|
97
106
|
|
|
@@ -106,7 +115,7 @@ export const componentRegistry: XmlWidgetRegistry = {
|
|
|
106
115
|
toolCall: {
|
|
107
116
|
block: true,
|
|
108
117
|
Component: (props) => (
|
|
109
|
-
<div
|
|
118
|
+
<div className='py-2'>
|
|
110
119
|
<ToolWidget {...props} />
|
|
111
120
|
</div>
|
|
112
121
|
),
|
|
@@ -133,17 +142,51 @@ export const componentRegistry: XmlWidgetRegistry = {
|
|
|
133
142
|
/**
|
|
134
143
|
* Convert block to markdown.
|
|
135
144
|
*/
|
|
136
|
-
export const blockToMarkdown: BlockRenderer = (
|
|
137
|
-
|
|
145
|
+
export const blockToMarkdown: BlockRenderer = createBlockRenderer('normal');
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Create a {@link BlockRenderer} that filters blocks based on the chat view type.
|
|
149
|
+
*
|
|
150
|
+
* - `summary`: only user prompts.
|
|
151
|
+
* - `normal`: user prompts + assistant text + tool calls + summary/select/suggestion/reference + status. Hides reasoning.
|
|
152
|
+
* - `thinking`: same as normal plus reasoning.
|
|
153
|
+
* - `debug`: renders every block (raw fallbacks visible).
|
|
154
|
+
*/
|
|
155
|
+
export function createBlockRenderer(viewType: Assistant.ChatView | undefined): BlockRenderer {
|
|
156
|
+
return (context, message, block) => {
|
|
157
|
+
if (!isBlockVisible(viewType, message, block)) {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
let str = blockToMarkdownImpl(context, message, block);
|
|
161
|
+
if (str && !block.pending) {
|
|
162
|
+
// Use a blank line as the block separator so each rendered block parses as its own
|
|
163
|
+
// markdown block. A single newline lets CommonMark absorb a following `<prompt>` (an
|
|
164
|
+
// HTML type-7 tag, which can't interrupt an open paragraph) into the previous
|
|
165
|
+
// paragraph, rendering the prompt bubble inline next to the prior assistant text.
|
|
166
|
+
return (str += '\n');
|
|
167
|
+
}
|
|
168
|
+
return str;
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
const isBlockVisible = (
|
|
173
|
+
viewType: Assistant.ChatView | undefined,
|
|
138
174
|
message: Message.Message,
|
|
139
175
|
block: ContentBlock.Any,
|
|
140
|
-
) => {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
176
|
+
): boolean => {
|
|
177
|
+
switch (viewType) {
|
|
178
|
+
case 'debug':
|
|
179
|
+
return true;
|
|
180
|
+
case 'normal':
|
|
181
|
+
return block._tag !== 'reasoning';
|
|
182
|
+
case 'summary':
|
|
183
|
+
// Show only conversational text (user prompts + assistant replies); hide reasoning,
|
|
184
|
+
// tool calls, status, stats, and synthetic system messages.
|
|
185
|
+
return block._tag === 'text' && (block as ContentBlock.Text).disposition !== 'synthetic';
|
|
186
|
+
case 'thinking':
|
|
187
|
+
default:
|
|
188
|
+
return true;
|
|
144
189
|
}
|
|
145
|
-
|
|
146
|
-
return str;
|
|
147
190
|
};
|
|
148
191
|
|
|
149
192
|
const blockToMarkdownImpl = (context: MessageThreadContext, message: Message.Message, block: ContentBlock.Any) => {
|
|
@@ -154,7 +197,7 @@ const blockToMarkdownImpl = (context: MessageThreadContext, message: Message.Mes
|
|
|
154
197
|
if (block.disposition === 'synthetic') {
|
|
155
198
|
return renderXMLBlock('synthetic', { content: block.text, pending: block.pending });
|
|
156
199
|
} else {
|
|
157
|
-
return
|
|
200
|
+
return `\n<prompt>${block.text}</prompt>`;
|
|
158
201
|
}
|
|
159
202
|
} else {
|
|
160
203
|
const text = block.text.trim();
|
|
@@ -169,7 +212,7 @@ const blockToMarkdownImpl = (context: MessageThreadContext, message: Message.Mes
|
|
|
169
212
|
if (block.pending) {
|
|
170
213
|
return;
|
|
171
214
|
}
|
|
172
|
-
const dxn = block.reference.
|
|
215
|
+
const dxn = block.reference.uri;
|
|
173
216
|
return `<reference ref="${dxn.toString()}">${context.getObjectLabel(dxn)}</reference>`;
|
|
174
217
|
}
|
|
175
218
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
// @vitest-environment jsdom
|
|
2
|
-
|
|
3
1
|
//
|
|
4
2
|
// Copyright 2025 DXOS.org
|
|
5
3
|
//
|
|
6
4
|
|
|
5
|
+
// @vitest-environment jsdom
|
|
6
|
+
|
|
7
7
|
import { EditorView } from '@codemirror/view';
|
|
8
8
|
import { describe, it } from '@effect/vitest';
|
|
9
9
|
import * as Effect from 'effect/Effect';
|
|
@@ -14,7 +14,7 @@ import { type ContentBlock, type Message } from '@dxos/types';
|
|
|
14
14
|
|
|
15
15
|
import { createMessage } from '#testing';
|
|
16
16
|
|
|
17
|
-
import {
|
|
17
|
+
import { createBlockRenderer } from './registry';
|
|
18
18
|
import { type BlockRenderer, MessageSyncer, type MessageThreadContext, type TextModel } from './sync';
|
|
19
19
|
|
|
20
20
|
class TestDocument implements TextModel {
|
|
@@ -48,7 +48,7 @@ describe('reducers', () => {
|
|
|
48
48
|
'basic sync',
|
|
49
49
|
Effect.fn(function* ({ expect }) {
|
|
50
50
|
const doc = new TestDocument();
|
|
51
|
-
const syncer = new MessageSyncer(doc,
|
|
51
|
+
const syncer = new MessageSyncer(doc, createBlockRenderer('thinking'));
|
|
52
52
|
|
|
53
53
|
const messages = [
|
|
54
54
|
createMessage('user', [{ _tag: 'text', text: 'Hello' }]),
|
|
@@ -56,13 +56,13 @@ describe('reducers', () => {
|
|
|
56
56
|
];
|
|
57
57
|
|
|
58
58
|
syncer.update(messages);
|
|
59
|
-
expect(doc.content).toEqual(
|
|
59
|
+
expect(doc.content).toEqual('\n<prompt>Hello</prompt>\nHi there!\n');
|
|
60
60
|
|
|
61
|
-
Obj.
|
|
61
|
+
Obj.update(messages[1], (obj) => {
|
|
62
62
|
obj.blocks.push({ _tag: 'text', text: 'How can I help?' });
|
|
63
63
|
});
|
|
64
64
|
syncer.update(messages);
|
|
65
|
-
expect(doc.content).toEqual(
|
|
65
|
+
expect(doc.content).toEqual('\n<prompt>Hello</prompt>\nHi there!\nHow can I help?\n');
|
|
66
66
|
}),
|
|
67
67
|
);
|
|
68
68
|
|
|
@@ -70,7 +70,7 @@ describe('reducers', () => {
|
|
|
70
70
|
'sync with partial updates',
|
|
71
71
|
Effect.fn(function* ({ expect }) {
|
|
72
72
|
const doc = new TestDocument();
|
|
73
|
-
const syncer = new MessageSyncer(doc,
|
|
73
|
+
const syncer = new MessageSyncer(doc, createBlockRenderer('thinking'));
|
|
74
74
|
|
|
75
75
|
const messages = [
|
|
76
76
|
createMessage('user', [{ _tag: 'text', text: 'Hello' }]),
|
|
@@ -78,22 +78,20 @@ describe('reducers', () => {
|
|
|
78
78
|
];
|
|
79
79
|
|
|
80
80
|
syncer.update(messages);
|
|
81
|
-
expect(doc.content).toEqual(
|
|
81
|
+
expect(doc.content).toEqual('\n<prompt>Hello</prompt>\nHi there!');
|
|
82
82
|
|
|
83
|
-
Obj.
|
|
83
|
+
Obj.update(messages[1], (obj) => {
|
|
84
84
|
const block = obj.blocks[0] as Mutable<ContentBlock.Text>;
|
|
85
85
|
block.text = 'Hi there! How are you?';
|
|
86
86
|
block.pending = false;
|
|
87
87
|
});
|
|
88
88
|
syncer.update(messages);
|
|
89
89
|
|
|
90
|
-
Obj.
|
|
90
|
+
Obj.update(messages[1], (obj) => {
|
|
91
91
|
obj.blocks.push({ _tag: 'text', text: 'How can I help?' });
|
|
92
92
|
});
|
|
93
93
|
syncer.update(messages);
|
|
94
|
-
expect(doc.content).toEqual(
|
|
95
|
-
['<prompt>Hello</prompt>', 'Hi there! How are you?', 'How can I help?', ''].join('\n'),
|
|
96
|
-
);
|
|
94
|
+
expect(doc.content).toEqual('\n<prompt>Hello</prompt>\nHi there! How are you?\nHow can I help?\n');
|
|
97
95
|
}),
|
|
98
96
|
);
|
|
99
97
|
|
|
@@ -105,10 +103,10 @@ describe('reducers', () => {
|
|
|
105
103
|
'streaming reasoning with list-marker transitions does not duplicate opening tag',
|
|
106
104
|
Effect.fn(function* ({ expect }) {
|
|
107
105
|
const doc = new TestDocument();
|
|
108
|
-
const syncer = new MessageSyncer(doc,
|
|
106
|
+
const syncer = new MessageSyncer(doc, createBlockRenderer('thinking'));
|
|
109
107
|
|
|
110
108
|
const setReasoning = (message: Message.Message, text: string, pending: boolean) => {
|
|
111
|
-
Obj.
|
|
109
|
+
Obj.update(message, (message) => {
|
|
112
110
|
const block = message.blocks[0] as Mutable<ContentBlock.Reasoning>;
|
|
113
111
|
block.reasoningText = text;
|
|
114
112
|
block.pending = pending;
|
|
@@ -143,6 +141,74 @@ describe('reducers', () => {
|
|
|
143
141
|
}),
|
|
144
142
|
);
|
|
145
143
|
|
|
144
|
+
// Regression: prompt "respond with your name inside an xml tag" produces a streamed
|
|
145
|
+
// reasoning block followed by a text block containing a non-registered XML tag
|
|
146
|
+
// (`<name>Claude</name>`). The text block must appear in the document AFTER the
|
|
147
|
+
// closed reasoning block — the bug symptom is the reasoning tag rendering with no
|
|
148
|
+
// follow-up response visible.
|
|
149
|
+
it.effect(
|
|
150
|
+
'reasoning block followed by text containing a non-registered xml tag',
|
|
151
|
+
Effect.fn(function* ({ expect }) {
|
|
152
|
+
const doc = new TestDocument();
|
|
153
|
+
const syncer = new MessageSyncer(doc, createBlockRenderer('thinking'));
|
|
154
|
+
|
|
155
|
+
const setReasoning = (message: Message.Message, text: string, pending: boolean) => {
|
|
156
|
+
Obj.update(message, (message) => {
|
|
157
|
+
const block = message.blocks[0] as Mutable<ContentBlock.Reasoning>;
|
|
158
|
+
block.reasoningText = text;
|
|
159
|
+
block.pending = pending;
|
|
160
|
+
});
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
const setText = (message: Message.Message, text: string, pending: boolean) => {
|
|
164
|
+
Obj.update(message, (message) => {
|
|
165
|
+
const block = message.blocks[1] as Mutable<ContentBlock.Text>;
|
|
166
|
+
block.text = text;
|
|
167
|
+
block.pending = pending;
|
|
168
|
+
});
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
// Tick 1: reasoning starts streaming.
|
|
172
|
+
const messages = [createMessage('assistant', [{ _tag: 'reasoning', reasoningText: 'Thinking', pending: true }])];
|
|
173
|
+
syncer.update(messages);
|
|
174
|
+
|
|
175
|
+
// Tick 2: reasoning grows.
|
|
176
|
+
setReasoning(messages[0], 'Thinking about the answer', true);
|
|
177
|
+
syncer.update(messages);
|
|
178
|
+
|
|
179
|
+
// Tick 3: reasoning closes.
|
|
180
|
+
setReasoning(messages[0], 'Thinking about the answer', false);
|
|
181
|
+
syncer.update(messages);
|
|
182
|
+
|
|
183
|
+
// Tick 4: text block appears, pending and empty (model has started emitting but text is still '').
|
|
184
|
+
Obj.update(messages[0], (message) => {
|
|
185
|
+
message.blocks.push({ _tag: 'text', text: '', pending: true });
|
|
186
|
+
});
|
|
187
|
+
syncer.update(messages);
|
|
188
|
+
|
|
189
|
+
// Tick 5: partial text — opening tag only.
|
|
190
|
+
setText(messages[0], '<name>', true);
|
|
191
|
+
syncer.update(messages);
|
|
192
|
+
|
|
193
|
+
// Tick 6: full text streamed.
|
|
194
|
+
setText(messages[0], '<name>Claude</name>', true);
|
|
195
|
+
syncer.update(messages);
|
|
196
|
+
|
|
197
|
+
// Tick 7: text finalised.
|
|
198
|
+
setText(messages[0], '<name>Claude</name>', false);
|
|
199
|
+
syncer.update(messages);
|
|
200
|
+
|
|
201
|
+
// Both the closed reasoning tag and the response text must be present.
|
|
202
|
+
expect(doc.content).toContain('<reasoning>Thinking about the answer</reasoning>');
|
|
203
|
+
expect(doc.content).toContain('<name>Claude</name>');
|
|
204
|
+
|
|
205
|
+
const openReasoning = (doc.content.match(/<reasoning>/g) ?? []).length;
|
|
206
|
+
const closeReasoning = (doc.content.match(/<\/reasoning>/g) ?? []).length;
|
|
207
|
+
expect(openReasoning).toBe(1);
|
|
208
|
+
expect(closeReasoning).toBe(1);
|
|
209
|
+
}),
|
|
210
|
+
);
|
|
211
|
+
|
|
146
212
|
// Direct test of `MessageSyncer`'s tolerance for non-monotonic renderer output —
|
|
147
213
|
// any renderer that produces a shorter string for the same streaming block (e.g., due
|
|
148
214
|
// to whitespace normalisation or future transforms) must not produce duplicate output.
|
|
@@ -170,12 +236,12 @@ describe('reducers', () => {
|
|
|
170
236
|
const messages = [createMessage('assistant', [{ _tag: 'reasoning', reasoningText: 'abc\n1.', pending: true }])];
|
|
171
237
|
|
|
172
238
|
syncer.update(messages);
|
|
173
|
-
Obj.
|
|
239
|
+
Obj.update(messages[0], (obj) => {
|
|
174
240
|
const block = obj.blocks[0] as Mutable<ContentBlock.Reasoning>;
|
|
175
241
|
block.reasoningText = 'abc\n1. ';
|
|
176
242
|
});
|
|
177
243
|
syncer.update(messages);
|
|
178
|
-
Obj.
|
|
244
|
+
Obj.update(messages[0], (obj) => {
|
|
179
245
|
const block = obj.blocks[0] as Mutable<ContentBlock.Reasoning>;
|
|
180
246
|
block.reasoningText = 'abc\n1. tail';
|
|
181
247
|
block.pending = false;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { type
|
|
6
|
-
import { type MarkdownStreamController } from '@dxos/react-ui-
|
|
5
|
+
import { type URI } from '@dxos/keys';
|
|
6
|
+
import { type MarkdownStreamController } from '@dxos/react-ui-markdown';
|
|
7
7
|
import { type ContentBlock, type Message } from '@dxos/types';
|
|
8
8
|
import { type StateDispatch, type XmlWidgetStateManager } from '@dxos/ui-editor';
|
|
9
9
|
|
|
@@ -40,7 +40,7 @@ export class MessageThreadContext implements Pick<MarkdownStreamController, 'upd
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
// TODO(burdon): Resolve name from hypergraph.
|
|
43
|
-
getObjectLabel(_id:
|
|
43
|
+
getObjectLabel(_id: URI.URI) {
|
|
44
44
|
return 'Object';
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -6,6 +6,8 @@ import { WidgetType } from '@codemirror/view';
|
|
|
6
6
|
|
|
7
7
|
import { Domino } from '@dxos/ui';
|
|
8
8
|
|
|
9
|
+
import { styles } from './defaults';
|
|
10
|
+
|
|
9
11
|
/**
|
|
10
12
|
* Props used to derive a stable key for a reasoning block across CodeMirror widget rebuilds.
|
|
11
13
|
* CodeMirror does not assign persistent IDs to widgets; streaming re-runs the factory each tick.
|
|
@@ -36,26 +38,30 @@ export class ReasoningWidget extends WidgetType {
|
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
override toDOM() {
|
|
39
|
-
|
|
40
|
-
.classNames(
|
|
41
|
+
return Domino.of('div')
|
|
42
|
+
.classNames(styles.padding)
|
|
41
43
|
.append(
|
|
42
44
|
Domino.of('div')
|
|
43
|
-
.classNames('relative overflow-hidden p-px
|
|
45
|
+
.classNames('relative overflow-hidden p-px', styles.border)
|
|
44
46
|
.attributes({ 'data-trail-container': '' })
|
|
45
47
|
.append(
|
|
46
48
|
Domino.of('div')
|
|
47
|
-
.classNames(
|
|
49
|
+
.classNames(
|
|
50
|
+
'relative z-10 bg-base-surface rounded-sm text-sm text-subdued py-1',
|
|
51
|
+
'grid grid-cols-[24px_1fr] gap-x-0.5 items-start',
|
|
52
|
+
)
|
|
48
53
|
.append(
|
|
49
54
|
Domino.of('div')
|
|
50
|
-
.classNames('
|
|
55
|
+
.classNames('flex h-5 w-full shrink-0 items-center justify-center self-start')
|
|
56
|
+
.append(Domino.svg('ph--brain--regular').classNames('shrink-0 size-4 opacity-70')),
|
|
57
|
+
Domino.of('div')
|
|
58
|
+
.classNames('px-2 max-h-[5lh] overflow-y-auto dx-scrollbar-thin min-w-0')
|
|
51
59
|
.text(this.text)
|
|
52
60
|
.attributes({ 'data-reasoning-text': '' }),
|
|
53
61
|
),
|
|
54
62
|
Domino.of('div').attributes({ 'data-id': this.#pos }),
|
|
55
63
|
),
|
|
56
64
|
).root;
|
|
57
|
-
|
|
58
|
-
return root;
|
|
59
65
|
}
|
|
60
66
|
|
|
61
67
|
override updateDOM(dom: HTMLElement) {
|
|
@@ -6,6 +6,8 @@ import { WidgetType } from '@codemirror/view';
|
|
|
6
6
|
|
|
7
7
|
import { Domino } from '@dxos/ui';
|
|
8
8
|
|
|
9
|
+
import { styles } from './defaults';
|
|
10
|
+
|
|
9
11
|
export class ReferenceWidget extends WidgetType {
|
|
10
12
|
constructor(
|
|
11
13
|
private text: string,
|
|
@@ -20,7 +22,7 @@ export class ReferenceWidget extends WidgetType {
|
|
|
20
22
|
|
|
21
23
|
override toDOM() {
|
|
22
24
|
return Domino.of('div')
|
|
23
|
-
.classNames(
|
|
25
|
+
.classNames(styles.padding)
|
|
24
26
|
.append(
|
|
25
27
|
Domino.of('dx-anchor' as any)
|
|
26
28
|
.classNames('dx-tag--anchor')
|
|
@@ -6,6 +6,8 @@ import { WidgetType } from '@codemirror/view';
|
|
|
6
6
|
|
|
7
7
|
import { Domino } from '@dxos/ui';
|
|
8
8
|
|
|
9
|
+
import { styles } from './defaults';
|
|
10
|
+
|
|
9
11
|
/**
|
|
10
12
|
* Simple prompt widget.
|
|
11
13
|
*/
|
|
@@ -24,12 +26,12 @@ export class SelectWidget extends WidgetType {
|
|
|
24
26
|
override toDOM() {
|
|
25
27
|
return Domino.of('div')
|
|
26
28
|
.attributes({ role: 'group' })
|
|
27
|
-
.classNames('flex flex-wrap
|
|
29
|
+
.classNames(styles.padding, 'flex flex-wrap gap-1')
|
|
28
30
|
.append(
|
|
29
31
|
...this.options.map((option) =>
|
|
30
32
|
Domino.of('button')
|
|
31
33
|
.classNames('dx-button inline-block max-w-[100cqi]')
|
|
32
|
-
.attributes({ 'data-action': 'submit', 'data-value': option, 'data-density': '
|
|
34
|
+
.attributes({ 'data-action': 'submit', 'data-value': option, 'data-density': 'md' })
|
|
33
35
|
.text(option),
|
|
34
36
|
),
|
|
35
37
|
).root;
|
|
@@ -6,6 +6,8 @@ import { WidgetType } from '@codemirror/view';
|
|
|
6
6
|
|
|
7
7
|
import { Domino } from '@dxos/ui';
|
|
8
8
|
|
|
9
|
+
import { styles } from './defaults';
|
|
10
|
+
|
|
9
11
|
/**
|
|
10
12
|
* Simple stats widget.
|
|
11
13
|
*/
|
|
@@ -19,7 +21,7 @@ export class StatsWidget extends WidgetType {
|
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
override toDOM() {
|
|
22
|
-
return Domino.of('div').classNames('
|
|
24
|
+
return Domino.of('div').classNames(styles.padding, 'text-sm text-placeholder').text(this.text).root;
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
override updateDOM(dom: HTMLElement) {
|
|
@@ -6,38 +6,23 @@ import { WidgetType } from '@codemirror/view';
|
|
|
6
6
|
|
|
7
7
|
import { Domino } from '@dxos/ui';
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
* Props used to derive a stable key for a reasoning block across CodeMirror widget rebuilds.
|
|
11
|
-
* CodeMirror does not assign persistent IDs to widgets; streaming re-runs the factory each tick.
|
|
12
|
-
*/
|
|
13
|
-
export type StatusWidgetBlockIdProps = {
|
|
14
|
-
id?: string;
|
|
15
|
-
range?: { from: number; to: number };
|
|
16
|
-
};
|
|
9
|
+
import { styles } from './defaults';
|
|
17
10
|
|
|
18
11
|
/**
|
|
19
|
-
* AI
|
|
12
|
+
* AI status widget.
|
|
20
13
|
*/
|
|
21
14
|
export class StatusWidget extends WidgetType {
|
|
22
|
-
readonly
|
|
23
|
-
/** The timer id last registered for this instance (may differ from the map if superseded). */
|
|
24
|
-
#ownedTimerId: ReturnType<typeof setTimeout> | null = null;
|
|
25
|
-
|
|
26
|
-
constructor(
|
|
27
|
-
private readonly text: string,
|
|
28
|
-
pos: string | number | undefined,
|
|
29
|
-
) {
|
|
15
|
+
constructor(private readonly text: string) {
|
|
30
16
|
super();
|
|
31
|
-
this.#pos = pos === undefined || pos === '' ? 'status' : String(pos);
|
|
32
17
|
}
|
|
33
18
|
|
|
34
19
|
override eq(other: this) {
|
|
35
|
-
return this.text === other.text
|
|
20
|
+
return this.text === other.text;
|
|
36
21
|
}
|
|
37
22
|
|
|
38
23
|
override toDOM() {
|
|
39
24
|
return Domino.of('div')
|
|
40
|
-
.classNames(
|
|
25
|
+
.classNames(styles.padding)
|
|
41
26
|
.append(
|
|
42
27
|
Domino.of('div')
|
|
43
28
|
.classNames('relative overflow-hidden rounded-sm')
|
|
@@ -47,7 +32,7 @@ export class StatusWidget extends WidgetType {
|
|
|
47
32
|
.append(
|
|
48
33
|
Domino.of('div')
|
|
49
34
|
.classNames('flex h-5 w-full shrink-0 items-center justify-center self-start')
|
|
50
|
-
.append(Domino.
|
|
35
|
+
.append(Domino.svg('ph--info--regular').classNames('shrink-0 size-4 opacity-70')),
|
|
51
36
|
Domino.of('div')
|
|
52
37
|
.classNames('relative min-w-0')
|
|
53
38
|
.append(
|
|
@@ -55,7 +40,6 @@ export class StatusWidget extends WidgetType {
|
|
|
55
40
|
.classNames('relative z-10 rounded-sm text-sm leading-5')
|
|
56
41
|
.attributes({ 'data-status-text': '' })
|
|
57
42
|
.text(this.text),
|
|
58
|
-
Domino.of('div').attributes({ 'data-id': this.#pos }),
|
|
59
43
|
),
|
|
60
44
|
),
|
|
61
45
|
),
|
|
@@ -63,69 +47,7 @@ export class StatusWidget extends WidgetType {
|
|
|
63
47
|
}
|
|
64
48
|
|
|
65
49
|
override updateDOM(dom: HTMLElement) {
|
|
66
|
-
// Update only the text leaf; `dom` may be wrapped in an outer shell, and the trail host is a
|
|
67
|
-
// sibling of the text node inside the wrapper — setting `textContent` on the wrong
|
|
68
|
-
// ancestor would remove `[data-id]`.
|
|
69
50
|
dom.querySelector<HTMLElement>('[data-status-text]')?.replaceChildren(this.text);
|
|
70
|
-
|
|
71
|
-
const trailHost = dom.querySelector<HTMLElement>('[data-id]');
|
|
72
|
-
if (trailHost?.childElementCount === 0) {
|
|
73
|
-
trailHost.append(...createTrailLayers());
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
this.#scheduleTrailRemoval(dom);
|
|
77
51
|
return true;
|
|
78
52
|
}
|
|
79
|
-
|
|
80
|
-
override destroy(_dom: HTMLElement) {
|
|
81
|
-
this.#clearOwnedTrailTimer();
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
#scheduleTrailRemoval(dom: HTMLElement) {
|
|
85
|
-
const previous = trailRemovalTimers.get(this.#pos);
|
|
86
|
-
if (previous !== undefined) {
|
|
87
|
-
clearTimeout(previous);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
const timerId = setTimeout(() => {
|
|
91
|
-
if (trailRemovalTimers.get(this.#pos) !== timerId) {
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
trailRemovalTimers.delete(this.#pos);
|
|
95
|
-
this.#ownedTimerId = null;
|
|
96
|
-
dom.querySelector<HTMLElement>('[data-id]')?.remove();
|
|
97
|
-
}, TRAIL_REMOVAL_DELAY_MS);
|
|
98
|
-
|
|
99
|
-
trailRemovalTimers.set(this.#pos, timerId);
|
|
100
|
-
this.#ownedTimerId = timerId;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
#clearOwnedTrailTimer() {
|
|
104
|
-
const active = trailRemovalTimers.get(this.#pos);
|
|
105
|
-
if (active !== undefined && active === this.#ownedTimerId) {
|
|
106
|
-
clearTimeout(active);
|
|
107
|
-
trailRemovalTimers.delete(this.#pos);
|
|
108
|
-
}
|
|
109
|
-
this.#ownedTimerId = null;
|
|
110
|
-
}
|
|
111
53
|
}
|
|
112
|
-
|
|
113
|
-
const trail = [
|
|
114
|
-
'absolute z-0 aspect-[2/1] w-16',
|
|
115
|
-
'bg-[radial-gradient(at_100%_50%,_theme(colors.green.700),_transparent_80%)]',
|
|
116
|
-
'[offset-anchor:100%_50%] [offset-path:border-box]',
|
|
117
|
-
];
|
|
118
|
-
|
|
119
|
-
/** Delay after the last content update before hiding the trail. */
|
|
120
|
-
const TRAIL_REMOVAL_DELAY_MS = 1_000;
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* One pending removal timer per logical block. Streaming creates a new widget instance each tick;
|
|
124
|
-
* `destroy` may run after the next instance has already scheduled, so we must not clear a newer timer.
|
|
125
|
-
*/
|
|
126
|
-
const trailRemovalTimers = new Map<string, ReturnType<typeof setTimeout>>();
|
|
127
|
-
|
|
128
|
-
const createTrailLayers = (): [HTMLElement, HTMLElement] => [
|
|
129
|
-
Domino.of('div').classNames(...trail, 'animate-trail').root,
|
|
130
|
-
Domino.of('div').classNames(...trail, 'animate-trail-offset').root,
|
|
131
|
-
];
|
|
@@ -19,14 +19,14 @@ export class SuggestionWidget extends WidgetType {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
override toDOM() {
|
|
22
|
-
// NOTE: Container must have `dx-size-container` to support cqi.
|
|
22
|
+
// NOTE: Container must have `dx-inline-size-container` (or `dx-size-container`) to support cqi.
|
|
23
23
|
return Domino.of('span')
|
|
24
24
|
.classNames(mx('inline-flex max-w-[calc(100cqi-8px)] my-1 pe-2 overflow-hidden'))
|
|
25
25
|
.append(
|
|
26
26
|
Domino.of('button')
|
|
27
27
|
.attributes({
|
|
28
28
|
'data-action': 'submit',
|
|
29
|
-
'data-density': '
|
|
29
|
+
'data-density': 'md',
|
|
30
30
|
'data-value': this.text,
|
|
31
31
|
})
|
|
32
32
|
.classNames(mx('dx-button gap-2 w-full overflow-hidden'))
|
|
@@ -11,17 +11,16 @@ import { type XmlWidgetProps } from '@dxos/ui-editor';
|
|
|
11
11
|
import { meta } from '#meta';
|
|
12
12
|
|
|
13
13
|
import { MessageThreadContext } from '../sync';
|
|
14
|
+
import { styles } from './defaults';
|
|
14
15
|
|
|
15
16
|
export const SummaryWidget = ({ children }: XmlWidgetProps<MessageThreadContext>) => {
|
|
16
17
|
const { t } = useTranslation(meta.id);
|
|
17
18
|
|
|
18
19
|
return (
|
|
19
|
-
<TogglePanel.Root classNames=
|
|
20
|
+
<TogglePanel.Root classNames={styles.border}>
|
|
20
21
|
<TogglePanel.Header classNames='text-sm bg-group-surface'>{t('summary.label')}</TogglePanel.Header>
|
|
21
22
|
<TogglePanel.Content>
|
|
22
|
-
<div
|
|
23
|
-
{children}
|
|
24
|
-
</div>
|
|
23
|
+
<div className='p-1 text-sm text-subdued'>{children}</div>
|
|
25
24
|
</TogglePanel.Content>
|
|
26
25
|
</TogglePanel.Root>
|
|
27
26
|
);
|
|
@@ -7,7 +7,8 @@ import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
|
7
7
|
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
8
8
|
import { type ContentBlock } from '@dxos/types';
|
|
9
9
|
|
|
10
|
-
import { translations } from '
|
|
10
|
+
import { translations } from '#translations';
|
|
11
|
+
|
|
11
12
|
import { ToolWidget, type ToolWidgetProps } from './ToolWidget';
|
|
12
13
|
|
|
13
14
|
const baseWidgetProps = {
|