@dxos/plugin-assistant 0.8.4-main.9735255 → 0.8.4-main.abd8ff62ef
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/dist/lib/browser/AssistantSettings-GG52BLKS.mjs +40 -0
- package/dist/lib/browser/AssistantSettings-GG52BLKS.mjs.map +7 -0
- package/dist/lib/browser/blueprints/index.mjs +27 -8
- package/dist/lib/browser/blueprints/index.mjs.map +4 -4
- package/dist/lib/browser/chunk-DVOOFAWU.mjs +175 -0
- package/dist/lib/browser/chunk-DVOOFAWU.mjs.map +7 -0
- package/dist/lib/browser/chunk-M55MBYG7.mjs +932 -0
- package/dist/lib/browser/chunk-M55MBYG7.mjs.map +7 -0
- package/dist/lib/browser/chunk-SEMCG4ZK.mjs +195 -0
- package/dist/lib/browser/chunk-SEMCG4ZK.mjs.map +7 -0
- package/dist/lib/browser/chunk-VK53MITK.mjs +2300 -0
- package/dist/lib/browser/chunk-VK53MITK.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +73 -0
- package/dist/lib/browser/cli/index.mjs.map +7 -0
- package/dist/lib/browser/components/index.mjs +20 -0
- package/dist/lib/browser/create-chat-E2ZLVTLP.mjs +73 -0
- package/dist/lib/browser/create-chat-E2ZLVTLP.mjs.map +7 -0
- package/dist/lib/browser/ensure-companion-chat-7GDMXSQW.mjs +65 -0
- package/dist/lib/browser/ensure-companion-chat-7GDMXSQW.mjs.map +7 -0
- package/dist/lib/browser/hooks/index.mjs +39 -0
- package/dist/lib/browser/index.mjs +37 -309
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/on-create-space-4J3KTNAJ.mjs +22 -0
- package/dist/lib/browser/on-create-space-4J3KTNAJ.mjs.map +7 -0
- package/dist/lib/browser/operations/index.mjs +13 -0
- package/dist/lib/browser/operations/index.mjs.map +7 -0
- package/dist/lib/browser/resolve-navigation-targets-3ZPQE6SZ.mjs +22 -0
- package/dist/lib/browser/resolve-navigation-targets-3ZPQE6SZ.mjs.map +7 -0
- package/dist/lib/browser/run-prompt-in-new-chat-AA3KPBDN.mjs +106 -0
- package/dist/lib/browser/run-prompt-in-new-chat-AA3KPBDN.mjs.map +7 -0
- package/dist/lib/browser/set-current-chat-P4VHI3YF.mjs +54 -0
- package/dist/lib/browser/set-current-chat-P4VHI3YF.mjs.map +7 -0
- package/dist/lib/browser/translations.mjs +172 -0
- package/dist/lib/browser/translations.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +1 -6
- package/dist/lib/browser/update-chat-name-VWKNUON7.mjs +56 -0
- package/dist/lib/browser/update-chat-name-VWKNUON7.mjs.map +7 -0
- package/dist/lib/node-esm/AssistantSettings-23A5IMHS.mjs +41 -0
- package/dist/lib/node-esm/AssistantSettings-23A5IMHS.mjs.map +7 -0
- package/dist/lib/node-esm/blueprints/index.mjs +27 -8
- package/dist/lib/node-esm/blueprints/index.mjs.map +4 -4
- package/dist/lib/node-esm/chunk-FWC3ZGPH.mjs +933 -0
- package/dist/lib/node-esm/chunk-FWC3ZGPH.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-JKEB3NFZ.mjs +2302 -0
- package/dist/lib/node-esm/chunk-JKEB3NFZ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-MBDVPB4V.mjs +176 -0
- package/dist/lib/node-esm/chunk-MBDVPB4V.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-XAFVSEUJ.mjs +196 -0
- package/dist/lib/node-esm/chunk-XAFVSEUJ.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +74 -0
- package/dist/lib/node-esm/cli/index.mjs.map +7 -0
- package/dist/lib/node-esm/components/index.mjs +21 -0
- package/dist/lib/node-esm/components/index.mjs.map +7 -0
- package/dist/lib/node-esm/create-chat-UQQ3542N.mjs +74 -0
- package/dist/lib/node-esm/create-chat-UQQ3542N.mjs.map +7 -0
- package/dist/lib/node-esm/ensure-companion-chat-LVCPD4DJ.mjs +66 -0
- package/dist/lib/node-esm/ensure-companion-chat-LVCPD4DJ.mjs.map +7 -0
- package/dist/lib/node-esm/hooks/index.mjs +40 -0
- package/dist/lib/node-esm/hooks/index.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +37 -309
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/on-create-space-M63UBTTT.mjs +23 -0
- package/dist/lib/node-esm/on-create-space-M63UBTTT.mjs.map +7 -0
- package/dist/lib/node-esm/operations/index.mjs +14 -0
- package/dist/lib/node-esm/operations/index.mjs.map +7 -0
- package/dist/lib/node-esm/resolve-navigation-targets-HO77CAFT.mjs +23 -0
- package/dist/lib/node-esm/resolve-navigation-targets-HO77CAFT.mjs.map +7 -0
- package/dist/lib/node-esm/run-prompt-in-new-chat-RIRYYYPK.mjs +107 -0
- package/dist/lib/node-esm/run-prompt-in-new-chat-RIRYYYPK.mjs.map +7 -0
- package/dist/lib/node-esm/set-current-chat-Z7GJ52VX.mjs +55 -0
- package/dist/lib/node-esm/set-current-chat-Z7GJ52VX.mjs.map +7 -0
- package/dist/lib/node-esm/translations.mjs +173 -0
- package/dist/lib/node-esm/translations.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +1 -6
- package/dist/lib/node-esm/update-chat-name-GV4HX32Z.mjs +57 -0
- package/dist/lib/node-esm/update-chat-name-GV4HX32Z.mjs.map +7 -0
- package/dist/types/src/AssistantPlugin.d.ts +1 -0
- package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
- package/dist/types/src/AssistantPlugin.node.d.ts +4 -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/blueprints/assistant/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/assistant/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/assistant/blueprint.test.d.ts +2 -0
- package/dist/types/src/blueprints/assistant/blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/assistant/index.d.ts +2 -0
- package/dist/types/src/blueprints/assistant/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/index.d.ts +1 -6
- package/dist/types/src/blueprints/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/ai-service.d.ts +6 -0
- package/dist/types/src/capabilities/ai-service.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts +5 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/companion-chat-provisioner.d.ts +9 -0
- package/dist/types/src/capabilities/companion-chat-provisioner.d.ts.map +1 -0
- package/dist/types/src/capabilities/edge-model-resolver.d.ts +7 -0
- package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +29 -11
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/local-model-resolver.d.ts +16 -0
- package/dist/types/src/capabilities/local-model-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/markdown.d.ts +5 -0
- package/dist/types/src/capabilities/markdown.d.ts.map +1 -0
- package/dist/types/src/capabilities/migrations.d.ts +5 -0
- package/dist/types/src/capabilities/migrations.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings.d.ts +6 -0
- package/dist/types/src/capabilities/settings.d.ts.map +1 -0
- package/dist/types/src/capabilities/state.d.ts +21 -0
- package/dist/types/src/capabilities/state.d.ts.map +1 -0
- package/dist/types/src/capabilities/toolkit.d.ts +6 -0
- package/dist/types/src/capabilities/toolkit.d.ts.map +1 -0
- package/dist/types/src/cli/index.d.ts +2 -0
- package/dist/types/src/cli/index.d.ts.map +1 -0
- package/dist/types/src/cli/plugin.d.ts +10 -0
- package/dist/types/src/cli/plugin.d.ts.map +1 -0
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts +4 -6
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +1 -1
- package/dist/types/src/components/AssistantSettings/AssistantSettings.stories.d.ts +15 -0
- package/dist/types/src/components/AssistantSettings/AssistantSettings.stories.d.ts.map +1 -0
- package/dist/types/src/components/AssistantSettings/index.d.ts +1 -1
- package/dist/types/src/components/AssistantSettings/index.d.ts.map +1 -1
- package/dist/types/src/components/Chat/Chat.d.ts +36 -42
- 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 +2 -1
- 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 +6 -2
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatOptions.stories.d.ts +19 -0
- package/dist/types/src/components/ChatPrompt/ChatOptions.stories.d.ts.map +1 -0
- 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.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 +14 -0
- package/dist/types/src/components/ChatThread/Anchor.stories.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/ChatThread.d.ts +7 -4
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +8 -313
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/Link.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/MarkdownStream.stories.d.ts +42 -0
- package/dist/types/src/components/ChatThread/MarkdownStream.stories.d.ts.map +1 -0
- 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 +44 -17
- package/dist/types/src/components/ChatThread/sync.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/tool-widget-state.d.ts +18 -0
- package/dist/types/src/components/ChatThread/tool-widget-state.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/tool-widget-state.test.d.ts +2 -0
- package/dist/types/src/components/ChatThread/tool-widget-state.test.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/FallbackWidget.d.ts +8 -0
- package/dist/types/src/components/ChatThread/widgets/FallbackWidget.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.d.ts +25 -0
- package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.stories.d.ts +18 -0
- package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.stories.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/ReferenceWidget.d.ts +9 -0
- package/dist/types/src/components/ChatThread/widgets/ReferenceWidget.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/SelectWidget.d.ts +14 -0
- package/dist/types/src/components/ChatThread/widgets/SelectWidget.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/StatsWidget.d.ts +12 -0
- package/dist/types/src/components/ChatThread/widgets/StatsWidget.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/StatusWidget.d.ts +25 -0
- package/dist/types/src/components/ChatThread/widgets/StatusWidget.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/SuggestionWidget.d.ts +11 -0
- package/dist/types/src/components/ChatThread/widgets/SuggestionWidget.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/SummaryWidget.d.ts +5 -0
- package/dist/types/src/components/ChatThread/widgets/SummaryWidget.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/ToolWidget.d.ts +9 -0
- package/dist/types/src/components/ChatThread/widgets/ToolWidget.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/ToolWidget.stories.d.ts +15 -0
- package/dist/types/src/components/ChatThread/widgets/ToolWidget.stories.d.ts.map +1 -0
- 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 +10 -0
- package/dist/types/src/components/ChatThread/widgets/index.d.ts.map +1 -0
- package/dist/types/src/components/ProcessTree/ProcessTree.d.ts +11 -0
- package/dist/types/src/components/ProcessTree/ProcessTree.d.ts.map +1 -0
- package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts +7 -0
- package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts.map +1 -0
- package/dist/types/src/components/ProcessTree/index.d.ts +2 -0
- package/dist/types/src/components/ProcessTree/index.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +6 -5
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +1 -305
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +3 -3
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +1 -305
- 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 -13
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.d.ts +11 -9
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +1 -305
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +3 -12
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/AgentArticle/AgentArticle.d.ts +6 -0
- package/dist/types/src/containers/AgentArticle/AgentArticle.d.ts.map +1 -0
- package/dist/types/src/containers/AgentArticle/AgentArticle.stories.d.ts +21 -0
- package/dist/types/src/containers/AgentArticle/AgentArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/AgentArticle/index.d.ts +2 -0
- package/dist/types/src/containers/AgentArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/AgentProperties/AgentProperties.d.ts +6 -0
- package/dist/types/src/containers/AgentProperties/AgentProperties.d.ts.map +1 -0
- package/dist/types/src/containers/AgentProperties/AgentProperties.stories.d.ts +16 -0
- package/dist/types/src/containers/AgentProperties/AgentProperties.stories.d.ts.map +1 -0
- package/dist/types/src/containers/AgentProperties/index.d.ts +2 -0
- package/dist/types/src/containers/AgentProperties/index.d.ts.map +1 -0
- package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts +6 -0
- package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts.map +1 -0
- package/dist/types/src/containers/BlueprintArticle/index.d.ts +2 -0
- package/dist/types/src/containers/BlueprintArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts +18 -0
- package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts.map +1 -0
- package/dist/types/src/containers/ChatCompanion/index.d.ts +2 -0
- package/dist/types/src/containers/ChatCompanion/index.d.ts.map +1 -0
- package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts +12 -0
- package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts.map +1 -0
- package/dist/types/src/containers/ChatContainer/index.d.ts +2 -0
- package/dist/types/src/containers/ChatContainer/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/ChatDialog}/ChatDialog.d.ts +2 -3
- package/dist/types/src/containers/ChatDialog/ChatDialog.d.ts.map +1 -0
- package/dist/types/src/containers/ChatDialog/index.d.ts +2 -0
- package/dist/types/src/containers/ChatDialog/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/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/RoutineList/RoutineList.stories.d.ts +21 -0
- 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 +8 -0
- package/dist/types/src/containers/TracePanel/TracePanel.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/TracePanel.stories.d.ts +13 -0
- package/dist/types/src/containers/TracePanel/TracePanel.stories.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/dxn-extractor.d.ts +19 -0
- package/dist/types/src/containers/TracePanel/dxn-extractor.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/dxn-extractor.test.d.ts +2 -0
- package/dist/types/src/containers/TracePanel/dxn-extractor.test.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/execution-graph.d.ts +97 -0
- package/dist/types/src/containers/TracePanel/execution-graph.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/execution-graph.test.d.ts +2 -0
- package/dist/types/src/containers/TracePanel/execution-graph.test.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/index.d.ts +4 -0
- package/dist/types/src/containers/TracePanel/index.d.ts.map +1 -0
- 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 +5 -0
- package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts.map +1 -0
- package/dist/types/src/containers/TriggerStatus/index.d.ts +2 -0
- package/dist/types/src/containers/TriggerStatus/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +12 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/extensions/index.d.ts +2 -0
- package/dist/types/src/extensions/index.d.ts.map +1 -0
- package/dist/types/src/extensions/prompt-extension.d.ts +10 -0
- package/dist/types/src/extensions/prompt-extension.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 +1 -1
- 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 +8 -7
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts +3 -6
- package/dist/types/src/hooks/useChatServices.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatToolbarActions.d.ts +2 -2
- package/dist/types/src/hooks/useChatToolbarActions.d.ts.map +1 -1
- package/dist/types/src/hooks/useContextBinder.d.ts +3 -2
- package/dist/types/src/hooks/useContextBinder.d.ts.map +1 -1
- 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 +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 +3 -5
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -0
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/create-chat.d.ts +5 -0
- package/dist/types/src/operations/create-chat.d.ts.map +1 -0
- package/dist/types/src/operations/definitions.d.ts +140 -0
- package/dist/types/src/operations/definitions.d.ts.map +1 -0
- package/dist/types/src/operations/ensure-companion-chat.d.ts +5 -0
- package/dist/types/src/operations/ensure-companion-chat.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +4 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/on-create-space.d.ts +5 -0
- package/dist/types/src/operations/on-create-space.d.ts.map +1 -0
- package/dist/types/src/operations/prompt.test.d.ts +2 -0
- package/dist/types/src/operations/prompt.test.d.ts.map +1 -0
- package/dist/types/src/operations/resolve-navigation-targets.d.ts +15 -0
- package/dist/types/src/operations/resolve-navigation-targets.d.ts.map +1 -0
- package/dist/types/src/operations/run-prompt-in-new-chat.d.ts +5 -0
- package/dist/types/src/operations/run-prompt-in-new-chat.d.ts.map +1 -0
- package/dist/types/src/operations/set-current-chat.d.ts +5 -0
- package/dist/types/src/operations/set-current-chat.d.ts.map +1 -0
- package/dist/types/src/operations/update-chat-name.d.ts +5 -0
- package/dist/types/src/operations/update-chat-name.d.ts.map +1 -0
- package/dist/types/src/processor/index.d.ts +0 -1
- package/dist/types/src/processor/index.d.ts.map +1 -1
- package/dist/types/src/processor/presets.d.ts +1 -1
- package/dist/types/src/processor/presets.d.ts.map +1 -1
- package/dist/types/src/processor/processor.d.ts +53 -30
- package/dist/types/src/processor/processor.d.ts.map +1 -1
- package/dist/types/src/queue-logger.d.ts.map +1 -1
- package/dist/types/src/testing/index.d.ts +1 -0
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/test-generator.d.ts.map +1 -1
- package/dist/types/src/testing/test-generator.test.d.ts +2 -0
- package/dist/types/src/testing/test-generator.test.d.ts.map +1 -0
- package/dist/types/src/testing/test-services.d.ts +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.test.d.ts +2 -0
- package/dist/types/src/testing/trace-timeline.test.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +2 -305
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Assistant.d.ts +33 -39
- package/dist/types/src/types/Assistant.d.ts.map +1 -1
- package/dist/types/src/types/Settings.d.ts +26 -0
- package/dist/types/src/types/Settings.d.ts.map +1 -0
- package/dist/types/src/types/capabilities.d.ts +12 -13
- package/dist/types/src/types/capabilities.d.ts.map +1 -1
- package/dist/types/src/types/events.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +1 -2
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/service.d.ts +1 -1
- package/dist/types/src/types/service.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +144 -102
- package/src/AssistantPlugin.node.ts +125 -0
- package/src/AssistantPlugin.test.ts +35 -0
- package/src/AssistantPlugin.tsx +161 -59
- package/src/blueprints/assistant/blueprint.test.ts +46 -0
- package/src/blueprints/assistant/blueprint.ts +31 -0
- package/src/blueprints/assistant/index.ts +5 -0
- package/src/blueprints/index.ts +1 -8
- package/src/capabilities/{ai-service/ai-service.ts → ai-service.ts} +4 -3
- package/src/capabilities/app-graph-builder.ts +161 -0
- package/src/capabilities/blueprint-definition.ts +56 -0
- package/src/capabilities/companion-chat-provisioner.ts +164 -0
- package/src/capabilities/{edge-model-resolver/edge-model-resolver.ts → edge-model-resolver.ts} +4 -3
- package/src/capabilities/index.ts +23 -11
- package/src/capabilities/{local-model-resolver/local-model-resolver.ts → local-model-resolver.ts} +17 -6
- package/src/capabilities/markdown.ts +40 -0
- package/src/capabilities/migrations.ts +28 -0
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +167 -0
- package/src/capabilities/{settings/settings.ts → settings.ts} +5 -4
- package/src/capabilities/{state/state.ts → state.ts} +11 -3
- package/src/capabilities/toolkit.ts +13 -0
- package/src/{components/Typewriter → cli}/index.ts +1 -1
- package/src/cli/plugin.ts +83 -0
- package/src/components/AssistantSettings/AssistantSettings.stories.tsx +35 -0
- package/src/components/AssistantSettings/AssistantSettings.tsx +30 -107
- package/src/components/AssistantSettings/index.ts +2 -2
- package/src/components/Chat/Chat.tsx +103 -264
- package/src/components/Chat/context.ts +39 -0
- package/src/components/ChatPrompt/ChatActions.tsx +33 -13
- package/src/components/ChatPrompt/ChatMcpErrors.tsx +50 -0
- package/src/components/ChatPrompt/ChatOptions.stories.tsx +136 -0
- package/src/components/ChatPrompt/ChatOptions.tsx +248 -42
- package/src/components/ChatPrompt/ChatPrompt.tsx +182 -0
- package/src/components/ChatPrompt/ChatReferences.tsx +18 -8
- package/src/components/ChatPrompt/ChatStatus.tsx +123 -0
- package/src/components/ChatPrompt/index.ts +3 -0
- package/src/components/ChatThread/Anchor.stories.tsx +95 -0
- package/src/components/ChatThread/ChatThread.stories.tsx +64 -71
- package/src/components/ChatThread/ChatThread.tsx +50 -24
- package/src/components/ChatThread/DEBUG.md +41 -0
- package/src/components/ChatThread/Link.tsx +1 -1
- package/src/components/ChatThread/MarkdownStream.stories.tsx +281 -0
- package/src/components/ChatThread/registry.tsx +167 -55
- package/src/components/ChatThread/sync.test.ts +182 -20
- package/src/components/ChatThread/sync.ts +93 -97
- package/src/components/ChatThread/testing/reasoning.md +25 -0
- package/src/components/ChatThread/testing/thinking.md +21 -0
- package/src/components/ChatThread/testing/thread-1.md +30 -0
- package/src/components/ChatThread/testing/{thread.md → thread-2.md} +19 -0
- package/src/components/ChatThread/testing/thread-widgets.md +79 -0
- package/src/components/ChatThread/tool-widget-state.test.ts +34 -0
- package/src/components/ChatThread/tool-widget-state.ts +48 -0
- package/src/components/ChatThread/widgets/FallbackWidget.tsx +26 -0
- package/src/components/ChatThread/widgets/ReasoningWidget.stories.tsx +68 -0
- package/src/components/ChatThread/widgets/ReasoningWidget.ts +133 -0
- package/src/components/ChatThread/widgets/ReferenceWidget.ts +33 -0
- package/src/components/ChatThread/widgets/SelectWidget.ts +39 -0
- package/src/components/ChatThread/widgets/StatsWidget.ts +31 -0
- package/src/components/ChatThread/widgets/StatusWidget.ts +133 -0
- package/src/components/ChatThread/widgets/SuggestionWidget.ts +41 -0
- package/src/components/ChatThread/widgets/SummaryWidget.tsx +29 -0
- package/src/components/ChatThread/widgets/ToolWidget.stories.tsx +55 -0
- package/src/components/ChatThread/widgets/ToolWidget.tsx +156 -0
- package/src/components/ChatThread/widgets/defaults.ts +8 -0
- package/src/components/ChatThread/widgets/index.ts +13 -0
- package/src/components/ProcessTree/ProcessTree.stories.tsx +83 -0
- package/src/components/ProcessTree/ProcessTree.tsx +118 -0
- package/src/components/ProcessTree/index.ts +5 -0
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +6 -10
- package/src/components/TemplateEditor/TemplateEditor.tsx +51 -43
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +9 -7
- package/src/components/TemplateEditor/TemplateForm.tsx +12 -13
- package/src/components/TemplateEditor/extensions/handlebars-extension.ts +5 -5
- package/src/components/ToolBlock/ToolBlock.tsx +22 -21
- package/src/components/Toolbox/Toolbox.stories.tsx +5 -6
- package/src/components/Toolbox/Toolbox.tsx +67 -61
- package/src/components/index.ts +3 -7
- package/src/containers/AgentArticle/AgentArticle.stories.tsx +120 -0
- package/src/containers/AgentArticle/AgentArticle.tsx +200 -0
- package/src/containers/AgentArticle/index.ts +5 -0
- package/src/containers/AgentProperties/AgentProperties.stories.tsx +101 -0
- package/src/containers/AgentProperties/AgentProperties.tsx +127 -0
- package/src/containers/AgentProperties/index.ts +5 -0
- package/src/containers/BlueprintArticle/BlueprintArticle.tsx +29 -0
- package/src/containers/BlueprintArticle/index.ts +5 -0
- package/src/{components → containers/ChatCompanion}/ChatCompanion.tsx +24 -45
- package/src/containers/ChatCompanion/index.ts +5 -0
- package/src/containers/ChatContainer/ChatContainer.tsx +105 -0
- package/src/containers/ChatContainer/index.ts +5 -0
- package/src/{components → containers/ChatDialog}/ChatDialog.tsx +11 -19
- package/src/containers/ChatDialog/index.ts +5 -0
- package/src/containers/RoutineArticle/RoutineArticle.tsx +59 -0
- package/src/containers/RoutineArticle/index.ts +5 -0
- package/src/containers/RoutineList/RoutineList.stories.tsx +130 -0
- package/src/containers/RoutineList/RoutineList.tsx +50 -0
- package/src/containers/RoutineList/index.ts +5 -0
- package/src/containers/TracePanel/TracePanel.stories.tsx +278 -0
- package/src/containers/TracePanel/TracePanel.tsx +138 -0
- package/src/containers/TracePanel/dxn-extractor.test.ts +153 -0
- package/src/containers/TracePanel/dxn-extractor.ts +178 -0
- package/src/containers/TracePanel/execution-graph.test.ts +382 -0
- package/src/containers/TracePanel/execution-graph.ts +579 -0
- package/src/containers/TracePanel/index.ts +9 -0
- 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 +129 -0
- package/src/containers/TriggerStatus/index.ts +5 -0
- package/src/containers/index.ts +16 -0
- package/src/extensions/index.ts +5 -0
- package/src/extensions/prompt-extension.ts +111 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useBlueprintRegistry.ts +9 -5
- package/src/hooks/useChatKeymap.ts +52 -0
- package/src/hooks/useChatProcessor.ts +38 -25
- package/src/hooks/useChatServices.ts +7 -28
- package/src/hooks/useChatToolbarActions.ts +13 -12
- package/src/hooks/useContextBinder.ts +17 -6
- package/src/hooks/useContextObjects.ts +8 -4
- package/src/hooks/useDebug.ts +38 -0
- package/src/hooks/useFilteredTypes.ts +3 -3
- package/src/hooks/usePresets.ts +2 -1
- package/src/hooks/useReferencesProvider.ts +1 -5
- package/src/index.ts +8 -6
- package/src/meta.ts +6 -3
- package/src/operations/create-chat.ts +79 -0
- package/src/operations/definitions.ts +126 -0
- package/src/operations/ensure-companion-chat.ts +61 -0
- package/src/operations/index.ts +17 -0
- package/src/operations/on-create-space.ts +24 -0
- package/src/operations/prompt.test.ts +77 -0
- package/src/operations/resolve-navigation-targets.ts +26 -0
- package/src/operations/run-prompt-in-new-chat.ts +112 -0
- package/src/operations/set-current-chat.ts +50 -0
- package/src/operations/update-chat-name.ts +61 -0
- package/src/processor/index.ts +0 -1
- package/src/processor/presets.ts +11 -3
- package/src/processor/processor.test.ts +18 -50
- package/src/processor/processor.ts +226 -149
- package/src/queue-logger.ts +19 -8
- package/src/testing/data/trace-timeline.dx.json +4657 -0
- package/src/testing/index.ts +1 -0
- package/src/testing/test-generator.test.ts +81 -0
- package/src/testing/test-generator.ts +79 -42
- package/src/testing/test-sequence.ts +3 -3
- package/src/testing/test-services.ts +2 -2
- package/src/testing/test-trace.ts +20 -0
- package/src/testing/trace-timeline.conversations.json +1 -0
- package/src/testing/trace-timeline.test.ts +249 -0
- package/src/translations.ts +155 -89
- package/src/types/Assistant.ts +16 -53
- package/src/types/Settings.ts +76 -0
- package/src/types/capabilities.ts +11 -3
- package/src/types/events.ts +2 -2
- package/src/types/index.ts +3 -2
- package/src/types/service.ts +5 -5
- package/dist/lib/browser/BlueprintArticle-WP3G5GLG.mjs +0 -31
- package/dist/lib/browser/BlueprintArticle-WP3G5GLG.mjs.map +0 -7
- package/dist/lib/browser/ChatCompanion-ECQYUQ2B.mjs +0 -153
- package/dist/lib/browser/ChatCompanion-ECQYUQ2B.mjs.map +0 -7
- package/dist/lib/browser/ChatContainer-QCCOFBUX.mjs +0 -73
- package/dist/lib/browser/ChatContainer-QCCOFBUX.mjs.map +0 -7
- package/dist/lib/browser/ChatDialog-SMK4RSZU.mjs +0 -85
- package/dist/lib/browser/ChatDialog-SMK4RSZU.mjs.map +0 -7
- package/dist/lib/browser/PromptArticle-K362ZPAE.mjs +0 -53
- package/dist/lib/browser/PromptArticle-K362ZPAE.mjs.map +0 -7
- package/dist/lib/browser/ai-service-5GUDOEWF.mjs +0 -21
- package/dist/lib/browser/ai-service-5GUDOEWF.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-DSNH2OMY.mjs +0 -212
- package/dist/lib/browser/app-graph-builder-DSNH2OMY.mjs.map +0 -7
- package/dist/lib/browser/blueprint-definition-DGHH7MUU.mjs +0 -14
- package/dist/lib/browser/chunk-3JYPE2MM.mjs +0 -1832
- package/dist/lib/browser/chunk-3JYPE2MM.mjs.map +0 -7
- package/dist/lib/browser/chunk-DKQMSMBN.mjs +0 -326
- package/dist/lib/browser/chunk-DKQMSMBN.mjs.map +0 -7
- package/dist/lib/browser/chunk-EXVT7D4B.mjs +0 -23
- package/dist/lib/browser/chunk-EXVT7D4B.mjs.map +0 -7
- package/dist/lib/browser/chunk-ML3QCFKA.mjs +0 -265
- package/dist/lib/browser/chunk-ML3QCFKA.mjs.map +0 -7
- package/dist/lib/browser/chunk-MRJVYGLU.mjs +0 -208
- package/dist/lib/browser/chunk-MRJVYGLU.mjs.map +0 -7
- package/dist/lib/browser/chunk-V772AMZM.mjs +0 -250
- package/dist/lib/browser/chunk-V772AMZM.mjs.map +0 -7
- package/dist/lib/browser/chunk-WGQTU6UJ.mjs +0 -41
- package/dist/lib/browser/chunk-WGQTU6UJ.mjs.map +0 -7
- package/dist/lib/browser/edge-model-resolver-26BOY6HY.mjs +0 -20
- package/dist/lib/browser/edge-model-resolver-26BOY6HY.mjs.map +0 -7
- package/dist/lib/browser/local-model-resolver-ZFIM6GGV.mjs +0 -19
- package/dist/lib/browser/local-model-resolver-ZFIM6GGV.mjs.map +0 -7
- package/dist/lib/browser/operation-resolver-7XJLBRQY.mjs +0 -132
- package/dist/lib/browser/operation-resolver-7XJLBRQY.mjs.map +0 -7
- package/dist/lib/browser/react-surface-NCITRSJJ.mjs +0 -109
- package/dist/lib/browser/react-surface-NCITRSJJ.mjs.map +0 -7
- package/dist/lib/browser/repair-6QGAKOVM.mjs +0 -54
- package/dist/lib/browser/repair-6QGAKOVM.mjs.map +0 -7
- package/dist/lib/browser/settings-4ZDLUMYE.mjs +0 -32
- package/dist/lib/browser/settings-4ZDLUMYE.mjs.map +0 -7
- package/dist/lib/browser/state-AN6336ZX.mjs +0 -26
- package/dist/lib/browser/state-AN6336ZX.mjs.map +0 -7
- package/dist/lib/browser/toolkit-7AVTEPMA.mjs +0 -18
- package/dist/lib/browser/toolkit-7AVTEPMA.mjs.map +0 -7
- package/dist/lib/node-esm/BlueprintArticle-WZ76E2C4.mjs +0 -32
- package/dist/lib/node-esm/BlueprintArticle-WZ76E2C4.mjs.map +0 -7
- package/dist/lib/node-esm/ChatCompanion-Q4FUZ2MW.mjs +0 -154
- package/dist/lib/node-esm/ChatCompanion-Q4FUZ2MW.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-AKI33HIB.mjs +0 -74
- package/dist/lib/node-esm/ChatContainer-AKI33HIB.mjs.map +0 -7
- package/dist/lib/node-esm/ChatDialog-AP45PVZR.mjs +0 -86
- package/dist/lib/node-esm/ChatDialog-AP45PVZR.mjs.map +0 -7
- package/dist/lib/node-esm/PromptArticle-D4HAIIC6.mjs +0 -54
- package/dist/lib/node-esm/PromptArticle-D4HAIIC6.mjs.map +0 -7
- package/dist/lib/node-esm/ai-service-PXKKCFIF.mjs +0 -22
- package/dist/lib/node-esm/ai-service-PXKKCFIF.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-TJCUEXW5.mjs +0 -213
- package/dist/lib/node-esm/app-graph-builder-TJCUEXW5.mjs.map +0 -7
- package/dist/lib/node-esm/blueprint-definition-SEMDEIYG.mjs +0 -15
- package/dist/lib/node-esm/chunk-355W5B27.mjs +0 -251
- package/dist/lib/node-esm/chunk-355W5B27.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-75PHXBN3.mjs +0 -327
- package/dist/lib/node-esm/chunk-75PHXBN3.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-DCA5QWQT.mjs +0 -209
- package/dist/lib/node-esm/chunk-DCA5QWQT.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-MSBPC4RJ.mjs +0 -42
- package/dist/lib/node-esm/chunk-MSBPC4RJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-POWB2BPC.mjs +0 -25
- package/dist/lib/node-esm/chunk-POWB2BPC.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-XI5T3MJC.mjs +0 -1833
- package/dist/lib/node-esm/chunk-XI5T3MJC.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ZRIPP7YF.mjs +0 -267
- package/dist/lib/node-esm/chunk-ZRIPP7YF.mjs.map +0 -7
- package/dist/lib/node-esm/edge-model-resolver-G5KMODPO.mjs +0 -21
- package/dist/lib/node-esm/edge-model-resolver-G5KMODPO.mjs.map +0 -7
- package/dist/lib/node-esm/local-model-resolver-KDZLYI7Y.mjs +0 -20
- package/dist/lib/node-esm/local-model-resolver-KDZLYI7Y.mjs.map +0 -7
- package/dist/lib/node-esm/operation-resolver-SX4WMNA7.mjs +0 -133
- package/dist/lib/node-esm/operation-resolver-SX4WMNA7.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-ST6V7LPE.mjs +0 -110
- package/dist/lib/node-esm/react-surface-ST6V7LPE.mjs.map +0 -7
- package/dist/lib/node-esm/repair-QJ7CQDKU.mjs +0 -55
- package/dist/lib/node-esm/repair-QJ7CQDKU.mjs.map +0 -7
- package/dist/lib/node-esm/settings-CQEOHR3R.mjs +0 -33
- package/dist/lib/node-esm/settings-CQEOHR3R.mjs.map +0 -7
- package/dist/lib/node-esm/state-HDON4REW.mjs +0 -27
- package/dist/lib/node-esm/state-HDON4REW.mjs.map +0 -7
- package/dist/lib/node-esm/toolkit-OWGCEKOO.mjs +0 -19
- package/dist/lib/node-esm/toolkit-OWGCEKOO.mjs.map +0 -7
- package/dist/types/src/blueprints/assistant-blueprint.d.ts +0 -209
- package/dist/types/src/blueprints/assistant-blueprint.d.ts.map +0 -1
- package/dist/types/src/capabilities/ai-service/ai-service.d.ts +0 -5
- package/dist/types/src/capabilities/ai-service/ai-service.d.ts.map +0 -1
- package/dist/types/src/capabilities/ai-service/index.d.ts +0 -3
- package/dist/types/src/capabilities/ai-service/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +0 -6
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +0 -21
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts +0 -4
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/edge-model-resolver/edge-model-resolver.d.ts +0 -6
- package/dist/types/src/capabilities/edge-model-resolver/edge-model-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/edge-model-resolver/index.d.ts +0 -3
- package/dist/types/src/capabilities/edge-model-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/local-model-resolver/index.d.ts +0 -3
- package/dist/types/src/capabilities/local-model-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/local-model-resolver/local-model-resolver.d.ts +0 -12
- package/dist/types/src/capabilities/local-model-resolver/local-model-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -3
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +0 -5
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/repair/index.d.ts +0 -3
- package/dist/types/src/capabilities/repair/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/repair/repair.d.ts +0 -6
- package/dist/types/src/capabilities/repair/repair.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/index.d.ts +0 -15
- package/dist/types/src/capabilities/settings/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/settings.d.ts +0 -17
- package/dist/types/src/capabilities/settings/settings.d.ts.map +0 -1
- package/dist/types/src/capabilities/state/index.d.ts +0 -11
- package/dist/types/src/capabilities/state/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/state/state.d.ts +0 -13
- package/dist/types/src/capabilities/state/state.d.ts.map +0 -1
- package/dist/types/src/capabilities/toolkit/index.d.ts +0 -3
- package/dist/types/src/capabilities/toolkit/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/toolkit/toolkit.d.ts +0 -5
- package/dist/types/src/capabilities/toolkit/toolkit.d.ts.map +0 -1
- package/dist/types/src/components/BlueprintArticle.d.ts +0 -7
- package/dist/types/src/components/BlueprintArticle.d.ts.map +0 -1
- package/dist/types/src/components/ChatCompanion.d.ts +0 -13
- package/dist/types/src/components/ChatCompanion.d.ts.map +0 -1
- package/dist/types/src/components/ChatContainer.d.ts +0 -19
- package/dist/types/src/components/ChatContainer.d.ts.map +0 -1
- package/dist/types/src/components/ChatDialog.d.ts.map +0 -1
- package/dist/types/src/components/ChatProgress/ChatProgress.d.ts +0 -7
- 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/PromptArticle.d.ts +0 -7
- package/dist/types/src/components/PromptArticle.d.ts.map +0 -1
- package/dist/types/src/components/Typewriter/AssistantToolbar.d.ts +0 -12
- package/dist/types/src/components/Typewriter/AssistantToolbar.d.ts.map +0 -1
- package/dist/types/src/components/Typewriter/Typewriter.d.ts +0 -11
- package/dist/types/src/components/Typewriter/Typewriter.d.ts.map +0 -1
- package/dist/types/src/components/Typewriter/Typewriter.stories.d.ts +0 -7
- package/dist/types/src/components/Typewriter/Typewriter.stories.d.ts.map +0 -1
- package/dist/types/src/components/Typewriter/assistant-extension.d.ts +0 -5
- package/dist/types/src/components/Typewriter/assistant-extension.d.ts.map +0 -1
- package/dist/types/src/components/Typewriter/index.d.ts +0 -2
- package/dist/types/src/components/Typewriter/index.d.ts.map +0 -1
- package/dist/types/src/functions/index.d.ts +0 -4
- package/dist/types/src/functions/index.d.ts.map +0 -1
- package/dist/types/src/functions/object-list.d.ts +0 -10
- package/dist/types/src/functions/object-list.d.ts.map +0 -1
- package/dist/types/src/functions/object-load.d.ts +0 -8
- package/dist/types/src/functions/object-load.d.ts.map +0 -1
- package/dist/types/src/functions/object-search.d.ts +0 -10
- package/dist/types/src/functions/object-search.d.ts.map +0 -1
- package/dist/types/src/processor/update-name.d.ts +0 -10
- package/dist/types/src/processor/update-name.d.ts.map +0 -1
- package/dist/types/src/types/AssistantAction.d.ts +0 -95
- package/dist/types/src/types/AssistantAction.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/src/blueprints/assistant-blueprint.ts +0 -62
- package/src/capabilities/ai-service/index.ts +0 -7
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +0 -180
- package/src/capabilities/app-graph-builder/index.ts +0 -7
- package/src/capabilities/blueprint-definition/blueprint-definition.ts +0 -60
- package/src/capabilities/blueprint-definition/index.ts +0 -8
- package/src/capabilities/edge-model-resolver/index.ts +0 -7
- package/src/capabilities/local-model-resolver/index.ts +0 -7
- package/src/capabilities/operation-resolver/index.ts +0 -7
- package/src/capabilities/operation-resolver/operation-resolver.ts +0 -110
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/react-surface/react-surface.tsx +0 -95
- package/src/capabilities/repair/index.ts +0 -7
- package/src/capabilities/repair/repair.ts +0 -63
- package/src/capabilities/settings/index.ts +0 -7
- package/src/capabilities/state/index.ts +0 -7
- package/src/capabilities/toolkit/index.ts +0 -7
- package/src/capabilities/toolkit/toolkit.ts +0 -26
- package/src/components/BlueprintArticle.tsx +0 -29
- package/src/components/ChatContainer.tsx +0 -61
- package/src/components/ChatProgress/ChatProgress.tsx +0 -54
- package/src/components/ChatProgress/index.ts +0 -5
- package/src/components/PromptArticle.tsx +0 -50
- package/src/components/Typewriter/AssistantToolbar.tsx +0 -161
- package/src/components/Typewriter/Typewriter.stories.tsx +0 -83
- package/src/components/Typewriter/Typewriter.tsx +0 -54
- package/src/components/Typewriter/assistant-extension.tsx +0 -144
- package/src/functions/index.ts +0 -7
- package/src/functions/object-list.ts +0 -49
- package/src/functions/object-load.ts +0 -47
- package/src/functions/object-search.ts +0 -46
- package/src/processor/update-name.ts +0 -59
- package/src/types/AssistantAction.ts +0 -75
- package/src/types/defs.ts +0 -5
- /package/dist/lib/browser/{blueprint-definition-DGHH7MUU.mjs.map → components/index.mjs.map} +0 -0
- /package/dist/lib/{node-esm/blueprint-definition-SEMDEIYG.mjs.map → browser/hooks/index.mjs.map} +0 -0
|
@@ -6,13 +6,13 @@ import type * as Tool from '@effect/ai/Tool';
|
|
|
6
6
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
7
7
|
|
|
8
8
|
import { useTranslation } from '@dxos/react-ui';
|
|
9
|
-
import { NumericTabs, TextCrawl,
|
|
10
|
-
import {
|
|
9
|
+
import { NumericTabs, TextCrawl, TogglePanel, type TogglePanelRootProps } from '@dxos/react-ui-components';
|
|
10
|
+
import { JsonHighlighter } from '@dxos/react-ui-syntax-highlighter';
|
|
11
11
|
import { type ContentBlock, type Message } from '@dxos/types';
|
|
12
12
|
import { type XmlWidgetProps } from '@dxos/ui-editor';
|
|
13
13
|
import { isNonNullable, safeParseJson } from '@dxos/util';
|
|
14
14
|
|
|
15
|
-
import { meta } from '
|
|
15
|
+
import { meta } from '#meta';
|
|
16
16
|
|
|
17
17
|
export const isToolMessage = (message: Message.Message) => {
|
|
18
18
|
return message.blocks.some((block: ContentBlock.Any) => block._tag === 'toolCall' || block._tag === 'toolResult');
|
|
@@ -25,12 +25,12 @@ export type ToolBlockProps = XmlWidgetProps<{
|
|
|
25
25
|
export const ToolBlock = ({ view, blocks = [] }: ToolBlockProps) => {
|
|
26
26
|
const { t } = useTranslation(meta.id);
|
|
27
27
|
|
|
28
|
-
const items = useMemo<
|
|
28
|
+
const items = useMemo<ToolPanelProps['items']>(() => {
|
|
29
29
|
let lastToolCall: { tool: Tool.Any | undefined; block: ContentBlock.ToolCall } | undefined;
|
|
30
30
|
// TODO(burdon): Get from context?
|
|
31
31
|
const tools: Tool.Any[] = []; //processor.conversation.toolkit?.tools ?? [];
|
|
32
32
|
return blocks
|
|
33
|
-
.filter((block) => block._tag === 'toolCall' || block._tag === 'toolResult' || block._tag === '
|
|
33
|
+
.filter((block) => block._tag === 'toolCall' || block._tag === 'toolResult' || block._tag === 'stats')
|
|
34
34
|
.map((block) => {
|
|
35
35
|
switch (block._tag) {
|
|
36
36
|
case 'toolCall': {
|
|
@@ -41,7 +41,7 @@ export const ToolBlock = ({ view, blocks = [] }: ToolBlockProps) => {
|
|
|
41
41
|
const tool = tools.find((tool) => tool.name === block.name);
|
|
42
42
|
lastToolCall = { tool, block };
|
|
43
43
|
return {
|
|
44
|
-
title: tool?.description ?? [t('tool
|
|
44
|
+
title: tool?.description ?? [t('tool-call.label'), block?.name].join(' '),
|
|
45
45
|
content: {
|
|
46
46
|
...block,
|
|
47
47
|
input: safeParseJson(block.input),
|
|
@@ -53,13 +53,13 @@ export const ToolBlock = ({ view, blocks = [] }: ToolBlockProps) => {
|
|
|
53
53
|
// TODO(burdon): Parse error type.
|
|
54
54
|
if (block.error) {
|
|
55
55
|
return {
|
|
56
|
-
title: t('tool
|
|
56
|
+
title: t('tool-error.label'),
|
|
57
57
|
content: block,
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
const title =
|
|
62
|
-
lastToolCall?.tool?.description ?? [t('tool
|
|
62
|
+
lastToolCall?.tool?.description ?? [t('tool-result.label'), lastToolCall?.block?.name].join(' ');
|
|
63
63
|
lastToolCall = undefined;
|
|
64
64
|
return {
|
|
65
65
|
title,
|
|
@@ -70,13 +70,13 @@ export const ToolBlock = ({ view, blocks = [] }: ToolBlockProps) => {
|
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
case '
|
|
73
|
+
case 'stats': {
|
|
74
74
|
if (!lastToolCall) {
|
|
75
75
|
return null;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
return {
|
|
79
|
-
title: t('
|
|
79
|
+
title: t('stats.label'),
|
|
80
80
|
content: block,
|
|
81
81
|
};
|
|
82
82
|
}
|
|
@@ -92,20 +92,21 @@ export const ToolBlock = ({ view, blocks = [] }: ToolBlockProps) => {
|
|
|
92
92
|
}, 1_000);
|
|
93
93
|
}, [view]);
|
|
94
94
|
|
|
95
|
+
// Ignore if empty.
|
|
95
96
|
if (!items.length) {
|
|
96
97
|
return null;
|
|
97
98
|
}
|
|
98
99
|
|
|
99
|
-
return <
|
|
100
|
+
return <ToolPanel items={items} onChangeOpen={handleChangeOpen} />;
|
|
100
101
|
};
|
|
101
102
|
|
|
102
103
|
ToolBlock.displayName = 'ToolBlock';
|
|
103
104
|
|
|
104
|
-
type
|
|
105
|
+
type ToolPanelProps = {
|
|
105
106
|
items: { title: string; content: any }[];
|
|
106
|
-
} & Pick<
|
|
107
|
+
} & Pick<TogglePanelRootProps, 'onChangeOpen'>;
|
|
107
108
|
|
|
108
|
-
|
|
109
|
+
const ToolPanel = ({ items, onChangeOpen }: ToolPanelProps) => {
|
|
109
110
|
const tabsRef = useRef<HTMLDivElement>(null);
|
|
110
111
|
const [selected, setSelected] = useState(0);
|
|
111
112
|
const [open, setOpen] = useState(false);
|
|
@@ -122,13 +123,13 @@ export const ToolContainer = ({ items, onChangeOpen }: ToolContainerProps) => {
|
|
|
122
123
|
}, []);
|
|
123
124
|
|
|
124
125
|
return (
|
|
125
|
-
<
|
|
126
|
-
<
|
|
126
|
+
<TogglePanel.Root classNames='w-full rounded-xs border border-subdued-separator' open={open} onChangeOpen={setOpen}>
|
|
127
|
+
<TogglePanel.Header classNames='text-sm text-placeholder'>
|
|
127
128
|
<TextCrawl key='status-roll' lines={items.map((item) => item.title)} autoAdvance greedy />
|
|
128
|
-
</
|
|
129
|
-
<
|
|
129
|
+
</TogglePanel.Header>
|
|
130
|
+
<TogglePanel.Content classNames='grid grid-cols-[32px_1fr]'>
|
|
130
131
|
<NumericTabs ref={tabsRef} classNames='p-1' length={items.length} selected={selected} onSelect={handleSelect} />
|
|
131
|
-
<
|
|
132
|
+
<JsonHighlighter
|
|
132
133
|
data={items[selected]?.content}
|
|
133
134
|
classNames='p-1 text-xs bg-transparent'
|
|
134
135
|
replacer={{
|
|
@@ -137,7 +138,7 @@ export const ToolContainer = ({ items, onChangeOpen }: ToolContainerProps) => {
|
|
|
137
138
|
maxStringLen: 128,
|
|
138
139
|
}}
|
|
139
140
|
/>
|
|
140
|
-
</
|
|
141
|
-
</
|
|
141
|
+
</TogglePanel.Content>
|
|
142
|
+
</TogglePanel.Root>
|
|
142
143
|
);
|
|
143
144
|
};
|
|
@@ -10,32 +10,31 @@ import { withPluginManager } from '@dxos/app-framework/testing';
|
|
|
10
10
|
import { capabilities } from '@dxos/assistant-toolkit/testing';
|
|
11
11
|
import { ChessPlugin } from '@dxos/plugin-chess';
|
|
12
12
|
import { ClientPlugin } from '@dxos/plugin-client';
|
|
13
|
+
import { initializeIdentity } from '@dxos/plugin-client/testing';
|
|
13
14
|
import { MapPlugin } from '@dxos/plugin-map';
|
|
14
15
|
import { TablePlugin } from '@dxos/plugin-table';
|
|
15
16
|
import { corePlugins } from '@dxos/plugin-testing';
|
|
16
|
-
import { withTheme } from '@dxos/react-ui/testing';
|
|
17
17
|
|
|
18
|
-
import { translations } from '
|
|
18
|
+
import { translations } from '#translations';
|
|
19
19
|
|
|
20
20
|
import { Toolbox, type ToolboxProps } from './Toolbox';
|
|
21
21
|
|
|
22
22
|
const DefaultStory = (props: ToolboxProps) => {
|
|
23
|
-
return <Toolbox {...props} classNames='
|
|
23
|
+
return <Toolbox {...props} classNames='h-[15rem] w-[30rem] py-1 rounded-xs border border-separator' />;
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
const meta = {
|
|
27
|
-
title: 'plugins/plugin-assistant/Toolbox',
|
|
27
|
+
title: 'plugins/plugin-assistant/components/Toolbox',
|
|
28
28
|
component: Toolbox as any,
|
|
29
29
|
render: DefaultStory,
|
|
30
30
|
decorators: [
|
|
31
|
-
withTheme,
|
|
32
31
|
withPluginManager({
|
|
33
32
|
plugins: [
|
|
34
33
|
...corePlugins(),
|
|
35
34
|
ClientPlugin({
|
|
36
35
|
onClientInitialized: ({ client }) =>
|
|
37
36
|
Effect.gen(function* () {
|
|
38
|
-
yield*
|
|
37
|
+
yield* initializeIdentity(client);
|
|
39
38
|
}),
|
|
40
39
|
}),
|
|
41
40
|
ChessPlugin(),
|
|
@@ -2,85 +2,91 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import React, {
|
|
5
|
+
import React, { Fragment, useEffect, useState } from 'react';
|
|
6
6
|
|
|
7
|
-
import { type Blueprint } from '@dxos/
|
|
7
|
+
import { type Blueprint } from '@dxos/compute';
|
|
8
|
+
import { Operation } from '@dxos/compute';
|
|
8
9
|
import { type Database, type Ref } from '@dxos/echo';
|
|
9
|
-
import { Function } from '@dxos/functions';
|
|
10
10
|
import { log } from '@dxos/log';
|
|
11
11
|
import { Filter, useQuery } from '@dxos/react-client/echo';
|
|
12
|
-
import { type ThemedClassName
|
|
13
|
-
import { mx } from '@dxos/ui-theme';
|
|
12
|
+
import { ScrollArea, type ThemedClassName } from '@dxos/react-ui';
|
|
13
|
+
import { composable, composableProps, mx } from '@dxos/ui-theme';
|
|
14
|
+
|
|
15
|
+
import { ServiceType } from '#types';
|
|
14
16
|
|
|
15
|
-
import { meta } from '../../meta';
|
|
16
17
|
import { type AiChatProcessor } from '../../processor';
|
|
17
|
-
import { ServiceType } from '../../types';
|
|
18
18
|
|
|
19
|
-
export type ToolboxProps =
|
|
19
|
+
export type ToolboxProps = {
|
|
20
20
|
services?: { service: ServiceType }[];
|
|
21
|
-
functions?:
|
|
21
|
+
functions?: Operation.PersistentOperation[];
|
|
22
22
|
// TODO(burdon): Combine into single array.
|
|
23
23
|
blueprints?: readonly Blueprint.Blueprint[];
|
|
24
24
|
activeBlueprints?: readonly Ref.Ref<Blueprint.Blueprint>[];
|
|
25
|
-
}>;
|
|
26
|
-
|
|
27
|
-
export const Toolbox = ({ classNames, functions, services, blueprints, activeBlueprints }: ToolboxProps) => {
|
|
28
|
-
const { t } = useTranslation(meta.id);
|
|
29
|
-
|
|
30
|
-
return (
|
|
31
|
-
<div className={mx('flex flex-col overflow-y-auto box-content', classNames)}>
|
|
32
|
-
{blueprints && blueprints.length > 0 && (
|
|
33
|
-
<Section
|
|
34
|
-
title='Blueprints'
|
|
35
|
-
items={blueprints.map(({ name, description, tools }) => ({
|
|
36
|
-
name,
|
|
37
|
-
description,
|
|
38
|
-
subitems: tools.map((toolId) => ({ name: `∙ ${safeToolId(toolId)}` })),
|
|
39
|
-
}))}
|
|
40
|
-
/>
|
|
41
|
-
)}
|
|
42
|
-
|
|
43
|
-
{activeBlueprints && activeBlueprints.length > 0 && (
|
|
44
|
-
<Section
|
|
45
|
-
title='Blueprints'
|
|
46
|
-
items={activeBlueprints.map(({ target }) => ({
|
|
47
|
-
name: target?.name ?? '',
|
|
48
|
-
description: target?.description ?? '',
|
|
49
|
-
subitems: target?.tools.map((toolId) => ({ name: `∙ ${safeToolId(toolId)}` })),
|
|
50
|
-
}))}
|
|
51
|
-
/>
|
|
52
|
-
)}
|
|
53
|
-
|
|
54
|
-
{services && services.length > 0 && (
|
|
55
|
-
<Section
|
|
56
|
-
title='Services'
|
|
57
|
-
items={services.map(({ service: { serviceId, name, description } }) => ({
|
|
58
|
-
name: name ?? serviceId,
|
|
59
|
-
description,
|
|
60
|
-
// subitems: tools.map(({ name, description }) => ({ name: `∙ ${name}`, description })),
|
|
61
|
-
}))}
|
|
62
|
-
/>
|
|
63
|
-
)}
|
|
64
|
-
|
|
65
|
-
{functions && functions.length > 0 && (
|
|
66
|
-
<Section title='Functions' items={functions.map(({ name, description }) => ({ name, description }))} />
|
|
67
|
-
)}
|
|
68
|
-
</div>
|
|
69
|
-
);
|
|
70
25
|
};
|
|
71
26
|
|
|
72
|
-
const
|
|
27
|
+
export const Toolbox = composable<HTMLDivElement, ToolboxProps>(
|
|
28
|
+
({ functions, services, blueprints, activeBlueprints, ...props }, forwardedRef) => {
|
|
29
|
+
return (
|
|
30
|
+
<ScrollArea.Root {...composableProps(props)} thin orientation='vertical' ref={forwardedRef}>
|
|
31
|
+
<ScrollArea.Viewport>
|
|
32
|
+
{blueprints && blueprints.length > 0 && (
|
|
33
|
+
<Section
|
|
34
|
+
title='Blueprints'
|
|
35
|
+
items={blueprints.map(({ name, description, tools }) => ({
|
|
36
|
+
name,
|
|
37
|
+
description,
|
|
38
|
+
subitems: tools.map((toolId) => ({ name: `∙ ${safeToolId(toolId)}` })),
|
|
39
|
+
}))}
|
|
40
|
+
/>
|
|
41
|
+
)}
|
|
42
|
+
|
|
43
|
+
{activeBlueprints && activeBlueprints.length > 0 && (
|
|
44
|
+
<Section
|
|
45
|
+
title='Blueprints'
|
|
46
|
+
items={activeBlueprints.map(({ target }) => ({
|
|
47
|
+
name: target?.name ?? '',
|
|
48
|
+
description: target?.description ?? '',
|
|
49
|
+
subitems: target?.tools.map((toolId) => ({ name: `∙ ${safeToolId(toolId)}` })),
|
|
50
|
+
}))}
|
|
51
|
+
/>
|
|
52
|
+
)}
|
|
53
|
+
|
|
54
|
+
{services && services.length > 0 && (
|
|
55
|
+
<Section
|
|
56
|
+
title='Services'
|
|
57
|
+
items={services.map(({ service: { serviceId, name, description } }) => ({
|
|
58
|
+
name: name ?? serviceId,
|
|
59
|
+
description,
|
|
60
|
+
// subitems: tools.map(({ name, description }) => ({ name: `∙ ${name}`, description })),
|
|
61
|
+
}))}
|
|
62
|
+
/>
|
|
63
|
+
)}
|
|
64
|
+
|
|
65
|
+
{functions && functions.length > 0 && (
|
|
66
|
+
<Section title='Functions' items={functions.map(({ name, description }) => ({ name, description }))} />
|
|
67
|
+
)}
|
|
68
|
+
</ScrollArea.Viewport>
|
|
69
|
+
</ScrollArea.Root>
|
|
70
|
+
);
|
|
71
|
+
},
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
Toolbox.displayName = 'Toolbox';
|
|
75
|
+
|
|
76
|
+
type SectionProps = {
|
|
73
77
|
title: string;
|
|
74
78
|
items: { name: string; description?: string; subitems?: { name: string; description?: string }[] }[];
|
|
75
79
|
striped?: boolean;
|
|
76
|
-
}
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const Section = ({ title, items, striped }: SectionProps) => {
|
|
77
83
|
const stripeClassNames = 'odd:bg-neutral-50 dark:odd:bg-neutral-800';
|
|
78
84
|
const gridClassNames = 'grid grid-cols-[8rem_1fr]';
|
|
79
|
-
const subGridClassNames = mx('col-span-full grid grid-cols-subgrid text-xs
|
|
85
|
+
const subGridClassNames = mx('col-span-full grid grid-cols-subgrid text-xs px-2', striped && stripeClassNames);
|
|
80
86
|
|
|
81
87
|
return (
|
|
82
88
|
<div>
|
|
83
|
-
<h1 className='
|
|
89
|
+
<h1 className='px-2 text-sm'>{title}</h1>
|
|
84
90
|
<div className={gridClassNames}>
|
|
85
91
|
{items.map(({ name, description, subitems }, i) => (
|
|
86
92
|
<Fragment key={i}>
|
|
@@ -103,12 +109,12 @@ const Section: FC<{
|
|
|
103
109
|
);
|
|
104
110
|
};
|
|
105
111
|
|
|
106
|
-
export type
|
|
112
|
+
export type ToolboxPanelProps = ThemedClassName<{
|
|
107
113
|
db?: Database.Database;
|
|
108
114
|
processor?: AiChatProcessor;
|
|
109
115
|
}>;
|
|
110
116
|
|
|
111
|
-
export const
|
|
117
|
+
export const ToolboxPanel = ({ classNames, db, processor }: ToolboxPanelProps) => {
|
|
112
118
|
// Registered services.
|
|
113
119
|
const services = useQuery(db, Filter.type(ServiceType));
|
|
114
120
|
const [serviceTools, setServiceTools] = useState<{ service: ServiceType }[]>([]);
|
|
@@ -124,7 +130,7 @@ export const ToolboxContainer = ({ classNames, db, processor }: ToolboxContainer
|
|
|
124
130
|
}, [services]);
|
|
125
131
|
|
|
126
132
|
// Deployed functions.
|
|
127
|
-
const functions = useQuery(db, Filter.type(
|
|
133
|
+
const functions = useQuery(db, Filter.type(Operation.PersistentOperation));
|
|
128
134
|
|
|
129
135
|
return (
|
|
130
136
|
<Toolbox
|
package/src/components/index.ts
CHANGED
|
@@ -2,15 +2,11 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { lazy } from 'react';
|
|
5
|
+
import { type ComponentType, lazy } from 'react';
|
|
6
6
|
|
|
7
|
-
export * from './AssistantSettings';
|
|
8
7
|
export * from './Chat';
|
|
8
|
+
export * from './ProcessTree';
|
|
9
9
|
export * from './TemplateEditor';
|
|
10
10
|
export * from './Toolbox';
|
|
11
11
|
|
|
12
|
-
export const
|
|
13
|
-
export const ChatCompanion = lazy(() => import('./ChatCompanion'));
|
|
14
|
-
export const ChatContainer = lazy(() => import('./ChatContainer'));
|
|
15
|
-
export const ChatDialog = lazy(() => import('./ChatDialog'));
|
|
16
|
-
export const PromptArticle = lazy(() => import('./PromptArticle'));
|
|
12
|
+
export const AssistantSettings: ComponentType<any> = lazy(() => import('./AssistantSettings'));
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
7
|
+
import React from 'react';
|
|
8
|
+
|
|
9
|
+
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
|
+
import { Plan, Agent } from '@dxos/assistant-toolkit';
|
|
11
|
+
import { Obj, Ref } from '@dxos/echo';
|
|
12
|
+
import { AutomationPlugin } from '@dxos/plugin-automation';
|
|
13
|
+
import { ClientPlugin } from '@dxos/plugin-client';
|
|
14
|
+
import { initializeIdentity } from '@dxos/plugin-client/testing';
|
|
15
|
+
import { PreviewPlugin } from '@dxos/plugin-preview';
|
|
16
|
+
import { corePlugins, StorybookPlugin } from '@dxos/plugin-testing';
|
|
17
|
+
import { random } from '@dxos/random';
|
|
18
|
+
import { Filter, useQuery, useSpaces } from '@dxos/react-client/echo';
|
|
19
|
+
import { Loading, withTheme } from '@dxos/react-ui/testing';
|
|
20
|
+
import { Text } from '@dxos/schema';
|
|
21
|
+
import { createObjectFactory, TypeSpec } from '@dxos/schema/testing';
|
|
22
|
+
import { Message, Organization, Person } from '@dxos/types';
|
|
23
|
+
|
|
24
|
+
import { createMessage } from '#testing';
|
|
25
|
+
import { translations } from '#translations';
|
|
26
|
+
|
|
27
|
+
import { AssistantPlugin } from '../../AssistantPlugin';
|
|
28
|
+
import { AgentArticle } from './AgentArticle';
|
|
29
|
+
|
|
30
|
+
random.seed(1);
|
|
31
|
+
|
|
32
|
+
type DefaultStoryProps = {
|
|
33
|
+
spec?: TypeSpec[];
|
|
34
|
+
inputs?: boolean;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const DefaultStory = (_: DefaultStoryProps) => {
|
|
38
|
+
const [space] = useSpaces();
|
|
39
|
+
const [agent] = useQuery(space?.db, Filter.type(Agent.Agent));
|
|
40
|
+
if (!agent) {
|
|
41
|
+
return <Loading />;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return <AgentArticle role='article' subject={agent} attendableId='story' />;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const meta = {
|
|
48
|
+
title: 'plugins/plugin-assistant/containers/AgentArticle',
|
|
49
|
+
render: DefaultStory,
|
|
50
|
+
decorators: [
|
|
51
|
+
withTheme(),
|
|
52
|
+
withPluginManager<DefaultStoryProps>(({ args: { spec = [], inputs } }) => ({
|
|
53
|
+
plugins: [
|
|
54
|
+
...corePlugins(),
|
|
55
|
+
ClientPlugin({
|
|
56
|
+
types: [Agent.Agent, Message.Message, Plan.Plan, Text.Text, Organization.Organization, Person.Person],
|
|
57
|
+
onClientInitialized: ({ client }) =>
|
|
58
|
+
Effect.gen(function* () {
|
|
59
|
+
yield* initializeIdentity(client);
|
|
60
|
+
const [space] = client.spaces.get();
|
|
61
|
+
yield* Effect.promise(() => space.waitUntilReady());
|
|
62
|
+
|
|
63
|
+
const factory = createObjectFactory(space.db, random as any);
|
|
64
|
+
const artifacts = yield* Effect.promise(() => factory(spec));
|
|
65
|
+
|
|
66
|
+
const inputQueue = space.queues.create();
|
|
67
|
+
if (inputs) {
|
|
68
|
+
yield* Effect.promise(() =>
|
|
69
|
+
inputQueue.append([
|
|
70
|
+
createMessage('user', [{ _tag: 'text', text: 'Summarize the current artifacts.' }]),
|
|
71
|
+
createMessage('assistant', [
|
|
72
|
+
{ _tag: 'text', text: 'Here is a quick overview of the organizations and contacts in context.' },
|
|
73
|
+
]),
|
|
74
|
+
createMessage('user', [{ _tag: 'text', text: 'Flag anything that needs follow-up.' }]),
|
|
75
|
+
]),
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
space.db.add(
|
|
80
|
+
Obj.make(Agent.Agent, {
|
|
81
|
+
instructions: Ref.make(Text.make()),
|
|
82
|
+
plan: Ref.make(Plan.makePlan({ tasks: [] })),
|
|
83
|
+
artifacts: artifacts.map((obj) => ({
|
|
84
|
+
name: Obj.getLabel(obj) ?? 'Artifact',
|
|
85
|
+
data: Ref.make(obj),
|
|
86
|
+
})),
|
|
87
|
+
queue: Ref.fromDXN(inputQueue.dxn),
|
|
88
|
+
subscriptions: [],
|
|
89
|
+
}),
|
|
90
|
+
);
|
|
91
|
+
}),
|
|
92
|
+
}),
|
|
93
|
+
AutomationPlugin(),
|
|
94
|
+
AssistantPlugin(),
|
|
95
|
+
PreviewPlugin(),
|
|
96
|
+
StorybookPlugin({}),
|
|
97
|
+
],
|
|
98
|
+
})),
|
|
99
|
+
],
|
|
100
|
+
parameters: {
|
|
101
|
+
layout: 'fullscreen',
|
|
102
|
+
translations,
|
|
103
|
+
},
|
|
104
|
+
} satisfies Meta<DefaultStoryProps>;
|
|
105
|
+
|
|
106
|
+
export default meta;
|
|
107
|
+
|
|
108
|
+
type Story = StoryObj<typeof meta>;
|
|
109
|
+
|
|
110
|
+
export const Default: Story = {
|
|
111
|
+
args: {
|
|
112
|
+
inputs: true,
|
|
113
|
+
spec: [
|
|
114
|
+
{ type: Organization.Organization, count: 10 },
|
|
115
|
+
{ type: Person.Person, count: 10 },
|
|
116
|
+
],
|
|
117
|
+
},
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
export const Empty: Story = {};
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Atom, useAtomValue } from '@effect-atom/atom-react';
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
7
|
+
import * as Function from 'effect/Function';
|
|
8
|
+
import * as Option from 'effect/Option';
|
|
9
|
+
import React, { forwardRef, useCallback, useMemo, useState } from 'react';
|
|
10
|
+
|
|
11
|
+
import { Surface, useCapabilities } from '@dxos/app-framework/ui';
|
|
12
|
+
import { AppSurface, useObjectMenuItems } from '@dxos/app-toolkit/ui';
|
|
13
|
+
import { Agent } from '@dxos/assistant-toolkit';
|
|
14
|
+
import { Annotation, Filter, Obj, Query, Ref } from '@dxos/echo';
|
|
15
|
+
import { AtomObj, AtomRef } from '@dxos/echo-atom';
|
|
16
|
+
import { QueueService } from '@dxos/functions';
|
|
17
|
+
import { AutomationCapabilities } from '@dxos/plugin-automation/types';
|
|
18
|
+
import { useQuery } from '@dxos/react-client/echo';
|
|
19
|
+
import { Card, Message, Panel, ScrollArea, Toolbar, useTranslation } from '@dxos/react-ui';
|
|
20
|
+
import { Masonry } from '@dxos/react-ui-masonry';
|
|
21
|
+
import { Menu } from '@dxos/react-ui-menu';
|
|
22
|
+
import { Focus, Mosaic, type MosaicTileProps } from '@dxos/react-ui-mosaic';
|
|
23
|
+
import { composable } from '@dxos/ui-theme';
|
|
24
|
+
import { isNonNullable } from '@dxos/util';
|
|
25
|
+
|
|
26
|
+
import { meta } from '#meta';
|
|
27
|
+
|
|
28
|
+
type Tab = 'artifacts' | 'inputs';
|
|
29
|
+
|
|
30
|
+
export type AgentArticleProps = AppSurface.ObjectArticleProps<Agent.Agent>;
|
|
31
|
+
|
|
32
|
+
export const AgentArticle = ({ role, subject: agent }: AgentArticleProps) => {
|
|
33
|
+
const { t } = useTranslation(meta.id);
|
|
34
|
+
const [tab, setTab] = useState<Tab>('artifacts');
|
|
35
|
+
const [viewport, setViewport] = useState<HTMLElement | null>(null);
|
|
36
|
+
|
|
37
|
+
const [computeRuntime] = useCapabilities(AutomationCapabilities.ComputeRuntime);
|
|
38
|
+
// TODO(burdon): Clear input queue also.
|
|
39
|
+
const handleResetHistory = useCallback(async () => {
|
|
40
|
+
if (!computeRuntime) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const space = Obj.getDatabase(agent);
|
|
45
|
+
if (!space) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const runtime = computeRuntime.getRuntime(space.spaceId);
|
|
50
|
+
await runtime.runPromise(Agent.resetChatHistory(agent));
|
|
51
|
+
if (!agent.queue) {
|
|
52
|
+
await runtime.runPromise(
|
|
53
|
+
Effect.gen(function* () {
|
|
54
|
+
const queue = yield* QueueService.createQueue();
|
|
55
|
+
Obj.update(agent, (agent) => {
|
|
56
|
+
agent.queue = Ref.fromDXN(queue.dxn);
|
|
57
|
+
});
|
|
58
|
+
}),
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
}, [agent, computeRuntime]);
|
|
62
|
+
|
|
63
|
+
const artifacts = useAtomValue(
|
|
64
|
+
useMemo(
|
|
65
|
+
() =>
|
|
66
|
+
AtomObj.make(agent).pipe((agent) =>
|
|
67
|
+
Atom.make((get) => {
|
|
68
|
+
return get(agent)
|
|
69
|
+
.artifacts.map((artifact) => get(AtomRef.make(artifact.data)))
|
|
70
|
+
.filter(isNonNullable);
|
|
71
|
+
}),
|
|
72
|
+
),
|
|
73
|
+
[agent],
|
|
74
|
+
),
|
|
75
|
+
);
|
|
76
|
+
|
|
77
|
+
const inputQueue = useAtomValue(
|
|
78
|
+
AtomObj.make(agent).pipe((_) =>
|
|
79
|
+
Atom.make((get) =>
|
|
80
|
+
Option.fromNullable(get(_).queue).pipe(Option.map(AtomRef.make), Option.map(get), Option.getOrUndefined),
|
|
81
|
+
),
|
|
82
|
+
),
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
const inputObjects = useQuery(inputQueue, Query.select(Filter.everything()));
|
|
86
|
+
|
|
87
|
+
return (
|
|
88
|
+
<Panel.Root role={role}>
|
|
89
|
+
<Panel.Toolbar asChild>
|
|
90
|
+
<Toolbar.Root>
|
|
91
|
+
<Toolbar.ToggleGroup type='single' value={tab} onValueChange={(value) => value && setTab(value as Tab)}>
|
|
92
|
+
<Toolbar.ToggleGroupIconItem value='artifacts' label={t('artifacts.label')} icon='ph--cube--regular' />
|
|
93
|
+
<Toolbar.ToggleGroupIconItem value='inputs' label={t('input-queue.label')} icon='ph--queue--regular' />
|
|
94
|
+
</Toolbar.ToggleGroup>
|
|
95
|
+
<Toolbar.Separator />
|
|
96
|
+
<Toolbar.IconButton
|
|
97
|
+
icon='ph--trash--regular'
|
|
98
|
+
label={t('reset-history.button')}
|
|
99
|
+
onCanPlay={handleResetHistory}
|
|
100
|
+
/>
|
|
101
|
+
</Toolbar.Root>
|
|
102
|
+
</Panel.Toolbar>
|
|
103
|
+
<Panel.Content className='dx-container flex flex-col'>
|
|
104
|
+
{tab === 'artifacts' && (
|
|
105
|
+
<>
|
|
106
|
+
{artifacts.length === 0 && (
|
|
107
|
+
<Message.Root classNames='m-2' valence='info'>
|
|
108
|
+
<Message.Title>{t('project-empty-spec.message')}</Message.Title>
|
|
109
|
+
<Message.Content>{t('project-empty-spec.description')}</Message.Content>
|
|
110
|
+
</Message.Root>
|
|
111
|
+
)}
|
|
112
|
+
|
|
113
|
+
<Masonry.Root Tile={MasonryArtifactTile}>
|
|
114
|
+
<Masonry.Content padding thin centered>
|
|
115
|
+
<Masonry.Viewport items={artifacts} getId={(item: Obj.Unknown) => item.id} />
|
|
116
|
+
</Masonry.Content>
|
|
117
|
+
</Masonry.Root>
|
|
118
|
+
</>
|
|
119
|
+
)}
|
|
120
|
+
|
|
121
|
+
{tab === 'inputs' && (
|
|
122
|
+
<Mosaic.Container asChild withFocus autoScroll={viewport} classNames='dx-document'>
|
|
123
|
+
<ScrollArea.Root orientation='vertical' padding thin centered>
|
|
124
|
+
<ScrollArea.Viewport ref={setViewport}>
|
|
125
|
+
<Mosaic.VirtualStack
|
|
126
|
+
Tile={StackTile}
|
|
127
|
+
classNames='gap-2'
|
|
128
|
+
draggable={false}
|
|
129
|
+
estimateSize={() => 160}
|
|
130
|
+
gap={8}
|
|
131
|
+
getId={(item: Obj.Unknown) => item.id}
|
|
132
|
+
getScrollElement={() => viewport}
|
|
133
|
+
items={inputObjects}
|
|
134
|
+
/>
|
|
135
|
+
</ScrollArea.Viewport>
|
|
136
|
+
</ScrollArea.Root>
|
|
137
|
+
</Mosaic.Container>
|
|
138
|
+
)}
|
|
139
|
+
</Panel.Content>
|
|
140
|
+
</Panel.Root>
|
|
141
|
+
);
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
const ArtifactTileCard = composable<HTMLDivElement, { data: Obj.Unknown }>(({ data, ...props }, forwardedRef) => {
|
|
145
|
+
const objectMenuItems = useObjectMenuItems(data);
|
|
146
|
+
const icon = Function.pipe(
|
|
147
|
+
Obj.getSchema(data),
|
|
148
|
+
Option.fromNullable,
|
|
149
|
+
Option.flatMap(Annotation.IconAnnotation.get),
|
|
150
|
+
Option.map(({ icon }) => icon),
|
|
151
|
+
Option.getOrElse(() => 'ph--placeholder--regular'),
|
|
152
|
+
);
|
|
153
|
+
|
|
154
|
+
return (
|
|
155
|
+
<Card.Root {...props} ref={forwardedRef} data-testid='board-item' fullWidth>
|
|
156
|
+
<Card.Toolbar>
|
|
157
|
+
<Card.IconBlock padding>
|
|
158
|
+
<Card.Icon icon={icon} />
|
|
159
|
+
</Card.IconBlock>
|
|
160
|
+
<Card.Title>{Obj.getLabel(data)}</Card.Title>
|
|
161
|
+
{/* TODO(wittjosiah): Reconcile with Card.Menu. */}
|
|
162
|
+
<Card.IconBlock padding>
|
|
163
|
+
<Menu.Trigger asChild disabled={!objectMenuItems?.length}>
|
|
164
|
+
<Toolbar.IconButton iconOnly variant='ghost' icon='ph--dots-three-vertical--regular' label='Actions' />
|
|
165
|
+
</Menu.Trigger>
|
|
166
|
+
<Menu.Content items={objectMenuItems} />
|
|
167
|
+
</Card.IconBlock>
|
|
168
|
+
</Card.Toolbar>
|
|
169
|
+
<Card.Content>
|
|
170
|
+
<Surface.Surface
|
|
171
|
+
type={AppSurface.Card}
|
|
172
|
+
limit={1}
|
|
173
|
+
data={{ subject: data } satisfies AppSurface.ObjectCardData}
|
|
174
|
+
/>
|
|
175
|
+
</Card.Content>
|
|
176
|
+
</Card.Root>
|
|
177
|
+
);
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
ArtifactTileCard.displayName = 'ArtifactTileCard';
|
|
181
|
+
|
|
182
|
+
const MasonryArtifactTile = ({ data }: { data: Obj.Unknown; index: number }) => (
|
|
183
|
+
<Menu.Root>
|
|
184
|
+
<ArtifactTileCard data={data} />
|
|
185
|
+
</Menu.Root>
|
|
186
|
+
);
|
|
187
|
+
|
|
188
|
+
const StackTile = forwardRef<HTMLDivElement, MosaicTileProps<Obj.Unknown>>(
|
|
189
|
+
({ data, location, debug, current }, forwardedRef) => (
|
|
190
|
+
<Menu.Root>
|
|
191
|
+
<Mosaic.Tile asChild id={data.id} data={data} location={location} debug={debug}>
|
|
192
|
+
<Focus.Item asChild current={current}>
|
|
193
|
+
<ArtifactTileCard ref={forwardedRef} data={data} />
|
|
194
|
+
</Focus.Item>
|
|
195
|
+
</Mosaic.Tile>
|
|
196
|
+
</Menu.Root>
|
|
197
|
+
),
|
|
198
|
+
);
|
|
199
|
+
|
|
200
|
+
StackTile.displayName = 'StackTile';
|