@dxos/plugin-assistant 0.8.4-main.67995b8 → 0.8.4-main.c4373fc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/{BlueprintContainer-IZ4AK5EO.mjs → BlueprintContainer-TO35YXHT.mjs} +4 -3
- package/dist/lib/browser/ChatCompanion-ZIKNUUSU.mjs +127 -0
- package/dist/lib/browser/ChatCompanion-ZIKNUUSU.mjs.map +7 -0
- package/dist/lib/browser/{ChatContainer-RP3QEXYX.mjs → ChatContainer-MA5BVDGH.mjs} +33 -14
- package/dist/lib/browser/ChatContainer-MA5BVDGH.mjs.map +7 -0
- package/dist/lib/browser/{ChatDialog-ZVLXFHEY.mjs → ChatDialog-7OXLIWZI.mjs} +26 -12
- package/dist/lib/browser/ChatDialog-7OXLIWZI.mjs.map +7 -0
- package/dist/lib/browser/{SequenceContainer-3UDVKWPA.mjs → SequenceContainer-2FEWMQGW.mjs} +7 -19
- package/dist/lib/browser/SequenceContainer-2FEWMQGW.mjs.map +7 -0
- package/dist/lib/browser/ai-service-ERTZBTP3.mjs +19 -0
- package/dist/lib/browser/ai-service-ERTZBTP3.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-builder-XSEOKJLG.mjs → app-graph-builder-VKFRYY2N.mjs} +31 -41
- package/dist/lib/browser/app-graph-builder-VKFRYY2N.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-NSJARW5U.mjs +12 -0
- package/dist/lib/browser/blueprint-definition-NSJARW5U.mjs.map +7 -0
- package/dist/lib/browser/chunk-2CE2KPKZ.mjs +175 -0
- package/dist/lib/browser/chunk-2CE2KPKZ.mjs.map +7 -0
- package/dist/lib/browser/chunk-43I2LR6O.mjs +216 -0
- package/dist/lib/browser/chunk-43I2LR6O.mjs.map +7 -0
- package/dist/lib/browser/chunk-5EGXHCAZ.mjs +16 -0
- package/dist/lib/browser/chunk-5EGXHCAZ.mjs.map +7 -0
- package/dist/lib/browser/chunk-5RICKAMN.mjs +18 -0
- package/dist/lib/browser/chunk-5RICKAMN.mjs.map +7 -0
- package/dist/lib/browser/chunk-B2RCJXEO.mjs +202 -0
- package/dist/lib/browser/chunk-B2RCJXEO.mjs.map +7 -0
- package/dist/lib/browser/chunk-BRJMNZOS.mjs +169 -0
- package/dist/lib/browser/chunk-BRJMNZOS.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/browser/chunk-P5P7QXBS.mjs +296 -0
- package/dist/lib/browser/chunk-P5P7QXBS.mjs.map +7 -0
- package/dist/lib/browser/chunk-UDH4MR7H.mjs +1744 -0
- package/dist/lib/browser/chunk-UDH4MR7H.mjs.map +7 -0
- package/dist/lib/browser/edge-model-resolver-O6OFYIO2.mjs +18 -0
- package/dist/lib/browser/edge-model-resolver-O6OFYIO2.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +144 -63
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/intent-resolver-5LB25ZRN.mjs +112 -0
- package/dist/lib/browser/intent-resolver-5LB25ZRN.mjs.map +7 -0
- package/dist/lib/browser/local-model-resolver-GO6ZEMLL.mjs +17 -0
- package/dist/lib/browser/local-model-resolver-GO6ZEMLL.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-surface-WQZXU624.mjs +107 -0
- package/dist/lib/browser/react-surface-WQZXU624.mjs.map +7 -0
- package/dist/lib/browser/{settings-5GTTCVGD.mjs → settings-4B2NA4CE.mjs} +8 -7
- package/dist/lib/{node-esm/settings-J2EXEM5H.mjs.map → browser/settings-4B2NA4CE.mjs.map} +1 -1
- package/dist/lib/browser/state-LXTS54DI.mjs +21 -0
- package/dist/lib/browser/state-LXTS54DI.mjs.map +7 -0
- package/dist/lib/browser/toolkit-NQ2GXCF5.mjs +199 -0
- package/dist/lib/browser/toolkit-NQ2GXCF5.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +7 -4
- package/dist/lib/node-esm/{BlueprintContainer-RGTMNLNX.mjs → BlueprintContainer-J664LTU3.mjs} +4 -3
- package/dist/lib/{browser/BlueprintContainer-IZ4AK5EO.mjs.map → node-esm/BlueprintContainer-J664LTU3.mjs.map} +1 -1
- package/dist/lib/node-esm/ChatCompanion-YDXJIVCF.mjs +128 -0
- package/dist/lib/node-esm/ChatCompanion-YDXJIVCF.mjs.map +7 -0
- package/dist/lib/node-esm/{ChatContainer-W3W6FWV3.mjs → ChatContainer-WLTOQLHH.mjs} +33 -14
- package/dist/lib/node-esm/ChatContainer-WLTOQLHH.mjs.map +7 -0
- package/dist/lib/node-esm/{ChatDialog-QW4JRKVO.mjs → ChatDialog-ADKF62SY.mjs} +26 -12
- package/dist/lib/node-esm/ChatDialog-ADKF62SY.mjs.map +7 -0
- package/dist/lib/node-esm/{SequenceContainer-RQQH5XOC.mjs → SequenceContainer-PGGJUQ46.mjs} +7 -19
- package/dist/lib/node-esm/SequenceContainer-PGGJUQ46.mjs.map +7 -0
- package/dist/lib/node-esm/ai-service-MUYLV3NT.mjs +20 -0
- package/dist/lib/node-esm/ai-service-MUYLV3NT.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-builder-PANCJUHV.mjs → app-graph-builder-K6AYO4YM.mjs} +31 -41
- package/dist/lib/node-esm/app-graph-builder-K6AYO4YM.mjs.map +7 -0
- package/dist/lib/node-esm/blueprint-definition-WD2IVMAI.mjs +13 -0
- package/dist/lib/node-esm/blueprint-definition-WD2IVMAI.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-73ABYRYX.mjs +20 -0
- package/dist/lib/node-esm/chunk-73ABYRYX.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-DBDKOC3I.mjs +203 -0
- package/dist/lib/node-esm/chunk-DBDKOC3I.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-DSE2IILK.mjs +217 -0
- package/dist/lib/node-esm/chunk-DSE2IILK.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-I7BZMIAG.mjs +170 -0
- package/dist/lib/node-esm/chunk-I7BZMIAG.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-TBQOICXZ.mjs +297 -0
- package/dist/lib/node-esm/chunk-TBQOICXZ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-U2NYUS2N.mjs +177 -0
- package/dist/lib/node-esm/chunk-U2NYUS2N.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-UPPSDTOJ.mjs +1745 -0
- package/dist/lib/node-esm/chunk-UPPSDTOJ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-XQGWSZ4T.mjs +17 -0
- package/dist/lib/node-esm/chunk-XQGWSZ4T.mjs.map +7 -0
- package/dist/lib/node-esm/edge-model-resolver-2ARXDOYS.mjs +19 -0
- package/dist/lib/node-esm/edge-model-resolver-2ARXDOYS.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +144 -63
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/intent-resolver-I64MNI4C.mjs +113 -0
- package/dist/lib/node-esm/intent-resolver-I64MNI4C.mjs.map +7 -0
- package/dist/lib/node-esm/local-model-resolver-WOQ2D2R2.mjs +18 -0
- package/dist/lib/node-esm/local-model-resolver-WOQ2D2R2.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-QDQWJ7FZ.mjs → react-surface-TVVVRIR3.mjs} +25 -68
- package/dist/lib/node-esm/react-surface-TVVVRIR3.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-J2EXEM5H.mjs → settings-7Y3CRASE.mjs} +8 -7
- package/dist/lib/{browser/settings-5GTTCVGD.mjs.map → node-esm/settings-7Y3CRASE.mjs.map} +1 -1
- package/dist/lib/node-esm/state-BO6GUFLB.mjs +22 -0
- package/dist/lib/node-esm/state-BO6GUFLB.mjs.map +7 -0
- package/dist/lib/node-esm/toolkit-V57PRJNG.mjs +200 -0
- package/dist/lib/node-esm/toolkit-V57PRJNG.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +7 -4
- package/dist/types/src/AssistantPlugin.d.ts +1 -1
- package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/ai-service.d.ts +4 -0
- package/dist/types/src/capabilities/ai-service.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +7 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/capabilities.d.ts +11 -0
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -0
- package/dist/types/src/capabilities/edge-model-resolver.d.ts +4 -0
- package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +11 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/local-model-resolver.d.ts +10 -0
- package/dist/types/src/capabilities/local-model-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +1 -1
- package/dist/types/src/capabilities/state.d.ts +4 -0
- package/dist/types/src/capabilities/state.d.ts.map +1 -0
- package/dist/types/src/capabilities/toolkit.d.ts +4 -0
- package/dist/types/src/capabilities/toolkit.d.ts.map +1 -0
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +1 -1
- package/dist/types/src/components/Chat/Chat.d.ts +20 -17
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/src/components/Chat/events.d.ts +5 -0
- package/dist/types/src/components/Chat/events.d.ts.map +1 -1
- package/dist/types/src/components/ChatCompanion.d.ts +13 -0
- package/dist/types/src/components/ChatCompanion.d.ts.map +1 -0
- package/dist/types/src/components/ChatContainer.d.ts +4 -4
- package/dist/types/src/components/ChatContainer.d.ts.map +1 -1
- package/dist/types/src/components/ChatDialog.d.ts.map +1 -1
- package/dist/types/src/components/ChatProgress/ChatProgress.d.ts +7 -0
- package/dist/types/src/components/ChatProgress/ChatProgress.d.ts.map +1 -0
- package/dist/types/src/components/ChatProgress/index.d.ts +2 -0
- package/dist/types/src/components/ChatProgress/index.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts +20 -0
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatPresets.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts +4 -5
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts +6 -4
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/index.d.ts +1 -1
- package/dist/types/src/components/ChatPrompt/index.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.d.ts +10 -7
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +115 -33
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/Link.d.ts +9 -0
- package/dist/types/src/components/ChatThread/Link.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/reducers.d.ts +40 -0
- package/dist/types/src/components/ChatThread/reducers.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/registry.d.ts +11 -0
- package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/sync.d.ts +36 -0
- package/dist/types/src/components/ChatThread/sync.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/sync.test.d.ts +2 -0
- package/dist/types/src/components/ChatThread/sync.test.d.ts.map +1 -0
- package/dist/types/src/components/PromptSettings.d.ts.map +1 -1
- package/dist/types/src/components/SequenceContainer.d.ts.map +1 -1
- package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts +1 -1
- package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts.map +1 -1
- package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts +264 -3
- package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +0 -5
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +262 -7
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +259 -2
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/handlebars-extension.d.ts +12 -0
- package/dist/types/src/components/TemplateEditor/handlebars-extension.d.ts.map +1 -0
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts +19 -0
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts.map +1 -0
- package/dist/types/src/components/ToolBlock/ToolBlockWidget.d.ts +2 -0
- package/dist/types/src/components/ToolBlock/ToolBlockWidget.d.ts.map +1 -0
- package/dist/types/src/components/ToolBlock/index.d.ts +3 -0
- package/dist/types/src/components/ToolBlock/index.d.ts.map +1 -0
- package/dist/types/src/components/Toolbar/Toolbar.d.ts +5 -0
- package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -0
- package/dist/types/src/components/Toolbar/index.d.ts +2 -0
- package/dist/types/src/components/Toolbar/index.d.ts.map +1 -0
- package/dist/types/src/components/Toolbar/useChatToolbarActions.d.ts +11 -0
- package/dist/types/src/components/Toolbar/useChatToolbarActions.d.ts.map +1 -0
- package/dist/types/src/components/Toolbox/Toolbox.d.ts +4 -9
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +262 -5
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +4 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/events.d.ts +1 -1
- package/dist/types/src/events.d.ts.map +1 -1
- package/dist/types/src/functions/analysis.d.ts +5 -0
- package/dist/types/src/functions/analysis.d.ts.map +1 -0
- package/dist/types/src/functions/index.d.ts +4 -0
- package/dist/types/src/functions/index.d.ts.map +1 -0
- package/dist/types/src/functions/list.d.ts +10 -0
- package/dist/types/src/functions/list.d.ts.map +1 -0
- package/dist/types/src/functions/load.d.ts +8 -0
- package/dist/types/src/functions/load.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +7 -3
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts +25 -0
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -0
- package/dist/types/src/hooks/useChatProcessor.d.ts +8 -21
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts +5 -6
- package/dist/types/src/hooks/useChatServices.d.ts.map +1 -1
- package/dist/types/src/hooks/useContextBinder.d.ts +4 -0
- package/dist/types/src/hooks/useContextBinder.d.ts.map +1 -0
- package/dist/types/src/hooks/useContextObjects.d.ts +15 -0
- package/dist/types/src/hooks/useContextObjects.d.ts.map +1 -0
- package/dist/types/src/hooks/useFlush.d.ts +6 -0
- package/dist/types/src/hooks/useFlush.d.ts.map +1 -0
- package/dist/types/src/hooks/useItemTypes.d.ts +4 -0
- package/dist/types/src/hooks/useItemTypes.d.ts.map +1 -0
- package/dist/types/src/hooks/useOnline.d.ts +3 -0
- package/dist/types/src/hooks/useOnline.d.ts.map +1 -0
- package/dist/types/src/hooks/usePresets.d.ts +7 -0
- package/dist/types/src/hooks/usePresets.d.ts.map +1 -0
- package/dist/types/src/hooks/useReferencesProvider.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +1 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/processor/index.d.ts +3 -0
- package/dist/types/src/processor/index.d.ts.map +1 -0
- package/dist/types/src/{hooks → processor}/presets.d.ts +3 -3
- package/dist/types/src/processor/presets.d.ts.map +1 -0
- package/dist/types/src/processor/processor.d.ts +74 -0
- package/dist/types/src/processor/processor.d.ts.map +1 -0
- package/dist/types/src/processor/processor.test.d.ts +2 -0
- package/dist/types/src/processor/processor.test.d.ts.map +1 -0
- package/dist/types/src/stories/Chat.stories.d.ts +28 -203
- package/dist/types/src/stories/Chat.stories.d.ts.map +1 -1
- package/dist/types/src/stories/QueryEditor.stories.d.ts +7 -0
- package/dist/types/src/stories/QueryEditor.stories.d.ts.map +1 -0
- package/dist/types/src/stories/components/BlueprintContainer.d.ts +4 -0
- package/dist/types/src/stories/components/BlueprintContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/ChatContainer.d.ts +4 -0
- package/dist/types/src/stories/components/ChatContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/ChessContainer.d.ts +4 -0
- package/dist/types/src/stories/components/ChessContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/CommentsContainer.d.ts +4 -0
- package/dist/types/src/stories/components/CommentsContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/DebugCard.d.ts +8 -0
- package/dist/types/src/stories/components/DebugCard.d.ts.map +1 -0
- package/dist/types/src/stories/components/ExecutionGraphContainer.d.ts +7 -0
- package/dist/types/src/stories/components/ExecutionGraphContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/GraphContainer.d.ts +6 -0
- package/dist/types/src/stories/components/GraphContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/InvocationsContainer.d.ts +4 -0
- package/dist/types/src/stories/components/InvocationsContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/MessageContainer.d.ts +4 -0
- package/dist/types/src/stories/components/MessageContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/ProjectContainer.d.ts +4 -0
- package/dist/types/src/stories/components/ProjectContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/PromptContainer.d.ts +6 -0
- package/dist/types/src/stories/components/PromptContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/ResearchInputStack.d.ts +4 -0
- package/dist/types/src/stories/components/ResearchInputStack.d.ts.map +1 -0
- package/dist/types/src/stories/components/ResearchOutputStack.d.ts +4 -0
- package/dist/types/src/stories/components/ResearchOutputStack.d.ts.map +1 -0
- package/dist/types/src/stories/components/ScriptContainer.d.ts +4 -0
- package/dist/types/src/stories/components/ScriptContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/TasksContainer.d.ts +4 -0
- package/dist/types/src/stories/components/TasksContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/TokenManagerContainer.d.ts +3 -0
- package/dist/types/src/stories/components/TokenManagerContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/TriggersContainer.d.ts +3 -0
- package/dist/types/src/stories/components/TriggersContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/index.d.ts +18 -0
- package/dist/types/src/stories/components/index.d.ts.map +1 -0
- package/dist/types/src/stories/components/types.d.ts +7 -0
- package/dist/types/src/stories/components/types.d.ts.map +1 -0
- package/dist/types/src/stories/testing/data.d.ts +9 -0
- package/dist/types/src/stories/testing/data.d.ts.map +1 -0
- package/dist/types/src/stories/testing/index.d.ts +3 -0
- package/dist/types/src/stories/testing/index.d.ts.map +1 -0
- package/dist/types/src/stories/testing/schema.d.ts +7 -0
- package/dist/types/src/stories/testing/schema.d.ts.map +1 -0
- package/dist/types/src/stories/testing/testing.d.ts +51 -0
- package/dist/types/src/stories/testing/testing.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +3 -1
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/test-data.d.ts +14 -0
- package/dist/types/src/testing/test-data.d.ts.map +1 -0
- package/dist/types/src/testing/test-functions.d.ts +5 -2
- package/dist/types/src/testing/test-functions.d.ts.map +1 -1
- package/dist/types/src/testing/test-generator.d.ts +7 -0
- package/dist/types/src/testing/test-generator.d.ts.map +1 -0
- package/dist/types/src/testing/test-sequence.d.ts +0 -4
- package/dist/types/src/testing/test-sequence.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +28 -12
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Assistant.d.ts +42 -0
- package/dist/types/src/types/Assistant.d.ts.map +1 -0
- package/dist/types/src/types/AssistantAction.d.ts +107 -0
- package/dist/types/src/types/AssistantAction.d.ts.map +1 -0
- package/dist/types/src/types/defs.d.ts +2 -0
- package/dist/types/src/types/defs.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +3 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/service.d.ts +15 -12
- package/dist/types/src/types/service.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +115 -96
- package/src/AssistantPlugin.tsx +150 -107
- package/src/capabilities/ai-service.ts +27 -0
- package/src/capabilities/app-graph-builder.ts +45 -51
- package/src/capabilities/blueprint-definition.ts +64 -0
- package/src/capabilities/capabilities.ts +18 -0
- package/src/capabilities/edge-model-resolver.ts +25 -0
- package/src/capabilities/index.ts +9 -0
- package/src/capabilities/intent-resolver.ts +46 -24
- package/src/capabilities/local-model-resolver.ts +30 -0
- package/src/capabilities/react-surface.tsx +10 -57
- package/src/capabilities/state.ts +20 -0
- package/src/capabilities/toolkit.ts +168 -0
- package/src/components/AssistantSettings/AssistantSettings.tsx +83 -76
- package/src/components/Chat/Chat.tsx +180 -176
- package/src/components/Chat/events.ts +7 -0
- package/src/components/ChatCompanion.tsx +114 -0
- package/src/components/ChatContainer.tsx +19 -13
- package/src/components/ChatDialog.tsx +18 -14
- package/src/components/ChatProgress/ChatProgress.tsx +67 -0
- package/src/components/ChatProgress/index.ts +5 -0
- package/src/components/ChatPrompt/ChatActions.tsx +10 -24
- package/src/components/ChatPrompt/ChatOptions.tsx +225 -0
- package/src/components/ChatPrompt/ChatPresets.tsx +1 -0
- package/src/components/ChatPrompt/ChatReferences.tsx +31 -36
- package/src/components/ChatPrompt/ChatStatusIndicator.tsx +25 -22
- package/src/components/ChatPrompt/index.ts +1 -1
- package/src/components/ChatThread/ChatThread.stories.tsx +98 -112
- package/src/components/ChatThread/ChatThread.tsx +65 -29
- package/src/components/ChatThread/Link.tsx +26 -0
- package/src/components/ChatThread/reducers.ts +151 -0
- package/src/components/ChatThread/registry.tsx +184 -0
- package/src/components/ChatThread/sync.test.ts +81 -0
- package/src/components/ChatThread/sync.ts +113 -0
- package/src/components/PromptSettings.tsx +1 -0
- package/src/components/SequenceContainer.tsx +29 -30
- package/src/components/SequenceEditor/SequenceEditor.stories.tsx +11 -8
- package/src/components/SequenceEditor/SequenceEditor.tsx +3 -3
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +26 -15
- package/src/components/TemplateEditor/TemplateEditor.tsx +17 -50
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +15 -10
- package/src/components/TemplateEditor/TemplateForm.tsx +4 -2
- package/src/components/TemplateEditor/handlebars-extension.ts +165 -0
- package/src/components/ToolBlock/ToolBlock.tsx +152 -0
- package/src/components/ToolBlock/ToolBlockWidget.tsx +5 -0
- package/src/components/ToolBlock/index.ts +6 -0
- package/src/components/Toolbar/Toolbar.tsx +21 -0
- package/src/components/Toolbar/index.ts +5 -0
- package/src/components/Toolbar/useChatToolbarActions.ts +126 -0
- package/src/components/Toolbox/Toolbox.stories.tsx +13 -22
- package/src/components/Toolbox/Toolbox.tsx +21 -51
- package/src/components/index.ts +3 -4
- package/src/events.ts +2 -2
- package/src/functions/analysis.ts +22 -0
- package/src/functions/index.ts +7 -0
- package/src/functions/list.ts +48 -0
- package/src/functions/load.ts +46 -0
- package/src/hooks/index.ts +7 -4
- package/src/hooks/useBlueprintRegistry.ts +94 -0
- package/src/hooks/useChatProcessor.ts +21 -98
- package/src/hooks/useChatServices.ts +30 -48
- package/src/hooks/useContextBinder.ts +18 -0
- package/src/hooks/useContextObjects.ts +58 -0
- package/src/hooks/useFlush.ts +35 -0
- package/src/hooks/useItemTypes.ts +37 -0
- package/src/hooks/useOnline.ts +10 -0
- package/src/hooks/usePresets.ts +44 -0
- package/src/hooks/useReferencesProvider.ts +11 -9
- package/src/meta.ts +4 -6
- package/src/processor/index.ts +6 -0
- package/src/{hooks → processor}/presets.ts +15 -7
- package/src/processor/processor.test.ts +81 -0
- package/src/processor/processor.ts +303 -0
- package/src/queue-logger.ts +10 -10
- package/src/stories/Chat.stories.tsx +816 -305
- package/src/stories/QueryEditor.stories.tsx +114 -0
- package/src/stories/components/BlueprintContainer.tsx +34 -0
- package/src/stories/components/ChatContainer.tsx +74 -0
- package/src/stories/components/ChessContainer.tsx +17 -0
- package/src/stories/components/CommentsContainer.tsx +25 -0
- package/src/stories/components/DebugCard.tsx +61 -0
- package/src/stories/components/ExecutionGraphContainer.tsx +30 -0
- package/src/stories/components/GraphContainer.tsx +106 -0
- package/src/stories/components/InvocationsContainer.tsx +17 -0
- package/src/stories/components/MessageContainer.tsx +22 -0
- package/src/stories/components/ProjectContainer.tsx +17 -0
- package/src/stories/components/PromptContainer.tsx +52 -0
- package/src/stories/components/ResearchInputStack.tsx +30 -0
- package/src/stories/components/ResearchOutputStack.tsx +29 -0
- package/src/stories/components/ScriptContainer.tsx +28 -0
- package/src/stories/components/TasksContainer.tsx +47 -0
- package/src/stories/components/TokenManagerContainer.tsx +14 -0
- package/src/stories/components/TriggersContainer.tsx +12 -0
- package/src/stories/components/index.ts +22 -0
- package/src/stories/components/types.ts +11 -0
- package/src/stories/testing/data.ts +135 -0
- package/src/stories/testing/index.ts +6 -0
- package/src/stories/testing/schema.ts +17 -0
- package/src/stories/testing/testing.tsx +291 -0
- package/src/testing/index.ts +3 -1
- package/src/testing/test-data.ts +248 -0
- package/src/testing/test-functions.ts +8 -3
- package/src/testing/test-generator.ts +261 -0
- package/src/testing/test-sequence.ts +2 -27
- package/src/translations.ts +31 -12
- package/src/types/Assistant.ts +61 -0
- package/src/types/AssistantAction.ts +62 -0
- package/src/types/defs.ts +5 -0
- package/src/types/index.ts +4 -1
- package/src/types/service.ts +2 -2
- package/src/vite-env.d.ts +30 -0
- package/dist/lib/browser/ChatContainer-RP3QEXYX.mjs.map +0 -7
- package/dist/lib/browser/ChatDialog-ZVLXFHEY.mjs.map +0 -7
- package/dist/lib/browser/SequenceContainer-3UDVKWPA.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-XSEOKJLG.mjs.map +0 -7
- package/dist/lib/browser/chunk-63GG6U6D.mjs +0 -2226
- package/dist/lib/browser/chunk-63GG6U6D.mjs.map +0 -7
- package/dist/lib/browser/chunk-7W7LHTRH.mjs +0 -171
- package/dist/lib/browser/chunk-7W7LHTRH.mjs.map +0 -7
- package/dist/lib/browser/chunk-FDCJSQYF.mjs +0 -40
- package/dist/lib/browser/chunk-FDCJSQYF.mjs.map +0 -7
- package/dist/lib/browser/chunk-KFXSBNZR.mjs +0 -89
- package/dist/lib/browser/chunk-KFXSBNZR.mjs.map +0 -7
- package/dist/lib/browser/chunk-LERGF5YG.mjs +0 -108
- package/dist/lib/browser/chunk-LERGF5YG.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-MV3VSZLS.mjs +0 -75
- package/dist/lib/browser/intent-resolver-MV3VSZLS.mjs.map +0 -7
- package/dist/lib/browser/react-surface-3GYEHQRP.mjs +0 -150
- package/dist/lib/browser/react-surface-3GYEHQRP.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-W3W6FWV3.mjs.map +0 -7
- package/dist/lib/node-esm/ChatDialog-QW4JRKVO.mjs.map +0 -7
- package/dist/lib/node-esm/SequenceContainer-RQQH5XOC.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-PANCJUHV.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BFO3KHYL.mjs +0 -2227
- package/dist/lib/node-esm/chunk-BFO3KHYL.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-MS3PJARN.mjs +0 -109
- package/dist/lib/node-esm/chunk-MS3PJARN.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QN2H2EHV.mjs +0 -41
- package/dist/lib/node-esm/chunk-QN2H2EHV.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-VIIMA3XQ.mjs +0 -90
- package/dist/lib/node-esm/chunk-VIIMA3XQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-Z7PUODRT.mjs +0 -172
- package/dist/lib/node-esm/chunk-Z7PUODRT.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-3FMC3GHC.mjs +0 -76
- package/dist/lib/node-esm/intent-resolver-3FMC3GHC.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-QDQWJ7FZ.mjs.map +0 -7
- package/dist/types/src/capability-definitions.d.ts +0 -7
- package/dist/types/src/capability-definitions.d.ts.map +0 -1
- package/dist/types/src/components/ChatPrompt/ChatOptionsMenu.d.ts +0 -9
- package/dist/types/src/components/ChatPrompt/ChatOptionsMenu.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/ChatMessage.d.ts +0 -17
- package/dist/types/src/components/ChatThread/ChatMessage.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/ToolBlock.d.ts +0 -19
- package/dist/types/src/components/ChatThread/ToolBlock.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/reducer.d.ts +0 -12
- package/dist/types/src/components/ChatThread/reducer.d.ts.map +0 -1
- package/dist/types/src/hooks/chat-processor.d.ts +0 -86
- package/dist/types/src/hooks/chat-processor.d.ts.map +0 -1
- package/dist/types/src/hooks/chat-processor.test.d.ts +0 -2
- package/dist/types/src/hooks/chat-processor.test.d.ts.map +0 -1
- package/dist/types/src/hooks/presets.d.ts.map +0 -1
- package/dist/types/src/hooks/useBlueprints.d.ts +0 -9
- package/dist/types/src/hooks/useBlueprints.d.ts.map +0 -1
- package/dist/types/src/parser/filter-generator.d.ts +0 -4
- package/dist/types/src/parser/filter-generator.d.ts.map +0 -1
- package/dist/types/src/parser/filter-generator.test.d.ts +0 -2
- package/dist/types/src/parser/filter-generator.test.d.ts.map +0 -1
- package/dist/types/src/parser/index.d.ts +0 -4
- package/dist/types/src/parser/index.d.ts.map +0 -1
- package/dist/types/src/parser/query-parser.d.ts +0 -15
- package/dist/types/src/parser/query-parser.d.ts.map +0 -1
- package/dist/types/src/parser/query-parser.test.d.ts +0 -2
- package/dist/types/src/parser/query-parser.test.d.ts.map +0 -1
- package/dist/types/src/parser/types.d.ts +0 -24
- package/dist/types/src/parser/types.d.ts.map +0 -1
- package/dist/types/src/tools/function.d.ts +0 -5
- package/dist/types/src/tools/function.d.ts.map +0 -1
- package/dist/types/src/tools/index.d.ts +0 -3
- package/dist/types/src/tools/index.d.ts.map +0 -1
- package/dist/types/src/tools/openapi.d.ts +0 -10
- package/dist/types/src/tools/openapi.d.ts.map +0 -1
- package/dist/types/src/tools/openapi.test.d.ts +0 -2
- package/dist/types/src/tools/openapi.test.d.ts.map +0 -1
- package/dist/types/src/types/schema.d.ts +0 -120
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/src/capability-definitions.ts +0 -15
- package/src/components/ChatPrompt/ChatOptionsMenu.tsx +0 -52
- package/src/components/ChatThread/ChatMessage.tsx +0 -268
- package/src/components/ChatThread/ToolBlock.tsx +0 -121
- package/src/components/ChatThread/reducer.ts +0 -52
- package/src/hooks/chat-processor.test.ts +0 -16
- package/src/hooks/chat-processor.ts +0 -314
- package/src/hooks/useBlueprints.ts +0 -57
- package/src/parser/filter-generator.test.ts +0 -32
- package/src/parser/filter-generator.ts +0 -81
- package/src/parser/index.ts +0 -7
- package/src/parser/query-parser.test.ts +0 -139
- package/src/parser/query-parser.ts +0 -199
- package/src/parser/types.ts +0 -34
- package/src/shims.d.ts +0 -8
- package/src/tools/function.ts +0 -46
- package/src/tools/index.ts +0 -6
- package/src/tools/openapi.test.ts +0 -217
- package/src/tools/openapi.ts +0 -338
- package/src/types/schema.ts +0 -108
- package/src/typings.d.ts +0 -9
- /package/dist/lib/{node-esm/BlueprintContainer-RGTMNLNX.mjs.map → browser/BlueprintContainer-TO35YXHT.mjs.map} +0 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
7
|
+
|
|
8
|
+
import { Obj, TagInfo, type TagMap } from '@dxos/echo';
|
|
9
|
+
import { QueryBuilder } from '@dxos/echo-query';
|
|
10
|
+
import { D3ForceGraph, useGraphModel } from '@dxos/plugin-explorer';
|
|
11
|
+
import { faker } from '@dxos/random';
|
|
12
|
+
import { Filter, useSpaces } from '@dxos/react-client/echo';
|
|
13
|
+
import { useQuery } from '@dxos/react-client/echo';
|
|
14
|
+
import { withClientProvider } from '@dxos/react-client/testing';
|
|
15
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
16
|
+
import { QueryEditor, type QueryEditorProps } from '@dxos/react-ui-components';
|
|
17
|
+
import { DataType } from '@dxos/schema';
|
|
18
|
+
import { type ValueGenerator, createObjectFactory } from '@dxos/schema/testing';
|
|
19
|
+
import { render } from '@dxos/storybook-utils';
|
|
20
|
+
|
|
21
|
+
import { translations } from '../translations';
|
|
22
|
+
|
|
23
|
+
faker.seed(1);
|
|
24
|
+
const generator = faker as any as ValueGenerator;
|
|
25
|
+
|
|
26
|
+
const DefaultStory = ({ value: valueParam }: QueryEditorProps) => {
|
|
27
|
+
const [query, setQuery] = useState(valueParam);
|
|
28
|
+
const [space] = useSpaces();
|
|
29
|
+
const builder = useMemo(() => new QueryBuilder(), []);
|
|
30
|
+
const [filter, setFilter] = useState<Filter.Any>(Filter.everything());
|
|
31
|
+
const objects = useQuery(space, filter).sort(Obj.sort(Obj.sortByTypename, Obj.sortByLabel));
|
|
32
|
+
const model = useGraphModel(space, filter);
|
|
33
|
+
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
if (query) {
|
|
36
|
+
const filter = builder.build(query);
|
|
37
|
+
setFilter(filter ?? Filter.everything());
|
|
38
|
+
} else {
|
|
39
|
+
setFilter(Filter.everything());
|
|
40
|
+
}
|
|
41
|
+
}, [builder, query]);
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<div role='none' className='grid grid-cols-2 grow divide-x divide-subduedSeparator overflow-hidden'>
|
|
45
|
+
<div className='flex flex-col overflow-hidden'>
|
|
46
|
+
<QueryEditor
|
|
47
|
+
classNames='p-2 is-full border-b border-subduedSeparator'
|
|
48
|
+
space={space}
|
|
49
|
+
value={query}
|
|
50
|
+
onChange={setQuery}
|
|
51
|
+
/>
|
|
52
|
+
<div className='bs-full overflow-y-auto'>
|
|
53
|
+
{objects.map((object) => (
|
|
54
|
+
<div
|
|
55
|
+
key={object.id}
|
|
56
|
+
className='grid grid-cols-3 gap-2 p-2 border-b border-subduedSeparator overflow-hidden'
|
|
57
|
+
>
|
|
58
|
+
<span className='truncate text-sm font-mono'>{object.id}</span>
|
|
59
|
+
<span className='truncate text-sm font-mono'>{Obj.getTypename(object)}</span>
|
|
60
|
+
<span className='truncate'>{Obj.getLabel(object)}</span>
|
|
61
|
+
</div>
|
|
62
|
+
))}
|
|
63
|
+
</div>
|
|
64
|
+
<div className='p-2 text-right text-infoText text-xs'>{objects.length}</div>
|
|
65
|
+
</div>
|
|
66
|
+
<D3ForceGraph model={model} />
|
|
67
|
+
</div>
|
|
68
|
+
);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const tags: TagMap = {
|
|
72
|
+
['tag_1' as const]: TagInfo.make({ label: 'Red' }),
|
|
73
|
+
['tag_2' as const]: TagInfo.make({ label: 'Green' }),
|
|
74
|
+
['tag_3' as const]: TagInfo.make({ label: 'Blue' }),
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const meta: Meta<typeof QueryEditor> = {
|
|
78
|
+
title: 'plugins/plugin-assistant/QueryEditor',
|
|
79
|
+
component: QueryEditor,
|
|
80
|
+
render: render(DefaultStory),
|
|
81
|
+
decorators: [
|
|
82
|
+
withTheme,
|
|
83
|
+
withClientProvider({
|
|
84
|
+
types: [DataType.Organization, DataType.Person, DataType.Project, DataType.Employer],
|
|
85
|
+
createIdentity: true,
|
|
86
|
+
onCreateIdentity: async ({ client }) => {
|
|
87
|
+
const space = client.spaces.default;
|
|
88
|
+
const createObjects = createObjectFactory(space.db, generator);
|
|
89
|
+
const objects = await createObjects([
|
|
90
|
+
{ type: DataType.Organization, count: 30 },
|
|
91
|
+
{ type: DataType.Project, count: 20 },
|
|
92
|
+
{ type: DataType.Person, count: 50 },
|
|
93
|
+
]);
|
|
94
|
+
objects.forEach((obj) => {
|
|
95
|
+
Obj.getMeta(obj).tags = faker.helpers.uniqueArray(Object.keys(tags), faker.number.int(3));
|
|
96
|
+
});
|
|
97
|
+
},
|
|
98
|
+
}),
|
|
99
|
+
],
|
|
100
|
+
parameters: {
|
|
101
|
+
layout: 'fullscreen',
|
|
102
|
+
translations,
|
|
103
|
+
},
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
export default meta;
|
|
107
|
+
|
|
108
|
+
type Story = StoryObj<typeof meta>;
|
|
109
|
+
|
|
110
|
+
export const Default: Story = {
|
|
111
|
+
args: {
|
|
112
|
+
value: '(type:dxos.org/type/Person OR type:dxos.org/type/Organization)',
|
|
113
|
+
},
|
|
114
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { Blueprint } from '@dxos/blueprints';
|
|
8
|
+
import { Filter, Obj } from '@dxos/echo';
|
|
9
|
+
import { useQuery } from '@dxos/react-client/echo';
|
|
10
|
+
import { Toolbar, useTranslation } from '@dxos/react-ui';
|
|
11
|
+
import { descriptionMessage, mx } from '@dxos/react-ui-theme';
|
|
12
|
+
|
|
13
|
+
import { TemplateEditor } from '../../components';
|
|
14
|
+
import { meta } from '../../meta';
|
|
15
|
+
|
|
16
|
+
import { type ComponentProps } from './types';
|
|
17
|
+
|
|
18
|
+
export const BlueprintContainer = ({ space }: ComponentProps) => {
|
|
19
|
+
const [blueprint] = useQuery(space, Filter.type(Blueprint.Blueprint));
|
|
20
|
+
const { t } = useTranslation(meta.id);
|
|
21
|
+
|
|
22
|
+
return !blueprint?.instructions ? (
|
|
23
|
+
<p className={mx(descriptionMessage, 'm-trimLg')}>{t('no blueprint message')}</p>
|
|
24
|
+
) : (
|
|
25
|
+
<div className='flex flex-col h-full'>
|
|
26
|
+
<Toolbar.Root classNames='density-coarse border-b border-subduedSeparator'>
|
|
27
|
+
<h2>{Obj.getLabel(blueprint)}</h2>
|
|
28
|
+
<div className='flex-1' />
|
|
29
|
+
<Toolbar.IconButton icon='ph--arrow-clockwise--regular' iconOnly label='Refresh' />
|
|
30
|
+
</Toolbar.Root>
|
|
31
|
+
<TemplateEditor id={blueprint.id} template={blueprint.instructions} />
|
|
32
|
+
</div>
|
|
33
|
+
);
|
|
34
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { useCallback } from 'react';
|
|
6
|
+
|
|
7
|
+
import { Filter } from '@dxos/echo';
|
|
8
|
+
import { useQuery } from '@dxos/react-client/echo';
|
|
9
|
+
import { IconButton, Popover } from '@dxos/react-ui';
|
|
10
|
+
import { StackItem } from '@dxos/react-ui-stack';
|
|
11
|
+
|
|
12
|
+
import { Chat, Toolbar } from '../../components';
|
|
13
|
+
import { useBlueprintRegistry, useChatProcessor, useChatServices } from '../../hooks';
|
|
14
|
+
import { useOnline, usePresets } from '../../hooks';
|
|
15
|
+
import { Assistant } from '../../types';
|
|
16
|
+
|
|
17
|
+
import { ExecutionGraphContainer } from './ExecutionGraphContainer';
|
|
18
|
+
import { type ComponentProps } from './types';
|
|
19
|
+
|
|
20
|
+
export const ChatContainer = ({ space, onEvent }: ComponentProps) => {
|
|
21
|
+
const [online, setOnline] = useOnline();
|
|
22
|
+
const { preset, ...chatProps } = usePresets(online);
|
|
23
|
+
|
|
24
|
+
const chats = useQuery(space, Filter.type(Assistant.Chat));
|
|
25
|
+
const chat = chats.at(-1);
|
|
26
|
+
|
|
27
|
+
const blueprintRegistry = useBlueprintRegistry();
|
|
28
|
+
const services = useChatServices({ space, chat });
|
|
29
|
+
const processor = useChatProcessor({ chat, preset, services, blueprintRegistry });
|
|
30
|
+
|
|
31
|
+
const handleUpdateName = useCallback(() => {
|
|
32
|
+
if (chat) {
|
|
33
|
+
void processor?.updateName(chat);
|
|
34
|
+
}
|
|
35
|
+
}, [processor, chat]);
|
|
36
|
+
|
|
37
|
+
return !chat || !processor ? null : (
|
|
38
|
+
<StackItem.Content toolbar>
|
|
39
|
+
<div role='none' className='flex items-center gap-2 pie-2'>
|
|
40
|
+
<Toolbar classNames='is-min grow' chat={chat} onReset={() => onEvent?.('reset')} />
|
|
41
|
+
<Popover.Root>
|
|
42
|
+
<Popover.Trigger asChild>
|
|
43
|
+
<IconButton icon='ph--sort-ascending--regular' label='Logs' variant='ghost' />
|
|
44
|
+
</Popover.Trigger>
|
|
45
|
+
<Popover.Portal>
|
|
46
|
+
<Popover.Content>
|
|
47
|
+
<ExecutionGraphContainer space={space} />
|
|
48
|
+
<Popover.Arrow />
|
|
49
|
+
</Popover.Content>
|
|
50
|
+
</Popover.Portal>
|
|
51
|
+
</Popover.Root>
|
|
52
|
+
<div className='truncate text-subdued'>{chat.name ?? 'no name'}</div>
|
|
53
|
+
<IconButton icon='ph--arrow-clockwise--regular' iconOnly label='Update name' onClick={handleUpdateName} />
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<div role='none' className='relative'>
|
|
57
|
+
<Chat.Root chat={chat} processor={processor} classNames='absolute inset-0'>
|
|
58
|
+
<Chat.Thread />
|
|
59
|
+
{/* <ChatProgress chat={chat} /> */}
|
|
60
|
+
<div className='flex justify-center p-4'>
|
|
61
|
+
<Chat.Prompt
|
|
62
|
+
{...chatProps}
|
|
63
|
+
outline
|
|
64
|
+
classNames='max-is-prose'
|
|
65
|
+
preset={preset?.id}
|
|
66
|
+
online={online}
|
|
67
|
+
onOnlineChange={setOnline}
|
|
68
|
+
/>
|
|
69
|
+
</div>
|
|
70
|
+
</Chat.Root>
|
|
71
|
+
</div>
|
|
72
|
+
</StackItem.Content>
|
|
73
|
+
);
|
|
74
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { type FC } from 'react';
|
|
6
|
+
|
|
7
|
+
import { Surface } from '@dxos/app-framework';
|
|
8
|
+
import { Filter } from '@dxos/echo';
|
|
9
|
+
import { Chess } from '@dxos/plugin-chess';
|
|
10
|
+
import { useQuery } from '@dxos/react-client/echo';
|
|
11
|
+
|
|
12
|
+
import type { ComponentProps } from './types';
|
|
13
|
+
|
|
14
|
+
export const ChessContainer: FC<ComponentProps> = ({ space }) => {
|
|
15
|
+
const chess = useQuery(space, Filter.type(Chess.Game));
|
|
16
|
+
return <Surface role='section' limit={1} data={{ subject: chess.at(-1) }} />;
|
|
17
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { useMemo } from 'react';
|
|
6
|
+
|
|
7
|
+
import { Surface } from '@dxos/app-framework';
|
|
8
|
+
import { Filter, useQuery } from '@dxos/react-client/echo';
|
|
9
|
+
|
|
10
|
+
import { useContextBinder } from '../../hooks';
|
|
11
|
+
import { Assistant } from '../../types';
|
|
12
|
+
|
|
13
|
+
import { type ComponentProps } from './types';
|
|
14
|
+
|
|
15
|
+
export const CommentsContainer = ({ space }: ComponentProps) => {
|
|
16
|
+
const chats = useQuery(space, Filter.type(Assistant.Chat));
|
|
17
|
+
const binder = useContextBinder(chats.at(-1));
|
|
18
|
+
const object = binder?.objects.value[0]?.target;
|
|
19
|
+
const data = useMemo(() => ({ subject: 'comments', companionTo: object }), [object]);
|
|
20
|
+
if (!object) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return <Surface role='article' data={data} />;
|
|
25
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { Obj, type Relation } from '@dxos/echo';
|
|
8
|
+
import { type ObjectId } from '@dxos/keys';
|
|
9
|
+
|
|
10
|
+
interface DebugCardProps {
|
|
11
|
+
obj: Obj.Any | Relation.Any;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const DebugCard = ({ obj }: DebugCardProps) => {
|
|
15
|
+
return (
|
|
16
|
+
<div className='border border-separator rounded-lg p-4 bg-surface'>
|
|
17
|
+
<div className='flex items-center justify-between mb-2'>
|
|
18
|
+
<h3 className='font-medium text-lg'>{Obj.getLabel(obj)}</h3>
|
|
19
|
+
<p className='flex gap-2 items-center'>
|
|
20
|
+
<span className='text-sm font-mono dx-text-hue' data-hue={colors[insecureIdHash(obj.id, colors.length)]}>
|
|
21
|
+
#{obj.id.slice(-6)}
|
|
22
|
+
</span>
|
|
23
|
+
<span className='text-sm text-description bg-neutral-800 px-2 py-1 rounded'>{Obj.getTypename(obj)}</span>
|
|
24
|
+
</p>
|
|
25
|
+
</div>
|
|
26
|
+
<details className='group'>
|
|
27
|
+
<summary className='cursor-pointer text-sm text-primary hover:text-primaryHover'>View JSON</summary>
|
|
28
|
+
<pre className='mt-2 text-xs p-3 rounded overflow-x-auto'>{JSON.stringify(obj, null, 2)}</pre>
|
|
29
|
+
</details>
|
|
30
|
+
</div>
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const insecureIdHash = (id: ObjectId, modulo: number) => {
|
|
35
|
+
let hash = 0;
|
|
36
|
+
for (let i = 0; i < id.length; i++) {
|
|
37
|
+
const num = id.charCodeAt(i);
|
|
38
|
+
hash = (hash ^ num) | 0;
|
|
39
|
+
}
|
|
40
|
+
return Math.abs(hash) % modulo;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const colors = [
|
|
44
|
+
'red',
|
|
45
|
+
'orange',
|
|
46
|
+
'amber',
|
|
47
|
+
'yellow',
|
|
48
|
+
'lime',
|
|
49
|
+
'green',
|
|
50
|
+
'emerald',
|
|
51
|
+
'teal',
|
|
52
|
+
'cyan',
|
|
53
|
+
'sky',
|
|
54
|
+
'blue',
|
|
55
|
+
'indigo',
|
|
56
|
+
'violet',
|
|
57
|
+
'purple',
|
|
58
|
+
'fuchsia',
|
|
59
|
+
'pink',
|
|
60
|
+
'rose',
|
|
61
|
+
];
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { Filter } from '@dxos/echo';
|
|
8
|
+
import { Obj } from '@dxos/echo';
|
|
9
|
+
import { InvocationTraceStartEvent } from '@dxos/functions';
|
|
10
|
+
import { type Queue, useQuery, useQueue } from '@dxos/react-client/echo';
|
|
11
|
+
import { Timeline, useExecutionGraph } from '@dxos/react-ui-components';
|
|
12
|
+
|
|
13
|
+
import { Assistant } from '../../types';
|
|
14
|
+
|
|
15
|
+
import { type ComponentProps } from './types';
|
|
16
|
+
|
|
17
|
+
export const ExecutionGraphContainer = ({ space, traceQueue }: ComponentProps & { traceQueue?: Queue }) => {
|
|
18
|
+
const chats = useQuery(space, Filter.type(Assistant.Chat));
|
|
19
|
+
const invocations =
|
|
20
|
+
useQueue(space.properties?.invocationTraceQueue?.dxn)?.objects.filter(Obj.instanceOf(InvocationTraceStartEvent)) ??
|
|
21
|
+
[];
|
|
22
|
+
const queue = traceQueue ?? invocations?.at(-1)?.invocationTraceQueue?.target ?? chats.at(-1)?.traceQueue?.target;
|
|
23
|
+
const { branches, commits } = useExecutionGraph(queue);
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<div className='flex flex-col h-full'>
|
|
27
|
+
<Timeline branches={branches} commits={commits} />
|
|
28
|
+
</div>
|
|
29
|
+
);
|
|
30
|
+
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Match from 'effect/Match';
|
|
6
|
+
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
7
|
+
|
|
8
|
+
import { ResearchGraph } from '@dxos/assistant-testing';
|
|
9
|
+
import { Filter, Query } from '@dxos/echo';
|
|
10
|
+
import { QueryBuilder } from '@dxos/echo-query';
|
|
11
|
+
import { D3ForceGraph, useGraphModel } from '@dxos/plugin-explorer';
|
|
12
|
+
import { useQuery } from '@dxos/react-client/echo';
|
|
13
|
+
import { IconButton, Toolbar } from '@dxos/react-ui';
|
|
14
|
+
import { type ChatEditorProps } from '@dxos/react-ui-chat';
|
|
15
|
+
import { type EditorController, QueryEditor } from '@dxos/react-ui-components';
|
|
16
|
+
import { SyntaxHighlighter } from '@dxos/react-ui-syntax-highlighter';
|
|
17
|
+
import { mx } from '@dxos/react-ui-theme';
|
|
18
|
+
|
|
19
|
+
import { useFlush } from '../../hooks';
|
|
20
|
+
|
|
21
|
+
import { type ComponentProps } from './types';
|
|
22
|
+
|
|
23
|
+
export const GraphContainer = ({ space }: ComponentProps) => {
|
|
24
|
+
const [filter, setFilter] = useState<Filter.Any>();
|
|
25
|
+
const [open, setOpen] = useState(false);
|
|
26
|
+
|
|
27
|
+
const [researchGraph] = useQuery(space, Query.type(ResearchGraph));
|
|
28
|
+
const queue = researchGraph?.queue.target;
|
|
29
|
+
|
|
30
|
+
// TODO(burdon): Clean-up API.
|
|
31
|
+
const model = useGraphModel(space, undefined, undefined, queue);
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
model?.setFilter(filter ?? Filter.everything());
|
|
34
|
+
}, [model, filter]);
|
|
35
|
+
|
|
36
|
+
const parser = useMemo(() => new QueryBuilder(), []);
|
|
37
|
+
const handleSubmit = useCallback<NonNullable<ChatEditorProps['onSubmit']>>(
|
|
38
|
+
(text) => {
|
|
39
|
+
// TODO(burdon): Get AST from filter?
|
|
40
|
+
const filter = parser.build(text);
|
|
41
|
+
if (filter) {
|
|
42
|
+
setFilter(filter);
|
|
43
|
+
setOpen(true);
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
[space, parser],
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<div className={mx('relative bs-full grid', open && 'grid-rows-[min-content_1fr]')}>
|
|
51
|
+
<SearchBar space={space} onSubmit={handleSubmit} />
|
|
52
|
+
<D3ForceGraph classNames='min-bs-[50vh]' model={model} />
|
|
53
|
+
|
|
54
|
+
{/* TODO(burdon): Create component with context state for story. */}
|
|
55
|
+
{(open && (
|
|
56
|
+
<div className='absolute left-2 right-2 bottom-2 h-[8rem] flex overflow-hidden bg-baseSurface border border-subduedSeparator'>
|
|
57
|
+
<SyntaxHighlighter language='json' classNames='text-sm'>
|
|
58
|
+
{JSON.stringify({ filter }, null, 2)}
|
|
59
|
+
</SyntaxHighlighter>
|
|
60
|
+
<div className='absolute bottom-1 right-1'>
|
|
61
|
+
<IconButton variant='ghost' icon='ph--x--regular' iconOnly label='Close' onClick={() => setOpen(false)} />
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
)) || (
|
|
65
|
+
<div className='absolute bottom-3 right-3'>
|
|
66
|
+
<IconButton
|
|
67
|
+
variant='ghost'
|
|
68
|
+
icon='ph--arrow-line-up--regular'
|
|
69
|
+
iconOnly
|
|
70
|
+
label='Open'
|
|
71
|
+
onClick={() => setOpen(true)}
|
|
72
|
+
/>
|
|
73
|
+
</div>
|
|
74
|
+
)}
|
|
75
|
+
</div>
|
|
76
|
+
);
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export const SearchBar = ({ space, onSubmit }: ComponentProps & Pick<ChatEditorProps, 'onSubmit'>) => {
|
|
80
|
+
const { state: flushState, handleFlush } = useFlush(space);
|
|
81
|
+
const editorRef = useRef<EditorController>(null);
|
|
82
|
+
|
|
83
|
+
return (
|
|
84
|
+
<Toolbar.Root classNames='density-coarse border-b border-subduedSeparator'>
|
|
85
|
+
<QueryEditor classNames='p-2 is-full border-b border-subduedSeparator' space={space} onChange={onSubmit} />
|
|
86
|
+
<Toolbar.IconButton
|
|
87
|
+
icon='ph--magnifying-glass--regular'
|
|
88
|
+
iconOnly
|
|
89
|
+
label='Search'
|
|
90
|
+
onClick={() => onSubmit?.(editorRef.current?.view?.state.doc.toString() ?? '')}
|
|
91
|
+
/>
|
|
92
|
+
<Toolbar.IconButton
|
|
93
|
+
disabled={flushState === 'flushing'}
|
|
94
|
+
icon={Match.value(flushState).pipe(
|
|
95
|
+
Match.when('idle', () => 'ph--floppy-disk--regular'),
|
|
96
|
+
Match.when('flushing', () => 'ph--spinner--regular'),
|
|
97
|
+
Match.when('flushed', () => 'ph--check--regular'),
|
|
98
|
+
Match.exhaustive,
|
|
99
|
+
)}
|
|
100
|
+
iconOnly
|
|
101
|
+
label='flush'
|
|
102
|
+
onClick={handleFlush}
|
|
103
|
+
/>
|
|
104
|
+
</Toolbar.Root>
|
|
105
|
+
);
|
|
106
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { InvocationTraceContainer } from '@dxos/devtools';
|
|
8
|
+
|
|
9
|
+
import type { ComponentProps } from './types';
|
|
10
|
+
|
|
11
|
+
export const InvocationsContainer = ({ space }: ComponentProps) => {
|
|
12
|
+
return (
|
|
13
|
+
<div className='flex bs-full min-bs-[20rem] items-center justify-center'>
|
|
14
|
+
<InvocationTraceContainer space={space} detailAxis='block' />
|
|
15
|
+
</div>
|
|
16
|
+
);
|
|
17
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { useMemo } from 'react';
|
|
6
|
+
|
|
7
|
+
import { Surface, useCapability } from '@dxos/app-framework';
|
|
8
|
+
import { Filter } from '@dxos/echo';
|
|
9
|
+
import { InboxCapabilities } from '@dxos/plugin-inbox';
|
|
10
|
+
import { Mailbox } from '@dxos/plugin-inbox/types';
|
|
11
|
+
import { fullyQualifiedId, useQuery } from '@dxos/react-client/echo';
|
|
12
|
+
|
|
13
|
+
import { type ComponentProps } from './types';
|
|
14
|
+
|
|
15
|
+
export const MessageContainer = ({ space }: ComponentProps) => {
|
|
16
|
+
const [mailbox] = useQuery(space, Filter.type(Mailbox.Mailbox));
|
|
17
|
+
const state = useCapability(InboxCapabilities.MailboxState);
|
|
18
|
+
const message = mailbox && state[fullyQualifiedId(mailbox)];
|
|
19
|
+
const data = useMemo(() => ({ subject: message ?? 'message', companionTo: mailbox }), [message, mailbox]);
|
|
20
|
+
|
|
21
|
+
return <Surface role='section' data={data} limit={1} />;
|
|
22
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { type FC } from 'react';
|
|
6
|
+
|
|
7
|
+
import { Surface } from '@dxos/app-framework';
|
|
8
|
+
import { Filter } from '@dxos/echo';
|
|
9
|
+
import { useQuery } from '@dxos/react-client/echo';
|
|
10
|
+
import { DataType } from '@dxos/schema';
|
|
11
|
+
|
|
12
|
+
import type { ComponentProps } from './types';
|
|
13
|
+
|
|
14
|
+
export const ProjectContainer: FC<ComponentProps> = ({ space }) => {
|
|
15
|
+
const projects = useQuery(space, Filter.type(DataType.Project));
|
|
16
|
+
return <Surface role='article' limit={1} data={{ subject: projects.at(-1) }} />;
|
|
17
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Predicate from 'effect/Predicate';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
import { Prompt } from '@dxos/blueprints';
|
|
9
|
+
import { Filter } from '@dxos/echo';
|
|
10
|
+
import { type Space, createDocAccessor, useQuery } from '@dxos/react-client/echo';
|
|
11
|
+
import { type ThemedClassName, useThemeContext } from '@dxos/react-ui';
|
|
12
|
+
import {
|
|
13
|
+
createBasicExtensions,
|
|
14
|
+
createDataExtensions,
|
|
15
|
+
createMarkdownExtensions,
|
|
16
|
+
createThemeExtensions,
|
|
17
|
+
useTextEditor,
|
|
18
|
+
} from '@dxos/react-ui-editor';
|
|
19
|
+
import { mx } from '@dxos/react-ui-theme';
|
|
20
|
+
|
|
21
|
+
export const PromptContainer = ({ space }: { space: Space }) => {
|
|
22
|
+
const [prompt] = useQuery(space, Filter.type(Prompt.Prompt));
|
|
23
|
+
if (!prompt) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
return (
|
|
27
|
+
<div style={{ minHeight: '300px' }}>
|
|
28
|
+
<PromptEditor prompt={prompt} />
|
|
29
|
+
</div>
|
|
30
|
+
);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const PromptEditor = ({ prompt, classNames }: ThemedClassName<{ prompt: Prompt.Prompt }>) => {
|
|
34
|
+
const { themeMode } = useThemeContext();
|
|
35
|
+
const { parentRef } = useTextEditor(() => {
|
|
36
|
+
return {
|
|
37
|
+
initialValue: prompt.instructions ?? '',
|
|
38
|
+
extensions: [
|
|
39
|
+
createDataExtensions({ id: prompt.id, text: createDocAccessor(prompt, ['instructions']) }),
|
|
40
|
+
createBasicExtensions({
|
|
41
|
+
bracketMatching: false,
|
|
42
|
+
lineNumbers: true,
|
|
43
|
+
lineWrapping: true,
|
|
44
|
+
}),
|
|
45
|
+
createThemeExtensions({ themeMode }),
|
|
46
|
+
createMarkdownExtensions(),
|
|
47
|
+
].filter(Predicate.isTruthy),
|
|
48
|
+
};
|
|
49
|
+
}, [themeMode, prompt]);
|
|
50
|
+
|
|
51
|
+
return <div ref={parentRef} className={mx('bs-full overflow-hidden', classNames)} />;
|
|
52
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { Filter } from '@dxos/echo';
|
|
8
|
+
import { useQuery, useQueue } from '@dxos/react-client/echo';
|
|
9
|
+
|
|
10
|
+
import { ResearchInputQueue } from '../testing';
|
|
11
|
+
|
|
12
|
+
import { DebugCard } from './DebugCard';
|
|
13
|
+
import type { ComponentProps } from './types';
|
|
14
|
+
|
|
15
|
+
export const ResearchInputStack = ({ space }: ComponentProps) => {
|
|
16
|
+
const [researchInput] = useQuery(space, Filter.type(ResearchInputQueue));
|
|
17
|
+
const queue = useQueue(researchInput?.queue.dxn);
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<div className='p-4 overflow-y-auto h-full'>
|
|
21
|
+
<ul className='space-y-4 '>
|
|
22
|
+
{queue?.objects.map((object) => (
|
|
23
|
+
<li key={object.id}>
|
|
24
|
+
<DebugCard obj={object} />
|
|
25
|
+
</li>
|
|
26
|
+
))}
|
|
27
|
+
</ul>
|
|
28
|
+
</div>
|
|
29
|
+
);
|
|
30
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { Surface } from '@dxos/app-framework';
|
|
8
|
+
import { ResearchGraph } from '@dxos/assistant-testing';
|
|
9
|
+
import { Filter } from '@dxos/echo';
|
|
10
|
+
import { useQuery, useQueue } from '@dxos/react-client/echo';
|
|
11
|
+
|
|
12
|
+
import type { ComponentProps } from './types';
|
|
13
|
+
|
|
14
|
+
export const ResearchOutputStack = ({ space }: ComponentProps) => {
|
|
15
|
+
const [researchGraph] = useQuery(space, Filter.type(ResearchGraph));
|
|
16
|
+
const queue = useQueue(researchGraph?.queue.dxn);
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<div className='p-4 overflow-y-auto h-full'>
|
|
20
|
+
<ul className='space-y-4 '>
|
|
21
|
+
{queue?.objects.map((object) => (
|
|
22
|
+
<li key={object.id}>
|
|
23
|
+
<Surface role='card' data={{ subject: object }} limit={1} />
|
|
24
|
+
</li>
|
|
25
|
+
))}
|
|
26
|
+
</ul>
|
|
27
|
+
</div>
|
|
28
|
+
);
|
|
29
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { Capabilities, useCapability } from '@dxos/app-framework';
|
|
8
|
+
import { Filter } from '@dxos/echo';
|
|
9
|
+
import { ScriptType } from '@dxos/functions';
|
|
10
|
+
import { ScriptCapabilities, ScriptContainer as ScriptContainerComponent, meta } from '@dxos/plugin-script';
|
|
11
|
+
import { type ScriptSettings } from '@dxos/plugin-script/types';
|
|
12
|
+
import { useQuery } from '@dxos/react-client/echo';
|
|
13
|
+
|
|
14
|
+
import { type ComponentProps } from './types';
|
|
15
|
+
|
|
16
|
+
export const ScriptContainer = ({ space }: ComponentProps) => {
|
|
17
|
+
const [script] = useQuery(space, Filter.type(ScriptType));
|
|
18
|
+
const compiler = useCapability(ScriptCapabilities.Compiler);
|
|
19
|
+
const settings = useCapability(Capabilities.SettingsStore).getStore<ScriptSettings>(meta.id)?.value;
|
|
20
|
+
if (!script) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
return (
|
|
24
|
+
<div className='flex is-full bs-[70vh] min-bs-[20rem] overflow-auto'>
|
|
25
|
+
<ScriptContainerComponent role={'section'} script={script} settings={settings} env={compiler.environment} />
|
|
26
|
+
</div>
|
|
27
|
+
);
|
|
28
|
+
};
|