@dxos/plugin-assistant 0.8.4-main.422d1c7879 → 0.8.4-main.4f23b4e393
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/neutral/AgentArticle-5XDDEXMP.mjs +169 -0
- package/dist/lib/neutral/AgentArticle-5XDDEXMP.mjs.map +7 -0
- package/dist/lib/neutral/AgentProperties-CNH4JMDZ.mjs +100 -0
- package/dist/lib/neutral/AgentProperties-CNH4JMDZ.mjs.map +7 -0
- package/dist/lib/neutral/AssistantPlugin.mjs +99 -0
- package/dist/lib/neutral/AssistantPlugin.mjs.map +7 -0
- package/dist/lib/neutral/AssistantPlugin.node.mjs +46 -0
- package/dist/lib/neutral/AssistantPlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/AssistantSettings-GG52BLKS.mjs +40 -0
- package/dist/lib/neutral/AssistantSettings-GG52BLKS.mjs.map +7 -0
- package/dist/lib/neutral/BlueprintArticle-U7LUBFOS.mjs +27 -0
- package/dist/lib/neutral/BlueprintArticle-U7LUBFOS.mjs.map +7 -0
- package/dist/lib/neutral/ChatCompanion-L33PFOFB.mjs +130 -0
- package/dist/lib/neutral/ChatCompanion-L33PFOFB.mjs.map +7 -0
- package/dist/lib/neutral/ChatContainer-VYVJYPPN.mjs +8 -0
- package/dist/lib/neutral/ChatDialog-QKZLG7SQ.mjs +72 -0
- package/dist/lib/neutral/ChatDialog-QKZLG7SQ.mjs.map +7 -0
- package/dist/lib/neutral/PlanArticle-TS5ULWYS.mjs +28 -0
- package/dist/lib/neutral/PlanArticle-TS5ULWYS.mjs.map +7 -0
- package/dist/lib/neutral/RoutineArticle-H7ECM7AH.mjs +116 -0
- package/dist/lib/neutral/RoutineArticle-H7ECM7AH.mjs.map +7 -0
- package/dist/lib/neutral/RoutineList-CLDXGQUD.mjs +48 -0
- package/dist/lib/neutral/RoutineList-CLDXGQUD.mjs.map +7 -0
- package/dist/lib/neutral/TracePanel-HYVPDIAA.mjs +565 -0
- package/dist/lib/neutral/TracePanel-HYVPDIAA.mjs.map +7 -0
- package/dist/lib/neutral/TriggerStatus-WTFYUIG5.mjs +92 -0
- package/dist/lib/neutral/TriggerStatus-WTFYUIG5.mjs.map +7 -0
- package/dist/lib/neutral/ai-service-GJXMI5OI.mjs +22 -0
- package/dist/lib/neutral/ai-service-GJXMI5OI.mjs.map +7 -0
- package/dist/lib/neutral/app-graph-builder-LHRT43KA.mjs +189 -0
- package/dist/lib/neutral/app-graph-builder-LHRT43KA.mjs.map +7 -0
- package/dist/lib/neutral/blueprint-definition-VXJYQ5AE.mjs +32 -0
- package/dist/lib/neutral/blueprint-definition-VXJYQ5AE.mjs.map +7 -0
- package/dist/lib/{browser → neutral}/blueprints/index.mjs +1 -1
- package/dist/lib/neutral/capabilities/index.mjs +35 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-4CQZCMRP.mjs +25 -0
- package/dist/lib/neutral/chunk-4CQZCMRP.mjs.map +7 -0
- package/dist/lib/{browser/chunk-EZRS3J25.mjs → neutral/chunk-5H6UJHLF.mjs} +3 -3
- package/dist/lib/neutral/chunk-5H6UJHLF.mjs.map +7 -0
- package/dist/lib/neutral/chunk-A4SCD32D.mjs +106 -0
- package/dist/lib/neutral/chunk-A4SCD32D.mjs.map +7 -0
- package/dist/lib/neutral/chunk-OT2QDO3T.mjs +8 -0
- package/dist/lib/neutral/chunk-OT2QDO3T.mjs.map +7 -0
- package/dist/lib/neutral/chunk-VHPTYKYD.mjs +361 -0
- package/dist/lib/neutral/chunk-VHPTYKYD.mjs.map +7 -0
- package/dist/lib/neutral/companion-chat-provisioner-2Y6PRSDK.mjs +116 -0
- package/dist/lib/neutral/companion-chat-provisioner-2Y6PRSDK.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +2297 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +29 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/{browser/create-chat-LBZHGVSN.mjs → neutral/create-chat-5VM2UUWY.mjs} +8 -19
- package/dist/lib/neutral/create-chat-5VM2UUWY.mjs.map +7 -0
- package/dist/lib/neutral/create-object-UZCJCPWM.mjs +93 -0
- package/dist/lib/neutral/create-object-UZCJCPWM.mjs.map +7 -0
- package/dist/lib/neutral/edge-model-resolver-XDNBZ3US.mjs +21 -0
- package/dist/lib/neutral/edge-model-resolver-XDNBZ3US.mjs.map +7 -0
- package/dist/lib/{browser/ensure-companion-chat-ZEZA34MZ.mjs → neutral/ensure-companion-chat-5S4LZM2H.mjs} +10 -17
- package/dist/lib/neutral/ensure-companion-chat-5S4LZM2H.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +930 -0
- package/dist/lib/neutral/hooks/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +32 -0
- package/dist/lib/neutral/local-model-resolver-I2BENFFS.mjs +24 -0
- package/dist/lib/neutral/local-model-resolver-I2BENFFS.mjs.map +7 -0
- package/dist/lib/neutral/markdown-KTBFOMFM.mjs +110 -0
- package/dist/lib/neutral/markdown-KTBFOMFM.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +12 -0
- package/dist/lib/neutral/migrations-7DEMVBOG.mjs +28 -0
- package/dist/lib/neutral/migrations-7DEMVBOG.mjs.map +7 -0
- package/dist/lib/{browser/on-create-space-54RNX5JI.mjs → neutral/on-create-space-Q2R7OSP6.mjs} +5 -8
- package/dist/lib/neutral/on-create-space-Q2R7OSP6.mjs.map +7 -0
- package/dist/lib/neutral/operation-handler-SF36MOB5.mjs +13 -0
- package/dist/lib/neutral/operation-handler-SF36MOB5.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +8 -0
- package/dist/lib/neutral/plugin.mjs +16 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-2WAPE25I.mjs +174 -0
- package/dist/lib/neutral/react-surface-2WAPE25I.mjs.map +7 -0
- package/dist/lib/{browser/resolve-navigation-targets-NZOD66NY.mjs → neutral/resolve-navigation-targets-VXBSWV5L.mjs} +4 -6
- package/dist/lib/neutral/resolve-navigation-targets-VXBSWV5L.mjs.map +7 -0
- package/dist/lib/{browser/run-prompt-in-new-chat-THLK5YQC.mjs → neutral/run-prompt-in-new-chat-XEPT5MOM.mjs} +14 -50
- package/dist/lib/neutral/run-prompt-in-new-chat-XEPT5MOM.mjs.map +7 -0
- package/dist/lib/{browser/set-current-chat-LRS3VFSH.mjs → neutral/set-current-chat-ZFDCYK5I.mjs} +5 -11
- package/dist/lib/neutral/set-current-chat-ZFDCYK5I.mjs.map +7 -0
- package/dist/lib/neutral/settings-W4BLWQ53.mjs +28 -0
- package/dist/lib/neutral/settings-W4BLWQ53.mjs.map +7 -0
- package/dist/lib/neutral/state-H3G7QCU6.mjs +28 -0
- package/dist/lib/neutral/state-H3G7QCU6.mjs.map +7 -0
- package/dist/lib/neutral/toolkit-GVWXPDLJ.mjs +14 -0
- package/dist/lib/neutral/toolkit-GVWXPDLJ.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +174 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +20 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/lib/{browser/update-chat-name-3Y36KFAS.mjs → neutral/update-chat-name-ENXRUMDJ.mjs} +8 -25
- package/dist/lib/neutral/update-chat-name-ENXRUMDJ.mjs.map +7 -0
- package/dist/types/src/AssistantPlugin.d.ts +1 -0
- package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
- package/dist/types/src/AssistantPlugin.node.d.ts +4 -0
- package/dist/types/src/AssistantPlugin.node.d.ts.map +1 -0
- package/dist/types/src/AssistantPlugin.test.d.ts +2 -0
- package/dist/types/src/AssistantPlugin.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/assistant/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/assistant/blueprint.d.ts.map +1 -1
- package/dist/types/src/capabilities/ai-service.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -1
- package/dist/types/src/capabilities/companion-chat-provisioner.d.ts.map +1 -1
- package/dist/types/src/capabilities/create-object.d.ts +31 -0
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
- package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +27 -1
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/local-model-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/markdown.d.ts.map +1 -1
- package/dist/types/src/capabilities/migrations.d.ts +2 -1
- package/dist/types/src/capabilities/migrations.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/capabilities/toolkit.d.ts.map +1 -1
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts +1 -1
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +1 -1
- package/dist/types/src/components/AssistantSettings/AssistantSettings.stories.d.ts.map +1 -1
- package/dist/types/src/components/Chat/Chat.d.ts +36 -40
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/src/components/Chat/context.d.ts +29 -0
- package/dist/types/src/components/Chat/context.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatMcpErrors.d.ts +12 -0
- package/dist/types/src/components/ChatPrompt/ChatMcpErrors.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts +7 -5
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatOptions.stories.d.ts +1 -1
- package/dist/types/src/components/ChatPrompt/ChatOptions.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatPresets.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatPrompt.d.ts +28 -0
- package/dist/types/src/components/ChatPrompt/ChatPrompt.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts +2 -2
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatStatus.d.ts +20 -0
- package/dist/types/src/components/ChatPrompt/ChatStatus.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/index.d.ts +3 -0
- package/dist/types/src/components/ChatPrompt/index.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/Anchor.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.d.ts +6 -3
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +5 -5
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/Link.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/MarkdownStream.stories.d.ts +1 -1
- package/dist/types/src/components/ChatThread/MarkdownStream.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/registry.d.ts +18 -0
- package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/sync.d.ts +1 -1
- package/dist/types/src/components/ChatThread/sync.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/tool-widget-state.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/FallbackWidget.d.ts +4 -4
- package/dist/types/src/components/ChatThread/widgets/FallbackWidget.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/ReferenceWidget.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/SelectWidget.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/StatsWidget.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/StatusWidget.d.ts +2 -15
- package/dist/types/src/components/ChatThread/widgets/StatusWidget.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/SuggestionWidget.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/SummaryWidget.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/ToolWidget.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/ToolWidget.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/widgets/defaults.d.ts +5 -0
- package/dist/types/src/components/ChatThread/widgets/defaults.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/widgets/index.d.ts +1 -2
- package/dist/types/src/components/ChatThread/widgets/index.d.ts.map +1 -1
- package/dist/types/src/components/ProcessTree/ProcessTree.d.ts +2 -1
- package/dist/types/src/components/ProcessTree/ProcessTree.d.ts.map +1 -1
- package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts +0 -1
- package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts.map +1 -1
- package/dist/types/src/components/TaskList/TaskList.d.ts +10 -0
- package/dist/types/src/components/TaskList/TaskList.d.ts.map +1 -0
- package/dist/types/src/components/TaskList/TaskList.stories.d.ts +16 -0
- package/dist/types/src/components/TaskList/TaskList.stories.d.ts.map +1 -0
- package/dist/types/src/components/TaskList/index.d.ts +2 -0
- package/dist/types/src/components/TaskList/index.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +2 -2
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +4 -5
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/extensions/handlebars-extension.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/extensions/xml-extension.d.ts.map +1 -1
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts +4 -4
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.d.ts +3 -3
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/AgentArticle/AgentArticle.d.ts.map +1 -1
- package/dist/types/src/containers/AgentArticle/AgentArticle.stories.d.ts.map +1 -1
- package/dist/types/src/containers/AgentProperties/AgentProperties.d.ts.map +1 -1
- package/dist/types/src/containers/AgentProperties/AgentProperties.stories.d.ts.map +1 -1
- package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts +1 -1
- package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts.map +1 -1
- package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts +1 -1
- package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts.map +1 -1
- package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts.map +1 -1
- package/dist/types/src/containers/ChatDialog/ChatDialog.d.ts.map +1 -1
- package/dist/types/src/containers/PlanArticle/PlanArticle.d.ts +6 -0
- package/dist/types/src/containers/PlanArticle/PlanArticle.d.ts.map +1 -0
- package/dist/types/src/containers/PlanArticle/index.d.ts +2 -0
- package/dist/types/src/containers/PlanArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineArticle/RoutineArticle.d.ts +6 -0
- package/dist/types/src/containers/RoutineArticle/RoutineArticle.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineArticle/RoutineArticle.stories.d.ts +15 -0
- package/dist/types/src/containers/RoutineArticle/RoutineArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineArticle/index.d.ts +2 -0
- package/dist/types/src/containers/RoutineArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineList/RoutineList.d.ts +6 -0
- package/dist/types/src/containers/RoutineList/RoutineList.d.ts.map +1 -0
- package/dist/types/src/containers/{PromptList/PromptList.stories.d.ts → RoutineList/RoutineList.stories.d.ts} +1 -1
- package/dist/types/src/containers/RoutineList/RoutineList.stories.d.ts.map +1 -0
- package/dist/types/src/containers/RoutineList/index.d.ts +2 -0
- package/dist/types/src/containers/RoutineList/index.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/TracePanel.d.ts +3 -2
- package/dist/types/src/containers/TracePanel/TracePanel.d.ts.map +1 -1
- package/dist/types/src/containers/TracePanel/TracePanel.stories.d.ts +1 -4
- package/dist/types/src/containers/TracePanel/TracePanel.stories.d.ts.map +1 -1
- package/dist/types/src/containers/TracePanel/dxn-extractor.d.ts +1 -1
- package/dist/types/src/containers/TracePanel/dxn-extractor.d.ts.map +1 -1
- package/dist/types/src/containers/TracePanel/execution-graph.d.ts +81 -1
- package/dist/types/src/containers/TracePanel/execution-graph.d.ts.map +1 -1
- package/dist/types/src/containers/TracePanel/execution-graph.test.d.ts +2 -0
- package/dist/types/src/containers/TracePanel/execution-graph.test.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/index.d.ts.map +1 -1
- package/dist/types/src/containers/TracePanel/testing/index.d.ts +3 -0
- package/dist/types/src/containers/TracePanel/testing/index.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/testing/simulated-agent.d.ts +14 -0
- package/dist/types/src/containers/TracePanel/testing/simulated-agent.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/testing/snapshot-playback.d.ts +12 -0
- package/dist/types/src/containers/TracePanel/testing/snapshot-playback.d.ts.map +1 -0
- package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts.map +1 -1
- package/dist/types/src/containers/index.d.ts +5 -4
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/extensions/prompt-extension.d.ts.map +1 -1
- package/dist/types/src/feed-logger.d.ts +13 -0
- package/dist/types/src/feed-logger.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +2 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts +4 -4
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatKeymap.d.ts +12 -0
- package/dist/types/src/hooks/useChatKeymap.d.ts.map +1 -0
- package/dist/types/src/hooks/useChatProcessor.d.ts +2 -2
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatToolbarActions.d.ts.map +1 -1
- package/dist/types/src/hooks/useContextBinder.d.ts +2 -2
- package/dist/types/src/hooks/useContextBinder.d.ts.map +1 -1
- package/dist/types/src/hooks/useContextObjects.d.ts +2 -2
- package/dist/types/src/hooks/useContextObjects.d.ts.map +1 -1
- package/dist/types/src/hooks/useDebug.d.ts +10 -0
- package/dist/types/src/hooks/useDebug.d.ts.map +1 -0
- package/dist/types/src/hooks/useFilteredTypes.d.ts.map +1 -1
- package/dist/types/src/hooks/useFlush.d.ts +1 -1
- package/dist/types/src/hooks/useFlush.d.ts.map +1 -1
- package/dist/types/src/hooks/usePresets.d.ts.map +1 -1
- package/dist/types/src/hooks/useReferencesProvider.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +0 -4
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/operations/create-chat.d.ts +3 -3
- package/dist/types/src/operations/create-chat.d.ts.map +1 -1
- package/dist/types/src/operations/ensure-companion-chat.d.ts +3 -3
- package/dist/types/src/operations/ensure-companion-chat.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts +1 -2
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/operations/on-create-space.d.ts +3 -3
- package/dist/types/src/operations/on-create-space.d.ts.map +1 -1
- package/dist/types/src/operations/resolve-navigation-targets.d.ts +1 -1
- package/dist/types/src/operations/resolve-navigation-targets.d.ts.map +1 -1
- package/dist/types/src/operations/run-prompt-in-new-chat.d.ts +3 -3
- package/dist/types/src/operations/run-prompt-in-new-chat.d.ts.map +1 -1
- package/dist/types/src/operations/set-current-chat.d.ts +3 -3
- package/dist/types/src/operations/set-current-chat.d.ts.map +1 -1
- package/dist/types/src/operations/update-chat-name.d.ts +3 -3
- package/dist/types/src/operations/update-chat-name.d.ts.map +1 -1
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/processor/processor.d.ts +30 -12
- package/dist/types/src/processor/processor.d.ts.map +1 -1
- package/dist/types/src/testing/index.d.ts +1 -0
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/test-generator.d.ts +2 -3
- package/dist/types/src/testing/test-generator.d.ts.map +1 -1
- package/dist/types/src/testing/test-sequence.d.ts +3 -3
- package/dist/types/src/testing/test-sequence.d.ts.map +1 -1
- package/dist/types/src/testing/test-services.d.ts.map +1 -1
- package/dist/types/src/testing/test-trace.d.ts +5 -0
- package/dist/types/src/testing/test-trace.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Assistant.d.ts +22 -6
- package/dist/types/src/types/Assistant.d.ts.map +1 -1
- package/dist/types/src/types/AssistantCapabilities.d.ts +30 -0
- package/dist/types/src/types/AssistantCapabilities.d.ts.map +1 -0
- package/dist/types/src/types/AssistantEvents.d.ts +3 -0
- package/dist/types/src/types/AssistantEvents.d.ts.map +1 -0
- package/dist/types/src/{operations/definitions.d.ts → types/AssistantOperation.d.ts} +27 -20
- package/dist/types/src/types/AssistantOperation.d.ts.map +1 -0
- package/dist/types/src/types/Settings.d.ts +20 -5
- package/dist/types/src/types/Settings.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +3 -3
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/service.d.ts +1 -1
- package/dist/types/src/types/service.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +156 -117
- package/src/AssistantPlugin.node.ts +44 -0
- package/src/AssistantPlugin.test.ts +35 -0
- package/src/AssistantPlugin.ts +126 -0
- package/src/blueprints/assistant/blueprint.test.ts +3 -3
- package/src/blueprints/assistant/blueprint.ts +4 -4
- package/src/capabilities/app-graph-builder.ts +42 -12
- package/src/capabilities/blueprint-definition.ts +2 -4
- package/src/capabilities/companion-chat-provisioner.ts +4 -5
- package/src/capabilities/create-object.ts +107 -0
- package/src/capabilities/index.ts +3 -1
- package/src/capabilities/markdown.ts +1 -1
- package/src/capabilities/migrations.ts +4 -11
- package/src/capabilities/operation-handler.ts +1 -1
- package/src/capabilities/react-surface.tsx +28 -14
- package/src/components/AssistantSettings/AssistantSettings.stories.tsx +3 -2
- package/src/components/AssistantSettings/AssistantSettings.tsx +22 -111
- package/src/components/Chat/Chat.tsx +85 -259
- package/src/components/Chat/context.ts +39 -0
- package/src/components/ChatPrompt/ChatActions.tsx +10 -10
- package/src/components/ChatPrompt/ChatMcpErrors.tsx +50 -0
- package/src/components/ChatPrompt/ChatOptions.stories.tsx +28 -14
- package/src/components/ChatPrompt/ChatOptions.tsx +100 -60
- package/src/components/ChatPrompt/ChatPrompt.tsx +182 -0
- package/src/components/ChatPrompt/ChatReferences.tsx +4 -4
- package/src/components/ChatPrompt/ChatStatus.tsx +123 -0
- package/src/components/ChatPrompt/ChatStatusIndicator.tsx +1 -1
- package/src/components/ChatPrompt/index.ts +3 -0
- package/src/components/ChatThread/Anchor.stories.tsx +3 -3
- package/src/components/ChatThread/ChatThread.stories.tsx +27 -30
- package/src/components/ChatThread/ChatThread.tsx +31 -18
- package/src/components/ChatThread/DEBUG.md +41 -0
- package/src/components/ChatThread/MarkdownStream.stories.tsx +5 -4
- package/src/components/ChatThread/registry.tsx +61 -18
- package/src/components/ChatThread/sync.test.ts +84 -18
- package/src/components/ChatThread/sync.ts +1 -1
- package/src/components/ChatThread/widgets/ReasoningWidget.ts +7 -7
- package/src/components/ChatThread/widgets/ReferenceWidget.ts +3 -1
- package/src/components/ChatThread/widgets/SelectWidget.ts +3 -1
- package/src/components/ChatThread/widgets/StatsWidget.ts +3 -1
- package/src/components/ChatThread/widgets/StatusWidget.ts +5 -83
- package/src/components/ChatThread/widgets/SuggestionWidget.ts +1 -1
- package/src/components/ChatThread/widgets/SummaryWidget.tsx +3 -4
- package/src/components/ChatThread/widgets/ToolWidget.stories.tsx +2 -1
- package/src/components/ChatThread/widgets/defaults.ts +8 -0
- package/src/components/ChatThread/widgets/index.ts +1 -2
- package/src/components/ProcessTree/ProcessTree.stories.tsx +12 -38
- package/src/components/ProcessTree/ProcessTree.tsx +69 -36
- package/src/components/TaskList/TaskList.stories.tsx +44 -0
- package/src/components/TaskList/TaskList.tsx +45 -0
- package/src/{cli → components/TaskList}/index.ts +1 -1
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +4 -3
- package/src/components/TemplateEditor/TemplateEditor.tsx +5 -5
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +6 -9
- package/src/components/TemplateEditor/TemplateForm.tsx +51 -72
- package/src/components/Toolbox/Toolbox.stories.tsx +6 -5
- package/src/components/Toolbox/Toolbox.tsx +4 -4
- package/src/components/index.ts +1 -0
- package/src/containers/AgentArticle/AgentArticle.stories.tsx +8 -8
- package/src/containers/AgentArticle/AgentArticle.tsx +12 -8
- package/src/containers/AgentProperties/AgentProperties.stories.tsx +6 -5
- package/src/containers/AgentProperties/AgentProperties.tsx +6 -6
- package/src/containers/BlueprintArticle/BlueprintArticle.tsx +1 -1
- package/src/containers/ChatCompanion/ChatCompanion.tsx +13 -26
- package/src/containers/ChatContainer/ChatContainer.tsx +20 -8
- package/src/containers/ChatDialog/ChatDialog.tsx +3 -9
- package/src/containers/PlanArticle/PlanArticle.tsx +33 -0
- package/src/containers/PlanArticle/index.ts +5 -0
- package/src/containers/RoutineArticle/RoutineArticle.stories.tsx +75 -0
- package/src/containers/RoutineArticle/RoutineArticle.tsx +109 -0
- package/src/containers/RoutineArticle/index.ts +5 -0
- package/src/containers/{PromptList/PromptList.stories.tsx → RoutineList/RoutineList.stories.tsx} +13 -12
- package/src/containers/{PromptList/PromptList.tsx → RoutineList/RoutineList.tsx} +8 -7
- package/src/containers/RoutineList/index.ts +5 -0
- package/src/containers/TracePanel/TracePanel.stories.tsx +215 -202
- package/src/containers/TracePanel/TracePanel.tsx +101 -47
- package/src/containers/TracePanel/dxn-extractor.test.ts +7 -7
- package/src/containers/TracePanel/dxn-extractor.ts +11 -11
- package/src/containers/TracePanel/execution-graph.test.ts +382 -0
- package/src/containers/TracePanel/execution-graph.ts +380 -211
- package/src/containers/TracePanel/testing/index.ts +6 -0
- package/src/containers/TracePanel/testing/simulated-agent.ts +114 -0
- package/src/containers/TracePanel/testing/snapshot-playback.ts +45 -0
- package/src/containers/TriggerStatus/TriggerStatus.tsx +1 -1
- package/src/containers/index.ts +5 -4
- package/src/{queue-logger.ts → feed-logger.ts} +38 -28
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useBlueprintRegistry.ts +4 -4
- package/src/hooks/useChatKeymap.ts +52 -0
- package/src/hooks/useChatProcessor.ts +4 -4
- package/src/hooks/useChatServices.ts +1 -1
- package/src/hooks/useChatToolbarActions.ts +1 -1
- package/src/hooks/useContextBinder.ts +4 -4
- package/src/hooks/useContextObjects.ts +2 -2
- package/src/hooks/useDebug.ts +38 -0
- package/src/index.ts +0 -5
- package/src/operations/create-chat.ts +7 -9
- package/src/operations/ensure-companion-chat.ts +49 -47
- package/src/operations/index.ts +1 -3
- package/src/operations/on-create-space.ts +4 -4
- package/src/operations/prompt.test.ts +9 -11
- package/src/operations/resolve-navigation-targets.ts +3 -3
- package/src/operations/run-prompt-in-new-chat.ts +85 -86
- package/src/operations/set-current-chat.ts +4 -5
- package/src/operations/update-chat-name.ts +4 -4
- package/src/plugin.ts +11 -0
- package/src/processor/processor.test.ts +2 -2
- package/src/processor/processor.ts +49 -18
- package/src/testing/data/trace-timeline.dx.json +3737 -1200
- package/src/testing/index.ts +1 -0
- package/src/testing/test-generator.test.ts +41 -52
- package/src/testing/test-generator.ts +177 -192
- package/src/testing/test-sequence.ts +3 -3
- package/src/testing/test-trace.ts +20 -0
- package/src/testing/trace-timeline.conversations.json +1 -1
- package/src/testing/trace-timeline.test.ts +53 -49
- package/src/translations.ts +29 -33
- package/src/types/Assistant.ts +13 -1
- package/src/types/AssistantCapabilities.ts +35 -0
- package/src/types/AssistantEvents.ts +11 -0
- package/src/{operations/definitions.ts → types/AssistantOperation.ts} +5 -4
- package/src/types/Settings.ts +62 -7
- package/src/types/index.ts +5 -3
- package/src/types/service.ts +1 -1
- package/dist/lib/browser/AssistantSettings-7QMO3LGF.mjs +0 -97
- package/dist/lib/browser/AssistantSettings-7QMO3LGF.mjs.map +0 -7
- package/dist/lib/browser/chunk-ATHYBVGN.mjs +0 -176
- package/dist/lib/browser/chunk-ATHYBVGN.mjs.map +0 -7
- package/dist/lib/browser/chunk-EZRS3J25.mjs.map +0 -7
- package/dist/lib/browser/chunk-LMVTXH54.mjs +0 -154
- package/dist/lib/browser/chunk-LMVTXH54.mjs.map +0 -7
- package/dist/lib/browser/cli/index.mjs +0 -74
- package/dist/lib/browser/cli/index.mjs.map +0 -7
- package/dist/lib/browser/create-chat-LBZHGVSN.mjs.map +0 -7
- package/dist/lib/browser/ensure-companion-chat-ZEZA34MZ.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -3446
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/on-create-space-54RNX5JI.mjs.map +0 -7
- package/dist/lib/browser/operations/index.mjs +0 -13
- package/dist/lib/browser/operations/index.mjs.map +0 -7
- package/dist/lib/browser/resolve-navigation-targets-NZOD66NY.mjs.map +0 -7
- package/dist/lib/browser/run-prompt-in-new-chat-THLK5YQC.mjs.map +0 -7
- package/dist/lib/browser/set-current-chat-LRS3VFSH.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -20
- package/dist/lib/browser/update-chat-name-3Y36KFAS.mjs.map +0 -7
- package/dist/lib/node-esm/AssistantSettings-UVUTKO7E.mjs +0 -98
- package/dist/lib/node-esm/AssistantSettings-UVUTKO7E.mjs.map +0 -7
- package/dist/lib/node-esm/blueprints/index.mjs +0 -9
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
- package/dist/lib/node-esm/chunk-NZIKC7AN.mjs +0 -32
- package/dist/lib/node-esm/chunk-NZIKC7AN.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PXAJSTGZ.mjs +0 -177
- package/dist/lib/node-esm/chunk-PXAJSTGZ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-W3JZ2F4T.mjs +0 -155
- package/dist/lib/node-esm/chunk-W3JZ2F4T.mjs.map +0 -7
- package/dist/lib/node-esm/cli/index.mjs +0 -75
- package/dist/lib/node-esm/cli/index.mjs.map +0 -7
- package/dist/lib/node-esm/create-chat-3BEG4R6J.mjs +0 -83
- package/dist/lib/node-esm/create-chat-3BEG4R6J.mjs.map +0 -7
- package/dist/lib/node-esm/ensure-companion-chat-6K2WEWFP.mjs +0 -66
- package/dist/lib/node-esm/ensure-companion-chat-6K2WEWFP.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -3447
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/on-create-space-YRPZ6HZY.mjs +0 -23
- package/dist/lib/node-esm/on-create-space-YRPZ6HZY.mjs.map +0 -7
- package/dist/lib/node-esm/operations/index.mjs +0 -14
- package/dist/lib/node-esm/operations/index.mjs.map +0 -7
- package/dist/lib/node-esm/resolve-navigation-targets-3PPK7XLH.mjs +0 -23
- package/dist/lib/node-esm/resolve-navigation-targets-3PPK7XLH.mjs.map +0 -7
- package/dist/lib/node-esm/run-prompt-in-new-chat-OUYKCMQ7.mjs +0 -137
- package/dist/lib/node-esm/run-prompt-in-new-chat-OUYKCMQ7.mjs.map +0 -7
- package/dist/lib/node-esm/set-current-chat-SMXZJD3F.mjs +0 -55
- package/dist/lib/node-esm/set-current-chat-SMXZJD3F.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -21
- package/dist/lib/node-esm/update-chat-name-HM2P4NSI.mjs +0 -72
- package/dist/lib/node-esm/update-chat-name-HM2P4NSI.mjs.map +0 -7
- package/dist/types/src/cli/index.d.ts +0 -2
- package/dist/types/src/cli/index.d.ts.map +0 -1
- package/dist/types/src/cli/plugin.d.ts +0 -10
- package/dist/types/src/cli/plugin.d.ts.map +0 -1
- package/dist/types/src/components/ChatProgress/ChatProgress.d.ts +0 -10
- package/dist/types/src/components/ChatProgress/ChatProgress.d.ts.map +0 -1
- package/dist/types/src/components/ChatProgress/index.d.ts +0 -2
- package/dist/types/src/components/ChatProgress/index.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/widgets/PromptWidget.d.ts +0 -15
- package/dist/types/src/components/ChatThread/widgets/PromptWidget.d.ts.map +0 -1
- package/dist/types/src/containers/PromptArticle/PromptArticle.d.ts +0 -6
- package/dist/types/src/containers/PromptArticle/PromptArticle.d.ts.map +0 -1
- package/dist/types/src/containers/PromptArticle/index.d.ts +0 -2
- package/dist/types/src/containers/PromptArticle/index.d.ts.map +0 -1
- package/dist/types/src/containers/PromptList/PromptList.d.ts +0 -6
- package/dist/types/src/containers/PromptList/PromptList.d.ts.map +0 -1
- package/dist/types/src/containers/PromptList/PromptList.stories.d.ts.map +0 -1
- package/dist/types/src/containers/PromptList/index.d.ts +0 -2
- package/dist/types/src/containers/PromptList/index.d.ts.map +0 -1
- package/dist/types/src/operations/definitions.d.ts.map +0 -1
- package/dist/types/src/queue-logger.d.ts +0 -11
- package/dist/types/src/queue-logger.d.ts.map +0 -1
- package/dist/types/src/types/capabilities.d.ts +0 -32
- package/dist/types/src/types/capabilities.d.ts.map +0 -1
- package/dist/types/src/types/defs.d.ts +0 -2
- package/dist/types/src/types/defs.d.ts.map +0 -1
- package/dist/types/src/types/events.d.ts +0 -5
- package/dist/types/src/types/events.d.ts.map +0 -1
- package/src/AssistantPlugin.tsx +0 -238
- package/src/cli/plugin.ts +0 -84
- package/src/components/ChatProgress/ChatProgress.tsx +0 -56
- package/src/components/ChatProgress/index.ts +0 -5
- package/src/components/ChatThread/widgets/PromptWidget.ts +0 -30
- package/src/containers/PromptArticle/PromptArticle.tsx +0 -59
- package/src/containers/PromptArticle/index.ts +0 -5
- package/src/containers/PromptList/index.ts +0 -5
- package/src/types/capabilities.ts +0 -35
- package/src/types/defs.ts +0 -5
- package/src/types/events.ts +0 -11
- /package/dist/lib/{browser/blueprints/index.mjs.map → neutral/ChatContainer-VYVJYPPN.mjs.map} +0 -0
- /package/dist/lib/{browser/types → neutral/blueprints}/index.mjs.map +0 -0
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs.map +0 -0
- /package/dist/lib/{node-esm/blueprints → neutral}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/chunk-HSLMI22Q.mjs.map → neutral/meta.mjs.map} +0 -0
- /package/dist/lib/{node-esm/types → neutral/operations}/index.mjs.map +0 -0
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import type * as Schema from 'effect/Schema';
|
|
6
6
|
import React, { Fragment, useCallback, useEffect } from 'react';
|
|
7
7
|
|
|
8
|
-
import { type Template } from '@dxos/
|
|
8
|
+
import { type Template } from '@dxos/compute';
|
|
9
9
|
import { type Obj } from '@dxos/echo';
|
|
10
10
|
import { Input, Select, useTranslation } from '@dxos/react-ui';
|
|
11
11
|
import { isNonNullable } from '@dxos/util';
|
|
@@ -15,7 +15,7 @@ import { meta } from '#meta';
|
|
|
15
15
|
import { TemplateEditor } from './TemplateEditor';
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* Callback type for mutating template within a parent object's Obj.
|
|
18
|
+
* Callback type for mutating template within a parent object's Obj.update context.
|
|
19
19
|
*/
|
|
20
20
|
export type TemplateChangeCallback = (mutate: (template: Obj.Mutable<Template.Template>) => void) => void;
|
|
21
21
|
|
|
@@ -23,22 +23,21 @@ export type TemplateFormProps = {
|
|
|
23
23
|
id: string;
|
|
24
24
|
template: Template.Template;
|
|
25
25
|
schema?: Schema.Schema<any, any, any>;
|
|
26
|
-
commandEditable?: boolean;
|
|
27
26
|
/**
|
|
28
|
-
* Callback to mutate the template. Should wrap mutations in parent's Obj.
|
|
27
|
+
* Callback to mutate the template. Should wrap mutations in parent's Obj.update.
|
|
29
28
|
* If not provided, the component is read-only.
|
|
30
29
|
*/
|
|
31
30
|
onChange?: TemplateChangeCallback;
|
|
32
31
|
};
|
|
33
32
|
|
|
34
|
-
export const TemplateForm = ({ id, template,
|
|
33
|
+
export const TemplateForm = ({ id, template, onChange }: TemplateFormProps) => {
|
|
35
34
|
const { t } = useTranslation(meta.id);
|
|
36
35
|
usePromptInputs(template, onChange);
|
|
37
36
|
|
|
38
37
|
const handleInputKindChange = useCallback(
|
|
39
38
|
(inputName: string, kind: Template.InputKind) => {
|
|
40
|
-
onChange?.((
|
|
41
|
-
const input =
|
|
39
|
+
onChange?.((draft) => {
|
|
40
|
+
const input = draft.inputs?.find((i) => i?.name === inputName);
|
|
42
41
|
if (input) {
|
|
43
42
|
input.kind = kind;
|
|
44
43
|
}
|
|
@@ -49,8 +48,8 @@ export const TemplateForm = ({ id, template, commandEditable = true, onChange }:
|
|
|
49
48
|
|
|
50
49
|
const handleInputDefaultChange = useCallback(
|
|
51
50
|
(inputName: string, value: string) => {
|
|
52
|
-
onChange?.((
|
|
53
|
-
const input =
|
|
51
|
+
onChange?.((draft) => {
|
|
52
|
+
const input = draft.inputs?.find((i) => i?.name === inputName);
|
|
54
53
|
if (input) {
|
|
55
54
|
input.default = value;
|
|
56
55
|
}
|
|
@@ -61,24 +60,6 @@ export const TemplateForm = ({ id, template, commandEditable = true, onChange }:
|
|
|
61
60
|
|
|
62
61
|
return (
|
|
63
62
|
<div className='flex flex-col w-full overflow-hidden gap-4'>
|
|
64
|
-
{/* {commandEditable && (
|
|
65
|
-
<div className='flex items-center pl-4'>
|
|
66
|
-
<span className='text-neutral-500'>/</span>
|
|
67
|
-
<Input.Root>
|
|
68
|
-
<Input.TextInput
|
|
69
|
-
placeholder={t('command.placeholder')}
|
|
70
|
-
classNames='w-full bg-transparent m-2'
|
|
71
|
-
value={template.command ?? ''}
|
|
72
|
-
onChange={(event) => {
|
|
73
|
-
onChange?.((t) => {
|
|
74
|
-
t.command = event.target.value.replace(/\w/g, '');
|
|
75
|
-
});
|
|
76
|
-
}}
|
|
77
|
-
/>
|
|
78
|
-
</Input.Root>
|
|
79
|
-
</div>
|
|
80
|
-
)} */}
|
|
81
|
-
|
|
82
63
|
<TemplateEditor id={id} template={template} classNames='bg-base-surface min-h-[120px]' />
|
|
83
64
|
|
|
84
65
|
{(template.inputs?.length ?? 0) > 0 && (
|
|
@@ -109,17 +90,15 @@ export const TemplateForm = ({ id, template, commandEditable = true, onChange }:
|
|
|
109
90
|
</Input.Root>
|
|
110
91
|
|
|
111
92
|
<div>
|
|
112
|
-
{input.kind
|
|
113
|
-
<
|
|
114
|
-
<Input.
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
</Input.Root>
|
|
122
|
-
</div>
|
|
93
|
+
{input.kind === 'value' && (
|
|
94
|
+
<Input.Root>
|
|
95
|
+
<Input.TextInput
|
|
96
|
+
placeholder={t('command.placeholder')}
|
|
97
|
+
classNames='w-full bg-transparent'
|
|
98
|
+
value={input.default ?? ''}
|
|
99
|
+
onChange={(event) => handleInputDefaultChange(input.name, event.target.value)}
|
|
100
|
+
/>
|
|
101
|
+
</Input.Root>
|
|
123
102
|
)}
|
|
124
103
|
</div>
|
|
125
104
|
</Fragment>
|
|
@@ -137,33 +116,33 @@ const inputs: { kind: Template.InputKind; label: string }[] = [
|
|
|
137
116
|
label: 'Value',
|
|
138
117
|
},
|
|
139
118
|
{
|
|
140
|
-
kind: '
|
|
141
|
-
label: '
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
kind: 'retriever',
|
|
145
|
-
label: 'Retriever',
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
kind: 'function',
|
|
149
|
-
label: 'Function',
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
kind: 'query',
|
|
153
|
-
label: 'Query',
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
kind: 'resolver',
|
|
157
|
-
label: 'Resolver',
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
kind: 'context',
|
|
161
|
-
label: 'Context',
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
kind: 'schema',
|
|
165
|
-
label: 'Schema',
|
|
119
|
+
kind: 'operation',
|
|
120
|
+
label: 'Operation',
|
|
166
121
|
},
|
|
122
|
+
// {
|
|
123
|
+
// kind: 'pass-through',
|
|
124
|
+
// label: 'Pass through',
|
|
125
|
+
// },
|
|
126
|
+
// {
|
|
127
|
+
// kind: 'retriever',
|
|
128
|
+
// label: 'Retriever',
|
|
129
|
+
// },
|
|
130
|
+
// {
|
|
131
|
+
// kind: 'query',
|
|
132
|
+
// label: 'Query',
|
|
133
|
+
// },
|
|
134
|
+
// {
|
|
135
|
+
// kind: 'resolver',
|
|
136
|
+
// label: 'Resolver',
|
|
137
|
+
// },
|
|
138
|
+
// {
|
|
139
|
+
// kind: 'context',
|
|
140
|
+
// label: 'Context',
|
|
141
|
+
// },
|
|
142
|
+
// {
|
|
143
|
+
// kind: 'schema',
|
|
144
|
+
// label: 'Schema',
|
|
145
|
+
// },
|
|
167
146
|
];
|
|
168
147
|
|
|
169
148
|
export const NAME_REGEXP = /\{\{([\w-]+)\}\}/;
|
|
@@ -194,30 +173,30 @@ const usePromptInputs = (template: Template.Template, onChange?: TemplateChangeC
|
|
|
194
173
|
|
|
195
174
|
// Match or create new inputs.
|
|
196
175
|
const values = unclaimed.values();
|
|
197
|
-
onChange((
|
|
198
|
-
if (!
|
|
199
|
-
|
|
176
|
+
onChange((draft) => {
|
|
177
|
+
if (!draft.inputs) {
|
|
178
|
+
draft.inputs = [];
|
|
200
179
|
}
|
|
201
180
|
|
|
202
181
|
missing.forEach((name) => {
|
|
203
182
|
const next = values.next().value;
|
|
204
183
|
if (next) {
|
|
205
184
|
// Find the input in the mutable draft and update it.
|
|
206
|
-
const inputIndex =
|
|
185
|
+
const inputIndex = draft.inputs!.findIndex((i) => i?.name === next.name);
|
|
207
186
|
if (inputIndex !== -1) {
|
|
208
|
-
|
|
187
|
+
draft.inputs![inputIndex].name = name;
|
|
209
188
|
}
|
|
210
189
|
} else {
|
|
211
|
-
|
|
190
|
+
draft.inputs!.push({ name, kind: 'value' });
|
|
212
191
|
}
|
|
213
192
|
});
|
|
214
193
|
|
|
215
194
|
// Remove unclaimed (deleted) inputs.
|
|
216
195
|
// TODO(burdon): If user types incorrect name value, it will be deleted. Garbage collect?
|
|
217
196
|
for (const input of values) {
|
|
218
|
-
const inputIndex =
|
|
197
|
+
const inputIndex = draft.inputs!.findIndex((i) => i?.name === input.name);
|
|
219
198
|
if (inputIndex !== -1) {
|
|
220
|
-
|
|
199
|
+
draft.inputs!.splice(inputIndex, 1);
|
|
221
200
|
}
|
|
222
201
|
}
|
|
223
202
|
});
|
|
@@ -8,14 +8,15 @@ import React from 'react';
|
|
|
8
8
|
|
|
9
9
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
10
|
import { capabilities } from '@dxos/assistant-toolkit/testing';
|
|
11
|
-
import { ChessPlugin } from '@dxos/plugin-chess';
|
|
12
|
-
import { ClientPlugin } from '@dxos/plugin-client';
|
|
11
|
+
import { ChessPlugin } from '@dxos/plugin-chess/plugin';
|
|
12
|
+
import { ClientPlugin } from '@dxos/plugin-client/plugin';
|
|
13
13
|
import { initializeIdentity } from '@dxos/plugin-client/testing';
|
|
14
|
-
import { MapPlugin } from '@dxos/plugin-map';
|
|
15
|
-
import { TablePlugin } from '@dxos/plugin-table';
|
|
14
|
+
import { MapPlugin } from '@dxos/plugin-map/plugin';
|
|
15
|
+
import { TablePlugin } from '@dxos/plugin-table/plugin';
|
|
16
16
|
import { corePlugins } from '@dxos/plugin-testing';
|
|
17
17
|
|
|
18
|
-
import { translations } from '
|
|
18
|
+
import { translations } from '#translations';
|
|
19
|
+
|
|
19
20
|
import { Toolbox, type ToolboxProps } from './Toolbox';
|
|
20
21
|
|
|
21
22
|
const DefaultStory = (props: ToolboxProps) => {
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { Fragment, useEffect, useState } from 'react';
|
|
6
6
|
|
|
7
|
-
import { type Blueprint } from '@dxos/
|
|
8
|
-
import {
|
|
7
|
+
import { type Blueprint } from '@dxos/compute';
|
|
8
|
+
import { Operation } from '@dxos/compute';
|
|
9
|
+
import { type Database, Filter, type Ref } from '@dxos/echo';
|
|
9
10
|
import { log } from '@dxos/log';
|
|
10
|
-
import {
|
|
11
|
-
import { Filter, useQuery } from '@dxos/react-client/echo';
|
|
11
|
+
import { useQuery } from '@dxos/react-client/echo';
|
|
12
12
|
import { ScrollArea, type ThemedClassName } from '@dxos/react-ui';
|
|
13
13
|
import { composable, composableProps, mx } from '@dxos/ui-theme';
|
|
14
14
|
|
package/src/components/index.ts
CHANGED
|
@@ -8,23 +8,23 @@ import React from 'react';
|
|
|
8
8
|
|
|
9
9
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
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';
|
|
11
|
+
import { Filter, Obj, Ref } from '@dxos/echo';
|
|
12
|
+
import { AutomationPlugin } from '@dxos/plugin-automation/plugin';
|
|
13
|
+
import { ClientPlugin } from '@dxos/plugin-client/plugin';
|
|
14
14
|
import { initializeIdentity } from '@dxos/plugin-client/testing';
|
|
15
|
-
import { PreviewPlugin } from '@dxos/plugin-preview';
|
|
16
|
-
import {
|
|
15
|
+
import { PreviewPlugin } from '@dxos/plugin-preview/testing';
|
|
16
|
+
import { StorybookPlugin, corePlugins } from '@dxos/plugin-testing';
|
|
17
17
|
import { random } from '@dxos/random';
|
|
18
|
-
import {
|
|
18
|
+
import { useQuery, useSpaces } from '@dxos/react-client/echo';
|
|
19
19
|
import { Loading, withTheme } from '@dxos/react-ui/testing';
|
|
20
20
|
import { Text } from '@dxos/schema';
|
|
21
21
|
import { createObjectFactory, TypeSpec } from '@dxos/schema/testing';
|
|
22
22
|
import { Message, Organization, Person } from '@dxos/types';
|
|
23
23
|
|
|
24
24
|
import { createMessage } from '#testing';
|
|
25
|
+
import { translations } from '#translations';
|
|
25
26
|
|
|
26
27
|
import { AssistantPlugin } from '../../AssistantPlugin';
|
|
27
|
-
import { translations } from '../../translations';
|
|
28
28
|
import { AgentArticle } from './AgentArticle';
|
|
29
29
|
|
|
30
30
|
random.seed(1);
|
|
@@ -84,7 +84,7 @@ const meta = {
|
|
|
84
84
|
name: Obj.getLabel(obj) ?? 'Artifact',
|
|
85
85
|
data: Ref.make(obj),
|
|
86
86
|
})),
|
|
87
|
-
|
|
87
|
+
feed: Ref.fromDXN(inputQueue.dxn),
|
|
88
88
|
subscriptions: [],
|
|
89
89
|
}),
|
|
90
90
|
);
|
|
@@ -14,7 +14,7 @@ import { Agent } from '@dxos/assistant-toolkit';
|
|
|
14
14
|
import { Annotation, Filter, Obj, Query, Ref } from '@dxos/echo';
|
|
15
15
|
import { AtomObj, AtomRef } from '@dxos/echo-atom';
|
|
16
16
|
import { QueueService } from '@dxos/functions';
|
|
17
|
-
import { AutomationCapabilities } from '@dxos/plugin-automation
|
|
17
|
+
import { AutomationCapabilities } from '@dxos/plugin-automation';
|
|
18
18
|
import { useQuery } from '@dxos/react-client/echo';
|
|
19
19
|
import { Card, Message, Panel, ScrollArea, Toolbar, useTranslation } from '@dxos/react-ui';
|
|
20
20
|
import { Masonry } from '@dxos/react-ui-masonry';
|
|
@@ -48,12 +48,12 @@ export const AgentArticle = ({ role, subject: agent }: AgentArticleProps) => {
|
|
|
48
48
|
|
|
49
49
|
const runtime = computeRuntime.getRuntime(space.spaceId);
|
|
50
50
|
await runtime.runPromise(Agent.resetChatHistory(agent));
|
|
51
|
-
if (!agent.
|
|
51
|
+
if (!agent.feed) {
|
|
52
52
|
await runtime.runPromise(
|
|
53
53
|
Effect.gen(function* () {
|
|
54
54
|
const queue = yield* QueueService.createQueue();
|
|
55
|
-
Obj.
|
|
56
|
-
agent.
|
|
55
|
+
Obj.update(agent, (agent) => {
|
|
56
|
+
agent.feed = Ref.fromDXN(queue.dxn);
|
|
57
57
|
});
|
|
58
58
|
}),
|
|
59
59
|
);
|
|
@@ -74,15 +74,19 @@ export const AgentArticle = ({ role, subject: agent }: AgentArticleProps) => {
|
|
|
74
74
|
),
|
|
75
75
|
);
|
|
76
76
|
|
|
77
|
-
const
|
|
77
|
+
const inputFeed = useAtomValue(
|
|
78
78
|
AtomObj.make(agent).pipe((_) =>
|
|
79
79
|
Atom.make((get) =>
|
|
80
|
-
Option.fromNullable(get(_).
|
|
80
|
+
Option.fromNullable(get(_).feed).pipe(Option.map(AtomRef.make), Option.map(get), Option.getOrUndefined),
|
|
81
81
|
),
|
|
82
82
|
),
|
|
83
83
|
);
|
|
84
84
|
|
|
85
|
-
const
|
|
85
|
+
const db = Obj.getDatabase(agent);
|
|
86
|
+
const inputObjects = useQuery(
|
|
87
|
+
db,
|
|
88
|
+
inputFeed ? Query.select(Filter.everything()).from(inputFeed) : Query.select(Filter.nothing()),
|
|
89
|
+
);
|
|
86
90
|
|
|
87
91
|
return (
|
|
88
92
|
<Panel.Root role={role}>
|
|
@@ -90,7 +94,7 @@ export const AgentArticle = ({ role, subject: agent }: AgentArticleProps) => {
|
|
|
90
94
|
<Toolbar.Root>
|
|
91
95
|
<Toolbar.ToggleGroup type='single' value={tab} onValueChange={(value) => value && setTab(value as Tab)}>
|
|
92
96
|
<Toolbar.ToggleGroupIconItem value='artifacts' label={t('artifacts.label')} icon='ph--cube--regular' />
|
|
93
|
-
<Toolbar.ToggleGroupIconItem value='inputs' label={t('
|
|
97
|
+
<Toolbar.ToggleGroupIconItem value='inputs' label={t('inputs.label')} icon='ph--queue--regular' />
|
|
94
98
|
</Toolbar.ToggleGroup>
|
|
95
99
|
<Toolbar.Separator />
|
|
96
100
|
<Toolbar.IconButton
|
|
@@ -8,21 +8,22 @@ import React from 'react';
|
|
|
8
8
|
|
|
9
9
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
10
|
import { Plan, Agent } from '@dxos/assistant-toolkit';
|
|
11
|
-
import { Obj, Ref } from '@dxos/echo';
|
|
11
|
+
import { Filter, Obj, Ref } from '@dxos/echo';
|
|
12
12
|
import { log } from '@dxos/log';
|
|
13
|
-
import { AutomationPlugin } from '@dxos/plugin-automation';
|
|
14
|
-
import { ClientPlugin } from '@dxos/plugin-client';
|
|
13
|
+
import { AutomationPlugin } from '@dxos/plugin-automation/plugin';
|
|
14
|
+
import { ClientPlugin } from '@dxos/plugin-client/plugin';
|
|
15
15
|
import { initializeIdentity } from '@dxos/plugin-client/testing';
|
|
16
16
|
import { corePlugins } from '@dxos/plugin-testing';
|
|
17
|
-
import {
|
|
17
|
+
import { useQuery, useSpaces } from '@dxos/react-client/echo';
|
|
18
18
|
import { Button } from '@dxos/react-ui';
|
|
19
19
|
import { ObjectProperties } from '@dxos/react-ui-form';
|
|
20
20
|
import { Loading, withLayout } from '@dxos/react-ui/testing';
|
|
21
21
|
import { Text } from '@dxos/schema';
|
|
22
22
|
import { Organization } from '@dxos/types';
|
|
23
23
|
|
|
24
|
+
import { translations } from '#translations';
|
|
25
|
+
|
|
24
26
|
import { AssistantPlugin } from '../../AssistantPlugin';
|
|
25
|
-
import { translations } from '../../translations';
|
|
26
27
|
import { AgentProperties } from './AgentProperties';
|
|
27
28
|
|
|
28
29
|
type DefaultStoryProps = {};
|
|
@@ -10,12 +10,12 @@ import React, { useCallback, useEffect, useMemo } from 'react';
|
|
|
10
10
|
import { useCapability } from '@dxos/app-framework/ui';
|
|
11
11
|
import { type AppSurface } from '@dxos/app-toolkit/ui';
|
|
12
12
|
import { Agent, SyncTriggers } from '@dxos/assistant-toolkit';
|
|
13
|
-
import {
|
|
13
|
+
import { Operation } from '@dxos/compute';
|
|
14
|
+
import { DXN, Filter, Obj, Ref } from '@dxos/echo';
|
|
14
15
|
import { AtomObj } from '@dxos/echo-atom';
|
|
15
16
|
import { log } from '@dxos/log';
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { Filter, useQuery } from '@dxos/react-client/echo';
|
|
17
|
+
import { AutomationCapabilities } from '@dxos/plugin-automation';
|
|
18
|
+
import { useQuery } from '@dxos/react-client/echo';
|
|
19
19
|
import { Input, useTranslation } from '@dxos/react-ui';
|
|
20
20
|
import { FeedAnnotation } from '@dxos/schema';
|
|
21
21
|
|
|
@@ -86,7 +86,7 @@ export const AgentProperties = ({ subject: agent }: AgentPropertiesProps) => {
|
|
|
86
86
|
// Create/remove agent subscription.
|
|
87
87
|
const handleSubscriptionChange = useCallback(
|
|
88
88
|
(object: Obj.Unknown, checked: boolean) => {
|
|
89
|
-
Obj.
|
|
89
|
+
Obj.update(agent, (agent) => {
|
|
90
90
|
if (checked) {
|
|
91
91
|
agent.subscriptions.push(Ref.fromDXN(Obj.getDXN(object)));
|
|
92
92
|
} else {
|
|
@@ -104,7 +104,7 @@ export const AgentProperties = ({ subject: agent }: AgentPropertiesProps) => {
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
return (
|
|
107
|
-
<div
|
|
107
|
+
<div className='dx-expander flex flex-col'>
|
|
108
108
|
<Input.Root>
|
|
109
109
|
<Input.Label classNames='mt-form-gap'>{t('subscriptions.label')}</Input.Label>
|
|
110
110
|
</Input.Root>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
7
|
import { type AppSurface } from '@dxos/app-toolkit/ui';
|
|
8
|
-
import { type Blueprint } from '@dxos/
|
|
8
|
+
import { type Blueprint } from '@dxos/compute';
|
|
9
9
|
import { Panel, Toolbar } from '@dxos/react-ui';
|
|
10
10
|
import { useAttention } from '@dxos/react-ui-attention';
|
|
11
11
|
|
|
@@ -2,25 +2,23 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import * as Array from 'effect/Array';
|
|
6
|
-
import * as Function from 'effect/Function';
|
|
7
5
|
import * as Option from 'effect/Option';
|
|
8
6
|
import React, { forwardRef, useCallback, useMemo } from 'react';
|
|
9
7
|
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
8
|
+
import { useOperationInvoker } from '@dxos/app-framework/ui';
|
|
9
|
+
import { BlueprintsAnnotation } from '@dxos/app-toolkit';
|
|
12
10
|
import { type AppSurface } from '@dxos/app-toolkit/ui';
|
|
13
11
|
import { Chat } from '@dxos/assistant-toolkit';
|
|
14
|
-
import { Blueprint } from '@dxos/blueprints';
|
|
15
12
|
import { getSpace } from '@dxos/client/echo';
|
|
13
|
+
import { Blueprint } from '@dxos/compute';
|
|
16
14
|
import { Filter, Obj, Ref } from '@dxos/echo';
|
|
17
|
-
import { SpaceOperation } from '@dxos/plugin-space
|
|
15
|
+
import { SpaceOperation } from '@dxos/plugin-space';
|
|
18
16
|
import { useQuery } from '@dxos/react-client/echo';
|
|
19
17
|
import { useAsyncEffect } from '@dxos/react-ui';
|
|
20
18
|
|
|
21
19
|
import { type ChatEvent } from '#components';
|
|
22
20
|
import { useBlueprintRegistry, useContextBinder } from '#hooks';
|
|
23
|
-
import { AssistantOperation } from '#
|
|
21
|
+
import { AssistantOperation } from '#types';
|
|
24
22
|
|
|
25
23
|
import ChatContainer from '../ChatContainer';
|
|
26
24
|
|
|
@@ -41,7 +39,7 @@ export const ChatCompanion = forwardRef<HTMLDivElement, ChatCompanionProps>(
|
|
|
41
39
|
return;
|
|
42
40
|
}
|
|
43
41
|
|
|
44
|
-
if (event.type === 'submit' && !
|
|
42
|
+
if (event.type === 'submit' && !Obj.getDatabase(chat)) {
|
|
45
43
|
await invokePromise(SpaceOperation.AddObject, {
|
|
46
44
|
object: chat,
|
|
47
45
|
target: space.db,
|
|
@@ -62,24 +60,13 @@ export const ChatCompanion = forwardRef<HTMLDivElement, ChatCompanionProps>(
|
|
|
62
60
|
[chat, space, companionTo, invokePromise],
|
|
63
61
|
);
|
|
64
62
|
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
()
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
capability,
|
|
73
|
-
): capability is {
|
|
74
|
-
id: string;
|
|
75
|
-
metadata: { blueprints?: string[] };
|
|
76
|
-
} => capability.id === Obj.getTypename(companionTo),
|
|
77
|
-
),
|
|
78
|
-
Option.flatMap((c) => Option.fromNullable(c.metadata.blueprints)),
|
|
79
|
-
Option.getOrElse(() => [] as string[]),
|
|
80
|
-
),
|
|
81
|
-
[metadata, companionTo],
|
|
82
|
-
);
|
|
63
|
+
const blueprintKeys = useMemo(() => {
|
|
64
|
+
const schema = companionTo ? Obj.getSchema(companionTo) : undefined;
|
|
65
|
+
if (!schema) {
|
|
66
|
+
return [] as string[];
|
|
67
|
+
}
|
|
68
|
+
return Option.getOrElse(() => [] as string[])(BlueprintsAnnotation.get(schema));
|
|
69
|
+
}, [companionTo]);
|
|
83
70
|
const existingBlueprints = useQuery(space?.db, Filter.type(Blueprint.Blueprint));
|
|
84
71
|
const pluginBlueprints = useMemo(
|
|
85
72
|
() => existingBlueprints.filter((blueprint) => blueprintKeys.includes(blueprint.key)),
|
|
@@ -8,13 +8,13 @@ import { Capabilities } from '@dxos/app-framework';
|
|
|
8
8
|
import { useAtomCapability, useCapability } from '@dxos/app-framework/ui';
|
|
9
9
|
import { type AppSurface } from '@dxos/app-toolkit/ui';
|
|
10
10
|
import { type Space, getSpace } from '@dxos/client/echo';
|
|
11
|
-
import {
|
|
11
|
+
import { type Obj } from '@dxos/echo';
|
|
12
12
|
import { Panel } from '@dxos/react-ui';
|
|
13
13
|
import { getParentId } from '@dxos/react-ui-attention';
|
|
14
14
|
|
|
15
15
|
import { Chat as ChatComponent, type ChatRootProps } from '#components';
|
|
16
16
|
import { useBlueprintRegistry, useChatProcessor, useChatServices, useOnline, usePresets } from '#hooks';
|
|
17
|
-
import { AssistantCapabilities, type ChatType } from '#types';
|
|
17
|
+
import { type Assistant, AssistantCapabilities, type ChatType } from '#types';
|
|
18
18
|
|
|
19
19
|
export type ChatContainerProps = (
|
|
20
20
|
| AppSurface.ObjectArticleProps<ChatType.Chat | undefined>
|
|
@@ -63,22 +63,34 @@ export const ChatContainer = forwardRef<HTMLDivElement, ChatContainerProps>((pro
|
|
|
63
63
|
}, [processor, attendableId, registry, stateAtom]);
|
|
64
64
|
|
|
65
65
|
const feedTarget = chat?.feed.target;
|
|
66
|
-
const
|
|
66
|
+
const view = (chat?.view as Assistant.ChatView | undefined) ?? settings.chatView;
|
|
67
67
|
|
|
68
68
|
if (!processor) {
|
|
69
69
|
return null;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
return (
|
|
73
|
-
<ChatComponent.Root db={space?.db} chat={chat}
|
|
73
|
+
<ChatComponent.Root db={space?.db} chat={chat} feed={feedTarget} processor={processor} onEvent={onEvent}>
|
|
74
74
|
<Panel.Root role={role} ref={forwardedRef}>
|
|
75
75
|
<Panel.Toolbar className='bg-toolbar-surface'>
|
|
76
76
|
<ChatComponent.Toolbar classNames='dx-document' attendableId={attendableId} companionTo={companionTo} />
|
|
77
77
|
</Panel.Toolbar>
|
|
78
78
|
<Panel.Content>
|
|
79
|
-
<ChatComponent.
|
|
80
|
-
<
|
|
81
|
-
|
|
79
|
+
<ChatComponent.Content>
|
|
80
|
+
<div className='dx-container relative'>
|
|
81
|
+
<ChatComponent.Thread viewType={view} />
|
|
82
|
+
{view !== 'summary' && (
|
|
83
|
+
<div className='absolute bottom-2 left-0 right-0'>
|
|
84
|
+
<div className='dx-document px-4'>
|
|
85
|
+
<ChatComponent.Status classNames='px-3 rounded-sm bg-group-surface' />
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
)}
|
|
89
|
+
</div>
|
|
90
|
+
<div className='dx-document px-4 pb-4'>
|
|
91
|
+
<div className='flex flex-col items-center py-2 overflow-hidden'>
|
|
92
|
+
<ChatComponent.TaskList classNames='max-h-[120px] border border-separator rounded-sm text-description' />
|
|
93
|
+
</div>
|
|
82
94
|
<ChatComponent.Prompt
|
|
83
95
|
{...chatProps}
|
|
84
96
|
outline
|
|
@@ -87,7 +99,7 @@ export const ChatContainer = forwardRef<HTMLDivElement, ChatContainerProps>((pro
|
|
|
87
99
|
onOnlineChange={setOnline}
|
|
88
100
|
/>
|
|
89
101
|
</div>
|
|
90
|
-
</ChatComponent.
|
|
102
|
+
</ChatComponent.Content>
|
|
91
103
|
</Panel.Content>
|
|
92
104
|
</Panel.Root>
|
|
93
105
|
</ChatComponent.Root>
|
|
@@ -13,7 +13,7 @@ import { ChatDialog as NaturalChatDialog } from '@dxos/react-ui-chat';
|
|
|
13
13
|
import { Chat, type ChatRootProps } from '#components';
|
|
14
14
|
import { useBlueprintRegistry, useChatProcessor, useChatServices, useOnline, usePresets } from '#hooks';
|
|
15
15
|
import { meta } from '#meta';
|
|
16
|
-
import { AssistantCapabilities } from '#types';
|
|
16
|
+
import { type Assistant, AssistantCapabilities } from '#types';
|
|
17
17
|
|
|
18
18
|
export type ChatDialogProps = {
|
|
19
19
|
chat?: ChatTypes.Chat;
|
|
@@ -28,13 +28,7 @@ export const ChatDialog = ({ chat }: ChatDialogProps) => {
|
|
|
28
28
|
const [online, setOnline] = useOnline();
|
|
29
29
|
const { preset, ...chatProps } = usePresets(online);
|
|
30
30
|
const blueprintRegistry = useBlueprintRegistry();
|
|
31
|
-
const processor = useChatProcessor({
|
|
32
|
-
chat,
|
|
33
|
-
preset,
|
|
34
|
-
runtime,
|
|
35
|
-
blueprintRegistry,
|
|
36
|
-
settings,
|
|
37
|
-
});
|
|
31
|
+
const processor = useChatProcessor({ chat, preset, runtime, blueprintRegistry, settings });
|
|
38
32
|
|
|
39
33
|
// TODO(burdon): Refocus when open.
|
|
40
34
|
const [open, setOpen] = useState(true);
|
|
@@ -61,7 +55,7 @@ export const ChatDialog = ({ chat }: ChatDialogProps) => {
|
|
|
61
55
|
<NaturalChatDialog.Root open={open} expanded={expanded} onOpenChange={setOpen}>
|
|
62
56
|
<NaturalChatDialog.Header title={t('assistant-dialog.title')} />
|
|
63
57
|
<NaturalChatDialog.Content>
|
|
64
|
-
<Chat.Thread />
|
|
58
|
+
<Chat.Thread viewType={(chat.view as Assistant.ChatView | undefined) ?? settings.chatView} />
|
|
65
59
|
</NaturalChatDialog.Content>
|
|
66
60
|
<NaturalChatDialog.Footer classNames='p-1.5'>
|
|
67
61
|
<Chat.Prompt {...chatProps} preset={preset?.id} online={online} onOnlineChange={setOnline} expandable />
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { type AppSurface } from '@dxos/app-toolkit/ui';
|
|
8
|
+
import { type Plan } from '@dxos/assistant-toolkit';
|
|
9
|
+
import { Panel, ScrollArea, Toolbar } from '@dxos/react-ui';
|
|
10
|
+
import { useAttention } from '@dxos/react-ui-attention';
|
|
11
|
+
|
|
12
|
+
import { TaskList } from '#components';
|
|
13
|
+
|
|
14
|
+
export type PlanArticleProps = AppSurface.ObjectArticleProps<Plan.Plan>;
|
|
15
|
+
|
|
16
|
+
export const PlanArticle = ({ role, attendableId, subject }: PlanArticleProps) => {
|
|
17
|
+
const { hasAttention } = useAttention(attendableId);
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<Panel.Root role={role} classNames='dx-document'>
|
|
21
|
+
<Panel.Toolbar asChild>
|
|
22
|
+
<Toolbar.Root disabled={!hasAttention} />
|
|
23
|
+
</Panel.Toolbar>
|
|
24
|
+
<Panel.Content asChild>
|
|
25
|
+
<ScrollArea.Root orientation='vertical'>
|
|
26
|
+
<ScrollArea.Viewport>
|
|
27
|
+
<TaskList plan={subject} />
|
|
28
|
+
</ScrollArea.Viewport>
|
|
29
|
+
</ScrollArea.Root>
|
|
30
|
+
</Panel.Content>
|
|
31
|
+
</Panel.Root>
|
|
32
|
+
);
|
|
33
|
+
};
|