@dxos/plugin-assistant 0.8.4-main.5ea62a8 → 0.8.4-main.72ec0f3
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/BlueprintArticle-IMCR3642.mjs +36 -0
- package/dist/lib/browser/BlueprintArticle-IMCR3642.mjs.map +7 -0
- package/dist/lib/browser/ChatCompanion-JYD2RIBJ.mjs +158 -0
- package/dist/lib/browser/ChatCompanion-JYD2RIBJ.mjs.map +7 -0
- package/dist/lib/browser/{ChatContainer-YBJBIVUZ.mjs → ChatContainer-XCPBWYIR.mjs} +22 -20
- package/dist/lib/browser/ChatContainer-XCPBWYIR.mjs.map +7 -0
- package/dist/lib/browser/{ChatDialog-MTPJLEHM.mjs → ChatDialog-DT7KFCRL.mjs} +12 -11
- package/dist/lib/browser/ChatDialog-DT7KFCRL.mjs.map +7 -0
- package/dist/lib/browser/PromptArticle-45QX25Y5.mjs +59 -0
- package/dist/lib/browser/PromptArticle-45QX25Y5.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-7AAWTWGA.mjs → app-graph-builder-VZEXMDTY.mjs} +67 -21
- package/dist/lib/browser/app-graph-builder-VZEXMDTY.mjs.map +7 -0
- package/dist/lib/browser/{blueprint-definition-CRZPIA5A.mjs → blueprint-definition-5FT5JGPY.mjs} +4 -4
- package/dist/lib/browser/chunk-2BOE3OTW.mjs +262 -0
- package/dist/lib/browser/chunk-2BOE3OTW.mjs.map +7 -0
- package/dist/lib/browser/{chunk-SMIVXXAI.mjs → chunk-BNTPFZ7O.mjs} +51 -24
- package/dist/lib/browser/chunk-BNTPFZ7O.mjs.map +7 -0
- package/dist/lib/browser/chunk-FJQ4ZRYJ.mjs +335 -0
- package/dist/lib/browser/chunk-FJQ4ZRYJ.mjs.map +7 -0
- package/dist/lib/browser/{chunk-OYFQS7JM.mjs → chunk-IXIIS4QA.mjs} +59 -40
- package/dist/lib/browser/chunk-IXIIS4QA.mjs.map +7 -0
- package/dist/lib/browser/{chunk-IJAJRAR7.mjs → chunk-LRE4VEZV.mjs} +2 -4
- package/dist/lib/browser/chunk-LRE4VEZV.mjs.map +7 -0
- package/dist/lib/browser/chunk-U62BTGDF.mjs +1929 -0
- package/dist/lib/browser/chunk-U62BTGDF.mjs.map +7 -0
- package/dist/lib/browser/chunk-WBG5PTSX.mjs +23 -0
- package/dist/lib/browser/chunk-WBG5PTSX.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 +122 -75
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/{intent-resolver-BQO5SVGI.mjs → intent-resolver-AK5O4GUW.mjs} +55 -24
- package/dist/lib/browser/intent-resolver-AK5O4GUW.mjs.map +7 -0
- package/dist/lib/browser/local-model-resolver-34MVHRKD.mjs +17 -0
- package/dist/lib/browser/local-model-resolver-34MVHRKD.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-VNCD2H7C.mjs → react-surface-YCSR2MSR.mjs} +24 -35
- package/dist/lib/browser/react-surface-YCSR2MSR.mjs.map +7 -0
- package/dist/lib/browser/{settings-36V3VUMW.mjs → settings-NYJGNQ5I.mjs} +5 -5
- package/dist/lib/browser/{settings-36V3VUMW.mjs.map → settings-NYJGNQ5I.mjs.map} +1 -1
- package/dist/lib/browser/{state-D5IVKNYG.mjs → state-GG7Z3NB7.mjs} +9 -5
- package/dist/lib/browser/{state-D5IVKNYG.mjs.map → state-GG7Z3NB7.mjs.map} +3 -3
- package/dist/lib/browser/toolkit-VYDAWNE4.mjs +17 -0
- package/dist/lib/browser/toolkit-VYDAWNE4.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +2 -2
- package/dist/lib/node-esm/BlueprintArticle-OL2HUY6Q.mjs +37 -0
- package/dist/lib/node-esm/BlueprintArticle-OL2HUY6Q.mjs.map +7 -0
- package/dist/lib/node-esm/ChatCompanion-AHKJS25S.mjs +159 -0
- package/dist/lib/node-esm/ChatCompanion-AHKJS25S.mjs.map +7 -0
- package/dist/lib/node-esm/{ChatContainer-TUCITJJW.mjs → ChatContainer-K7OGPE3G.mjs} +22 -20
- package/dist/lib/node-esm/ChatContainer-K7OGPE3G.mjs.map +7 -0
- package/dist/lib/node-esm/{ChatDialog-JLM7RDZQ.mjs → ChatDialog-QT6ZBX45.mjs} +12 -11
- package/dist/lib/node-esm/ChatDialog-QT6ZBX45.mjs.map +7 -0
- package/dist/lib/node-esm/PromptArticle-OUKFSJQV.mjs +60 -0
- package/dist/lib/node-esm/PromptArticle-OUKFSJQV.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-PNAFQUYT.mjs → app-graph-builder-VRN6ESRR.mjs} +67 -21
- package/dist/lib/node-esm/app-graph-builder-VRN6ESRR.mjs.map +7 -0
- package/dist/lib/node-esm/{blueprint-definition-275J3XL2.mjs → blueprint-definition-XW6QQVLV.mjs} +4 -4
- package/dist/lib/node-esm/chunk-3Q22TTXW.mjs +264 -0
- package/dist/lib/node-esm/chunk-3Q22TTXW.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-7YOGZI66.mjs → chunk-AB74FOA2.mjs} +51 -24
- package/dist/lib/node-esm/chunk-AB74FOA2.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-BHS747K7.mjs +1930 -0
- package/dist/lib/node-esm/chunk-BHS747K7.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-KJGD4EBJ.mjs +336 -0
- package/dist/lib/node-esm/chunk-KJGD4EBJ.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-CAQKGW3B.mjs → chunk-UXTUHH24.mjs} +59 -40
- package/dist/lib/node-esm/chunk-UXTUHH24.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-WE6KTH72.mjs +25 -0
- package/dist/lib/node-esm/chunk-WE6KTH72.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-YPXEA46Q.mjs → chunk-YWFWT57N.mjs} +2 -4
- package/dist/lib/node-esm/chunk-YWFWT57N.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 +122 -75
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/{intent-resolver-FIS3T5KP.mjs → intent-resolver-L2F3N45L.mjs} +55 -24
- package/dist/lib/node-esm/intent-resolver-L2F3N45L.mjs.map +7 -0
- package/dist/lib/node-esm/local-model-resolver-TP2NTSAX.mjs +18 -0
- package/dist/lib/node-esm/local-model-resolver-TP2NTSAX.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-4NLRKNBU.mjs → react-surface-CTW44GEM.mjs} +24 -35
- package/dist/lib/node-esm/react-surface-CTW44GEM.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-7ZCZ6AS5.mjs → settings-RRHYI5KO.mjs} +5 -5
- package/dist/lib/node-esm/{settings-7ZCZ6AS5.mjs.map → settings-RRHYI5KO.mjs.map} +1 -1
- package/dist/lib/node-esm/{state-4VLKPLW3.mjs → state-FSUHFMDM.mjs} +9 -5
- package/dist/lib/node-esm/{state-4VLKPLW3.mjs.map → state-FSUHFMDM.mjs.map} +3 -3
- package/dist/lib/node-esm/toolkit-HFJZLVIR.mjs +18 -0
- package/dist/lib/node-esm/toolkit-HFJZLVIR.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +2 -2
- 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 +2 -3
- package/dist/types/src/capabilities/ai-service.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +1 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts +2 -11
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/local-model-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/capabilities/toolkit.d.ts +1 -1
- package/dist/types/src/capabilities/toolkit.d.ts.map +1 -1
- package/dist/types/src/components/BlueprintArticle.d.ts +7 -0
- package/dist/types/src/components/BlueprintArticle.d.ts.map +1 -0
- package/dist/types/src/components/Chat/Chat.d.ts +22 -11
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/src/components/Chat/events.d.ts +4 -0
- package/dist/types/src/components/Chat/events.d.ts.map +1 -1
- package/dist/types/src/components/ChatCompanion.d.ts +2 -2
- package/dist/types/src/components/ChatCompanion.d.ts.map +1 -1
- package/dist/types/src/components/ChatContainer.d.ts +7 -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.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.d.ts +10 -8
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +135 -77
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/Link.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/reducers.d.ts +5 -5
- package/dist/types/src/components/ChatThread/reducers.d.ts.map +1 -1
- 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 +42 -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/PromptArticle.d.ts +7 -0
- package/dist/types/src/components/PromptArticle.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +2 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +116 -62
- 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 +116 -62
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/extensions/handlebars-extension.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/extensions/index.d.ts +3 -0
- package/dist/types/src/components/TemplateEditor/extensions/index.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/extensions/xml-extension.d.ts +8 -0
- package/dist/types/src/components/TemplateEditor/extensions/xml-extension.d.ts.map +1 -0
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts +21 -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/Toolbox/Toolbox.d.ts +2 -2
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +116 -62
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +4 -9
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/functions/analysis.d.ts +1 -1
- package/dist/types/src/functions/analysis.d.ts.map +1 -1
- package/dist/types/src/functions/index.d.ts +2 -2
- package/dist/types/src/functions/index.d.ts.map +1 -1
- package/dist/types/src/functions/{list.d.ts → object-list.d.ts} +2 -2
- package/dist/types/src/functions/object-list.d.ts.map +1 -0
- package/dist/types/src/functions/{load.d.ts → object-load.d.ts} +2 -2
- package/dist/types/src/functions/object-load.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +1 -3
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts +2 -1
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatProcessor.d.ts +5 -3
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts +2 -2
- package/dist/types/src/hooks/useChatServices.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatToolbarActions.d.ts +8 -0
- package/dist/types/src/hooks/useChatToolbarActions.d.ts.map +1 -0
- package/dist/types/src/hooks/useContextBinder.d.ts +2 -2
- package/dist/types/src/hooks/useContextBinder.d.ts.map +1 -1
- package/dist/types/src/hooks/useReferencesProvider.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -0
- package/dist/types/src/index.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 +1 -0
- package/dist/types/src/processor/index.d.ts.map +1 -1
- package/dist/types/src/processor/presets.d.ts +1 -1
- package/dist/types/src/processor/presets.d.ts.map +1 -1
- package/dist/types/src/processor/processor.d.ts +17 -23
- package/dist/types/src/processor/processor.d.ts.map +1 -1
- package/dist/types/src/processor/update-name.d.ts +10 -0
- package/dist/types/src/processor/update-name.d.ts.map +1 -0
- package/dist/types/src/queue-logger.d.ts.map +1 -1
- package/dist/types/src/testing/index.d.ts +1 -2
- package/dist/types/src/testing/index.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-services.d.ts +2 -2
- package/dist/types/src/testing/test-services.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +241 -27
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Assistant.d.ts +15 -9
- package/dist/types/src/types/Assistant.d.ts.map +1 -1
- package/dist/types/src/types/AssistantAction.d.ts +33 -8
- package/dist/types/src/types/AssistantAction.d.ts.map +1 -1
- package/dist/types/src/types/service.d.ts +18 -12
- package/dist/types/src/types/service.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +96 -111
- package/src/AssistantPlugin.tsx +154 -129
- package/src/capabilities/ai-service.ts +6 -7
- package/src/capabilities/app-graph-builder.ts +69 -21
- package/src/capabilities/blueprint-definition.ts +39 -15
- package/src/capabilities/capabilities.ts +2 -16
- package/src/capabilities/edge-model-resolver.ts +5 -7
- package/src/capabilities/intent-resolver.ts +69 -16
- package/src/capabilities/local-model-resolver.ts +7 -9
- package/src/capabilities/react-surface.tsx +16 -20
- package/src/capabilities/state.ts +2 -0
- package/src/capabilities/toolkit.ts +9 -155
- package/src/components/BlueprintArticle.tsx +29 -0
- package/src/components/Chat/Chat.tsx +177 -140
- package/src/components/Chat/events.ts +6 -0
- package/src/components/ChatCompanion.tsx +93 -49
- package/src/components/ChatContainer.tsx +27 -17
- package/src/components/ChatDialog.tsx +17 -10
- package/src/components/ChatProgress/ChatProgress.tsx +3 -4
- package/src/components/ChatPrompt/ChatActions.tsx +2 -4
- package/src/components/ChatPrompt/ChatOptions.tsx +40 -45
- package/src/components/ChatPrompt/ChatReferences.tsx +2 -2
- package/src/components/ChatThread/ChatThread.stories.tsx +90 -225
- package/src/components/ChatThread/ChatThread.tsx +59 -51
- package/src/components/ChatThread/Link.tsx +11 -8
- package/src/components/ChatThread/reducers.ts +6 -6
- package/src/components/ChatThread/registry.tsx +174 -0
- package/src/components/ChatThread/sync.test.ts +89 -0
- package/src/components/ChatThread/sync.ts +148 -0
- package/src/components/ChatThread/testing/thread.md +37 -0
- package/src/components/PromptArticle.tsx +51 -0
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +15 -7
- package/src/components/TemplateEditor/TemplateEditor.tsx +20 -11
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +4 -6
- package/src/components/TemplateEditor/TemplateForm.tsx +2 -2
- package/src/components/TemplateEditor/extensions/handlebars-extension.ts +269 -0
- package/src/components/TemplateEditor/extensions/index.ts +6 -0
- package/src/components/TemplateEditor/extensions/xml-extension.ts +64 -0
- package/src/components/{ChatThread → ToolBlock}/ToolBlock.tsx +46 -50
- package/src/components/ToolBlock/ToolBlockWidget.tsx +5 -0
- package/src/components/ToolBlock/index.ts +6 -0
- package/src/components/Toolbox/Toolbox.stories.tsx +5 -8
- package/src/components/Toolbox/Toolbox.tsx +5 -5
- package/src/components/index.ts +2 -5
- package/src/functions/analysis.ts +5 -3
- package/src/functions/index.ts +2 -2
- package/src/functions/{list.ts → object-list.ts} +6 -4
- package/src/functions/{load.ts → object-load.ts} +9 -7
- package/src/hooks/index.ts +1 -3
- package/src/hooks/useBlueprintRegistry.ts +19 -4
- package/src/hooks/useChatProcessor.ts +23 -15
- package/src/hooks/useChatServices.ts +29 -42
- package/src/hooks/useChatToolbarActions.ts +122 -0
- package/src/hooks/useContextBinder.ts +19 -7
- package/src/hooks/useItemTypes.ts +1 -1
- package/src/hooks/useReferencesProvider.ts +2 -1
- package/src/index.ts +2 -0
- package/src/meta.ts +9 -6
- package/src/processor/index.ts +1 -0
- package/src/processor/presets.ts +2 -2
- package/src/processor/processor.test.ts +21 -27
- package/src/processor/processor.ts +47 -74
- package/src/processor/update-name.ts +56 -0
- package/src/queue-logger.ts +9 -13
- package/src/testing/index.ts +1 -2
- package/src/testing/test-generator.ts +261 -0
- package/src/testing/test-services.ts +2 -8
- package/src/translations.ts +26 -18
- package/src/types/Assistant.ts +10 -8
- package/src/types/AssistantAction.ts +23 -6
- package/src/types/service.ts +17 -9
- package/dist/lib/browser/BlueprintContainer-OWUSKPRK.mjs +0 -29
- package/dist/lib/browser/BlueprintContainer-OWUSKPRK.mjs.map +0 -7
- package/dist/lib/browser/ChatCompanion-FRCVSLPP.mjs +0 -126
- package/dist/lib/browser/ChatCompanion-FRCVSLPP.mjs.map +0 -7
- package/dist/lib/browser/ChatContainer-YBJBIVUZ.mjs.map +0 -7
- package/dist/lib/browser/ChatDialog-MTPJLEHM.mjs.map +0 -7
- package/dist/lib/browser/SequenceContainer-TF5QNXYM.mjs +0 -150
- package/dist/lib/browser/SequenceContainer-TF5QNXYM.mjs.map +0 -7
- package/dist/lib/browser/ai-service-NRZPTUHO.mjs +0 -22
- package/dist/lib/browser/ai-service-NRZPTUHO.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-7AAWTWGA.mjs.map +0 -7
- package/dist/lib/browser/chunk-6QMISAU6.mjs +0 -167
- package/dist/lib/browser/chunk-6QMISAU6.mjs.map +0 -7
- package/dist/lib/browser/chunk-CFXXQM25.mjs +0 -182
- package/dist/lib/browser/chunk-CFXXQM25.mjs.map +0 -7
- package/dist/lib/browser/chunk-IJAJRAR7.mjs.map +0 -7
- package/dist/lib/browser/chunk-O4LUJEDV.mjs +0 -20
- package/dist/lib/browser/chunk-O4LUJEDV.mjs.map +0 -7
- package/dist/lib/browser/chunk-OYFQS7JM.mjs.map +0 -7
- package/dist/lib/browser/chunk-SMIVXXAI.mjs.map +0 -7
- package/dist/lib/browser/chunk-V5H5CCZA.mjs +0 -218
- package/dist/lib/browser/chunk-V5H5CCZA.mjs.map +0 -7
- package/dist/lib/browser/chunk-XL557TXF.mjs +0 -2332
- package/dist/lib/browser/chunk-XL557TXF.mjs.map +0 -7
- package/dist/lib/browser/edge-model-resolver-E5M3CC46.mjs +0 -22
- package/dist/lib/browser/edge-model-resolver-E5M3CC46.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-BQO5SVGI.mjs.map +0 -7
- package/dist/lib/browser/local-model-resolver-VZ5WZQIC.mjs +0 -21
- package/dist/lib/browser/local-model-resolver-VZ5WZQIC.mjs.map +0 -7
- package/dist/lib/browser/react-surface-VNCD2H7C.mjs.map +0 -7
- package/dist/lib/browser/toolkit-Y5OYX5PO.mjs +0 -191
- package/dist/lib/browser/toolkit-Y5OYX5PO.mjs.map +0 -7
- package/dist/lib/node-esm/BlueprintContainer-UFVWCRN6.mjs +0 -30
- package/dist/lib/node-esm/BlueprintContainer-UFVWCRN6.mjs.map +0 -7
- package/dist/lib/node-esm/ChatCompanion-ZNRZEKH5.mjs +0 -127
- package/dist/lib/node-esm/ChatCompanion-ZNRZEKH5.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-TUCITJJW.mjs.map +0 -7
- package/dist/lib/node-esm/ChatDialog-JLM7RDZQ.mjs.map +0 -7
- package/dist/lib/node-esm/SequenceContainer-UXOVZPZO.mjs +0 -151
- package/dist/lib/node-esm/SequenceContainer-UXOVZPZO.mjs.map +0 -7
- package/dist/lib/node-esm/ai-service-UDEPIPTO.mjs +0 -23
- package/dist/lib/node-esm/ai-service-UDEPIPTO.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-PNAFQUYT.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2X6VEO32.mjs +0 -2333
- package/dist/lib/node-esm/chunk-2X6VEO32.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7YOGZI66.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CAQKGW3B.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-FNZJJL7G.mjs +0 -183
- package/dist/lib/node-esm/chunk-FNZJJL7G.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-RLBN4RNR.mjs +0 -168
- package/dist/lib/node-esm/chunk-RLBN4RNR.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UWUUZQWJ.mjs +0 -219
- package/dist/lib/node-esm/chunk-UWUUZQWJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-VFY2JG62.mjs +0 -22
- package/dist/lib/node-esm/chunk-VFY2JG62.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YPXEA46Q.mjs.map +0 -7
- package/dist/lib/node-esm/edge-model-resolver-SZHDLXCT.mjs +0 -23
- package/dist/lib/node-esm/edge-model-resolver-SZHDLXCT.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-FIS3T5KP.mjs.map +0 -7
- package/dist/lib/node-esm/local-model-resolver-2KCBKMYA.mjs +0 -22
- package/dist/lib/node-esm/local-model-resolver-2KCBKMYA.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-4NLRKNBU.mjs.map +0 -7
- package/dist/lib/node-esm/toolkit-2F2OL6WB.mjs +0 -192
- package/dist/lib/node-esm/toolkit-2F2OL6WB.mjs.map +0 -7
- package/dist/types/src/components/BlueprintContainer.d.ts +0 -8
- package/dist/types/src/components/BlueprintContainer.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/ChatMessage.d.ts +0 -33
- 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/PromptSettings.d.ts +0 -6
- package/dist/types/src/components/PromptSettings.d.ts.map +0 -1
- package/dist/types/src/components/SequenceContainer.d.ts +0 -8
- package/dist/types/src/components/SequenceContainer.d.ts.map +0 -1
- package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts +0 -13
- package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts.map +0 -1
- package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts +0 -263
- package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts.map +0 -1
- package/dist/types/src/components/SequenceEditor/index.d.ts +0 -2
- package/dist/types/src/components/SequenceEditor/index.d.ts.map +0 -1
- package/dist/types/src/components/TemplateEditor/handlebars-extension.d.ts.map +0 -1
- package/dist/types/src/components/Toolbar/Toolbar.d.ts +0 -4
- package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +0 -1
- package/dist/types/src/components/Toolbar/index.d.ts +0 -2
- package/dist/types/src/components/Toolbar/index.d.ts.map +0 -1
- package/dist/types/src/components/Toolbar/useChatToolbarActions.d.ts +0 -11
- package/dist/types/src/components/Toolbar/useChatToolbarActions.d.ts.map +0 -1
- package/dist/types/src/execution-graph/execution-graph.d.ts +0 -21
- package/dist/types/src/execution-graph/execution-graph.d.ts.map +0 -1
- package/dist/types/src/execution-graph/index.d.ts +0 -2
- package/dist/types/src/execution-graph/index.d.ts.map +0 -1
- package/dist/types/src/functions/list.d.ts.map +0 -1
- package/dist/types/src/functions/load.d.ts.map +0 -1
- package/dist/types/src/hooks/useExecutionGraph.d.ts +0 -7
- package/dist/types/src/hooks/useExecutionGraph.d.ts.map +0 -1
- package/dist/types/src/hooks/useMatcherExtension.d.ts +0 -3
- package/dist/types/src/hooks/useMatcherExtension.d.ts.map +0 -1
- package/dist/types/src/hooks/useResolveRef.d.ts +0 -4
- package/dist/types/src/hooks/useResolveRef.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/stories/Chat.stories.d.ts +0 -26
- package/dist/types/src/stories/Chat.stories.d.ts.map +0 -1
- package/dist/types/src/stories/components/BlueprintContainer.d.ts +0 -4
- package/dist/types/src/stories/components/BlueprintContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/ChatContainer.d.ts +0 -4
- package/dist/types/src/stories/components/ChatContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/CommentsContainer.d.ts +0 -4
- package/dist/types/src/stories/components/CommentsContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/GraphContainer.d.ts +0 -6
- package/dist/types/src/stories/components/GraphContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/LoggingContainer.d.ts +0 -4
- package/dist/types/src/stories/components/LoggingContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/MessageContainer.d.ts +0 -4
- package/dist/types/src/stories/components/MessageContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/SurfaceContainer.d.ts +0 -8
- package/dist/types/src/stories/components/SurfaceContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/TasksContainer.d.ts +0 -4
- package/dist/types/src/stories/components/TasksContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/TokenManagerContainer.d.ts +0 -3
- package/dist/types/src/stories/components/TokenManagerContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/index.d.ts +0 -11
- package/dist/types/src/stories/components/index.d.ts.map +0 -1
- package/dist/types/src/stories/components/types.d.ts +0 -7
- package/dist/types/src/stories/components/types.d.ts.map +0 -1
- package/dist/types/src/stories/testing/data.d.ts +0 -5
- package/dist/types/src/stories/testing/data.d.ts.map +0 -1
- package/dist/types/src/stories/testing/index.d.ts +0 -3
- package/dist/types/src/stories/testing/index.d.ts.map +0 -1
- package/dist/types/src/stories/testing/testing.d.ts +0 -44
- package/dist/types/src/stories/testing/testing.d.ts.map +0 -1
- package/dist/types/src/testing/test-data.d.ts +0 -4
- package/dist/types/src/testing/test-data.d.ts.map +0 -1
- package/dist/types/src/testing/test-functions.d.ts +0 -6
- package/dist/types/src/testing/test-functions.d.ts.map +0 -1
- package/src/components/BlueprintContainer.tsx +0 -24
- package/src/components/ChatThread/ChatMessage.tsx +0 -334
- package/src/components/PromptSettings.tsx +0 -90
- package/src/components/SequenceContainer.tsx +0 -131
- package/src/components/SequenceEditor/SequenceEditor.stories.tsx +0 -33
- package/src/components/SequenceEditor/SequenceEditor.tsx +0 -50
- package/src/components/SequenceEditor/index.ts +0 -5
- package/src/components/TemplateEditor/handlebars-extension.ts +0 -165
- package/src/components/Toolbar/Toolbar.tsx +0 -20
- package/src/components/Toolbar/index.ts +0 -5
- package/src/components/Toolbar/useChatToolbarActions.ts +0 -125
- package/src/execution-graph/execution-graph.ts +0 -211
- package/src/execution-graph/index.ts +0 -5
- package/src/hooks/useExecutionGraph.ts +0 -20
- package/src/hooks/useMatcherExtension.ts +0 -45
- package/src/hooks/useResolveRef.ts +0 -33
- package/src/parser/filter-generator.test.ts +0 -32
- package/src/parser/filter-generator.ts +0 -76
- 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 -36
- package/src/stories/Chat.stories.tsx +0 -469
- package/src/stories/components/BlueprintContainer.tsx +0 -32
- package/src/stories/components/ChatContainer.tsx +0 -57
- package/src/stories/components/CommentsContainer.tsx +0 -25
- package/src/stories/components/GraphContainer.tsx +0 -118
- package/src/stories/components/LoggingContainer.tsx +0 -21
- package/src/stories/components/MessageContainer.tsx +0 -27
- package/src/stories/components/SurfaceContainer.tsx +0 -52
- package/src/stories/components/TasksContainer.tsx +0 -49
- package/src/stories/components/TokenManagerContainer.tsx +0 -14
- package/src/stories/components/index.ts +0 -15
- package/src/stories/components/types.ts +0 -11
- package/src/stories/testing/data.ts +0 -142
- package/src/stories/testing/index.ts +0 -6
- package/src/stories/testing/testing.tsx +0 -254
- package/src/testing/test-data.ts +0 -109
- package/src/testing/test-functions.ts +0 -16
- /package/dist/lib/browser/{blueprint-definition-CRZPIA5A.mjs.map → blueprint-definition-5FT5JGPY.mjs.map} +0 -0
- /package/dist/lib/node-esm/{blueprint-definition-275J3XL2.mjs.map → blueprint-definition-XW6QQVLV.mjs.map} +0 -0
- /package/dist/types/src/components/TemplateEditor/{handlebars-extension.d.ts → extensions/handlebars-extension.d.ts} +0 -0
|
@@ -1,32 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,57 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,118 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,52 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
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';
|
|
@@ -1,142 +0,0 @@
|
|
|
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
|
-
};
|