@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
|
@@ -8,21 +8,22 @@ import * as Option from 'effect/Option';
|
|
|
8
8
|
|
|
9
9
|
import { Capability } from '@dxos/app-framework';
|
|
10
10
|
import { AppCapabilities, AppNode, getActiveSpace, getPersonalSpace } from '@dxos/app-toolkit';
|
|
11
|
-
import { Chat } from '@dxos/assistant-toolkit';
|
|
12
|
-
import { Blueprint,
|
|
11
|
+
import { AgentPrompt, Chat } from '@dxos/assistant-toolkit';
|
|
12
|
+
import { Blueprint, Routine, Operation } from '@dxos/compute';
|
|
13
13
|
import { Sequence } from '@dxos/conductor';
|
|
14
14
|
import { DXN, Database, Filter, Obj, type Ref } from '@dxos/echo';
|
|
15
15
|
import { AtomObj } from '@dxos/echo-atom';
|
|
16
16
|
import { invariant } from '@dxos/invariant';
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { ClientCapabilities } from '@dxos/plugin-client/types';
|
|
17
|
+
import { AutomationCapabilities } from '@dxos/plugin-automation';
|
|
18
|
+
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
20
19
|
import { GraphBuilder, Node, NodeMatcher } from '@dxos/plugin-graph';
|
|
21
20
|
import { linkedSegment } from '@dxos/react-ui-attention';
|
|
22
21
|
|
|
23
22
|
import { ASSISTANT_COMPANION_VARIANT, meta } from '#meta';
|
|
24
|
-
import { AssistantOperation } from '#
|
|
25
|
-
|
|
23
|
+
import { AssistantCapabilities, AssistantOperation } from '#types';
|
|
24
|
+
|
|
25
|
+
/** Operation definitions to seed as `PersistentOperation` records for automation / triggers. */
|
|
26
|
+
const computeOperationsToImport = [AgentPrompt] as const;
|
|
26
27
|
|
|
27
28
|
/** Match ECHO objects that are NOT chats. */
|
|
28
29
|
const whenNonChatObject = NodeMatcher.whenAll(
|
|
@@ -66,6 +67,35 @@ export default Capability.makeModule(
|
|
|
66
67
|
match: NodeMatcher.whenRoot,
|
|
67
68
|
actions: () =>
|
|
68
69
|
Effect.succeed([
|
|
70
|
+
Node.makeAction({
|
|
71
|
+
id: 'import-compute-operations',
|
|
72
|
+
data: Effect.fnUntraced(function* () {
|
|
73
|
+
const capabilities = yield* Capability.Service;
|
|
74
|
+
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
75
|
+
const space = getActiveSpace(client, capabilities) ?? getPersonalSpace(client);
|
|
76
|
+
if (!space) {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
for (const definition of computeOperationsToImport) {
|
|
80
|
+
const key = definition.meta.key;
|
|
81
|
+
if (!key) {
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
const existing = yield* Effect.promise(
|
|
85
|
+
(): Promise<Operation.PersistentOperation[]> =>
|
|
86
|
+
space.db.query(Filter.type(Operation.PersistentOperation, { key })).run(),
|
|
87
|
+
);
|
|
88
|
+
if (existing.length === 0) {
|
|
89
|
+
space.db.add(Operation.serialize(definition));
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
yield* Database.flush();
|
|
93
|
+
}),
|
|
94
|
+
properties: {
|
|
95
|
+
label: ['import-compute-operations.label', { ns: meta.id }],
|
|
96
|
+
icon: 'ph--download-simple--regular',
|
|
97
|
+
},
|
|
98
|
+
}),
|
|
69
99
|
Node.makeAction({
|
|
70
100
|
id: 'reset-blueprints',
|
|
71
101
|
data: Effect.fnUntraced(function* () {
|
|
@@ -99,16 +129,16 @@ export default Capability.makeModule(
|
|
|
99
129
|
Effect.gen(function* () {
|
|
100
130
|
const state = get(yield* Capability.get(AssistantCapabilities.State));
|
|
101
131
|
const cache = get(yield* Capability.get(AssistantCapabilities.CompanionChatCache));
|
|
102
|
-
const
|
|
132
|
+
const objectDXN = Obj.getDXN(object).toString();
|
|
103
133
|
|
|
104
134
|
// Resolve chat from persisted state or transient cache.
|
|
105
135
|
const chat = pipe(
|
|
106
|
-
Option.fromNullable(state.currentChat[
|
|
136
|
+
Option.fromNullable(state.currentChat[objectDXN]),
|
|
107
137
|
Option.flatMap((dxnStr) => Option.fromNullable(DXN.tryParse(dxnStr))),
|
|
108
138
|
Option.flatMap((dxn) => Option.fromNullable(Obj.getDatabase(object)?.makeRef(dxn))),
|
|
109
139
|
Option.map((ref) => get(AtomObj.make(ref as Ref.Ref<Obj.Unknown>))),
|
|
110
140
|
Option.filter(Obj.isObject),
|
|
111
|
-
Option.orElse(() => pipe(Option.fromNullable(cache[
|
|
141
|
+
Option.orElse(() => pipe(Option.fromNullable(cache[objectDXN]), Option.filter(Obj.isObject))),
|
|
112
142
|
Option.getOrNull,
|
|
113
143
|
);
|
|
114
144
|
|
|
@@ -127,8 +157,8 @@ export default Capability.makeModule(
|
|
|
127
157
|
GraphBuilder.createExtension({
|
|
128
158
|
id: 'invocations',
|
|
129
159
|
match: NodeMatcher.whenAny(
|
|
130
|
-
NodeMatcher.whenEchoTypeMatches(Sequence),
|
|
131
|
-
NodeMatcher.whenEchoTypeMatches(
|
|
160
|
+
NodeMatcher.whenEchoTypeMatches(Sequence.Sequence),
|
|
161
|
+
NodeMatcher.whenEchoTypeMatches(Routine.Routine),
|
|
132
162
|
),
|
|
133
163
|
connector: () =>
|
|
134
164
|
Effect.succeed([
|
|
@@ -18,14 +18,14 @@ import {
|
|
|
18
18
|
DatabaseBlueprint,
|
|
19
19
|
DatabaseHandlers,
|
|
20
20
|
DiscordBlueprint,
|
|
21
|
-
EntityExtractionHandlers,
|
|
22
21
|
LinearBlueprint,
|
|
23
22
|
PlanningBlueprint,
|
|
24
|
-
ResearchBlueprint,
|
|
25
23
|
WebSearchBlueprint,
|
|
26
24
|
MemoryBlueprint,
|
|
27
25
|
AutomationBlueprint,
|
|
28
26
|
} from '@dxos/assistant-toolkit';
|
|
27
|
+
// eslint-disable-next-line unused-imports/no-unused-imports
|
|
28
|
+
import type { Blueprint } from '@dxos/compute';
|
|
29
29
|
|
|
30
30
|
import { AssistantBlueprint } from '#blueprints';
|
|
31
31
|
|
|
@@ -35,7 +35,6 @@ const blueprintDefinition: () => Effect.Effect<Capability.Capability<unknown>[]>
|
|
|
35
35
|
Capability.contributes(AppCapabilities.BlueprintDefinition, AssistantBlueprint),
|
|
36
36
|
Capability.contributes(AppCapabilities.BlueprintDefinition, BrowserBlueprint),
|
|
37
37
|
Capability.contributes(AppCapabilities.BlueprintDefinition, DatabaseBlueprint),
|
|
38
|
-
Capability.contributes(AppCapabilities.BlueprintDefinition, ResearchBlueprint),
|
|
39
38
|
Capability.contributes(AppCapabilities.BlueprintDefinition, WebSearchBlueprint),
|
|
40
39
|
Capability.contributes(AppCapabilities.BlueprintDefinition, DiscordBlueprint),
|
|
41
40
|
Capability.contributes(AppCapabilities.BlueprintDefinition, LinearBlueprint),
|
|
@@ -50,7 +49,6 @@ const blueprintDefinition: () => Effect.Effect<Capability.Capability<unknown>[]>
|
|
|
50
49
|
Capability.contributes(Capabilities.OperationHandler, AgentBlueprintHandlers),
|
|
51
50
|
Capability.contributes(Capabilities.OperationHandler, BlueprintManagerHandlers),
|
|
52
51
|
Capability.contributes(Capabilities.OperationHandler, DatabaseHandlers),
|
|
53
|
-
Capability.contributes(Capabilities.OperationHandler, EntityExtractionHandlers),
|
|
54
52
|
Capability.contributes(Capabilities.OperationHandler, AgentWizardHandlers),
|
|
55
53
|
]),
|
|
56
54
|
);
|
|
@@ -12,13 +12,12 @@ import { AppCapabilities } from '@dxos/app-toolkit';
|
|
|
12
12
|
import { Chat } from '@dxos/assistant-toolkit';
|
|
13
13
|
import { Obj } from '@dxos/echo';
|
|
14
14
|
import { log } from '@dxos/log';
|
|
15
|
-
import { DeckCapabilities, PLANK_COMPANION_TYPE, type StoredDeckState } from '@dxos/plugin-deck
|
|
15
|
+
import { DeckCapabilities, PLANK_COMPANION_TYPE, type StoredDeckState } from '@dxos/plugin-deck';
|
|
16
16
|
import { getLinkedVariant } from '@dxos/react-ui-attention';
|
|
17
17
|
import { byPosition } from '@dxos/util';
|
|
18
18
|
|
|
19
19
|
import { ASSISTANT_COMPANION_VARIANT } from '#meta';
|
|
20
|
-
import { AssistantOperation } from '#
|
|
21
|
-
import { AssistantCapabilities } from '#types';
|
|
20
|
+
import { AssistantCapabilities, AssistantOperation } from '#types';
|
|
22
21
|
|
|
23
22
|
/**
|
|
24
23
|
* Non-React capability that watches deck companion state and provisions transient chats
|
|
@@ -65,9 +64,9 @@ export default Capability.makeModule(
|
|
|
65
64
|
}
|
|
66
65
|
|
|
67
66
|
const object = node.data;
|
|
68
|
-
const
|
|
67
|
+
const companionDXN = Obj.getDXN(object).toString();
|
|
69
68
|
const cache = registry.get(cacheAtom);
|
|
70
|
-
if (cache[
|
|
69
|
+
if (cache[companionDXN]) {
|
|
71
70
|
return true;
|
|
72
71
|
}
|
|
73
72
|
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { Agent, AgentBlueprint, Chat } from '@dxos/assistant-toolkit';
|
|
9
|
+
import { Blueprint, Operation, Routine } from '@dxos/compute';
|
|
10
|
+
import { Sequence } from '@dxos/conductor';
|
|
11
|
+
import { Obj } from '@dxos/echo';
|
|
12
|
+
import { type SpaceId } from '@dxos/keys';
|
|
13
|
+
import { AutomationCapabilities } from '@dxos/plugin-automation';
|
|
14
|
+
import { SpaceOperation } from '@dxos/plugin-space';
|
|
15
|
+
import { SpaceCapabilities } from '@dxos/plugin-space';
|
|
16
|
+
|
|
17
|
+
import { AssistantOperation } from '#types';
|
|
18
|
+
|
|
19
|
+
export default Capability.makeModule(
|
|
20
|
+
Effect.fnUntraced(function* () {
|
|
21
|
+
return [
|
|
22
|
+
Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
|
|
23
|
+
id: Chat.Chat.typename,
|
|
24
|
+
createObject: (props, options) =>
|
|
25
|
+
Effect.gen(function* () {
|
|
26
|
+
const { object } = yield* Operation.invoke(AssistantOperation.CreateChat, {
|
|
27
|
+
db: options.db,
|
|
28
|
+
name: props?.name,
|
|
29
|
+
});
|
|
30
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
31
|
+
object,
|
|
32
|
+
target: options.target,
|
|
33
|
+
hidden: true,
|
|
34
|
+
targetNodeId: options.targetNodeId,
|
|
35
|
+
});
|
|
36
|
+
}),
|
|
37
|
+
}),
|
|
38
|
+
Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
|
|
39
|
+
id: Blueprint.Blueprint.typename,
|
|
40
|
+
inputSchema: AssistantOperation.BlueprintForm,
|
|
41
|
+
createObject: (props, options) =>
|
|
42
|
+
Effect.gen(function* () {
|
|
43
|
+
const object = Blueprint.make(props);
|
|
44
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
45
|
+
object,
|
|
46
|
+
target: options.target,
|
|
47
|
+
hidden: true,
|
|
48
|
+
targetNodeId: options.targetNodeId,
|
|
49
|
+
});
|
|
50
|
+
}),
|
|
51
|
+
}),
|
|
52
|
+
Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
|
|
53
|
+
id: Routine.Routine.typename,
|
|
54
|
+
createObject: (props, options) =>
|
|
55
|
+
Effect.gen(function* () {
|
|
56
|
+
const object = Routine.make(props);
|
|
57
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
58
|
+
object,
|
|
59
|
+
target: options.target,
|
|
60
|
+
hidden: true,
|
|
61
|
+
targetNodeId: options.targetNodeId,
|
|
62
|
+
});
|
|
63
|
+
}),
|
|
64
|
+
}),
|
|
65
|
+
Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
|
|
66
|
+
id: Sequence.Sequence.typename,
|
|
67
|
+
createObject: (props, options) =>
|
|
68
|
+
Effect.gen(function* () {
|
|
69
|
+
const object = Obj.make(Sequence.Sequence, props);
|
|
70
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
71
|
+
object,
|
|
72
|
+
target: options.target,
|
|
73
|
+
hidden: true,
|
|
74
|
+
targetNodeId: options.targetNodeId,
|
|
75
|
+
});
|
|
76
|
+
}),
|
|
77
|
+
}),
|
|
78
|
+
Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
|
|
79
|
+
id: Agent.Agent.typename,
|
|
80
|
+
createObject: (props, options) =>
|
|
81
|
+
Effect.gen(function* () {
|
|
82
|
+
const object = yield* Agent.makeInitialized({ name: '', instructions: '' }, AgentBlueprint.make()).pipe(
|
|
83
|
+
withComputeRuntime(options.db.spaceId),
|
|
84
|
+
);
|
|
85
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
86
|
+
object,
|
|
87
|
+
target: options.target,
|
|
88
|
+
hidden: true,
|
|
89
|
+
targetNodeId: options.targetNodeId,
|
|
90
|
+
});
|
|
91
|
+
}),
|
|
92
|
+
}),
|
|
93
|
+
];
|
|
94
|
+
}),
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
// TODO(dmaretskyi): Extract to a helper module.
|
|
98
|
+
const withComputeRuntime =
|
|
99
|
+
(spaceId: SpaceId) =>
|
|
100
|
+
<A, E, R>(
|
|
101
|
+
effect: Effect.Effect<A, E, R>,
|
|
102
|
+
): Effect.Effect<A, E, Exclude<R, AutomationCapabilities.ComputeServices> | Capability.Service> =>
|
|
103
|
+
Effect.gen(function* () {
|
|
104
|
+
const provider = yield* Capability.get(AutomationCapabilities.ComputeRuntime).pipe(Effect.orDie);
|
|
105
|
+
const runtime = yield* provider.getRuntime(spaceId).runtimeEffect;
|
|
106
|
+
return yield* effect.pipe(Effect.provide(runtime));
|
|
107
|
+
});
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Capability } from '@dxos/app-framework';
|
|
6
|
-
|
|
6
|
+
// eslint-disable-next-line unused-imports/no-unused-imports
|
|
7
|
+
import type { Blueprint, OperationHandlerSet } from '@dxos/compute';
|
|
7
8
|
|
|
8
9
|
export const AiService = Capability.lazy('AiService', () => import('./ai-service'));
|
|
9
10
|
export const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));
|
|
@@ -12,6 +13,7 @@ export const CompanionChatProvisioner = Capability.lazy(
|
|
|
12
13
|
'CompanionChatProvisioner',
|
|
13
14
|
() => import('./companion-chat-provisioner'),
|
|
14
15
|
);
|
|
16
|
+
export const CreateObject = Capability.lazy('CreateObject', () => import('./create-object'));
|
|
15
17
|
export const EdgeModelResolver = Capability.lazy('EdgeModelResolver', () => import('./edge-model-resolver'));
|
|
16
18
|
export const LocalModelResolver = Capability.lazy('LocalModelResolver', () => import('./local-model-resolver'));
|
|
17
19
|
export const MarkdownExtension = Capability.lazy('MarkdownExtension', () => import('./markdown'));
|
|
@@ -8,7 +8,7 @@ import { Capabilities, Capability } from '@dxos/app-framework';
|
|
|
8
8
|
import { Obj } from '@dxos/echo';
|
|
9
9
|
import { MarkdownCapabilities } from '@dxos/plugin-markdown';
|
|
10
10
|
|
|
11
|
-
import { AssistantOperation } from '#
|
|
11
|
+
import { AssistantOperation } from '#types';
|
|
12
12
|
|
|
13
13
|
import { promptRunExtension } from '../extensions';
|
|
14
14
|
|
|
@@ -5,27 +5,20 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
7
|
import { Capability } from '@dxos/app-framework';
|
|
8
|
-
import { Chat
|
|
9
|
-
import {
|
|
10
|
-
import { ClientCapabilities } from '@dxos/plugin-client
|
|
8
|
+
import { Chat } from '@dxos/assistant-toolkit';
|
|
9
|
+
import { Migration } from '@dxos/echo';
|
|
10
|
+
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
11
11
|
|
|
12
12
|
const identityTransform = async (from: any) => ({ ...from });
|
|
13
13
|
const noopCallback = async () => {};
|
|
14
14
|
|
|
15
15
|
const migrations = [
|
|
16
|
-
|
|
16
|
+
Migration.define({
|
|
17
17
|
from: Chat.LegacyCompanionTo,
|
|
18
18
|
to: Chat.CompanionTo,
|
|
19
19
|
transform: identityTransform,
|
|
20
20
|
onMigration: noopCallback,
|
|
21
21
|
}),
|
|
22
|
-
defineObjectMigration({
|
|
23
|
-
from: ResearchGraph.LegacyResearchGraph,
|
|
24
|
-
to: ResearchGraph.ResearchGraphV1,
|
|
25
|
-
transform: identityTransform,
|
|
26
|
-
onMigration: noopCallback,
|
|
27
|
-
}),
|
|
28
|
-
...ResearchGraph.migrations,
|
|
29
22
|
];
|
|
30
23
|
|
|
31
24
|
export default Capability.makeModule(
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
7
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
-
import type { OperationHandlerSet } from '@dxos/
|
|
8
|
+
import type { OperationHandlerSet } from '@dxos/compute';
|
|
9
9
|
|
|
10
10
|
import { AssistantOperationHandlerSet } from '#operations';
|
|
11
11
|
|
|
@@ -3,17 +3,18 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
|
-
import React, { type ComponentProps } from 'react';
|
|
6
|
+
import React, { type ComponentProps, useEffect } from 'react';
|
|
7
7
|
|
|
8
8
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
9
|
import { Surface, useSettingsState } from '@dxos/app-framework/ui';
|
|
10
10
|
import { AppSurface, useActiveSpace } from '@dxos/app-toolkit/ui';
|
|
11
|
-
import { Chat, Agent } from '@dxos/assistant-toolkit';
|
|
12
|
-
import { Blueprint, Prompt } from '@dxos/blueprints';
|
|
11
|
+
import { Chat, Agent, Plan } from '@dxos/assistant-toolkit';
|
|
13
12
|
import { getSpace } from '@dxos/client/echo';
|
|
13
|
+
import { Blueprint, Routine } from '@dxos/compute';
|
|
14
14
|
import { Sequence } from '@dxos/conductor';
|
|
15
15
|
import { InvocationTraceContainer } from '@dxos/devtools';
|
|
16
16
|
import { Feed, Obj } from '@dxos/echo';
|
|
17
|
+
import { log } from '@dxos/log';
|
|
17
18
|
import { Panel } from '@dxos/react-ui';
|
|
18
19
|
|
|
19
20
|
import { AssistantSettings } from '#components';
|
|
@@ -24,8 +25,9 @@ import {
|
|
|
24
25
|
ChatDialog,
|
|
25
26
|
AgentArticle,
|
|
26
27
|
AgentProperties,
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
PlanArticle,
|
|
29
|
+
RoutineArticle,
|
|
30
|
+
RoutineList,
|
|
29
31
|
TracePanel,
|
|
30
32
|
TriggerStatus,
|
|
31
33
|
} from '#containers';
|
|
@@ -86,20 +88,20 @@ export default Capability.makeModule(() =>
|
|
|
86
88
|
Surface.create({
|
|
87
89
|
id: 'companion-invocations',
|
|
88
90
|
role: 'article',
|
|
89
|
-
filter: (data): data is { companionTo: Sequence } =>
|
|
90
|
-
(Obj.instanceOf(Sequence, data.companionTo) || Obj.instanceOf(
|
|
91
|
+
filter: (data): data is { companionTo: Sequence.Sequence } =>
|
|
92
|
+
(Obj.instanceOf(Sequence.Sequence, data.companionTo) || Obj.instanceOf(Routine.Routine, data.companionTo)) &&
|
|
91
93
|
data.subject === 'invocations',
|
|
92
94
|
component: ({ data, role }) => {
|
|
93
95
|
const space = getSpace(data.companionTo);
|
|
94
96
|
const feed = space?.properties.invocationTraceFeed?.target;
|
|
95
|
-
const
|
|
97
|
+
const feedDXN = feed ? Feed.getQueueDxn(feed) : undefined;
|
|
96
98
|
// TODO(wittjosiah): Support invocation filtering for prompts.
|
|
97
|
-
const target = Obj.instanceOf(
|
|
99
|
+
const target = Obj.instanceOf(Routine.Routine, data.companionTo) ? undefined : data.companionTo;
|
|
98
100
|
|
|
99
101
|
return (
|
|
100
102
|
<Panel.Root role={role} className='dx-document'>
|
|
101
103
|
<Panel.Content asChild>
|
|
102
|
-
<InvocationTraceContainer db={space?.db}
|
|
104
|
+
<InvocationTraceContainer db={space?.db} feedDXN={feedDXN} target={target} detailAxis='block' />
|
|
103
105
|
</Panel.Content>
|
|
104
106
|
</Panel.Root>
|
|
105
107
|
);
|
|
@@ -114,9 +116,16 @@ export default Capability.makeModule(() =>
|
|
|
114
116
|
}),
|
|
115
117
|
Surface.create({
|
|
116
118
|
id: 'prompt',
|
|
117
|
-
filter: AppSurface.object(AppSurface.Article,
|
|
119
|
+
filter: AppSurface.object(AppSurface.Article, Routine.Routine),
|
|
118
120
|
component: ({ data, role }) => (
|
|
119
|
-
<
|
|
121
|
+
<RoutineArticle role={role} subject={data.subject} attendableId={data.attendableId} />
|
|
122
|
+
),
|
|
123
|
+
}),
|
|
124
|
+
Surface.create({
|
|
125
|
+
id: 'plan',
|
|
126
|
+
filter: AppSurface.object(AppSurface.Article, Plan.Plan),
|
|
127
|
+
component: ({ data, role }) => (
|
|
128
|
+
<PlanArticle role={role} subject={data.subject} attendableId={data.attendableId} />
|
|
120
129
|
),
|
|
121
130
|
}),
|
|
122
131
|
Surface.create({
|
|
@@ -129,8 +138,13 @@ export default Capability.makeModule(() =>
|
|
|
129
138
|
filter: AppSurface.literal(Surface.makeType<{ subject: string }>('deck-companion--trace'), 'trace'),
|
|
130
139
|
component: () => {
|
|
131
140
|
const space = useActiveSpace();
|
|
141
|
+
useEffect(() => {
|
|
142
|
+
log('trace panel surface', { hasSpace: Boolean(space), spaceId: space?.id });
|
|
143
|
+
}, [space?.id]);
|
|
144
|
+
|
|
132
145
|
if (!space) {
|
|
133
|
-
|
|
146
|
+
// TODO(dmaretskyi): Not really part of UX, but so we know what the error is.
|
|
147
|
+
return <span>No active space</span>;
|
|
134
148
|
}
|
|
135
149
|
|
|
136
150
|
return <TracePanel space={space} />;
|
|
@@ -154,7 +168,7 @@ export default Capability.makeModule(() =>
|
|
|
154
168
|
Surface.makeType<{ subject: Obj.Any; attendableId: string }>('prompts'),
|
|
155
169
|
Obj.isObject,
|
|
156
170
|
),
|
|
157
|
-
component: ({ data }) => <
|
|
171
|
+
component: ({ data }) => <RoutineList subject={data.subject} />,
|
|
158
172
|
}),
|
|
159
173
|
]),
|
|
160
174
|
),
|
|
@@ -6,7 +6,8 @@ import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
|
6
6
|
|
|
7
7
|
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
8
8
|
|
|
9
|
-
import { translations } from '
|
|
9
|
+
import { translations } from '#translations';
|
|
10
|
+
|
|
10
11
|
import { AssistantSettings } from './AssistantSettings';
|
|
11
12
|
|
|
12
13
|
const meta = {
|
|
@@ -28,7 +29,7 @@ export const Default: Story = {
|
|
|
28
29
|
args: {
|
|
29
30
|
settings: {
|
|
30
31
|
customPrompts: false,
|
|
31
|
-
|
|
32
|
+
modelProvider: 'edge',
|
|
32
33
|
},
|
|
33
34
|
},
|
|
34
35
|
};
|
|
@@ -2,130 +2,41 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import React from 'react';
|
|
5
|
+
import React, { useMemo } from 'react';
|
|
6
6
|
|
|
7
|
-
import { DEFAULT_EDGE_MODELS, DEFAULT_OLLAMA_MODELS } from '@dxos/ai';
|
|
7
|
+
import { DEFAULT_EDGE_MODELS, DEFAULT_LMSTUDIO_MODELS, DEFAULT_OLLAMA_MODELS } from '@dxos/ai';
|
|
8
8
|
import { type AppSurface } from '@dxos/app-toolkit/ui';
|
|
9
|
-
import {
|
|
10
|
-
import { Settings as SettingsForm } from '@dxos/react-ui-form';
|
|
9
|
+
import { useTranslation } from '@dxos/react-ui';
|
|
10
|
+
import { Settings as SettingsForm, createSelectField } from '@dxos/react-ui-form';
|
|
11
11
|
|
|
12
12
|
import { meta } from '#meta';
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
// TODO(burdon): Factor out default Selector.
|
|
16
|
-
const DEFAULT_VALUE = '__default';
|
|
17
|
-
|
|
18
|
-
const LLM_PROVIDER_LABELS = {
|
|
19
|
-
edge: 'DXOS',
|
|
20
|
-
ollama: 'Ollama',
|
|
21
|
-
lmstudio: 'LM Studio',
|
|
22
|
-
} as const;
|
|
13
|
+
import { Assistant } from '#types';
|
|
23
14
|
|
|
24
15
|
export type AssistantSettingsProps = AppSurface.SettingsArticleProps<Assistant.Settings>;
|
|
25
16
|
|
|
26
17
|
export const AssistantSettings = ({ settings, onSettingsChange }: AssistantSettingsProps) => {
|
|
27
18
|
const { t } = useTranslation(meta.id);
|
|
19
|
+
const fieldMap = useMemo(
|
|
20
|
+
() => ({
|
|
21
|
+
modelDefaults: {
|
|
22
|
+
edge: createSelectField({ options: DEFAULT_EDGE_MODELS }),
|
|
23
|
+
ollama: createSelectField({ options: DEFAULT_OLLAMA_MODELS }),
|
|
24
|
+
lmstudio: createSelectField({ options: DEFAULT_LMSTUDIO_MODELS }),
|
|
25
|
+
},
|
|
26
|
+
}),
|
|
27
|
+
[],
|
|
28
|
+
);
|
|
28
29
|
|
|
29
30
|
return (
|
|
30
31
|
<SettingsForm.Viewport>
|
|
31
32
|
<SettingsForm.Section title={t('settings.title', { ns: meta.id })}>
|
|
32
|
-
<SettingsForm.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
onCheckedChange={(checked) => onSettingsChange?.((s) => ({ ...s, customPrompts: checked }))}
|
|
40
|
-
/>
|
|
41
|
-
</SettingsForm.Item>
|
|
42
|
-
|
|
43
|
-
<SettingsForm.Item
|
|
44
|
-
title={t('settings.llm-provider.label')}
|
|
45
|
-
description={t('settings.llm-provider.description')}
|
|
46
|
-
>
|
|
47
|
-
<Select.Root
|
|
48
|
-
disabled={!onSettingsChange}
|
|
49
|
-
value={settings.llmProvider ?? 'edge'}
|
|
50
|
-
onValueChange={(value) => {
|
|
51
|
-
onSettingsChange?.((s) => ({
|
|
52
|
-
...s,
|
|
53
|
-
llmProvider: value === DEFAULT_VALUE ? undefined : (value as any),
|
|
54
|
-
}));
|
|
55
|
-
}}
|
|
56
|
-
>
|
|
57
|
-
<Select.TriggerButton disabled={!onSettingsChange} placeholder={t('settings.llm-provider.label')} />
|
|
58
|
-
<Select.Portal>
|
|
59
|
-
<Select.Content>
|
|
60
|
-
<Select.Viewport>
|
|
61
|
-
<Select.Option value={DEFAULT_VALUE}>{t('settings.default.label')}</Select.Option>
|
|
62
|
-
{LLM_PROVIDERS.map((model) => (
|
|
63
|
-
<Select.Option key={model} value={model}>
|
|
64
|
-
{LLM_PROVIDER_LABELS[model]}
|
|
65
|
-
</Select.Option>
|
|
66
|
-
))}
|
|
67
|
-
</Select.Viewport>
|
|
68
|
-
<Select.Arrow />
|
|
69
|
-
</Select.Content>
|
|
70
|
-
</Select.Portal>
|
|
71
|
-
</Select.Root>
|
|
72
|
-
</SettingsForm.Item>
|
|
73
|
-
|
|
74
|
-
<SettingsForm.Item
|
|
75
|
-
title={t('settings.edge-llm-model.label')}
|
|
76
|
-
description={t('settings.edge-llm-model.description')}
|
|
77
|
-
>
|
|
78
|
-
<Select.Root
|
|
79
|
-
disabled={!onSettingsChange}
|
|
80
|
-
value={settings.edgeModel ?? DEFAULT_VALUE}
|
|
81
|
-
onValueChange={(value) => {
|
|
82
|
-
onSettingsChange?.((s) => ({ ...s, edgeModel: value === DEFAULT_VALUE ? undefined : value }));
|
|
83
|
-
}}
|
|
84
|
-
>
|
|
85
|
-
<Select.TriggerButton disabled={!onSettingsChange} placeholder={t('settings.default-llm-model.label')} />
|
|
86
|
-
<Select.Portal>
|
|
87
|
-
<Select.Content>
|
|
88
|
-
<Select.Viewport>
|
|
89
|
-
<Select.Option value={DEFAULT_VALUE}>{t('settings.default.label')}</Select.Option>
|
|
90
|
-
{DEFAULT_EDGE_MODELS.map((model) => (
|
|
91
|
-
<Select.Option key={model} value={model}>
|
|
92
|
-
{model}
|
|
93
|
-
</Select.Option>
|
|
94
|
-
))}
|
|
95
|
-
</Select.Viewport>
|
|
96
|
-
<Select.Arrow />
|
|
97
|
-
</Select.Content>
|
|
98
|
-
</Select.Portal>
|
|
99
|
-
</Select.Root>
|
|
100
|
-
</SettingsForm.Item>
|
|
101
|
-
|
|
102
|
-
<SettingsForm.Item
|
|
103
|
-
title={t('settings.ollama-llm-model.label')}
|
|
104
|
-
description={t('settings.ollama-llm-model.description')}
|
|
105
|
-
>
|
|
106
|
-
<Select.Root
|
|
107
|
-
disabled={!onSettingsChange}
|
|
108
|
-
value={settings.ollamaModel ?? DEFAULT_VALUE}
|
|
109
|
-
onValueChange={(value) => {
|
|
110
|
-
onSettingsChange?.((s) => ({ ...s, ollamaModel: value === DEFAULT_VALUE ? undefined : value }));
|
|
111
|
-
}}
|
|
112
|
-
>
|
|
113
|
-
<Select.TriggerButton disabled={!onSettingsChange} placeholder={t('settings.default-llm-model.label')} />
|
|
114
|
-
<Select.Portal>
|
|
115
|
-
<Select.Content>
|
|
116
|
-
<Select.Viewport>
|
|
117
|
-
<Select.Option value={DEFAULT_VALUE}>{t('settings.default.label')}</Select.Option>
|
|
118
|
-
{DEFAULT_OLLAMA_MODELS.map((model) => (
|
|
119
|
-
<Select.Option key={model} value={model}>
|
|
120
|
-
{model}
|
|
121
|
-
</Select.Option>
|
|
122
|
-
))}
|
|
123
|
-
</Select.Viewport>
|
|
124
|
-
<Select.Arrow />
|
|
125
|
-
</Select.Content>
|
|
126
|
-
</Select.Portal>
|
|
127
|
-
</Select.Root>
|
|
128
|
-
</SettingsForm.Item>
|
|
33
|
+
<SettingsForm.FieldSet<Assistant.Settings>
|
|
34
|
+
readonly={!onSettingsChange}
|
|
35
|
+
schema={Assistant.Settings}
|
|
36
|
+
fieldMap={fieldMap}
|
|
37
|
+
values={settings}
|
|
38
|
+
onValuesChanged={(values) => onSettingsChange?.(() => values)}
|
|
39
|
+
/>
|
|
129
40
|
</SettingsForm.Section>
|
|
130
41
|
</SettingsForm.Viewport>
|
|
131
42
|
);
|