@dxos/plugin-assistant 0.8.4-main.5acf9ea → 0.8.4-main.5ea62a8
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-OWUSKPRK.mjs} +4 -3
- package/dist/lib/browser/ChatCompanion-FRCVSLPP.mjs +126 -0
- package/dist/lib/browser/ChatCompanion-FRCVSLPP.mjs.map +7 -0
- package/dist/lib/browser/{ChatContainer-RP3QEXYX.mjs → ChatContainer-YBJBIVUZ.mjs} +34 -13
- package/dist/lib/browser/ChatContainer-YBJBIVUZ.mjs.map +7 -0
- package/dist/lib/browser/{ChatDialog-ZVLXFHEY.mjs → ChatDialog-MTPJLEHM.mjs} +26 -9
- package/dist/lib/browser/ChatDialog-MTPJLEHM.mjs.map +7 -0
- package/dist/lib/browser/{SequenceContainer-3UDVKWPA.mjs → SequenceContainer-TF5QNXYM.mjs} +5 -17
- package/dist/lib/browser/SequenceContainer-TF5QNXYM.mjs.map +7 -0
- package/dist/lib/browser/ai-service-NRZPTUHO.mjs +22 -0
- package/dist/lib/browser/ai-service-NRZPTUHO.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-builder-XSEOKJLG.mjs → app-graph-builder-7AAWTWGA.mjs} +25 -36
- package/dist/lib/browser/app-graph-builder-7AAWTWGA.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-CRZPIA5A.mjs +12 -0
- package/dist/lib/browser/blueprint-definition-CRZPIA5A.mjs.map +7 -0
- package/dist/lib/browser/chunk-6QMISAU6.mjs +167 -0
- package/dist/lib/browser/chunk-6QMISAU6.mjs.map +7 -0
- package/dist/lib/browser/{chunk-LERGF5YG.mjs → chunk-CFXXQM25.mjs} +96 -22
- package/dist/lib/browser/chunk-CFXXQM25.mjs.map +7 -0
- package/dist/lib/browser/chunk-IJAJRAR7.mjs +18 -0
- package/dist/lib/browser/chunk-IJAJRAR7.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-O4LUJEDV.mjs +20 -0
- package/dist/lib/browser/{chunk-FDCJSQYF.mjs.map → chunk-O4LUJEDV.mjs.map} +2 -2
- package/dist/lib/browser/chunk-OYFQS7JM.mjs +157 -0
- package/dist/lib/browser/chunk-OYFQS7JM.mjs.map +7 -0
- package/dist/lib/browser/chunk-SMIVXXAI.mjs +202 -0
- package/dist/lib/browser/chunk-SMIVXXAI.mjs.map +7 -0
- package/dist/lib/browser/chunk-V5H5CCZA.mjs +218 -0
- package/dist/lib/browser/chunk-V5H5CCZA.mjs.map +7 -0
- package/dist/lib/browser/chunk-XL557TXF.mjs +2332 -0
- package/dist/lib/browser/chunk-XL557TXF.mjs.map +7 -0
- package/dist/lib/browser/edge-model-resolver-E5M3CC46.mjs +22 -0
- package/dist/lib/browser/edge-model-resolver-E5M3CC46.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +134 -59
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/intent-resolver-BQO5SVGI.mjs +112 -0
- package/dist/lib/browser/intent-resolver-BQO5SVGI.mjs.map +7 -0
- package/dist/lib/browser/local-model-resolver-VZ5WZQIC.mjs +21 -0
- package/dist/lib/browser/local-model-resolver-VZ5WZQIC.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-3GYEHQRP.mjs → react-surface-VNCD2H7C.mjs} +25 -66
- package/dist/lib/browser/react-surface-VNCD2H7C.mjs.map +7 -0
- package/dist/lib/browser/{settings-5GTTCVGD.mjs → settings-36V3VUMW.mjs} +6 -5
- package/dist/lib/{node-esm/settings-J2EXEM5H.mjs.map → browser/settings-36V3VUMW.mjs.map} +1 -1
- package/dist/lib/browser/state-D5IVKNYG.mjs +21 -0
- package/dist/lib/browser/state-D5IVKNYG.mjs.map +7 -0
- package/dist/lib/browser/toolkit-Y5OYX5PO.mjs +191 -0
- package/dist/lib/browser/toolkit-Y5OYX5PO.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +7 -4
- package/dist/lib/node-esm/{BlueprintContainer-RGTMNLNX.mjs → BlueprintContainer-UFVWCRN6.mjs} +4 -3
- package/dist/lib/{browser/BlueprintContainer-IZ4AK5EO.mjs.map → node-esm/BlueprintContainer-UFVWCRN6.mjs.map} +1 -1
- package/dist/lib/node-esm/ChatCompanion-ZNRZEKH5.mjs +127 -0
- package/dist/lib/node-esm/ChatCompanion-ZNRZEKH5.mjs.map +7 -0
- package/dist/lib/node-esm/{ChatContainer-W3W6FWV3.mjs → ChatContainer-TUCITJJW.mjs} +34 -13
- package/dist/lib/node-esm/ChatContainer-TUCITJJW.mjs.map +7 -0
- package/dist/lib/node-esm/{ChatDialog-QW4JRKVO.mjs → ChatDialog-JLM7RDZQ.mjs} +26 -9
- package/dist/lib/node-esm/ChatDialog-JLM7RDZQ.mjs.map +7 -0
- package/dist/lib/node-esm/{SequenceContainer-RQQH5XOC.mjs → SequenceContainer-UXOVZPZO.mjs} +5 -17
- package/dist/lib/node-esm/SequenceContainer-UXOVZPZO.mjs.map +7 -0
- package/dist/lib/node-esm/ai-service-UDEPIPTO.mjs +23 -0
- package/dist/lib/node-esm/ai-service-UDEPIPTO.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-builder-PANCJUHV.mjs → app-graph-builder-PNAFQUYT.mjs} +25 -36
- package/dist/lib/node-esm/app-graph-builder-PNAFQUYT.mjs.map +7 -0
- package/dist/lib/node-esm/blueprint-definition-275J3XL2.mjs +13 -0
- package/dist/lib/node-esm/blueprint-definition-275J3XL2.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-2X6VEO32.mjs +2333 -0
- package/dist/lib/node-esm/chunk-2X6VEO32.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-7YOGZI66.mjs +203 -0
- package/dist/lib/node-esm/chunk-7YOGZI66.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-CAQKGW3B.mjs +159 -0
- package/dist/lib/node-esm/chunk-CAQKGW3B.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-MS3PJARN.mjs → chunk-FNZJJL7G.mjs} +96 -22
- package/dist/lib/node-esm/chunk-FNZJJL7G.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-RLBN4RNR.mjs +168 -0
- package/dist/lib/node-esm/chunk-RLBN4RNR.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-UWUUZQWJ.mjs +219 -0
- package/dist/lib/node-esm/chunk-UWUUZQWJ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-VFY2JG62.mjs +22 -0
- package/dist/lib/node-esm/{chunk-QN2H2EHV.mjs.map → chunk-VFY2JG62.mjs.map} +2 -2
- package/dist/lib/node-esm/chunk-YPXEA46Q.mjs +19 -0
- package/dist/lib/node-esm/chunk-YPXEA46Q.mjs.map +7 -0
- package/dist/lib/node-esm/edge-model-resolver-SZHDLXCT.mjs +23 -0
- package/dist/lib/node-esm/edge-model-resolver-SZHDLXCT.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +134 -59
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/intent-resolver-FIS3T5KP.mjs +113 -0
- package/dist/lib/node-esm/intent-resolver-FIS3T5KP.mjs.map +7 -0
- package/dist/lib/node-esm/local-model-resolver-2KCBKMYA.mjs +22 -0
- package/dist/lib/node-esm/local-model-resolver-2KCBKMYA.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-QDQWJ7FZ.mjs → react-surface-4NLRKNBU.mjs} +25 -66
- package/dist/lib/node-esm/react-surface-4NLRKNBU.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-J2EXEM5H.mjs → settings-7ZCZ6AS5.mjs} +6 -5
- package/dist/lib/{browser/settings-5GTTCVGD.mjs.map → node-esm/settings-7ZCZ6AS5.mjs.map} +1 -1
- package/dist/lib/node-esm/state-4VLKPLW3.mjs +22 -0
- package/dist/lib/node-esm/state-4VLKPLW3.mjs.map +7 -0
- package/dist/lib/node-esm/toolkit-2F2OL6WB.mjs +192 -0
- package/dist/lib/node-esm/toolkit-2F2OL6WB.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +7 -4
- package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/ai-service.d.ts +5 -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 +19 -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 +19 -16
- 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/ChatMessage.d.ts +21 -5
- package/dist/types/src/components/ChatThread/ChatMessage.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.d.ts +4 -4
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +108 -30
- 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/ToolBlock.d.ts +12 -12
- package/dist/types/src/components/ChatThread/ToolBlock.d.ts.map +1 -1
- 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/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.map +1 -1
- package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts +257 -2
- 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 +257 -6
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +254 -1
- 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/Toolbar/Toolbar.d.ts +4 -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 +258 -4
- 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/execution-graph/execution-graph.d.ts +21 -0
- package/dist/types/src/execution-graph/execution-graph.d.ts.map +1 -0
- package/dist/types/src/execution-graph/index.d.ts +2 -0
- package/dist/types/src/execution-graph/index.d.ts.map +1 -0
- 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 +10 -3
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts +24 -0
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -0
- package/dist/types/src/hooks/useChatProcessor.d.ts +7 -20
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts +4 -5
- 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/useExecutionGraph.d.ts +7 -0
- package/dist/types/src/hooks/useExecutionGraph.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/useMatcherExtension.d.ts +3 -0
- package/dist/types/src/hooks/useMatcherExtension.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/hooks/useResolveRef.d.ts +4 -0
- package/dist/types/src/hooks/useResolveRef.d.ts.map +1 -0
- package/dist/types/src/parser/filter-generator.d.ts.map +1 -1
- package/dist/types/src/parser/query-parser.d.ts.map +1 -1
- package/dist/types/src/parser/types.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 +2 -2
- package/dist/types/src/processor/presets.d.ts.map +1 -0
- package/dist/types/src/processor/processor.d.ts +80 -0
- package/dist/types/src/processor/processor.d.ts.map +1 -0
- package/dist/types/src/processor/processor.test.d.ts +2 -0
- package/dist/types/src/processor/processor.test.d.ts.map +1 -0
- package/dist/types/src/stories/Chat.stories.d.ts +22 -203
- package/dist/types/src/stories/Chat.stories.d.ts.map +1 -1
- 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/CommentsContainer.d.ts +4 -0
- package/dist/types/src/stories/components/CommentsContainer.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/LoggingContainer.d.ts +4 -0
- package/dist/types/src/stories/components/LoggingContainer.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/SurfaceContainer.d.ts +8 -0
- package/dist/types/src/stories/components/SurfaceContainer.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/index.d.ts +11 -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 +5 -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/testing.d.ts +44 -0
- package/dist/types/src/stories/testing/testing.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +2 -1
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/test-data.d.ts +4 -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-sequence.d.ts +0 -4
- package/dist/types/src/testing/test-sequence.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +26 -11
- 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 +9 -6
- package/dist/types/src/types/service.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +99 -81
- package/src/AssistantPlugin.tsx +52 -16
- package/src/capabilities/ai-service.ts +28 -0
- package/src/capabilities/app-graph-builder.ts +41 -48
- package/src/capabilities/blueprint-definition.ts +42 -0
- package/src/capabilities/capabilities.ts +31 -0
- package/src/capabilities/edge-model-resolver.ts +27 -0
- package/src/capabilities/index.ts +9 -0
- package/src/capabilities/intent-resolver.ts +45 -23
- package/src/capabilities/local-model-resolver.ts +32 -0
- package/src/capabilities/react-surface.tsx +10 -57
- package/src/capabilities/state.ts +20 -0
- package/src/capabilities/toolkit.ts +163 -0
- package/src/components/AssistantSettings/AssistantSettings.tsx +83 -76
- package/src/components/Chat/Chat.tsx +171 -165
- package/src/components/Chat/events.ts +7 -0
- package/src/components/ChatCompanion.tsx +111 -0
- package/src/components/ChatContainer.tsx +19 -13
- package/src/components/ChatDialog.tsx +11 -7
- package/src/components/ChatProgress/ChatProgress.tsx +68 -0
- package/src/components/ChatProgress/index.ts +5 -0
- package/src/components/ChatPrompt/ChatActions.tsx +10 -24
- package/src/components/ChatPrompt/ChatOptions.tsx +233 -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/ChatMessage.tsx +214 -148
- package/src/components/ChatThread/ChatThread.stories.tsx +244 -104
- package/src/components/ChatThread/ChatThread.tsx +44 -22
- package/src/components/ChatThread/Link.tsx +23 -0
- package/src/components/ChatThread/ToolBlock.tsx +103 -77
- package/src/components/ChatThread/reducers.ts +151 -0
- package/src/components/PromptSettings.tsx +1 -0
- package/src/components/SequenceContainer.tsx +27 -28
- package/src/components/SequenceEditor/SequenceEditor.stories.tsx +5 -4
- package/src/components/SequenceEditor/SequenceEditor.tsx +1 -1
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +25 -12
- package/src/components/TemplateEditor/TemplateEditor.tsx +14 -47
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +12 -5
- package/src/components/TemplateEditor/TemplateForm.tsx +3 -1
- package/src/components/TemplateEditor/handlebars-extension.ts +165 -0
- package/src/components/Toolbar/Toolbar.tsx +20 -0
- package/src/components/Toolbar/index.ts +5 -0
- package/src/components/Toolbar/useChatToolbarActions.ts +125 -0
- package/src/components/Toolbox/Toolbox.stories.tsx +10 -16
- package/src/components/Toolbox/Toolbox.tsx +21 -51
- package/src/components/index.ts +3 -4
- package/src/events.ts +2 -2
- package/src/execution-graph/execution-graph.ts +211 -0
- package/src/execution-graph/index.ts +5 -0
- package/src/functions/analysis.ts +20 -0
- package/src/functions/index.ts +7 -0
- package/src/functions/list.ts +46 -0
- package/src/functions/load.ts +43 -0
- package/src/hooks/index.ts +10 -4
- package/src/hooks/useBlueprintRegistry.ts +80 -0
- package/src/hooks/useChatProcessor.ts +20 -97
- package/src/hooks/useChatServices.ts +29 -32
- package/src/hooks/useContextBinder.ts +18 -0
- package/src/hooks/useContextObjects.ts +58 -0
- package/src/hooks/useExecutionGraph.ts +20 -0
- package/src/hooks/useFlush.ts +35 -0
- package/src/hooks/useItemTypes.ts +37 -0
- package/src/hooks/useMatcherExtension.ts +45 -0
- package/src/hooks/useOnline.ts +10 -0
- package/src/hooks/usePresets.ts +44 -0
- package/src/hooks/useReferencesProvider.ts +11 -9
- package/src/hooks/useResolveRef.ts +33 -0
- package/src/meta.ts +1 -1
- package/src/parser/filter-generator.ts +8 -13
- package/src/parser/query-parser.ts +1 -1
- package/src/parser/types.ts +2 -0
- package/src/processor/index.ts +6 -0
- package/src/{hooks → processor}/presets.ts +14 -6
- package/src/processor/processor.test.ts +77 -0
- package/src/processor/processor.ts +304 -0
- package/src/queue-logger.ts +5 -5
- package/src/stories/Chat.stories.tsx +391 -293
- package/src/stories/components/BlueprintContainer.tsx +32 -0
- package/src/stories/components/ChatContainer.tsx +57 -0
- package/src/stories/components/CommentsContainer.tsx +25 -0
- package/src/stories/components/GraphContainer.tsx +118 -0
- package/src/stories/components/LoggingContainer.tsx +21 -0
- package/src/stories/components/MessageContainer.tsx +27 -0
- package/src/stories/components/SurfaceContainer.tsx +52 -0
- package/src/stories/components/TasksContainer.tsx +49 -0
- package/src/stories/components/TokenManagerContainer.tsx +14 -0
- package/src/stories/components/index.ts +15 -0
- package/src/stories/components/types.ts +11 -0
- package/src/stories/testing/data.ts +142 -0
- package/src/stories/testing/index.ts +6 -0
- package/src/stories/testing/testing.tsx +254 -0
- package/src/testing/index.ts +2 -1
- package/src/testing/test-data.ts +109 -0
- package/src/testing/test-functions.ts +8 -3
- package/src/testing/test-sequence.ts +2 -27
- package/src/translations.ts +30 -11
- 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/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-KFXSBNZR.mjs +0 -89
- package/dist/lib/browser/chunk-KFXSBNZR.mjs.map +0 -7
- 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.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.map +0 -7
- package/dist/lib/node-esm/chunk-QN2H2EHV.mjs +0 -41
- 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/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/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/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/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-OWUSKPRK.mjs.map} +0 -0
|
@@ -0,0 +1,32 @@
|
|
|
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 } from '@dxos/react-ui';
|
|
11
|
+
|
|
12
|
+
import { TemplateEditor } from '../../components';
|
|
13
|
+
|
|
14
|
+
import { type ComponentProps } from './types';
|
|
15
|
+
|
|
16
|
+
export const BlueprintContainer = ({ space }: ComponentProps) => {
|
|
17
|
+
const [blueprint] = useQuery(space, Filter.type(Blueprint.Blueprint));
|
|
18
|
+
if (!blueprint?.instructions) {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<div className='flex flex-col h-full'>
|
|
24
|
+
<Toolbar.Root classNames='density-coarse border-b border-subduedSeparator'>
|
|
25
|
+
<h2>{Obj.getLabel(blueprint)}</h2>
|
|
26
|
+
<div className='flex-1' />
|
|
27
|
+
<Toolbar.IconButton icon='ph--arrow-clockwise--regular' iconOnly label='Refresh' />
|
|
28
|
+
</Toolbar.Root>
|
|
29
|
+
<TemplateEditor id={blueprint.id} template={blueprint.instructions} />
|
|
30
|
+
</div>
|
|
31
|
+
);
|
|
32
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { useCallback, useEffect, useState } from 'react';
|
|
6
|
+
|
|
7
|
+
import { Filter } from '@dxos/echo';
|
|
8
|
+
import { useQuery } from '@dxos/react-client/echo';
|
|
9
|
+
import { IconButton } from '@dxos/react-ui';
|
|
10
|
+
|
|
11
|
+
import { Chat, Toolbar } from '../../components';
|
|
12
|
+
import { useBlueprintRegistry, useChatProcessor, useChatServices } from '../../hooks';
|
|
13
|
+
import { useOnline, usePresets } from '../../hooks';
|
|
14
|
+
import { Assistant } from '../../types';
|
|
15
|
+
|
|
16
|
+
import { type ComponentProps } from './types';
|
|
17
|
+
|
|
18
|
+
export const ChatContainer = ({ space, onEvent }: ComponentProps) => {
|
|
19
|
+
const [online, setOnline] = useOnline();
|
|
20
|
+
const { preset, ...chatProps } = usePresets(online);
|
|
21
|
+
|
|
22
|
+
const chats = useQuery(space, Filter.type(Assistant.Chat));
|
|
23
|
+
const [chat, setChat] = useState<Assistant.Chat>();
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
setChat((currentChat) => currentChat ?? chats[0]);
|
|
26
|
+
}, [chat, chats]);
|
|
27
|
+
|
|
28
|
+
const blueprintRegistry = useBlueprintRegistry();
|
|
29
|
+
const services = useChatServices({ space, chat });
|
|
30
|
+
const processor = useChatProcessor({ chat, preset, services, blueprintRegistry });
|
|
31
|
+
|
|
32
|
+
const handleUpdateName = useCallback(() => {
|
|
33
|
+
if (chat) {
|
|
34
|
+
void processor?.updateName(chat);
|
|
35
|
+
}
|
|
36
|
+
}, [processor, chat]);
|
|
37
|
+
|
|
38
|
+
return !chat || !processor ? null : (
|
|
39
|
+
<>
|
|
40
|
+
<div className='grid grid-cols-[1fr_auto] items-center'>
|
|
41
|
+
<Toolbar chat={chat} onReset={() => onEvent?.('reset')} />
|
|
42
|
+
<div className='flex shrink-0 gap-2 max-w-[20rem] pie-2 items-center'>
|
|
43
|
+
<div className='truncate text-subdued'>{chat.name ?? 'no name'}</div>
|
|
44
|
+
<IconButton icon='ph--arrow-clockwise--regular' iconOnly label='Update name' onClick={handleUpdateName} />
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<Chat.Root chat={chat} processor={processor}>
|
|
49
|
+
<Chat.Thread />
|
|
50
|
+
{/* <ChatProgress chat={chat} /> */}
|
|
51
|
+
<div className='p-4'>
|
|
52
|
+
<Chat.Prompt {...chatProps} outline preset={preset?.id} online={online} onOnlineChange={setOnline} />
|
|
53
|
+
</div>
|
|
54
|
+
</Chat.Root>
|
|
55
|
+
</>
|
|
56
|
+
);
|
|
57
|
+
};
|
|
@@ -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,118 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Match } from 'effect';
|
|
6
|
+
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
7
|
+
|
|
8
|
+
import { ResearchGraph } from '@dxos/assistant-testing';
|
|
9
|
+
import { Filter, Query } from '@dxos/echo';
|
|
10
|
+
import { D3ForceGraph, useGraphModel } from '@dxos/plugin-explorer';
|
|
11
|
+
import { useQuery } from '@dxos/react-client/echo';
|
|
12
|
+
import { IconButton, Toolbar } from '@dxos/react-ui';
|
|
13
|
+
import { ChatEditor, type ChatEditorController, type ChatEditorProps } from '@dxos/react-ui-chat';
|
|
14
|
+
import { SyntaxHighlighter } from '@dxos/react-ui-syntax-highlighter';
|
|
15
|
+
import { mx } from '@dxos/react-ui-theme';
|
|
16
|
+
|
|
17
|
+
import { useFlush, useMatcherExtension } from '../../hooks';
|
|
18
|
+
import { type Expression, QueryParser, createFilter } from '../../parser';
|
|
19
|
+
|
|
20
|
+
import { type ComponentProps } from './types';
|
|
21
|
+
|
|
22
|
+
export const GraphContainer = ({ space }: ComponentProps) => {
|
|
23
|
+
const [ast, setAst] = useState<Expression | undefined>();
|
|
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
|
+
const model = useGraphModel(space, undefined, undefined, queue);
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
model?.setFilter(filter ?? Filter.everything());
|
|
33
|
+
}, [model, filter]);
|
|
34
|
+
|
|
35
|
+
const handleSubmit = useCallback<NonNullable<ChatEditorProps['onSubmit']>>(
|
|
36
|
+
(text) => {
|
|
37
|
+
try {
|
|
38
|
+
const parser = new QueryParser(text);
|
|
39
|
+
const ast = parser.parse();
|
|
40
|
+
setAst(ast);
|
|
41
|
+
const filter = createFilter(ast);
|
|
42
|
+
setFilter(filter);
|
|
43
|
+
setOpen(true);
|
|
44
|
+
} catch {
|
|
45
|
+
// TODO(mykola): Make hybrid search.
|
|
46
|
+
const filter = Filter.text(text, { type: 'vector' });
|
|
47
|
+
setFilter(filter);
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
[space],
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
return (
|
|
54
|
+
<div className={mx('relative grid h-full', open && 'grid-rows-[min-content_1fr]')}>
|
|
55
|
+
<SearchBar space={space} onSubmit={handleSubmit} />
|
|
56
|
+
<D3ForceGraph model={model} />
|
|
57
|
+
|
|
58
|
+
{/* TODO(burdon): Create component with context state for story. */}
|
|
59
|
+
{(open && (
|
|
60
|
+
<div className='absolute left-2 right-2 bottom-2 h-[8rem] flex overflow-hidden bg-baseSurface border border-subduedSeparator'>
|
|
61
|
+
<SyntaxHighlighter language='json' classNames='text-sm'>
|
|
62
|
+
{JSON.stringify({ ast, filter }, null, 2)}
|
|
63
|
+
</SyntaxHighlighter>
|
|
64
|
+
<div className='absolute bottom-1 right-1'>
|
|
65
|
+
<IconButton variant='ghost' icon='ph--x--regular' iconOnly label='Close' onClick={() => setOpen(false)} />
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
)) || (
|
|
69
|
+
<div className='absolute bottom-3 right-3'>
|
|
70
|
+
<IconButton
|
|
71
|
+
variant='ghost'
|
|
72
|
+
icon='ph--arrow-line-up--regular'
|
|
73
|
+
iconOnly
|
|
74
|
+
label='Open'
|
|
75
|
+
onClick={() => setOpen(true)}
|
|
76
|
+
/>
|
|
77
|
+
</div>
|
|
78
|
+
)}
|
|
79
|
+
</div>
|
|
80
|
+
);
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export const SearchBar = ({ space, onSubmit }: ComponentProps & Pick<ChatEditorProps, 'onSubmit'>) => {
|
|
84
|
+
const { state: flushState, handleFlush } = useFlush(space);
|
|
85
|
+
const extensions = useMatcherExtension(space);
|
|
86
|
+
const editorRef = useRef<ChatEditorController>(null);
|
|
87
|
+
|
|
88
|
+
return (
|
|
89
|
+
<Toolbar.Root classNames='density-coarse border-b border-subduedSeparator'>
|
|
90
|
+
<ChatEditor
|
|
91
|
+
ref={editorRef}
|
|
92
|
+
autoFocus
|
|
93
|
+
placeholder='Search'
|
|
94
|
+
extensions={extensions}
|
|
95
|
+
fireIfEmpty
|
|
96
|
+
onSubmit={onSubmit}
|
|
97
|
+
/>
|
|
98
|
+
<Toolbar.IconButton
|
|
99
|
+
icon='ph--magnifying-glass--regular'
|
|
100
|
+
iconOnly
|
|
101
|
+
label='Search'
|
|
102
|
+
onClick={() => onSubmit?.(editorRef.current?.getText() ?? '')}
|
|
103
|
+
/>
|
|
104
|
+
<Toolbar.IconButton
|
|
105
|
+
disabled={flushState === 'flushing'}
|
|
106
|
+
icon={Match.value(flushState).pipe(
|
|
107
|
+
Match.when('idle', () => 'ph--floppy-disk--regular'),
|
|
108
|
+
Match.when('flushing', () => 'ph--spinner--regular'),
|
|
109
|
+
Match.when('flushed', () => 'ph--check--regular'),
|
|
110
|
+
Match.exhaustive,
|
|
111
|
+
)}
|
|
112
|
+
iconOnly
|
|
113
|
+
label='flush'
|
|
114
|
+
onClick={handleFlush}
|
|
115
|
+
/>
|
|
116
|
+
</Toolbar.Root>
|
|
117
|
+
);
|
|
118
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { Filter } from '@dxos/echo';
|
|
8
|
+
import { useQuery } from '@dxos/react-client/echo';
|
|
9
|
+
import { Timeline } from '@dxos/react-ui-components';
|
|
10
|
+
|
|
11
|
+
import { useExecutionGraph } from '../../hooks';
|
|
12
|
+
import { Assistant } from '../../types';
|
|
13
|
+
|
|
14
|
+
import { type ComponentProps } from './types';
|
|
15
|
+
|
|
16
|
+
export const LoggingContainer = ({ space }: ComponentProps) => {
|
|
17
|
+
const [chat] = useQuery(space, Filter.type(Assistant.Chat));
|
|
18
|
+
const { branches, commits } = useExecutionGraph(chat?.traceQueue, true);
|
|
19
|
+
|
|
20
|
+
return <Timeline branches={branches} commits={commits} />;
|
|
21
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
// TODO(wittjosiah): Fix styles to fill the container.
|
|
22
|
+
return (
|
|
23
|
+
<div className='flex h-[30rem]'>
|
|
24
|
+
<Surface role='article' data={data} limit={1} />
|
|
25
|
+
</div>
|
|
26
|
+
);
|
|
27
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import '@dxos-theme';
|
|
6
|
+
|
|
7
|
+
import React from 'react';
|
|
8
|
+
|
|
9
|
+
import { Surface } from '@dxos/app-framework';
|
|
10
|
+
import { Filter, Obj } from '@dxos/echo';
|
|
11
|
+
import { useQuery } from '@dxos/react-client/echo';
|
|
12
|
+
import { useSignalsMemo } from '@dxos/react-ui';
|
|
13
|
+
import { mx } from '@dxos/react-ui-theme';
|
|
14
|
+
import { isNonNullable } from '@dxos/util';
|
|
15
|
+
|
|
16
|
+
import { useContextBinder } from '../../hooks';
|
|
17
|
+
import { Assistant } from '../../types';
|
|
18
|
+
|
|
19
|
+
import { type ComponentProps } from './types';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Shows the surface relating to the first bound object to the curent chat.
|
|
23
|
+
*/
|
|
24
|
+
export const SurfaceContainer = ({ space, debug }: ComponentProps) => {
|
|
25
|
+
const chats = useQuery(space, Filter.type(Assistant.Chat));
|
|
26
|
+
const binder = useContextBinder(chats.at(-1));
|
|
27
|
+
const objects = useSignalsMemo(
|
|
28
|
+
() => binder?.objects.value.map((ref) => ref.target).filter(isNonNullable) ?? [],
|
|
29
|
+
[binder],
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<div className='flex flex-col bs-full overflow-y-auto divide-y divide-separator'>
|
|
34
|
+
{objects.map((object) => (
|
|
35
|
+
<div key={object.id} className='group contents'>
|
|
36
|
+
{debug && (
|
|
37
|
+
<div
|
|
38
|
+
className={mx(
|
|
39
|
+
'flex gap-2 items-center text-xs justify-center',
|
|
40
|
+
'text-subdued group-first:border-none border-t border-subduedSeparator',
|
|
41
|
+
)}
|
|
42
|
+
>
|
|
43
|
+
<span>{Obj.getTypename(object)}</span>
|
|
44
|
+
<span>{object.id}</span>
|
|
45
|
+
</div>
|
|
46
|
+
)}
|
|
47
|
+
<Surface role='section' limit={1} data={{ subject: object }} />
|
|
48
|
+
</div>
|
|
49
|
+
))}
|
|
50
|
+
</div>
|
|
51
|
+
);
|
|
52
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { Filter, Obj } from '@dxos/echo';
|
|
8
|
+
import { Markdown } from '@dxos/plugin-markdown/types';
|
|
9
|
+
import { createDocAccessor, useQuery } from '@dxos/react-client/echo';
|
|
10
|
+
import { Toolbar, useThemeContext } from '@dxos/react-ui';
|
|
11
|
+
import {
|
|
12
|
+
Editor,
|
|
13
|
+
createBasicExtensions,
|
|
14
|
+
createDataExtensions,
|
|
15
|
+
createMarkdownExtensions,
|
|
16
|
+
createThemeExtensions,
|
|
17
|
+
outliner,
|
|
18
|
+
} from '@dxos/react-ui-editor';
|
|
19
|
+
|
|
20
|
+
import { type ComponentProps } from './types';
|
|
21
|
+
|
|
22
|
+
export const TasksContainer = ({ space }: ComponentProps) => {
|
|
23
|
+
const { themeMode } = useThemeContext();
|
|
24
|
+
const [document] = useQuery(space, Filter.type(Markdown.Document));
|
|
25
|
+
if (!document?.content.target) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<>
|
|
31
|
+
<Toolbar.Root classNames='border-b border-subduedSeparator'>
|
|
32
|
+
<h2>{Obj.getLabel(document)}</h2>
|
|
33
|
+
</Toolbar.Root>
|
|
34
|
+
<Editor
|
|
35
|
+
id={document.id}
|
|
36
|
+
text={document.content.target}
|
|
37
|
+
classNames='h-full p-2 overflow-hidden'
|
|
38
|
+
extensions={[
|
|
39
|
+
// TODO(burdon): Create util.
|
|
40
|
+
createDataExtensions({ id: document.id, text: createDocAccessor(document.content.target, ['content']) }),
|
|
41
|
+
createBasicExtensions({ readOnly: false }),
|
|
42
|
+
createMarkdownExtensions({ themeMode }),
|
|
43
|
+
createThemeExtensions({ themeMode }),
|
|
44
|
+
outliner(),
|
|
45
|
+
]}
|
|
46
|
+
/>
|
|
47
|
+
</>
|
|
48
|
+
);
|
|
49
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { useMemo } from 'react';
|
|
6
|
+
|
|
7
|
+
import { Surface } from '@dxos/app-framework';
|
|
8
|
+
import { meta } from '@dxos/plugin-token-manager';
|
|
9
|
+
|
|
10
|
+
export const TokenManagerContainer = () => {
|
|
11
|
+
const data = useMemo(() => ({ subject: `${meta.id}/space-settings` }), []);
|
|
12
|
+
|
|
13
|
+
return <Surface role='article' data={data} limit={1} />;
|
|
14
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
export * from './types';
|
|
6
|
+
|
|
7
|
+
export * from './BlueprintContainer';
|
|
8
|
+
export * from './ChatContainer';
|
|
9
|
+
export * from './CommentsContainer';
|
|
10
|
+
export * from './GraphContainer';
|
|
11
|
+
export * from './LoggingContainer';
|
|
12
|
+
export * from './MessageContainer';
|
|
13
|
+
export * from './SurfaceContainer';
|
|
14
|
+
export * from './TasksContainer';
|
|
15
|
+
export * from './TokenManagerContainer';
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Live, type Space } from '@dxos/client/echo';
|
|
6
|
+
import { Obj, Relation, type Type } from '@dxos/echo';
|
|
7
|
+
import { invariant } from '@dxos/invariant';
|
|
8
|
+
import { DataType } from '@dxos/schema';
|
|
9
|
+
|
|
10
|
+
// import { faker } from '@dxos/random';
|
|
11
|
+
// import { DataType } from '@dxos/schema';
|
|
12
|
+
// import { type ValueGenerator, createGenerator } from '@dxos/schema/testing';
|
|
13
|
+
// faker.seed(1);
|
|
14
|
+
// const generator = faker as any as ValueGenerator;
|
|
15
|
+
// const objectGenerator = createGenerator(generator, DataType.Organization, { force: true });
|
|
16
|
+
|
|
17
|
+
export const testTypes: Type.Obj.Any[] = [
|
|
18
|
+
DataType.Organization,
|
|
19
|
+
DataType.Person,
|
|
20
|
+
DataType.Employer,
|
|
21
|
+
DataType.HasConnection,
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
const organizations: (Type.Properties<DataType.Organization> & { id: string })[] = [
|
|
25
|
+
{ id: 'dxos', name: 'DXOS', website: 'https://dxos.org' },
|
|
26
|
+
{ id: 'socket_supply', name: 'Socket Supply', website: 'https://socketsupply.com' },
|
|
27
|
+
{ id: 'ink_and_switch', name: 'Ink & Switch', website: 'https://inkandswitch.com' },
|
|
28
|
+
{ id: 'effectful', name: 'Effectful', website: 'https://effect.co' },
|
|
29
|
+
{ id: 'blueyard', name: 'Blue Yard', website: 'https://blueyard.com' },
|
|
30
|
+
{ id: 'backed', name: 'Backed', website: 'https://backed.vc' },
|
|
31
|
+
{ id: 'protocol_labs', name: 'Protocol Labs', website: 'https://protocol.ai' },
|
|
32
|
+
{ id: 'newlab', name: 'Newlab', website: 'https://newlab.com' },
|
|
33
|
+
{ id: 'google', name: 'Google', website: 'https://google.com' },
|
|
34
|
+
{ id: 'microsoft', name: 'Microsoft', website: 'https://microsoft.com' },
|
|
35
|
+
{ id: 'openai', name: 'OpenAI', website: 'https://openai.com' },
|
|
36
|
+
{ id: 'anthropic', name: 'Anthropic', website: 'https://anthropic.com' },
|
|
37
|
+
{ id: 'amazon', name: 'Amazon', website: 'https://amazon.com' },
|
|
38
|
+
{ id: 'deshaw', name: 'D. E. Shaw & Co.', website: 'https://deshaw.com' },
|
|
39
|
+
];
|
|
40
|
+
|
|
41
|
+
const people: (Type.Properties<DataType.Person> & { id: string })[] = [
|
|
42
|
+
{ id: 'rich_burdon', fullName: 'Rich Burdon' },
|
|
43
|
+
{ id: 'josiah_witt', fullName: 'Josiah Witt' },
|
|
44
|
+
{ id: 'dima_dmaretskyi', fullName: 'Dima Maretskyi' },
|
|
45
|
+
{ id: 'chad_fowler', fullName: 'Chad Fowler' },
|
|
46
|
+
{ id: 'ciaran_oleary', fullName: "Ciarán O'Leary" },
|
|
47
|
+
{ id: 'jason_whitmire', fullName: 'Jason Whitmire' },
|
|
48
|
+
{ id: 'alex_brunicki', fullName: 'Alex Brunicki' },
|
|
49
|
+
{ id: 'andre_de_haes', fullName: 'Andre de Haes' },
|
|
50
|
+
{ id: 'scott_cohen', fullName: 'Scott Cohen' },
|
|
51
|
+
{ id: 'juan_benet', fullName: 'Juan Benet' },
|
|
52
|
+
{ id: 'satya_nadella', fullName: 'Satya Nadella' },
|
|
53
|
+
{ id: 'kevin_scott', fullName: 'Kevin Scott' },
|
|
54
|
+
{ id: 'jeff_bezos', fullName: 'Jeff Bezos' },
|
|
55
|
+
];
|
|
56
|
+
|
|
57
|
+
const testObjects: Record<string, any[]> = {
|
|
58
|
+
[DataType.Organization.typename]: organizations,
|
|
59
|
+
[DataType.Person.typename]: people,
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const testRelationships: Record<
|
|
63
|
+
string,
|
|
64
|
+
({
|
|
65
|
+
source: string;
|
|
66
|
+
target: string;
|
|
67
|
+
} & Record<string, any>)[]
|
|
68
|
+
> = {
|
|
69
|
+
[DataType.Employer.typename]: [
|
|
70
|
+
// prettier-ignore
|
|
71
|
+
{ source: 'rich_burdon', target: 'dxos' },
|
|
72
|
+
{ source: 'rich_burdon', target: 'google', active: false }, // TODO(burdon): Should not contribute to force.
|
|
73
|
+
{ source: 'rich_burdon', target: 'deshaw', active: false },
|
|
74
|
+
{ source: 'josiah_witt', target: 'dxos' },
|
|
75
|
+
{ source: 'dima_dmaretskyi', target: 'dxos' },
|
|
76
|
+
{ source: 'chad_fowler', target: 'blueyard' },
|
|
77
|
+
{ source: 'chad_fowler', target: 'microsoft', active: false },
|
|
78
|
+
{ source: 'ciaran_oleary', target: 'blueyard' },
|
|
79
|
+
{ source: 'jason_whitmire', target: 'blueyard' },
|
|
80
|
+
{ source: 'juan_benet', target: 'protocol_labs' },
|
|
81
|
+
{ source: 'alex_brunicki', target: 'backed' },
|
|
82
|
+
{ source: 'andre_de_haes', target: 'backed' },
|
|
83
|
+
{ source: 'scott_cohen', target: 'newlab' },
|
|
84
|
+
{ source: 'satya_nadella', target: 'microsoft' },
|
|
85
|
+
{ source: 'kevin_scott', target: 'microsoft' },
|
|
86
|
+
{ source: 'kevin_scott', target: 'google', active: false },
|
|
87
|
+
{ source: 'jeff_bezos', target: 'amazon' },
|
|
88
|
+
{ source: 'jeff_bezos', target: 'deshaw', active: false },
|
|
89
|
+
],
|
|
90
|
+
|
|
91
|
+
// TODO(burdon): Limit graph view to selected relationship types.
|
|
92
|
+
[DataType.HasConnection.typename]: [
|
|
93
|
+
// prettier-ignore
|
|
94
|
+
{ kind: 'partner', source: 'dxos', target: 'ink_and_switch' },
|
|
95
|
+
{ kind: 'partner', source: 'dxos', target: 'effectful' },
|
|
96
|
+
{ kind: 'partner', source: 'dxos', target: 'socket_supply' },
|
|
97
|
+
|
|
98
|
+
// prettier-ignore
|
|
99
|
+
{ kind: 'investor', source: 'blueyard', target: 'dxos' },
|
|
100
|
+
{ kind: 'investor', source: 'blueyard', target: 'protocol_labs' },
|
|
101
|
+
{ kind: 'investor', source: 'protocol_labs', target: 'dxos' },
|
|
102
|
+
{ kind: 'investor', source: 'backed', target: 'dxos' },
|
|
103
|
+
{ kind: 'investor', source: 'newlab', target: 'dxos' },
|
|
104
|
+
{ kind: 'investor', source: 'microsoft', target: 'openai' },
|
|
105
|
+
{ kind: 'investor', source: 'google', target: 'anthropic' },
|
|
106
|
+
{ kind: 'investor', source: 'amazon', target: 'anthropic' },
|
|
107
|
+
],
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export const addTestData = async (space: Space): Promise<void> => {
|
|
111
|
+
const objectMap = new Map<string, Live<any>>();
|
|
112
|
+
|
|
113
|
+
for (const [typename, objects] of Object.entries(testObjects)) {
|
|
114
|
+
const schema = space.db.graph.schemaRegistry.getSchema(typename);
|
|
115
|
+
invariant(schema, `Schema not found: ${typename}`);
|
|
116
|
+
for (const { id, ...data } of objects) {
|
|
117
|
+
const object = space.db.add(Obj.make(schema, data));
|
|
118
|
+
objectMap.set(id, object);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
for (const [typename, relationships] of Object.entries(testRelationships)) {
|
|
123
|
+
const schema = space.db.graph.schemaRegistry.getSchema(typename);
|
|
124
|
+
invariant(schema, `Schema not found: ${typename}`);
|
|
125
|
+
|
|
126
|
+
for (const { source, target, ...data } of relationships) {
|
|
127
|
+
const sourceObject = objectMap.get(source);
|
|
128
|
+
const targetObject = objectMap.get(target);
|
|
129
|
+
invariant(sourceObject, `Source object not found: ${source}`);
|
|
130
|
+
invariant(targetObject, `Target object not found: ${target}`);
|
|
131
|
+
|
|
132
|
+
space.db.add(
|
|
133
|
+
Relation.make(schema, {
|
|
134
|
+
// TODO(burdon): Test source/target types match.
|
|
135
|
+
[Relation.Source]: sourceObject,
|
|
136
|
+
[Relation.Target]: targetObject,
|
|
137
|
+
...data,
|
|
138
|
+
}),
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
};
|