@dxos/plugin-assistant 0.10.0 → 0.11.1
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/PLUGIN.mdl +3 -28
- package/dist/lib/AssistantPlugin.mjs +2 -0
- package/dist/lib/AssistantPlugin.node.mjs +55 -0
- package/dist/lib/AssistantPlugin.node.mjs.map +1 -0
- package/dist/lib/AssistantPlugin.workerd.mjs +43 -0
- package/dist/lib/AssistantPlugin.workerd.mjs.map +1 -0
- package/dist/lib/capabilities.mjs +24 -0
- package/dist/lib/capabilities.mjs.map +1 -0
- package/dist/lib/chunk-AgentArticle.mjs +52 -0
- package/dist/lib/chunk-AgentArticle.mjs.map +1 -0
- package/dist/lib/chunk-AgentProperties.mjs +35 -0
- package/dist/lib/chunk-AgentProperties.mjs.map +1 -0
- package/dist/lib/chunk-AssistantPlugin.mjs +88 -0
- package/dist/lib/chunk-AssistantPlugin.mjs.map +1 -0
- package/dist/lib/chunk-AssistantSettings.mjs +285 -0
- package/dist/lib/chunk-AssistantSettings.mjs.map +1 -0
- package/dist/lib/chunk-ChatArticle.mjs +121 -0
- package/dist/lib/chunk-ChatArticle.mjs.map +1 -0
- package/dist/lib/chunk-ChatCompanion.mjs +116 -0
- package/dist/lib/chunk-ChatCompanion.mjs.map +1 -0
- package/dist/lib/chunk-ChatDialog.mjs +73 -0
- package/dist/lib/chunk-ChatDialog.mjs.map +1 -0
- package/dist/lib/chunk-IntegrationPrompt.mjs +73 -0
- package/dist/lib/chunk-IntegrationPrompt.mjs.map +1 -0
- package/dist/lib/chunk-SpaceHomePrompt.mjs +104 -0
- package/dist/lib/chunk-SpaceHomePrompt.mjs.map +1 -0
- package/dist/lib/chunk-SpaceHomeSuggestions.mjs +60 -0
- package/dist/lib/chunk-SpaceHomeSuggestions.mjs.map +1 -0
- package/dist/lib/chunk-TracePanel.mjs +127 -0
- package/dist/lib/chunk-TracePanel.mjs.map +1 -0
- package/dist/lib/chunk-TracePanel2.mjs +7 -0
- package/dist/lib/chunk-TracePanel2.mjs.map +1 -0
- package/dist/lib/chunk-TriggerStatus.mjs +72 -0
- package/dist/lib/chunk-TriggerStatus.mjs.map +1 -0
- package/dist/lib/chunk-agent-hydrator.mjs +22 -0
- package/dist/lib/chunk-agent-hydrator.mjs.map +1 -0
- package/dist/lib/chunk-agent-service.mjs +21 -0
- package/dist/lib/chunk-agent-service.mjs.map +1 -0
- package/dist/lib/{neutral/ai-context-LIKJYMIN.mjs → chunk-ai-context.mjs} +8 -12
- package/dist/lib/chunk-ai-context.mjs.map +1 -0
- package/dist/lib/chunk-ai-service.mjs +27 -0
- package/dist/lib/chunk-ai-service.mjs.map +1 -0
- package/dist/lib/chunk-app-graph-builder.mjs +179 -0
- package/dist/lib/chunk-app-graph-builder.mjs.map +1 -0
- package/dist/lib/chunk-automation-templates.mjs +99 -0
- package/dist/lib/chunk-automation-templates.mjs.map +1 -0
- package/dist/lib/chunk-companion-chat-provisioner.mjs +123 -0
- package/dist/lib/chunk-companion-chat-provisioner.mjs.map +1 -0
- package/dist/lib/chunk-connector.mjs +60 -0
- package/dist/lib/chunk-connector.mjs.map +1 -0
- package/dist/lib/chunk-constants.mjs +9 -0
- package/dist/lib/chunk-constants.mjs.map +1 -0
- package/dist/lib/chunk-context.mjs +7 -0
- package/dist/lib/chunk-context.mjs.map +1 -0
- package/dist/lib/chunk-create-chat.mjs +53 -0
- package/dist/lib/chunk-create-chat.mjs.map +1 -0
- package/dist/lib/chunk-create-object.mjs +70 -0
- package/dist/lib/chunk-create-object.mjs.map +1 -0
- package/dist/lib/chunk-edge-model-resolver.mjs +64 -0
- package/dist/lib/chunk-edge-model-resolver.mjs.map +1 -0
- package/dist/lib/chunk-ensure-companion-chat.mjs +49 -0
- package/dist/lib/chunk-ensure-companion-chat.mjs.map +1 -0
- package/dist/lib/chunk-extensions.mjs +78 -0
- package/dist/lib/chunk-extensions.mjs.map +1 -0
- package/dist/lib/chunk-fork-chat.mjs +83 -0
- package/dist/lib/chunk-fork-chat.mjs.map +1 -0
- package/dist/lib/chunk-generate-home-suggestions.mjs +71 -0
- package/dist/lib/chunk-generate-home-suggestions.mjs.map +1 -0
- package/dist/lib/chunk-local-model-resolver.mjs +25 -0
- package/dist/lib/chunk-local-model-resolver.mjs.map +1 -0
- package/dist/lib/chunk-markdown-extension.mjs +27 -0
- package/dist/lib/chunk-markdown-extension.mjs.map +1 -0
- package/dist/lib/{neutral/chunk-L7AR4VTA.mjs → chunk-meta.mjs} +20 -25
- package/dist/lib/chunk-meta.mjs.map +1 -0
- package/dist/lib/chunk-operation-handler.mjs +13 -0
- package/dist/lib/chunk-operation-handler.mjs.map +1 -0
- package/dist/lib/chunk-paths.mjs +8 -0
- package/dist/lib/chunk-paths.mjs.map +1 -0
- package/dist/lib/chunk-processor.mjs +432 -0
- package/dist/lib/chunk-processor.mjs.map +1 -0
- package/dist/lib/chunk-react-surface.mjs +177 -0
- package/dist/lib/chunk-react-surface.mjs.map +1 -0
- package/dist/lib/chunk-run-prompt-in-new-chat.mjs +96 -0
- package/dist/lib/chunk-run-prompt-in-new-chat.mjs.map +1 -0
- package/dist/lib/chunk-set-current-chat.mjs +43 -0
- package/dist/lib/chunk-set-current-chat.mjs.map +1 -0
- package/dist/lib/chunk-settings.mjs +23 -0
- package/dist/lib/chunk-settings.mjs.map +1 -0
- package/dist/lib/chunk-skill-definition.mjs +42 -0
- package/dist/lib/chunk-skill-definition.mjs.map +1 -0
- package/dist/lib/chunk-skills.mjs +19 -0
- package/dist/lib/chunk-skills.mjs.map +1 -0
- package/dist/lib/chunk-state.mjs +32 -0
- package/dist/lib/chunk-state.mjs.map +1 -0
- package/dist/lib/chunk-toggle-trace-panel-debug.mjs +18 -0
- package/dist/lib/chunk-toggle-trace-panel-debug.mjs.map +1 -0
- package/dist/lib/chunk-toolkit.mjs +12 -0
- package/dist/lib/chunk-toolkit.mjs.map +1 -0
- package/dist/lib/chunk-types.mjs +332 -0
- package/dist/lib/chunk-types.mjs.map +1 -0
- package/dist/lib/chunk-update-chat-name.mjs +63 -0
- package/dist/lib/chunk-update-chat-name.mjs.map +1 -0
- package/dist/lib/components.mjs +2616 -0
- package/dist/lib/components.mjs.map +1 -0
- package/dist/lib/containers.mjs +17 -0
- package/dist/lib/containers.mjs.map +1 -0
- package/dist/lib/execution-graph.mjs +961 -0
- package/dist/lib/execution-graph.mjs.map +1 -0
- package/dist/lib/extensions.mjs +2 -0
- package/dist/lib/hooks.mjs +674 -0
- package/dist/lib/hooks.mjs.map +1 -0
- package/dist/lib/index.mjs +5 -0
- package/dist/lib/meta.mjs +2 -0
- package/dist/lib/operations.mjs +7 -0
- package/dist/lib/operations.mjs.map +1 -0
- package/dist/lib/plugin.mjs +9 -0
- package/dist/lib/plugin.mjs.map +1 -0
- package/dist/lib/plugin.workerd.mjs +2 -0
- package/dist/lib/skills.mjs +2 -0
- package/dist/lib/testing.mjs +2 -0
- package/dist/lib/translations.mjs +207 -0
- package/dist/lib/translations.mjs.map +1 -0
- package/dist/lib/types.mjs +2 -0
- package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
- package/dist/types/src/AssistantPlugin.node.d.ts.map +1 -1
- package/dist/types/src/AssistantPlugin.workerd.d.ts.map +1 -1
- package/dist/types/src/capabilities/AssistantSurfaces.d.ts +22 -0
- package/dist/types/src/capabilities/AssistantSurfaces.d.ts.map +1 -0
- package/dist/types/src/capabilities/agent-hydrator.d.ts +1 -1
- package/dist/types/src/capabilities/agent-service.d.ts +1 -1
- package/dist/types/src/capabilities/agent-service.d.ts.map +1 -1
- package/dist/types/src/capabilities/ai-context.d.ts +1 -1
- package/dist/types/src/capabilities/ai-service.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +12 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/automation-templates.d.ts +1 -1
- package/dist/types/src/capabilities/companion-chat-provisioner.d.ts +1 -1
- package/dist/types/src/capabilities/connector.d.ts +1 -1
- package/dist/types/src/capabilities/create-object.d.ts +1 -1
- package/dist/types/src/capabilities/edge-model-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +0 -2
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/local-model-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/local-model-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/markdown-extension.d.ts +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +1 -1
- package/dist/types/src/capabilities/skill-definition.d.ts.map +1 -1
- package/dist/types/src/capabilities/standalone-chats-query.test.d.ts +2 -0
- package/dist/types/src/capabilities/standalone-chats-query.test.d.ts.map +1 -0
- package/dist/types/src/capabilities/state.d.ts +1 -1
- package/dist/types/src/capabilities/toolkit.d.ts +1 -1
- package/dist/types/src/components/AgentProperties/AgentProperties.d.ts +4 -1
- package/dist/types/src/components/AgentProperties/AgentProperties.d.ts.map +1 -1
- package/dist/types/src/components/AgentProperties/AgentProperties.stories.d.ts.map +1 -1
- package/dist/types/src/components/Chat/Chat.d.ts +21 -8
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/src/components/Chat/{Chat.stories.d.ts → Error.stories.d.ts} +1 -1
- package/dist/types/src/components/Chat/Error.stories.d.ts.map +1 -0
- package/dist/types/src/components/Chat/context.d.ts +8 -0
- package/dist/types/src/components/Chat/context.d.ts.map +1 -1
- package/dist/types/src/components/Chat/events.d.ts +5 -0
- package/dist/types/src/components/Chat/events.d.ts.map +1 -1
- package/dist/types/src/components/Chat/thread.d.ts +42 -0
- package/dist/types/src/components/Chat/thread.d.ts.map +1 -0
- package/dist/types/src/components/Chat/thread.test.d.ts +2 -0
- package/dist/types/src/components/Chat/thread.test.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatOptions.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatPrompt.d.ts +5 -3
- package/dist/types/src/components/ChatPrompt/ChatPrompt.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/index.d.ts +0 -1
- package/dist/types/src/components/ChatPrompt/index.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/Anchor.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.d.ts +8 -3
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +30 -2
- 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/index.d.ts +1 -0
- package/dist/types/src/components/ChatThread/index.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/sync/index.d.ts +3 -0
- package/dist/types/src/components/ChatThread/sync/index.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/{sync.d.ts → sync/sync.d.ts} +46 -2
- package/dist/types/src/components/ChatThread/sync/sync.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/sync/sync.test.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/sync/tool-widget-state.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/sync/tool-widget-state.test.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/BranchWidget.d.ts +15 -0
- package/dist/types/src/components/ChatThread/widgets/BranchWidget.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/BranchWidget.stories.d.ts +21 -0
- package/dist/types/src/components/ChatThread/widgets/BranchWidget.stories.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/BranchWidget.test.d.ts +2 -0
- package/dist/types/src/components/ChatThread/widgets/BranchWidget.test.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/ReferenceWidget.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/SuggestionWidget.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/ToolWidget.d.ts +1 -2
- package/dist/types/src/components/ChatThread/widgets/ToolWidget.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/defaults.d.ts +6 -0
- package/dist/types/src/components/ChatThread/widgets/defaults.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/format-time.d.ts +2 -0
- package/dist/types/src/components/ChatThread/widgets/format-time.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/index.d.ts +4 -1
- package/dist/types/src/components/ChatThread/widgets/index.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/is-tool-message.d.ts +3 -0
- package/dist/types/src/components/ChatThread/widgets/is-tool-message.d.ts.map +1 -0
- package/dist/types/src/components/ConnectorAuthMenu/ConnectorAuthMenu.d.ts +16 -0
- package/dist/types/src/components/ConnectorAuthMenu/ConnectorAuthMenu.d.ts.map +1 -0
- package/dist/types/src/components/ConnectorAuthMenu/ConnectorAuthMenu.stories.d.ts +210 -0
- package/dist/types/src/components/ConnectorAuthMenu/ConnectorAuthMenu.stories.d.ts.map +1 -0
- package/dist/types/src/components/ConnectorAuthMenu/index.d.ts +2 -0
- package/dist/types/src/components/ConnectorAuthMenu/index.d.ts.map +1 -0
- package/dist/types/src/components/ProcessTree/ProcessTree.d.ts +1 -1
- package/dist/types/src/components/ProcessTree/ProcessTree.d.ts.map +1 -1
- package/dist/types/src/components/TaskList/TaskList.d.ts +9 -11
- package/dist/types/src/components/TaskList/TaskList.d.ts.map +1 -1
- package/dist/types/src/components/TaskList/TaskList.stories.d.ts +3 -4
- package/dist/types/src/components/TaskList/TaskList.stories.d.ts.map +1 -1
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts +1 -2
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts.map +1 -1
- package/dist/types/src/components/ToolBlock/index.d.ts +1 -0
- package/dist/types/src/components/ToolBlock/index.d.ts.map +1 -1
- package/dist/types/src/components/ToolBlock/is-tool-message.d.ts +3 -0
- package/dist/types/src/components/ToolBlock/is-tool-message.d.ts.map +1 -0
- package/dist/types/src/components/Toolbox/Toolbox.d.ts +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/AgentArticle/AgentArticle.d.ts +5 -2
- package/dist/types/src/containers/AgentArticle/AgentArticle.d.ts.map +1 -1
- package/dist/types/src/containers/AgentArticle/AgentArticle.stories.d.ts.map +1 -1
- package/dist/types/src/containers/AgentProperties/AgentProperties.d.ts +4 -1
- package/dist/types/src/containers/AgentProperties/AgentProperties.d.ts.map +1 -1
- package/dist/types/src/containers/AssistantSettings/AssistantSettings.d.ts +4 -1
- package/dist/types/src/containers/AssistantSettings/AssistantSettings.d.ts.map +1 -1
- package/dist/types/src/containers/AssistantSettings/AssistantSettings.stories.d.ts +4 -1
- package/dist/types/src/containers/AssistantSettings/AssistantSettings.stories.d.ts.map +1 -1
- package/dist/types/src/containers/AssistantSettings/OllamaModels.d.ts +4 -6
- package/dist/types/src/containers/AssistantSettings/OllamaModels.d.ts.map +1 -1
- package/dist/types/src/containers/ChatArticle/ChatArticle.d.ts.map +1 -1
- package/dist/types/src/containers/ChatArticle/ChatArticle.stories.d.ts +22 -1
- package/dist/types/src/containers/ChatArticle/ChatArticle.stories.d.ts.map +1 -1
- package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts.map +1 -1
- package/dist/types/src/containers/ChatDialog/ChatDialog.d.ts +4 -1
- package/dist/types/src/containers/ChatDialog/ChatDialog.d.ts.map +1 -1
- package/dist/types/src/containers/IntegrationPrompt/IntegrationPrompt.d.ts +4 -7
- package/dist/types/src/containers/IntegrationPrompt/IntegrationPrompt.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceHomePrompt/SpaceHomePrompt.d.ts +4 -9
- package/dist/types/src/containers/SpaceHomePrompt/SpaceHomePrompt.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceHomeSuggestions/SpaceHomeSuggestions.d.ts +5 -7
- package/dist/types/src/containers/SpaceHomeSuggestions/SpaceHomeSuggestions.d.ts.map +1 -1
- package/dist/types/src/containers/TracePanel/TracePanel.d.ts +1 -1
- package/dist/types/src/containers/TracePanel/TracePanel.d.ts.map +1 -1
- package/dist/types/src/containers/TracePanel/TracePanel.stories.d.ts.map +1 -1
- package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts +15 -1
- package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts.map +1 -1
- package/dist/types/src/containers/index.d.ts +0 -1
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/execution-graph/execution-graph.d.ts +12 -1
- package/dist/types/src/execution-graph/execution-graph.d.ts.map +1 -1
- package/dist/types/src/execution-graph/index.d.ts +1 -1
- package/dist/types/src/execution-graph/index.d.ts.map +1 -1
- package/dist/types/src/execution-graph/pending-block-status.d.ts.map +1 -1
- package/dist/types/src/execution-graph/span-tree.d.ts +17 -0
- package/dist/types/src/execution-graph/span-tree.d.ts.map +1 -1
- package/dist/types/src/feed-logger.d.ts +1 -1
- package/dist/types/src/feed-logger.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +1 -1
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatToolbarActions.d.ts.map +1 -1
- package/dist/types/src/hooks/useContextObjects.d.ts +1 -1
- package/dist/types/src/hooks/useContextObjects.d.ts.map +1 -1
- package/dist/types/src/hooks/useSelectionContext.d.ts +13 -0
- package/dist/types/src/hooks/useSelectionContext.d.ts.map +1 -0
- package/dist/types/src/hooks/useSelectionContext.test.d.ts +2 -0
- package/dist/types/src/hooks/useSelectionContext.test.d.ts.map +1 -0
- package/dist/types/src/hooks/useTraceMessages.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/processor/index.d.ts +1 -0
- package/dist/types/src/processor/index.d.ts.map +1 -1
- package/dist/types/src/processor/processor.d.ts +5 -2
- package/dist/types/src/processor/processor.d.ts.map +1 -1
- package/dist/types/src/processor/prompt.d.ts +18 -0
- package/dist/types/src/processor/prompt.d.ts.map +1 -0
- package/dist/types/src/processor/prompt.test.d.ts +2 -0
- package/dist/types/src/processor/prompt.test.d.ts.map +1 -0
- package/dist/types/src/processor/streaming.node.test.d.ts +2 -0
- package/dist/types/src/processor/streaming.node.test.d.ts.map +1 -0
- package/dist/types/src/skills/assistant/skill.d.ts.map +1 -1
- package/dist/types/src/templates/scaffold.d.ts +1 -1
- package/dist/types/src/templates/scaffold.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/AssistantCapabilities.d.ts +1 -1
- package/dist/types/src/types/AssistantCapabilities.d.ts.map +1 -1
- package/dist/types/src/types/AssistantOperation.d.ts +2 -13
- package/dist/types/src/types/AssistantOperation.d.ts.map +1 -1
- package/dist/types/src/types/ChatSurface.d.ts +2 -2
- package/dist/types/src/types/ChatSurface.d.ts.map +1 -1
- package/dist/types/src/types/Ollama.d.ts +1 -1
- package/dist/types/src/types/Ollama.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dx.config.ts +1 -0
- package/package.json +106 -105
- package/src/AssistantPlugin.node.ts +1 -2
- package/src/AssistantPlugin.test.ts +60 -62
- package/src/AssistantPlugin.ts +1 -10
- package/src/AssistantPlugin.workerd.ts +1 -2
- package/src/capabilities/AssistantSurfaces.tsx +86 -0
- package/src/capabilities/agent-service.ts +1 -1
- package/src/capabilities/app-graph-builder.ts +31 -17
- package/src/capabilities/companion-chat-provisioner.ts +12 -11
- package/src/capabilities/connector.ts +3 -3
- package/src/capabilities/edge-model-resolver.ts +5 -2
- package/src/capabilities/index.ts +0 -2
- package/src/capabilities/react-surface.ts +135 -0
- package/src/capabilities/skill-definition.ts +4 -0
- package/src/capabilities/standalone-chats-query.test.ts +51 -0
- package/src/capabilities/state.ts +1 -1
- package/src/components/AgentProperties/AgentProperties.stories.tsx +6 -7
- package/src/components/AgentProperties/AgentProperties.tsx +37 -30
- package/src/components/Chat/Chat.tsx +275 -59
- package/src/components/Chat/{Chat.stories.tsx → Error.stories.tsx} +1 -1
- package/src/components/Chat/context.ts +8 -0
- package/src/components/Chat/events.ts +5 -0
- package/src/components/Chat/thread.test.ts +127 -0
- package/src/components/Chat/thread.ts +87 -0
- package/src/components/ChatPrompt/ChatActions.tsx +8 -8
- package/src/components/ChatPrompt/ChatMcpErrors.tsx +2 -2
- package/src/components/ChatPrompt/ChatOptions.stories.tsx +2 -1
- package/src/components/ChatPrompt/ChatOptions.tsx +5 -5
- package/src/components/ChatPrompt/ChatPrompt.tsx +33 -6
- package/src/components/ChatPrompt/index.ts +0 -1
- package/src/components/ChatThread/Anchor.stories.tsx +2 -1
- package/src/components/ChatThread/ChatThread.stories.tsx +99 -4
- package/src/components/ChatThread/ChatThread.tsx +34 -6
- package/src/components/ChatThread/Link.tsx +1 -0
- package/src/components/ChatThread/index.ts +2 -0
- package/src/components/ChatThread/registry.tsx +28 -4
- package/src/components/ChatThread/sync/index.ts +6 -0
- package/src/components/ChatThread/{sync.test.ts → sync/sync.test.ts} +167 -7
- package/src/components/ChatThread/{sync.ts → sync/sync.ts} +97 -3
- package/src/components/ChatThread/{tool-widget-state.ts → sync/tool-widget-state.ts} +1 -3
- package/src/components/ChatThread/widgets/BranchWidget.stories.tsx +83 -0
- package/src/components/ChatThread/widgets/BranchWidget.test.ts +55 -0
- package/src/components/ChatThread/widgets/BranchWidget.tsx +61 -0
- package/src/components/ChatThread/widgets/FallbackWidget.tsx +2 -2
- package/src/components/ChatThread/widgets/ReasoningWidget.ts +1 -1
- package/src/components/ChatThread/widgets/ReferenceWidget.ts +1 -6
- package/src/components/ChatThread/widgets/SuggestionWidget.ts +12 -3
- package/src/components/ChatThread/widgets/SummaryWidget.tsx +1 -1
- package/src/components/ChatThread/widgets/ToolWidget.tsx +15 -9
- package/src/components/ChatThread/widgets/defaults.ts +7 -1
- package/src/components/ChatThread/widgets/format-time.ts +45 -0
- package/src/components/ChatThread/widgets/index.ts +4 -1
- package/src/components/ChatThread/widgets/is-tool-message.ts +13 -0
- package/src/components/ConnectorAuthMenu/ConnectorAuthMenu.stories.tsx +177 -0
- package/src/components/ConnectorAuthMenu/ConnectorAuthMenu.tsx +82 -0
- package/src/components/ConnectorAuthMenu/index.ts +5 -0
- package/src/components/ProcessTree/ProcessTree.stories.tsx +1 -1
- package/src/components/TaskList/TaskList.stories.tsx +19 -26
- package/src/components/TaskList/TaskList.tsx +32 -104
- package/src/components/ToolBlock/ToolBlock.tsx +1 -5
- package/src/components/ToolBlock/index.ts +1 -0
- package/src/components/ToolBlock/is-tool-message.ts +13 -0
- package/src/components/Toolbox/Toolbox.tsx +1 -1
- package/src/components/index.ts +1 -0
- package/src/containers/AgentArticle/AgentArticle.stories.tsx +18 -11
- package/src/containers/AgentArticle/AgentArticle.tsx +27 -151
- package/src/containers/AgentProperties/AgentProperties.tsx +21 -17
- package/src/containers/AssistantSettings/AssistantSettings.tsx +2 -0
- package/src/containers/AssistantSettings/OllamaModels.tsx +6 -4
- package/src/containers/ChatArticle/ChatArticle.stories.tsx +200 -27
- package/src/containers/ChatArticle/ChatArticle.tsx +25 -5
- package/src/containers/ChatCompanion/ChatCompanion.tsx +45 -10
- package/src/containers/ChatDialog/ChatDialog.tsx +4 -1
- package/src/containers/IntegrationPrompt/IntegrationPrompt.tsx +9 -6
- package/src/containers/SpaceHomePrompt/SpaceHomePrompt.tsx +2 -0
- package/src/containers/SpaceHomeSuggestions/SpaceHomeSuggestions.tsx +40 -39
- package/src/containers/TracePanel/TracePanel.stories.tsx +9 -4
- package/src/containers/TracePanel/TracePanel.tsx +22 -6
- package/src/containers/TriggerStatus/TriggerStatus.tsx +9 -16
- package/src/containers/index.ts +0 -1
- package/src/execution-graph/SPEC.md +60 -2
- package/src/execution-graph/execution-graph.ts +15 -2
- package/src/execution-graph/index.ts +1 -0
- package/src/execution-graph/pending-block-status.ts +3 -2
- package/src/execution-graph/span-tree.test.ts +87 -1
- package/src/execution-graph/span-tree.ts +95 -0
- package/src/feed-logger.ts +6 -6
- package/src/hooks/index.ts +1 -1
- package/src/hooks/useChatProcessor.ts +2 -1
- package/src/hooks/useChatToolbarActions.ts +22 -19
- package/src/hooks/useContextObjects.ts +9 -3
- package/src/hooks/useSelectionContext.test.ts +93 -0
- package/src/hooks/useSelectionContext.ts +72 -0
- package/src/hooks/useSkillRegistry.ts +1 -1
- package/src/hooks/useTraceMessages.ts +5 -3
- package/src/operations/create-chat.ts +2 -2
- package/src/operations/fork-chat.ts +2 -2
- package/src/operations/generate-home-suggestions.test.ts +2 -2
- package/src/operations/index.ts +0 -1
- package/src/operations/prompt.node.test.ts +1 -1
- package/src/paths.ts +3 -3
- package/src/processor/index.ts +1 -0
- package/src/processor/processor.node.test.ts +1 -1
- package/src/processor/processor.ts +33 -5
- package/src/processor/prompt.test.ts +37 -0
- package/src/processor/prompt.ts +42 -0
- package/src/processor/streaming.node.test.ts +196 -0
- package/src/skills/assistant/skill.node.test.ts +2 -2
- package/src/skills/assistant/skill.ts +3 -5
- package/src/templates/routine-templates.test.ts +1 -2
- package/src/templates/scaffold.ts +3 -3
- package/src/testing/data/trace-timeline-multiple.dx.json +1 -1
- package/src/testing/data/trace-timeline-remote.dx.json +1 -1
- package/src/testing/data/trace-timeline.dx.json +1 -2
- package/src/testing/trace-timeline.node.test.ts +3 -3
- package/src/translations.ts +11 -10
- package/src/types/AssistantCapabilities.ts +1 -1
- package/src/types/AssistantOperation.ts +8 -31
- package/src/types/ChatSurface.ts +3 -3
- package/src/types/Ollama.ts +1 -1
- package/dist/lib/neutral/AgentArticle-GV6EEW3I.mjs +0 -161
- package/dist/lib/neutral/AgentArticle-GV6EEW3I.mjs.map +0 -7
- package/dist/lib/neutral/AgentProperties-LFTEYJ54.mjs +0 -40
- package/dist/lib/neutral/AgentProperties-LFTEYJ54.mjs.map +0 -7
- package/dist/lib/neutral/AssistantPlugin.mjs +0 -10
- package/dist/lib/neutral/AssistantPlugin.mjs.map +0 -7
- package/dist/lib/neutral/AssistantPlugin.node.mjs +0 -72
- package/dist/lib/neutral/AssistantPlugin.node.mjs.map +0 -7
- package/dist/lib/neutral/AssistantPlugin.workerd.mjs +0 -13
- package/dist/lib/neutral/AssistantPlugin.workerd.mjs.map +0 -7
- package/dist/lib/neutral/AssistantSettings-3N5M5VCN.mjs +0 -302
- package/dist/lib/neutral/AssistantSettings-3N5M5VCN.mjs.map +0 -7
- package/dist/lib/neutral/ChatArticle-OO7GGEFW.mjs +0 -8
- package/dist/lib/neutral/ChatArticle-OO7GGEFW.mjs.map +0 -7
- package/dist/lib/neutral/ChatCompanion-GIFJRY6I.mjs +0 -128
- package/dist/lib/neutral/ChatCompanion-GIFJRY6I.mjs.map +0 -7
- package/dist/lib/neutral/ChatDialog-5MXN4MXS.mjs +0 -74
- package/dist/lib/neutral/ChatDialog-5MXN4MXS.mjs.map +0 -7
- package/dist/lib/neutral/IntegrationPrompt-2HJQFYJE.mjs +0 -72
- package/dist/lib/neutral/IntegrationPrompt-2HJQFYJE.mjs.map +0 -7
- package/dist/lib/neutral/PlanArticle-VPK2IYWU.mjs +0 -34
- package/dist/lib/neutral/PlanArticle-VPK2IYWU.mjs.map +0 -7
- package/dist/lib/neutral/SpaceHomePrompt-ISAB76LD.mjs +0 -114
- package/dist/lib/neutral/SpaceHomePrompt-ISAB76LD.mjs.map +0 -7
- package/dist/lib/neutral/SpaceHomeSuggestions-IDH77QQR.mjs +0 -63
- package/dist/lib/neutral/SpaceHomeSuggestions-IDH77QQR.mjs.map +0 -7
- package/dist/lib/neutral/TracePanel-JKNWADJ4.mjs +0 -12
- package/dist/lib/neutral/TracePanel-JKNWADJ4.mjs.map +0 -7
- package/dist/lib/neutral/TriggerStatus-FURRBHYA.mjs +0 -95
- package/dist/lib/neutral/TriggerStatus-FURRBHYA.mjs.map +0 -7
- package/dist/lib/neutral/agent-hydrator-OBO3RHLO.mjs +0 -23
- package/dist/lib/neutral/agent-hydrator-OBO3RHLO.mjs.map +0 -7
- package/dist/lib/neutral/agent-service-XFJ4VQMT.mjs +0 -32
- package/dist/lib/neutral/agent-service-XFJ4VQMT.mjs.map +0 -7
- package/dist/lib/neutral/ai-context-LIKJYMIN.mjs.map +0 -7
- package/dist/lib/neutral/ai-service-DM6YXWUC.mjs +0 -44
- package/dist/lib/neutral/ai-service-DM6YXWUC.mjs.map +0 -7
- package/dist/lib/neutral/app-graph-builder-OPVOEQY7.mjs +0 -249
- package/dist/lib/neutral/app-graph-builder-OPVOEQY7.mjs.map +0 -7
- package/dist/lib/neutral/automation-templates-MADJLXGJ.mjs +0 -97
- package/dist/lib/neutral/automation-templates-MADJLXGJ.mjs.map +0 -7
- package/dist/lib/neutral/capabilities/index.mjs +0 -47
- package/dist/lib/neutral/capabilities/index.mjs.map +0 -7
- package/dist/lib/neutral/chunk-5IHQ52KJ.mjs +0 -9
- package/dist/lib/neutral/chunk-5IHQ52KJ.mjs.map +0 -7
- package/dist/lib/neutral/chunk-6Q4OBGIK.mjs +0 -420
- package/dist/lib/neutral/chunk-6Q4OBGIK.mjs.map +0 -7
- package/dist/lib/neutral/chunk-BXI2R4OO.mjs +0 -410
- package/dist/lib/neutral/chunk-BXI2R4OO.mjs.map +0 -7
- package/dist/lib/neutral/chunk-CMPLPDYE.mjs +0 -30
- package/dist/lib/neutral/chunk-CMPLPDYE.mjs.map +0 -7
- package/dist/lib/neutral/chunk-GPHT3HYS.mjs +0 -8
- package/dist/lib/neutral/chunk-GPHT3HYS.mjs.map +0 -7
- package/dist/lib/neutral/chunk-HKLSFB5I.mjs +0 -90
- package/dist/lib/neutral/chunk-HKLSFB5I.mjs.map +0 -7
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +0 -10
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +0 -7
- package/dist/lib/neutral/chunk-L7AR4VTA.mjs.map +0 -7
- package/dist/lib/neutral/chunk-LS72HWMM.mjs +0 -42
- package/dist/lib/neutral/chunk-LS72HWMM.mjs.map +0 -7
- package/dist/lib/neutral/chunk-OZWZGIV2.mjs +0 -12
- package/dist/lib/neutral/chunk-OZWZGIV2.mjs.map +0 -7
- package/dist/lib/neutral/chunk-QOKLFHUS.mjs +0 -13
- package/dist/lib/neutral/chunk-QOKLFHUS.mjs.map +0 -7
- package/dist/lib/neutral/chunk-SCTHQVIJ.mjs +0 -155
- package/dist/lib/neutral/chunk-SCTHQVIJ.mjs.map +0 -7
- package/dist/lib/neutral/chunk-U4LTLBAX.mjs +0 -56
- package/dist/lib/neutral/chunk-U4LTLBAX.mjs.map +0 -7
- package/dist/lib/neutral/chunk-UPKFUZ6V.mjs +0 -115
- package/dist/lib/neutral/chunk-UPKFUZ6V.mjs.map +0 -7
- package/dist/lib/neutral/chunk-V2Y4XE3O.mjs +0 -12
- package/dist/lib/neutral/chunk-V2Y4XE3O.mjs.map +0 -7
- package/dist/lib/neutral/chunk-VTK5R4H3.mjs +0 -9
- package/dist/lib/neutral/chunk-VTK5R4H3.mjs.map +0 -7
- package/dist/lib/neutral/chunk-XVGEJWJX.mjs +0 -133
- package/dist/lib/neutral/chunk-XVGEJWJX.mjs.map +0 -7
- package/dist/lib/neutral/companion-chat-provisioner-IQV5VIVE.mjs +0 -126
- package/dist/lib/neutral/companion-chat-provisioner-IQV5VIVE.mjs.map +0 -7
- package/dist/lib/neutral/components/index.mjs +0 -2527
- package/dist/lib/neutral/components/index.mjs.map +0 -7
- package/dist/lib/neutral/connector-ITLLTBPZ.mjs +0 -70
- package/dist/lib/neutral/connector-ITLLTBPZ.mjs.map +0 -7
- package/dist/lib/neutral/containers/index.mjs +0 -31
- package/dist/lib/neutral/containers/index.mjs.map +0 -7
- package/dist/lib/neutral/create-chat-YGVZZYGP.mjs +0 -56
- package/dist/lib/neutral/create-chat-YGVZZYGP.mjs.map +0 -7
- package/dist/lib/neutral/create-object-5PAEJ6KM.mjs +0 -76
- package/dist/lib/neutral/create-object-5PAEJ6KM.mjs.map +0 -7
- package/dist/lib/neutral/edge-model-resolver-WDJWDZTT.mjs +0 -55
- package/dist/lib/neutral/edge-model-resolver-WDJWDZTT.mjs.map +0 -7
- package/dist/lib/neutral/ensure-companion-chat-AMOF3C66.mjs +0 -58
- package/dist/lib/neutral/ensure-companion-chat-AMOF3C66.mjs.map +0 -7
- package/dist/lib/neutral/execution-graph/index.mjs +0 -977
- package/dist/lib/neutral/execution-graph/index.mjs.map +0 -7
- package/dist/lib/neutral/extensions/index.mjs +0 -8
- package/dist/lib/neutral/extensions/index.mjs.map +0 -7
- package/dist/lib/neutral/fork-chat-RMAAYYQF.mjs +0 -92
- package/dist/lib/neutral/fork-chat-RMAAYYQF.mjs.map +0 -7
- package/dist/lib/neutral/generate-home-suggestions-6MM2XWPV.mjs +0 -93
- package/dist/lib/neutral/generate-home-suggestions-6MM2XWPV.mjs.map +0 -7
- package/dist/lib/neutral/hooks/index.mjs +0 -877
- package/dist/lib/neutral/hooks/index.mjs.map +0 -7
- package/dist/lib/neutral/index.mjs +0 -42
- package/dist/lib/neutral/index.mjs.map +0 -7
- package/dist/lib/neutral/local-model-resolver-I2BENFFS.mjs +0 -24
- package/dist/lib/neutral/local-model-resolver-I2BENFFS.mjs.map +0 -7
- package/dist/lib/neutral/markdown-extension-R4TKDTIF.mjs +0 -41
- package/dist/lib/neutral/markdown-extension-R4TKDTIF.mjs.map +0 -7
- package/dist/lib/neutral/meta.json +0 -1
- package/dist/lib/neutral/meta.mjs +0 -12
- package/dist/lib/neutral/meta.mjs.map +0 -7
- package/dist/lib/neutral/migrations-7DEMVBOG.mjs +0 -28
- package/dist/lib/neutral/migrations-7DEMVBOG.mjs.map +0 -7
- package/dist/lib/neutral/navigation-resolver-PYGP2DAW.mjs +0 -18
- package/dist/lib/neutral/navigation-resolver-PYGP2DAW.mjs.map +0 -7
- package/dist/lib/neutral/operation-handler-2LEN45GP.mjs +0 -8
- package/dist/lib/neutral/operation-handler-2LEN45GP.mjs.map +0 -7
- package/dist/lib/neutral/operations/index.mjs +0 -8
- package/dist/lib/neutral/operations/index.mjs.map +0 -7
- package/dist/lib/neutral/plugin.mjs +0 -16
- package/dist/lib/neutral/plugin.mjs.map +0 -7
- package/dist/lib/neutral/plugin.workerd.mjs +0 -13
- package/dist/lib/neutral/plugin.workerd.mjs.map +0 -7
- package/dist/lib/neutral/react-surface-HEJEK44F.mjs +0 -171
- package/dist/lib/neutral/react-surface-HEJEK44F.mjs.map +0 -7
- package/dist/lib/neutral/resolve-navigation-targets-PBQ3OLUE.mjs +0 -28
- package/dist/lib/neutral/resolve-navigation-targets-PBQ3OLUE.mjs.map +0 -7
- package/dist/lib/neutral/run-prompt-in-new-chat-RNUJE2FM.mjs +0 -102
- package/dist/lib/neutral/run-prompt-in-new-chat-RNUJE2FM.mjs.map +0 -7
- package/dist/lib/neutral/set-current-chat-VWBPSIMZ.mjs +0 -48
- package/dist/lib/neutral/set-current-chat-VWBPSIMZ.mjs.map +0 -7
- package/dist/lib/neutral/settings-7Q3RITIT.mjs +0 -28
- package/dist/lib/neutral/settings-7Q3RITIT.mjs.map +0 -7
- package/dist/lib/neutral/skill-definition-553MQRTR.mjs +0 -8
- package/dist/lib/neutral/skill-definition-553MQRTR.mjs.map +0 -7
- package/dist/lib/neutral/skills/index.mjs +0 -8
- package/dist/lib/neutral/skills/index.mjs.map +0 -7
- package/dist/lib/neutral/state-4LGAKSSD.mjs +0 -34
- package/dist/lib/neutral/state-4LGAKSSD.mjs.map +0 -7
- package/dist/lib/neutral/testing.mjs +0 -8
- package/dist/lib/neutral/testing.mjs.map +0 -7
- package/dist/lib/neutral/toggle-trace-panel-debug-JGTB6KVJ.mjs +0 -21
- package/dist/lib/neutral/toggle-trace-panel-debug-JGTB6KVJ.mjs.map +0 -7
- package/dist/lib/neutral/toolkit-ETWLG5NT.mjs +0 -8
- package/dist/lib/neutral/toolkit-ETWLG5NT.mjs.map +0 -7
- package/dist/lib/neutral/translations.mjs +0 -217
- package/dist/lib/neutral/translations.mjs.map +0 -7
- package/dist/lib/neutral/types/index.mjs +0 -24
- package/dist/lib/neutral/types/index.mjs.map +0 -7
- package/dist/lib/neutral/update-chat-name-IJJELRR6.mjs +0 -61
- package/dist/lib/neutral/update-chat-name-IJJELRR6.mjs.map +0 -7
- package/dist/types/src/capabilities/migrations.d.ts +0 -5
- package/dist/types/src/capabilities/migrations.d.ts.map +0 -1
- package/dist/types/src/capabilities/navigation-resolver.d.ts +0 -5
- package/dist/types/src/capabilities/navigation-resolver.d.ts.map +0 -1
- package/dist/types/src/components/Chat/Chat.stories.d.ts.map +0 -1
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts +0 -10
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/sync.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/sync.test.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/tool-widget-state.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/tool-widget-state.test.d.ts.map +0 -1
- package/dist/types/src/containers/PlanArticle/PlanArticle.d.ts +0 -6
- package/dist/types/src/containers/PlanArticle/PlanArticle.d.ts.map +0 -1
- package/dist/types/src/containers/PlanArticle/index.d.ts +0 -2
- package/dist/types/src/containers/PlanArticle/index.d.ts.map +0 -1
- package/dist/types/src/hooks/useFlush.d.ts +0 -6
- package/dist/types/src/hooks/useFlush.d.ts.map +0 -1
- package/dist/types/src/operations/resolve-navigation-targets.d.ts +0 -5
- package/dist/types/src/operations/resolve-navigation-targets.d.ts.map +0 -1
- package/src/AssistantPlugin.conversations.json +0 -1
- package/src/capabilities/migrations.ts +0 -28
- package/src/capabilities/navigation-resolver.ts +0 -20
- package/src/capabilities/react-surface.tsx +0 -177
- package/src/components/ChatPrompt/ChatStatusIndicator.tsx +0 -42
- package/src/components/ChatThread/DEBUG.md +0 -64
- package/src/containers/PlanArticle/PlanArticle.tsx +0 -37
- package/src/containers/PlanArticle/index.ts +0 -5
- package/src/hooks/useFlush.ts +0 -35
- package/src/operations/resolve-navigation-targets.ts +0 -44
- /package/dist/types/src/components/ChatThread/{sync.test.d.ts → sync/sync.test.d.ts} +0 -0
- /package/dist/types/src/components/ChatThread/{tool-widget-state.d.ts → sync/tool-widget-state.d.ts} +0 -0
- /package/dist/types/src/components/ChatThread/{tool-widget-state.test.d.ts → sync/tool-widget-state.test.d.ts} +0 -0
- /package/src/components/ChatThread/{tool-widget-state.test.ts → sync/tool-widget-state.test.ts} +0 -0
|
@@ -39,7 +39,7 @@ const processes: Process.Info[] = [
|
|
|
39
39
|
pid: Process.ID.make('4d72c688-750b-47f2-87da-8a464e141b74'),
|
|
40
40
|
name: 'Data pipeline',
|
|
41
41
|
state: Process.State.FAILED,
|
|
42
|
-
error: 'Connection timeout',
|
|
42
|
+
error: { name: 'Error', message: 'Connection timeout' },
|
|
43
43
|
metrics: { wallTime: 3100, inputCount: 5, outputCount: 2 },
|
|
44
44
|
}),
|
|
45
45
|
makeProcess({
|
|
@@ -5,24 +5,22 @@
|
|
|
5
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
|
|
8
|
-
import { Plan } from '@dxos/assistant-toolkit';
|
|
9
|
-
import { Process, type Trace } from '@dxos/compute';
|
|
10
8
|
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
9
|
+
import { Outline } from '@dxos/types';
|
|
11
10
|
|
|
12
|
-
import subAgentFixture from '../../execution-graph/testing/sub-agent-delegation.json';
|
|
13
11
|
import { TaskList } from './TaskList';
|
|
14
12
|
|
|
15
|
-
const SUB_AGENT_PID = Process.ID.make('cf8f7243-5b1d-4902-b158-70d9107d5f43');
|
|
16
|
-
const traceMessages = (subAgentFixture as unknown as Trace.Message[]).slice();
|
|
17
|
-
|
|
18
13
|
type StoryArgs = {
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
items?: Outline.ChecklistItem[];
|
|
15
|
+
activeTitle?: string;
|
|
21
16
|
};
|
|
22
17
|
|
|
23
|
-
const DefaultStory = ({
|
|
24
|
-
const
|
|
25
|
-
|
|
18
|
+
const DefaultStory = ({ items = [], activeTitle }: StoryArgs) => {
|
|
19
|
+
const outline = React.useMemo(
|
|
20
|
+
() => Outline.make({ content: items.map(Outline.renderChecklistItem).join('\n') }),
|
|
21
|
+
[items],
|
|
22
|
+
);
|
|
23
|
+
return <TaskList outline={outline} activeTitle={activeTitle} />;
|
|
26
24
|
};
|
|
27
25
|
|
|
28
26
|
const meta = {
|
|
@@ -37,28 +35,23 @@ type Story = StoryObj<typeof meta>;
|
|
|
37
35
|
|
|
38
36
|
export const Default: Story = {
|
|
39
37
|
args: {
|
|
40
|
-
|
|
41
|
-
{ title: 'Crack the eggs',
|
|
42
|
-
{ title: 'Whisk with salt and pepper',
|
|
43
|
-
{ title: 'Heat the pan with butter',
|
|
44
|
-
{ title: 'Pour and stir continuously',
|
|
45
|
-
{ title: 'Plate and serve',
|
|
38
|
+
items: [
|
|
39
|
+
{ title: 'Crack the eggs', done: true },
|
|
40
|
+
{ title: 'Whisk with salt and pepper', done: true },
|
|
41
|
+
{ title: 'Heat the pan with butter', done: false },
|
|
42
|
+
{ title: 'Pour and stir continuously', done: false },
|
|
43
|
+
{ title: 'Plate and serve', done: false },
|
|
46
44
|
],
|
|
47
45
|
},
|
|
48
46
|
};
|
|
49
47
|
|
|
50
48
|
export const WithDelegatedAgent: Story = {
|
|
51
49
|
args: {
|
|
52
|
-
|
|
53
|
-
{
|
|
54
|
-
|
|
55
|
-
status: 'in-progress',
|
|
56
|
-
delegated: true,
|
|
57
|
-
agentPid: SUB_AGENT_PID,
|
|
58
|
-
},
|
|
59
|
-
{ title: 'Summarize findings', status: 'in-progress' },
|
|
50
|
+
items: [
|
|
51
|
+
{ title: 'Research widgets', done: false },
|
|
52
|
+
{ title: 'Summarize findings', done: false },
|
|
60
53
|
],
|
|
61
|
-
|
|
54
|
+
activeTitle: 'Research widgets',
|
|
62
55
|
},
|
|
63
56
|
};
|
|
64
57
|
|
|
@@ -4,45 +4,38 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useMemo } from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
import { type Process, type Trace } from '@dxos/compute';
|
|
9
|
-
import { useObject } from '@dxos/react-client/echo';
|
|
10
|
-
import { type Space } from '@dxos/react-client/echo';
|
|
7
|
+
import { useObject } from '@dxos/echo-react';
|
|
11
8
|
import { Icon, Tag, type ThemedClassName } from '@dxos/react-ui';
|
|
12
9
|
import { composable, composableProps } from '@dxos/react-ui';
|
|
13
|
-
import { TextCrawl } from '@dxos/react-ui-components';
|
|
14
10
|
import { Listbox } from '@dxos/react-ui-list';
|
|
15
|
-
|
|
16
|
-
import { collectProcessActivityLines, deriveInFlightActivityLine } from '#execution-graph';
|
|
17
|
-
import { isTerminalActivityLine, useProcessEphemeralStatus } from '#hooks';
|
|
11
|
+
import { Outline } from '@dxos/types';
|
|
18
12
|
|
|
19
13
|
export type TaskListProps = ThemedClassName<{
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
* Supervisor conversation feed id; trace messages without a conversation id still match by pid.
|
|
24
|
-
*/
|
|
25
|
-
conversationId?: string;
|
|
26
|
-
traceMessages?: readonly Trace.Message[];
|
|
14
|
+
outline: Outline.Outline;
|
|
15
|
+
/** Title of the item currently being worked by a delegated sub-agent, if any. */
|
|
16
|
+
activeTitle?: string;
|
|
27
17
|
}>;
|
|
28
18
|
|
|
19
|
+
/**
|
|
20
|
+
* Renders the conversation's working checklist (the outline's markdown `- [ ]` lines).
|
|
21
|
+
* Durable promoted tasks keep richer state; the checklist is the at-a-glance view.
|
|
22
|
+
*/
|
|
23
|
+
// TODO(burdon): Re-correlate live sub-agent activity (trace lines) via a Process annotation
|
|
24
|
+
// carrying the task ref — the pid no longer lives on the task.
|
|
29
25
|
export const TaskList = composable<HTMLDivElement, TaskListProps>(
|
|
30
|
-
({
|
|
31
|
-
const [
|
|
32
|
-
const
|
|
26
|
+
({ outline, activeTitle, ...props }, forwardedRef) => {
|
|
27
|
+
const [text] = useObject(outline.content);
|
|
28
|
+
const items = useMemo(() => Outline.parseChecklist(text?.content ?? ''), [text?.content]);
|
|
29
|
+
if (items.length === 0) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
33
32
|
|
|
34
33
|
return (
|
|
35
34
|
<Listbox.Root>
|
|
36
35
|
<Listbox.Viewport {...composableProps(props, { classNames: 'dx-container' })} ref={forwardedRef}>
|
|
37
36
|
<Listbox.Content aria-label='Tasks'>
|
|
38
|
-
{
|
|
39
|
-
<TaskListItem
|
|
40
|
-
key={task.id}
|
|
41
|
-
task={task}
|
|
42
|
-
space={space}
|
|
43
|
-
traceMessages={traceMessages}
|
|
44
|
-
conversationId={conversationId}
|
|
45
|
-
/>
|
|
37
|
+
{items.map((item) => (
|
|
38
|
+
<TaskListItem key={item.title} item={item} active={item.title === activeTitle} />
|
|
46
39
|
))}
|
|
47
40
|
</Listbox.Content>
|
|
48
41
|
</Listbox.Viewport>
|
|
@@ -52,88 +45,23 @@ export const TaskList = composable<HTMLDivElement, TaskListProps>(
|
|
|
52
45
|
);
|
|
53
46
|
|
|
54
47
|
type TaskListItemProps = {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
traceMessages?: readonly Trace.Message[];
|
|
58
|
-
conversationId?: string;
|
|
48
|
+
item: Outline.ChecklistItem;
|
|
49
|
+
active?: boolean;
|
|
59
50
|
};
|
|
60
51
|
|
|
61
|
-
const TaskListItem = ({
|
|
62
|
-
const durableLines = useMemo(() => {
|
|
63
|
-
if (!task.agentPid || !traceMessages?.length) {
|
|
64
|
-
return [];
|
|
65
|
-
}
|
|
66
|
-
const lines = collectProcessActivityLines(traceMessages, String(task.agentPid), { conversationId });
|
|
67
|
-
if (task.status !== 'in-progress') {
|
|
68
|
-
return lines;
|
|
69
|
-
}
|
|
70
|
-
return lines.filter((line) => !isTerminalActivityLine(line));
|
|
71
|
-
}, [task.agentPid, task.status, traceMessages, conversationId]);
|
|
72
|
-
|
|
73
|
-
const ephemeralLine = useProcessEphemeralStatus(
|
|
74
|
-
task.delegated === true && task.status === 'in-progress' ? task.agentPid : undefined,
|
|
75
|
-
space,
|
|
76
|
-
);
|
|
77
|
-
|
|
78
|
-
const inFlightLine = useMemo(() => {
|
|
79
|
-
if (ephemeralLine || task.status !== 'in-progress' || !task.agentPid || !traceMessages?.length) {
|
|
80
|
-
return undefined;
|
|
81
|
-
}
|
|
82
|
-
return deriveInFlightActivityLine(traceMessages, String(task.agentPid), { conversationId });
|
|
83
|
-
}, [ephemeralLine, task.status, task.agentPid, traceMessages, conversationId]);
|
|
84
|
-
|
|
85
|
-
const activityLines = useMemo(() => {
|
|
86
|
-
if (ephemeralLine) {
|
|
87
|
-
return [ephemeralLine];
|
|
88
|
-
}
|
|
89
|
-
if (inFlightLine) {
|
|
90
|
-
return [inFlightLine];
|
|
91
|
-
}
|
|
92
|
-
return durableLines;
|
|
93
|
-
}, [durableLines, ephemeralLine, inFlightLine]);
|
|
94
|
-
|
|
95
|
-
const agentPid = task.agentPid;
|
|
96
|
-
const showActivity = task.delegated === true && agentPid != null && activityLines.length > 0;
|
|
97
|
-
|
|
52
|
+
const TaskListItem = ({ item, active }: TaskListItemProps) => {
|
|
98
53
|
return (
|
|
99
|
-
<Listbox.Item id={
|
|
100
|
-
<div className='flex
|
|
101
|
-
<
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
</span>
|
|
110
|
-
<span className='truncate flex-1'>{task.title}</span>
|
|
111
|
-
{task.status === 'in-progress' && <Tag hue='info'>pending</Tag>}
|
|
112
|
-
{task.agentPid && <Tag hue='info'>{Plan.formatAgentPidTag(task.agentPid)}</Tag>}
|
|
113
|
-
</div>
|
|
114
|
-
{showActivity && agentPid != null && <DelegatedTaskActivity agentPid={agentPid} lines={activityLines} />}
|
|
54
|
+
<Listbox.Item id={item.title} classNames='py-0'>
|
|
55
|
+
<div className='flex items-center gap-2 min-w-0'>
|
|
56
|
+
<Icon
|
|
57
|
+
icon={item.done ? 'ph--check--regular' : 'ph--circle--regular'}
|
|
58
|
+
classNames={item.done ? 'text-success-text' : undefined}
|
|
59
|
+
size={4}
|
|
60
|
+
/>
|
|
61
|
+
<span className='sr-only'>{item.done ? 'done' : 'to do'}</span>
|
|
62
|
+
<span className='truncate flex-1'>{item.title}</span>
|
|
63
|
+
{active && <Tag hue='info'>working</Tag>}
|
|
115
64
|
</div>
|
|
116
65
|
</Listbox.Item>
|
|
117
66
|
);
|
|
118
67
|
};
|
|
119
|
-
|
|
120
|
-
type DelegatedTaskActivityProps = {
|
|
121
|
-
agentPid: Process.ID;
|
|
122
|
-
lines: string[];
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
const DelegatedTaskActivity = ({ agentPid, lines }: DelegatedTaskActivityProps) => {
|
|
126
|
-
return (
|
|
127
|
-
<div className='flex items-center gap-2 ps-6 min-w-0 text-placeholder'>
|
|
128
|
-
<Icon icon='ph--brain--regular' size={3} classNames='shrink-0 opacity-70' />
|
|
129
|
-
<TextCrawl
|
|
130
|
-
key={`${String(agentPid)}:${lines.length}:${lines[lines.length - 1]}`}
|
|
131
|
-
lines={lines}
|
|
132
|
-
autoAdvance
|
|
133
|
-
greedy
|
|
134
|
-
size='sm'
|
|
135
|
-
classNames='text-xs text-subdued min-w-0 flex-1'
|
|
136
|
-
/>
|
|
137
|
-
</div>
|
|
138
|
-
);
|
|
139
|
-
};
|
|
@@ -8,16 +8,12 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
|
|
8
8
|
import { useTranslation } from '@dxos/react-ui';
|
|
9
9
|
import { NumericTabs, TextCrawl, TogglePanel, type TogglePanelRootProps } from '@dxos/react-ui-components';
|
|
10
10
|
import { JsonHighlighter } from '@dxos/react-ui-syntax-highlighter';
|
|
11
|
-
import { type ContentBlock
|
|
11
|
+
import { type ContentBlock } from '@dxos/types';
|
|
12
12
|
import { type XmlWidgetProps } from '@dxos/ui-editor';
|
|
13
13
|
import { isNonNullable, safeParseJson } from '@dxos/util';
|
|
14
14
|
|
|
15
15
|
import { meta } from '#meta';
|
|
16
16
|
|
|
17
|
-
export const isToolMessage = (message: Message.Message) => {
|
|
18
|
-
return message.blocks.some((block: ContentBlock.Any) => block._tag === 'toolCall' || block._tag === 'toolResult');
|
|
19
|
-
};
|
|
20
|
-
|
|
21
17
|
export type ToolBlockProps = XmlWidgetProps<{
|
|
22
18
|
blocks: ContentBlock.Any[];
|
|
23
19
|
}>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type ContentBlock, type Message } from '@dxos/types';
|
|
6
|
+
|
|
7
|
+
// Kept out of `ToolBlock.tsx`: react-refresh only fast-refreshes a module whose
|
|
8
|
+
// exports are all components, so values exported beside them force a full page reload on
|
|
9
|
+
// every edit.
|
|
10
|
+
|
|
11
|
+
export const isToolMessage = (message: Message.Message) => {
|
|
12
|
+
return message.blocks.some((block: ContentBlock.Any) => block._tag === 'toolCall' || block._tag === 'toolResult');
|
|
13
|
+
};
|
|
@@ -7,8 +7,8 @@ import React, { Fragment, useEffect, useState } from 'react';
|
|
|
7
7
|
import { type Skill } from '@dxos/compute';
|
|
8
8
|
import { Operation } from '@dxos/compute';
|
|
9
9
|
import { type Database, Filter, type Ref } from '@dxos/echo';
|
|
10
|
+
import { useQuery } from '@dxos/echo-react';
|
|
10
11
|
import { log } from '@dxos/log';
|
|
11
|
-
import { useQuery } from '@dxos/react-client/echo';
|
|
12
12
|
import { ScrollArea, type ThemedClassName } from '@dxos/react-ui';
|
|
13
13
|
import { composable, composableProps } from '@dxos/react-ui';
|
|
14
14
|
import { mx } from '@dxos/ui-theme';
|
package/src/components/index.ts
CHANGED
|
@@ -7,19 +7,21 @@ import * as Effect from 'effect/Effect';
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
|
|
9
9
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
|
-
import { Agent
|
|
10
|
+
import { Agent } from '@dxos/assistant-toolkit';
|
|
11
|
+
import { Instructions } from '@dxos/compute';
|
|
11
12
|
import { Feed, Filter, Obj, Ref } from '@dxos/echo';
|
|
13
|
+
import { useQuery } from '@dxos/echo-react';
|
|
12
14
|
import { ClientPlugin } from '@dxos/plugin-client/testing';
|
|
13
15
|
import { initializeIdentity } from '@dxos/plugin-client/testing';
|
|
14
16
|
import { PreviewPlugin } from '@dxos/plugin-preview/testing';
|
|
15
17
|
import { RoutinePlugin } from '@dxos/plugin-routine/testing';
|
|
16
18
|
import { StorybookPlugin, corePlugins } from '@dxos/plugin-testing';
|
|
17
19
|
import { random } from '@dxos/random';
|
|
18
|
-
import {
|
|
20
|
+
import { useSpaces } from '@dxos/react-client/echo';
|
|
19
21
|
import { Loading, withTheme } from '@dxos/react-ui/testing';
|
|
20
22
|
import { Text } from '@dxos/schema';
|
|
21
23
|
import { TypeSpec, createObjectFactory } from '@dxos/schema/testing';
|
|
22
|
-
import { Message, Organization, Person } from '@dxos/types';
|
|
24
|
+
import { Message, Organization, Outline, Person } from '@dxos/types';
|
|
23
25
|
|
|
24
26
|
import { createMessage } from '#testing';
|
|
25
27
|
import { translations } from '#translations';
|
|
@@ -61,7 +63,16 @@ const meta = {
|
|
|
61
63
|
plugins: [
|
|
62
64
|
...corePlugins(),
|
|
63
65
|
ClientPlugin({
|
|
64
|
-
types: [
|
|
66
|
+
types: [
|
|
67
|
+
Agent.Agent,
|
|
68
|
+
Feed.Feed,
|
|
69
|
+
Message.Message,
|
|
70
|
+
Outline.Outline,
|
|
71
|
+
Text.Text,
|
|
72
|
+
Instructions.Instructions,
|
|
73
|
+
Organization.Organization,
|
|
74
|
+
Person.Person,
|
|
75
|
+
],
|
|
65
76
|
onClientInitialized: ({ client }) =>
|
|
66
77
|
Effect.gen(function* () {
|
|
67
78
|
yield* initializeIdentity(client);
|
|
@@ -86,13 +97,9 @@ const meta = {
|
|
|
86
97
|
|
|
87
98
|
space.db.add(
|
|
88
99
|
Obj.make(Agent.Agent, {
|
|
89
|
-
instructions: Ref.make(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
data: Ref.make(obj),
|
|
93
|
-
})),
|
|
94
|
-
feed: Ref.make(inputFeed),
|
|
95
|
-
subscriptions: [],
|
|
100
|
+
instructions: Ref.make(
|
|
101
|
+
Instructions.make({ text: 'You are a helpful agent working on the sample data set.' }),
|
|
102
|
+
),
|
|
96
103
|
}),
|
|
97
104
|
);
|
|
98
105
|
}),
|
|
@@ -1,48 +1,40 @@
|
|
|
1
1
|
//
|
|
2
|
-
// Copyright
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Atom, useAtomValue } from '@effect-atom/atom-react';
|
|
6
5
|
import * as Effect from 'effect/Effect';
|
|
7
|
-
import
|
|
8
|
-
import React, { forwardRef, useCallback, useMemo, useState } from 'react';
|
|
6
|
+
import React, { useCallback } from 'react';
|
|
9
7
|
|
|
10
|
-
import {
|
|
11
|
-
import { AppSurface
|
|
8
|
+
import { useSpaceCallback } from '@dxos/app-framework/ui';
|
|
9
|
+
import { type AppSurface } from '@dxos/app-toolkit/ui';
|
|
12
10
|
import { Agent } from '@dxos/assistant-toolkit';
|
|
13
|
-
import { Database,
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { Masonry } from '@dxos/react-ui-masonry';
|
|
18
|
-
import { Menu } from '@dxos/react-ui-menu';
|
|
19
|
-
import { Focus, Mosaic, type MosaicTileProps } from '@dxos/react-ui-mosaic';
|
|
20
|
-
import { isNonNullable } from '@dxos/util';
|
|
11
|
+
import { Database, Obj } from '@dxos/echo';
|
|
12
|
+
import { useObject } from '@dxos/echo-react';
|
|
13
|
+
import { InstructionsEditor } from '@dxos/plugin-routine/components';
|
|
14
|
+
import { Panel, Toolbar, useTranslation } from '@dxos/react-ui';
|
|
21
15
|
|
|
22
16
|
import { meta } from '#meta';
|
|
23
17
|
|
|
24
|
-
type Tab = 'artifacts' | 'inputs';
|
|
25
|
-
|
|
26
18
|
export type AgentArticleProps = AppSurface.ObjectArticleProps<Agent.Agent>;
|
|
27
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Article surface for an {@link Agent} — the identity/preset: its instructions (text, skills,
|
|
22
|
+
* objects, commands) plus a reset for its conversation history. Durable artifacts live on a
|
|
23
|
+
* Project; automation (subscriptions/schedule) is edited in the properties panel.
|
|
24
|
+
*/
|
|
28
25
|
export const AgentArticle = ({ role, subject: agent }: AgentArticleProps) => {
|
|
29
26
|
const { t } = useTranslation(meta.profile.key);
|
|
30
|
-
const
|
|
31
|
-
|
|
27
|
+
const db = Obj.getDatabase(agent);
|
|
28
|
+
// Resolve reactively: a sync `.target` read never resolves on a cold/deep-link load.
|
|
29
|
+
const [instructionsSnapshot] = useObject(agent.instructions);
|
|
30
|
+
const instructions = Obj.getReactiveOrUndefined(instructionsSnapshot);
|
|
32
31
|
|
|
33
|
-
const spaceId =
|
|
34
|
-
// TODO(burdon): Clear input feed also.
|
|
32
|
+
const spaceId = db?.spaceId;
|
|
35
33
|
const resetHistory = useSpaceCallback(
|
|
36
34
|
spaceId,
|
|
37
|
-
[Database.Service]
|
|
35
|
+
[Database.Service],
|
|
38
36
|
Effect.fnUntraced(function* () {
|
|
39
37
|
yield* Agent.resetChatHistory(agent);
|
|
40
|
-
if (!agent.feed) {
|
|
41
|
-
const feed = yield* Database.add(Feed.make());
|
|
42
|
-
Obj.update(agent, (agent) => {
|
|
43
|
-
agent.feed = Ref.make(feed);
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
38
|
}),
|
|
47
39
|
[agent],
|
|
48
40
|
);
|
|
@@ -50,143 +42,27 @@ export const AgentArticle = ({ role, subject: agent }: AgentArticleProps) => {
|
|
|
50
42
|
await resetHistory();
|
|
51
43
|
}, [resetHistory]);
|
|
52
44
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
Obj.atom(agent).pipe((agent) =>
|
|
57
|
-
Atom.make((get) => {
|
|
58
|
-
return get(agent)
|
|
59
|
-
.artifacts.map((artifact) => get(artifact.data.atom))
|
|
60
|
-
.filter(isNonNullable);
|
|
61
|
-
}),
|
|
62
|
-
),
|
|
63
|
-
[agent],
|
|
64
|
-
),
|
|
65
|
-
);
|
|
66
|
-
|
|
67
|
-
const inputFeed = useAtomValue(
|
|
68
|
-
Obj.atom(agent).pipe((_) =>
|
|
69
|
-
Atom.make((get) =>
|
|
70
|
-
Option.fromNullable(get(_).feed).pipe(
|
|
71
|
-
Option.map((ref) => ref.atom),
|
|
72
|
-
Option.map(get),
|
|
73
|
-
Option.getOrUndefined,
|
|
74
|
-
),
|
|
75
|
-
),
|
|
76
|
-
),
|
|
77
|
-
);
|
|
78
|
-
|
|
79
|
-
const db = Obj.getDatabase(agent);
|
|
80
|
-
const inputObjects = useQuery(
|
|
81
|
-
db,
|
|
82
|
-
inputFeed ? Query.select(Filter.everything()).from(inputFeed) : Query.select(Filter.nothing()),
|
|
83
|
-
);
|
|
45
|
+
if (!db) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
84
48
|
|
|
85
49
|
return (
|
|
86
50
|
<Panel.Root role={role}>
|
|
87
51
|
<Panel.Toolbar asChild>
|
|
88
52
|
<Toolbar.Root>
|
|
89
|
-
<Toolbar.
|
|
90
|
-
<Toolbar.ToggleGroupIconItem value='artifacts' label={t('artifacts.label')} icon='ph--cube--regular' />
|
|
91
|
-
<Toolbar.ToggleGroupIconItem value='inputs' label={t('inputs.label')} icon='ph--queue--regular' />
|
|
92
|
-
</Toolbar.ToggleGroup>
|
|
93
|
-
<Toolbar.Separator />
|
|
53
|
+
<Toolbar.Separator variant='gap' />
|
|
94
54
|
<Toolbar.IconButton
|
|
95
55
|
icon='ph--trash--regular'
|
|
96
56
|
label={t('reset-history.button')}
|
|
97
|
-
|
|
57
|
+
onClick={handleResetHistory}
|
|
98
58
|
/>
|
|
99
59
|
</Toolbar.Root>
|
|
100
60
|
</Panel.Toolbar>
|
|
101
|
-
<Panel.Content
|
|
102
|
-
{
|
|
103
|
-
<>
|
|
104
|
-
{artifacts.length === 0 && (
|
|
105
|
-
<Message.Root classNames='m-2' valence='info'>
|
|
106
|
-
<Message.Title>{t('project-empty-spec.message')}</Message.Title>
|
|
107
|
-
<Message.Content>{t('project-empty-spec.description')}</Message.Content>
|
|
108
|
-
</Message.Root>
|
|
109
|
-
)}
|
|
110
|
-
|
|
111
|
-
<Masonry.Root Tile={MasonryArtifactTile}>
|
|
112
|
-
<Masonry.Content padding thin centered>
|
|
113
|
-
<Masonry.Viewport items={artifacts} getId={(item: Obj.Unknown) => item.id} />
|
|
114
|
-
</Masonry.Content>
|
|
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
|
-
)}
|
|
61
|
+
<Panel.Content classNames='dx-container'>
|
|
62
|
+
{instructions && <InstructionsEditor db={db} instructions={instructions} />}
|
|
137
63
|
</Panel.Content>
|
|
138
64
|
</Panel.Root>
|
|
139
65
|
);
|
|
140
66
|
};
|
|
141
67
|
|
|
142
|
-
|
|
143
|
-
const objectMenuItems = useObjectMenuItems(data);
|
|
144
|
-
const icon = Obj.getIcon(data)?.icon ?? 'ph--circle-dashed--regular';
|
|
145
|
-
|
|
146
|
-
return (
|
|
147
|
-
<Card.Root {...props} ref={forwardedRef} data-testid='board-item' fullWidth>
|
|
148
|
-
<Card.Header>
|
|
149
|
-
<Card.Block>
|
|
150
|
-
<Icon icon={icon} />
|
|
151
|
-
</Card.Block>
|
|
152
|
-
<Card.Title>{Obj.getLabel(data, { fallback: 'typename' })}</Card.Title>
|
|
153
|
-
{/* TODO(wittjosiah): Reconcile with Card.Menu. */}
|
|
154
|
-
<Card.Block end>
|
|
155
|
-
<Menu.Trigger asChild disabled={!objectMenuItems?.length}>
|
|
156
|
-
<IconButton iconOnly variant='ghost' icon='ph--dots-three-vertical--regular' label='Actions' />
|
|
157
|
-
</Menu.Trigger>
|
|
158
|
-
<Menu.Content items={objectMenuItems} />
|
|
159
|
-
</Card.Block>
|
|
160
|
-
</Card.Header>
|
|
161
|
-
<Card.Body>
|
|
162
|
-
<Surface.Surface
|
|
163
|
-
type={AppSurface.CardContent}
|
|
164
|
-
limit={1}
|
|
165
|
-
data={{ subject: data } satisfies AppSurface.ObjectCardData}
|
|
166
|
-
/>
|
|
167
|
-
</Card.Body>
|
|
168
|
-
</Card.Root>
|
|
169
|
-
);
|
|
170
|
-
});
|
|
171
|
-
|
|
172
|
-
ArtifactTileCard.displayName = 'ArtifactTileCard';
|
|
173
|
-
|
|
174
|
-
const MasonryArtifactTile = ({ data }: { data: Obj.Unknown; index: number }) => (
|
|
175
|
-
<Menu.Root>
|
|
176
|
-
<ArtifactTileCard data={data} />
|
|
177
|
-
</Menu.Root>
|
|
178
|
-
);
|
|
179
|
-
|
|
180
|
-
const StackTile = forwardRef<HTMLDivElement, MosaicTileProps<Obj.Unknown>>(
|
|
181
|
-
({ data, location, debug, current }, forwardedRef) => (
|
|
182
|
-
<Menu.Root>
|
|
183
|
-
<Mosaic.Tile asChild id={data.id} data={data} location={location} debug={debug}>
|
|
184
|
-
<Focus.Item asChild current={current}>
|
|
185
|
-
<ArtifactTileCard ref={forwardedRef} data={data} />
|
|
186
|
-
</Focus.Item>
|
|
187
|
-
</Mosaic.Tile>
|
|
188
|
-
</Menu.Root>
|
|
189
|
-
),
|
|
190
|
-
);
|
|
191
|
-
|
|
192
|
-
StackTile.displayName = 'StackTile';
|
|
68
|
+
AgentArticle.displayName = 'AgentArticle';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import React, {
|
|
5
|
+
import React, { useCallback, useRef } from 'react';
|
|
6
6
|
|
|
7
7
|
import { useSpaceCallback } from '@dxos/app-framework/ui';
|
|
8
8
|
import { type AppSurface } from '@dxos/app-toolkit/ui';
|
|
@@ -18,26 +18,30 @@ export type AgentPropertiesProps = AppSurface.ObjectPropertiesProps<Agent.Agent>
|
|
|
18
18
|
export const AgentProperties = ({ subject: agent }: AgentPropertiesProps) => {
|
|
19
19
|
const spaceId = Obj.getDatabase(agent)?.spaceId;
|
|
20
20
|
|
|
21
|
-
//
|
|
22
|
-
|
|
21
|
+
// Subscriptions live on the compiled automation, so a toggle recompiles them (per-category
|
|
22
|
+
// reconcile — the schedule routine is untouched). `useSpaceCallback` takes no arguments, so the
|
|
23
|
+
// next set is staged on a ref.
|
|
24
|
+
const pendingSubscriptions = useRef<Ref.Ref<Obj.Unknown>[]>([]);
|
|
25
|
+
const syncAutomation = useSpaceCallback(
|
|
23
26
|
spaceId,
|
|
24
27
|
[] as const,
|
|
25
|
-
() =>
|
|
28
|
+
() =>
|
|
29
|
+
Operation.invoke(AgentWizardOperations.SyncAutomation, {
|
|
30
|
+
agent: Ref.make(agent),
|
|
31
|
+
subscriptions: pendingSubscriptions.current,
|
|
32
|
+
}),
|
|
26
33
|
[agent],
|
|
27
34
|
);
|
|
28
35
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
queueMicrotask(() => {
|
|
37
|
-
syncTriggers().catch((err) => log.catch(err));
|
|
38
|
-
});
|
|
39
|
-
});
|
|
40
|
-
}, [spaceId, agent, syncTriggers]);
|
|
36
|
+
const handleSubscriptionsChanged = useCallback(
|
|
37
|
+
(subscriptions: Ref.Ref<Obj.Unknown>[]) => {
|
|
38
|
+
pendingSubscriptions.current = subscriptions;
|
|
39
|
+
syncAutomation().catch((err) => log.catch(err));
|
|
40
|
+
},
|
|
41
|
+
[syncAutomation],
|
|
42
|
+
);
|
|
41
43
|
|
|
42
|
-
return <AgentPropertiesComponent agent={agent} />;
|
|
44
|
+
return <AgentPropertiesComponent agent={agent} onSubscriptionsChanged={handleSubscriptionsChanged} />;
|
|
43
45
|
};
|
|
46
|
+
|
|
47
|
+
AgentProperties.displayName = 'AgentProperties';
|