@dxos/plugin-assistant 0.8.4-main.f9ba587 → 0.8.4-main.fcfe5033a5
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-7QMO3LGF.mjs +97 -0
- package/dist/lib/browser/AssistantSettings-7QMO3LGF.mjs.map +7 -0
- package/dist/lib/browser/blueprints/index.mjs +8 -0
- package/dist/lib/browser/blueprints/index.mjs.map +7 -0
- package/dist/lib/browser/chunk-ATHYBVGN.mjs +176 -0
- package/dist/lib/browser/chunk-ATHYBVGN.mjs.map +7 -0
- package/dist/lib/browser/chunk-EZRS3J25.mjs +30 -0
- package/dist/lib/browser/chunk-EZRS3J25.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/browser/chunk-LMVTXH54.mjs +154 -0
- package/dist/lib/browser/chunk-LMVTXH54.mjs.map +7 -0
- package/dist/lib/browser/create-chat-LBZHGVSN.mjs +82 -0
- package/dist/lib/browser/create-chat-LBZHGVSN.mjs.map +7 -0
- package/dist/lib/browser/ensure-companion-chat-ZEZA34MZ.mjs +65 -0
- package/dist/lib/browser/ensure-companion-chat-ZEZA34MZ.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +3410 -223
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/on-create-space-54RNX5JI.mjs +22 -0
- package/dist/lib/browser/on-create-space-54RNX5JI.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-NZOD66NY.mjs +22 -0
- package/dist/lib/browser/resolve-navigation-targets-NZOD66NY.mjs.map +7 -0
- package/dist/lib/browser/run-prompt-in-new-chat-THLK5YQC.mjs +136 -0
- package/dist/lib/browser/run-prompt-in-new-chat-THLK5YQC.mjs.map +7 -0
- package/dist/lib/browser/set-current-chat-LRS3VFSH.mjs +54 -0
- package/dist/lib/browser/set-current-chat-LRS3VFSH.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +8 -14
- package/dist/lib/browser/update-chat-name-3Y36KFAS.mjs +71 -0
- package/dist/lib/browser/update-chat-name-3Y36KFAS.mjs.map +7 -0
- package/dist/lib/node-esm/AssistantSettings-UVUTKO7E.mjs +98 -0
- package/dist/lib/node-esm/AssistantSettings-UVUTKO7E.mjs.map +7 -0
- package/dist/lib/node-esm/blueprints/index.mjs +9 -0
- package/dist/lib/node-esm/blueprints/index.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-NZIKC7AN.mjs +32 -0
- package/dist/lib/node-esm/chunk-NZIKC7AN.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-PXAJSTGZ.mjs +177 -0
- package/dist/lib/node-esm/chunk-PXAJSTGZ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-W3JZ2F4T.mjs +155 -0
- package/dist/lib/node-esm/chunk-W3JZ2F4T.mjs.map +7 -0
- package/dist/lib/node-esm/create-chat-3BEG4R6J.mjs +83 -0
- package/dist/lib/node-esm/create-chat-3BEG4R6J.mjs.map +7 -0
- package/dist/lib/node-esm/ensure-companion-chat-6K2WEWFP.mjs +66 -0
- package/dist/lib/node-esm/ensure-companion-chat-6K2WEWFP.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +3410 -223
- 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-YRPZ6HZY.mjs +23 -0
- package/dist/lib/node-esm/on-create-space-YRPZ6HZY.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-3PPK7XLH.mjs +23 -0
- package/dist/lib/node-esm/resolve-navigation-targets-3PPK7XLH.mjs.map +7 -0
- package/dist/lib/node-esm/run-prompt-in-new-chat-OUYKCMQ7.mjs +137 -0
- package/dist/lib/node-esm/run-prompt-in-new-chat-OUYKCMQ7.mjs.map +7 -0
- package/dist/lib/node-esm/set-current-chat-SMXZJD3F.mjs +55 -0
- package/dist/lib/node-esm/set-current-chat-SMXZJD3F.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +8 -14
- package/dist/lib/node-esm/update-chat-name-HM2P4NSI.mjs +72 -0
- package/dist/lib/node-esm/update-chat-name-HM2P4NSI.mjs.map +7 -0
- package/dist/types/src/AssistantPlugin.d.ts +2 -1
- package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
- 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 +2 -0
- package/dist/types/src/blueprints/index.d.ts.map +1 -0
- 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 +4 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- 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 -6
- 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 +3 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +4 -2
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- 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/components/AssistantSettings/AssistantSettings.d.ts +4 -4
- 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 +41 -19
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/src/components/Chat/events.d.ts +39 -0
- package/dist/types/src/components/Chat/events.d.ts.map +1 -0
- package/dist/types/src/components/Chat/index.d.ts +1 -0
- package/dist/types/src/components/Chat/index.d.ts.map +1 -1
- package/dist/types/src/components/ChatProgress/ChatProgress.d.ts +10 -0
- package/dist/types/src/components/ChatProgress/ChatProgress.d.ts.map +1 -0
- package/dist/types/src/components/ChatProgress/index.d.ts +2 -0
- package/dist/types/src/components/ChatProgress/index.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatActions.d.ts +7 -5
- package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts +22 -0
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -0
- 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 +11 -0
- package/dist/types/src/components/ChatPrompt/ChatPresets.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts +5 -6
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts +7 -4
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/index.d.ts +2 -2
- package/dist/types/src/components/ChatPrompt/index.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.d.ts +13 -17
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +24 -221
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/Link.d.ts +9 -0
- package/dist/types/src/components/ChatThread/Link.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/MarkdownStream.stories.d.ts +35 -0
- package/dist/types/src/components/ChatThread/MarkdownStream.stories.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/registry.d.ts +11 -0
- package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/sync.d.ts +43 -0
- package/dist/types/src/components/ChatThread/sync.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/sync.test.d.ts +2 -0
- package/dist/types/src/components/ChatThread/sync.test.d.ts.map +1 -0
- 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/PromptWidget.d.ts +14 -0
- package/dist/types/src/components/ChatThread/widgets/PromptWidget.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/index.d.ts +11 -0
- package/dist/types/src/components/ChatThread/widgets/index.d.ts.map +1 -0
- package/dist/types/src/components/ProcessTree/ProcessTree.d.ts +10 -0
- package/dist/types/src/components/ProcessTree/ProcessTree.d.ts.map +1 -0
- package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts +8 -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 +9 -11
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +13 -7
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +16 -5
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +10 -2
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/extensions/handlebars-extension.d.ts +12 -0
- package/dist/types/src/components/TemplateEditor/extensions/handlebars-extension.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/extensions/index.d.ts +3 -0
- package/dist/types/src/components/TemplateEditor/extensions/index.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/extensions/xml-extension.d.ts +8 -0
- package/dist/types/src/components/TemplateEditor/extensions/xml-extension.d.ts.map +1 -0
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts +12 -0
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts.map +1 -0
- package/dist/types/src/components/ToolBlock/ToolBlockWidget.d.ts +2 -0
- package/dist/types/src/components/ToolBlock/ToolBlockWidget.d.ts.map +1 -0
- package/dist/types/src/components/ToolBlock/index.d.ts +3 -0
- package/dist/types/src/components/ToolBlock/index.d.ts.map +1 -0
- package/dist/types/src/components/Toolbox/Toolbox.d.ts +17 -21
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +14 -5
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +3 -8
- 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/PromptArticle/PromptArticle.d.ts +6 -0
- package/dist/types/src/containers/PromptArticle/PromptArticle.d.ts.map +1 -0
- package/dist/types/src/containers/PromptArticle/index.d.ts +2 -0
- package/dist/types/src/containers/PromptArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/PromptList/PromptList.d.ts +6 -0
- package/dist/types/src/containers/PromptList/PromptList.d.ts.map +1 -0
- package/dist/types/src/containers/PromptList/PromptList.stories.d.ts +21 -0
- package/dist/types/src/containers/PromptList/PromptList.stories.d.ts.map +1 -0
- package/dist/types/src/containers/PromptList/index.d.ts +2 -0
- package/dist/types/src/containers/PromptList/index.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/TracePanel.d.ts +9 -0
- package/dist/types/src/containers/TracePanel/TracePanel.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/TracePanel.stories.d.ts +15 -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 +17 -0
- package/dist/types/src/containers/TracePanel/execution-graph.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/TriggerStatus/TriggerStatus.d.ts +4 -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 +10 -5
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts +25 -0
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -0
- package/dist/types/src/hooks/useChatProcessor.d.ts +12 -24
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts +10 -0
- package/dist/types/src/hooks/useChatServices.d.ts.map +1 -0
- package/dist/types/src/hooks/useChatToolbarActions.d.ts +8 -0
- package/dist/types/src/hooks/useChatToolbarActions.d.ts.map +1 -0
- package/dist/types/src/hooks/useContextBinder.d.ts +5 -0
- package/dist/types/src/hooks/useContextBinder.d.ts.map +1 -0
- package/dist/types/src/hooks/useContextObjects.d.ts +15 -0
- package/dist/types/src/hooks/useContextObjects.d.ts.map +1 -0
- package/dist/types/src/hooks/useFilteredTypes.d.ts +3 -0
- package/dist/types/src/hooks/useFilteredTypes.d.ts.map +1 -0
- package/dist/types/src/hooks/useFlush.d.ts +6 -0
- package/dist/types/src/hooks/useFlush.d.ts.map +1 -0
- package/dist/types/src/hooks/useOnline.d.ts +3 -0
- package/dist/types/src/hooks/useOnline.d.ts.map +1 -0
- package/dist/types/src/hooks/usePresets.d.ts +7 -0
- package/dist/types/src/hooks/usePresets.d.ts.map +1 -0
- package/dist/types/src/hooks/useReferencesProvider.d.ts +7 -0
- package/dist/types/src/hooks/useReferencesProvider.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +3 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +5 -4
- 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 +135 -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/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 +3 -0
- package/dist/types/src/processor/index.d.ts.map +1 -0
- package/dist/types/src/processor/presets.d.ts +13 -0
- package/dist/types/src/processor/presets.d.ts.map +1 -0
- package/dist/types/src/processor/processor.d.ts +80 -0
- package/dist/types/src/processor/processor.d.ts.map +1 -0
- package/dist/types/src/processor/processor.test.d.ts +2 -0
- package/dist/types/src/processor/processor.test.d.ts.map +1 -0
- package/dist/types/src/queue-logger.d.ts.map +1 -1
- package/dist/types/src/testing/index.d.ts +1 -1
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/test-generator.d.ts +8 -0
- package/dist/types/src/testing/test-generator.d.ts.map +1 -0
- package/dist/types/src/testing/test-sequence.d.ts +0 -4
- package/dist/types/src/testing/test-sequence.d.ts.map +1 -1
- package/dist/types/src/testing/test-services.d.ts +2 -2
- package/dist/types/src/testing/test-services.d.ts.map +1 -1
- 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 -64
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Assistant.d.ts +20 -0
- package/dist/types/src/types/Assistant.d.ts.map +1 -0
- package/dist/types/src/types/Settings.d.ts +11 -0
- package/dist/types/src/types/Settings.d.ts.map +1 -0
- package/dist/types/src/types/capabilities.d.ts +32 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/defs.d.ts +2 -0
- package/dist/types/src/types/defs.d.ts.map +1 -0
- package/dist/types/src/types/events.d.ts +5 -0
- package/dist/types/src/types/events.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +5 -2
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/service.d.ts +14 -213
- package/dist/types/src/types/service.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +151 -93
- package/src/AssistantPlugin.tsx +222 -114
- 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/{components/SequenceEditor → blueprints}/index.ts +1 -1
- package/src/capabilities/ai-service.ts +30 -0
- package/src/capabilities/app-graph-builder.ts +192 -227
- package/src/capabilities/blueprint-definition.ts +58 -0
- package/src/capabilities/companion-chat-provisioner.ts +164 -0
- package/src/capabilities/edge-model-resolver.ts +33 -0
- package/src/capabilities/index.ts +21 -8
- package/src/capabilities/local-model-resolver.ts +48 -0
- package/src/capabilities/markdown.ts +40 -0
- package/src/capabilities/migrations.ts +35 -0
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +140 -123
- package/src/capabilities/settings.ts +24 -12
- package/src/capabilities/state.ts +35 -0
- package/src/capabilities/toolkit.ts +13 -0
- package/src/components/AssistantSettings/AssistantSettings.stories.tsx +34 -0
- package/src/components/AssistantSettings/AssistantSettings.tsx +102 -75
- package/src/components/AssistantSettings/index.ts +2 -2
- package/src/components/Chat/Chat.tsx +310 -184
- package/src/components/Chat/events.ts +63 -0
- package/src/components/Chat/index.ts +2 -0
- package/src/components/ChatProgress/ChatProgress.tsx +56 -0
- package/src/components/ChatProgress/index.ts +5 -0
- package/src/components/ChatPrompt/ChatActions.tsx +46 -47
- package/src/components/ChatPrompt/ChatOptions.stories.tsx +122 -0
- package/src/components/ChatPrompt/ChatOptions.tsx +404 -0
- package/src/components/ChatPrompt/ChatPresets.tsx +29 -0
- package/src/components/ChatPrompt/ChatReferences.tsx +42 -37
- package/src/components/ChatPrompt/ChatStatusIndicator.tsx +33 -17
- package/src/components/ChatPrompt/index.ts +2 -3
- package/src/components/ChatThread/ChatThread.stories.tsx +120 -125
- package/src/components/ChatThread/ChatThread.tsx +80 -50
- package/src/components/ChatThread/Link.tsx +26 -0
- package/src/components/ChatThread/MarkdownStream.stories.tsx +243 -0
- package/src/components/ChatThread/registry.tsx +238 -0
- package/src/components/ChatThread/sync.test.ts +99 -0
- package/src/components/ChatThread/sync.ts +165 -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-2.md +56 -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/PromptWidget.ts +28 -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 +31 -0
- package/src/components/ChatThread/widgets/SelectWidget.ts +37 -0
- package/src/components/ChatThread/widgets/StatsWidget.ts +29 -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 +28 -0
- package/src/components/ChatThread/widgets/ToolWidget.stories.tsx +54 -0
- package/src/components/ChatThread/widgets/ToolWidget.tsx +156 -0
- package/src/components/ChatThread/widgets/index.ts +14 -0
- package/src/components/ProcessTree/ProcessTree.stories.tsx +109 -0
- package/src/components/ProcessTree/ProcessTree.tsx +86 -0
- package/src/components/ProcessTree/index.ts +5 -0
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +54 -43
- package/src/components/TemplateEditor/TemplateEditor.tsx +62 -60
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +39 -25
- package/src/components/TemplateEditor/TemplateForm.tsx +123 -81
- package/src/components/TemplateEditor/extensions/handlebars-extension.ts +274 -0
- package/src/components/TemplateEditor/extensions/index.ts +6 -0
- package/src/components/TemplateEditor/extensions/xml-extension.ts +64 -0
- package/src/components/ToolBlock/ToolBlock.tsx +144 -0
- package/src/components/ToolBlock/ToolBlockWidget.tsx +5 -0
- package/src/components/ToolBlock/index.ts +6 -0
- package/src/components/Toolbox/Toolbox.stories.tsx +17 -29
- package/src/components/Toolbox/Toolbox.tsx +88 -110
- package/src/components/index.ts +3 -11
- package/src/containers/AgentArticle/AgentArticle.stories.tsx +120 -0
- package/src/containers/AgentArticle/AgentArticle.tsx +198 -0
- package/src/containers/AgentArticle/index.ts +5 -0
- package/src/containers/AgentProperties/AgentProperties.stories.tsx +100 -0
- package/src/containers/AgentProperties/AgentProperties.tsx +158 -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/containers/ChatCompanion/ChatCompanion.tsx +142 -0
- package/src/containers/ChatCompanion/index.ts +5 -0
- package/src/containers/ChatContainer/ChatContainer.tsx +95 -0
- package/src/containers/ChatContainer/index.ts +5 -0
- package/src/containers/ChatDialog/ChatDialog.tsx +72 -0
- package/src/containers/ChatDialog/index.ts +5 -0
- package/src/containers/PromptArticle/PromptArticle.tsx +59 -0
- package/src/containers/PromptArticle/index.ts +5 -0
- package/src/containers/PromptList/PromptList.stories.tsx +129 -0
- package/src/containers/PromptList/PromptList.tsx +49 -0
- package/src/containers/PromptList/index.ts +5 -0
- package/src/containers/TracePanel/TracePanel.stories.tsx +230 -0
- package/src/containers/TracePanel/TracePanel.tsx +114 -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.ts +425 -0
- package/src/containers/TracePanel/index.ts +9 -0
- package/src/containers/TriggerStatus/TriggerStatus.tsx +144 -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 +10 -6
- package/src/hooks/useBlueprintRegistry.ts +109 -0
- package/src/hooks/useChatProcessor.ts +90 -0
- package/src/hooks/useChatServices.ts +26 -0
- package/src/hooks/useChatToolbarActions.ts +122 -0
- package/src/hooks/useContextBinder.ts +43 -0
- package/src/hooks/useContextObjects.ts +50 -0
- package/src/hooks/useFilteredTypes.ts +37 -0
- package/src/hooks/useFlush.ts +35 -0
- package/src/hooks/useOnline.ts +10 -0
- package/src/hooks/usePresets.ts +45 -0
- package/src/hooks/useReferencesProvider.ts +54 -0
- package/src/index.ts +3 -2
- package/src/meta.ts +15 -9
- package/src/operations/create-chat.ts +80 -0
- package/src/operations/definitions.ts +127 -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/resolve-navigation-targets.ts +26 -0
- package/src/operations/run-prompt-in-new-chat.ts +113 -0
- package/src/operations/set-current-chat.ts +50 -0
- package/src/operations/update-chat-name.ts +61 -0
- package/src/processor/index.ts +6 -0
- package/src/processor/presets.ts +68 -0
- package/src/processor/processor.test.ts +40 -0
- package/src/processor/processor.ts +321 -0
- package/src/queue-logger.ts +33 -23
- package/src/testing/index.ts +1 -1
- package/src/testing/test-generator.ts +293 -0
- package/src/testing/test-sequence.ts +5 -32
- package/src/testing/test-services.ts +10 -14
- package/src/testing/trace-timeline.conversations.json +1 -0
- package/src/testing/trace-timeline.test.ts +246 -0
- package/src/translations.ts +166 -55
- package/src/types/Assistant.ts +14 -0
- package/src/types/Settings.ts +21 -0
- package/src/types/capabilities.ts +35 -0
- package/src/types/defs.ts +5 -0
- package/src/types/events.ts +11 -0
- package/src/types/index.ts +8 -2
- package/src/types/service.ts +27 -16
- package/src/vite-env.d.ts +30 -0
- package/dist/lib/browser/ChatContainer-6XNB5NEI.mjs +0 -57
- package/dist/lib/browser/ChatContainer-6XNB5NEI.mjs.map +0 -7
- package/dist/lib/browser/ChatDialog-IMWPRXTO.mjs +0 -74
- package/dist/lib/browser/ChatDialog-IMWPRXTO.mjs.map +0 -7
- package/dist/lib/browser/SequenceContainer-6XOYB2RN.mjs +0 -322
- package/dist/lib/browser/SequenceContainer-6XOYB2RN.mjs.map +0 -7
- package/dist/lib/browser/TemplateContainer-6ZGGH5T4.mjs +0 -28
- package/dist/lib/browser/TemplateContainer-6ZGGH5T4.mjs.map +0 -7
- package/dist/lib/browser/ai-client-ML7OQWAO.mjs +0 -39
- package/dist/lib/browser/ai-client-ML7OQWAO.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-UJ5NHRGK.mjs +0 -223
- package/dist/lib/browser/app-graph-builder-UJ5NHRGK.mjs.map +0 -7
- package/dist/lib/browser/chunk-44HZKIAW.mjs +0 -87
- package/dist/lib/browser/chunk-44HZKIAW.mjs.map +0 -7
- package/dist/lib/browser/chunk-LKP65RPA.mjs +0 -20
- package/dist/lib/browser/chunk-LKP65RPA.mjs.map +0 -7
- package/dist/lib/browser/chunk-NTBGTFTV.mjs +0 -15
- package/dist/lib/browser/chunk-NTBGTFTV.mjs.map +0 -7
- package/dist/lib/browser/chunk-OZL4OHTU.mjs +0 -157
- package/dist/lib/browser/chunk-OZL4OHTU.mjs.map +0 -7
- package/dist/lib/browser/chunk-TQ3QW3HJ.mjs +0 -2072
- package/dist/lib/browser/chunk-TQ3QW3HJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-TU7UUGWQ.mjs +0 -203
- package/dist/lib/browser/chunk-TU7UUGWQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-WPZ4UANI.mjs +0 -16
- package/dist/lib/browser/chunk-WPZ4UANI.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-LEAPB55Q.mjs +0 -42
- package/dist/lib/browser/intent-resolver-LEAPB55Q.mjs.map +0 -7
- package/dist/lib/browser/react-surface-TMF7JJA4.mjs +0 -156
- package/dist/lib/browser/react-surface-TMF7JJA4.mjs.map +0 -7
- package/dist/lib/browser/settings-N4HEXADL.mjs +0 -22
- package/dist/lib/browser/settings-N4HEXADL.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-VOLG7J6N.mjs +0 -58
- package/dist/lib/node-esm/ChatContainer-VOLG7J6N.mjs.map +0 -7
- package/dist/lib/node-esm/ChatDialog-B2XNUNRM.mjs +0 -75
- package/dist/lib/node-esm/ChatDialog-B2XNUNRM.mjs.map +0 -7
- package/dist/lib/node-esm/SequenceContainer-WWG6IMN3.mjs +0 -323
- package/dist/lib/node-esm/SequenceContainer-WWG6IMN3.mjs.map +0 -7
- package/dist/lib/node-esm/TemplateContainer-6KRNEMVE.mjs +0 -29
- package/dist/lib/node-esm/TemplateContainer-6KRNEMVE.mjs.map +0 -7
- package/dist/lib/node-esm/ai-client-2FQ434CT.mjs +0 -40
- package/dist/lib/node-esm/ai-client-2FQ434CT.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-MEQ5CYNI.mjs +0 -224
- package/dist/lib/node-esm/app-graph-builder-MEQ5CYNI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-D3HTVK5D.mjs +0 -2073
- package/dist/lib/node-esm/chunk-D3HTVK5D.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-E6V2RUQ2.mjs +0 -16
- package/dist/lib/node-esm/chunk-E6V2RUQ2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HVMVHP4R.mjs +0 -158
- package/dist/lib/node-esm/chunk-HVMVHP4R.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HXKRKIN2.mjs +0 -18
- package/dist/lib/node-esm/chunk-HXKRKIN2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-KOC6ESG7.mjs +0 -22
- package/dist/lib/node-esm/chunk-KOC6ESG7.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-VESVUAOS.mjs +0 -88
- package/dist/lib/node-esm/chunk-VESVUAOS.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YYUVTTVK.mjs +0 -204
- package/dist/lib/node-esm/chunk-YYUVTTVK.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-4ULF3F7U.mjs +0 -43
- package/dist/lib/node-esm/intent-resolver-4ULF3F7U.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-6XL6SWL2.mjs +0 -157
- package/dist/lib/node-esm/react-surface-6XL6SWL2.mjs.map +0 -7
- package/dist/lib/node-esm/settings-WQ76EG6O.mjs +0 -23
- package/dist/lib/node-esm/settings-WQ76EG6O.mjs.map +0 -7
- package/dist/types/src/capabilities/ai-client.d.ts +0 -5
- package/dist/types/src/capabilities/ai-client.d.ts.map +0 -1
- package/dist/types/src/capabilities/capabilities.d.ts +0 -6
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/components/ChatContainer.d.ts +0 -11
- 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/ChatPrompt/ChatOptionsMenu.d.ts +0 -9
- package/dist/types/src/components/ChatPrompt/ChatOptionsMenu.d.ts.map +0 -1
- package/dist/types/src/components/ChatPrompt/events.d.ts +0 -17
- package/dist/types/src/components/ChatPrompt/events.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/ChatMessage.d.ts +0 -18
- package/dist/types/src/components/ChatThread/ChatMessage.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/ToolBlock.d.ts +0 -18
- package/dist/types/src/components/ChatThread/ToolBlock.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/reducer.d.ts +0 -12
- package/dist/types/src/components/ChatThread/reducer.d.ts.map +0 -1
- package/dist/types/src/components/PromptSettings.d.ts +0 -6
- package/dist/types/src/components/PromptSettings.d.ts.map +0 -1
- package/dist/types/src/components/SequenceContainer.d.ts +0 -9
- package/dist/types/src/components/SequenceContainer.d.ts.map +0 -1
- package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts +0 -13
- package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts.map +0 -1
- package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts +0 -8
- package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts.map +0 -1
- package/dist/types/src/components/SequenceEditor/index.d.ts +0 -2
- package/dist/types/src/components/SequenceEditor/index.d.ts.map +0 -1
- package/dist/types/src/components/TemplateContainer.d.ts +0 -9
- package/dist/types/src/components/TemplateContainer.d.ts.map +0 -1
- package/dist/types/src/events.d.ts +0 -4
- package/dist/types/src/events.d.ts.map +0 -1
- package/dist/types/src/hooks/chat-processor.d.ts +0 -82
- package/dist/types/src/hooks/chat-processor.d.ts.map +0 -1
- package/dist/types/src/hooks/chat-processor.test.d.ts +0 -2
- package/dist/types/src/hooks/chat-processor.test.d.ts.map +0 -1
- package/dist/types/src/hooks/useBlueprints.d.ts +0 -4
- package/dist/types/src/hooks/useBlueprints.d.ts.map +0 -1
- package/dist/types/src/hooks/useContextProvider.d.ts +0 -23
- package/dist/types/src/hooks/useContextProvider.d.ts.map +0 -1
- package/dist/types/src/hooks/useServiceContainer.d.ts +0 -8
- package/dist/types/src/hooks/useServiceContainer.d.ts.map +0 -1
- package/dist/types/src/hooks/useTextInputEvents.d.ts +0 -13
- package/dist/types/src/hooks/useTextInputEvents.d.ts.map +0 -1
- package/dist/types/src/parser/filter-generator.d.ts +0 -4
- package/dist/types/src/parser/filter-generator.d.ts.map +0 -1
- package/dist/types/src/parser/filter-generator.test.d.ts +0 -2
- package/dist/types/src/parser/filter-generator.test.d.ts.map +0 -1
- package/dist/types/src/parser/index.d.ts +0 -4
- package/dist/types/src/parser/index.d.ts.map +0 -1
- package/dist/types/src/parser/query-parser.d.ts +0 -15
- package/dist/types/src/parser/query-parser.d.ts.map +0 -1
- package/dist/types/src/parser/query-parser.test.d.ts +0 -2
- package/dist/types/src/parser/query-parser.test.d.ts.map +0 -1
- package/dist/types/src/parser/types.d.ts +0 -24
- package/dist/types/src/parser/types.d.ts.map +0 -1
- package/dist/types/src/stories/Chat.stories.d.ts +0 -199
- package/dist/types/src/stories/Chat.stories.d.ts.map +0 -1
- package/dist/types/src/testing/test-functions.d.ts +0 -3
- package/dist/types/src/testing/test-functions.d.ts.map +0 -1
- package/dist/types/src/tools/function.d.ts +0 -5
- package/dist/types/src/tools/function.d.ts.map +0 -1
- package/dist/types/src/tools/index.d.ts +0 -3
- package/dist/types/src/tools/index.d.ts.map +0 -1
- package/dist/types/src/tools/openapi.d.ts +0 -10
- package/dist/types/src/tools/openapi.d.ts.map +0 -1
- package/dist/types/src/tools/openapi.test.d.ts +0 -2
- package/dist/types/src/tools/openapi.test.d.ts.map +0 -1
- package/dist/types/src/types/schema.d.ts +0 -71
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/dist/types/src/types/template.d.ts +0 -56
- package/dist/types/src/types/template.d.ts.map +0 -1
- package/src/capabilities/ai-client.ts +0 -39
- package/src/capabilities/capabilities.ts +0 -14
- package/src/capabilities/intent-resolver.ts +0 -45
- package/src/components/ChatContainer.tsx +0 -45
- package/src/components/ChatDialog.tsx +0 -65
- package/src/components/ChatPrompt/ChatOptionsMenu.tsx +0 -52
- package/src/components/ChatPrompt/events.ts +0 -12
- package/src/components/ChatThread/ChatMessage.tsx +0 -238
- package/src/components/ChatThread/ToolBlock.tsx +0 -111
- package/src/components/ChatThread/reducer.ts +0 -52
- package/src/components/PromptSettings.tsx +0 -91
- package/src/components/SequenceContainer.tsx +0 -139
- package/src/components/SequenceEditor/SequenceEditor.stories.tsx +0 -32
- package/src/components/SequenceEditor/SequenceEditor.tsx +0 -50
- package/src/components/TemplateContainer.tsx +0 -25
- package/src/events.ts +0 -11
- package/src/hooks/chat-processor.test.ts +0 -15
- package/src/hooks/chat-processor.ts +0 -281
- package/src/hooks/useBlueprints.ts +0 -31
- package/src/hooks/useChatProcessor.tsx +0 -142
- package/src/hooks/useContextProvider.ts +0 -61
- package/src/hooks/useServiceContainer.ts +0 -42
- package/src/hooks/useTextInputEvents.ts +0 -49
- package/src/parser/filter-generator.test.ts +0 -32
- package/src/parser/filter-generator.ts +0 -81
- package/src/parser/index.ts +0 -7
- package/src/parser/query-parser.test.ts +0 -139
- package/src/parser/query-parser.ts +0 -199
- package/src/parser/types.ts +0 -34
- package/src/shims.d.ts +0 -8
- package/src/stories/Chat.stories.tsx +0 -269
- package/src/testing/test-functions.ts +0 -11
- package/src/tools/function.ts +0 -46
- package/src/tools/index.ts +0 -6
- package/src/tools/openapi.test.ts +0 -217
- package/src/tools/openapi.ts +0 -338
- package/src/types/schema.ts +0 -86
- package/src/types/template.ts +0 -66
- package/src/typings.d.ts +0 -9
|
@@ -2,109 +2,84 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import React, {
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { type ArtifactDefinition } from '@dxos/artifact';
|
|
10
|
-
import { type Blueprint } from '@dxos/assistant';
|
|
11
|
-
import { type Ref } from '@dxos/echo';
|
|
12
|
-
import { FunctionType } from '@dxos/functions';
|
|
5
|
+
import React, { Fragment, useEffect, useState } from 'react';
|
|
6
|
+
|
|
7
|
+
import { type Blueprint } from '@dxos/blueprints';
|
|
8
|
+
import { type Database, type Ref } from '@dxos/echo';
|
|
13
9
|
import { log } from '@dxos/log';
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { mx } from '@dxos/
|
|
18
|
-
|
|
19
|
-
import { type ChatProcessor } from '../../hooks';
|
|
20
|
-
import { meta } from '../../meta';
|
|
21
|
-
import { createToolsFromService } from '../../tools';
|
|
22
|
-
import { ServiceType } from '../../types';
|
|
23
|
-
|
|
24
|
-
export type ToolboxProps = ThemedClassName<{
|
|
25
|
-
blueprints?: readonly Ref.Ref<Blueprint>[];
|
|
26
|
-
artifacts?: ArtifactDefinition[];
|
|
27
|
-
services?: { service: ServiceType; tools: Tool[] }[];
|
|
28
|
-
functions?: FunctionType[];
|
|
29
|
-
activeBlueprints?: readonly Ref.Ref<Blueprint>[];
|
|
30
|
-
striped?: boolean;
|
|
31
|
-
}>;
|
|
10
|
+
import { Operation } from '@dxos/operation';
|
|
11
|
+
import { Filter, useQuery } from '@dxos/react-client/echo';
|
|
12
|
+
import { ScrollArea, type ThemedClassName } from '@dxos/react-ui';
|
|
13
|
+
import { composable, composableProps, mx } from '@dxos/ui-theme';
|
|
32
14
|
|
|
33
|
-
|
|
34
|
-
classNames,
|
|
35
|
-
artifacts,
|
|
36
|
-
functions,
|
|
37
|
-
services,
|
|
38
|
-
blueprints,
|
|
39
|
-
activeBlueprints,
|
|
40
|
-
striped,
|
|
41
|
-
}: ToolboxProps) => {
|
|
42
|
-
const { t } = useTranslation(meta.id);
|
|
15
|
+
import { ServiceType } from '#types';
|
|
43
16
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
subitems: target?.tools.map((toolId) => ({ name: `∙ ${parseToolName(toolId)}` })),
|
|
53
|
-
}))}
|
|
54
|
-
/>
|
|
55
|
-
)}
|
|
56
|
-
|
|
57
|
-
{activeBlueprints && activeBlueprints.length > 0 && (
|
|
58
|
-
<Section
|
|
59
|
-
title='Blueprints'
|
|
60
|
-
items={activeBlueprints.map(({ target }) => ({
|
|
61
|
-
name: target?.name ?? '',
|
|
62
|
-
description: target?.description ?? '',
|
|
63
|
-
subitems: target?.tools.map((toolId) => ({ name: `∙ ${parseToolName(toolId)}` })),
|
|
64
|
-
}))}
|
|
65
|
-
/>
|
|
66
|
-
)}
|
|
67
|
-
|
|
68
|
-
{artifacts && artifacts.length > 0 && (
|
|
69
|
-
<Section
|
|
70
|
-
title='Artifacts'
|
|
71
|
-
items={artifacts.map(({ name, description, tools }) => ({
|
|
72
|
-
name,
|
|
73
|
-
description,
|
|
74
|
-
subitems: tools.map(({ name, description }) => ({ name: `∙ ${parseToolName(name)}`, description })),
|
|
75
|
-
}))}
|
|
76
|
-
/>
|
|
77
|
-
)}
|
|
78
|
-
|
|
79
|
-
{services && services.length > 0 && (
|
|
80
|
-
<Section
|
|
81
|
-
title='Services'
|
|
82
|
-
items={services.map(({ service: { serviceId, name, description }, tools }) => ({
|
|
83
|
-
name: name ?? serviceId,
|
|
84
|
-
description,
|
|
85
|
-
subitems: tools.map(({ name, description }) => ({ name: `∙ ${name}`, description })),
|
|
86
|
-
}))}
|
|
87
|
-
/>
|
|
88
|
-
)}
|
|
89
|
-
|
|
90
|
-
{functions && functions.length > 0 && (
|
|
91
|
-
<Section title='Functions' items={functions.map(({ name, description }) => ({ name, description }))} />
|
|
92
|
-
)}
|
|
93
|
-
|
|
94
|
-
{!blueprints?.length &&
|
|
95
|
-
!activeBlueprints?.length &&
|
|
96
|
-
!artifacts?.length &&
|
|
97
|
-
!services?.length &&
|
|
98
|
-
!functions?.length && <div>{t('no tools')}</div>}
|
|
99
|
-
</div>
|
|
100
|
-
);
|
|
17
|
+
import { type AiChatProcessor } from '../../processor';
|
|
18
|
+
|
|
19
|
+
export type ToolboxProps = {
|
|
20
|
+
services?: { service: ServiceType }[];
|
|
21
|
+
functions?: Operation.PersistentOperation[];
|
|
22
|
+
// TODO(burdon): Combine into single array.
|
|
23
|
+
blueprints?: readonly Blueprint.Blueprint[];
|
|
24
|
+
activeBlueprints?: readonly Ref.Ref<Blueprint.Blueprint>[];
|
|
101
25
|
};
|
|
102
26
|
|
|
103
|
-
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 = {
|
|
104
77
|
title: string;
|
|
105
78
|
items: { name: string; description?: string; subitems?: { name: string; description?: string }[] }[];
|
|
106
79
|
striped?: boolean;
|
|
107
|
-
}
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const Section = ({ title, items, striped }: SectionProps) => {
|
|
108
83
|
const stripeClassNames = 'odd:bg-neutral-50 dark:odd:bg-neutral-800';
|
|
109
84
|
const gridClassNames = 'grid grid-cols-[8rem_1fr]';
|
|
110
85
|
const subGridClassNames = mx('col-span-full grid grid-cols-subgrid text-xs px-2', striped && stripeClassNames);
|
|
@@ -134,36 +109,39 @@ const Section: FC<{
|
|
|
134
109
|
);
|
|
135
110
|
};
|
|
136
111
|
|
|
137
|
-
export type
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
const artifactDefinitions = useCapabilities(Capabilities.ArtifactDefinition);
|
|
112
|
+
export type ToolboxPanelProps = ThemedClassName<{
|
|
113
|
+
db?: Database.Database;
|
|
114
|
+
processor?: AiChatProcessor;
|
|
115
|
+
}>;
|
|
142
116
|
|
|
117
|
+
export const ToolboxPanel = ({ classNames, db, processor }: ToolboxPanelProps) => {
|
|
143
118
|
// Registered services.
|
|
144
|
-
const services = useQuery(
|
|
145
|
-
const [serviceTools, setServiceTools] = useState<{ service: ServiceType
|
|
119
|
+
const services = useQuery(db, Filter.type(ServiceType));
|
|
120
|
+
const [serviceTools, setServiceTools] = useState<{ service: ServiceType }[]>([]);
|
|
146
121
|
useEffect(() => {
|
|
147
122
|
log('creating service tools...', { services: services.length });
|
|
148
123
|
queueMicrotask(async () => {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
)
|
|
152
|
-
|
|
153
|
-
setServiceTools(tools);
|
|
124
|
+
// TODO(burdon): Fix.
|
|
125
|
+
// const tools = await Promise.all(
|
|
126
|
+
// services.map(async (service) => ({ service, tools: await createToolsFromService(service) })),
|
|
127
|
+
// );
|
|
128
|
+
// setServiceTools(tools);
|
|
154
129
|
});
|
|
155
130
|
}, [services]);
|
|
156
131
|
|
|
157
132
|
// Deployed functions.
|
|
158
|
-
const functions = useQuery(
|
|
133
|
+
const functions = useQuery(db, Filter.type(Operation.PersistentOperation));
|
|
159
134
|
|
|
160
135
|
return (
|
|
161
136
|
<Toolbox
|
|
162
137
|
classNames={classNames}
|
|
163
|
-
blueprints={processor?.context.
|
|
164
|
-
artifacts={artifactDefinitions}
|
|
138
|
+
blueprints={processor?.context.getBlueprints()}
|
|
165
139
|
services={serviceTools}
|
|
166
140
|
functions={functions}
|
|
167
141
|
/>
|
|
168
142
|
);
|
|
169
143
|
};
|
|
144
|
+
|
|
145
|
+
const safeToolId = (name: string) => {
|
|
146
|
+
return name.split('_').pop();
|
|
147
|
+
};
|
package/src/components/index.ts
CHANGED
|
@@ -2,19 +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';
|
|
9
|
-
export * from './
|
|
8
|
+
export * from './ProcessTree';
|
|
10
9
|
export * from './TemplateEditor';
|
|
11
10
|
export * from './Toolbox';
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
// Repro: open assistant dialog then close.
|
|
15
|
-
// https://github.com/microsoft/fluentui/issues/34020
|
|
16
|
-
|
|
17
|
-
export const ChatContainer = lazy(() => import('./ChatContainer'));
|
|
18
|
-
export const ChatDialog = lazy(() => import('./ChatDialog'));
|
|
19
|
-
export const SequenceContainer = lazy(() => import('./SequenceContainer'));
|
|
20
|
-
export const TemplateContainer = lazy(() => import('./TemplateContainer'));
|
|
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
|
+
|
|
26
|
+
import { AssistantPlugin } from '../../AssistantPlugin';
|
|
27
|
+
import { translations } from '../../translations';
|
|
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,198 @@
|
|
|
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.change(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 items={artifacts} getId={(item: Obj.Unknown) => item.id} padding thin centered />
|
|
115
|
+
</Masonry.Root>
|
|
116
|
+
</>
|
|
117
|
+
)}
|
|
118
|
+
|
|
119
|
+
{tab === 'inputs' && (
|
|
120
|
+
<Mosaic.Container asChild withFocus autoScroll={viewport} classNames='dx-document'>
|
|
121
|
+
<ScrollArea.Root orientation='vertical' padding thin centered>
|
|
122
|
+
<ScrollArea.Viewport ref={setViewport}>
|
|
123
|
+
<Mosaic.VirtualStack
|
|
124
|
+
Tile={StackTile}
|
|
125
|
+
classNames='gap-2'
|
|
126
|
+
draggable={false}
|
|
127
|
+
estimateSize={() => 160}
|
|
128
|
+
gap={8}
|
|
129
|
+
getId={(item: Obj.Unknown) => item.id}
|
|
130
|
+
getScrollElement={() => viewport}
|
|
131
|
+
items={inputObjects}
|
|
132
|
+
/>
|
|
133
|
+
</ScrollArea.Viewport>
|
|
134
|
+
</ScrollArea.Root>
|
|
135
|
+
</Mosaic.Container>
|
|
136
|
+
)}
|
|
137
|
+
</Panel.Content>
|
|
138
|
+
</Panel.Root>
|
|
139
|
+
);
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
const ArtifactTileCard = composable<HTMLDivElement, { data: Obj.Unknown }>(({ data, ...props }, forwardedRef) => {
|
|
143
|
+
const objectMenuItems = useObjectMenuItems(data);
|
|
144
|
+
const icon = Function.pipe(
|
|
145
|
+
Obj.getSchema(data),
|
|
146
|
+
Option.fromNullable,
|
|
147
|
+
Option.flatMap(Annotation.IconAnnotation.get),
|
|
148
|
+
Option.map(({ icon }) => icon),
|
|
149
|
+
Option.getOrElse(() => 'ph--placeholder--regular'),
|
|
150
|
+
);
|
|
151
|
+
|
|
152
|
+
return (
|
|
153
|
+
<Card.Root {...props} ref={forwardedRef} data-testid='board-item' fullWidth>
|
|
154
|
+
<Card.Toolbar>
|
|
155
|
+
<Card.IconBlock padding>
|
|
156
|
+
<Card.Icon icon={icon} />
|
|
157
|
+
</Card.IconBlock>
|
|
158
|
+
<Card.Title>{Obj.getLabel(data)}</Card.Title>
|
|
159
|
+
{/* TODO(wittjosiah): Reconcile with Card.Menu. */}
|
|
160
|
+
<Card.IconBlock padding>
|
|
161
|
+
<Menu.Trigger asChild disabled={!objectMenuItems?.length}>
|
|
162
|
+
<Toolbar.IconButton iconOnly variant='ghost' icon='ph--dots-three-vertical--regular' label='Actions' />
|
|
163
|
+
</Menu.Trigger>
|
|
164
|
+
<Menu.Content items={objectMenuItems} />
|
|
165
|
+
</Card.IconBlock>
|
|
166
|
+
</Card.Toolbar>
|
|
167
|
+
<Card.Content>
|
|
168
|
+
<Surface.Surface
|
|
169
|
+
type={AppSurface.Card}
|
|
170
|
+
limit={1}
|
|
171
|
+
data={{ subject: data } satisfies AppSurface.ObjectCardData}
|
|
172
|
+
/>
|
|
173
|
+
</Card.Content>
|
|
174
|
+
</Card.Root>
|
|
175
|
+
);
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
ArtifactTileCard.displayName = 'ArtifactTileCard';
|
|
179
|
+
|
|
180
|
+
const MasonryArtifactTile = ({ data }: { data: Obj.Unknown; index: number }) => (
|
|
181
|
+
<Menu.Root>
|
|
182
|
+
<ArtifactTileCard data={data} />
|
|
183
|
+
</Menu.Root>
|
|
184
|
+
);
|
|
185
|
+
|
|
186
|
+
const StackTile = forwardRef<HTMLDivElement, MosaicTileProps<Obj.Unknown>>(
|
|
187
|
+
({ data, location, debug, current }, forwardedRef) => (
|
|
188
|
+
<Menu.Root>
|
|
189
|
+
<Mosaic.Tile asChild id={data.id} data={data} location={location} debug={debug}>
|
|
190
|
+
<Focus.Item asChild current={current}>
|
|
191
|
+
<ArtifactTileCard ref={forwardedRef} data={data} />
|
|
192
|
+
</Focus.Item>
|
|
193
|
+
</Mosaic.Tile>
|
|
194
|
+
</Menu.Root>
|
|
195
|
+
),
|
|
196
|
+
);
|
|
197
|
+
|
|
198
|
+
StackTile.displayName = 'StackTile';
|
|
@@ -0,0 +1,100 @@
|
|
|
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 { log } from '@dxos/log';
|
|
13
|
+
import { AutomationPlugin } from '@dxos/plugin-automation';
|
|
14
|
+
import { ClientPlugin } from '@dxos/plugin-client';
|
|
15
|
+
import { initializeIdentity } from '@dxos/plugin-client/testing';
|
|
16
|
+
import { corePlugins } from '@dxos/plugin-testing';
|
|
17
|
+
import { Filter, useQuery, useSpaces } from '@dxos/react-client/echo';
|
|
18
|
+
import { Button } from '@dxos/react-ui';
|
|
19
|
+
import { ObjectProperties } from '@dxos/react-ui-form';
|
|
20
|
+
import { Loading, withLayout } from '@dxos/react-ui/testing';
|
|
21
|
+
import { Text } from '@dxos/schema';
|
|
22
|
+
import { Organization } from '@dxos/types';
|
|
23
|
+
|
|
24
|
+
import { AssistantPlugin } from '../../AssistantPlugin';
|
|
25
|
+
import { translations } from '../../translations';
|
|
26
|
+
import { AgentProperties } from './AgentProperties';
|
|
27
|
+
|
|
28
|
+
type DefaultStoryProps = {};
|
|
29
|
+
|
|
30
|
+
const DefaultStory = (_: DefaultStoryProps) => {
|
|
31
|
+
const [space] = useSpaces();
|
|
32
|
+
const [agent] = useQuery(space?.db, Filter.type(Agent.Agent));
|
|
33
|
+
if (!agent) {
|
|
34
|
+
return <Loading />;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<ObjectProperties object={agent}>
|
|
39
|
+
<AgentProperties role='object-properties' subject={agent} />
|
|
40
|
+
<Button
|
|
41
|
+
classNames='mt-form-gap'
|
|
42
|
+
onClick={() => {
|
|
43
|
+
log.info('agent', { agent, instructions: agent.instructions.target });
|
|
44
|
+
}}
|
|
45
|
+
>
|
|
46
|
+
Debug
|
|
47
|
+
</Button>
|
|
48
|
+
</ObjectProperties>
|
|
49
|
+
);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const meta = {
|
|
53
|
+
title: 'plugins/plugin-assistant/containers/AgentProperties',
|
|
54
|
+
render: DefaultStory,
|
|
55
|
+
decorators: [
|
|
56
|
+
withLayout({ layout: 'column' }),
|
|
57
|
+
withPluginManager({
|
|
58
|
+
plugins: [
|
|
59
|
+
...corePlugins(),
|
|
60
|
+
ClientPlugin({
|
|
61
|
+
types: [Agent.Agent, Plan.Plan, Text.Text, Organization.Organization],
|
|
62
|
+
onClientInitialized: ({ client }) =>
|
|
63
|
+
Effect.gen(function* () {
|
|
64
|
+
yield* initializeIdentity(client);
|
|
65
|
+
const [space] = client.spaces.get();
|
|
66
|
+
yield* Effect.promise(() => space.waitUntilReady());
|
|
67
|
+
|
|
68
|
+
const organization = space.db.add(
|
|
69
|
+
Obj.make(Organization.Organization, {
|
|
70
|
+
name: 'Acme Corp',
|
|
71
|
+
description: 'Sample organization for the story.',
|
|
72
|
+
}),
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
space.db.add(
|
|
76
|
+
Obj.make(Agent.Agent, {
|
|
77
|
+
instructions: Ref.make(Text.make()),
|
|
78
|
+
plan: Ref.make(Plan.makePlan({ tasks: [] })),
|
|
79
|
+
artifacts: [{ name: 'Organization', data: Ref.make(organization) }],
|
|
80
|
+
subscriptions: [],
|
|
81
|
+
}),
|
|
82
|
+
);
|
|
83
|
+
}),
|
|
84
|
+
}),
|
|
85
|
+
AutomationPlugin(),
|
|
86
|
+
AssistantPlugin(),
|
|
87
|
+
],
|
|
88
|
+
}),
|
|
89
|
+
],
|
|
90
|
+
parameters: {
|
|
91
|
+
layout: 'fullscreen',
|
|
92
|
+
translations,
|
|
93
|
+
},
|
|
94
|
+
} satisfies Meta<DefaultStoryProps>;
|
|
95
|
+
|
|
96
|
+
export default meta;
|
|
97
|
+
|
|
98
|
+
type Story = StoryObj<typeof meta>;
|
|
99
|
+
|
|
100
|
+
export const Default: Story = {};
|