@dxos/plugin-assistant 0.8.3-staging.0fa589b → 0.8.4-main.28f8d3d
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/{TemplateContainer-QQHVOTSI.mjs → BlueprintContainer-H7H4BQ2C.mjs} +11 -10
- package/dist/lib/browser/BlueprintContainer-H7H4BQ2C.mjs.map +7 -0
- package/dist/lib/browser/ChatContainer-OUVSX5V5.mjs +76 -0
- package/dist/lib/browser/ChatContainer-OUVSX5V5.mjs.map +7 -0
- package/dist/lib/browser/ChatDialog-P4FLEOHG.mjs +86 -0
- package/dist/lib/browser/ChatDialog-P4FLEOHG.mjs.map +7 -0
- package/dist/lib/browser/SequenceContainer-627OQ557.mjs +163 -0
- package/dist/lib/browser/SequenceContainer-627OQ557.mjs.map +7 -0
- package/dist/lib/browser/ai-service-7KJ5LXBT.mjs +22 -0
- package/dist/lib/browser/ai-service-7KJ5LXBT.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-builder-E4H5DCOJ.mjs → app-graph-builder-AVHHQ3KV.mjs} +30 -89
- package/dist/lib/browser/app-graph-builder-AVHHQ3KV.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-CMGIZAOW.mjs +146 -0
- package/dist/lib/browser/blueprint-definition-CMGIZAOW.mjs.map +7 -0
- package/dist/lib/browser/chunk-BRLHDHOF.mjs +244 -0
- package/dist/lib/browser/chunk-BRLHDHOF.mjs.map +7 -0
- package/dist/lib/browser/chunk-HRLMD35M.mjs +191 -0
- package/dist/lib/browser/chunk-HRLMD35M.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-XOZ7YMO3.mjs → chunk-LKP65RPA.mjs} +2 -2
- package/dist/lib/browser/{chunk-JQFUME3B.mjs → chunk-NZDCKQ6W.mjs} +36 -34
- package/dist/lib/browser/chunk-NZDCKQ6W.mjs.map +7 -0
- package/dist/lib/browser/chunk-QB7OVS6Z.mjs +16 -0
- package/dist/lib/browser/chunk-QB7OVS6Z.mjs.map +7 -0
- package/dist/lib/browser/chunk-VEBVAHNM.mjs +2231 -0
- package/dist/lib/browser/chunk-VEBVAHNM.mjs.map +7 -0
- package/dist/lib/browser/edge-model-resolver-2HB4PCWH.mjs +24 -0
- package/dist/lib/browser/edge-model-resolver-2HB4PCWH.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +141 -128
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/intent-resolver-MVOIEJXZ.mjs +81 -0
- package/dist/lib/browser/intent-resolver-MVOIEJXZ.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-LXCNUSZN.mjs → react-surface-4HXS3YLT.mjs} +66 -62
- package/dist/lib/browser/react-surface-4HXS3YLT.mjs.map +7 -0
- package/dist/lib/browser/{settings-XRHXVWGB.mjs → settings-G2EZXMWT.mjs} +7 -6
- package/dist/lib/browser/settings-G2EZXMWT.mjs.map +7 -0
- package/dist/lib/browser/toolkit-IW4FBLLB.mjs +105 -0
- package/dist/lib/browser/toolkit-IW4FBLLB.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +7 -20
- package/dist/lib/node-esm/{TemplateContainer-SOEWY2ZN.mjs → BlueprintContainer-VH4EE4CM.mjs} +11 -10
- package/dist/lib/node-esm/BlueprintContainer-VH4EE4CM.mjs.map +7 -0
- package/dist/lib/node-esm/ChatContainer-D5FABDNE.mjs +77 -0
- package/dist/lib/node-esm/ChatContainer-D5FABDNE.mjs.map +7 -0
- package/dist/lib/node-esm/ChatDialog-NKWVXHJP.mjs +87 -0
- package/dist/lib/node-esm/ChatDialog-NKWVXHJP.mjs.map +7 -0
- package/dist/lib/node-esm/SequenceContainer-EQ5NP2PG.mjs +164 -0
- package/dist/lib/node-esm/SequenceContainer-EQ5NP2PG.mjs.map +7 -0
- package/dist/lib/node-esm/ai-service-LDD32477.mjs +23 -0
- package/dist/lib/node-esm/ai-service-LDD32477.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-builder-3SY5MBIK.mjs → app-graph-builder-RMOUJMMG.mjs} +30 -89
- package/dist/lib/node-esm/app-graph-builder-RMOUJMMG.mjs.map +7 -0
- package/dist/lib/node-esm/blueprint-definition-AEWYMW6I.mjs +147 -0
- package/dist/lib/node-esm/blueprint-definition-AEWYMW6I.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-3SOC5GOP.mjs +2232 -0
- package/dist/lib/node-esm/chunk-3SOC5GOP.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-F7RXCX5Y.mjs +192 -0
- package/dist/lib/node-esm/chunk-F7RXCX5Y.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-OYN6HLXZ.mjs → chunk-GAWXJ7K5.mjs} +36 -34
- package/dist/lib/node-esm/chunk-GAWXJ7K5.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-BB2TAT4P.mjs → chunk-KOC6ESG7.mjs} +2 -2
- package/dist/lib/node-esm/chunk-RD755HN3.mjs +245 -0
- package/dist/lib/node-esm/chunk-RD755HN3.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-X6AANUHZ.mjs +17 -0
- package/dist/lib/node-esm/chunk-X6AANUHZ.mjs.map +7 -0
- package/dist/lib/node-esm/edge-model-resolver-UDDR2IA6.mjs +25 -0
- package/dist/lib/node-esm/edge-model-resolver-UDDR2IA6.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +141 -128
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/intent-resolver-DTDNCX3C.mjs +82 -0
- package/dist/lib/node-esm/intent-resolver-DTDNCX3C.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-7HA5EDWY.mjs → react-surface-V6JNEZVO.mjs} +66 -62
- package/dist/lib/node-esm/react-surface-V6JNEZVO.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-5IAY6BT4.mjs → settings-AIP5FOJG.mjs} +7 -6
- package/dist/lib/node-esm/settings-AIP5FOJG.mjs.map +7 -0
- package/dist/lib/node-esm/toolkit-2VNUL77B.mjs +106 -0
- package/dist/lib/node-esm/toolkit-2VNUL77B.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +7 -20
- 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.map +1 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +3 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/capabilities.d.ts +8 -3
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/edge-model-resolver.d.ts +5 -0
- package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +6 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +2 -2
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/toolkit.d.ts +5 -0
- package/dist/types/src/capabilities/toolkit.d.ts.map +1 -0
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts +2 -2
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +1 -1
- package/dist/types/src/components/BlueprintContainer.d.ts +5 -6
- package/dist/types/src/components/BlueprintContainer.d.ts.map +1 -1
- package/dist/types/src/components/Chat/Chat.d.ts +45 -0
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -0
- package/dist/types/src/components/Chat/events.d.ts +30 -0
- package/dist/types/src/components/Chat/events.d.ts.map +1 -0
- package/dist/types/src/components/Chat/index.d.ts +3 -0
- package/dist/types/src/components/Chat/index.d.ts.map +1 -0
- package/dist/types/src/components/ChatContainer.d.ts +8 -7
- package/dist/types/src/components/ChatContainer.d.ts.map +1 -1
- package/dist/types/src/components/ChatDialog.d.ts +8 -0
- package/dist/types/src/components/ChatDialog.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatActions.d.ts +11 -0
- package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts +13 -0
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatPresets.d.ts +11 -0
- package/dist/types/src/components/ChatPrompt/ChatPresets.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts +11 -0
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts +8 -0
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/index.d.ts +6 -0
- package/dist/types/src/components/ChatPrompt/index.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/ChatMessage.d.ts +18 -0
- package/dist/types/src/components/ChatThread/ChatMessage.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/ChatThread.d.ts +19 -0
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +226 -0
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -0
- 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 +19 -0
- package/dist/types/src/components/ChatThread/ToolBlock.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/index.d.ts +2 -0
- package/dist/types/src/components/ChatThread/index.d.ts.map +1 -0
- package/dist/types/src/components/{Thread → ChatThread}/reducer.d.ts +4 -4
- package/dist/types/src/components/ChatThread/reducer.d.ts.map +1 -0
- package/dist/types/src/components/PromptSettings.d.ts +2 -2
- package/dist/types/src/components/PromptSettings.d.ts.map +1 -1
- package/dist/types/src/components/SequenceContainer.d.ts +8 -0
- package/dist/types/src/components/SequenceContainer.d.ts.map +1 -0
- package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts +13 -0
- package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts.map +1 -0
- package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts +8 -0
- package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts.map +1 -0
- package/dist/types/src/components/SequenceEditor/index.d.ts +2 -0
- package/dist/types/src/components/SequenceEditor/index.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +4 -3
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +3 -3
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +5 -4
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
- package/dist/types/src/components/Timeline/Timeline.d.ts +24 -0
- package/dist/types/src/components/Timeline/Timeline.d.ts.map +1 -0
- package/dist/types/src/components/Timeline/Timeline.stories.d.ts +9 -0
- package/dist/types/src/components/Timeline/Timeline.stories.d.ts.map +1 -0
- package/dist/types/src/components/Timeline/index.d.ts +2 -0
- package/dist/types/src/components/Timeline/index.d.ts.map +1 -0
- package/dist/types/src/components/Toolbox/Toolbox.d.ts +10 -6
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +2 -3
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +7 -12
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/events.d.ts +1 -1
- package/dist/types/src/events.d.ts.map +1 -1
- package/dist/types/src/functions/analysis.d.ts +5 -0
- package/dist/types/src/functions/analysis.d.ts.map +1 -0
- package/dist/types/src/functions/index.d.ts +4 -0
- package/dist/types/src/functions/index.d.ts.map +1 -0
- package/dist/types/src/functions/list.d.ts +10 -0
- package/dist/types/src/functions/list.d.ts.map +1 -0
- package/dist/types/src/functions/load.d.ts +8 -0
- package/dist/types/src/functions/load.d.ts.map +1 -0
- package/dist/types/src/hooks/chat-processor.d.ts +72 -0
- package/dist/types/src/hooks/chat-processor.d.ts.map +1 -0
- package/dist/types/src/hooks/errors.d.ts +4 -0
- package/dist/types/src/hooks/errors.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +9 -5
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/presets.d.ts +13 -0
- package/dist/types/src/hooks/presets.d.ts.map +1 -0
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts +21 -0
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -0
- package/dist/types/src/hooks/useChatProcessor.d.ts +16 -11
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts +13 -0
- package/dist/types/src/hooks/useChatServices.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 +7 -0
- package/dist/types/src/hooks/useReferencesProvider.d.ts.map +1 -0
- 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/index.d.ts +1 -1
- package/dist/types/src/parser/index.d.ts.map +1 -1
- package/dist/types/src/parser/query-parser.d.ts.map +1 -1
- package/dist/types/src/queue-logger.d.ts +5 -5
- package/dist/types/src/queue-logger.d.ts.map +1 -1
- package/dist/types/src/stories/Chat.stories.d.ts +268 -0
- package/dist/types/src/stories/Chat.stories.d.ts.map +1 -0
- package/dist/types/src/stories/components/BlueprintContainer.d.ts +5 -0
- package/dist/types/src/stories/components/BlueprintContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/ChatContainer.d.ts +5 -0
- package/dist/types/src/stories/components/ChatContainer.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 +5 -0
- package/dist/types/src/stories/components/LoggingContainer.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 +5 -0
- package/dist/types/src/stories/components/TasksContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/index.d.ts +8 -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/hooks/index.d.ts +3 -0
- package/dist/types/src/stories/hooks/index.d.ts.map +1 -0
- package/dist/types/src/stories/hooks/useFlush.d.ts +6 -0
- package/dist/types/src/stories/hooks/useFlush.d.ts.map +1 -0
- package/dist/types/src/stories/hooks/useMatcherExtension.d.ts +3 -0
- package/dist/types/src/stories/hooks/useMatcherExtension.d.ts.map +1 -0
- package/dist/types/src/stories/testing/data.d.ts +142 -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 +26 -0
- package/dist/types/src/stories/testing/testing.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +1 -1
- package/dist/types/src/testing/index.d.ts.map +1 -1
- 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 +8 -0
- package/dist/types/src/testing/test-sequence.d.ts.map +1 -0
- package/dist/types/src/tools/function.d.ts.map +1 -1
- package/dist/types/src/tools/openapi.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +73 -113
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/{chat.d.ts → Assistant.d.ts} +20 -3
- package/dist/types/src/types/Assistant.d.ts.map +1 -0
- package/dist/types/src/types/AssistantAction.d.ts +90 -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 -3
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/service.d.ts +12 -12
- package/dist/types/src/types/service.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +86 -74
- package/src/AssistantPlugin.tsx +63 -43
- package/src/capabilities/ai-service.ts +28 -0
- package/src/capabilities/app-graph-builder.ts +28 -107
- package/src/capabilities/blueprint-definition.ts +32 -0
- package/src/capabilities/capabilities.ts +12 -5
- package/src/capabilities/edge-model-resolver.ts +29 -0
- package/src/capabilities/index.ts +6 -3
- package/src/capabilities/intent-resolver.ts +40 -12
- package/src/capabilities/react-surface.tsx +54 -46
- package/src/capabilities/settings.ts +3 -3
- package/src/capabilities/toolkit.ts +106 -0
- package/src/components/AssistantSettings/AssistantSettings.tsx +4 -4
- package/src/components/BlueprintContainer.tsx +9 -133
- package/src/components/Chat/Chat.tsx +401 -0
- package/src/components/Chat/events.ts +50 -0
- package/src/components/Chat/index.ts +7 -0
- package/src/components/ChatContainer.tsx +51 -21
- package/src/components/ChatDialog.tsx +68 -0
- package/src/components/ChatPrompt/ChatActions.tsx +71 -0
- package/src/components/ChatPrompt/ChatOptions.tsx +59 -0
- package/src/components/ChatPrompt/ChatPresets.tsx +28 -0
- package/src/components/ChatPrompt/ChatReferences.tsx +55 -0
- package/src/components/ChatPrompt/ChatStatusIndicator.tsx +39 -0
- package/src/components/ChatPrompt/index.ts +9 -0
- package/src/components/ChatThread/ChatMessage.tsx +282 -0
- package/src/components/ChatThread/ChatThread.stories.tsx +260 -0
- package/src/components/ChatThread/ChatThread.tsx +57 -0
- package/src/components/ChatThread/Link.tsx +39 -0
- package/src/components/ChatThread/ToolBlock.tsx +125 -0
- package/src/components/{AmbientDialog → ChatThread}/index.ts +1 -1
- package/src/components/{Thread → ChatThread}/reducer.ts +14 -14
- package/src/components/PromptSettings.tsx +43 -45
- package/src/components/SequenceContainer.tsx +133 -0
- package/src/components/SequenceEditor/SequenceEditor.stories.tsx +33 -0
- package/src/components/{BlueprintEditor/BlueprintEditor.tsx → SequenceEditor/SequenceEditor.tsx} +8 -8
- package/src/components/SequenceEditor/index.ts +5 -0
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +38 -36
- package/src/components/TemplateEditor/TemplateEditor.tsx +41 -25
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +24 -17
- package/src/components/TemplateEditor/TemplateForm.tsx +51 -57
- package/src/components/Timeline/Timeline.stories.tsx +53 -0
- package/src/components/Timeline/Timeline.tsx +159 -0
- package/src/{experimental/transcription → components/Timeline}/index.ts +2 -0
- package/src/components/Toolbox/Toolbox.stories.tsx +9 -16
- package/src/components/Toolbox/Toolbox.tsx +49 -17
- package/src/components/index.ts +4 -8
- package/src/events.ts +3 -3
- package/src/functions/analysis.ts +20 -0
- package/src/functions/index.ts +7 -0
- package/src/functions/list.ts +42 -0
- package/src/functions/load.ts +43 -0
- package/src/hooks/chat-processor.ts +260 -0
- package/src/hooks/errors.ts +8 -0
- package/src/hooks/index.ts +9 -5
- package/src/hooks/presets.ts +53 -0
- package/src/hooks/useBlueprintRegistry.ts +79 -0
- package/src/hooks/useChatProcessor.ts +81 -0
- package/src/hooks/useChatServices.ts +72 -0
- package/src/hooks/useOnline.ts +10 -0
- package/src/hooks/usePresets.ts +45 -0
- package/src/hooks/{useContextProvider.ts → useReferencesProvider.ts} +22 -20
- package/src/hooks/useResolveRef.ts +33 -0
- package/src/parser/filter-generator.ts +6 -13
- package/src/parser/index.ts +1 -1
- package/src/parser/query-parser.ts +1 -1
- package/src/queue-logger.ts +11 -11
- package/src/stories/Chat.stories.tsx +317 -0
- package/src/stories/components/BlueprintContainer.tsx +34 -0
- package/src/stories/components/ChatContainer.tsx +80 -0
- package/src/stories/components/GraphContainer.tsx +118 -0
- package/src/stories/components/LoggingContainer.tsx +22 -0
- package/src/stories/components/SurfaceContainer.tsx +62 -0
- package/src/stories/components/TasksContainer.tsx +51 -0
- package/src/stories/components/index.ts +12 -0
- package/src/stories/components/types.ts +11 -0
- package/src/stories/hooks/index.ts +6 -0
- package/src/stories/hooks/useFlush.ts +35 -0
- package/src/stories/hooks/useMatcherExtension.ts +45 -0
- package/src/stories/{test-data.ts → testing/data.ts} +10 -8
- package/src/stories/testing/index.ts +6 -0
- package/src/stories/testing/testing.tsx +162 -0
- package/src/testing/index.ts +1 -1
- package/src/testing/test-functions.ts +9 -4
- package/src/testing/test-sequence.ts +51 -0
- package/src/tools/function.ts +4 -1
- package/src/tools/openapi.test.ts +14 -12
- package/src/tools/openapi.ts +4 -1
- package/src/translations.ts +46 -28
- package/src/types/Assistant.ts +59 -0
- package/src/types/AssistantAction.ts +54 -0
- package/src/types/defs.ts +5 -0
- package/src/types/index.ts +4 -3
- package/dist/lib/browser/AssistantDialog-MQOOR364.mjs +0 -47
- package/dist/lib/browser/AssistantDialog-MQOOR364.mjs.map +0 -7
- package/dist/lib/browser/BlueprintContainer-AT5Y7EXG.mjs +0 -321
- package/dist/lib/browser/BlueprintContainer-AT5Y7EXG.mjs.map +0 -7
- package/dist/lib/browser/ChatContainer-C2NEAS3A.mjs +0 -40
- package/dist/lib/browser/ChatContainer-C2NEAS3A.mjs.map +0 -7
- package/dist/lib/browser/TemplateContainer-QQHVOTSI.mjs.map +0 -7
- package/dist/lib/browser/ai-client-MK2ZZII2.mjs +0 -39
- package/dist/lib/browser/ai-client-MK2ZZII2.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-E4H5DCOJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-AAOKC2JN.mjs +0 -208
- package/dist/lib/browser/chunk-AAOKC2JN.mjs.map +0 -7
- package/dist/lib/browser/chunk-BI6AHRNJ.mjs +0 -157
- package/dist/lib/browser/chunk-BI6AHRNJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-JO4W3MF7.mjs +0 -2101
- package/dist/lib/browser/chunk-JO4W3MF7.mjs.map +0 -7
- package/dist/lib/browser/chunk-JQFUME3B.mjs.map +0 -7
- package/dist/lib/browser/chunk-MEGMOFJB.mjs +0 -16
- package/dist/lib/browser/chunk-MEGMOFJB.mjs.map +0 -7
- package/dist/lib/browser/chunk-Q6UZ4F3H.mjs +0 -96
- package/dist/lib/browser/chunk-Q6UZ4F3H.mjs.map +0 -7
- package/dist/lib/browser/chunk-UE3IZ4PN.mjs +0 -15
- package/dist/lib/browser/chunk-UE3IZ4PN.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-3UICTGPM.mjs +0 -43
- package/dist/lib/browser/intent-resolver-3UICTGPM.mjs.map +0 -7
- package/dist/lib/browser/react-surface-LXCNUSZN.mjs.map +0 -7
- package/dist/lib/browser/settings-XRHXVWGB.mjs.map +0 -7
- package/dist/lib/node/AssistantDialog-AN4Z6YUV.cjs +0 -73
- package/dist/lib/node/AssistantDialog-AN4Z6YUV.cjs.map +0 -7
- package/dist/lib/node/BlueprintContainer-NOWLDYCZ.cjs +0 -344
- package/dist/lib/node/BlueprintContainer-NOWLDYCZ.cjs.map +0 -7
- package/dist/lib/node/ChatContainer-VKYBQHUB.cjs +0 -68
- package/dist/lib/node/ChatContainer-VKYBQHUB.cjs.map +0 -7
- package/dist/lib/node/TemplateContainer-JZF2DCCG.cjs +0 -58
- package/dist/lib/node/TemplateContainer-JZF2DCCG.cjs.map +0 -7
- package/dist/lib/node/ai-client-7HNSMUMT.cjs +0 -53
- package/dist/lib/node/ai-client-7HNSMUMT.cjs.map +0 -7
- package/dist/lib/node/app-graph-builder-PPR5B5KU.cjs +0 -235
- package/dist/lib/node/app-graph-builder-PPR5B5KU.cjs.map +0 -7
- package/dist/lib/node/chunk-4EEWTDQK.cjs +0 -117
- package/dist/lib/node/chunk-4EEWTDQK.cjs.map +0 -7
- package/dist/lib/node/chunk-FUAGEO7Q.cjs +0 -52
- package/dist/lib/node/chunk-FUAGEO7Q.cjs.map +0 -7
- package/dist/lib/node/chunk-HRNIUYVQ.cjs +0 -128
- package/dist/lib/node/chunk-HRNIUYVQ.cjs.map +0 -7
- package/dist/lib/node/chunk-IKZBMHSW.cjs +0 -184
- package/dist/lib/node/chunk-IKZBMHSW.cjs.map +0 -7
- package/dist/lib/node/chunk-LMDJEGZ2.cjs +0 -233
- package/dist/lib/node/chunk-LMDJEGZ2.cjs.map +0 -7
- package/dist/lib/node/chunk-NIDICM57.cjs +0 -2080
- package/dist/lib/node/chunk-NIDICM57.cjs.map +0 -7
- package/dist/lib/node/chunk-P74TWGMG.cjs +0 -44
- package/dist/lib/node/chunk-P74TWGMG.cjs.map +0 -7
- package/dist/lib/node/chunk-QGPWY6GW.cjs +0 -34
- package/dist/lib/node/chunk-QGPWY6GW.cjs.map +0 -7
- package/dist/lib/node/index.cjs +0 -289
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-QSWGTKON.cjs +0 -58
- package/dist/lib/node/intent-resolver-QSWGTKON.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
- package/dist/lib/node/react-surface-D3NBYRZ6.cjs +0 -172
- package/dist/lib/node/react-surface-D3NBYRZ6.cjs.map +0 -7
- package/dist/lib/node/settings-2JXLKYGE.cjs +0 -36
- package/dist/lib/node/settings-2JXLKYGE.cjs.map +0 -7
- package/dist/lib/node/types/index.cjs +0 -54
- package/dist/lib/node/types/index.cjs.map +0 -7
- package/dist/lib/node-esm/AssistantDialog-6WEMLUPU.mjs +0 -48
- package/dist/lib/node-esm/AssistantDialog-6WEMLUPU.mjs.map +0 -7
- package/dist/lib/node-esm/BlueprintContainer-STOJAVML.mjs +0 -322
- package/dist/lib/node-esm/BlueprintContainer-STOJAVML.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-3MVBTUJN.mjs +0 -41
- package/dist/lib/node-esm/ChatContainer-3MVBTUJN.mjs.map +0 -7
- package/dist/lib/node-esm/TemplateContainer-SOEWY2ZN.mjs.map +0 -7
- package/dist/lib/node-esm/ai-client-XGZBJ6BE.mjs +0 -40
- package/dist/lib/node-esm/ai-client-XGZBJ6BE.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-3SY5MBIK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-34EX6E5Q.mjs +0 -18
- package/dist/lib/node-esm/chunk-34EX6E5Q.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3UEZLJ2V.mjs +0 -16
- package/dist/lib/node-esm/chunk-3UEZLJ2V.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CDAILLCU.mjs +0 -98
- package/dist/lib/node-esm/chunk-CDAILLCU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-J6UXXZGJ.mjs +0 -209
- package/dist/lib/node-esm/chunk-J6UXXZGJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-OD574YIU.mjs +0 -2102
- package/dist/lib/node-esm/chunk-OD574YIU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-OYN6HLXZ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UCOFKNKN.mjs +0 -158
- package/dist/lib/node-esm/chunk-UCOFKNKN.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-E6MXTYAU.mjs +0 -44
- package/dist/lib/node-esm/intent-resolver-E6MXTYAU.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-7HA5EDWY.mjs.map +0 -7
- package/dist/lib/node-esm/settings-5IAY6BT4.mjs.map +0 -7
- package/dist/types/src/capabilities/ai-client.d.ts +0 -5
- package/dist/types/src/capabilities/ai-client.d.ts.map +0 -1
- package/dist/types/src/components/AmbientDialog/AmbientDialog.d.ts +0 -10
- package/dist/types/src/components/AmbientDialog/AmbientDialog.d.ts.map +0 -1
- package/dist/types/src/components/AmbientDialog/AmbientDialog.stories.d.ts +0 -8
- package/dist/types/src/components/AmbientDialog/AmbientDialog.stories.d.ts.map +0 -1
- package/dist/types/src/components/AmbientDialog/index.d.ts +0 -2
- package/dist/types/src/components/AmbientDialog/index.d.ts.map +0 -1
- package/dist/types/src/components/AssistantDialog.d.ts +0 -7
- package/dist/types/src/components/AssistantDialog.d.ts.map +0 -1
- package/dist/types/src/components/BlueprintEditor/BlueprintEditor.d.ts +0 -13
- package/dist/types/src/components/BlueprintEditor/BlueprintEditor.d.ts.map +0 -1
- package/dist/types/src/components/BlueprintEditor/BlueprintEditor.stories.d.ts +0 -8
- package/dist/types/src/components/BlueprintEditor/BlueprintEditor.stories.d.ts.map +0 -1
- package/dist/types/src/components/BlueprintEditor/index.d.ts +0 -2
- package/dist/types/src/components/BlueprintEditor/index.d.ts.map +0 -1
- package/dist/types/src/components/Prompt/Prompt.d.ts +0 -23
- package/dist/types/src/components/Prompt/Prompt.d.ts.map +0 -1
- package/dist/types/src/components/Prompt/Prompt.stories.d.ts +0 -13
- package/dist/types/src/components/Prompt/Prompt.stories.d.ts.map +0 -1
- package/dist/types/src/components/Prompt/PromptBar.d.ts +0 -16
- package/dist/types/src/components/Prompt/PromptBar.d.ts.map +0 -1
- package/dist/types/src/components/Prompt/PromptBar.stories.d.ts +0 -9
- package/dist/types/src/components/Prompt/PromptBar.stories.d.ts.map +0 -1
- package/dist/types/src/components/Prompt/autocomplete.d.ts +0 -25
- package/dist/types/src/components/Prompt/autocomplete.d.ts.map +0 -1
- package/dist/types/src/components/Prompt/index.d.ts +0 -3
- package/dist/types/src/components/Prompt/index.d.ts.map +0 -1
- package/dist/types/src/components/Prompt/references.d.ts +0 -30
- package/dist/types/src/components/Prompt/references.d.ts.map +0 -1
- package/dist/types/src/components/TemplateContainer.d.ts +0 -8
- package/dist/types/src/components/TemplateContainer.d.ts.map +0 -1
- package/dist/types/src/components/Thread/Thread.d.ts +0 -28
- package/dist/types/src/components/Thread/Thread.d.ts.map +0 -1
- package/dist/types/src/components/Thread/Thread.stories.d.ts +0 -11
- package/dist/types/src/components/Thread/Thread.stories.d.ts.map +0 -1
- package/dist/types/src/components/Thread/ThreadContainer.d.ts +0 -13
- package/dist/types/src/components/Thread/ThreadContainer.d.ts.map +0 -1
- package/dist/types/src/components/Thread/ThreadContainer.stories.d.ts +0 -16
- package/dist/types/src/components/Thread/ThreadContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/Thread/ThreadMessage.d.ts +0 -16
- package/dist/types/src/components/Thread/ThreadMessage.d.ts.map +0 -1
- package/dist/types/src/components/Thread/ToolInvocations.d.ts +0 -13
- package/dist/types/src/components/Thread/ToolInvocations.d.ts.map +0 -1
- package/dist/types/src/components/Thread/index.d.ts +0 -3
- package/dist/types/src/components/Thread/index.d.ts.map +0 -1
- package/dist/types/src/components/Thread/reducer.d.ts.map +0 -1
- package/dist/types/src/experimental/transcription/index.d.ts +0 -1
- package/dist/types/src/experimental/transcription/index.d.ts.map +0 -1
- package/dist/types/src/hooks/processor.d.ts +0 -72
- package/dist/types/src/hooks/processor.d.ts.map +0 -1
- package/dist/types/src/hooks/processor.test.d.ts +0 -2
- package/dist/types/src/hooks/processor.test.d.ts.map +0 -1
- package/dist/types/src/hooks/useContextProvider.d.ts +0 -17
- package/dist/types/src/hooks/useContextProvider.d.ts.map +0 -1
- package/dist/types/src/hooks/useMessageQueue.d.ts +0 -42
- package/dist/types/src/hooks/useMessageQueue.d.ts.map +0 -1
- package/dist/types/src/hooks/useServices.d.ts +0 -7
- package/dist/types/src/hooks/useServices.d.ts.map +0 -1
- package/dist/types/src/hooks/useTextInputEvents.d.ts +0 -13
- package/dist/types/src/hooks/useTextInputEvents.d.ts.map +0 -1
- package/dist/types/src/stories/Prompt.stories.d.ts +0 -8
- package/dist/types/src/stories/Prompt.stories.d.ts.map +0 -1
- package/dist/types/src/stories/Query.stories.d.ts +0 -19
- package/dist/types/src/stories/Query.stories.d.ts.map +0 -1
- package/dist/types/src/stories/Research.stories.d.ts +0 -15
- package/dist/types/src/stories/Research.stories.d.ts.map +0 -1
- package/dist/types/src/stories/test-data.d.ts +0 -3
- package/dist/types/src/stories/test-data.d.ts.map +0 -1
- package/dist/types/src/stories/testing.d.ts +0 -12
- package/dist/types/src/stories/testing.d.ts.map +0 -1
- package/dist/types/src/testing/test-blueprint.d.ts +0 -8
- package/dist/types/src/testing/test-blueprint.d.ts.map +0 -1
- package/dist/types/src/types/chat.d.ts.map +0 -1
- package/dist/types/src/types/template.d.ts +0 -56
- package/dist/types/src/types/template.d.ts.map +0 -1
- package/dist/types/src/types/types.d.ts +0 -50
- package/dist/types/src/types/types.d.ts.map +0 -1
- package/src/capabilities/ai-client.ts +0 -42
- package/src/components/AmbientDialog/AmbientDialog.stories.tsx +0 -84
- package/src/components/AmbientDialog/AmbientDialog.tsx +0 -117
- package/src/components/AssistantDialog.tsx +0 -37
- package/src/components/BlueprintEditor/BlueprintEditor.stories.tsx +0 -32
- package/src/components/BlueprintEditor/index.ts +0 -5
- package/src/components/Prompt/Prompt.stories.tsx +0 -121
- package/src/components/Prompt/Prompt.tsx +0 -124
- package/src/components/Prompt/PromptBar.stories.tsx +0 -69
- package/src/components/Prompt/PromptBar.tsx +0 -105
- package/src/components/Prompt/autocomplete.ts +0 -218
- package/src/components/Prompt/index.ts +0 -6
- package/src/components/Prompt/references.ts +0 -180
- package/src/components/TemplateContainer.tsx +0 -23
- package/src/components/Thread/Thread.stories.tsx +0 -201
- package/src/components/Thread/Thread.tsx +0 -118
- package/src/components/Thread/ThreadContainer.stories.tsx +0 -283
- package/src/components/Thread/ThreadContainer.tsx +0 -105
- package/src/components/Thread/ThreadMessage.tsx +0 -234
- package/src/components/Thread/ToolInvocations.tsx +0 -106
- package/src/components/Thread/index.ts +0 -6
- package/src/hooks/processor.test.ts +0 -15
- package/src/hooks/processor.ts +0 -238
- package/src/hooks/useChatProcessor.tsx +0 -97
- package/src/hooks/useMessageQueue.ts +0 -22
- package/src/hooks/useServices.ts +0 -28
- package/src/hooks/useTextInputEvents.ts +0 -49
- package/src/stories/Prompt.stories.tsx +0 -60
- package/src/stories/Query.stories.tsx +0 -514
- package/src/stories/Research.stories.tsx +0 -482
- package/src/stories/testing.ts +0 -60
- package/src/testing/test-blueprint.ts +0 -58
- package/src/types/chat.ts +0 -32
- package/src/types/template.ts +0 -66
- package/src/types/types.ts +0 -48
- /package/dist/lib/browser/{chunk-XOZ7YMO3.mjs.map → chunk-LKP65RPA.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-BB2TAT4P.mjs.map → chunk-KOC6ESG7.mjs.map} +0 -0
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { type AIChatType } from '../types';
|
|
2
|
-
export declare const useMessageQueue: (chat?: AIChatType) => import("@dxos/echo-db").Queue<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
|
|
3
|
-
id: string;
|
|
4
|
-
role: "user" | "assistant";
|
|
5
|
-
content: ({
|
|
6
|
-
pending?: boolean | undefined;
|
|
7
|
-
type: "text";
|
|
8
|
-
disposition?: string | undefined;
|
|
9
|
-
text: string;
|
|
10
|
-
} | {
|
|
11
|
-
pending?: boolean | undefined;
|
|
12
|
-
type: "json";
|
|
13
|
-
disposition?: string | undefined;
|
|
14
|
-
json: string;
|
|
15
|
-
} | {
|
|
16
|
-
pending?: boolean | undefined;
|
|
17
|
-
id?: string | undefined;
|
|
18
|
-
type: "image";
|
|
19
|
-
source?: {
|
|
20
|
-
type: "base64";
|
|
21
|
-
data: string;
|
|
22
|
-
mediaType: string;
|
|
23
|
-
} | undefined;
|
|
24
|
-
} | {
|
|
25
|
-
pending?: boolean | undefined;
|
|
26
|
-
id: string;
|
|
27
|
-
name: string;
|
|
28
|
-
type: "tool_use";
|
|
29
|
-
input: unknown;
|
|
30
|
-
currentStatus?: {
|
|
31
|
-
readonly id: string;
|
|
32
|
-
message: string;
|
|
33
|
-
} | undefined;
|
|
34
|
-
} | {
|
|
35
|
-
pending?: boolean | undefined;
|
|
36
|
-
type: "tool_result";
|
|
37
|
-
content: string;
|
|
38
|
-
toolUseId: string;
|
|
39
|
-
isError?: boolean | undefined;
|
|
40
|
-
})[];
|
|
41
|
-
}> | undefined;
|
|
42
|
-
//# sourceMappingURL=useMessageQueue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useMessageQueue.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useMessageQueue.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,eAAO,MAAM,eAAe,GAAI,OAAO,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAShD,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type Space } from '@dxos/client/echo';
|
|
2
|
-
import { type ServiceType, type ServiceQuery } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* Retrieves matching services from the registry.
|
|
5
|
-
*/
|
|
6
|
-
export declare const useServices: (space: Space, query?: ServiceQuery) => ServiceType[];
|
|
7
|
-
//# sourceMappingURL=useServices.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useServices.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useServices.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG/C,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAE/D;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,KAAK,EAAE,QAAQ,YAAY,KAAG,WAAW,EAa3E,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type KeyboardEventHandler, type ChangeEventHandler } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Hook that handles text input events.
|
|
4
|
-
*/
|
|
5
|
-
export declare const useTextInputEvents: ({ onEnter, onEscape, }: {
|
|
6
|
-
onEnter?: (text: string) => boolean | void;
|
|
7
|
-
onEscape?: () => void;
|
|
8
|
-
}) => (import("react").Dispatch<import("react").SetStateAction<string>> | {
|
|
9
|
-
value: string;
|
|
10
|
-
onKeyDown: KeyboardEventHandler<HTMLInputElement>;
|
|
11
|
-
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
12
|
-
})[];
|
|
13
|
-
//# sourceMappingURL=useTextInputEvents.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useTextInputEvents.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useTextInputEvents.ts"],"names":[],"mappings":"AAIA,OAAO,EAAyB,KAAK,oBAAoB,EAAE,KAAK,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAElG;;GAEG;AAEH,eAAO,MAAM,kBAAkB,GAAI,wBAGhC;IACD,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,GAAG,IAAI,CAAC;IAC3C,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;;;;IAgCA,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import '@dxos-theme';
|
|
2
|
-
import { type Meta, type StoryObj } from '@storybook/react';
|
|
3
|
-
import { PromptBar } from '../components';
|
|
4
|
-
declare const meta: Meta<typeof PromptBar>;
|
|
5
|
-
type Story = StoryObj<typeof PromptBar>;
|
|
6
|
-
export default meta;
|
|
7
|
-
export declare const Default: Story;
|
|
8
|
-
//# sourceMappingURL=Prompt.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Prompt.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/Prompt.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAO5D,OAAO,EAAE,SAAS,EAAuB,MAAM,eAAe,CAAC;AAoB/D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,SAAS,CAkBhC,CAAC;AAEF,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,SAAS,CAAC,CAAC;AAExC,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import '@dxos-theme';
|
|
2
|
-
import { type Meta, type StoryObj } from '@storybook/react';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { type D3ForceGraphProps } from '@dxos/plugin-explorer';
|
|
5
|
-
import { type TypeSpec } from '@dxos/schema/testing';
|
|
6
|
-
type Mode = 'graph' | 'list';
|
|
7
|
-
type StoryProps = {
|
|
8
|
-
mode?: Mode;
|
|
9
|
-
spec?: TypeSpec[];
|
|
10
|
-
} & D3ForceGraphProps;
|
|
11
|
-
declare const DefaultStory: ({ mode, spec, ...props }: StoryProps) => React.JSX.Element;
|
|
12
|
-
declare const meta: Meta<typeof DefaultStory>;
|
|
13
|
-
type Story = StoryObj<typeof DefaultStory>;
|
|
14
|
-
export default meta;
|
|
15
|
-
export declare const Default: Story;
|
|
16
|
-
export declare const WithList: Story;
|
|
17
|
-
export declare const GraphList: Story;
|
|
18
|
-
export declare const Research: Story;
|
|
19
|
-
//# sourceMappingURL=Query.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Query.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/Query.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,KAAqE,MAAM,OAAO,CAAC;AAa1F,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAgB7E,OAAO,EAAuB,KAAK,QAAQ,EAAuB,MAAM,sBAAsB,CAAC;AAwC/F,KAAK,IAAI,GAAG,OAAO,GAAG,MAAM,CAAC;AAE7B,KAAK,UAAU,GAAG;IAAE,IAAI,CAAC,EAAE,IAAI,CAAC;IAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAA;CAAE,GAAG,iBAAiB,CAAC;AAEzE,QAAA,MAAM,YAAY,GAAI,0BAA0B,UAAU,sBA0QzD,CAAC;AAkGF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CA2BnC,CAAC;AAEF,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,YAAY,CAAC,CAAC;AAE3C,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,EAAE,KASrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAQtB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAQvB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAItB,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import '@dxos-theme';
|
|
2
|
-
import { type Meta, type StoryObj } from '@storybook/react';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { Obj } from '@dxos/echo';
|
|
5
|
-
import { type ThreadProps } from '../components';
|
|
6
|
-
type RenderProps = {
|
|
7
|
-
items?: Obj.Any[];
|
|
8
|
-
prompts?: string[];
|
|
9
|
-
} & Pick<ThreadProps, 'debug'>;
|
|
10
|
-
declare const DefaultStory: ({ items: _items, prompts, ...props }: RenderProps) => React.JSX.Element;
|
|
11
|
-
declare const meta: Meta<typeof DefaultStory>;
|
|
12
|
-
export default meta;
|
|
13
|
-
type Story = StoryObj<typeof DefaultStory>;
|
|
14
|
-
export declare const Default: Story;
|
|
15
|
-
//# sourceMappingURL=Research.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Research.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/Research.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAGrB,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,KAAoD,MAAM,OAAO,CAAC;AASzE,OAAO,EAAgB,GAAG,EAAY,MAAM,YAAY,CAAC;AAyBzD,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAQzD,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB,GAAG,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;AAG/B,QAAA,MAAM,YAAY,GAAI,sCAA2C,WAAW,sBA4O3E,CAAC;AAsIF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAuCnC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,YAAY,CAAC,CAAC;AAE3C,eAAO,MAAM,OAAO,EAAE,KASrB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-data.d.ts","sourceRoot":"","sources":["../../../../src/stories/test-data.ts"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,KAAK,EAAE,MAAM,mBAAmB,CAAC;AA2F1D,eAAO,MAAM,WAAW,GAAU,OAAO,KAAK,KAAG,OAAO,CAAC,IAAI,CAgC5D,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import '@dxos-theme';
|
|
2
|
-
import { type Schema } from 'effect';
|
|
3
|
-
import { type ConfigProto } from '@dxos/config';
|
|
4
|
-
import { type IndexConfig } from '@dxos/protocols/proto/dxos/echo/indexing';
|
|
5
|
-
type TestPluginsOptions = {
|
|
6
|
-
config?: ConfigProto;
|
|
7
|
-
types?: Schema.Schema.AnyNoContext[];
|
|
8
|
-
indexConfig?: IndexConfig;
|
|
9
|
-
};
|
|
10
|
-
export declare const testPlugins: ({ config, types, indexConfig }?: TestPluginsOptions) => import("@dxos/app-framework").Plugin[];
|
|
11
|
-
export {};
|
|
12
|
-
//# sourceMappingURL=testing.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../../src/stories/testing.ts"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIrC,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAQhD,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAI5E,KAAK,kBAAkB,GAAG;IAAE,MAAM,CAAC,EAAE,WAAW,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC;IAAC,WAAW,CAAC,EAAE,WAAW,CAAA;CAAE,CAAC;AAEpH,eAAO,MAAM,WAAW,GAAI,iCAA4C,kBAAuB,2CAmC9F,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ToolRegistry } from '@dxos/ai';
|
|
2
|
-
import { type BlueprintDefinition } from '@dxos/assistant';
|
|
3
|
-
import { type Space } from '@dxos/client/echo';
|
|
4
|
-
import { type DXN } from '@dxos/keys';
|
|
5
|
-
export declare const createToolRegistry: (space: Space, queueDxn?: DXN) => ToolRegistry;
|
|
6
|
-
export declare const RESEARCH_BLUEPRINT_DEFINITION: BlueprintDefinition;
|
|
7
|
-
export declare const RESEARCH_BLUEPRINT: import("@dxos/assistant").Blueprint;
|
|
8
|
-
//# sourceMappingURL=test-blueprint.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-blueprint.d.ts","sourceRoot":"","sources":["../../../../src/testing/test-blueprint.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,OAAO,EACL,KAAK,mBAAmB,EAKzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,YAAY,CAAC;AAMtC,eAAO,MAAM,kBAAkB,GAAI,OAAO,KAAK,EAAE,WAAW,GAAG,KAAG,YAiBjE,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAE,mBAgB3C,CAAC;AAEF,eAAO,MAAM,kBAAkB,qCAAgE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../../src/types/chat.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,eAAO,MAAM,UAAU;;;;GAStB,CAAC;AACF,MAAM,WAAW,UAAW,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,UAAU,CAAC;CAAG;AAE5E,eAAO,MAAM,WAAW;;;;;;;;;UASvB,CAAC;AACF,MAAM,WAAW,WAAY,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,WAAW,CAAC;CAAG"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { Schema } from 'effect';
|
|
2
|
-
import { Type } from '@dxos/echo';
|
|
3
|
-
export declare enum TemplateInputType {
|
|
4
|
-
VALUE = 0,
|
|
5
|
-
PASS_THROUGH = 1,
|
|
6
|
-
RETRIEVER = 2,
|
|
7
|
-
FUNCTION = 3,
|
|
8
|
-
QUERY = 4,
|
|
9
|
-
RESOLVER = 5,
|
|
10
|
-
CONTEXT = 6,
|
|
11
|
-
SCHEMA = 7
|
|
12
|
-
}
|
|
13
|
-
export declare const TemplateInputSchema: Schema.mutable<Schema.Struct<{
|
|
14
|
-
name: typeof Schema.String;
|
|
15
|
-
type: Schema.optional<Schema.Enums<typeof TemplateInputType>>;
|
|
16
|
-
value: Schema.optional<typeof Schema.String>;
|
|
17
|
-
}>>;
|
|
18
|
-
export type TemplateInput = Schema.Schema.Type<typeof TemplateInputSchema>;
|
|
19
|
-
export declare const TemplateKinds: readonly ["always", "schema-matching", "automatically", "manual"];
|
|
20
|
-
export type TemplateKind = (typeof TemplateKinds)[number];
|
|
21
|
-
export declare const TemplateKindSchema: Schema.Union<[Schema.Struct<{
|
|
22
|
-
include: Schema.Literal<["always"]>;
|
|
23
|
-
}>, Schema.Struct<{
|
|
24
|
-
include: Schema.Literal<["schema-matching"]>;
|
|
25
|
-
typename: typeof Schema.String;
|
|
26
|
-
}>, Schema.Struct<{
|
|
27
|
-
include: Schema.Literal<["automatically"]>;
|
|
28
|
-
description: typeof Schema.String;
|
|
29
|
-
}>, Schema.Struct<{
|
|
30
|
-
include: Schema.Literal<["manual"]>;
|
|
31
|
-
}>]>;
|
|
32
|
-
export type TemplateKindType = Schema.Schema.Type<typeof TemplateKindSchema>;
|
|
33
|
-
export declare const TemplateType: Type.obj<Schema.Struct<{
|
|
34
|
-
name: Schema.optional<typeof Schema.String>;
|
|
35
|
-
kind: Schema.mutable<Schema.Union<[Schema.Struct<{
|
|
36
|
-
include: Schema.Literal<["always"]>;
|
|
37
|
-
}>, Schema.Struct<{
|
|
38
|
-
include: Schema.Literal<["schema-matching"]>;
|
|
39
|
-
typename: typeof Schema.String;
|
|
40
|
-
}>, Schema.Struct<{
|
|
41
|
-
include: Schema.Literal<["automatically"]>;
|
|
42
|
-
description: typeof Schema.String;
|
|
43
|
-
}>, Schema.Struct<{
|
|
44
|
-
include: Schema.Literal<["manual"]>;
|
|
45
|
-
}>]>>;
|
|
46
|
-
source: typeof Schema.String;
|
|
47
|
-
inputs: Schema.optional<Schema.mutable<Schema.Array$<Schema.mutable<Schema.Struct<{
|
|
48
|
-
name: typeof Schema.String;
|
|
49
|
-
type: Schema.optional<Schema.Enums<typeof TemplateInputType>>;
|
|
50
|
-
value: Schema.optional<typeof Schema.String>;
|
|
51
|
-
}>>>>>;
|
|
52
|
-
command: Schema.optional<typeof Schema.String>;
|
|
53
|
-
}>>;
|
|
54
|
-
export interface TemplateType extends Schema.Schema.Type<typeof TemplateType> {
|
|
55
|
-
}
|
|
56
|
-
//# sourceMappingURL=template.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../../../src/types/template.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAIlC,oBAAY,iBAAiB;IAC3B,KAAK,IAAI;IACT,YAAY,IAAI;IAChB,SAAS,IAAI;IACb,QAAQ,IAAI;IACZ,KAAK,IAAI;IACT,QAAQ,IAAI;IACZ,OAAO,IAAI;IACX,MAAM,IAAI;CACX;AAED,eAAO,MAAM,mBAAmB;;;;GAM/B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAE3E,eAAO,MAAM,aAAa,mEAAoE,CAAC;AAC/F,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1D,eAAO,MAAM,kBAAkB;;;;;;;;;;IAe9B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC7E,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;GAYxB,CAAC;AACF,MAAM,WAAW,YAAa,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,YAAY,CAAC;CAAG"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { Schema } from 'effect';
|
|
2
|
-
export declare namespace AssistantAction {
|
|
3
|
-
const CreateChat_base: Schema.TaggedClass<CreateChat, "dxos.org/plugin/assistant/action/create-chat", {
|
|
4
|
-
readonly _tag: Schema.tag<"dxos.org/plugin/assistant/action/create-chat">;
|
|
5
|
-
} & {
|
|
6
|
-
input: Schema.Struct<{
|
|
7
|
-
space: Schema.Schema<import("@dxos/client-protocol").Space, import("@dxos/client-protocol").Space, never>;
|
|
8
|
-
name: Schema.optional<typeof Schema.String>;
|
|
9
|
-
}>;
|
|
10
|
-
output: Schema.Struct<{
|
|
11
|
-
object: import("@dxos/echo/Type").obj<Schema.Struct<{
|
|
12
|
-
id: import("@dxos/keys").ObjectIdClass;
|
|
13
|
-
name: Schema.optional<typeof Schema.String>;
|
|
14
|
-
queue: import("@dxos/echo/Type").ref<Schema.Schema<import("@dxos/echo-db").Queue<import("@dxos/echo/Obj").Any | import("@dxos/echo/Relation").Any>, import("@dxos/echo-db").Queue<import("@dxos/echo/Obj").Any | import("@dxos/echo/Relation").Any>, never>>;
|
|
15
|
-
}>>;
|
|
16
|
-
}>;
|
|
17
|
-
}>;
|
|
18
|
-
export class CreateChat extends CreateChat_base {
|
|
19
|
-
}
|
|
20
|
-
const CreateBlueprint_base: Schema.TaggedClass<CreateBlueprint, "dxos.org/plugin/assistant/action/create-blueprint", {
|
|
21
|
-
readonly _tag: Schema.tag<"dxos.org/plugin/assistant/action/create-blueprint">;
|
|
22
|
-
} & {
|
|
23
|
-
input: Schema.Struct<{
|
|
24
|
-
name: Schema.optional<typeof Schema.String>;
|
|
25
|
-
}>;
|
|
26
|
-
output: Schema.Struct<{
|
|
27
|
-
object: import("@dxos/echo/Type").obj<Schema.Struct<{
|
|
28
|
-
name: Schema.optional<typeof Schema.String>;
|
|
29
|
-
steps: Schema.Array$<Schema.Struct<{
|
|
30
|
-
id: import("@dxos/keys").ObjectIdClass;
|
|
31
|
-
instructions: typeof Schema.String;
|
|
32
|
-
tools: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
33
|
-
}>>;
|
|
34
|
-
}>>;
|
|
35
|
-
}>;
|
|
36
|
-
}>;
|
|
37
|
-
export class CreateBlueprint extends CreateBlueprint_base {
|
|
38
|
-
}
|
|
39
|
-
export {};
|
|
40
|
-
}
|
|
41
|
-
export declare const LLM_PROVIDERS: readonly ["edge", "ollama", "lmstudio"];
|
|
42
|
-
export declare const AssistantSettingsSchema: Schema.mutable<Schema.Struct<{
|
|
43
|
-
llmProvider: Schema.optional<Schema.Literal<["edge", "ollama", "lmstudio"]>>;
|
|
44
|
-
edgeModel: Schema.optional<typeof Schema.String>;
|
|
45
|
-
ollamaModel: Schema.optional<typeof Schema.String>;
|
|
46
|
-
lmstudioModel: Schema.optional<typeof Schema.String>;
|
|
47
|
-
customPrompts: Schema.optional<typeof Schema.Boolean>;
|
|
48
|
-
}>>;
|
|
49
|
-
export type AssistantSettingsProps = Schema.Schema.Type<typeof AssistantSettingsSchema>;
|
|
50
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAQhC,yBAAiB,eAAe,CAAC;;;;;;;;;;;;;;;;IAG/B,MAAM,OAAO,UAAW,SAAQ,eAQ9B;KAAG;;;;;;;;;;;;;;;;;;IAEL,MAAM,OAAO,eAAgB,SAAQ,oBAOnC;KAAG;;CACN;AAED,eAAO,MAAM,aAAa,yCAA0C,CAAC;AAErE,eAAO,MAAM,uBAAuB;;;;;;GAQnC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { effect, signal } from '@preact/signals-core';
|
|
6
|
-
|
|
7
|
-
import { type AiServiceClient, EdgeAiServiceClient, OllamaAiServiceClient } from '@dxos/ai';
|
|
8
|
-
import { Capabilities, contributes, type PluginContext } from '@dxos/app-framework';
|
|
9
|
-
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
10
|
-
|
|
11
|
-
import { AssistantCapabilities } from './capabilities';
|
|
12
|
-
import { ASSISTANT_PLUGIN } from '../meta';
|
|
13
|
-
import { type AssistantSettingsProps } from '../types';
|
|
14
|
-
|
|
15
|
-
// TODO(wittjosiah): Factor out.
|
|
16
|
-
const DEFAULT_AI_SERVICE_URL = 'http://localhost:8788';
|
|
17
|
-
|
|
18
|
-
export default (context: PluginContext) => {
|
|
19
|
-
const client = context.getCapability(ClientCapabilities.Client);
|
|
20
|
-
const endpoint = client.config.values.runtime?.services?.ai?.server ?? DEFAULT_AI_SERVICE_URL;
|
|
21
|
-
const aiClient = signal<AiServiceClient>(new EdgeAiServiceClient({ endpoint }));
|
|
22
|
-
|
|
23
|
-
const unsubscribe = effect(() => {
|
|
24
|
-
const settings = context
|
|
25
|
-
.getCapability(Capabilities.SettingsStore)
|
|
26
|
-
.getStore<AssistantSettingsProps>(ASSISTANT_PLUGIN)?.value;
|
|
27
|
-
|
|
28
|
-
if (settings?.llmProvider === 'ollama') {
|
|
29
|
-
aiClient.value = new OllamaAiServiceClient();
|
|
30
|
-
} else {
|
|
31
|
-
aiClient.value = new EdgeAiServiceClient({
|
|
32
|
-
endpoint,
|
|
33
|
-
defaultGenerationOptions: {
|
|
34
|
-
// model: '@anthropic/claude-sonnet-4-20250514',
|
|
35
|
-
model: '@anthropic/claude-3-5-haiku-20241022',
|
|
36
|
-
},
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
return contributes(AssistantCapabilities.AiClient, aiClient, () => unsubscribe());
|
|
42
|
-
};
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
|
-
import { type StoryObj, type Meta } from '@storybook/react';
|
|
8
|
-
import React, { useState } from 'react';
|
|
9
|
-
|
|
10
|
-
import { IntentPlugin } from '@dxos/app-framework';
|
|
11
|
-
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
12
|
-
import { Config } from '@dxos/client';
|
|
13
|
-
import { faker } from '@dxos/random';
|
|
14
|
-
import { withClientProvider } from '@dxos/react-client/testing';
|
|
15
|
-
import { Dialog, Toolbar, Button } from '@dxos/react-ui';
|
|
16
|
-
import { withTheme, withLayout } from '@dxos/storybook-utils';
|
|
17
|
-
|
|
18
|
-
import { AmbientDialog } from './AmbientDialog';
|
|
19
|
-
import translations from '../../translations';
|
|
20
|
-
|
|
21
|
-
const meta: Meta<typeof AmbientDialog> = {
|
|
22
|
-
title: 'plugins/plugin-assistant/AmbientDialog',
|
|
23
|
-
component: AmbientDialog,
|
|
24
|
-
render: () => {
|
|
25
|
-
const [open, setOpen] = useState(true);
|
|
26
|
-
const [items, setItems] = useState<string[]>([]);
|
|
27
|
-
return (
|
|
28
|
-
<>
|
|
29
|
-
<div>
|
|
30
|
-
<Toolbar.Root>
|
|
31
|
-
<Toolbar.Button onClick={() => setOpen(true)}>Open</Toolbar.Button>
|
|
32
|
-
</Toolbar.Root>
|
|
33
|
-
</div>
|
|
34
|
-
<Dialog.Root open={open} onOpenChange={setOpen}>
|
|
35
|
-
<AmbientDialog>
|
|
36
|
-
<div className='flex flex-col h-full overflow-hidden'>
|
|
37
|
-
<div className='flex flex-col h-full gap-2 overflow-auto'>
|
|
38
|
-
{items.map((item) => (
|
|
39
|
-
<div key={item} className='px-2'>
|
|
40
|
-
{item}
|
|
41
|
-
</div>
|
|
42
|
-
))}
|
|
43
|
-
{items.length > 0 && <div className='pbe-2' />}
|
|
44
|
-
</div>
|
|
45
|
-
<div className='shrink-0 h-[40px]'>
|
|
46
|
-
<Button onClick={() => setItems([...items, faker.lorem.word()])}>Add</Button>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
</AmbientDialog>
|
|
50
|
-
</Dialog.Root>
|
|
51
|
-
</>
|
|
52
|
-
);
|
|
53
|
-
},
|
|
54
|
-
decorators: [
|
|
55
|
-
// TODO(burdon): Replace with ClientPlugin.
|
|
56
|
-
withClientProvider({
|
|
57
|
-
config: new Config({
|
|
58
|
-
runtime: {
|
|
59
|
-
client: { edgeFeatures: { signaling: true } },
|
|
60
|
-
services: {
|
|
61
|
-
edge: { url: 'https://edge.dxos.workers.dev/' },
|
|
62
|
-
iceProviders: [{ urls: 'https://edge.dxos.workers.dev/ice' }],
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
}),
|
|
66
|
-
createIdentity: true,
|
|
67
|
-
createSpace: true,
|
|
68
|
-
}),
|
|
69
|
-
withPluginManager({
|
|
70
|
-
plugins: [IntentPlugin()],
|
|
71
|
-
}),
|
|
72
|
-
withTheme,
|
|
73
|
-
withLayout({ fullscreen: true }),
|
|
74
|
-
],
|
|
75
|
-
parameters: {
|
|
76
|
-
translations,
|
|
77
|
-
},
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
export default meta;
|
|
81
|
-
|
|
82
|
-
type Story = StoryObj<typeof AmbientDialog>;
|
|
83
|
-
|
|
84
|
-
export const Default: Story = {};
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React, { type PropsWithChildren, useCallback, useEffect, useState } from 'react';
|
|
6
|
-
|
|
7
|
-
import { Dialog, Icon, IconButton } from '@dxos/react-ui';
|
|
8
|
-
import { resizeAttributes, ResizeHandle, type Size, sizeStyle } from '@dxos/react-ui-dnd';
|
|
9
|
-
import { mx } from '@dxos/react-ui-theme';
|
|
10
|
-
|
|
11
|
-
const preventDefault = (event: Event) => event.preventDefault();
|
|
12
|
-
|
|
13
|
-
const minSize = 5;
|
|
14
|
-
|
|
15
|
-
export type AmbientDialogProps = PropsWithChildren<{
|
|
16
|
-
open?: boolean;
|
|
17
|
-
title?: string;
|
|
18
|
-
resizeable?: boolean;
|
|
19
|
-
onOpenChange?: (open: boolean) => void;
|
|
20
|
-
onEscape?: () => void;
|
|
21
|
-
}>;
|
|
22
|
-
|
|
23
|
-
export const AmbientDialog = ({
|
|
24
|
-
children,
|
|
25
|
-
open: controlledOpen,
|
|
26
|
-
title,
|
|
27
|
-
resizeable = true,
|
|
28
|
-
onOpenChange,
|
|
29
|
-
onEscape,
|
|
30
|
-
}: AmbientDialogProps) => {
|
|
31
|
-
const [resizeKey, setReizeKey] = useState(0);
|
|
32
|
-
const [size, setSize] = useState<Size>('min-content');
|
|
33
|
-
const [open, setOpen] = useState(controlledOpen);
|
|
34
|
-
|
|
35
|
-
// Update controlled value.
|
|
36
|
-
useEffect(() => {
|
|
37
|
-
setOpen(controlledOpen);
|
|
38
|
-
}, [controlledOpen]);
|
|
39
|
-
|
|
40
|
-
// Update size and key.
|
|
41
|
-
useEffect(() => {
|
|
42
|
-
setSize(open ? 'min-content' : minSize);
|
|
43
|
-
setReizeKey((key) => key + 1);
|
|
44
|
-
}, [open]);
|
|
45
|
-
|
|
46
|
-
// TODO(burdon): Animate open/close.
|
|
47
|
-
// NOTE: We set the min size to 5rem (80px), and the header and prompt bar to 40px (i.e., the rail-size) each.
|
|
48
|
-
// The dialog has no vertical padding and has box-content so that when closed it collapses to the size of the header and prompt bar.
|
|
49
|
-
const handleToggle = useCallback(() => {
|
|
50
|
-
setOpen((open) => {
|
|
51
|
-
onOpenChange?.(!open);
|
|
52
|
-
return !open;
|
|
53
|
-
});
|
|
54
|
-
}, []);
|
|
55
|
-
|
|
56
|
-
return (
|
|
57
|
-
<div role='none' className='dx-dialog__overlay bg-transparent pointer-events-none' data-block-align='end'>
|
|
58
|
-
<Dialog.Content
|
|
59
|
-
classNames='relative box-content p-0 md:is-[35rem] md:max-is-none overflow-hidden pointer-events-auto transition-[block-size] ease-in-out duration-0 [&:not([data-dx-resizing="true"])]:duration-200'
|
|
60
|
-
inOverlayLayout
|
|
61
|
-
{...resizeAttributes}
|
|
62
|
-
style={{
|
|
63
|
-
...(resizeable ? sizeStyle(size, 'vertical', true) : {}),
|
|
64
|
-
maxBlockSize: 'calc(100dvh - env(safe-area-inset-bottom) - env(safe-area-inset-top) - 9rem)',
|
|
65
|
-
}}
|
|
66
|
-
onEscapeKeyDown={onEscape}
|
|
67
|
-
onInteractOutside={preventDefault}
|
|
68
|
-
>
|
|
69
|
-
{(resizeable && (
|
|
70
|
-
<>
|
|
71
|
-
<ResizeHandle
|
|
72
|
-
key={resizeKey}
|
|
73
|
-
side='block-start'
|
|
74
|
-
defaultSize='min-content'
|
|
75
|
-
minSize={minSize}
|
|
76
|
-
fallbackSize={minSize}
|
|
77
|
-
iconPosition='center'
|
|
78
|
-
onSizeChange={setSize}
|
|
79
|
-
/>
|
|
80
|
-
|
|
81
|
-
<DialogHeader open={open} title={title} onToggle={handleToggle} />
|
|
82
|
-
</>
|
|
83
|
-
)) || <Dialog.Title srOnly />}
|
|
84
|
-
|
|
85
|
-
{children}
|
|
86
|
-
</Dialog.Content>
|
|
87
|
-
</div>
|
|
88
|
-
);
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Matches same layout grid as PromptBar.
|
|
93
|
-
*/
|
|
94
|
-
const DialogHeader = ({ open, title, onToggle }: { open?: boolean; title?: string; onToggle: () => void }) => {
|
|
95
|
-
return (
|
|
96
|
-
<div className='flex shrink-0 w-full grid grid-cols-[var(--rail-action)_1fr_var(--rail-action)] items-center overflow-hidden'>
|
|
97
|
-
<div className='flex w-[--rail-action] h-[--rail-action] items-center justify-center'>
|
|
98
|
-
<Dialog.Close>
|
|
99
|
-
<Icon icon='ph--x--regular' />
|
|
100
|
-
</Dialog.Close>
|
|
101
|
-
</div>
|
|
102
|
-
<div className='grow'>
|
|
103
|
-
<Dialog.Title classNames='flex justify-center text-xs text-subdued'>{title}</Dialog.Title>
|
|
104
|
-
</div>
|
|
105
|
-
<div className='flex w-[--rail-action] h-[--rail-action] items-center justify-center'>
|
|
106
|
-
<IconButton
|
|
107
|
-
variant='ghost'
|
|
108
|
-
icon={'ph--caret-up--regular'}
|
|
109
|
-
classNames={mx('[&>svg]:transition [&>svg]:duration-200', open && '[&>svg]:rotate-180')}
|
|
110
|
-
iconOnly
|
|
111
|
-
label='Shrink'
|
|
112
|
-
onClick={onToggle}
|
|
113
|
-
/>
|
|
114
|
-
</div>
|
|
115
|
-
</div>
|
|
116
|
-
);
|
|
117
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React, { type FC, useState } from 'react';
|
|
6
|
-
|
|
7
|
-
import { useCapability, Capabilities, useCapabilities } from '@dxos/app-framework';
|
|
8
|
-
import { TranscriptionCapabilities } from '@dxos/plugin-transcription';
|
|
9
|
-
import { useTranslation } from '@dxos/react-ui';
|
|
10
|
-
|
|
11
|
-
import { AmbientDialog } from './AmbientDialog';
|
|
12
|
-
import { ThreadContainer } from './Thread';
|
|
13
|
-
import { ASSISTANT_PLUGIN } from '../meta';
|
|
14
|
-
import { type AssistantSettingsProps, type AIChatType } from '../types';
|
|
15
|
-
|
|
16
|
-
export const AssistantDialog: FC<{ chat?: AIChatType }> = ({ chat }) => {
|
|
17
|
-
const { t } = useTranslation(ASSISTANT_PLUGIN);
|
|
18
|
-
const transcription = useCapabilities(TranscriptionCapabilities.Transcriber).length > 0;
|
|
19
|
-
const settings = useCapability(Capabilities.SettingsStore).getStore<AssistantSettingsProps>(ASSISTANT_PLUGIN)?.value;
|
|
20
|
-
|
|
21
|
-
// TODO(burdon): Refocus when open.
|
|
22
|
-
const [open, setOpen] = useState(false);
|
|
23
|
-
|
|
24
|
-
return (
|
|
25
|
-
<AmbientDialog open={open} onOpenChange={setOpen} title={t('assistant dialog title')}>
|
|
26
|
-
<ThreadContainer
|
|
27
|
-
part={'dialog'}
|
|
28
|
-
chat={chat}
|
|
29
|
-
onOpenChange={setOpen}
|
|
30
|
-
settings={settings}
|
|
31
|
-
transcription={transcription}
|
|
32
|
-
/>
|
|
33
|
-
</AmbientDialog>
|
|
34
|
-
);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export default AssistantDialog;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
|
-
import { type StoryObj, type Meta } from '@storybook/react';
|
|
8
|
-
|
|
9
|
-
import { withLayout, withTheme } from '@dxos/storybook-utils';
|
|
10
|
-
|
|
11
|
-
import { BlueprintEditor } from './BlueprintEditor';
|
|
12
|
-
import { RESEARCH_BLUEPRINT_DEFINITION } from '../../testing';
|
|
13
|
-
import translations from '../../translations';
|
|
14
|
-
|
|
15
|
-
const meta: Meta<typeof BlueprintEditor> = {
|
|
16
|
-
title: 'plugins/plugin-assistant/BlueprintEditor',
|
|
17
|
-
component: BlueprintEditor,
|
|
18
|
-
decorators: [withTheme, withLayout({ fullscreen: true, classNames: 'mli-auto max-is-[50rem] justify-center' })],
|
|
19
|
-
parameters: {
|
|
20
|
-
translations,
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export default meta;
|
|
25
|
-
|
|
26
|
-
type Story = StoryObj<typeof BlueprintEditor>;
|
|
27
|
-
|
|
28
|
-
export const Default: Story = {
|
|
29
|
-
args: {
|
|
30
|
-
blueprint: RESEARCH_BLUEPRINT_DEFINITION,
|
|
31
|
-
},
|
|
32
|
-
};
|