@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
|
@@ -11,15 +11,14 @@ import React, { useEffect, useState } from 'react';
|
|
|
11
11
|
|
|
12
12
|
import { AiService } from '@dxos/ai';
|
|
13
13
|
import { AiServiceTestingPreset } from '@dxos/ai/testing';
|
|
14
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
14
15
|
|
|
15
16
|
import { Typewriter } from './Typewriter';
|
|
16
17
|
|
|
17
18
|
const meta: Meta<typeof Typewriter> = {
|
|
18
|
-
title: 'plugins/plugin-assistant/Typewriter',
|
|
19
|
+
title: 'plugins/plugin-assistant/components/Typewriter',
|
|
19
20
|
component: Typewriter,
|
|
20
|
-
|
|
21
|
-
layout: 'centered',
|
|
22
|
-
},
|
|
21
|
+
decorators: [withTheme(), withLayout({ layout: 'column' })],
|
|
23
22
|
};
|
|
24
23
|
|
|
25
24
|
export default meta;
|
|
@@ -49,7 +48,7 @@ The quick brown fox jumps over teh lazy dog. i think this is cool.
|
|
|
49
48
|
|
|
50
49
|
export const Default: Story = {
|
|
51
50
|
render: () => {
|
|
52
|
-
const [
|
|
51
|
+
const [runtime, setRuntime] = useState<Runtime.Runtime<LanguageModel.LanguageModel>>();
|
|
53
52
|
useEffect(() => {
|
|
54
53
|
let disposed = false;
|
|
55
54
|
const rt = ManagedRuntime.make(
|
|
@@ -59,10 +58,18 @@ export const Default: Story = {
|
|
|
59
58
|
),
|
|
60
59
|
);
|
|
61
60
|
queueMicrotask(async () => {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
try {
|
|
62
|
+
if (disposed) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
const runtime = await rt.runtime();
|
|
66
|
+
if (disposed) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
setRuntime(runtime);
|
|
70
|
+
} catch (error) {
|
|
71
|
+
console.error('Failed to initialize runtime:', error);
|
|
72
|
+
}
|
|
66
73
|
});
|
|
67
74
|
return () => {
|
|
68
75
|
disposed = true;
|
|
@@ -70,14 +77,10 @@ export const Default: Story = {
|
|
|
70
77
|
};
|
|
71
78
|
}, []);
|
|
72
79
|
|
|
73
|
-
if (!
|
|
80
|
+
if (!runtime) {
|
|
74
81
|
return <div>...Loading</div>;
|
|
75
82
|
}
|
|
76
83
|
|
|
77
|
-
return
|
|
78
|
-
<div className='w-[800px] p-4'>
|
|
79
|
-
<Typewriter initialContent={sampleText} runtime={rtEffect} />
|
|
80
|
-
</div>
|
|
81
|
-
);
|
|
84
|
+
return <Typewriter initialContent={sampleText} runtime={runtime} />;
|
|
82
85
|
},
|
|
83
86
|
};
|
|
@@ -41,7 +41,7 @@ export const Typewriter = ({ initialContent = '', extensions = [], runtime }: Ty
|
|
|
41
41
|
return (
|
|
42
42
|
<ThemeProvider>
|
|
43
43
|
<DensityProvider density='fine'>
|
|
44
|
-
<div className='
|
|
44
|
+
<div className='w-full h-full grid overflow-hidden'>
|
|
45
45
|
<Editor.Root ref={editorRef}>
|
|
46
46
|
<Editor.Viewport>
|
|
47
47
|
<Editor.Content initialValue={initialContent} extensions={extension} />
|
|
@@ -111,9 +111,7 @@ const assistantLinter = (runtime: Runtime.Runtime<LanguageModel.LanguageModel>)
|
|
|
111
111
|
if (match) {
|
|
112
112
|
suggestions = JSON.parse(match[0]);
|
|
113
113
|
}
|
|
114
|
-
} catch
|
|
115
|
-
// failed to parse
|
|
116
|
-
}
|
|
114
|
+
} catch {}
|
|
117
115
|
|
|
118
116
|
const diagnostics: Diagnostic[] = [];
|
|
119
117
|
for (const s of suggestions) {
|
|
@@ -137,8 +135,8 @@ const assistantLinter = (runtime: Runtime.Runtime<LanguageModel.LanguageModel>)
|
|
|
137
135
|
}
|
|
138
136
|
}
|
|
139
137
|
return diagnostics;
|
|
140
|
-
} catch (
|
|
141
|
-
log.
|
|
138
|
+
} catch (error) {
|
|
139
|
+
log.catch(error);
|
|
142
140
|
return [];
|
|
143
141
|
}
|
|
144
142
|
});
|
package/src/components/index.ts
CHANGED
|
@@ -2,24 +2,6 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { type LazyExoticComponent, lazy } from 'react';
|
|
6
|
-
|
|
7
|
-
export * from './AssistantSettings';
|
|
8
5
|
export * from './Chat';
|
|
9
6
|
export * from './TemplateEditor';
|
|
10
7
|
export * from './Toolbox';
|
|
11
|
-
export * from './TriggerStatus';
|
|
12
|
-
|
|
13
|
-
export const BlueprintArticle = lazy(() => import('./BlueprintArticle'));
|
|
14
|
-
export const ChatCompanion = lazy(() => import('./ChatCompanion'));
|
|
15
|
-
// Type annotation needed to avoid declaration file emission issues with @dxos/assistant-toolkit types.
|
|
16
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
17
|
-
export const ChatContainer: LazyExoticComponent<typeof import('./ChatContainer').default> = lazy(
|
|
18
|
-
() => import('./ChatContainer'),
|
|
19
|
-
);
|
|
20
|
-
export const ChatDialog = lazy(() => import('./ChatDialog'));
|
|
21
|
-
export const InitiativeContainer = lazy(() => import('./InitiativeContainer'));
|
|
22
|
-
export const PromptArticle = lazy(() => import('./PromptArticle'));
|
|
23
|
-
|
|
24
|
-
export type { ChatContainerProps } from './ChatContainer';
|
|
25
|
-
export type { ChatDialogProps } from './ChatDialog';
|
|
@@ -7,10 +7,10 @@ import React from 'react';
|
|
|
7
7
|
import { type SurfaceComponentProps } from '@dxos/app-toolkit/ui';
|
|
8
8
|
import { type Blueprint } from '@dxos/blueprints';
|
|
9
9
|
import { Obj } from '@dxos/echo';
|
|
10
|
-
import {
|
|
10
|
+
import { Panel, Toolbar } from '@dxos/react-ui';
|
|
11
11
|
import { useAttention } from '@dxos/react-ui-attention';
|
|
12
12
|
|
|
13
|
-
import { TemplateEditor } from '
|
|
13
|
+
import { TemplateEditor } from '../../components';
|
|
14
14
|
|
|
15
15
|
export type BlueprintArticleProps = SurfaceComponentProps<Blueprint.Blueprint>;
|
|
16
16
|
|
|
@@ -18,11 +18,13 @@ export const BlueprintArticle = ({ role, subject }: BlueprintArticleProps) => {
|
|
|
18
18
|
const { hasAttention } = useAttention(Obj.getDXN(subject).toString());
|
|
19
19
|
|
|
20
20
|
return (
|
|
21
|
-
<
|
|
22
|
-
<Toolbar
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
<Panel.Root role={role} classNames='dx-article'>
|
|
22
|
+
<Panel.Toolbar asChild>
|
|
23
|
+
<Toolbar.Root disabled={!hasAttention} />
|
|
24
|
+
</Panel.Toolbar>
|
|
25
|
+
<Panel.Content asChild>
|
|
26
|
+
<TemplateEditor id={subject.id} template={subject.instructions} />
|
|
27
|
+
</Panel.Content>
|
|
28
|
+
</Panel.Root>
|
|
25
29
|
);
|
|
26
30
|
};
|
|
27
|
-
|
|
28
|
-
export default BlueprintArticle;
|
|
@@ -17,9 +17,10 @@ import { SpaceOperation } from '@dxos/plugin-space/types';
|
|
|
17
17
|
import { useQuery } from '@dxos/react-client/echo';
|
|
18
18
|
import { useAsyncEffect } from '@dxos/react-ui';
|
|
19
19
|
|
|
20
|
-
import {
|
|
21
|
-
import { useBlueprintRegistry, useContextBinder } from '
|
|
22
|
-
import { Assistant, AssistantCapabilities, AssistantOperation } from '
|
|
20
|
+
import { type ChatEvent } from '../../components';
|
|
21
|
+
import { useBlueprintRegistry, useContextBinder } from '../../hooks';
|
|
22
|
+
import { Assistant, AssistantCapabilities, AssistantOperation } from '../../types';
|
|
23
|
+
import ChatContainer from '../ChatContainer';
|
|
23
24
|
|
|
24
25
|
export type ChatCompanionProps = {
|
|
25
26
|
role?: string;
|
|
@@ -222,5 +223,3 @@ export const ChatCompanion = forwardRef<HTMLDivElement, ChatCompanionProps>(
|
|
|
222
223
|
);
|
|
223
224
|
},
|
|
224
225
|
);
|
|
225
|
-
|
|
226
|
-
export default ChatCompanion;
|
|
@@ -8,12 +8,11 @@ import { useAtomCapability } from '@dxos/app-framework/ui';
|
|
|
8
8
|
import { type SurfaceComponentProps } from '@dxos/app-toolkit/ui';
|
|
9
9
|
import { type Space, getSpace } from '@dxos/client/echo';
|
|
10
10
|
import { type Obj } from '@dxos/echo';
|
|
11
|
-
import {
|
|
11
|
+
import { Panel } from '@dxos/react-ui';
|
|
12
12
|
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
import { Chat as ChatComponent, type ChatRootProps } from './Chat';
|
|
13
|
+
import { Chat as ChatComponent, type ChatRootProps } from '../../components';
|
|
14
|
+
import { useBlueprintRegistry, useChatProcessor, useChatServices, useOnline, usePresets } from '../../hooks';
|
|
15
|
+
import { AssistantCapabilities, type ChatType } from '../../types';
|
|
17
16
|
|
|
18
17
|
export type ChatContainerProps = SurfaceComponentProps<
|
|
19
18
|
ChatType.Chat | undefined,
|
|
@@ -45,24 +44,26 @@ export const ChatContainer = forwardRef<HTMLDivElement, ChatContainerProps>((pro
|
|
|
45
44
|
}
|
|
46
45
|
|
|
47
46
|
return (
|
|
48
|
-
<
|
|
49
|
-
<
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
47
|
+
<ChatComponent.Root db={space?.db} chat={chat} processor={processor} onEvent={onEvent}>
|
|
48
|
+
<Panel.Root role={role} classNames='dx-article' ref={forwardedRef}>
|
|
49
|
+
<Panel.Toolbar>
|
|
50
|
+
<ChatComponent.Toolbar companionTo={companionTo} />
|
|
51
|
+
</Panel.Toolbar>
|
|
52
|
+
<Panel.Content>
|
|
53
|
+
<ChatComponent.Viewport>
|
|
54
|
+
<ChatComponent.Thread />
|
|
55
|
+
<div role='none' className='p-4'>
|
|
56
|
+
<ChatComponent.Prompt
|
|
57
|
+
{...chatProps}
|
|
58
|
+
outline
|
|
59
|
+
preset={preset?.id}
|
|
60
|
+
online={online}
|
|
61
|
+
onOnlineChange={setOnline}
|
|
62
|
+
/>
|
|
63
|
+
</div>
|
|
64
|
+
</ChatComponent.Viewport>
|
|
65
|
+
</Panel.Content>
|
|
66
|
+
</Panel.Root>
|
|
67
|
+
</ChatComponent.Root>
|
|
65
68
|
);
|
|
66
69
|
});
|
|
67
|
-
|
|
68
|
-
export default ChatContainer;
|
|
@@ -10,11 +10,10 @@ import { Obj } from '@dxos/echo';
|
|
|
10
10
|
import { useTranslation } from '@dxos/react-ui';
|
|
11
11
|
import { ChatDialog as NaturalChatDialog } from '@dxos/react-ui-chat';
|
|
12
12
|
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
import { Chat, type ChatRootProps } from './Chat';
|
|
13
|
+
import { Chat, type ChatRootProps } from '../../components';
|
|
14
|
+
import { useBlueprintRegistry, useChatProcessor, useChatServices, useOnline, usePresets } from '../../hooks';
|
|
15
|
+
import { meta } from '../../meta';
|
|
16
|
+
import { AssistantCapabilities } from '../../types';
|
|
18
17
|
|
|
19
18
|
export type ChatDialogProps = {
|
|
20
19
|
chat?: ChatTypes.Chat;
|
|
@@ -71,5 +70,3 @@ export const ChatDialog = ({ chat }: ChatDialogProps) => {
|
|
|
71
70
|
</Chat.Root>
|
|
72
71
|
);
|
|
73
72
|
};
|
|
74
|
-
|
|
75
|
-
export default ChatDialog;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Atom, useAtomValue } from '@effect-atom/atom-react';
|
|
6
|
+
import * as Option from 'effect/Option';
|
|
7
|
+
import React, { forwardRef, useMemo, useState } from 'react';
|
|
8
|
+
|
|
9
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
10
|
+
import { type SurfaceComponentProps, useObjectMenuItems, useObjectNavigate } from '@dxos/app-toolkit/ui';
|
|
11
|
+
import { type Project } from '@dxos/assistant-toolkit';
|
|
12
|
+
import { Filter, Obj, Query } from '@dxos/echo';
|
|
13
|
+
import { AtomObj, AtomRef } from '@dxos/echo-atom';
|
|
14
|
+
import { useQuery } from '@dxos/react-client/echo';
|
|
15
|
+
import { Card, Panel, ScrollArea, Toolbar } from '@dxos/react-ui';
|
|
16
|
+
import { Menu } from '@dxos/react-ui-menu';
|
|
17
|
+
import { Focus, Mosaic, type MosaicTileProps } from '@dxos/react-ui-mosaic';
|
|
18
|
+
import { isNonNullable } from '@dxos/util';
|
|
19
|
+
|
|
20
|
+
export type ProjectArticleProps = SurfaceComponentProps<Project.Project>;
|
|
21
|
+
|
|
22
|
+
export const ProjectArticle = ({ subject: project }: ProjectArticleProps) => {
|
|
23
|
+
const inputQueue = useAtomValue(
|
|
24
|
+
AtomObj.make(project).pipe((_) =>
|
|
25
|
+
Atom.make((get) =>
|
|
26
|
+
Option.fromNullable(get(_).queue).pipe(Option.map(AtomRef.make), Option.map(get), Option.getOrUndefined),
|
|
27
|
+
),
|
|
28
|
+
),
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
const inputQueueItems: Obj.Unknown[] = useQuery(inputQueue, Query.select(Filter.everything()));
|
|
32
|
+
|
|
33
|
+
const artifacts = useAtomValue(
|
|
34
|
+
useMemo(
|
|
35
|
+
() =>
|
|
36
|
+
AtomObj.make(project).pipe((project) =>
|
|
37
|
+
Atom.make((get) => {
|
|
38
|
+
return get(project).artifacts.map((artifact) => get(AtomRef.make(artifact.data)) as Obj.Unknown);
|
|
39
|
+
}),
|
|
40
|
+
),
|
|
41
|
+
[project],
|
|
42
|
+
),
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
const [viewport, setViewport] = useState<HTMLElement | null>(null);
|
|
46
|
+
|
|
47
|
+
const stackObjects = [...artifacts, ...inputQueueItems].filter(isNonNullable);
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<Panel.Root className='dx-article'>
|
|
51
|
+
<Panel.Content>
|
|
52
|
+
{/* TODO(burdon): Factor out. */}
|
|
53
|
+
{stackObjects.length === 0 && (
|
|
54
|
+
<div className='text-subdued'>
|
|
55
|
+
Project has no objects associated with it.
|
|
56
|
+
<br />
|
|
57
|
+
<br />
|
|
58
|
+
To get started:
|
|
59
|
+
<br />- Write the initative spec: what is the goal of the project?
|
|
60
|
+
<br />- subscribe project to your email.
|
|
61
|
+
<br />- Chat with the agent.
|
|
62
|
+
</div>
|
|
63
|
+
)}
|
|
64
|
+
|
|
65
|
+
{stackObjects.length > 0 && (
|
|
66
|
+
<Focus.Group asChild>
|
|
67
|
+
<Mosaic.Container asChild withFocus autoScroll={viewport}>
|
|
68
|
+
<ScrollArea.Root orientation='vertical'>
|
|
69
|
+
<ScrollArea.Viewport classNames='p-2' ref={setViewport}>
|
|
70
|
+
<Mosaic.Stack items={stackObjects} getId={(item) => item.id} draggable={false} Tile={StackTile} />
|
|
71
|
+
</ScrollArea.Viewport>
|
|
72
|
+
</ScrollArea.Root>
|
|
73
|
+
</Mosaic.Container>
|
|
74
|
+
</Focus.Group>
|
|
75
|
+
)}
|
|
76
|
+
</Panel.Content>
|
|
77
|
+
</Panel.Root>
|
|
78
|
+
);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
const StackTile = forwardRef<HTMLDivElement, MosaicTileProps<Obj.Unknown>>(
|
|
82
|
+
({ data, location, debug }, forwardedRef) => {
|
|
83
|
+
const objectMenuItems = useObjectMenuItems(data);
|
|
84
|
+
const handleNavigate = useObjectNavigate(data);
|
|
85
|
+
|
|
86
|
+
return (
|
|
87
|
+
<Mosaic.Tile asChild id={data.id} data={data} location={location} debug={debug}>
|
|
88
|
+
<Focus.Group asChild>
|
|
89
|
+
<Menu.Root>
|
|
90
|
+
<Card.Root ref={forwardedRef} data-testid='board-item'>
|
|
91
|
+
<Card.Toolbar>
|
|
92
|
+
<Card.IconBlock></Card.IconBlock>
|
|
93
|
+
<Card.Title onClick={handleNavigate}>{Obj.getLabel(data)}</Card.Title>
|
|
94
|
+
{/* TODO(wittjosiah): Reconcile with Card.Menu. */}
|
|
95
|
+
<Menu.Trigger asChild disabled={!objectMenuItems?.length}>
|
|
96
|
+
<Toolbar.IconButton
|
|
97
|
+
iconOnly
|
|
98
|
+
variant='ghost'
|
|
99
|
+
icon='ph--dots-three-vertical--regular'
|
|
100
|
+
label='Actions'
|
|
101
|
+
/>
|
|
102
|
+
</Menu.Trigger>
|
|
103
|
+
<Menu.Content items={objectMenuItems} />
|
|
104
|
+
</Card.Toolbar>
|
|
105
|
+
<Card.Content>
|
|
106
|
+
<Surface.Surface role='card--content' limit={1} data={{ subject: data }} />
|
|
107
|
+
</Card.Content>
|
|
108
|
+
</Card.Root>
|
|
109
|
+
</Menu.Root>
|
|
110
|
+
</Focus.Group>
|
|
111
|
+
</Mosaic.Tile>
|
|
112
|
+
);
|
|
113
|
+
},
|
|
114
|
+
);
|
|
115
|
+
StackTile.displayName = 'StackTile';
|
|
116
|
+
|
|
117
|
+
export default ProjectArticle;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Atom } from '@effect-atom/atom';
|
|
6
|
+
import { useAtomValue } from '@effect-atom/atom-react';
|
|
7
|
+
import * as Effect from 'effect/Effect';
|
|
8
|
+
import React, { useCallback, useEffect, useMemo } from 'react';
|
|
9
|
+
|
|
10
|
+
import { useCapability } from '@dxos/app-framework/ui';
|
|
11
|
+
import { type SurfaceComponentProps } from '@dxos/app-toolkit/ui';
|
|
12
|
+
import { Project } from '@dxos/assistant-toolkit';
|
|
13
|
+
import { Feed, Obj, Query, Ref } from '@dxos/echo';
|
|
14
|
+
import { DXN } from '@dxos/echo';
|
|
15
|
+
import { AtomObj, AtomRef } from '@dxos/echo-atom';
|
|
16
|
+
import { QueueService } from '@dxos/functions';
|
|
17
|
+
import { AutomationCapabilities } from '@dxos/plugin-automation/types';
|
|
18
|
+
import { MarkdownEditor } from '@dxos/plugin-markdown';
|
|
19
|
+
import { Filter, useQuery } from '@dxos/react-client/echo';
|
|
20
|
+
import { useObject } from '@dxos/react-client/echo';
|
|
21
|
+
import { Button } from '@dxos/react-ui';
|
|
22
|
+
import { ButtonGroup, Input } from '@dxos/react-ui';
|
|
23
|
+
|
|
24
|
+
import { syncTriggers } from './triggers';
|
|
25
|
+
|
|
26
|
+
export const ProjectSettings = ({ subject: project }: SurfaceComponentProps<Project.Project>) => {
|
|
27
|
+
const computeRuntime = useCapability(AutomationCapabilities.ComputeRuntime);
|
|
28
|
+
|
|
29
|
+
const handleResetHistory = useCallback(async () => {
|
|
30
|
+
const runtime = computeRuntime.getRuntime(Obj.getDatabase(project)!.spaceId);
|
|
31
|
+
|
|
32
|
+
await runtime.runPromise(Project.resetChatHistory(project));
|
|
33
|
+
|
|
34
|
+
if (!project.queue) {
|
|
35
|
+
await runtime.runPromise(
|
|
36
|
+
Effect.gen(function* () {
|
|
37
|
+
const queue = yield* QueueService.createQueue();
|
|
38
|
+
Obj.change(project, (project) => {
|
|
39
|
+
project.queue = Ref.fromDXN(queue.dxn);
|
|
40
|
+
});
|
|
41
|
+
}),
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
}, [project, computeRuntime]);
|
|
45
|
+
|
|
46
|
+
const spec = useAtomValue(AtomRef.make(project.spec));
|
|
47
|
+
const [specInitialValue] = useObject(spec, 'content');
|
|
48
|
+
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
return Obj.subscribe(project, () => {
|
|
51
|
+
queueMicrotask(() => syncTriggers(project));
|
|
52
|
+
});
|
|
53
|
+
}, [project]);
|
|
54
|
+
|
|
55
|
+
const subscribableObjects = useQuery(Obj.getDatabase(project), Query.select(Filter.type(Feed.Feed)));
|
|
56
|
+
|
|
57
|
+
const existingSubscripts = useAtomValue(
|
|
58
|
+
useMemo(
|
|
59
|
+
() =>
|
|
60
|
+
AtomObj.make(project).pipe((_) =>
|
|
61
|
+
Atom.make((get) => {
|
|
62
|
+
const project = get(_);
|
|
63
|
+
const selectedSubscriptions: Obj.Unknown[] = subscribableObjects.filter((object) =>
|
|
64
|
+
project.subscriptions.some((subscription) => DXN.equals(subscription.dxn, Obj.getDXN(object))),
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
return selectedSubscriptions;
|
|
68
|
+
}),
|
|
69
|
+
),
|
|
70
|
+
[project, subscribableObjects],
|
|
71
|
+
),
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
return (
|
|
75
|
+
<div className='flex flex-col gap-4'>
|
|
76
|
+
<Input.Root>
|
|
77
|
+
<Input.Label>Spec (what is the goal of the project?)</Input.Label>
|
|
78
|
+
<MarkdownEditor.Root id={spec?.id ?? ''} object={spec}>
|
|
79
|
+
<MarkdownEditor.Content initialValue={specInitialValue} />
|
|
80
|
+
</MarkdownEditor.Root>
|
|
81
|
+
</Input.Root>
|
|
82
|
+
<ButtonGroup classNames='h-10'>
|
|
83
|
+
<Button onClick={handleResetHistory}>Reset Chat History</Button>
|
|
84
|
+
</ButtonGroup>
|
|
85
|
+
<div>
|
|
86
|
+
<h2 className='text-lg font-bold'>Subscriptions</h2>
|
|
87
|
+
{subscribableObjects.length > 0 && (
|
|
88
|
+
<div>
|
|
89
|
+
{subscribableObjects.map((object) => (
|
|
90
|
+
<Input.Root key={object.id}>
|
|
91
|
+
<Input.Checkbox
|
|
92
|
+
checked={existingSubscripts.includes(object)}
|
|
93
|
+
onCheckedChange={(checked) => {
|
|
94
|
+
Obj.change(project, (project) => {
|
|
95
|
+
if (checked) {
|
|
96
|
+
project.subscriptions.push(Ref.fromDXN(Obj.getDXN(object)));
|
|
97
|
+
} else {
|
|
98
|
+
project.subscriptions = project.subscriptions.filter(
|
|
99
|
+
(subscription) => !DXN.equals(subscription.dxn, Obj.getDXN(object)),
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
}}
|
|
104
|
+
/>
|
|
105
|
+
<Input.Label>{Obj.getLabel(object)}</Input.Label>
|
|
106
|
+
</Input.Root>
|
|
107
|
+
))}
|
|
108
|
+
</div>
|
|
109
|
+
)}
|
|
110
|
+
{subscribableObjects.length === 0 && (
|
|
111
|
+
<div className='text-sm text-description'>Space has no feeds to subscribe to.</div>
|
|
112
|
+
)}
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
);
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
export default ProjectSettings;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type ComponentType, type FunctionComponent, lazy } from 'react';
|
|
6
|
+
|
|
7
|
+
import { type SurfaceComponentProps } from '@dxos/app-toolkit/ui';
|
|
8
|
+
import type { Project } from '@dxos/assistant-toolkit';
|
|
9
|
+
|
|
10
|
+
import type { ProjectArticleProps } from './ProjectArticle';
|
|
11
|
+
|
|
12
|
+
export const ProjectArticle: ComponentType<ProjectArticleProps> = lazy(() => import('./ProjectArticle'));
|
|
13
|
+
|
|
14
|
+
export const ProjectSettings: FunctionComponent<SurfaceComponentProps<Project.Project>> = lazy(
|
|
15
|
+
() => import('./ProjectSettings'),
|
|
16
|
+
);
|