@dxos/plugin-assistant 0.8.4-main.3c1ae3b → 0.8.4-main.3eb6e50203
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-6SP2ZWJ2.mjs +30 -0
- package/dist/lib/browser/BlueprintArticle-6SP2ZWJ2.mjs.map +7 -0
- package/dist/lib/browser/ChatCompanion-CAKFZAWN.mjs +200 -0
- package/dist/lib/browser/ChatCompanion-CAKFZAWN.mjs.map +7 -0
- package/dist/lib/browser/ChatContainer-QB37VONJ.mjs +73 -0
- package/dist/lib/browser/ChatContainer-QB37VONJ.mjs.map +7 -0
- package/dist/lib/browser/ChatDialog-ASVBLOOS.mjs +85 -0
- package/dist/lib/browser/ChatDialog-ASVBLOOS.mjs.map +7 -0
- package/dist/lib/browser/InitiativeContainer-V522FCYH.mjs +266 -0
- package/dist/lib/browser/InitiativeContainer-V522FCYH.mjs.map +7 -0
- package/dist/lib/browser/PromptArticle-PK3CBRUB.mjs +52 -0
- package/dist/lib/browser/PromptArticle-PK3CBRUB.mjs.map +7 -0
- package/dist/lib/browser/ai-service-CY2BYPH6.mjs +22 -0
- package/dist/lib/browser/ai-service-CY2BYPH6.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-MUZGUQSC.mjs +234 -0
- package/dist/lib/browser/app-graph-builder-MUZGUQSC.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-YAGWYVCL.mjs +14 -0
- package/dist/lib/browser/blueprints/index.mjs +12 -0
- package/dist/lib/browser/chunk-3ETBCBMH.mjs +47 -0
- package/dist/lib/browser/chunk-3ETBCBMH.mjs.map +7 -0
- package/dist/lib/browser/chunk-6BVCG5SJ.mjs +230 -0
- package/dist/lib/browser/chunk-6BVCG5SJ.mjs.map +7 -0
- package/dist/lib/browser/{chunk-7ZJIXQ2Y.mjs → chunk-DKQMSMBN.mjs} +54 -63
- package/dist/lib/browser/chunk-DKQMSMBN.mjs.map +7 -0
- package/dist/lib/browser/{chunk-WBG5PTSX.mjs → chunk-EXVT7D4B.mjs} +1 -1
- package/dist/lib/browser/chunk-EXVT7D4B.mjs.map +7 -0
- package/dist/lib/browser/{chunk-F6YX2HHA.mjs → chunk-IJYAKPEU.mjs} +45 -21
- package/dist/lib/browser/chunk-IJYAKPEU.mjs.map +7 -0
- package/dist/lib/browser/chunk-JA7PUZC7.mjs +1974 -0
- package/dist/lib/browser/chunk-JA7PUZC7.mjs.map +7 -0
- package/dist/lib/browser/chunk-POPBT2AQ.mjs +198 -0
- package/dist/lib/browser/chunk-POPBT2AQ.mjs.map +7 -0
- package/dist/lib/browser/edge-model-resolver-YTMFQEN5.mjs +21 -0
- package/dist/lib/browser/edge-model-resolver-YTMFQEN5.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +205 -177
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/local-model-resolver-CGRQH37T.mjs +20 -0
- package/dist/lib/browser/local-model-resolver-CGRQH37T.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-2673CFJS.mjs +133 -0
- package/dist/lib/browser/operation-resolver-2673CFJS.mjs.map +7 -0
- package/dist/lib/browser/react-surface-T3FN4GVP.mjs +125 -0
- package/dist/lib/browser/react-surface-T3FN4GVP.mjs.map +7 -0
- package/dist/lib/browser/{repair-3MZXLUHO.mjs → repair-IRXDYF4R.mjs} +24 -17
- package/dist/lib/browser/repair-IRXDYF4R.mjs.map +7 -0
- package/dist/lib/browser/settings-XF6GKHCG.mjs +33 -0
- package/dist/lib/browser/settings-XF6GKHCG.mjs.map +7 -0
- package/dist/lib/browser/state-OYDPWLKA.mjs +26 -0
- package/dist/lib/browser/state-OYDPWLKA.mjs.map +7 -0
- package/dist/lib/browser/toolkit-IDXQCSTX.mjs +19 -0
- package/dist/lib/browser/toolkit-IDXQCSTX.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +8 -4
- package/dist/lib/node-esm/BlueprintArticle-7LI6UXKZ.mjs +31 -0
- package/dist/lib/node-esm/BlueprintArticle-7LI6UXKZ.mjs.map +7 -0
- package/dist/lib/node-esm/ChatCompanion-W4PGOCGR.mjs +201 -0
- package/dist/lib/node-esm/ChatCompanion-W4PGOCGR.mjs.map +7 -0
- package/dist/lib/node-esm/ChatContainer-ECFQVH6O.mjs +74 -0
- package/dist/lib/node-esm/ChatContainer-ECFQVH6O.mjs.map +7 -0
- package/dist/lib/node-esm/ChatDialog-AFLPYSIU.mjs +86 -0
- package/dist/lib/node-esm/ChatDialog-AFLPYSIU.mjs.map +7 -0
- package/dist/lib/node-esm/InitiativeContainer-U4LGO3BW.mjs +267 -0
- package/dist/lib/node-esm/InitiativeContainer-U4LGO3BW.mjs.map +7 -0
- package/dist/lib/node-esm/PromptArticle-BHPABYLT.mjs +53 -0
- package/dist/lib/node-esm/PromptArticle-BHPABYLT.mjs.map +7 -0
- package/dist/lib/node-esm/ai-service-ZI3A6RVG.mjs +23 -0
- package/dist/lib/node-esm/ai-service-ZI3A6RVG.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-4QN5M6PD.mjs +235 -0
- package/dist/lib/node-esm/app-graph-builder-4QN5M6PD.mjs.map +7 -0
- package/dist/lib/node-esm/{blueprint-definition-S3DNWJFV.mjs → blueprint-definition-H3LFAEK2.mjs} +6 -4
- package/dist/lib/node-esm/blueprint-definition-H3LFAEK2.mjs.map +7 -0
- package/dist/lib/node-esm/blueprints/index.mjs +13 -0
- package/dist/lib/node-esm/blueprints/index.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-2LEN26ZQ.mjs +48 -0
- package/dist/lib/node-esm/chunk-2LEN26ZQ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-3XC7LQSO.mjs +1975 -0
- package/dist/lib/node-esm/chunk-3XC7LQSO.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-CKW4IYLY.mjs → chunk-75PHXBN3.mjs} +54 -63
- package/dist/lib/node-esm/chunk-75PHXBN3.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-F6LA7XNS.mjs +199 -0
- package/dist/lib/node-esm/chunk-F6LA7XNS.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-LB72WG6R.mjs +231 -0
- package/dist/lib/node-esm/chunk-LB72WG6R.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-GWKWQSEQ.mjs → chunk-MJD5XWQV.mjs} +45 -21
- package/dist/lib/node-esm/chunk-MJD5XWQV.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-WE6KTH72.mjs → chunk-POWB2BPC.mjs} +1 -1
- package/dist/lib/node-esm/chunk-POWB2BPC.mjs.map +7 -0
- package/dist/lib/node-esm/edge-model-resolver-CMJ3KNLQ.mjs +22 -0
- package/dist/lib/node-esm/edge-model-resolver-CMJ3KNLQ.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +205 -177
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/local-model-resolver-FFDAKOXN.mjs +21 -0
- package/dist/lib/node-esm/local-model-resolver-FFDAKOXN.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operation-resolver-2ZD2DXOU.mjs +134 -0
- package/dist/lib/node-esm/operation-resolver-2ZD2DXOU.mjs.map +7 -0
- package/dist/lib/node-esm/{react-surface-AOBQALOV.mjs → react-surface-T4VMCCKZ.mjs} +57 -32
- package/dist/lib/node-esm/react-surface-T4VMCCKZ.mjs.map +7 -0
- package/dist/lib/node-esm/{repair-RER5H7Y6.mjs → repair-DMI55PON.mjs} +24 -17
- package/dist/lib/node-esm/repair-DMI55PON.mjs.map +7 -0
- package/dist/lib/node-esm/settings-NGGZA7S7.mjs +34 -0
- package/dist/lib/node-esm/settings-NGGZA7S7.mjs.map +7 -0
- package/dist/lib/node-esm/state-VSCPGN7R.mjs +27 -0
- package/dist/lib/node-esm/state-VSCPGN7R.mjs.map +7 -0
- package/dist/lib/node-esm/toolkit-JPRJRDDB.mjs +20 -0
- package/dist/lib/node-esm/toolkit-JPRJRDDB.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +8 -4
- package/dist/types/src/AssistantPlugin.d.ts +2 -1
- package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
- package/dist/types/src/blueprints/assistant-blueprint.d.ts +11 -0
- package/dist/types/src/blueprints/assistant-blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/index.d.ts +7 -0
- package/dist/types/src/blueprints/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/ai-service/ai-service.d.ts +6 -0
- package/dist/types/src/capabilities/ai-service/ai-service.d.ts.map +1 -0
- package/dist/types/src/capabilities/ai-service/index.d.ts +3 -0
- package/dist/types/src/capabilities/ai-service/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +26 -0
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts +4 -0
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/edge-model-resolver/edge-model-resolver.d.ts +7 -0
- package/dist/types/src/capabilities/edge-model-resolver/edge-model-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/edge-model-resolver/index.d.ts +3 -0
- package/dist/types/src/capabilities/edge-model-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +10 -12
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/local-model-resolver/index.d.ts +3 -0
- package/dist/types/src/capabilities/local-model-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/local-model-resolver/local-model-resolver.d.ts +13 -0
- package/dist/types/src/capabilities/local-model-resolver/local-model-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/repair/index.d.ts +3 -0
- package/dist/types/src/capabilities/repair/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/repair/repair.d.ts +6 -0
- package/dist/types/src/capabilities/repair/repair.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/index.d.ts +15 -0
- package/dist/types/src/capabilities/settings/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/settings.d.ts +18 -0
- package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/index.d.ts +11 -0
- package/dist/types/src/capabilities/state/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/state.d.ts +13 -0
- package/dist/types/src/capabilities/state/state.d.ts.map +1 -0
- package/dist/types/src/capabilities/toolkit/index.d.ts +3 -0
- package/dist/types/src/capabilities/toolkit/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/toolkit/toolkit.d.ts +6 -0
- package/dist/types/src/capabilities/toolkit/toolkit.d.ts.map +1 -0
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts +4 -2
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +1 -1
- package/dist/types/src/components/BlueprintArticle.d.ts +2 -2
- package/dist/types/src/components/BlueprintArticle.d.ts.map +1 -1
- package/dist/types/src/components/Chat/Chat.d.ts +13 -11
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/src/components/Chat/events.d.ts +1 -1
- package/dist/types/src/components/Chat/events.d.ts.map +1 -1
- package/dist/types/src/components/ChatCompanion.d.ts +3 -3
- package/dist/types/src/components/ChatCompanion.d.ts.map +1 -1
- package/dist/types/src/components/ChatContainer.d.ts +8 -8
- package/dist/types/src/components/ChatContainer.d.ts.map +1 -1
- package/dist/types/src/components/ChatDialog.d.ts +2 -2
- package/dist/types/src/components/ChatDialog.d.ts.map +1 -1
- package/dist/types/src/components/ChatProgress/ChatProgress.d.ts +2 -2
- 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 +3 -3
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts +3 -3
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.d.ts +2 -2
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +116 -2
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/registry.d.ts +1 -1
- package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/sync.d.ts +1 -1
- package/dist/types/src/components/ChatThread/sync.d.ts.map +1 -1
- package/dist/types/src/components/InitiativeContainer.d.ts +9 -0
- package/dist/types/src/components/InitiativeContainer.d.ts.map +1 -0
- package/dist/types/src/components/PromptArticle.d.ts +2 -2
- package/dist/types/src/components/PromptArticle.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +114 -0
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +11 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +115 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/extensions/handlebars-extension.d.ts.map +1 -1
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts +3 -3
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.d.ts +4 -5
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +114 -0
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
- package/dist/types/src/components/TriggerStatus/TriggerStatus.d.ts +4 -0
- package/dist/types/src/components/TriggerStatus/TriggerStatus.d.ts.map +1 -0
- package/dist/types/src/components/TriggerStatus/index.d.ts +2 -0
- package/dist/types/src/components/TriggerStatus/index.d.ts.map +1 -0
- package/dist/types/src/components/Typewriter/AssistantToolbar.d.ts +12 -0
- package/dist/types/src/components/Typewriter/AssistantToolbar.d.ts.map +1 -0
- package/dist/types/src/components/Typewriter/Typewriter.d.ts +11 -0
- package/dist/types/src/components/Typewriter/Typewriter.d.ts.map +1 -0
- package/dist/types/src/components/Typewriter/Typewriter.stories.d.ts +7 -0
- package/dist/types/src/components/Typewriter/Typewriter.stories.d.ts.map +1 -0
- package/dist/types/src/components/Typewriter/assistant-extension.d.ts +5 -0
- package/dist/types/src/components/Typewriter/assistant-extension.d.ts.map +1 -0
- package/dist/types/src/components/Typewriter/index.d.ts +2 -0
- package/dist/types/src/components/Typewriter/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +10 -10
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/functions/index.d.ts +1 -1
- package/dist/types/src/functions/index.d.ts.map +1 -1
- package/dist/types/src/functions/object-list.d.ts +1 -1
- package/dist/types/src/functions/object-load.d.ts +1 -1
- package/dist/types/src/functions/object-load.d.ts.map +1 -1
- package/dist/types/src/functions/object-search.d.ts +10 -0
- package/dist/types/src/functions/object-search.d.ts.map +1 -0
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts +5 -5
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatProcessor.d.ts +2 -1
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts +5 -5
- package/dist/types/src/hooks/useChatServices.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatToolbarActions.d.ts +3 -3
- package/dist/types/src/hooks/useChatToolbarActions.d.ts.map +1 -1
- package/dist/types/src/hooks/useContextBinder.d.ts.map +1 -1
- package/dist/types/src/hooks/useContextObjects.d.ts +7 -7
- package/dist/types/src/hooks/useContextObjects.d.ts.map +1 -1
- package/dist/types/src/hooks/useFilteredTypes.d.ts +2 -3
- package/dist/types/src/hooks/useFilteredTypes.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +0 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/processor/processor.d.ts +13 -9
- package/dist/types/src/processor/processor.d.ts.map +1 -1
- package/dist/types/src/processor/update-name.d.ts +2 -2
- package/dist/types/src/processor/update-name.d.ts.map +1 -1
- package/dist/types/src/queue-logger.d.ts.map +1 -1
- package/dist/types/src/testing/test-services.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +114 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Assistant.d.ts +7 -32
- package/dist/types/src/types/Assistant.d.ts.map +1 -1
- package/dist/types/src/types/AssistantAction.d.ts +90 -122
- package/dist/types/src/types/AssistantAction.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +33 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/events.d.ts +5 -0
- package/dist/types/src/types/events.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +4 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/service.d.ts +11 -260
- package/dist/types/src/types/service.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +116 -93
- package/src/AssistantPlugin.tsx +104 -99
- package/src/blueprints/assistant-blueprint.ts +57 -0
- package/src/blueprints/index.ts +12 -0
- package/src/capabilities/ai-service/ai-service.ts +30 -0
- package/src/capabilities/ai-service/index.ts +7 -0
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +200 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/blueprint-definition/blueprint-definition.ts +74 -0
- package/src/capabilities/blueprint-definition/index.ts +8 -0
- package/src/capabilities/edge-model-resolver/edge-model-resolver.ts +33 -0
- package/src/capabilities/edge-model-resolver/index.ts +7 -0
- package/src/capabilities/index.ts +10 -15
- package/src/capabilities/local-model-resolver/index.ts +7 -0
- package/src/capabilities/local-model-resolver/local-model-resolver.ts +38 -0
- package/src/capabilities/operation-resolver/index.ts +7 -0
- package/src/capabilities/operation-resolver/operation-resolver.ts +112 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +111 -0
- package/src/capabilities/repair/index.ts +7 -0
- package/src/capabilities/{repair.ts → repair/repair.ts} +24 -11
- package/src/capabilities/settings/index.ts +7 -0
- package/src/capabilities/settings/settings.ts +31 -0
- package/src/capabilities/state/index.ts +7 -0
- package/src/capabilities/state/state.ts +27 -0
- package/src/capabilities/toolkit/index.ts +7 -0
- package/src/capabilities/toolkit/toolkit.ts +27 -0
- package/src/components/AssistantSettings/AssistantSettings.tsx +28 -20
- package/src/components/BlueprintArticle.tsx +5 -6
- package/src/components/Chat/Chat.tsx +104 -77
- package/src/components/Chat/events.ts +1 -1
- package/src/components/ChatCompanion.tsx +103 -43
- package/src/components/ChatContainer.tsx +30 -24
- package/src/components/ChatDialog.tsx +8 -8
- package/src/components/ChatProgress/ChatProgress.tsx +5 -19
- package/src/components/ChatPrompt/ChatActions.tsx +9 -1
- package/src/components/ChatPrompt/ChatOptions.tsx +62 -58
- package/src/components/ChatPrompt/ChatReferences.tsx +5 -6
- package/src/components/ChatPrompt/ChatStatusIndicator.tsx +1 -1
- package/src/components/ChatThread/ChatThread.stories.tsx +9 -8
- package/src/components/ChatThread/ChatThread.tsx +14 -5
- package/src/components/ChatThread/Link.tsx +3 -3
- package/src/components/ChatThread/registry.tsx +1 -1
- package/src/components/ChatThread/sync.test.ts +13 -5
- package/src/components/ChatThread/sync.ts +8 -2
- package/src/components/InitiativeContainer.tsx +340 -0
- package/src/components/PromptArticle.tsx +9 -11
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +3 -3
- package/src/components/TemplateEditor/TemplateEditor.tsx +7 -4
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +15 -7
- package/src/components/TemplateEditor/TemplateForm.tsx +75 -28
- package/src/components/TemplateEditor/extensions/handlebars-extension.ts +10 -5
- package/src/components/ToolBlock/ToolBlock.tsx +6 -6
- package/src/components/Toolbox/Toolbox.stories.tsx +10 -11
- package/src/components/Toolbox/Toolbox.tsx +50 -52
- package/src/components/TriggerStatus/TriggerStatus.tsx +142 -0
- package/src/components/TriggerStatus/index.ts +5 -0
- package/src/components/Typewriter/AssistantToolbar.tsx +161 -0
- package/src/components/Typewriter/Typewriter.stories.tsx +83 -0
- package/src/components/Typewriter/Typewriter.tsx +54 -0
- package/src/components/Typewriter/assistant-extension.tsx +144 -0
- package/src/components/Typewriter/index.ts +5 -0
- package/src/components/index.ts +11 -2
- package/src/functions/index.ts +1 -1
- package/src/functions/object-list.ts +2 -2
- package/src/functions/object-load.ts +9 -11
- package/src/functions/object-search.ts +46 -0
- package/src/hooks/useBlueprintRegistry.ts +31 -21
- package/src/hooks/useChatProcessor.ts +7 -3
- package/src/hooks/useChatServices.ts +14 -18
- package/src/hooks/useChatToolbarActions.ts +27 -27
- package/src/hooks/useContextBinder.ts +4 -2
- package/src/hooks/useContextObjects.ts +13 -25
- package/src/hooks/useFilteredTypes.ts +6 -7
- package/src/hooks/useReferencesProvider.ts +4 -4
- package/src/index.ts +0 -1
- package/src/meta.ts +2 -2
- package/src/processor/processor.test.ts +8 -8
- package/src/processor/processor.ts +49 -25
- package/src/processor/update-name.ts +6 -4
- package/src/queue-logger.ts +4 -1
- package/src/testing/test-services.ts +8 -6
- package/src/translations.ts +23 -2
- package/src/types/Assistant.ts +4 -39
- package/src/types/AssistantAction.ts +61 -64
- package/src/types/capabilities.ts +27 -0
- package/src/types/events.ts +11 -0
- package/src/types/index.ts +6 -1
- package/src/types/service.ts +10 -7
- package/dist/lib/browser/BlueprintArticle-BWSLH6LG.mjs +0 -36
- package/dist/lib/browser/BlueprintArticle-BWSLH6LG.mjs.map +0 -7
- package/dist/lib/browser/ChatCompanion-U7VMDYO6.mjs +0 -159
- package/dist/lib/browser/ChatCompanion-U7VMDYO6.mjs.map +0 -7
- package/dist/lib/browser/ChatContainer-JXDZQ2EY.mjs +0 -79
- package/dist/lib/browser/ChatContainer-JXDZQ2EY.mjs.map +0 -7
- package/dist/lib/browser/ChatDialog-5NNGCRKJ.mjs +0 -90
- package/dist/lib/browser/ChatDialog-5NNGCRKJ.mjs.map +0 -7
- package/dist/lib/browser/PromptArticle-Q7JYGFQV.mjs +0 -59
- package/dist/lib/browser/PromptArticle-Q7JYGFQV.mjs.map +0 -7
- package/dist/lib/browser/ai-service-ERTZBTP3.mjs +0 -19
- package/dist/lib/browser/ai-service-ERTZBTP3.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-ADZRPJ3V.mjs +0 -199
- package/dist/lib/browser/app-graph-builder-ADZRPJ3V.mjs.map +0 -7
- package/dist/lib/browser/blueprint-definition-7HPQPCL7.mjs +0 -12
- package/dist/lib/browser/chunk-5JZRYQZL.mjs +0 -229
- package/dist/lib/browser/chunk-5JZRYQZL.mjs.map +0 -7
- package/dist/lib/browser/chunk-7ZJIXQ2Y.mjs.map +0 -7
- package/dist/lib/browser/chunk-F6YX2HHA.mjs.map +0 -7
- package/dist/lib/browser/chunk-LRE4VEZV.mjs +0 -16
- package/dist/lib/browser/chunk-LRE4VEZV.mjs.map +0 -7
- package/dist/lib/browser/chunk-SWEOO227.mjs +0 -1930
- package/dist/lib/browser/chunk-SWEOO227.mjs.map +0 -7
- package/dist/lib/browser/chunk-WBG5PTSX.mjs.map +0 -7
- package/dist/lib/browser/chunk-YDSFERCV.mjs +0 -178
- package/dist/lib/browser/chunk-YDSFERCV.mjs.map +0 -7
- package/dist/lib/browser/edge-model-resolver-O6OFYIO2.mjs +0 -18
- package/dist/lib/browser/edge-model-resolver-O6OFYIO2.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-Q7TX3MV7.mjs +0 -143
- package/dist/lib/browser/intent-resolver-Q7TX3MV7.mjs.map +0 -7
- package/dist/lib/browser/local-model-resolver-34MVHRKD.mjs +0 -17
- package/dist/lib/browser/local-model-resolver-34MVHRKD.mjs.map +0 -7
- package/dist/lib/browser/react-surface-VXXS6ZVC.mjs +0 -100
- package/dist/lib/browser/react-surface-VXXS6ZVC.mjs.map +0 -7
- package/dist/lib/browser/repair-3MZXLUHO.mjs.map +0 -7
- package/dist/lib/browser/settings-HD5WA24I.mjs +0 -23
- package/dist/lib/browser/settings-HD5WA24I.mjs.map +0 -7
- package/dist/lib/browser/state-GG7Z3NB7.mjs +0 -25
- package/dist/lib/browser/state-GG7Z3NB7.mjs.map +0 -7
- package/dist/lib/browser/toolkit-VYDAWNE4.mjs +0 -17
- package/dist/lib/browser/toolkit-VYDAWNE4.mjs.map +0 -7
- package/dist/lib/node-esm/BlueprintArticle-R2XYBRCK.mjs +0 -37
- package/dist/lib/node-esm/BlueprintArticle-R2XYBRCK.mjs.map +0 -7
- package/dist/lib/node-esm/ChatCompanion-O4T7PMMC.mjs +0 -160
- package/dist/lib/node-esm/ChatCompanion-O4T7PMMC.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-OWAZI6ZF.mjs +0 -80
- package/dist/lib/node-esm/ChatContainer-OWAZI6ZF.mjs.map +0 -7
- package/dist/lib/node-esm/ChatDialog-IBXH5FRI.mjs +0 -91
- package/dist/lib/node-esm/ChatDialog-IBXH5FRI.mjs.map +0 -7
- package/dist/lib/node-esm/PromptArticle-IV7O5UZ3.mjs +0 -60
- package/dist/lib/node-esm/PromptArticle-IV7O5UZ3.mjs.map +0 -7
- package/dist/lib/node-esm/ai-service-MUYLV3NT.mjs +0 -20
- package/dist/lib/node-esm/ai-service-MUYLV3NT.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-26KXQ5ZY.mjs +0 -200
- package/dist/lib/node-esm/app-graph-builder-26KXQ5ZY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CKW4IYLY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-E4JSYCWZ.mjs +0 -230
- package/dist/lib/node-esm/chunk-E4JSYCWZ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-GWKWQSEQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-VGSP5WMV.mjs +0 -180
- package/dist/lib/node-esm/chunk-VGSP5WMV.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-WE6KTH72.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YWFWT57N.mjs +0 -17
- package/dist/lib/node-esm/chunk-YWFWT57N.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ZNSHGWE4.mjs +0 -1931
- package/dist/lib/node-esm/chunk-ZNSHGWE4.mjs.map +0 -7
- package/dist/lib/node-esm/edge-model-resolver-2ARXDOYS.mjs +0 -19
- package/dist/lib/node-esm/edge-model-resolver-2ARXDOYS.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-LTKMN3YB.mjs +0 -144
- package/dist/lib/node-esm/intent-resolver-LTKMN3YB.mjs.map +0 -7
- package/dist/lib/node-esm/local-model-resolver-TP2NTSAX.mjs +0 -18
- package/dist/lib/node-esm/local-model-resolver-TP2NTSAX.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-AOBQALOV.mjs.map +0 -7
- package/dist/lib/node-esm/repair-RER5H7Y6.mjs.map +0 -7
- package/dist/lib/node-esm/settings-YJQVKHH5.mjs +0 -24
- package/dist/lib/node-esm/settings-YJQVKHH5.mjs.map +0 -7
- package/dist/lib/node-esm/state-FSUHFMDM.mjs +0 -26
- package/dist/lib/node-esm/state-FSUHFMDM.mjs.map +0 -7
- package/dist/lib/node-esm/toolkit-HFJZLVIR.mjs +0 -18
- package/dist/lib/node-esm/toolkit-HFJZLVIR.mjs.map +0 -7
- package/dist/types/src/capabilities/ai-service.d.ts +0 -4
- package/dist/types/src/capabilities/ai-service.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +0 -7
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/capabilities.d.ts +0 -10
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/edge-model-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/local-model-resolver.d.ts +0 -10
- package/dist/types/src/capabilities/local-model-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface.d.ts +0 -4
- package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/repair.d.ts +0 -4
- package/dist/types/src/capabilities/repair.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings.d.ts +0 -4
- package/dist/types/src/capabilities/settings.d.ts.map +0 -1
- package/dist/types/src/capabilities/state.d.ts +0 -4
- package/dist/types/src/capabilities/state.d.ts.map +0 -1
- package/dist/types/src/capabilities/toolkit.d.ts +0 -4
- package/dist/types/src/capabilities/toolkit.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/reducers.d.ts +0 -40
- package/dist/types/src/components/ChatThread/reducers.d.ts.map +0 -1
- package/dist/types/src/events.d.ts +0 -4
- package/dist/types/src/events.d.ts.map +0 -1
- package/dist/types/src/functions/analysis.d.ts +0 -5
- package/dist/types/src/functions/analysis.d.ts.map +0 -1
- package/src/capabilities/ai-service.ts +0 -27
- package/src/capabilities/app-graph-builder.ts +0 -208
- package/src/capabilities/blueprint-definition.ts +0 -66
- package/src/capabilities/capabilities.ts +0 -17
- package/src/capabilities/edge-model-resolver.ts +0 -25
- package/src/capabilities/intent-resolver.ts +0 -135
- package/src/capabilities/local-model-resolver.ts +0 -30
- package/src/capabilities/react-surface.tsx +0 -87
- package/src/capabilities/settings.ts +0 -19
- package/src/capabilities/state.ts +0 -22
- package/src/capabilities/toolkit.ts +0 -17
- package/src/components/ChatThread/reducers.ts +0 -151
- package/src/events.ts +0 -11
- package/src/functions/analysis.ts +0 -22
- /package/dist/lib/browser/{blueprint-definition-7HPQPCL7.mjs.map → blueprint-definition-YAGWYVCL.mjs.map} +0 -0
- /package/dist/lib/{node-esm/blueprint-definition-S3DNWJFV.mjs.map → browser/blueprints/index.mjs.map} +0 -0
|
@@ -5,37 +5,81 @@
|
|
|
5
5
|
import * as Array from 'effect/Array';
|
|
6
6
|
import * as Function from 'effect/Function';
|
|
7
7
|
import * as Option from 'effect/Option';
|
|
8
|
-
import React, { forwardRef, useCallback, useEffect, useMemo, useState } from 'react';
|
|
8
|
+
import React, { forwardRef, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
9
9
|
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { useAtomCapability, useCapabilities, useOperationInvoker } from '@dxos/app-framework/ui';
|
|
11
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
12
|
+
import { Chat } from '@dxos/assistant-toolkit';
|
|
12
13
|
import { Blueprint } from '@dxos/blueprints';
|
|
13
14
|
import { getSpace } from '@dxos/client/echo';
|
|
14
|
-
import { Filter, Obj, Ref } from '@dxos/echo';
|
|
15
|
-
import {
|
|
15
|
+
import { DXN, Filter, Obj, Query, Ref } from '@dxos/echo';
|
|
16
|
+
import { SpaceOperation } from '@dxos/plugin-space/types';
|
|
16
17
|
import { useQuery } from '@dxos/react-client/echo';
|
|
17
18
|
import { useAsyncEffect } from '@dxos/react-ui';
|
|
18
19
|
|
|
19
20
|
import { ChatContainer, type ChatEvent } from '../components';
|
|
20
21
|
import { useBlueprintRegistry, useContextBinder } from '../hooks';
|
|
21
|
-
import { Assistant,
|
|
22
|
+
import { Assistant, AssistantCapabilities, AssistantOperation } from '../types';
|
|
22
23
|
|
|
23
24
|
export type ChatCompanionProps = {
|
|
24
25
|
role?: string;
|
|
25
|
-
data: {
|
|
26
|
+
data: {
|
|
27
|
+
subject: Chat.Chat | 'assistant-chat';
|
|
28
|
+
companionTo: Obj.Unknown;
|
|
29
|
+
};
|
|
26
30
|
};
|
|
27
31
|
|
|
28
32
|
export const ChatCompanion = forwardRef<HTMLDivElement, ChatCompanionProps>(
|
|
29
33
|
({ role, data }: ChatCompanionProps, forwardedRef) => {
|
|
30
|
-
const {
|
|
34
|
+
const { invokePromise } = useOperationInvoker();
|
|
31
35
|
const blueprintRegistry = useBlueprintRegistry();
|
|
32
36
|
const companionTo = data.companionTo;
|
|
33
37
|
|
|
34
38
|
const space = getSpace(companionTo);
|
|
35
39
|
const [chat, setChat] = useState(data.subject === 'assistant-chat' ? undefined : data.subject);
|
|
40
|
+
|
|
41
|
+
// Watch the state atom directly to detect when plus button clears the chat selection.
|
|
42
|
+
const state = useAtomCapability(AssistantCapabilities.State);
|
|
43
|
+
const companionToId = Obj.getDXN(companionTo).toString();
|
|
44
|
+
const currentChatState = state?.currentChat[companionToId];
|
|
45
|
+
|
|
46
|
+
// Track if initial setup has been done (to distinguish initial mount from plus button click).
|
|
47
|
+
// Reset when companionTo changes.
|
|
48
|
+
const initialSetupDoneRef = useRef(false);
|
|
49
|
+
const prevCompanionToIdRef = useRef(companionToId);
|
|
50
|
+
if (prevCompanionToIdRef.current !== companionToId) {
|
|
51
|
+
initialSetupDoneRef.current = false;
|
|
52
|
+
prevCompanionToIdRef.current = companionToId;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Sync local chat state with the state atom.
|
|
56
|
+
// When currentChatState is undefined (plus button clicked), reset local chat.
|
|
57
|
+
// When data.subject is a Chat object, use it directly.
|
|
58
|
+
// When currentChatState is a different chat, fetch and set it.
|
|
36
59
|
useEffect(() => {
|
|
37
|
-
|
|
38
|
-
|
|
60
|
+
// If state says no chat selected AND current chat is persisted, reset local state (handles plus button click).
|
|
61
|
+
// Don't reset in-memory chats - they're expected to have currentChatState === undefined.
|
|
62
|
+
if (!currentChatState && chat && getSpace(chat)) {
|
|
63
|
+
setChat(undefined);
|
|
64
|
+
} else if (data.subject !== 'assistant-chat') {
|
|
65
|
+
// If data.subject is a Chat object (resolved from graph), use it.
|
|
66
|
+
setChat(data.subject);
|
|
67
|
+
} else if (currentChatState && space) {
|
|
68
|
+
// currentChatState is set but graph couldn't resolve it - fetch manually.
|
|
69
|
+
const currentChatDxnStr = chat ? Obj.getDXN(chat).toString() : undefined;
|
|
70
|
+
if (currentChatState !== currentChatDxnStr) {
|
|
71
|
+
// Parse DXN and fetch the chat object from the database.
|
|
72
|
+
const parsedDxn = DXN.tryParse(currentChatState);
|
|
73
|
+
if (parsedDxn) {
|
|
74
|
+
const chatRef = space.db.makeRef(parsedDxn);
|
|
75
|
+
const resolvedChat = chatRef?.target;
|
|
76
|
+
if (Obj.instanceOf(Assistant.Chat, resolvedChat)) {
|
|
77
|
+
setChat(resolvedChat);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}, [currentChatState, data.subject, space, chat]);
|
|
39
83
|
|
|
40
84
|
const chatQueue = space && chat ? space.queues.get(chat.queue.dxn) : undefined;
|
|
41
85
|
const binder = useContextBinder(chatQueue);
|
|
@@ -46,46 +90,62 @@ export const ChatCompanion = forwardRef<HTMLDivElement, ChatCompanionProps>(
|
|
|
46
90
|
return;
|
|
47
91
|
}
|
|
48
92
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
93
|
+
// Only query for existing chats on initial mount, not when plus button is clicked.
|
|
94
|
+
if (!initialSetupDoneRef.current) {
|
|
95
|
+
// Query for existing companion chats linked to this object.
|
|
96
|
+
const existingChats = await space.db
|
|
97
|
+
.query(Query.select(Filter.id(companionTo.id)).targetOf(Chat.CompanionTo).source())
|
|
98
|
+
.run();
|
|
99
|
+
|
|
100
|
+
initialSetupDoneRef.current = true;
|
|
101
|
+
|
|
102
|
+
// Use existing chat if found on initial mount.
|
|
103
|
+
if (existingChats.length > 0) {
|
|
104
|
+
const existingChat = existingChats.at(-1) as Assistant.Chat;
|
|
105
|
+
setChat(existingChat);
|
|
106
|
+
await invokePromise(AssistantOperation.SetCurrentChat, { companionTo, chat: existingChat });
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Create chat in-memory only - it will be added to space on first message.
|
|
112
|
+
const { data: createResult } = await invokePromise(AssistantOperation.CreateChat, {
|
|
113
|
+
db: space.db,
|
|
114
|
+
addToSpace: false,
|
|
115
|
+
});
|
|
116
|
+
setChat(createResult?.object);
|
|
117
|
+
}, [chat, space, companionTo, invokePromise]);
|
|
52
118
|
|
|
53
|
-
// Add chat to space when user submits the first message.
|
|
119
|
+
// Add chat to space and create relation when user submits the first message.
|
|
54
120
|
const handleEvent = useCallback(
|
|
55
121
|
async (event: ChatEvent) => {
|
|
56
|
-
|
|
57
|
-
if (chatInSpace || !chat || !space) {
|
|
122
|
+
if (!chat || !space) {
|
|
58
123
|
return;
|
|
59
124
|
}
|
|
60
125
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
createIntent(AssistantAction.SetCurrentChat, {
|
|
79
|
-
companionTo,
|
|
80
|
-
chat,
|
|
81
|
-
}),
|
|
82
|
-
);
|
|
126
|
+
// If chat is not in space yet, persist it on first submit.
|
|
127
|
+
if (event.type === 'submit' && !getSpace(chat)) {
|
|
128
|
+
await invokePromise(SpaceOperation.AddObject, {
|
|
129
|
+
object: chat,
|
|
130
|
+
target: space.db,
|
|
131
|
+
hidden: true,
|
|
132
|
+
});
|
|
133
|
+
await invokePromise(SpaceOperation.AddRelation, {
|
|
134
|
+
db: space.db,
|
|
135
|
+
schema: Chat.CompanionTo,
|
|
136
|
+
source: chat,
|
|
137
|
+
target: companionTo,
|
|
138
|
+
});
|
|
139
|
+
await invokePromise(AssistantOperation.SetCurrentChat, {
|
|
140
|
+
companionTo,
|
|
141
|
+
chat,
|
|
142
|
+
});
|
|
83
143
|
}
|
|
84
144
|
},
|
|
85
|
-
[chat, space, companionTo,
|
|
145
|
+
[chat, space, companionTo, invokePromise],
|
|
86
146
|
);
|
|
87
147
|
|
|
88
|
-
const metadata = useCapabilities(
|
|
148
|
+
const metadata = useCapabilities(AppCapabilities.Metadata);
|
|
89
149
|
const blueprintKeys = useMemo(
|
|
90
150
|
() =>
|
|
91
151
|
Function.pipe(
|
|
@@ -103,7 +163,7 @@ export const ChatCompanion = forwardRef<HTMLDivElement, ChatCompanionProps>(
|
|
|
103
163
|
),
|
|
104
164
|
[metadata, companionTo],
|
|
105
165
|
);
|
|
106
|
-
const existingBlueprints = useQuery(space, Filter.type(Blueprint.Blueprint));
|
|
166
|
+
const existingBlueprints = useQuery(space?.db, Filter.type(Blueprint.Blueprint));
|
|
107
167
|
const pluginBlueprints = useMemo(
|
|
108
168
|
() => existingBlueprints.filter((blueprint) => blueprintKeys.includes(blueprint.key)),
|
|
109
169
|
[existingBlueprints, blueprintKeys],
|
|
@@ -128,7 +188,7 @@ export const ChatCompanion = forwardRef<HTMLDivElement, ChatCompanionProps>(
|
|
|
128
188
|
continue;
|
|
129
189
|
}
|
|
130
190
|
|
|
131
|
-
space.db.add(Obj.clone(blueprint));
|
|
191
|
+
space.db.add(Obj.clone(blueprint, { deep: true }));
|
|
132
192
|
}
|
|
133
193
|
}, [space, blueprintRegistry, blueprintKeys]);
|
|
134
194
|
|
|
@@ -154,7 +214,7 @@ export const ChatCompanion = forwardRef<HTMLDivElement, ChatCompanionProps>(
|
|
|
154
214
|
<ChatContainer
|
|
155
215
|
role={role}
|
|
156
216
|
space={space}
|
|
157
|
-
|
|
217
|
+
subject={chat}
|
|
158
218
|
companionTo={companionTo}
|
|
159
219
|
onEvent={handleEvent}
|
|
160
220
|
ref={forwardedRef}
|
|
@@ -4,30 +4,30 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { forwardRef } from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { useAtomCapability } from '@dxos/app-framework/ui';
|
|
8
|
+
import { type SurfaceComponentProps } from '@dxos/app-toolkit/ui';
|
|
9
9
|
import { type Space, getSpace } from '@dxos/client/echo';
|
|
10
10
|
import { type Obj } from '@dxos/echo';
|
|
11
|
-
import {
|
|
11
|
+
import { Layout } from '@dxos/react-ui';
|
|
12
12
|
|
|
13
13
|
import { useBlueprintRegistry, useChatProcessor, useChatServices, useOnline, usePresets } from '../hooks';
|
|
14
|
-
import {
|
|
15
|
-
import { type Assistant } from '../types';
|
|
14
|
+
import { AssistantCapabilities, type ChatType } from '../types';
|
|
16
15
|
|
|
17
|
-
import { Chat, type ChatRootProps } from './Chat';
|
|
16
|
+
import { Chat as ChatComponent, type ChatRootProps } from './Chat';
|
|
18
17
|
|
|
19
|
-
export type ChatContainerProps =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
} & Pick<ChatRootProps, 'onEvent'
|
|
18
|
+
export type ChatContainerProps = SurfaceComponentProps<
|
|
19
|
+
ChatType.Chat | undefined,
|
|
20
|
+
{
|
|
21
|
+
space?: Space;
|
|
22
|
+
companionTo?: Obj.Unknown;
|
|
23
|
+
} & Pick<ChatRootProps, 'onEvent'>
|
|
24
|
+
>;
|
|
25
25
|
|
|
26
26
|
export const ChatContainer = forwardRef<HTMLDivElement, ChatContainerProps>((props, forwardedRef) => {
|
|
27
|
-
const { space: spaceProp,
|
|
27
|
+
const { role, subject: chat, space: spaceProp, companionTo, onEvent } = props;
|
|
28
28
|
const space = spaceProp ?? getSpace(chat);
|
|
29
|
-
const settings =
|
|
30
|
-
const services = useChatServices({ space, chat });
|
|
29
|
+
const settings = useAtomCapability(AssistantCapabilities.Settings);
|
|
30
|
+
const services = useChatServices({ id: space?.id, chat });
|
|
31
31
|
const [online, setOnline] = useOnline();
|
|
32
32
|
const { preset, ...chatProps } = usePresets(online);
|
|
33
33
|
const blueprintRegistry = useBlueprintRegistry();
|
|
@@ -45,17 +45,23 @@ export const ChatContainer = forwardRef<HTMLDivElement, ChatContainerProps>((pro
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
return (
|
|
48
|
-
<
|
|
49
|
-
<
|
|
50
|
-
<
|
|
51
|
-
<
|
|
52
|
-
<
|
|
48
|
+
<Layout.Main toolbar role={role} ref={forwardedRef}>
|
|
49
|
+
<ChatComponent.Root db={space?.db} chat={chat} processor={processor} onEvent={onEvent}>
|
|
50
|
+
<ChatComponent.Toolbar companionTo={companionTo} />
|
|
51
|
+
<ChatComponent.Viewport classNames='container-max-width'>
|
|
52
|
+
<ChatComponent.Thread />
|
|
53
53
|
<div role='none' className='p-4'>
|
|
54
|
-
<
|
|
54
|
+
<ChatComponent.Prompt
|
|
55
|
+
{...chatProps}
|
|
56
|
+
outline
|
|
57
|
+
preset={preset?.id}
|
|
58
|
+
online={online}
|
|
59
|
+
onOnlineChange={setOnline}
|
|
60
|
+
/>
|
|
55
61
|
</div>
|
|
56
|
-
</
|
|
57
|
-
</
|
|
58
|
-
</
|
|
62
|
+
</ChatComponent.Viewport>
|
|
63
|
+
</ChatComponent.Root>
|
|
64
|
+
</Layout.Main>
|
|
59
65
|
);
|
|
60
66
|
});
|
|
61
67
|
|
|
@@ -4,28 +4,28 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback, useState } from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { useAtomCapability } from '@dxos/app-framework/ui';
|
|
8
|
+
import { type Chat as ChatTypes } from '@dxos/assistant-toolkit';
|
|
9
|
+
import { Obj } from '@dxos/echo';
|
|
10
10
|
import { useTranslation } from '@dxos/react-ui';
|
|
11
11
|
import { ChatDialog as NaturalChatDialog } from '@dxos/react-ui-chat';
|
|
12
12
|
|
|
13
13
|
import { useBlueprintRegistry, useChatProcessor, useChatServices, useOnline, usePresets } from '../hooks';
|
|
14
14
|
import { meta } from '../meta';
|
|
15
|
-
import {
|
|
15
|
+
import { AssistantCapabilities } from '../types';
|
|
16
16
|
|
|
17
17
|
import { Chat, type ChatRootProps } from './Chat';
|
|
18
18
|
|
|
19
19
|
export type ChatDialogProps = {
|
|
20
|
-
chat?:
|
|
20
|
+
chat?: ChatTypes.Chat;
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
export const ChatDialog = ({ chat }: ChatDialogProps) => {
|
|
24
24
|
const { t } = useTranslation(meta.id);
|
|
25
25
|
|
|
26
|
-
const
|
|
27
|
-
const settings =
|
|
28
|
-
const services = useChatServices({
|
|
26
|
+
const db = chat && Obj.getDatabase(chat);
|
|
27
|
+
const settings = useAtomCapability(AssistantCapabilities.Settings);
|
|
28
|
+
const services = useChatServices({ id: db?.spaceId, chat });
|
|
29
29
|
const [online, setOnline] = useOnline();
|
|
30
30
|
const { preset, ...chatProps } = usePresets(online);
|
|
31
31
|
const blueprintRegistry = useBlueprintRegistry();
|
|
@@ -4,26 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
6
6
|
|
|
7
|
+
import { type Chat } from '@dxos/assistant-toolkit';
|
|
7
8
|
import { addEventListener } from '@dxos/async';
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
import { type Assistant } from '../../types';
|
|
11
|
-
|
|
12
|
-
// TODO(burdon): Reset after each session.
|
|
13
|
-
// TODO(burdon): Show after delay.
|
|
14
|
-
// TODO(burdon): Test with errors.
|
|
15
|
-
// TODO(burdon): Filter out empty trace messages.
|
|
16
|
-
|
|
17
|
-
// {
|
|
18
|
-
// "id": "01K3TE3C2VAXETP500QKDHK3C4_block_3",
|
|
19
|
-
// "branch": "main",
|
|
20
|
-
// "parents": [],
|
|
21
|
-
// "icon": "ph--robot--regular",
|
|
22
|
-
// "message": "\n"
|
|
23
|
-
// }
|
|
9
|
+
import { ProgressBar, type ProgressBarProps, TextCrawl, useExecutionGraph } from '@dxos/react-ui-components';
|
|
24
10
|
|
|
25
11
|
export type ChatProgressProps = {
|
|
26
|
-
chat:
|
|
12
|
+
chat: Chat.Chat;
|
|
27
13
|
};
|
|
28
14
|
|
|
29
15
|
export const ChatProgress = ({ chat }: ChatProgressProps) => {
|
|
@@ -59,9 +45,9 @@ export const ChatProgress = ({ chat }: ChatProgressProps) => {
|
|
|
59
45
|
}, [nodes.length]);
|
|
60
46
|
|
|
61
47
|
return (
|
|
62
|
-
<
|
|
48
|
+
<div role='none' tabIndex={0} ref={ref} className='flex flex-col outline-none'>
|
|
63
49
|
<ProgressBar nodes={nodes} index={index} onSelect={handleSelect} />
|
|
64
50
|
<TextCrawl classNames='pis-4 text-sm text-description' lines={lines} autoAdvance />
|
|
65
|
-
</
|
|
51
|
+
</div>
|
|
66
52
|
);
|
|
67
53
|
};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import React, { type PropsWithChildren } from 'react';
|
|
6
6
|
|
|
7
7
|
import { IconButton, type ThemedClassName, useTranslation } from '@dxos/react-ui';
|
|
8
|
-
import { mx } from '@dxos/
|
|
8
|
+
import { mx } from '@dxos/ui-theme';
|
|
9
9
|
|
|
10
10
|
import { meta } from '../../meta';
|
|
11
11
|
import { type ChatEvent } from '../Chat';
|
|
@@ -50,6 +50,14 @@ export const ChatActions = ({ classNames, children, microphone, recording, proce
|
|
|
50
50
|
onTouchEnd={() => onEvent?.({ type: 'record-stop' })}
|
|
51
51
|
/>
|
|
52
52
|
)}
|
|
53
|
+
|
|
54
|
+
<IconButton
|
|
55
|
+
variant='ghost'
|
|
56
|
+
icon='ph--wrench--regular'
|
|
57
|
+
iconOnly
|
|
58
|
+
label={t('debug button')}
|
|
59
|
+
onClick={() => onEvent?.({ type: 'toggle-debug' })}
|
|
60
|
+
/>
|
|
53
61
|
</div>
|
|
54
62
|
);
|
|
55
63
|
};
|
|
@@ -6,10 +6,10 @@ import React, { type JSX, useMemo, useState } from 'react';
|
|
|
6
6
|
|
|
7
7
|
import { type AiContextBinder } from '@dxos/assistant';
|
|
8
8
|
import { type Blueprint } from '@dxos/blueprints';
|
|
9
|
-
import { Filter, Obj, Type } from '@dxos/echo';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { Listbox, SearchList } from '@dxos/react-ui-searchlist';
|
|
9
|
+
import { type Database, Filter, Obj, Type } from '@dxos/echo';
|
|
10
|
+
import { useQuery } from '@dxos/react-client/echo';
|
|
11
|
+
import { IconButton, Popover, Select, useTranslation } from '@dxos/react-ui';
|
|
12
|
+
import { Listbox, SearchList, useSearchListResults } from '@dxos/react-ui-searchlist';
|
|
13
13
|
import { Tabs } from '@dxos/react-ui-tabs';
|
|
14
14
|
|
|
15
15
|
import {
|
|
@@ -24,7 +24,7 @@ import { meta } from '../../meta';
|
|
|
24
24
|
const panelClassNames = 'is-[calc(100dvw-.5rem)] sm:is-max md:is-72 max-is-[--text-content]';
|
|
25
25
|
|
|
26
26
|
export type ChatOptionsProps = {
|
|
27
|
-
|
|
27
|
+
db: Database.Database;
|
|
28
28
|
context: AiContextBinder;
|
|
29
29
|
blueprintRegistry?: Blueprint.Registry;
|
|
30
30
|
presets?: { id: string; label: string }[];
|
|
@@ -35,14 +35,7 @@ export type ChatOptionsProps = {
|
|
|
35
35
|
/**
|
|
36
36
|
* Manages the runtime context for the chat.
|
|
37
37
|
*/
|
|
38
|
-
export const ChatOptions = ({
|
|
39
|
-
space,
|
|
40
|
-
context,
|
|
41
|
-
blueprintRegistry,
|
|
42
|
-
presets,
|
|
43
|
-
preset,
|
|
44
|
-
onPresetChange,
|
|
45
|
-
}: ChatOptionsProps) => {
|
|
38
|
+
export const ChatOptions = ({ db, context, blueprintRegistry, presets, preset, onPresetChange }: ChatOptionsProps) => {
|
|
46
39
|
const { t } = useTranslation(meta.id);
|
|
47
40
|
|
|
48
41
|
return (
|
|
@@ -54,7 +47,7 @@ export const ChatOptions = ({
|
|
|
54
47
|
<Popover.Portal>
|
|
55
48
|
<Popover.Content side='top' classNames={panelClassNames}>
|
|
56
49
|
<Popover.Viewport>
|
|
57
|
-
<ObjectsPanel
|
|
50
|
+
<ObjectsPanel db={db} context={context} />
|
|
58
51
|
</Popover.Viewport>
|
|
59
52
|
<Popover.Arrow />
|
|
60
53
|
</Popover.Content>
|
|
@@ -76,7 +69,7 @@ export const ChatOptions = ({
|
|
|
76
69
|
<Tabs.Root orientation='horizontal' defaultValue='blueprints' defaultActivePart='list' tabIndex={-1}>
|
|
77
70
|
<Tabs.Viewport classNames='max-bs-[--radix-popover-content-available-height] grid grid-rows-[1fr_min-content] [&_[cmdk-root]]:contents [&_[role="tabpanel"]]:grid [&_[role="tabpanel"]]:grid-rows-[1fr_min-content] [&_[role="listbox"]]:min-bs-0 [&_[role="listbox"]]:overflow-y-auto [&_[role="tabpanel"]]:min-bs-0 [&_[role="tabpanel"]]:pli-cardSpacingChrome [&_[role="tabpanel"][data-state="active"]]:order-first [&_[role="tabpanel"][data-state="inactive"]]:hidden'>
|
|
78
71
|
<Tabs.Tabpanel value='blueprints' tabIndex={-1} classNames='dx-focus-ring-inset'>
|
|
79
|
-
<BlueprintsPanel blueprintRegistry={blueprintRegistry}
|
|
72
|
+
<BlueprintsPanel blueprintRegistry={blueprintRegistry} db={db} context={context} />
|
|
80
73
|
</Tabs.Tabpanel>
|
|
81
74
|
<Tabs.Tabpanel value='model' tabIndex={-1} classNames='dx-focus-ring-inset !pli-0'>
|
|
82
75
|
<ModelsPanel presets={presets} preset={preset} onPresetChange={onPresetChange} />
|
|
@@ -102,32 +95,38 @@ export const ChatOptions = ({
|
|
|
102
95
|
|
|
103
96
|
const BlueprintsPanel = ({
|
|
104
97
|
blueprintRegistry,
|
|
105
|
-
|
|
98
|
+
db,
|
|
106
99
|
context,
|
|
107
|
-
}: Pick<ChatOptionsProps, 'blueprintRegistry' | '
|
|
100
|
+
}: Pick<ChatOptionsProps, 'blueprintRegistry' | 'db' | 'context'>) => {
|
|
108
101
|
const { t } = useTranslation(meta.id);
|
|
109
102
|
|
|
110
|
-
const blueprints = useBlueprints({ blueprintRegistry,
|
|
103
|
+
const blueprints = useBlueprints({ blueprintRegistry, db });
|
|
111
104
|
const activeBlueprints = useActiveBlueprints({ context });
|
|
112
|
-
const { onUpdateBlueprint } = useBlueprintHandlers({
|
|
105
|
+
const { onUpdateBlueprint } = useBlueprintHandlers({ db, context, blueprintRegistry });
|
|
106
|
+
|
|
107
|
+
const { results, handleSearch } = useSearchListResults({
|
|
108
|
+
items: blueprints,
|
|
109
|
+
extract: (blueprint) => blueprint.name,
|
|
110
|
+
});
|
|
113
111
|
|
|
114
112
|
return (
|
|
115
|
-
<SearchList.Root>
|
|
113
|
+
<SearchList.Root onSearch={handleSearch}>
|
|
116
114
|
<SearchList.Content classNames='plb-cardSpacingChrome'>
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
115
|
+
<SearchList.Viewport>
|
|
116
|
+
{results.map((blueprint) => {
|
|
117
|
+
const isActive = activeBlueprints.has(blueprint.key);
|
|
118
|
+
return (
|
|
119
|
+
<SearchList.Item
|
|
120
|
+
classNames='flex items-center overflow-hidden'
|
|
121
|
+
key={blueprint.key}
|
|
122
|
+
value={blueprint.key}
|
|
123
|
+
label={blueprint.name}
|
|
124
|
+
checked={isActive}
|
|
125
|
+
onSelect={() => onUpdateBlueprint?.(blueprint.key, !isActive)}
|
|
126
|
+
/>
|
|
127
|
+
);
|
|
128
|
+
})}
|
|
129
|
+
</SearchList.Viewport>
|
|
131
130
|
</SearchList.Content>
|
|
132
131
|
<SearchList.Input placeholder={t('search placeholder')} classNames='mbe-cardSpacingChrome' autoFocus />
|
|
133
132
|
</SearchList.Root>
|
|
@@ -155,11 +154,11 @@ const ModelsPanel = ({
|
|
|
155
154
|
|
|
156
155
|
const ANY = '__any__';
|
|
157
156
|
|
|
158
|
-
const ObjectsPanel = ({
|
|
157
|
+
const ObjectsPanel = ({ db, context }: Pick<ChatOptionsProps, 'db' | 'context'>): JSX.Element => {
|
|
159
158
|
const { t } = useTranslation(meta.id);
|
|
160
159
|
|
|
161
160
|
// Item types sorted by label.
|
|
162
|
-
const types = useFilteredTypes(
|
|
161
|
+
const types = useFilteredTypes(db);
|
|
163
162
|
const typenames = useMemo(() => {
|
|
164
163
|
const typenames = types.map((type) => {
|
|
165
164
|
const typename = Type.getTypename(type);
|
|
@@ -181,31 +180,36 @@ const ObjectsPanel = ({ space, context }: Pick<ChatOptionsProps, 'space' | 'cont
|
|
|
181
180
|
);
|
|
182
181
|
|
|
183
182
|
// Context objects.
|
|
184
|
-
const objects = useQuery(
|
|
185
|
-
const { objects: contextObjects, onUpdateObject } = useContextObjects({
|
|
183
|
+
const objects = useQuery(db, typename === ANY ? anyFilter : Filter.typename(typename));
|
|
184
|
+
const { objects: contextObjects, onUpdateObject } = useContextObjects({ db, context });
|
|
185
|
+
|
|
186
|
+
const { results, handleSearch } = useSearchListResults({
|
|
187
|
+
items: objects,
|
|
188
|
+
extract: (object) => Obj.getLabel(object) ?? Obj.getTypename(object) ?? object.id,
|
|
189
|
+
});
|
|
186
190
|
|
|
187
191
|
return (
|
|
188
|
-
<SearchList.Root>
|
|
192
|
+
<SearchList.Root onSearch={handleSearch}>
|
|
189
193
|
<SearchList.Content classNames='p-cardSpacingChrome [&:has([cmdk-list-sizer]:empty)]:plb-0'>
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
)
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
194
|
+
<SearchList.Viewport>
|
|
195
|
+
{results.length ? (
|
|
196
|
+
results.map((object) => {
|
|
197
|
+
const isActive = contextObjects.findIndex((obj) => obj.id === object.id) !== -1;
|
|
198
|
+
return (
|
|
199
|
+
<SearchList.Item
|
|
200
|
+
classNames='flex items-center overflow-hidden'
|
|
201
|
+
key={object.id}
|
|
202
|
+
value={object.id}
|
|
203
|
+
label={Obj.getLabel(object) ?? Obj.getTypename(object) ?? object.id}
|
|
204
|
+
checked={isActive}
|
|
205
|
+
onSelect={() => onUpdateObject?.(Obj.getDXN(object), !isActive)}
|
|
206
|
+
/>
|
|
207
|
+
);
|
|
208
|
+
})
|
|
209
|
+
) : (
|
|
210
|
+
<SearchList.Item value='__empty__' label={t('no results')} />
|
|
211
|
+
)}
|
|
212
|
+
</SearchList.Viewport>
|
|
209
213
|
</SearchList.Content>
|
|
210
214
|
|
|
211
215
|
<div role='none' className='grid grid-cols-[min-content_1fr] gap-2 pli-cardSpacingChrome mbe-cardSpacingChrome'>
|
|
@@ -5,22 +5,21 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
7
|
import { type AiContextBinder } from '@dxos/assistant';
|
|
8
|
-
import { Obj } from '@dxos/echo';
|
|
9
|
-
import { type Space } from '@dxos/react-client/echo';
|
|
8
|
+
import { type Database, Obj } from '@dxos/echo';
|
|
10
9
|
import { IconButton, type Label, type ThemedClassName, toLocalizedString, useTranslation } from '@dxos/react-ui';
|
|
11
|
-
import { mx } from '@dxos/
|
|
10
|
+
import { mx } from '@dxos/ui-theme';
|
|
12
11
|
|
|
13
12
|
import { useContextObjects } from '../../hooks';
|
|
14
13
|
import { meta } from '../../meta';
|
|
15
14
|
|
|
16
15
|
export type ChatReferencesProps = ThemedClassName<{
|
|
17
16
|
context: AiContextBinder;
|
|
18
|
-
|
|
17
|
+
db: Database.Database;
|
|
19
18
|
}>;
|
|
20
19
|
|
|
21
|
-
export const ChatReferences = ({ classNames, context,
|
|
20
|
+
export const ChatReferences = ({ classNames, context, db }: ChatReferencesProps) => {
|
|
22
21
|
const { t } = useTranslation(meta.id);
|
|
23
|
-
const { objects, onUpdateObject } = useContextObjects({
|
|
22
|
+
const { objects, onUpdateObject } = useContextObjects({ db, context });
|
|
24
23
|
|
|
25
24
|
return (
|
|
26
25
|
<ul className={mx('flex', classNames)}>
|
|
@@ -6,7 +6,7 @@ import React, { useEffect, useState } from 'react';
|
|
|
6
6
|
|
|
7
7
|
import { type ThemedClassName, Tooltip, useTimeout } from '@dxos/react-ui';
|
|
8
8
|
import { Spinner, type SpinnerProps } from '@dxos/react-ui-sfx';
|
|
9
|
-
import { mx } from '@dxos/
|
|
9
|
+
import { mx } from '@dxos/ui-theme';
|
|
10
10
|
|
|
11
11
|
const period = 3_000;
|
|
12
12
|
|