@dxos/plugin-assistant 0.8.4-main.3eb6e50203 → 0.8.4-main.4a85c3132b
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/AssistantSettings-2LFAG5OQ.mjs +93 -0
- package/dist/lib/browser/AssistantSettings-2LFAG5OQ.mjs.map +7 -0
- package/dist/lib/browser/BlueprintArticle-CCS25MNW.mjs +36 -0
- package/dist/lib/browser/BlueprintArticle-CCS25MNW.mjs.map +7 -0
- package/dist/lib/browser/{ChatCompanion-CAKFZAWN.mjs → ChatCompanion-UGD4V34A.mjs} +11 -9
- package/dist/lib/browser/ChatCompanion-UGD4V34A.mjs.map +7 -0
- package/dist/lib/browser/ChatContainer-ZGRSZ5EU.mjs +12 -0
- package/dist/lib/browser/{ChatDialog-ASVBLOOS.mjs → ChatDialog-AET7GVIB.mjs} +7 -7
- package/dist/lib/browser/ChatDialog-AET7GVIB.mjs.map +7 -0
- package/dist/lib/browser/ProjectArticle-QDBTIFNE.mjs +91 -0
- package/dist/lib/browser/ProjectArticle-QDBTIFNE.mjs.map +7 -0
- package/dist/lib/browser/ProjectSettings-R6RRARLO.mjs +194 -0
- package/dist/lib/browser/ProjectSettings-R6RRARLO.mjs.map +7 -0
- package/dist/lib/browser/PromptArticle-USQO4WX6.mjs +71 -0
- package/dist/lib/browser/PromptArticle-USQO4WX6.mjs.map +7 -0
- package/dist/lib/browser/TriggerStatus-65X3EUSN.mjs +122 -0
- package/dist/lib/browser/TriggerStatus-65X3EUSN.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-builder-MUZGUQSC.mjs → app-graph-builder-SFYYUKTT.mjs} +3 -3
- package/dist/lib/{node-esm/app-graph-builder-4QN5M6PD.mjs.map → browser/app-graph-builder-SFYYUKTT.mjs.map} +2 -2
- package/dist/lib/browser/blueprint-definition-5LQNBZON.mjs +35 -0
- package/dist/lib/browser/blueprint-definition-5LQNBZON.mjs.map +7 -0
- package/dist/lib/browser/blueprints/index.mjs +3 -7
- package/dist/lib/browser/{chunk-6BVCG5SJ.mjs → chunk-7DXYAXLZ.mjs} +8 -8
- package/dist/lib/browser/chunk-7DXYAXLZ.mjs.map +7 -0
- package/dist/lib/browser/{chunk-IJYAKPEU.mjs → chunk-JYY5AD65.mjs} +27 -27
- package/dist/lib/browser/chunk-JYY5AD65.mjs.map +7 -0
- package/dist/lib/browser/chunk-LEXIQDXZ.mjs +26 -0
- package/dist/lib/browser/chunk-LEXIQDXZ.mjs.map +7 -0
- package/dist/lib/browser/{ChatContainer-QB37VONJ.mjs → chunk-RU4G5NY4.mjs} +17 -21
- package/dist/lib/browser/chunk-RU4G5NY4.mjs.map +7 -0
- package/dist/lib/browser/{chunk-JA7PUZC7.mjs → chunk-UUA6GNGG.mjs} +544 -393
- package/dist/lib/browser/chunk-UUA6GNGG.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +38 -54
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{operation-resolver-2673CFJS.mjs → operation-resolver-ELXDQZEG.mjs} +23 -20
- package/dist/lib/browser/operation-resolver-ELXDQZEG.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-T3FN4GVP.mjs → react-surface-KYQSZO2I.mjs} +42 -23
- package/dist/lib/browser/react-surface-KYQSZO2I.mjs.map +7 -0
- package/dist/lib/browser/{repair-IRXDYF4R.mjs → repair-ZFZWZALX.mjs} +9 -8
- package/dist/lib/browser/repair-ZFZWZALX.mjs.map +7 -0
- package/dist/lib/browser/{settings-XF6GKHCG.mjs → settings-YREVQAZ5.mjs} +2 -2
- package/dist/lib/browser/{state-OYDPWLKA.mjs → state-MPG42ZO4.mjs} +2 -2
- package/dist/lib/browser/toolkit-XRSBBB3L.mjs +16 -0
- package/dist/lib/browser/toolkit-XRSBBB3L.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +1 -1
- package/dist/lib/node-esm/AssistantSettings-QWFEMJG7.mjs +94 -0
- package/dist/lib/node-esm/AssistantSettings-QWFEMJG7.mjs.map +7 -0
- package/dist/lib/node-esm/BlueprintArticle-SNEN6LOY.mjs +37 -0
- package/dist/lib/node-esm/BlueprintArticle-SNEN6LOY.mjs.map +7 -0
- package/dist/lib/node-esm/{ChatCompanion-W4PGOCGR.mjs → ChatCompanion-NP4R5BFE.mjs} +11 -9
- package/dist/lib/node-esm/ChatCompanion-NP4R5BFE.mjs.map +7 -0
- package/dist/lib/node-esm/ChatContainer-IFHDIFJH.mjs +13 -0
- package/dist/lib/node-esm/{ChatDialog-AFLPYSIU.mjs → ChatDialog-UZNQBTKZ.mjs} +7 -7
- package/dist/lib/node-esm/ChatDialog-UZNQBTKZ.mjs.map +7 -0
- package/dist/lib/node-esm/ProjectArticle-BCIBESJN.mjs +92 -0
- package/dist/lib/node-esm/ProjectArticle-BCIBESJN.mjs.map +7 -0
- package/dist/lib/node-esm/ProjectSettings-Q5QY6BYS.mjs +195 -0
- package/dist/lib/node-esm/ProjectSettings-Q5QY6BYS.mjs.map +7 -0
- package/dist/lib/node-esm/PromptArticle-PGMJMQK7.mjs +72 -0
- package/dist/lib/node-esm/PromptArticle-PGMJMQK7.mjs.map +7 -0
- package/dist/lib/node-esm/TriggerStatus-UR5S7PXJ.mjs +123 -0
- package/dist/lib/node-esm/TriggerStatus-UR5S7PXJ.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-builder-4QN5M6PD.mjs → app-graph-builder-E25JXI34.mjs} +3 -3
- package/dist/lib/node-esm/app-graph-builder-E25JXI34.mjs.map +7 -0
- package/dist/lib/node-esm/blueprint-definition-CMJWGGJO.mjs +36 -0
- package/dist/lib/node-esm/blueprint-definition-CMJWGGJO.mjs.map +7 -0
- package/dist/lib/node-esm/blueprints/index.mjs +3 -7
- package/dist/lib/node-esm/chunk-3QBVFAYO.mjs +28 -0
- package/dist/lib/node-esm/chunk-3QBVFAYO.mjs.map +7 -0
- package/dist/lib/node-esm/{ChatContainer-ECFQVH6O.mjs → chunk-6NCLKQCL.mjs} +17 -21
- package/dist/lib/node-esm/chunk-6NCLKQCL.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-3XC7LQSO.mjs → chunk-GZ4ERNT2.mjs} +544 -393
- package/dist/lib/node-esm/chunk-GZ4ERNT2.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-MJD5XWQV.mjs → chunk-JMBYVUD6.mjs} +27 -27
- package/dist/lib/node-esm/chunk-JMBYVUD6.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-LB72WG6R.mjs → chunk-MWYYLALM.mjs} +8 -8
- package/dist/lib/node-esm/chunk-MWYYLALM.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +38 -54
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{operation-resolver-2ZD2DXOU.mjs → operation-resolver-Q5GNP2GH.mjs} +23 -20
- package/dist/lib/node-esm/operation-resolver-Q5GNP2GH.mjs.map +7 -0
- package/dist/lib/node-esm/{react-surface-T4VMCCKZ.mjs → react-surface-JJRGVGKD.mjs} +42 -23
- package/dist/lib/node-esm/react-surface-JJRGVGKD.mjs.map +7 -0
- package/dist/lib/node-esm/{repair-DMI55PON.mjs → repair-LXFVOK4B.mjs} +9 -8
- package/dist/lib/node-esm/repair-LXFVOK4B.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-NGGZA7S7.mjs → settings-N452OW6Y.mjs} +2 -2
- package/dist/lib/node-esm/{state-VSCPGN7R.mjs → state-WHZFKIEL.mjs} +2 -2
- package/dist/lib/node-esm/{toolkit-JPRJRDDB.mjs → toolkit-5IWGLUF4.mjs} +3 -6
- package/dist/lib/node-esm/toolkit-5IWGLUF4.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +1 -1
- package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
- package/dist/types/src/blueprints/assistant/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/assistant/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/assistant/blueprint.test.d.ts +2 -0
- package/dist/types/src/blueprints/assistant/blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/assistant/index.d.ts +2 -0
- package/dist/types/src/blueprints/assistant/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/index.d.ts +1 -6
- package/dist/types/src/blueprints/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/ai-service/ai-service.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +2 -22
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +1 -1
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts +1 -2
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/edge-model-resolver/edge-model-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/edge-model-resolver/edge-model-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/local-model-resolver/local-model-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/local-model-resolver/local-model-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/repair/repair.d.ts +1 -1
- package/dist/types/src/capabilities/repair/repair.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings/settings.d.ts +1 -1
- package/dist/types/src/capabilities/state/state.d.ts +1 -1
- package/dist/types/src/capabilities/toolkit/index.d.ts +1 -1
- package/dist/types/src/capabilities/toolkit/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/toolkit/toolkit.d.ts +1 -1
- package/dist/types/src/capabilities/toolkit/toolkit.d.ts.map +1 -1
- package/dist/types/src/components/Chat/Chat.d.ts +6 -5
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.d.ts +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +15 -15
- package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/sync.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +14 -14
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +14 -14
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +14 -14
- package/dist/types/src/components/Typewriter/AssistantToolbar.d.ts +2 -2
- package/dist/types/src/components/Typewriter/AssistantToolbar.d.ts.map +1 -1
- package/dist/types/src/components/Typewriter/Typewriter.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -11
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/{components → containers}/AssistantSettings/AssistantSettings.d.ts.map +1 -1
- package/dist/types/src/containers/AssistantSettings/index.d.ts +3 -0
- package/dist/types/src/containers/AssistantSettings/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/BlueprintArticle}/BlueprintArticle.d.ts +0 -1
- package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts.map +1 -0
- package/dist/types/src/containers/BlueprintArticle/index.d.ts +3 -0
- package/dist/types/src/containers/BlueprintArticle/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/ChatCompanion}/ChatCompanion.d.ts +0 -1
- package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts.map +1 -0
- package/dist/types/src/containers/ChatCompanion/index.d.ts +3 -0
- package/dist/types/src/containers/ChatCompanion/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/ChatContainer}/ChatContainer.d.ts +2 -3
- package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts.map +1 -0
- package/dist/types/src/containers/ChatContainer/index.d.ts +3 -0
- package/dist/types/src/containers/ChatContainer/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/ChatDialog}/ChatDialog.d.ts +0 -1
- package/dist/types/src/containers/ChatDialog/ChatDialog.d.ts.map +1 -0
- package/dist/types/src/containers/ChatDialog/index.d.ts +3 -0
- package/dist/types/src/containers/ChatDialog/index.d.ts.map +1 -0
- package/dist/types/src/containers/Project/ProjectArticle.d.ts +7 -0
- package/dist/types/src/containers/Project/ProjectArticle.d.ts.map +1 -0
- package/dist/types/src/containers/Project/ProjectSettings.d.ts +6 -0
- package/dist/types/src/containers/Project/ProjectSettings.d.ts.map +1 -0
- package/dist/types/src/containers/Project/index.d.ts +7 -0
- package/dist/types/src/containers/Project/index.d.ts.map +1 -0
- package/dist/types/src/containers/Project/triggers.d.ts +6 -0
- package/dist/types/src/containers/Project/triggers.d.ts.map +1 -0
- package/dist/types/src/{components → containers/PromptArticle}/PromptArticle.d.ts +0 -1
- package/dist/types/src/containers/PromptArticle/PromptArticle.d.ts.map +1 -0
- package/dist/types/src/containers/PromptArticle/index.d.ts +3 -0
- package/dist/types/src/containers/PromptArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts +4 -0
- package/dist/types/src/{components → containers}/TriggerStatus/TriggerStatus.d.ts.map +1 -1
- package/dist/types/src/containers/TriggerStatus/index.d.ts +3 -0
- package/dist/types/src/containers/TriggerStatus/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +10 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -1
- package/dist/types/src/hooks/useFilteredTypes.d.ts +1 -1
- package/dist/types/src/hooks/useFilteredTypes.d.ts.map +1 -1
- package/dist/types/src/hooks/useReferencesProvider.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/processor/processor.d.ts +1 -1
- package/dist/types/src/processor/processor.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +14 -14
- package/dist/types/src/types/AssistantAction.d.ts +7 -11
- package/dist/types/src/types/AssistantAction.d.ts.map +1 -1
- package/dist/types/src/types/service.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +82 -82
- package/src/AssistantPlugin.tsx +12 -9
- package/src/blueprints/assistant/blueprint.conversations.json +1 -0
- package/src/blueprints/assistant/blueprint.test.ts +48 -0
- package/src/blueprints/assistant/blueprint.ts +27 -0
- package/src/blueprints/assistant/index.ts +5 -0
- package/src/blueprints/index.ts +1 -8
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +1 -3
- package/src/capabilities/blueprint-definition/blueprint-definition.ts +25 -49
- package/src/capabilities/blueprint-definition/index.ts +0 -1
- package/src/capabilities/operation-resolver/operation-resolver.ts +21 -12
- package/src/capabilities/react-surface/react-surface.tsx +21 -11
- package/src/capabilities/repair/repair.ts +14 -7
- package/src/capabilities/toolkit/toolkit.ts +3 -15
- package/src/components/Chat/Chat.tsx +25 -15
- package/src/components/ChatProgress/ChatProgress.tsx +2 -2
- package/src/components/ChatPrompt/ChatActions.tsx +1 -1
- package/src/components/ChatPrompt/ChatOptions.tsx +29 -9
- package/src/components/ChatPrompt/ChatReferences.tsx +14 -4
- package/src/components/ChatThread/ChatThread.stories.tsx +4 -4
- package/src/components/ChatThread/ChatThread.tsx +2 -2
- package/src/components/ChatThread/registry.tsx +48 -15
- package/src/components/ChatThread/sync.test.ts +2 -0
- package/src/components/ChatThread/sync.ts +14 -8
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +2 -2
- package/src/components/TemplateEditor/TemplateEditor.tsx +2 -2
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +2 -2
- package/src/components/TemplateEditor/TemplateForm.tsx +6 -7
- package/src/components/TemplateEditor/extensions/handlebars-extension.ts +4 -4
- package/src/components/ToolBlock/ToolBlock.tsx +4 -4
- package/src/components/Toolbox/Toolbox.stories.tsx +2 -2
- package/src/components/Toolbox/Toolbox.tsx +2 -2
- package/src/components/Typewriter/AssistantToolbar.tsx +3 -3
- package/src/components/Typewriter/Typewriter.stories.tsx +18 -15
- package/src/components/Typewriter/Typewriter.tsx +1 -1
- package/src/components/Typewriter/assistant-extension.tsx +3 -5
- package/src/components/index.ts +0 -18
- package/src/containers/AssistantSettings/index.ts +7 -0
- package/src/{components → containers/BlueprintArticle}/BlueprintArticle.tsx +10 -8
- package/src/containers/BlueprintArticle/index.ts +7 -0
- package/src/{components → containers/ChatCompanion}/ChatCompanion.tsx +4 -5
- package/src/containers/ChatCompanion/index.ts +7 -0
- package/src/{components → containers/ChatContainer}/ChatContainer.tsx +25 -24
- package/src/containers/ChatContainer/index.ts +7 -0
- package/src/{components → containers/ChatDialog}/ChatDialog.tsx +4 -7
- package/src/containers/ChatDialog/index.ts +7 -0
- package/src/containers/Project/ProjectArticle.tsx +117 -0
- package/src/containers/Project/ProjectSettings.tsx +118 -0
- package/src/containers/Project/index.ts +16 -0
- package/src/containers/Project/triggers.ts +131 -0
- package/src/containers/PromptArticle/PromptArticle.tsx +59 -0
- package/src/containers/PromptArticle/index.ts +7 -0
- package/src/{components → containers}/TriggerStatus/TriggerStatus.tsx +12 -4
- package/src/containers/TriggerStatus/index.ts +7 -0
- package/src/containers/index.ts +15 -0
- package/src/hooks/useBlueprintRegistry.ts +5 -2
- package/src/hooks/useFilteredTypes.ts +2 -2
- package/src/hooks/useReferencesProvider.ts +1 -5
- package/src/index.ts +1 -0
- package/src/processor/processor.test.ts +2 -1
- package/src/processor/processor.ts +17 -22
- package/src/testing/test-sequence.ts +3 -3
- package/src/testing/test-services.ts +1 -1
- package/src/translations.ts +11 -11
- package/src/types/AssistantAction.ts +3 -3
- package/src/types/service.ts +3 -3
- package/dist/lib/browser/BlueprintArticle-6SP2ZWJ2.mjs +0 -30
- package/dist/lib/browser/BlueprintArticle-6SP2ZWJ2.mjs.map +0 -7
- package/dist/lib/browser/ChatCompanion-CAKFZAWN.mjs.map +0 -7
- package/dist/lib/browser/ChatContainer-QB37VONJ.mjs.map +0 -7
- package/dist/lib/browser/ChatDialog-ASVBLOOS.mjs.map +0 -7
- package/dist/lib/browser/InitiativeContainer-V522FCYH.mjs +0 -266
- package/dist/lib/browser/InitiativeContainer-V522FCYH.mjs.map +0 -7
- package/dist/lib/browser/PromptArticle-PK3CBRUB.mjs +0 -52
- package/dist/lib/browser/PromptArticle-PK3CBRUB.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-MUZGUQSC.mjs.map +0 -7
- package/dist/lib/browser/blueprint-definition-YAGWYVCL.mjs +0 -14
- package/dist/lib/browser/chunk-3ETBCBMH.mjs +0 -47
- package/dist/lib/browser/chunk-3ETBCBMH.mjs.map +0 -7
- package/dist/lib/browser/chunk-6BVCG5SJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-DKQMSMBN.mjs +0 -326
- package/dist/lib/browser/chunk-DKQMSMBN.mjs.map +0 -7
- package/dist/lib/browser/chunk-IJYAKPEU.mjs.map +0 -7
- package/dist/lib/browser/chunk-JA7PUZC7.mjs.map +0 -7
- package/dist/lib/browser/chunk-POPBT2AQ.mjs +0 -198
- package/dist/lib/browser/chunk-POPBT2AQ.mjs.map +0 -7
- package/dist/lib/browser/operation-resolver-2673CFJS.mjs.map +0 -7
- package/dist/lib/browser/react-surface-T3FN4GVP.mjs.map +0 -7
- package/dist/lib/browser/repair-IRXDYF4R.mjs.map +0 -7
- package/dist/lib/browser/toolkit-IDXQCSTX.mjs +0 -19
- package/dist/lib/browser/toolkit-IDXQCSTX.mjs.map +0 -7
- package/dist/lib/node-esm/BlueprintArticle-7LI6UXKZ.mjs +0 -31
- package/dist/lib/node-esm/BlueprintArticle-7LI6UXKZ.mjs.map +0 -7
- package/dist/lib/node-esm/ChatCompanion-W4PGOCGR.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-ECFQVH6O.mjs.map +0 -7
- package/dist/lib/node-esm/ChatDialog-AFLPYSIU.mjs.map +0 -7
- package/dist/lib/node-esm/InitiativeContainer-U4LGO3BW.mjs +0 -267
- package/dist/lib/node-esm/InitiativeContainer-U4LGO3BW.mjs.map +0 -7
- package/dist/lib/node-esm/PromptArticle-BHPABYLT.mjs +0 -53
- package/dist/lib/node-esm/PromptArticle-BHPABYLT.mjs.map +0 -7
- package/dist/lib/node-esm/blueprint-definition-H3LFAEK2.mjs +0 -15
- package/dist/lib/node-esm/chunk-2LEN26ZQ.mjs +0 -48
- package/dist/lib/node-esm/chunk-2LEN26ZQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3XC7LQSO.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-75PHXBN3.mjs +0 -327
- package/dist/lib/node-esm/chunk-75PHXBN3.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-F6LA7XNS.mjs +0 -199
- package/dist/lib/node-esm/chunk-F6LA7XNS.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-LB72WG6R.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-MJD5XWQV.mjs.map +0 -7
- package/dist/lib/node-esm/operation-resolver-2ZD2DXOU.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-T4VMCCKZ.mjs.map +0 -7
- package/dist/lib/node-esm/repair-DMI55PON.mjs.map +0 -7
- package/dist/lib/node-esm/toolkit-JPRJRDDB.mjs.map +0 -7
- package/dist/types/src/blueprints/assistant-blueprint.d.ts +0 -11
- package/dist/types/src/blueprints/assistant-blueprint.d.ts.map +0 -1
- package/dist/types/src/components/AssistantSettings/index.d.ts +0 -2
- package/dist/types/src/components/AssistantSettings/index.d.ts.map +0 -1
- package/dist/types/src/components/BlueprintArticle.d.ts.map +0 -1
- package/dist/types/src/components/ChatCompanion.d.ts.map +0 -1
- package/dist/types/src/components/ChatContainer.d.ts.map +0 -1
- package/dist/types/src/components/ChatDialog.d.ts.map +0 -1
- package/dist/types/src/components/InitiativeContainer.d.ts +0 -9
- package/dist/types/src/components/InitiativeContainer.d.ts.map +0 -1
- package/dist/types/src/components/PromptArticle.d.ts.map +0 -1
- package/dist/types/src/components/TriggerStatus/TriggerStatus.d.ts +0 -4
- package/dist/types/src/components/TriggerStatus/index.d.ts +0 -2
- package/dist/types/src/components/TriggerStatus/index.d.ts.map +0 -1
- package/dist/types/src/functions/index.d.ts +0 -4
- package/dist/types/src/functions/index.d.ts.map +0 -1
- package/dist/types/src/functions/object-list.d.ts +0 -10
- package/dist/types/src/functions/object-list.d.ts.map +0 -1
- package/dist/types/src/functions/object-load.d.ts +0 -8
- package/dist/types/src/functions/object-load.d.ts.map +0 -1
- package/dist/types/src/functions/object-search.d.ts +0 -10
- package/dist/types/src/functions/object-search.d.ts.map +0 -1
- package/src/blueprints/assistant-blueprint.ts +0 -57
- package/src/components/AssistantSettings/index.ts +0 -5
- package/src/components/InitiativeContainer.tsx +0 -340
- package/src/components/PromptArticle.tsx +0 -49
- package/src/components/TriggerStatus/index.ts +0 -5
- package/src/functions/index.ts +0 -7
- package/src/functions/object-list.ts +0 -49
- package/src/functions/object-load.ts +0 -44
- package/src/functions/object-search.ts +0 -46
- /package/dist/lib/browser/{blueprint-definition-YAGWYVCL.mjs.map → ChatContainer-ZGRSZ5EU.mjs.map} +0 -0
- /package/dist/lib/browser/{settings-XF6GKHCG.mjs.map → settings-YREVQAZ5.mjs.map} +0 -0
- /package/dist/lib/browser/{state-OYDPWLKA.mjs.map → state-MPG42ZO4.mjs.map} +0 -0
- /package/dist/lib/node-esm/{blueprint-definition-H3LFAEK2.mjs.map → ChatContainer-IFHDIFJH.mjs.map} +0 -0
- /package/dist/lib/node-esm/{settings-NGGZA7S7.mjs.map → settings-N452OW6Y.mjs.map} +0 -0
- /package/dist/lib/node-esm/{state-VSCPGN7R.mjs.map → state-WHZFKIEL.mjs.map} +0 -0
- /package/dist/types/src/{components → containers}/AssistantSettings/AssistantSettings.d.ts +0 -0
- /package/src/{components → containers}/AssistantSettings/AssistantSettings.tsx +0 -0
|
@@ -2,95 +2,15 @@ import { createRequire } from 'node:module';const require = createRequire(import
|
|
|
2
2
|
import {
|
|
3
3
|
AiChatProcessor,
|
|
4
4
|
AiServicePresets
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-JMBYVUD6.mjs";
|
|
6
6
|
import {
|
|
7
7
|
AssistantOperation,
|
|
8
|
-
LLM_PROVIDERS,
|
|
9
8
|
ServiceType
|
|
10
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MWYYLALM.mjs";
|
|
11
10
|
import {
|
|
12
11
|
meta
|
|
13
12
|
} from "./chunk-POWB2BPC.mjs";
|
|
14
13
|
|
|
15
|
-
// src/components/AssistantSettings/AssistantSettings.tsx
|
|
16
|
-
import React from "react";
|
|
17
|
-
import { DEFAULT_EDGE_MODELS, DEFAULT_OLLAMA_MODELS } from "@dxos/ai";
|
|
18
|
-
import { Input, Select, useTranslation } from "@dxos/react-ui";
|
|
19
|
-
import { Settings } from "@dxos/react-ui-form";
|
|
20
|
-
var DEFAULT_VALUE = "__default";
|
|
21
|
-
var LLM_PROVIDER_LABELS = {
|
|
22
|
-
edge: "DXOS",
|
|
23
|
-
ollama: "Ollama",
|
|
24
|
-
lmstudio: "LM Studio"
|
|
25
|
-
};
|
|
26
|
-
var AssistantSettings = ({ settings, onSettingsChange }) => {
|
|
27
|
-
const { t } = useTranslation(meta.id);
|
|
28
|
-
return /* @__PURE__ */ React.createElement(Settings.Root, null, /* @__PURE__ */ React.createElement(Settings.Section, {
|
|
29
|
-
title: t("settings title", {
|
|
30
|
-
ns: meta.id
|
|
31
|
-
})
|
|
32
|
-
}, /* @__PURE__ */ React.createElement(Settings.Group, null, /* @__PURE__ */ React.createElement(Settings.ItemInput, {
|
|
33
|
-
title: t("settings custom prompts label")
|
|
34
|
-
}, /* @__PURE__ */ React.createElement(Input.Switch, {
|
|
35
|
-
checked: !!settings.customPrompts,
|
|
36
|
-
onCheckedChange: (checked) => onSettingsChange((s) => ({
|
|
37
|
-
...s,
|
|
38
|
-
customPrompts: checked
|
|
39
|
-
}))
|
|
40
|
-
})), /* @__PURE__ */ React.createElement(Settings.ItemInput, {
|
|
41
|
-
title: t("settings llm provider label")
|
|
42
|
-
}, /* @__PURE__ */ React.createElement(Select.Root, {
|
|
43
|
-
value: settings.llmProvider ?? "edge",
|
|
44
|
-
onValueChange: (value) => {
|
|
45
|
-
onSettingsChange((s) => ({
|
|
46
|
-
...s,
|
|
47
|
-
llmProvider: value === DEFAULT_VALUE ? void 0 : value
|
|
48
|
-
}));
|
|
49
|
-
}
|
|
50
|
-
}, /* @__PURE__ */ React.createElement(Select.TriggerButton, {
|
|
51
|
-
placeholder: t("settings llm provider label")
|
|
52
|
-
}), /* @__PURE__ */ React.createElement(Select.Portal, null, /* @__PURE__ */ React.createElement(Select.Content, null, /* @__PURE__ */ React.createElement(Select.Viewport, null, /* @__PURE__ */ React.createElement(Select.Option, {
|
|
53
|
-
value: DEFAULT_VALUE
|
|
54
|
-
}, t("settings default label")), LLM_PROVIDERS.map((model) => /* @__PURE__ */ React.createElement(Select.Option, {
|
|
55
|
-
key: model,
|
|
56
|
-
value: model
|
|
57
|
-
}, LLM_PROVIDER_LABELS[model]))), /* @__PURE__ */ React.createElement(Select.Arrow, null))))), /* @__PURE__ */ React.createElement(Settings.ItemInput, {
|
|
58
|
-
title: t("settings edge llm model label")
|
|
59
|
-
}, /* @__PURE__ */ React.createElement(Select.Root, {
|
|
60
|
-
value: settings.edgeModel ?? DEFAULT_VALUE,
|
|
61
|
-
onValueChange: (value) => {
|
|
62
|
-
onSettingsChange((s) => ({
|
|
63
|
-
...s,
|
|
64
|
-
edgeModel: value === DEFAULT_VALUE ? void 0 : value
|
|
65
|
-
}));
|
|
66
|
-
}
|
|
67
|
-
}, /* @__PURE__ */ React.createElement(Select.TriggerButton, {
|
|
68
|
-
placeholder: t("settings default llm model label")
|
|
69
|
-
}), /* @__PURE__ */ React.createElement(Select.Portal, null, /* @__PURE__ */ React.createElement(Select.Content, null, /* @__PURE__ */ React.createElement(Select.Viewport, null, /* @__PURE__ */ React.createElement(Select.Option, {
|
|
70
|
-
value: DEFAULT_VALUE
|
|
71
|
-
}, t("settings default label")), DEFAULT_EDGE_MODELS.map((model) => /* @__PURE__ */ React.createElement(Select.Option, {
|
|
72
|
-
key: model,
|
|
73
|
-
value: model
|
|
74
|
-
}, model))), /* @__PURE__ */ React.createElement(Select.Arrow, null))))), /* @__PURE__ */ React.createElement(Settings.ItemInput, {
|
|
75
|
-
title: t("settings ollama llm model label")
|
|
76
|
-
}, /* @__PURE__ */ React.createElement(Select.Root, {
|
|
77
|
-
value: settings.ollamaModel ?? DEFAULT_VALUE,
|
|
78
|
-
onValueChange: (value) => {
|
|
79
|
-
onSettingsChange((s) => ({
|
|
80
|
-
...s,
|
|
81
|
-
ollamaModel: value === DEFAULT_VALUE ? void 0 : value
|
|
82
|
-
}));
|
|
83
|
-
}
|
|
84
|
-
}, /* @__PURE__ */ React.createElement(Select.TriggerButton, {
|
|
85
|
-
placeholder: t("settings default llm model label")
|
|
86
|
-
}), /* @__PURE__ */ React.createElement(Select.Portal, null, /* @__PURE__ */ React.createElement(Select.Content, null, /* @__PURE__ */ React.createElement(Select.Viewport, null, /* @__PURE__ */ React.createElement(Select.Option, {
|
|
87
|
-
value: DEFAULT_VALUE
|
|
88
|
-
}, t("settings default label")), DEFAULT_OLLAMA_MODELS.map((model) => /* @__PURE__ */ React.createElement(Select.Option, {
|
|
89
|
-
key: model,
|
|
90
|
-
value: model
|
|
91
|
-
}, model))), /* @__PURE__ */ React.createElement(Select.Arrow, null))))))));
|
|
92
|
-
};
|
|
93
|
-
|
|
94
14
|
// src/hooks/useBlueprintRegistry.ts
|
|
95
15
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
96
16
|
import { useCapabilities } from "@dxos/app-framework/ui";
|
|
@@ -100,9 +20,9 @@ import { Filter, Obj, Ref } from "@dxos/echo";
|
|
|
100
20
|
import { useQuery } from "@dxos/react-client/echo";
|
|
101
21
|
import { distinctBy } from "@dxos/util";
|
|
102
22
|
var useBlueprintRegistry = () => {
|
|
103
|
-
const
|
|
104
|
-
return useMemo(() => new Blueprint.Registry(
|
|
105
|
-
|
|
23
|
+
const blueprintDefinitions = useCapabilities(AppCapabilities.BlueprintDefinition);
|
|
24
|
+
return useMemo(() => new Blueprint.Registry(blueprintDefinitions.map((blueprint) => blueprint.make())), [
|
|
25
|
+
blueprintDefinitions
|
|
106
26
|
]);
|
|
107
27
|
};
|
|
108
28
|
var useBlueprints = ({ blueprintRegistry, db }) => {
|
|
@@ -261,7 +181,7 @@ var useChatServices = ({ id, chat }) => {
|
|
|
261
181
|
// src/hooks/useChatToolbarActions.ts
|
|
262
182
|
import { Atom } from "@effect-atom/atom-react";
|
|
263
183
|
import * as Effect2 from "effect/Effect";
|
|
264
|
-
import { useMemo as
|
|
184
|
+
import { useMemo as useMemo10 } from "react";
|
|
265
185
|
import { useOperationInvoker } from "@dxos/app-framework/ui";
|
|
266
186
|
import { Chat as Chat2 } from "@dxos/assistant-toolkit";
|
|
267
187
|
import { Filter as Filter6, Obj as Obj6, Query } from "@dxos/echo";
|
|
@@ -270,27 +190,24 @@ import { invariant } from "@dxos/invariant";
|
|
|
270
190
|
import { useQuery as useQuery5 } from "@dxos/react-client/echo";
|
|
271
191
|
import { MenuBuilder, useMenuActions } from "@dxos/react-ui-menu";
|
|
272
192
|
|
|
273
|
-
// src/components/index.ts
|
|
274
|
-
import { lazy } from "react";
|
|
275
|
-
|
|
276
193
|
// src/components/Chat/Chat.tsx
|
|
277
194
|
import { Prec } from "@codemirror/state";
|
|
278
195
|
import { keymap } from "@codemirror/view";
|
|
279
196
|
import { useAtomValue } from "@effect-atom/atom-react";
|
|
280
197
|
import { createContext } from "@radix-ui/react-context";
|
|
281
198
|
import * as Array2 from "effect/Array";
|
|
282
|
-
import * as
|
|
283
|
-
import
|
|
199
|
+
import * as Option4 from "effect/Option";
|
|
200
|
+
import React9, { useCallback as useCallback7, useEffect as useEffect7, useMemo as useMemo9, useRef as useRef3, useState as useState12 } from "react";
|
|
284
201
|
import { Event } from "@dxos/async";
|
|
285
202
|
import { Filter as Filter4, Obj as Obj5 } from "@dxos/echo";
|
|
286
203
|
import { useVoiceInput } from "@dxos/plugin-transcription";
|
|
287
204
|
import { useQuery as useQuery3 } from "@dxos/react-client/echo";
|
|
288
205
|
import { useIdentity } from "@dxos/react-client/halo";
|
|
289
|
-
import { Input
|
|
206
|
+
import { Input, useDynamicRef, useTranslation as useTranslation5 } from "@dxos/react-ui";
|
|
290
207
|
import { ChatEditor } from "@dxos/react-ui-chat";
|
|
291
|
-
import {
|
|
208
|
+
import { Menu } from "@dxos/react-ui-menu";
|
|
292
209
|
import { Message } from "@dxos/types";
|
|
293
|
-
import { mx as
|
|
210
|
+
import { mx as mx6 } from "@dxos/ui-theme";
|
|
294
211
|
import { isTruthy } from "@dxos/util";
|
|
295
212
|
|
|
296
213
|
// src/hooks/useContextBinder.ts
|
|
@@ -455,11 +372,8 @@ var usePresets = (online) => {
|
|
|
455
372
|
|
|
456
373
|
// src/hooks/useReferencesProvider.ts
|
|
457
374
|
import { useMemo as useMemo5 } from "react";
|
|
458
|
-
import { useCapabilities as useCapabilities2 } from "@dxos/app-framework/ui";
|
|
459
|
-
import { AppCapabilities as AppCapabilities2 } from "@dxos/app-toolkit";
|
|
460
375
|
import { Filter as Filter2, Obj as Obj2 } from "@dxos/echo";
|
|
461
376
|
var useReferencesProvider = (space) => {
|
|
462
|
-
const blueprints = useCapabilities2(AppCapabilities2.BlueprintDefinition);
|
|
463
377
|
return useMemo5(() => {
|
|
464
378
|
if (!space) {
|
|
465
379
|
return void 0;
|
|
@@ -481,21 +395,20 @@ var useReferencesProvider = (space) => {
|
|
|
481
395
|
}
|
|
482
396
|
};
|
|
483
397
|
}, [
|
|
484
|
-
space
|
|
485
|
-
blueprints
|
|
398
|
+
space
|
|
486
399
|
]);
|
|
487
400
|
};
|
|
488
401
|
var stringMatch = (query, label) => label.toLowerCase().startsWith(query.toLowerCase());
|
|
489
402
|
|
|
490
403
|
// src/components/ChatPrompt/ChatActions.tsx
|
|
491
|
-
import
|
|
492
|
-
import { IconButton, useTranslation
|
|
404
|
+
import React from "react";
|
|
405
|
+
import { IconButton, useTranslation } from "@dxos/react-ui";
|
|
493
406
|
import { mx } from "@dxos/ui-theme";
|
|
494
407
|
var ChatActions = ({ classNames, children, microphone, recording, processing, onEvent }) => {
|
|
495
|
-
const { t } =
|
|
496
|
-
return /* @__PURE__ */
|
|
497
|
-
className: mx("flex items-center
|
|
498
|
-
}, children, /* @__PURE__ */
|
|
408
|
+
const { t } = useTranslation(meta.id);
|
|
409
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
410
|
+
className: mx("flex items-center me-1", classNames)
|
|
411
|
+
}, children, /* @__PURE__ */ React.createElement(IconButton, {
|
|
499
412
|
disabled: !processing,
|
|
500
413
|
variant: "ghost",
|
|
501
414
|
icon: "ph--x--regular",
|
|
@@ -504,7 +417,7 @@ var ChatActions = ({ classNames, children, microphone, recording, processing, on
|
|
|
504
417
|
onClick: () => onEvent?.({
|
|
505
418
|
type: "cancel"
|
|
506
419
|
})
|
|
507
|
-
}), microphone && /* @__PURE__ */
|
|
420
|
+
}), microphone && /* @__PURE__ */ React.createElement(IconButton, {
|
|
508
421
|
disabled: !processing,
|
|
509
422
|
classNames: mx(recording && "bg-primary-500"),
|
|
510
423
|
variant: "ghost",
|
|
@@ -524,7 +437,7 @@ var ChatActions = ({ classNames, children, microphone, recording, processing, on
|
|
|
524
437
|
onTouchEnd: () => onEvent?.({
|
|
525
438
|
type: "record-stop"
|
|
526
439
|
})
|
|
527
|
-
}), /* @__PURE__ */
|
|
440
|
+
}), /* @__PURE__ */ React.createElement(IconButton, {
|
|
528
441
|
variant: "ghost",
|
|
529
442
|
icon: "ph--wrench--regular",
|
|
530
443
|
iconOnly: true,
|
|
@@ -536,78 +449,81 @@ var ChatActions = ({ classNames, children, microphone, recording, processing, on
|
|
|
536
449
|
};
|
|
537
450
|
|
|
538
451
|
// src/components/ChatPrompt/ChatOptions.tsx
|
|
539
|
-
import
|
|
452
|
+
import * as Option2 from "effect/Option";
|
|
453
|
+
import React2, { useMemo as useMemo6, useState as useState8 } from "react";
|
|
540
454
|
import { Filter as Filter3, Obj as Obj3, Type } from "@dxos/echo";
|
|
455
|
+
import { Annotation } from "@dxos/echo";
|
|
541
456
|
import { useQuery as useQuery2 } from "@dxos/react-client/echo";
|
|
542
|
-
import { IconButton as IconButton2, Popover, Select
|
|
457
|
+
import { IconButton as IconButton2, Popover, Select, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
543
458
|
import { Listbox, SearchList, useSearchListResults } from "@dxos/react-ui-searchlist";
|
|
544
459
|
import { Tabs } from "@dxos/react-ui-tabs";
|
|
545
|
-
|
|
460
|
+
import { getStyles, mx as mx2 } from "@dxos/ui-theme";
|
|
461
|
+
var panelClassNames = "w-[calc(100dvw-.5rem)] sm:w-max md:w-72 max-w-text-content";
|
|
546
462
|
var ChatOptions = ({ db, context, blueprintRegistry, presets, preset, onPresetChange }) => {
|
|
547
|
-
const { t } =
|
|
548
|
-
return /* @__PURE__ */
|
|
463
|
+
const { t } = useTranslation2(meta.id);
|
|
464
|
+
return /* @__PURE__ */ React2.createElement("div", {
|
|
549
465
|
role: "none",
|
|
550
466
|
className: "flex p-2"
|
|
551
|
-
}, /* @__PURE__ */
|
|
467
|
+
}, /* @__PURE__ */ React2.createElement(Popover.Root, null, /* @__PURE__ */ React2.createElement(Popover.Trigger, {
|
|
552
468
|
asChild: true
|
|
553
|
-
}, /* @__PURE__ */
|
|
469
|
+
}, /* @__PURE__ */ React2.createElement(IconButton2, {
|
|
554
470
|
variant: "ghost",
|
|
555
471
|
icon: "ph--plus--regular",
|
|
556
472
|
iconOnly: true,
|
|
557
473
|
label: t("context objects button")
|
|
558
|
-
})), /* @__PURE__ */
|
|
474
|
+
})), /* @__PURE__ */ React2.createElement(Popover.Portal, null, /* @__PURE__ */ React2.createElement(Popover.Content, {
|
|
559
475
|
side: "top",
|
|
560
476
|
classNames: panelClassNames
|
|
561
|
-
}, /* @__PURE__ */
|
|
477
|
+
}, /* @__PURE__ */ React2.createElement(Popover.Viewport, null, /* @__PURE__ */ React2.createElement(ObjectsPanel, {
|
|
562
478
|
db,
|
|
563
479
|
context
|
|
564
|
-
})), /* @__PURE__ */
|
|
480
|
+
})), /* @__PURE__ */ React2.createElement(Popover.Arrow, null)))), /* @__PURE__ */ React2.createElement(Popover.Root, null, /* @__PURE__ */ React2.createElement(Popover.Trigger, {
|
|
565
481
|
asChild: true
|
|
566
|
-
}, /* @__PURE__ */
|
|
482
|
+
}, /* @__PURE__ */ React2.createElement(IconButton2, {
|
|
567
483
|
variant: "ghost",
|
|
568
484
|
icon: "ph--sliders-horizontal--regular",
|
|
569
485
|
iconOnly: true,
|
|
570
486
|
label: t("context settings button")
|
|
571
|
-
})), /* @__PURE__ */
|
|
487
|
+
})), /* @__PURE__ */ React2.createElement(Popover.Portal, null, /* @__PURE__ */ React2.createElement(Popover.Content, {
|
|
572
488
|
side: "top",
|
|
573
489
|
classNames: panelClassNames
|
|
574
|
-
}, /* @__PURE__ */
|
|
490
|
+
}, /* @__PURE__ */ React2.createElement(Popover.Viewport, null, /* @__PURE__ */ React2.createElement(Tabs.Root, {
|
|
575
491
|
orientation: "horizontal",
|
|
576
492
|
defaultValue: "blueprints",
|
|
577
493
|
defaultActivePart: "list",
|
|
578
494
|
tabIndex: -1
|
|
579
|
-
}, /* @__PURE__ */
|
|
580
|
-
classNames:
|
|
581
|
-
}, /* @__PURE__ */
|
|
495
|
+
}, /* @__PURE__ */ React2.createElement(Tabs.Viewport, {
|
|
496
|
+
classNames: mx2("max-h-(--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-h-0 [&_[role="listbox"]]:overflow-y-auto', '[&_[role="tabpanel"]]:min-h-0 [&_[role="tabpanel"]]:px-form-chrome [&_[role="tabpanel"][data-state="active"]]:order-first [&_[role="tabpanel"][data-state="inactive"]]:hidden')
|
|
497
|
+
}, /* @__PURE__ */ React2.createElement(Tabs.Tabpanel, {
|
|
582
498
|
value: "blueprints",
|
|
583
499
|
tabIndex: -1,
|
|
584
500
|
classNames: "dx-focus-ring-inset"
|
|
585
|
-
}, /* @__PURE__ */
|
|
501
|
+
}, /* @__PURE__ */ React2.createElement(BlueprintsPanel, {
|
|
586
502
|
blueprintRegistry,
|
|
587
503
|
db,
|
|
588
504
|
context
|
|
589
|
-
})), /* @__PURE__ */
|
|
505
|
+
})), /* @__PURE__ */ React2.createElement(Tabs.Tabpanel, {
|
|
590
506
|
value: "model",
|
|
591
507
|
tabIndex: -1,
|
|
592
|
-
classNames: "dx-focus-ring-inset
|
|
593
|
-
}, /* @__PURE__ */
|
|
508
|
+
classNames: "dx-focus-ring-inset px-0!"
|
|
509
|
+
}, /* @__PURE__ */ React2.createElement(ModelsPanel, {
|
|
594
510
|
presets,
|
|
595
511
|
preset,
|
|
596
512
|
onPresetChange
|
|
597
|
-
})), /* @__PURE__ */
|
|
598
|
-
classNames: "sm:overflow-x-hidden justify-center p-
|
|
599
|
-
}, /* @__PURE__ */
|
|
513
|
+
})), /* @__PURE__ */ React2.createElement(Tabs.Tablist, {
|
|
514
|
+
classNames: "sm:overflow-x-hidden justify-center p-form-chrome border-y border-subdued-separator order-last"
|
|
515
|
+
}, /* @__PURE__ */ React2.createElement(Tabs.IconTab, {
|
|
600
516
|
value: "blueprints",
|
|
601
517
|
icon: "ph--blueprint--regular",
|
|
602
518
|
label: t("blueprints in context title")
|
|
603
|
-
}), /* @__PURE__ */
|
|
519
|
+
}), /* @__PURE__ */ React2.createElement(Tabs.IconTab, {
|
|
604
520
|
value: "model",
|
|
605
521
|
label: t("chat model title"),
|
|
606
522
|
icon: "ph--cpu--regular"
|
|
607
|
-
}))))), /* @__PURE__ */
|
|
523
|
+
}))))), /* @__PURE__ */ React2.createElement(Popover.Arrow, null)))));
|
|
608
524
|
};
|
|
609
525
|
var BlueprintsPanel = ({ blueprintRegistry, db, context }) => {
|
|
610
|
-
const { t } =
|
|
526
|
+
const { t } = useTranslation2(meta.id);
|
|
611
527
|
const blueprints = useBlueprints({
|
|
612
528
|
blueprintRegistry,
|
|
613
529
|
db
|
|
@@ -624,13 +540,13 @@ var BlueprintsPanel = ({ blueprintRegistry, db, context }) => {
|
|
|
624
540
|
items: blueprints,
|
|
625
541
|
extract: (blueprint) => blueprint.name
|
|
626
542
|
});
|
|
627
|
-
return /* @__PURE__ */
|
|
543
|
+
return /* @__PURE__ */ React2.createElement(SearchList.Root, {
|
|
628
544
|
onSearch: handleSearch
|
|
629
|
-
}, /* @__PURE__ */
|
|
630
|
-
classNames: "
|
|
631
|
-
}, /* @__PURE__ */
|
|
545
|
+
}, /* @__PURE__ */ React2.createElement(SearchList.Content, {
|
|
546
|
+
classNames: "py-form-chrome"
|
|
547
|
+
}, /* @__PURE__ */ React2.createElement(SearchList.Viewport, null, results.map((blueprint) => {
|
|
632
548
|
const isActive = activeBlueprints.has(blueprint.key);
|
|
633
|
-
return /* @__PURE__ */
|
|
549
|
+
return /* @__PURE__ */ React2.createElement(SearchList.Item, {
|
|
634
550
|
classNames: "flex items-center overflow-hidden",
|
|
635
551
|
key: blueprint.key,
|
|
636
552
|
value: blueprint.key,
|
|
@@ -638,27 +554,27 @@ var BlueprintsPanel = ({ blueprintRegistry, db, context }) => {
|
|
|
638
554
|
checked: isActive,
|
|
639
555
|
onSelect: () => onUpdateBlueprint?.(blueprint.key, !isActive)
|
|
640
556
|
});
|
|
641
|
-
}))), /* @__PURE__ */
|
|
557
|
+
}))), /* @__PURE__ */ React2.createElement(SearchList.Input, {
|
|
642
558
|
placeholder: t("search placeholder"),
|
|
643
|
-
classNames: "
|
|
559
|
+
classNames: "mb-form-chrome",
|
|
644
560
|
autoFocus: true
|
|
645
561
|
}));
|
|
646
562
|
};
|
|
647
563
|
var ModelsPanel = ({ presets, preset, onPresetChange }) => {
|
|
648
|
-
return /* @__PURE__ */
|
|
564
|
+
return /* @__PURE__ */ React2.createElement(Listbox.Root, {
|
|
649
565
|
value: preset,
|
|
650
566
|
onValueChange: onPresetChange,
|
|
651
567
|
autoFocus: true
|
|
652
568
|
}, presets?.map(({ id, label }) => {
|
|
653
|
-
return /* @__PURE__ */
|
|
569
|
+
return /* @__PURE__ */ React2.createElement(Listbox.Option, {
|
|
654
570
|
key: id,
|
|
655
571
|
value: id
|
|
656
|
-
}, /* @__PURE__ */
|
|
572
|
+
}, /* @__PURE__ */ React2.createElement(Listbox.OptionLabel, null, label), /* @__PURE__ */ React2.createElement(Listbox.OptionIndicator, null));
|
|
657
573
|
}));
|
|
658
574
|
};
|
|
659
575
|
var ANY = "__any__";
|
|
660
576
|
var ObjectsPanel = ({ db, context }) => {
|
|
661
|
-
const { t } =
|
|
577
|
+
const { t } = useTranslation2(meta.id);
|
|
662
578
|
const types = useFilteredTypes(db);
|
|
663
579
|
const typenames = useMemo6(() => {
|
|
664
580
|
const typenames2 = types.map((type) => {
|
|
@@ -689,61 +605,70 @@ var ObjectsPanel = ({ db, context }) => {
|
|
|
689
605
|
items: objects,
|
|
690
606
|
extract: (object) => Obj3.getLabel(object) ?? Obj3.getTypename(object) ?? object.id
|
|
691
607
|
});
|
|
692
|
-
return /* @__PURE__ */
|
|
608
|
+
return /* @__PURE__ */ React2.createElement(SearchList.Root, {
|
|
693
609
|
onSearch: handleSearch
|
|
694
|
-
}, /* @__PURE__ */
|
|
695
|
-
classNames: "p-
|
|
696
|
-
}, /* @__PURE__ */
|
|
610
|
+
}, /* @__PURE__ */ React2.createElement(SearchList.Content, {
|
|
611
|
+
classNames: "p-form-chrome [&:has([cmdk-list-sizer]:empty)]:py-0"
|
|
612
|
+
}, /* @__PURE__ */ React2.createElement(SearchList.Viewport, null, results.length ? results.map((object) => {
|
|
697
613
|
const isActive = contextObjects.findIndex((obj) => obj.id === object.id) !== -1;
|
|
698
|
-
|
|
614
|
+
const { icon, hue } = Option2.fromNullable(Obj3.getSchema(object)).pipe(Option2.flatMap(Annotation.IconAnnotation.get), Option2.getOrElse(() => ({
|
|
615
|
+
icon: DEFAULT_OBJECT_ICON,
|
|
616
|
+
hue: void 0
|
|
617
|
+
})));
|
|
618
|
+
const styles = hue ? getStyles(hue) : void 0;
|
|
619
|
+
return /* @__PURE__ */ React2.createElement(SearchList.Item, {
|
|
699
620
|
classNames: "flex items-center overflow-hidden",
|
|
700
621
|
key: object.id,
|
|
701
622
|
value: object.id,
|
|
623
|
+
icon,
|
|
624
|
+
iconClassNames: styles?.surfaceText,
|
|
702
625
|
label: Obj3.getLabel(object) ?? Obj3.getTypename(object) ?? object.id,
|
|
703
626
|
checked: isActive,
|
|
704
627
|
onSelect: () => onUpdateObject?.(Obj3.getDXN(object), !isActive)
|
|
705
628
|
});
|
|
706
|
-
}) : /* @__PURE__ */
|
|
629
|
+
}) : /* @__PURE__ */ React2.createElement(SearchList.Item, {
|
|
707
630
|
value: "__empty__",
|
|
708
631
|
label: t("no results")
|
|
709
|
-
}))), /* @__PURE__ */
|
|
632
|
+
}))), /* @__PURE__ */ React2.createElement("div", {
|
|
710
633
|
role: "none",
|
|
711
|
-
className: "grid grid-cols-[min-content_1fr] gap-2
|
|
712
|
-
}, /* @__PURE__ */
|
|
634
|
+
className: "grid grid-cols-[min-content_1fr] gap-2 px-form-chrome mb-form-chrome"
|
|
635
|
+
}, /* @__PURE__ */ React2.createElement(Select.Root, {
|
|
713
636
|
value: typename === ANY ? void 0 : typename,
|
|
714
637
|
onValueChange: setTypename
|
|
715
|
-
}, /* @__PURE__ */
|
|
638
|
+
}, /* @__PURE__ */ React2.createElement(Select.TriggerButton, {
|
|
716
639
|
density: "fine",
|
|
717
640
|
placeholder: t("type filter placeholder")
|
|
718
|
-
}), /* @__PURE__ */
|
|
641
|
+
}), /* @__PURE__ */ React2.createElement(Select.Portal, null, /* @__PURE__ */ React2.createElement(Select.Content, null, /* @__PURE__ */ React2.createElement(Select.ScrollUpButton, null), /* @__PURE__ */ React2.createElement(Select.Viewport, null, /* @__PURE__ */ React2.createElement(Select.Option, {
|
|
719
642
|
value: ANY
|
|
720
|
-
}, t("any type filter label")), typenames.map(({ typename: typename2, label }) => /* @__PURE__ */
|
|
643
|
+
}, t("any type filter label")), typenames.map(({ typename: typename2, label }) => /* @__PURE__ */ React2.createElement(Select.Option, {
|
|
721
644
|
key: typename2,
|
|
722
645
|
value: typename2
|
|
723
|
-
}, label))), /* @__PURE__ */
|
|
646
|
+
}, label))), /* @__PURE__ */ React2.createElement(Select.ScrollDownButton, null), /* @__PURE__ */ React2.createElement(Select.Arrow, null)))), /* @__PURE__ */ React2.createElement(SearchList.Input, {
|
|
724
647
|
placeholder: t("search placeholder"),
|
|
725
|
-
classNames: "
|
|
648
|
+
classNames: "mb-0",
|
|
726
649
|
autoFocus: true
|
|
727
650
|
})));
|
|
728
651
|
};
|
|
652
|
+
var DEFAULT_OBJECT_ICON = "ph--cube--regular";
|
|
729
653
|
|
|
730
654
|
// src/components/ChatPrompt/ChatPresets.tsx
|
|
731
|
-
import
|
|
732
|
-
import { Select as
|
|
655
|
+
import React3 from "react";
|
|
656
|
+
import { Select as Select2 } from "@dxos/react-ui";
|
|
733
657
|
|
|
734
658
|
// src/components/ChatPrompt/ChatReferences.tsx
|
|
735
|
-
import
|
|
736
|
-
import
|
|
737
|
-
import {
|
|
738
|
-
import {
|
|
659
|
+
import * as Option3 from "effect/Option";
|
|
660
|
+
import React4 from "react";
|
|
661
|
+
import { Annotation as Annotation2, Obj as Obj4 } from "@dxos/echo";
|
|
662
|
+
import { Icon, IconButton as IconButton3, toLocalizedString, useTranslation as useTranslation3 } from "@dxos/react-ui";
|
|
663
|
+
import { getStyles as getStyles2, mx as mx3 } from "@dxos/ui-theme";
|
|
739
664
|
var ChatReferences = ({ classNames, context, db }) => {
|
|
740
|
-
const { t } =
|
|
665
|
+
const { t } = useTranslation3(meta.id);
|
|
741
666
|
const { objects, onUpdateObject } = useContextObjects({
|
|
742
667
|
db,
|
|
743
668
|
context
|
|
744
669
|
});
|
|
745
|
-
return /* @__PURE__ */
|
|
746
|
-
className:
|
|
670
|
+
return /* @__PURE__ */ React4.createElement("ul", {
|
|
671
|
+
className: mx3("flex", classNames)
|
|
747
672
|
}, objects.map((obj) => {
|
|
748
673
|
const dxn = Obj4.getDXN(obj);
|
|
749
674
|
const typename = Obj4.getTypename(obj);
|
|
@@ -753,11 +678,20 @@ var ChatReferences = ({ classNames, context, db }) => {
|
|
|
753
678
|
ns: typename
|
|
754
679
|
}
|
|
755
680
|
] : obj.id);
|
|
756
|
-
|
|
681
|
+
const { icon, hue } = Option3.fromNullable(Obj4.getSchema(obj)).pipe(Option3.flatMap(Annotation2.IconAnnotation.get), Option3.getOrElse(() => ({
|
|
682
|
+
icon: DEFAULT_OBJECT_ICON2,
|
|
683
|
+
hue: void 0
|
|
684
|
+
})));
|
|
685
|
+
const styles = hue ? getStyles2(hue) : void 0;
|
|
686
|
+
return /* @__PURE__ */ React4.createElement("li", {
|
|
757
687
|
key: dxn.toString(),
|
|
758
|
-
className: "dx-tag
|
|
688
|
+
className: "dx-tag py-0 ps-2 flex items-center gap-1",
|
|
759
689
|
"data-hue": "neutral"
|
|
760
|
-
},
|
|
690
|
+
}, /* @__PURE__ */ React4.createElement(Icon, {
|
|
691
|
+
icon,
|
|
692
|
+
size: 4,
|
|
693
|
+
classNames: styles?.surfaceText
|
|
694
|
+
}), toLocalizedString(label, t), /* @__PURE__ */ React4.createElement(IconButton3, {
|
|
761
695
|
icon: "ph--x--bold",
|
|
762
696
|
iconOnly: true,
|
|
763
697
|
variant: "ghost",
|
|
@@ -768,12 +702,13 @@ var ChatReferences = ({ classNames, context, db }) => {
|
|
|
768
702
|
}));
|
|
769
703
|
}));
|
|
770
704
|
};
|
|
705
|
+
var DEFAULT_OBJECT_ICON2 = "ph--cube--regular";
|
|
771
706
|
|
|
772
707
|
// src/components/ChatPrompt/ChatStatusIndicator.tsx
|
|
773
|
-
import
|
|
708
|
+
import React5, { useEffect as useEffect4, useState as useState9 } from "react";
|
|
774
709
|
import { Tooltip, useTimeout } from "@dxos/react-ui";
|
|
775
710
|
import { Spinner } from "@dxos/react-ui-sfx";
|
|
776
|
-
import { mx as
|
|
711
|
+
import { mx as mx4 } from "@dxos/ui-theme";
|
|
777
712
|
var period = 3e3;
|
|
778
713
|
var ChatStatusIndicator = ({ classNames, preset, processing, error, ...props }) => {
|
|
779
714
|
const [init, setInit] = useState9(false);
|
|
@@ -785,50 +720,50 @@ var ChatStatusIndicator = ({ classNames, preset, processing, error, ...props })
|
|
|
785
720
|
}, period / 2, [
|
|
786
721
|
preset
|
|
787
722
|
]);
|
|
788
|
-
return /* @__PURE__ */
|
|
723
|
+
return /* @__PURE__ */ React5.createElement("div", {
|
|
789
724
|
role: "none",
|
|
790
|
-
className:
|
|
791
|
-
}, /* @__PURE__ */
|
|
725
|
+
className: mx4("relative flex", classNames)
|
|
726
|
+
}, /* @__PURE__ */ React5.createElement(Spinner, {
|
|
792
727
|
duration: period,
|
|
793
728
|
state: !init ? "flash" : error ? "error" : processing ? "spin" : "pulse",
|
|
794
729
|
...props
|
|
795
|
-
}), error && /* @__PURE__ */
|
|
730
|
+
}), error && /* @__PURE__ */ React5.createElement(Tooltip.Trigger, {
|
|
796
731
|
asChild: true,
|
|
797
732
|
content: error.message
|
|
798
|
-
}, /* @__PURE__ */
|
|
733
|
+
}, /* @__PURE__ */ React5.createElement("div", {
|
|
799
734
|
className: "absolute inset-0"
|
|
800
735
|
})));
|
|
801
736
|
};
|
|
802
737
|
|
|
803
738
|
// src/components/ChatThread/ChatThread.tsx
|
|
804
|
-
import
|
|
739
|
+
import React8, { forwardRef, useCallback as useCallback6, useEffect as useEffect6, useMemo as useMemo8, useState as useState11 } from "react";
|
|
805
740
|
import { PublicKey } from "@dxos/keys";
|
|
806
741
|
import { useForwardedRef } from "@dxos/react-ui";
|
|
807
742
|
import { MarkdownStream } from "@dxos/react-ui-components";
|
|
808
|
-
import { mx as
|
|
743
|
+
import { mx as mx5 } from "@dxos/ui-theme";
|
|
809
744
|
import { keyToFallback } from "@dxos/util";
|
|
810
745
|
|
|
811
746
|
// src/components/ChatThread/registry.tsx
|
|
812
|
-
import
|
|
747
|
+
import React7 from "react";
|
|
813
748
|
import { log as log2 } from "@dxos/log";
|
|
814
749
|
import { ToggleContainer as ToggleContainer2 } from "@dxos/react-ui-components";
|
|
815
|
-
import { PromptWidget, ReferenceWidget, SelectWidget, SuggestionWidget, SummaryWidget } from "@dxos/react-ui-components";
|
|
750
|
+
import { PromptWidget, ReasoningWidget, ReferenceWidget, SelectWidget, SuggestionWidget, SummaryWidget } from "@dxos/react-ui-components";
|
|
816
751
|
import { Json as Json2 } from "@dxos/react-ui-syntax-highlighter";
|
|
817
752
|
import { ContentBlock } from "@dxos/types";
|
|
818
753
|
import { getXmlTextChild } from "@dxos/ui-editor";
|
|
819
754
|
|
|
820
755
|
// src/components/ToolBlock/ToolBlock.tsx
|
|
821
|
-
import
|
|
822
|
-
import { useTranslation as
|
|
756
|
+
import React6, { useCallback as useCallback5, useEffect as useEffect5, useMemo as useMemo7, useRef as useRef2, useState as useState10 } from "react";
|
|
757
|
+
import { useTranslation as useTranslation4 } from "@dxos/react-ui";
|
|
823
758
|
import { NumericTabs, TextCrawl, ToggleContainer } from "@dxos/react-ui-components";
|
|
824
759
|
import { Json } from "@dxos/react-ui-syntax-highlighter";
|
|
825
760
|
import { isNonNullable, safeParseJson } from "@dxos/util";
|
|
826
761
|
var ToolBlock = ({ view, blocks = [] }) => {
|
|
827
|
-
const { t } =
|
|
762
|
+
const { t } = useTranslation4(meta.id);
|
|
828
763
|
const items = useMemo7(() => {
|
|
829
764
|
let lastToolCall;
|
|
830
765
|
const tools = [];
|
|
831
|
-
return blocks.filter((block) => block._tag === "toolCall" || block._tag === "toolResult" || block._tag === "
|
|
766
|
+
return blocks.filter((block) => block._tag === "toolCall" || block._tag === "toolResult" || block._tag === "stats").map((block) => {
|
|
832
767
|
switch (block._tag) {
|
|
833
768
|
case "toolCall": {
|
|
834
769
|
if (block.pending && lastToolCall?.block.toolCallId === block.toolCallId) {
|
|
@@ -870,12 +805,12 @@ var ToolBlock = ({ view, blocks = [] }) => {
|
|
|
870
805
|
}
|
|
871
806
|
};
|
|
872
807
|
}
|
|
873
|
-
case "
|
|
808
|
+
case "stats": {
|
|
874
809
|
if (!lastToolCall) {
|
|
875
810
|
return null;
|
|
876
811
|
}
|
|
877
812
|
return {
|
|
878
|
-
title: t("
|
|
813
|
+
title: t("stats label"),
|
|
879
814
|
content: block
|
|
880
815
|
};
|
|
881
816
|
}
|
|
@@ -894,7 +829,7 @@ var ToolBlock = ({ view, blocks = [] }) => {
|
|
|
894
829
|
if (!items.length) {
|
|
895
830
|
return null;
|
|
896
831
|
}
|
|
897
|
-
return /* @__PURE__ */
|
|
832
|
+
return /* @__PURE__ */ React6.createElement(ToolContainer, {
|
|
898
833
|
items,
|
|
899
834
|
onChangeOpen: handleChangeOpen
|
|
900
835
|
});
|
|
@@ -916,26 +851,26 @@ var ToolContainer = ({ items, onChangeOpen }) => {
|
|
|
916
851
|
const handleSelect = useCallback5((index) => {
|
|
917
852
|
setSelected(index);
|
|
918
853
|
}, []);
|
|
919
|
-
return /* @__PURE__ */
|
|
920
|
-
classNames: "
|
|
854
|
+
return /* @__PURE__ */ React6.createElement(ToggleContainer.Root, {
|
|
855
|
+
classNames: "mt-2 w-full rounded-xs",
|
|
921
856
|
open,
|
|
922
857
|
onChangeOpen: setOpen
|
|
923
|
-
}, /* @__PURE__ */
|
|
858
|
+
}, /* @__PURE__ */ React6.createElement(ToggleContainer.Header, {
|
|
924
859
|
classNames: "text-sm text-placeholder"
|
|
925
|
-
}, /* @__PURE__ */
|
|
860
|
+
}, /* @__PURE__ */ React6.createElement(TextCrawl, {
|
|
926
861
|
key: "status-roll",
|
|
927
862
|
lines: items.map((item) => item.title),
|
|
928
863
|
autoAdvance: true,
|
|
929
864
|
greedy: true
|
|
930
|
-
})), /* @__PURE__ */
|
|
865
|
+
})), /* @__PURE__ */ React6.createElement(ToggleContainer.Content, {
|
|
931
866
|
classNames: "grid grid-cols-[32px_1fr]"
|
|
932
|
-
}, /* @__PURE__ */
|
|
867
|
+
}, /* @__PURE__ */ React6.createElement(NumericTabs, {
|
|
933
868
|
ref: tabsRef,
|
|
934
869
|
classNames: "p-1",
|
|
935
870
|
length: items.length,
|
|
936
871
|
selected,
|
|
937
872
|
onSelect: handleSelect
|
|
938
|
-
}), /* @__PURE__ */
|
|
873
|
+
}), /* @__PURE__ */ React6.createElement(Json, {
|
|
939
874
|
data: items[selected]?.content,
|
|
940
875
|
classNames: "p-1 text-xs bg-transparent",
|
|
941
876
|
replacer: {
|
|
@@ -949,50 +884,66 @@ var ToolContainer = ({ items, onChangeOpen }) => {
|
|
|
949
884
|
// src/components/ChatThread/registry.tsx
|
|
950
885
|
var __dxlog_file2 = "/__w/dxos/dxos/packages/plugins/plugin-assistant/src/components/ChatThread/registry.tsx";
|
|
951
886
|
var Fallback = ({ _tag, ...props }) => {
|
|
952
|
-
return /* @__PURE__ */
|
|
953
|
-
classNames: "rounded-
|
|
954
|
-
}, /* @__PURE__ */
|
|
955
|
-
classNames: "bg-
|
|
956
|
-
}, _tag), /* @__PURE__ */
|
|
957
|
-
classNames: "bg-
|
|
958
|
-
}, /* @__PURE__ */
|
|
959
|
-
classNames: "
|
|
887
|
+
return /* @__PURE__ */ React7.createElement(ToggleContainer2.Root, {
|
|
888
|
+
classNames: "rounded-xs"
|
|
889
|
+
}, /* @__PURE__ */ React7.createElement(ToggleContainer2.Header, {
|
|
890
|
+
classNames: "bg-group-surface"
|
|
891
|
+
}, _tag), /* @__PURE__ */ React7.createElement(ToggleContainer2.Content, {
|
|
892
|
+
classNames: "bg-modal-surface"
|
|
893
|
+
}, /* @__PURE__ */ React7.createElement(Json2, {
|
|
894
|
+
classNames: "p-2! text-sm",
|
|
960
895
|
data: props
|
|
961
896
|
})));
|
|
962
897
|
};
|
|
898
|
+
var Summary = ({ text }) => {
|
|
899
|
+
return /* @__PURE__ */ React7.createElement(ToggleContainer2.Root, {
|
|
900
|
+
classNames: "rounded-sm"
|
|
901
|
+
}, /* @__PURE__ */ React7.createElement(ToggleContainer2.Header, {
|
|
902
|
+
classNames: "bg-group-surface"
|
|
903
|
+
}, "Conversation summarized"), /* @__PURE__ */ React7.createElement(ToggleContainer2.Content, {
|
|
904
|
+
classNames: "bg-modal-surface"
|
|
905
|
+
}, text));
|
|
906
|
+
};
|
|
963
907
|
var componentRegistry = {
|
|
964
908
|
//
|
|
965
909
|
// Widgets
|
|
966
910
|
//
|
|
967
|
-
|
|
911
|
+
prompt: {
|
|
968
912
|
block: true,
|
|
969
913
|
factory: ({ children }) => {
|
|
970
914
|
const text = getXmlTextChild(children);
|
|
971
915
|
return text ? new PromptWidget(text) : null;
|
|
972
916
|
}
|
|
973
917
|
},
|
|
974
|
-
|
|
918
|
+
reasoning: {
|
|
919
|
+
block: true,
|
|
920
|
+
factory: ({ children }) => {
|
|
921
|
+
const text = getXmlTextChild(children);
|
|
922
|
+
return text ? new ReasoningWidget(text) : null;
|
|
923
|
+
}
|
|
924
|
+
},
|
|
925
|
+
reference: {
|
|
975
926
|
block: false,
|
|
976
927
|
factory: ({ children, ref }) => {
|
|
977
928
|
const text = getXmlTextChild(children);
|
|
978
929
|
return text && ref ? new ReferenceWidget(text, ref) : null;
|
|
979
930
|
}
|
|
980
931
|
},
|
|
981
|
-
|
|
932
|
+
select: {
|
|
982
933
|
block: true,
|
|
983
934
|
factory: ({ children }) => {
|
|
984
935
|
const options = children?.map((option) => option._tag === "option" && getXmlTextChild(option.children)).filter(Boolean);
|
|
985
936
|
return options?.length ? new SelectWidget(options) : null;
|
|
986
937
|
}
|
|
987
938
|
},
|
|
988
|
-
|
|
939
|
+
suggestion: {
|
|
989
940
|
block: true,
|
|
990
941
|
factory: ({ children }) => {
|
|
991
942
|
const text = getXmlTextChild(children);
|
|
992
943
|
return text ? new SuggestionWidget(text) : null;
|
|
993
944
|
}
|
|
994
945
|
},
|
|
995
|
-
|
|
946
|
+
stats: {
|
|
996
947
|
block: true,
|
|
997
948
|
factory: ({ children }) => {
|
|
998
949
|
const text = getXmlTextChild(children);
|
|
@@ -1002,22 +953,26 @@ var componentRegistry = {
|
|
|
1002
953
|
//
|
|
1003
954
|
// React
|
|
1004
955
|
//
|
|
1005
|
-
|
|
956
|
+
toolCall: {
|
|
1006
957
|
block: true,
|
|
1007
958
|
Component: ToolBlock
|
|
1008
959
|
},
|
|
1009
|
-
|
|
960
|
+
toolResult: {
|
|
1010
961
|
block: true,
|
|
1011
962
|
Component: Fallback
|
|
1012
963
|
},
|
|
1013
|
-
|
|
964
|
+
toolkit: {
|
|
1014
965
|
block: true,
|
|
1015
966
|
Component: Fallback
|
|
1016
967
|
},
|
|
968
|
+
summary: {
|
|
969
|
+
block: true,
|
|
970
|
+
Component: Summary
|
|
971
|
+
},
|
|
1017
972
|
//
|
|
1018
973
|
// Fallback
|
|
1019
974
|
//
|
|
1020
|
-
|
|
975
|
+
json: {
|
|
1021
976
|
block: true,
|
|
1022
977
|
Component: Fallback
|
|
1023
978
|
}
|
|
@@ -1034,7 +989,7 @@ var blockToMarkdownImpl = (context, message, block) => {
|
|
|
1034
989
|
block: JSON.stringify(block)
|
|
1035
990
|
}, {
|
|
1036
991
|
F: __dxlog_file2,
|
|
1037
|
-
L:
|
|
992
|
+
L: 146,
|
|
1038
993
|
S: void 0,
|
|
1039
994
|
C: (f, a) => f(...a)
|
|
1040
995
|
});
|
|
@@ -1075,7 +1030,9 @@ var blockToMarkdownImpl = (context, message, block) => {
|
|
|
1075
1030
|
return `<toolCall id="${block.toolCallId}" />`;
|
|
1076
1031
|
}
|
|
1077
1032
|
case "toolResult": {
|
|
1078
|
-
context.updateWidget(block.toolCallId, ({ blocks = [] }
|
|
1033
|
+
context.updateWidget(block.toolCallId, ({ blocks = [] } = {
|
|
1034
|
+
blocks: []
|
|
1035
|
+
}) => ({
|
|
1079
1036
|
blocks: [
|
|
1080
1037
|
...blocks,
|
|
1081
1038
|
block
|
|
@@ -1083,8 +1040,18 @@ var blockToMarkdownImpl = (context, message, block) => {
|
|
|
1083
1040
|
}));
|
|
1084
1041
|
break;
|
|
1085
1042
|
}
|
|
1043
|
+
case "stats": {
|
|
1044
|
+
return `<stats>${ContentBlock.createStatsMessage(block)}</stats>`;
|
|
1045
|
+
}
|
|
1046
|
+
case "reasoning": {
|
|
1047
|
+
const text = block.reasoningText ?? block.redactedText;
|
|
1048
|
+
if (!text) {
|
|
1049
|
+
return;
|
|
1050
|
+
}
|
|
1051
|
+
return `<reasoning>${text.replace(/\n/g, " ").trim()}</reasoning>`;
|
|
1052
|
+
}
|
|
1086
1053
|
case "summary": {
|
|
1087
|
-
return `<summary>${
|
|
1054
|
+
return `<summary>${block.content}</summary>`;
|
|
1088
1055
|
}
|
|
1089
1056
|
default: {
|
|
1090
1057
|
return `<json id="${message.id}">
|
|
@@ -1143,6 +1110,10 @@ var MessageSyncer = class {
|
|
|
1143
1110
|
* Syncs messages with the editor.
|
|
1144
1111
|
*/
|
|
1145
1112
|
append(messages, flush = false) {
|
|
1113
|
+
messages = messages.map((message) => ({
|
|
1114
|
+
...message,
|
|
1115
|
+
blocks: message.blocks.filter((block) => !block.pending || block._tag === "text")
|
|
1116
|
+
}));
|
|
1146
1117
|
if (this._initialMessageId !== messages[0]?.id) {
|
|
1147
1118
|
this.reset();
|
|
1148
1119
|
this._initialMessageId = messages[0]?.id;
|
|
@@ -1174,18 +1145,6 @@ var MessageSyncer = class {
|
|
|
1174
1145
|
}
|
|
1175
1146
|
}
|
|
1176
1147
|
process(messages, append) {
|
|
1177
|
-
log3("sync", {
|
|
1178
|
-
doc: this._model.view?.state.doc.length,
|
|
1179
|
-
messages: messages.map((message) => message.blocks.length),
|
|
1180
|
-
currentMessageIndex: this._currentMessageIndex,
|
|
1181
|
-
currentBlockIndex: this._currentBlockIndex,
|
|
1182
|
-
currentBlockContent: this._currentBlockContent
|
|
1183
|
-
}, {
|
|
1184
|
-
F: __dxlog_file3,
|
|
1185
|
-
L: 111,
|
|
1186
|
-
S: this,
|
|
1187
|
-
C: (f, a) => f(...a)
|
|
1188
|
-
});
|
|
1189
1148
|
let i = this._currentMessageIndex;
|
|
1190
1149
|
for (const message of messages.slice(this._currentMessageIndex)) {
|
|
1191
1150
|
if (i > this._currentMessageIndex) {
|
|
@@ -1203,16 +1162,6 @@ var MessageSyncer = class {
|
|
|
1203
1162
|
} else {
|
|
1204
1163
|
content = currentBlockContent;
|
|
1205
1164
|
}
|
|
1206
|
-
log3("append", {
|
|
1207
|
-
message: i,
|
|
1208
|
-
block: j,
|
|
1209
|
-
content
|
|
1210
|
-
}, {
|
|
1211
|
-
F: __dxlog_file3,
|
|
1212
|
-
L: 138,
|
|
1213
|
-
S: this,
|
|
1214
|
-
C: (f, a) => f(...a)
|
|
1215
|
-
});
|
|
1216
1165
|
this._currentBlockContent = currentBlockContent;
|
|
1217
1166
|
append(content);
|
|
1218
1167
|
}
|
|
@@ -1273,13 +1222,13 @@ var ChatThread = /* @__PURE__ */ forwardRef(({ classNames, identity, messages =
|
|
|
1273
1222
|
}, [
|
|
1274
1223
|
onEvent
|
|
1275
1224
|
]);
|
|
1276
|
-
return /* @__PURE__ */
|
|
1225
|
+
return /* @__PURE__ */ React8.createElement("div", {
|
|
1277
1226
|
role: "none",
|
|
1278
|
-
className:
|
|
1227
|
+
className: mx5("flex h-full w-full justify-center overflow-hidden", classNames),
|
|
1279
1228
|
style: {
|
|
1280
|
-
"--user-fill": `var(--
|
|
1229
|
+
"--user-fill": `var(--color-${userHue}-fill)`
|
|
1281
1230
|
}
|
|
1282
|
-
}, /* @__PURE__ */
|
|
1231
|
+
}, /* @__PURE__ */ React8.createElement(MarkdownStream, {
|
|
1283
1232
|
ref: refCallback,
|
|
1284
1233
|
registry: componentRegistry,
|
|
1285
1234
|
cursor,
|
|
@@ -1311,7 +1260,7 @@ var ChatRoot = ({ children, chat, processor, onEvent, ...props }) => {
|
|
|
1311
1260
|
return event.on((ev) => {
|
|
1312
1261
|
switch (ev.type) {
|
|
1313
1262
|
case "toggle-debug": {
|
|
1314
|
-
setDebug((
|
|
1263
|
+
setDebug((debug2) => !debug2);
|
|
1315
1264
|
queueMicrotask(async () => {
|
|
1316
1265
|
const objects = processor.context.getObjects();
|
|
1317
1266
|
const blueprints = processor.context.getBlueprints();
|
|
@@ -1368,7 +1317,7 @@ var ChatRoot = ({ children, chat, processor, onEvent, ...props }) => {
|
|
|
1368
1317
|
onEvent
|
|
1369
1318
|
]);
|
|
1370
1319
|
const db = props.db ?? (chat && Obj5.getDatabase(chat));
|
|
1371
|
-
return /* @__PURE__ */
|
|
1320
|
+
return /* @__PURE__ */ React9.createElement(ChatContextProvider, {
|
|
1372
1321
|
debug,
|
|
1373
1322
|
event,
|
|
1374
1323
|
db,
|
|
@@ -1380,10 +1329,11 @@ var ChatRoot = ({ children, chat, processor, onEvent, ...props }) => {
|
|
|
1380
1329
|
};
|
|
1381
1330
|
ChatRoot.displayName = "Chat.Root";
|
|
1382
1331
|
var CHAT_VIEWPORT_NAME = "Chat.Viewport";
|
|
1383
|
-
var ChatViewport = ({ classNames, children }) => {
|
|
1384
|
-
return /* @__PURE__ */
|
|
1332
|
+
var ChatViewport = ({ classNames, children, ...props }) => {
|
|
1333
|
+
return /* @__PURE__ */ React9.createElement("div", {
|
|
1385
1334
|
role: "none",
|
|
1386
|
-
|
|
1335
|
+
...props,
|
|
1336
|
+
className: mx6("flex flex-col h-full w-full", classNames)
|
|
1387
1337
|
}, children);
|
|
1388
1338
|
};
|
|
1389
1339
|
ChatViewport.displayName = CHAT_VIEWPORT_NAME;
|
|
@@ -1391,7 +1341,7 @@ var CHAT_THREAD_NAME = "Chat.Thread";
|
|
|
1391
1341
|
var ChatThread2 = (props) => {
|
|
1392
1342
|
const { debug, event, messages, processor } = useChatContext(CHAT_THREAD_NAME);
|
|
1393
1343
|
const identity = useIdentity();
|
|
1394
|
-
const error = useAtomValue(processor.error).pipe(
|
|
1344
|
+
const error = useAtomValue(processor.error).pipe(Option4.getOrUndefined);
|
|
1395
1345
|
const controllerRef = useRef3(null);
|
|
1396
1346
|
useEffect7(() => {
|
|
1397
1347
|
return event.on((event2) => {
|
|
@@ -1419,7 +1369,7 @@ var ChatThread2 = (props) => {
|
|
|
1419
1369
|
if (!identity) {
|
|
1420
1370
|
return null;
|
|
1421
1371
|
}
|
|
1422
|
-
return /* @__PURE__ */
|
|
1372
|
+
return /* @__PURE__ */ React9.createElement(ChatThread, {
|
|
1423
1373
|
...props,
|
|
1424
1374
|
identity,
|
|
1425
1375
|
messages,
|
|
@@ -1432,9 +1382,9 @@ var ChatThread2 = (props) => {
|
|
|
1432
1382
|
ChatThread2.displayName = CHAT_THREAD_NAME;
|
|
1433
1383
|
var CHAT_PROMPT_NAME = "Chat.Prompt";
|
|
1434
1384
|
var ChatPrompt = ({ classNames, outline, settings = true, placeholder, expandable, online, presets, preset, onPresetChange, onOnlineChange }) => {
|
|
1435
|
-
const { t } =
|
|
1385
|
+
const { t } = useTranslation5(meta.id);
|
|
1436
1386
|
const { db, processor, event } = useChatContext(CHAT_PROMPT_NAME);
|
|
1437
|
-
const error = useAtomValue(processor.error).pipe(
|
|
1387
|
+
const error = useAtomValue(processor.error).pipe(Option4.getOrUndefined);
|
|
1438
1388
|
const streaming = useAtomValue(processor.streaming);
|
|
1439
1389
|
const active = useAtomValue(processor.active);
|
|
1440
1390
|
const activeRef = useDynamicRef(active);
|
|
@@ -1534,67 +1484,68 @@ var ChatPrompt = ({ classNames, outline, settings = true, placeholder, expandabl
|
|
|
1534
1484
|
}, [
|
|
1535
1485
|
event
|
|
1536
1486
|
]);
|
|
1537
|
-
return /* @__PURE__ */
|
|
1487
|
+
return /* @__PURE__ */ React9.createElement("div", {
|
|
1538
1488
|
role: "group",
|
|
1539
|
-
className:
|
|
1540
|
-
}, /* @__PURE__ */
|
|
1489
|
+
className: mx6("flex flex-col w-full dx-density-fine", outline && "bg-group-surface border border-subdued-separator transition transition-border [&:has(.cm-content:focus)]:border-separator rounded-sm", classNames)
|
|
1490
|
+
}, /* @__PURE__ */ React9.createElement("div", {
|
|
1541
1491
|
role: "none",
|
|
1542
1492
|
className: "flex p-2 gap-2"
|
|
1543
|
-
}, /* @__PURE__ */
|
|
1493
|
+
}, /* @__PURE__ */ React9.createElement(ChatStatusIndicator, {
|
|
1544
1494
|
classNames: "p-1",
|
|
1545
1495
|
preset,
|
|
1546
1496
|
error,
|
|
1547
1497
|
processing: streaming
|
|
1548
|
-
}), /* @__PURE__ */
|
|
1498
|
+
}), /* @__PURE__ */ React9.createElement(ChatEditor, {
|
|
1549
1499
|
ref: editorRef,
|
|
1550
1500
|
autoFocus: true,
|
|
1551
1501
|
lineWrapping: true,
|
|
1552
|
-
classNames: "col-span-2
|
|
1502
|
+
classNames: "col-span-2 pt-0.5",
|
|
1553
1503
|
placeholder: placeholder ?? t("prompt placeholder"),
|
|
1554
1504
|
extensions,
|
|
1555
1505
|
onSubmit: handleSubmit
|
|
1556
|
-
})), db && settings && /* @__PURE__ */
|
|
1506
|
+
})), db && settings && /* @__PURE__ */ React9.createElement("div", {
|
|
1557
1507
|
role: "none",
|
|
1558
1508
|
className: "flex items-center overflow-hidden"
|
|
1559
|
-
}, /* @__PURE__ */
|
|
1509
|
+
}, /* @__PURE__ */ React9.createElement(ChatOptions, {
|
|
1560
1510
|
db,
|
|
1561
1511
|
blueprintRegistry: processor.blueprintRegistry,
|
|
1562
1512
|
context: processor.context,
|
|
1563
1513
|
preset,
|
|
1564
1514
|
presets,
|
|
1565
1515
|
onPresetChange
|
|
1566
|
-
}), /* @__PURE__ */
|
|
1516
|
+
}), /* @__PURE__ */ React9.createElement("div", {
|
|
1567
1517
|
role: "none",
|
|
1568
1518
|
className: "flex grow overflow-x-auto scrollbar-none"
|
|
1569
|
-
}, /* @__PURE__ */
|
|
1519
|
+
}, /* @__PURE__ */ React9.createElement(ChatReferences, {
|
|
1570
1520
|
db,
|
|
1571
1521
|
context: processor.context
|
|
1572
|
-
})), /* @__PURE__ */
|
|
1522
|
+
})), /* @__PURE__ */ React9.createElement(ChatActions, {
|
|
1573
1523
|
classNames: "col-span-2",
|
|
1574
1524
|
microphone: true,
|
|
1575
1525
|
recording,
|
|
1576
1526
|
processing: streaming,
|
|
1577
1527
|
onEvent: handleEvent
|
|
1578
|
-
}, online !== void 0 && /* @__PURE__ */
|
|
1528
|
+
}, online !== void 0 && /* @__PURE__ */ React9.createElement(Input.Root, null, /* @__PURE__ */ React9.createElement(Input.Label, {
|
|
1579
1529
|
srOnly: true
|
|
1580
|
-
}, t("online switch label")), /* @__PURE__ */
|
|
1581
|
-
classNames: "
|
|
1530
|
+
}, t("online switch label")), /* @__PURE__ */ React9.createElement(Input.Switch, {
|
|
1531
|
+
classNames: "mx-2",
|
|
1582
1532
|
checked: online,
|
|
1583
1533
|
onCheckedChange: onOnlineChange
|
|
1584
1534
|
})))));
|
|
1585
1535
|
};
|
|
1586
1536
|
ChatPrompt.displayName = CHAT_PROMPT_NAME;
|
|
1587
1537
|
var CHAT_TOOLBAR_NAME = "Chat.Toolbar";
|
|
1588
|
-
var ChatToolbar = ({ classNames, companionTo }) => {
|
|
1538
|
+
var ChatToolbar = ({ classNames, companionTo, ...props }) => {
|
|
1589
1539
|
const { chat } = useChatContext(CHAT_TOOLBAR_NAME);
|
|
1590
1540
|
const menu = useChatToolbarActions({
|
|
1591
1541
|
chat,
|
|
1592
1542
|
companionTo
|
|
1593
1543
|
});
|
|
1594
|
-
return /* @__PURE__ */
|
|
1544
|
+
return /* @__PURE__ */ React9.createElement(Menu.Root, {
|
|
1545
|
+
...props,
|
|
1595
1546
|
...menu,
|
|
1596
1547
|
attendableId: companionTo ? Obj5.getDXN(companionTo).toString() : chat ? Obj5.getDXN(chat).toString() : ""
|
|
1597
|
-
}, /* @__PURE__ */
|
|
1548
|
+
}, /* @__PURE__ */ React9.createElement(Menu.Toolbar, {
|
|
1598
1549
|
classNames,
|
|
1599
1550
|
textBlockWidth: true
|
|
1600
1551
|
}));
|
|
@@ -1608,13 +1559,331 @@ var Chat = {
|
|
|
1608
1559
|
Toolbar: ChatToolbar
|
|
1609
1560
|
};
|
|
1610
1561
|
|
|
1562
|
+
// src/components/TemplateEditor/TemplateEditor.tsx
|
|
1563
|
+
import { defaultHighlightStyle, syntaxHighlighting } from "@codemirror/language";
|
|
1564
|
+
import React10 from "react";
|
|
1565
|
+
import { createDocAccessor } from "@dxos/echo-db";
|
|
1566
|
+
import { useThemeContext, useTranslation as useTranslation6 } from "@dxos/react-ui";
|
|
1567
|
+
import { useTextEditor } from "@dxos/react-ui-editor";
|
|
1568
|
+
import { createBasicExtensions, createDataExtensions, createMarkdownExtensions, createThemeExtensions, decorateMarkdown } from "@dxos/ui-editor";
|
|
1569
|
+
import { mx as mx8 } from "@dxos/ui-theme";
|
|
1570
|
+
import { isNonNullable as isNonNullable2 } from "@dxos/util";
|
|
1571
|
+
|
|
1572
|
+
// src/components/TemplateEditor/extensions/handlebars-extension.ts
|
|
1573
|
+
import { autocompletion, completionKeymap } from "@codemirror/autocomplete";
|
|
1574
|
+
import { RangeSetBuilder } from "@codemirror/state";
|
|
1575
|
+
import { Decoration, ViewPlugin, WidgetType, keymap as keymap2 } from "@codemirror/view";
|
|
1576
|
+
import { Domino, mx as mx7 } from "@dxos/ui";
|
|
1577
|
+
var handlebars = (_ = {}) => {
|
|
1578
|
+
return [
|
|
1579
|
+
handlebarsHighlightPlugin,
|
|
1580
|
+
autocompletion({
|
|
1581
|
+
activateOnTyping: true,
|
|
1582
|
+
aboveCursor: true,
|
|
1583
|
+
closeOnBlur: true,
|
|
1584
|
+
override: [
|
|
1585
|
+
handlebarsCompletions
|
|
1586
|
+
]
|
|
1587
|
+
}),
|
|
1588
|
+
keymap2.of(completionKeymap)
|
|
1589
|
+
];
|
|
1590
|
+
};
|
|
1591
|
+
var regex = {
|
|
1592
|
+
// {{! comment }}
|
|
1593
|
+
comment: /\{\{!\s*[^}]*\}\}/g,
|
|
1594
|
+
// {{var}}
|
|
1595
|
+
brackets: /\{\{[^}]*\}\}/g,
|
|
1596
|
+
// {{#command}} {{/command}}
|
|
1597
|
+
command: /\{\{[#/]([^}]+)\}\}/g,
|
|
1598
|
+
// {{var}}
|
|
1599
|
+
var: /\{\{(?!\s*!)(\w[^}]*)\}\}/g,
|
|
1600
|
+
// @dxn:queue:data:xxx
|
|
1601
|
+
dxn: /@?dxn:[\w@:]+/g,
|
|
1602
|
+
// dxos.org/type/xxx
|
|
1603
|
+
url: /[\w.-]+\.[\w.-]+\/[\w/]+/g
|
|
1604
|
+
};
|
|
1605
|
+
var tagPadding = "mx-0.5 px-1 rounded-xs";
|
|
1606
|
+
var handlebarsHighlightPlugin = ViewPlugin.fromClass(class {
|
|
1607
|
+
decorations;
|
|
1608
|
+
constructor(view) {
|
|
1609
|
+
this.decorations = this.buildDecorations(view);
|
|
1610
|
+
}
|
|
1611
|
+
update(update) {
|
|
1612
|
+
if (update.docChanged || update.viewportChanged || update.selectionSet) {
|
|
1613
|
+
this.decorations = this.buildDecorations(update.view);
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1616
|
+
// NOTE: Decorations may clash with other extensions (e.g., markdown).
|
|
1617
|
+
buildDecorations(view) {
|
|
1618
|
+
const selection = view.state.selection.main;
|
|
1619
|
+
const decorations = [];
|
|
1620
|
+
for (const { from, to } of view.visibleRanges) {
|
|
1621
|
+
const text = view.state.doc.sliceString(from, to);
|
|
1622
|
+
{
|
|
1623
|
+
let match;
|
|
1624
|
+
while ((match = regex.dxn.exec(text)) !== null) {
|
|
1625
|
+
const start = from + match.index;
|
|
1626
|
+
const end = start + match[0].length;
|
|
1627
|
+
const overlaps = selection.to > start && selection.from <= end;
|
|
1628
|
+
if (!overlaps) {
|
|
1629
|
+
decorations.push({
|
|
1630
|
+
from: start,
|
|
1631
|
+
to: end,
|
|
1632
|
+
decoration: Decoration.widget({
|
|
1633
|
+
widget: new DXNWidget(match[0])
|
|
1634
|
+
})
|
|
1635
|
+
});
|
|
1636
|
+
}
|
|
1637
|
+
}
|
|
1638
|
+
}
|
|
1639
|
+
{
|
|
1640
|
+
let match;
|
|
1641
|
+
while ((match = regex.url.exec(text)) !== null) {
|
|
1642
|
+
const start = from + match.index;
|
|
1643
|
+
const end = start + match[0].length;
|
|
1644
|
+
decorations.push({
|
|
1645
|
+
from: start,
|
|
1646
|
+
to: end,
|
|
1647
|
+
decoration: Decoration.mark({
|
|
1648
|
+
class: mx7("dx-tag--blue", tagPadding)
|
|
1649
|
+
})
|
|
1650
|
+
});
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1653
|
+
{
|
|
1654
|
+
let match;
|
|
1655
|
+
while ((match = regex.brackets.exec(text)) !== null) {
|
|
1656
|
+
const start = from + match.index;
|
|
1657
|
+
const end = start + match[0].length;
|
|
1658
|
+
decorations.push({
|
|
1659
|
+
from: start,
|
|
1660
|
+
to: end,
|
|
1661
|
+
decoration: Decoration.mark({
|
|
1662
|
+
class: "text-subdued"
|
|
1663
|
+
})
|
|
1664
|
+
});
|
|
1665
|
+
}
|
|
1666
|
+
}
|
|
1667
|
+
{
|
|
1668
|
+
let match;
|
|
1669
|
+
while ((match = regex.command.exec(text)) !== null) {
|
|
1670
|
+
const start = from + match.index + 2;
|
|
1671
|
+
let end = start + match[0].length - 4;
|
|
1672
|
+
const text2 = view.state.doc.sliceString(start, end);
|
|
1673
|
+
const parts = text2.split(/\s+/);
|
|
1674
|
+
if (parts.length > 1) {
|
|
1675
|
+
const idx = start + parts[0].length;
|
|
1676
|
+
decorations.push({
|
|
1677
|
+
from: idx,
|
|
1678
|
+
to: end,
|
|
1679
|
+
decoration: Decoration.mark({
|
|
1680
|
+
class: "text-green-text"
|
|
1681
|
+
})
|
|
1682
|
+
});
|
|
1683
|
+
end = idx;
|
|
1684
|
+
}
|
|
1685
|
+
decorations.push({
|
|
1686
|
+
from: start,
|
|
1687
|
+
to: end,
|
|
1688
|
+
decoration: Decoration.mark({
|
|
1689
|
+
class: "text-blue-text"
|
|
1690
|
+
})
|
|
1691
|
+
});
|
|
1692
|
+
}
|
|
1693
|
+
}
|
|
1694
|
+
{
|
|
1695
|
+
let match;
|
|
1696
|
+
while ((match = regex.var.exec(text)) !== null) {
|
|
1697
|
+
const start = from + match.index + 2;
|
|
1698
|
+
const end = start + match[0].length - 4;
|
|
1699
|
+
decorations.push({
|
|
1700
|
+
from: start,
|
|
1701
|
+
to: end,
|
|
1702
|
+
decoration: Decoration.mark({
|
|
1703
|
+
class: "text-green-text"
|
|
1704
|
+
})
|
|
1705
|
+
});
|
|
1706
|
+
}
|
|
1707
|
+
}
|
|
1708
|
+
}
|
|
1709
|
+
decorations.sort((a, b) => a.from - b.from || a.to - b.to);
|
|
1710
|
+
const builder = new RangeSetBuilder();
|
|
1711
|
+
for (const { from, to, decoration } of decorations) {
|
|
1712
|
+
builder.add(from, to, decoration);
|
|
1713
|
+
}
|
|
1714
|
+
return builder.finish();
|
|
1715
|
+
}
|
|
1716
|
+
}, {
|
|
1717
|
+
decorations: (v) => v.decorations
|
|
1718
|
+
});
|
|
1719
|
+
var DXNWidget = class extends WidgetType {
|
|
1720
|
+
_identifier;
|
|
1721
|
+
constructor(_identifier) {
|
|
1722
|
+
super(), this._identifier = _identifier;
|
|
1723
|
+
}
|
|
1724
|
+
ignoreEvent() {
|
|
1725
|
+
return false;
|
|
1726
|
+
}
|
|
1727
|
+
eq(other) {
|
|
1728
|
+
return this._identifier === other._identifier;
|
|
1729
|
+
}
|
|
1730
|
+
toDOM() {
|
|
1731
|
+
const text = this._identifier.split(":").map((part) => {
|
|
1732
|
+
const len = 16;
|
|
1733
|
+
const plen = 4;
|
|
1734
|
+
if (part.length > len) {
|
|
1735
|
+
return `[${part.slice(0, plen)}\u2026${part.slice(-plen)}]`;
|
|
1736
|
+
}
|
|
1737
|
+
return part;
|
|
1738
|
+
}).join(":");
|
|
1739
|
+
return Domino.of("span").classNames(mx7("font-mono dx-tag--blue", tagPadding)).text(text).root;
|
|
1740
|
+
}
|
|
1741
|
+
};
|
|
1742
|
+
var variables = [
|
|
1743
|
+
"this"
|
|
1744
|
+
];
|
|
1745
|
+
var commands = [
|
|
1746
|
+
"this",
|
|
1747
|
+
"each",
|
|
1748
|
+
"if",
|
|
1749
|
+
"unless",
|
|
1750
|
+
"with"
|
|
1751
|
+
];
|
|
1752
|
+
function handlebarsCompletions(context) {
|
|
1753
|
+
const match = context.matchBefore(/\{\{[^}]*/);
|
|
1754
|
+
if (!match || match.from === match.to) {
|
|
1755
|
+
return null;
|
|
1756
|
+
}
|
|
1757
|
+
let type = "variable";
|
|
1758
|
+
let text = match.text.slice(2);
|
|
1759
|
+
let from = match.from + 2;
|
|
1760
|
+
let matches = [];
|
|
1761
|
+
if (text.startsWith("#") || text.startsWith("/")) {
|
|
1762
|
+
const idx = text.lastIndexOf(" ");
|
|
1763
|
+
if (idx !== -1) {
|
|
1764
|
+
type = "variable";
|
|
1765
|
+
matches = variables;
|
|
1766
|
+
text = text.slice(idx + 1);
|
|
1767
|
+
from += idx + 1;
|
|
1768
|
+
} else {
|
|
1769
|
+
type = "command";
|
|
1770
|
+
text = text.slice(1);
|
|
1771
|
+
matches = commands;
|
|
1772
|
+
from += 1;
|
|
1773
|
+
}
|
|
1774
|
+
} else {
|
|
1775
|
+
type = "variable";
|
|
1776
|
+
matches = variables;
|
|
1777
|
+
}
|
|
1778
|
+
const options = matches.filter((name) => name.startsWith(text)).map((name) => ({
|
|
1779
|
+
type,
|
|
1780
|
+
label: name
|
|
1781
|
+
}));
|
|
1782
|
+
return {
|
|
1783
|
+
from,
|
|
1784
|
+
options
|
|
1785
|
+
};
|
|
1786
|
+
}
|
|
1787
|
+
|
|
1788
|
+
// src/components/TemplateEditor/extensions/xml-extension.ts
|
|
1789
|
+
import { syntaxTree } from "@codemirror/language";
|
|
1790
|
+
import { RangeSetBuilder as RangeSetBuilder2 } from "@codemirror/state";
|
|
1791
|
+
import { Decoration as Decoration2, ViewPlugin as ViewPlugin2 } from "@codemirror/view";
|
|
1792
|
+
var xmlDecorator = (_ = {}) => {
|
|
1793
|
+
return [
|
|
1794
|
+
xmlDecoratorPlugin
|
|
1795
|
+
];
|
|
1796
|
+
};
|
|
1797
|
+
var xmlDecoratorPlugin = ViewPlugin2.fromClass(class {
|
|
1798
|
+
decorations;
|
|
1799
|
+
constructor(view) {
|
|
1800
|
+
this.decorations = this.buildDecorations(view);
|
|
1801
|
+
}
|
|
1802
|
+
update(update) {
|
|
1803
|
+
if (update.docChanged || update.viewportChanged) {
|
|
1804
|
+
this.decorations = this.buildDecorations(update.view);
|
|
1805
|
+
}
|
|
1806
|
+
}
|
|
1807
|
+
buildDecorations(view) {
|
|
1808
|
+
const builder = new RangeSetBuilder2();
|
|
1809
|
+
for (const { from, to } of view.visibleRanges) {
|
|
1810
|
+
syntaxTree(view.state).iterate({
|
|
1811
|
+
from,
|
|
1812
|
+
to,
|
|
1813
|
+
enter: (node) => {
|
|
1814
|
+
if (node.name === "HTMLTag" || node.name === "OpenTag" || node.name === "CloseTag" || node.name === "SelfClosingTag" || node.name === "Element") {
|
|
1815
|
+
builder.add(node.from, node.to, Decoration2.mark({
|
|
1816
|
+
class: "font-mono text-subdued"
|
|
1817
|
+
}));
|
|
1818
|
+
}
|
|
1819
|
+
}
|
|
1820
|
+
});
|
|
1821
|
+
}
|
|
1822
|
+
return builder.finish();
|
|
1823
|
+
}
|
|
1824
|
+
}, {
|
|
1825
|
+
decorations: (v) => v.decorations
|
|
1826
|
+
});
|
|
1827
|
+
|
|
1828
|
+
// src/components/TemplateEditor/TemplateEditor.tsx
|
|
1829
|
+
var TemplateEditor = ({ id, classNames, template, lineNumbers = true }) => {
|
|
1830
|
+
const { t } = useTranslation6(meta.id);
|
|
1831
|
+
const { themeMode } = useThemeContext();
|
|
1832
|
+
const { parentRef } = useTextEditor(() => {
|
|
1833
|
+
const text = template.source?.target;
|
|
1834
|
+
if (!text) {
|
|
1835
|
+
return {};
|
|
1836
|
+
}
|
|
1837
|
+
return {
|
|
1838
|
+
initialValue: text.content ?? "",
|
|
1839
|
+
extensions: [
|
|
1840
|
+
createDataExtensions({
|
|
1841
|
+
id,
|
|
1842
|
+
text: createDocAccessor(text, [
|
|
1843
|
+
"content"
|
|
1844
|
+
])
|
|
1845
|
+
}),
|
|
1846
|
+
createBasicExtensions({
|
|
1847
|
+
bracketMatching: false,
|
|
1848
|
+
lineNumbers,
|
|
1849
|
+
lineWrapping: true,
|
|
1850
|
+
placeholder: t("template placeholder")
|
|
1851
|
+
}),
|
|
1852
|
+
createThemeExtensions({
|
|
1853
|
+
themeMode,
|
|
1854
|
+
slots: {
|
|
1855
|
+
content: {
|
|
1856
|
+
className: "!pe-4"
|
|
1857
|
+
}
|
|
1858
|
+
}
|
|
1859
|
+
}),
|
|
1860
|
+
createMarkdownExtensions(),
|
|
1861
|
+
decorateMarkdown(),
|
|
1862
|
+
handlebars(),
|
|
1863
|
+
// xml(),
|
|
1864
|
+
// NOTE: Since we're using markdown only HTML nodes are parsed.
|
|
1865
|
+
xmlDecorator(),
|
|
1866
|
+
syntaxHighlighting(defaultHighlightStyle)
|
|
1867
|
+
].filter(isNonNullable2)
|
|
1868
|
+
};
|
|
1869
|
+
}, [
|
|
1870
|
+
themeMode,
|
|
1871
|
+
template.source?.target,
|
|
1872
|
+
lineNumbers
|
|
1873
|
+
]);
|
|
1874
|
+
return /* @__PURE__ */ React10.createElement("div", {
|
|
1875
|
+
ref: parentRef,
|
|
1876
|
+
className: mx8("h-full overflow-hidden", classNames)
|
|
1877
|
+
});
|
|
1878
|
+
};
|
|
1879
|
+
|
|
1611
1880
|
// src/components/Toolbox/Toolbox.tsx
|
|
1612
1881
|
import React11, { Fragment, useEffect as useEffect8, useState as useState13 } from "react";
|
|
1613
1882
|
import { Function } from "@dxos/functions";
|
|
1614
1883
|
import { log as log4 } from "@dxos/log";
|
|
1615
1884
|
import { Filter as Filter5, useQuery as useQuery4 } from "@dxos/react-client/echo";
|
|
1616
1885
|
import { ScrollArea } from "@dxos/react-ui";
|
|
1617
|
-
import { mx as
|
|
1886
|
+
import { mx as mx9 } from "@dxos/ui-theme";
|
|
1618
1887
|
var __dxlog_file4 = "/__w/dxos/dxos/packages/plugins/plugin-assistant/src/components/Toolbox/Toolbox.tsx";
|
|
1619
1888
|
var Toolbox = ({ classNames, functions, services, blueprints, activeBlueprints }) => {
|
|
1620
1889
|
return /* @__PURE__ */ React11.createElement(ScrollArea.Root, {
|
|
@@ -1657,9 +1926,9 @@ var Toolbox = ({ classNames, functions, services, blueprints, activeBlueprints }
|
|
|
1657
1926
|
var Section = ({ title, items, striped }) => {
|
|
1658
1927
|
const stripeClassNames = "odd:bg-neutral-50 dark:odd:bg-neutral-800";
|
|
1659
1928
|
const gridClassNames = "grid grid-cols-[8rem_1fr]";
|
|
1660
|
-
const subGridClassNames =
|
|
1929
|
+
const subGridClassNames = mx9("col-span-full grid grid-cols-subgrid text-xs px-2", striped && stripeClassNames);
|
|
1661
1930
|
return /* @__PURE__ */ React11.createElement("div", null, /* @__PURE__ */ React11.createElement("h1", {
|
|
1662
|
-
className: "
|
|
1931
|
+
className: "px-2 text-sm"
|
|
1663
1932
|
}, title), /* @__PURE__ */ React11.createElement("div", {
|
|
1664
1933
|
className: gridClassNames
|
|
1665
1934
|
}, items.map(({ name, description, subitems }, i) => /* @__PURE__ */ React11.createElement(Fragment, {
|
|
@@ -1672,7 +1941,7 @@ var Section = ({ title, items, striped }) => {
|
|
|
1672
1941
|
className: "line-clamp-2"
|
|
1673
1942
|
}, description)), subitems?.map(({ name: name2, description: description2 }, i2) => /* @__PURE__ */ React11.createElement("div", {
|
|
1674
1943
|
key: i2,
|
|
1675
|
-
className:
|
|
1944
|
+
className: mx9(subGridClassNames, striped && stripeClassNames)
|
|
1676
1945
|
}, /* @__PURE__ */ React11.createElement("div", {
|
|
1677
1946
|
className: "truncate"
|
|
1678
1947
|
}, name2), /* @__PURE__ */ React11.createElement("div", {
|
|
@@ -1708,117 +1977,6 @@ var safeToolId = (name) => {
|
|
|
1708
1977
|
return name.split("_").pop();
|
|
1709
1978
|
};
|
|
1710
1979
|
|
|
1711
|
-
// src/components/TriggerStatus/TriggerStatus.tsx
|
|
1712
|
-
import React12, { useMemo as useMemo10 } from "react";
|
|
1713
|
-
import { useCapability as useCapability2 } from "@dxos/app-framework/ui";
|
|
1714
|
-
import { useLayout } from "@dxos/app-toolkit/ui";
|
|
1715
|
-
import { useTriggerRuntimeControls } from "@dxos/plugin-automation";
|
|
1716
|
-
import { ClientCapabilities } from "@dxos/plugin-client/types";
|
|
1717
|
-
import { StatusBar } from "@dxos/plugin-status-bar";
|
|
1718
|
-
import { parseId } from "@dxos/react-client/echo";
|
|
1719
|
-
import { Icon, Input as Input3, Popover as Popover2, useTranslation as useTranslation7 } from "@dxos/react-ui";
|
|
1720
|
-
import { Settings as Settings2 } from "@dxos/react-ui-form";
|
|
1721
|
-
import { mx as mx7 } from "@dxos/ui-theme";
|
|
1722
|
-
var getIcon = (state) => {
|
|
1723
|
-
switch (state) {
|
|
1724
|
-
case "disabled":
|
|
1725
|
-
return "ph--lightning-slash--regular";
|
|
1726
|
-
case "idle":
|
|
1727
|
-
return "ph--lightning--regular";
|
|
1728
|
-
case "running":
|
|
1729
|
-
return "ph--lightning--fill";
|
|
1730
|
-
case "error":
|
|
1731
|
-
return "ph--warning--regular";
|
|
1732
|
-
}
|
|
1733
|
-
};
|
|
1734
|
-
var getIconClassNames = (state) => {
|
|
1735
|
-
switch (state) {
|
|
1736
|
-
case "running":
|
|
1737
|
-
return "animate-pulse text-accentText";
|
|
1738
|
-
case "error":
|
|
1739
|
-
return "text-errorText";
|
|
1740
|
-
default:
|
|
1741
|
-
return void 0;
|
|
1742
|
-
}
|
|
1743
|
-
};
|
|
1744
|
-
var useCurrentSpace = () => {
|
|
1745
|
-
const layout = useLayout();
|
|
1746
|
-
const client = useCapability2(ClientCapabilities.Client);
|
|
1747
|
-
const { spaceId } = parseId(layout.workspace);
|
|
1748
|
-
const space = spaceId ? client.spaces.get(spaceId) : void 0;
|
|
1749
|
-
return space;
|
|
1750
|
-
};
|
|
1751
|
-
var TriggerStatus = () => {
|
|
1752
|
-
const space = useCurrentSpace();
|
|
1753
|
-
const db = space?.db;
|
|
1754
|
-
const { state, start, stop } = useTriggerRuntimeControls(db);
|
|
1755
|
-
const isRunning = state?.enabled ?? false;
|
|
1756
|
-
const triggerState = useMemo10(() => {
|
|
1757
|
-
if (!isRunning) {
|
|
1758
|
-
return "disabled";
|
|
1759
|
-
}
|
|
1760
|
-
const hasPending = state?.invocations.some((invocation) => invocation.result === null);
|
|
1761
|
-
if (hasPending) {
|
|
1762
|
-
return "running";
|
|
1763
|
-
}
|
|
1764
|
-
const lastInvocation = state?.invocations.at(-1);
|
|
1765
|
-
if (lastInvocation?.result?._tag === "Failure") {
|
|
1766
|
-
return "error";
|
|
1767
|
-
}
|
|
1768
|
-
return "idle";
|
|
1769
|
-
}, [
|
|
1770
|
-
isRunning,
|
|
1771
|
-
state?.invocations
|
|
1772
|
-
]);
|
|
1773
|
-
const { t } = useTranslation7(meta.id);
|
|
1774
|
-
const title = t(`trigger status ${triggerState} label`);
|
|
1775
|
-
const icon = /* @__PURE__ */ React12.createElement(Icon, {
|
|
1776
|
-
icon: getIcon(triggerState),
|
|
1777
|
-
classNames: getIconClassNames(triggerState)
|
|
1778
|
-
});
|
|
1779
|
-
return /* @__PURE__ */ React12.createElement(Popover2.Root, null, /* @__PURE__ */ React12.createElement(Popover2.Trigger, {
|
|
1780
|
-
asChild: true
|
|
1781
|
-
}, /* @__PURE__ */ React12.createElement(StatusBar.Item, {
|
|
1782
|
-
title
|
|
1783
|
-
}, icon)), /* @__PURE__ */ React12.createElement(Popover2.Portal, null, /* @__PURE__ */ React12.createElement(Popover2.Content, null, /* @__PURE__ */ React12.createElement(TriggerStatusPopover, {
|
|
1784
|
-
isRunning,
|
|
1785
|
-
state: triggerState,
|
|
1786
|
-
currentFunctionName: state?.invocations.at(-1)?.function?.name ?? state?.invocations.at(-1)?.function?.key,
|
|
1787
|
-
lastInvocation: state?.invocations.at(-1),
|
|
1788
|
-
onToggle: isRunning ? stop : start
|
|
1789
|
-
}), /* @__PURE__ */ React12.createElement(Popover2.Arrow, null))));
|
|
1790
|
-
};
|
|
1791
|
-
var TriggerStatusPopover = ({ isRunning, state, currentFunctionName, lastInvocation, onToggle }) => {
|
|
1792
|
-
const { t } = useTranslation7(meta.id);
|
|
1793
|
-
return /* @__PURE__ */ React12.createElement("div", {
|
|
1794
|
-
className: "min-is-[240px] p-2 space-y-3"
|
|
1795
|
-
}, /* @__PURE__ */ React12.createElement(Settings2.ItemInput, {
|
|
1796
|
-
title: t("trigger runtime label"),
|
|
1797
|
-
description: t("trigger runtime description")
|
|
1798
|
-
}, /* @__PURE__ */ React12.createElement(Input3.Switch, {
|
|
1799
|
-
classNames: "justify-self-end",
|
|
1800
|
-
checked: isRunning,
|
|
1801
|
-
onCheckedChange: onToggle
|
|
1802
|
-
})), /* @__PURE__ */ React12.createElement("div", {
|
|
1803
|
-
className: "flex items-center gap-2 pt-2 border-t border-separator"
|
|
1804
|
-
}, /* @__PURE__ */ React12.createElement(Icon, {
|
|
1805
|
-
icon: getIcon(state),
|
|
1806
|
-
classNames: mx7(getIconClassNames(state), "shrink-0")
|
|
1807
|
-
}), /* @__PURE__ */ React12.createElement("span", {
|
|
1808
|
-
className: "text-sm"
|
|
1809
|
-
}, t(`trigger status ${state} label`)), currentFunctionName && state === "running" && /* @__PURE__ */ React12.createElement("span", {
|
|
1810
|
-
className: "text-xs text-description"
|
|
1811
|
-
}, currentFunctionName)));
|
|
1812
|
-
};
|
|
1813
|
-
|
|
1814
|
-
// src/components/index.ts
|
|
1815
|
-
var BlueprintArticle = lazy(() => import("./BlueprintArticle-7LI6UXKZ.mjs"));
|
|
1816
|
-
var ChatCompanion = lazy(() => import("./ChatCompanion-W4PGOCGR.mjs"));
|
|
1817
|
-
var ChatContainer = lazy(() => import("./ChatContainer-ECFQVH6O.mjs"));
|
|
1818
|
-
var ChatDialog = lazy(() => import("./ChatDialog-AFLPYSIU.mjs"));
|
|
1819
|
-
var InitiativeContainer = lazy(() => import("./InitiativeContainer-U4LGO3BW.mjs"));
|
|
1820
|
-
var PromptArticle = lazy(() => import("./PromptArticle-BHPABYLT.mjs"));
|
|
1821
|
-
|
|
1822
1980
|
// src/hooks/useChatToolbarActions.ts
|
|
1823
1981
|
var __dxlog_file5 = "/__w/dxos/dxos/packages/plugins/plugin-assistant/src/hooks/useChatToolbarActions.ts";
|
|
1824
1982
|
var useChatToolbarActions = ({ chat, companionTo }) => {
|
|
@@ -1826,7 +1984,7 @@ var useChatToolbarActions = ({ chat, companionTo }) => {
|
|
|
1826
1984
|
const { db } = useChatContext("useChatToolbarActions");
|
|
1827
1985
|
const query = companionTo ? Query.select(Filter6.id(companionTo.id)).targetOf(Chat2.CompanionTo).source() : Query.select(Filter6.nothing());
|
|
1828
1986
|
const chats = useQuery5(db, query);
|
|
1829
|
-
return useMenuActions(
|
|
1987
|
+
return useMenuActions(useMemo10(() => {
|
|
1830
1988
|
return Atom.make(() => {
|
|
1831
1989
|
const builder = MenuBuilder.make().root({
|
|
1832
1990
|
label: [
|
|
@@ -1944,7 +2102,6 @@ var useChatToolbarActions = ({ chat, companionTo }) => {
|
|
|
1944
2102
|
};
|
|
1945
2103
|
|
|
1946
2104
|
export {
|
|
1947
|
-
AssistantSettings,
|
|
1948
2105
|
useBlueprintRegistry,
|
|
1949
2106
|
useBlueprints,
|
|
1950
2107
|
useActiveBlueprints,
|
|
@@ -1962,14 +2119,8 @@ export {
|
|
|
1962
2119
|
ChatContextProvider,
|
|
1963
2120
|
useChatContext,
|
|
1964
2121
|
Chat,
|
|
2122
|
+
TemplateEditor,
|
|
1965
2123
|
Toolbox,
|
|
1966
|
-
ToolboxContainer
|
|
1967
|
-
TriggerStatus,
|
|
1968
|
-
BlueprintArticle,
|
|
1969
|
-
ChatCompanion,
|
|
1970
|
-
ChatContainer,
|
|
1971
|
-
ChatDialog,
|
|
1972
|
-
InitiativeContainer,
|
|
1973
|
-
PromptArticle
|
|
2124
|
+
ToolboxContainer
|
|
1974
2125
|
};
|
|
1975
|
-
//# sourceMappingURL=chunk-
|
|
2126
|
+
//# sourceMappingURL=chunk-GZ4ERNT2.mjs.map
|