@dxos/plugin-assistant 0.8.4-main.1da679c → 0.8.4-main.1f223c7
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/{BlueprintContainer-6MZHBQ25.mjs → BlueprintContainer-BFNN6K46.mjs} +2 -2
- package/dist/lib/browser/{ChatCompanion-B4DLQE6Y.mjs → ChatCompanion-DOVN34C7.mjs} +6 -4
- package/dist/lib/{node-esm/ChatCompanion-DK6FULBU.mjs.map → browser/ChatCompanion-DOVN34C7.mjs.map} +1 -1
- package/dist/lib/browser/{ChatContainer-Z7A3RKOY.mjs → ChatContainer-XIVJTCC2.mjs} +4 -2
- package/dist/lib/browser/{ChatContainer-Z7A3RKOY.mjs.map → ChatContainer-XIVJTCC2.mjs.map} +1 -1
- package/dist/lib/browser/{ChatDialog-PL5TSGD5.mjs → ChatDialog-EJJMK3WL.mjs} +4 -2
- package/dist/lib/browser/{ChatDialog-PL5TSGD5.mjs.map → ChatDialog-EJJMK3WL.mjs.map} +1 -1
- package/dist/lib/browser/ai-service-YC2EQPHA.mjs +22 -0
- package/dist/lib/browser/ai-service-YC2EQPHA.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-builder-BBDHBJXA.mjs → app-graph-builder-3C43MLCD.mjs} +4 -4
- package/dist/lib/browser/{app-graph-builder-BBDHBJXA.mjs.map → app-graph-builder-3C43MLCD.mjs.map} +1 -1
- package/dist/lib/browser/{blueprint-definition-3SATLYJW.mjs → blueprint-definition-VHFSRTEJ.mjs} +2 -2
- package/dist/lib/browser/{chunk-YOBHCEEI.mjs → chunk-C4Q2RYQM.mjs} +47 -14
- package/dist/lib/browser/chunk-C4Q2RYQM.mjs.map +7 -0
- package/dist/lib/browser/{chunk-YKODYEYR.mjs → chunk-EZUSNS2J.mjs} +4 -1
- package/dist/lib/browser/chunk-EZUSNS2J.mjs.map +7 -0
- package/dist/lib/browser/{chunk-BBT6KNXA.mjs → chunk-GLWD66TA.mjs} +5 -9
- package/dist/lib/browser/chunk-GLWD66TA.mjs.map +7 -0
- package/dist/lib/browser/{chunk-JDI4FEKA.mjs → chunk-QD4UUISH.mjs} +6 -6
- package/dist/lib/browser/{chunk-TMKK6VCA.mjs → chunk-R6LRGW3I.mjs} +3 -3
- package/dist/lib/browser/chunk-R6LRGW3I.mjs.map +7 -0
- package/dist/lib/browser/compute-runtime-X6IREJN3.mjs +155 -0
- package/dist/lib/browser/compute-runtime-X6IREJN3.mjs.map +7 -0
- package/dist/lib/browser/{edge-model-resolver-6YWYDPTS.mjs → edge-model-resolver-JNEB355N.mjs} +9 -5
- package/dist/lib/browser/edge-model-resolver-JNEB355N.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +25 -21
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/{intent-resolver-MRZJU255.mjs → intent-resolver-I6M3ZDAS.mjs} +5 -5
- package/dist/lib/browser/{intent-resolver-MRZJU255.mjs.map → intent-resolver-I6M3ZDAS.mjs.map} +1 -1
- package/dist/lib/browser/{local-model-resolver-QXLLTV2H.mjs → local-model-resolver-EUXSRZ7X.mjs} +9 -5
- package/dist/lib/browser/local-model-resolver-EUXSRZ7X.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-UKMOARXR.mjs → react-surface-E4NAGB6R.mjs} +8 -6
- package/dist/lib/{node-esm/react-surface-5NDJAWA2.mjs.map → browser/react-surface-E4NAGB6R.mjs.map} +1 -1
- package/dist/lib/browser/{settings-4AJ34FKF.mjs → settings-36V3VUMW.mjs} +3 -3
- package/dist/lib/browser/{settings-4AJ34FKF.mjs.map → settings-36V3VUMW.mjs.map} +1 -1
- package/dist/lib/browser/{state-ABR7YSSA.mjs → state-AINRYS5W.mjs} +4 -4
- package/dist/lib/browser/{state-ABR7YSSA.mjs.map → state-AINRYS5W.mjs.map} +1 -1
- package/dist/lib/browser/{toolkit-U7SKGAIC.mjs → toolkit-MPUS3U64.mjs} +3 -3
- package/dist/lib/browser/{toolkit-U7SKGAIC.mjs.map → toolkit-MPUS3U64.mjs.map} +1 -1
- package/dist/lib/node-esm/{BlueprintContainer-MUHW5HNY.mjs → BlueprintContainer-X4MRBKDR.mjs} +2 -2
- package/dist/lib/node-esm/{ChatCompanion-DK6FULBU.mjs → ChatCompanion-ICWYVPRD.mjs} +6 -4
- package/dist/lib/{browser/ChatCompanion-B4DLQE6Y.mjs.map → node-esm/ChatCompanion-ICWYVPRD.mjs.map} +1 -1
- package/dist/lib/node-esm/{ChatContainer-7IN7ZICQ.mjs → ChatContainer-LMMMQD4K.mjs} +4 -2
- package/dist/lib/node-esm/{ChatContainer-7IN7ZICQ.mjs.map → ChatContainer-LMMMQD4K.mjs.map} +1 -1
- package/dist/lib/node-esm/{ChatDialog-LPE653RZ.mjs → ChatDialog-UUE3F7BT.mjs} +4 -2
- package/dist/lib/node-esm/{ChatDialog-LPE653RZ.mjs.map → ChatDialog-UUE3F7BT.mjs.map} +1 -1
- package/dist/lib/node-esm/{ai-service-I5JU4JN2.mjs → ai-service-XUMZVFCK.mjs} +10 -6
- package/dist/lib/node-esm/ai-service-XUMZVFCK.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-builder-EMR5JF6Z.mjs → app-graph-builder-NM3JDLQ2.mjs} +4 -4
- package/dist/lib/node-esm/{app-graph-builder-EMR5JF6Z.mjs.map → app-graph-builder-NM3JDLQ2.mjs.map} +1 -1
- package/dist/lib/node-esm/{blueprint-definition-B6UDX5U3.mjs → blueprint-definition-4E6XTLVN.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-GCNF3CQU.mjs → chunk-LVTG5JTW.mjs} +3 -3
- package/dist/lib/node-esm/chunk-LVTG5JTW.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-5MYWJPYA.mjs → chunk-QG2KT3AT.mjs} +5 -9
- package/dist/lib/node-esm/chunk-QG2KT3AT.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-X2YUKRBE.mjs → chunk-V44ZG7CU.mjs} +47 -14
- package/dist/lib/node-esm/chunk-V44ZG7CU.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-FHRJMZ7L.mjs → chunk-XD4CDA4R.mjs} +4 -1
- package/dist/lib/node-esm/chunk-XD4CDA4R.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-H3ZC4UL7.mjs → chunk-YU62ZWJN.mjs} +6 -6
- package/dist/lib/node-esm/compute-runtime-NRHLLTSC.mjs +156 -0
- package/dist/lib/node-esm/compute-runtime-NRHLLTSC.mjs.map +7 -0
- package/dist/lib/node-esm/{edge-model-resolver-A7B6QHLL.mjs → edge-model-resolver-UE5TLLJZ.mjs} +9 -5
- package/dist/lib/node-esm/edge-model-resolver-UE5TLLJZ.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +25 -21
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/{intent-resolver-CIXO3KMY.mjs → intent-resolver-VIINHFMT.mjs} +5 -5
- package/dist/lib/node-esm/{intent-resolver-CIXO3KMY.mjs.map → intent-resolver-VIINHFMT.mjs.map} +1 -1
- package/dist/lib/node-esm/{local-model-resolver-JCYDHAZY.mjs → local-model-resolver-JBEFVVZA.mjs} +9 -5
- package/dist/lib/node-esm/local-model-resolver-JBEFVVZA.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-5NDJAWA2.mjs → react-surface-5WQLRTCH.mjs} +8 -6
- package/dist/lib/{browser/react-surface-UKMOARXR.mjs.map → node-esm/react-surface-5WQLRTCH.mjs.map} +1 -1
- package/dist/lib/node-esm/{settings-K2QW4ATZ.mjs → settings-7ZCZ6AS5.mjs} +3 -3
- package/dist/lib/node-esm/{settings-K2QW4ATZ.mjs.map → settings-7ZCZ6AS5.mjs.map} +1 -1
- package/dist/lib/node-esm/{state-6UHESJI5.mjs → state-EQS5KP6M.mjs} +4 -4
- package/dist/lib/node-esm/{state-6UHESJI5.mjs.map → state-EQS5KP6M.mjs.map} +1 -1
- package/dist/lib/node-esm/{toolkit-LNLRBVDU.mjs → toolkit-PKVYDZ4H.mjs} +3 -3
- package/dist/lib/node-esm/{toolkit-LNLRBVDU.mjs.map → toolkit-PKVYDZ4H.mjs.map} +1 -1
- package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/ai-service.d.ts +3 -2
- package/dist/types/src/capabilities/ai-service.d.ts.map +1 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts +21 -0
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/compute-runtime.d.ts +5 -0
- package/dist/types/src/capabilities/compute-runtime.d.ts.map +1 -0
- package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +1 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/local-model-resolver.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +1 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts +8 -0
- package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts.map +1 -0
- package/dist/types/src/stories/Chat.stories.d.ts +0 -1
- package/dist/types/src/stories/Chat.stories.d.ts.map +1 -1
- package/dist/types/src/stories/components/TriggersContainer.d.ts +12 -1
- package/dist/types/src/stories/components/TriggersContainer.d.ts.map +1 -1
- package/dist/types/src/stories/components/index.d.ts +2 -3
- package/dist/types/src/stories/components/index.d.ts.map +1 -1
- package/dist/types/src/stories/testing/testing.d.ts.map +1 -1
- package/dist/types/src/testing/test-data.d.ts +1 -1
- package/dist/types/src/testing/test-data.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +90 -91
- package/src/AssistantPlugin.tsx +9 -8
- package/src/capabilities/ai-service.ts +5 -3
- package/src/capabilities/blueprint-definition.ts +1 -4
- package/src/capabilities/capabilities.ts +53 -0
- package/src/capabilities/compute-runtime.ts +124 -0
- package/src/capabilities/edge-model-resolver.ts +4 -2
- package/src/capabilities/index.ts +1 -0
- package/src/capabilities/local-model-resolver.ts +4 -2
- package/src/components/TemplateEditor/TemplateEditor.tsx +2 -2
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useChatServices.ts +2 -2
- package/src/hooks/useComputeRuntimeCallback.ts +25 -0
- package/src/stories/Chat.stories.tsx +4 -151
- package/src/stories/components/TriggersContainer.tsx +67 -4
- package/src/stories/components/index.ts +2 -3
- package/src/stories/testing/testing.tsx +1 -6
- package/src/testing/test-data.ts +26 -36
- package/dist/lib/browser/ai-service-4VESSFNB.mjs +0 -18
- package/dist/lib/browser/ai-service-4VESSFNB.mjs.map +0 -7
- package/dist/lib/browser/chunk-BBT6KNXA.mjs.map +0 -7
- package/dist/lib/browser/chunk-TMKK6VCA.mjs.map +0 -7
- package/dist/lib/browser/chunk-YKODYEYR.mjs.map +0 -7
- package/dist/lib/browser/chunk-YOBHCEEI.mjs.map +0 -7
- package/dist/lib/browser/edge-model-resolver-6YWYDPTS.mjs.map +0 -7
- package/dist/lib/browser/local-model-resolver-QXLLTV2H.mjs.map +0 -7
- package/dist/lib/node-esm/ai-service-I5JU4JN2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-5MYWJPYA.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-FHRJMZ7L.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-GCNF3CQU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-X2YUKRBE.mjs.map +0 -7
- package/dist/lib/node-esm/edge-model-resolver-A7B6QHLL.mjs.map +0 -7
- package/dist/lib/node-esm/local-model-resolver-JCYDHAZY.mjs.map +0 -7
- package/dist/types/src/stories/components/ProjectContainer.d.ts +0 -4
- package/dist/types/src/stories/components/ProjectContainer.d.ts.map +0 -1
- package/src/stories/components/ProjectContainer.tsx +0 -17
- /package/dist/lib/browser/{BlueprintContainer-6MZHBQ25.mjs.map → BlueprintContainer-BFNN6K46.mjs.map} +0 -0
- /package/dist/lib/browser/{blueprint-definition-3SATLYJW.mjs.map → blueprint-definition-VHFSRTEJ.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-JDI4FEKA.mjs.map → chunk-QD4UUISH.mjs.map} +0 -0
- /package/dist/lib/node-esm/{BlueprintContainer-MUHW5HNY.mjs.map → BlueprintContainer-X4MRBKDR.mjs.map} +0 -0
- /package/dist/lib/node-esm/{blueprint-definition-B6UDX5U3.mjs.map → blueprint-definition-4E6XTLVN.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-H3ZC4UL7.mjs.map → chunk-YU62ZWJN.mjs.map} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-assistant",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.1f223c7",
|
|
4
4
|
"description": "Assistant plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -58,69 +58,68 @@
|
|
|
58
58
|
"lodash.defaultsdeep": "^4.6.1",
|
|
59
59
|
"unified": "^11.0.0",
|
|
60
60
|
"use-deep-compare-effect": "^1.8.1",
|
|
61
|
-
"@dxos/ai": "0.8.4-main.
|
|
62
|
-
"@dxos/app-framework": "0.8.4-main.
|
|
63
|
-
"@dxos/assistant
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/
|
|
70
|
-
"@dxos/
|
|
71
|
-
"@dxos/debug": "0.8.4-main.
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/echo-db": "0.8.4-main.
|
|
76
|
-
"@dxos/echo-schema": "0.8.4-main.
|
|
77
|
-
"@dxos/
|
|
78
|
-
"@dxos/
|
|
79
|
-
"@dxos/
|
|
80
|
-
"@dxos/
|
|
81
|
-
"@dxos/graph": "0.8.4-main.
|
|
82
|
-
"@dxos/invariant": "0.8.4-main.
|
|
83
|
-
"@dxos/
|
|
84
|
-
"@dxos/
|
|
85
|
-
"@dxos/local-storage": "0.8.4-main.
|
|
86
|
-
"@dxos/log": "0.8.4-main.
|
|
87
|
-
"@dxos/plugin-
|
|
88
|
-
"@dxos/plugin-
|
|
89
|
-
"@dxos/plugin-
|
|
90
|
-
"@dxos/
|
|
91
|
-
"@dxos/plugin-
|
|
92
|
-
"@dxos/plugin-
|
|
93
|
-
"@dxos/plugin-
|
|
94
|
-
"@dxos/plugin-
|
|
95
|
-
"@dxos/plugin-
|
|
96
|
-
"@dxos/plugin-
|
|
97
|
-
"@dxos/plugin-script": "0.8.4-main.
|
|
98
|
-
"@dxos/plugin-space": "0.8.4-main.
|
|
99
|
-
"@dxos/plugin-
|
|
100
|
-
"@dxos/plugin-
|
|
101
|
-
"@dxos/
|
|
102
|
-
"@dxos/
|
|
103
|
-
"@dxos/
|
|
104
|
-
"@dxos/react-
|
|
105
|
-
"@dxos/react-ui-
|
|
106
|
-
"@dxos/react-ui-
|
|
107
|
-
"@dxos/
|
|
108
|
-
"@dxos/
|
|
109
|
-
"@dxos/react-
|
|
110
|
-
"@dxos/react-ui-
|
|
111
|
-
"@dxos/react-ui-editor": "0.8.4-main.
|
|
112
|
-
"@dxos/react-ui-
|
|
113
|
-
"@dxos/react-ui-
|
|
114
|
-
"@dxos/react-ui-
|
|
115
|
-
"@dxos/react-ui-searchlist": "0.8.4-main.
|
|
116
|
-
"@dxos/react-ui-
|
|
117
|
-
"@dxos/react-ui-
|
|
118
|
-
"@dxos/react-ui-
|
|
119
|
-
"@dxos/react-ui-
|
|
120
|
-
"@dxos/
|
|
121
|
-
"@dxos/
|
|
122
|
-
"@dxos/util": "0.8.4-main.
|
|
123
|
-
"@dxos/react-ui-tag-picker": "0.8.4-main.1da679c"
|
|
61
|
+
"@dxos/ai": "0.8.4-main.1f223c7",
|
|
62
|
+
"@dxos/app-framework": "0.8.4-main.1f223c7",
|
|
63
|
+
"@dxos/assistant": "0.8.4-main.1f223c7",
|
|
64
|
+
"@dxos/assistant-testing": "0.8.4-main.1f223c7",
|
|
65
|
+
"@dxos/blueprints": "0.8.4-main.1f223c7",
|
|
66
|
+
"@dxos/client": "0.8.4-main.1f223c7",
|
|
67
|
+
"@dxos/compute": "0.8.4-main.1f223c7",
|
|
68
|
+
"@dxos/async": "0.8.4-main.1f223c7",
|
|
69
|
+
"@dxos/config": "0.8.4-main.1f223c7",
|
|
70
|
+
"@dxos/context": "0.8.4-main.1f223c7",
|
|
71
|
+
"@dxos/debug": "0.8.4-main.1f223c7",
|
|
72
|
+
"@dxos/devtools": "0.8.4-main.1f223c7",
|
|
73
|
+
"@dxos/echo": "0.8.4-main.1f223c7",
|
|
74
|
+
"@dxos/conductor": "0.8.4-main.1f223c7",
|
|
75
|
+
"@dxos/echo-db": "0.8.4-main.1f223c7",
|
|
76
|
+
"@dxos/echo-schema": "0.8.4-main.1f223c7",
|
|
77
|
+
"@dxos/edge-client": "0.8.4-main.1f223c7",
|
|
78
|
+
"@dxos/effect": "0.8.4-main.1f223c7",
|
|
79
|
+
"@dxos/functions": "0.8.4-main.1f223c7",
|
|
80
|
+
"@dxos/echo-protocol": "0.8.4-main.1f223c7",
|
|
81
|
+
"@dxos/graph": "0.8.4-main.1f223c7",
|
|
82
|
+
"@dxos/invariant": "0.8.4-main.1f223c7",
|
|
83
|
+
"@dxos/keys": "0.8.4-main.1f223c7",
|
|
84
|
+
"@dxos/lit-ui": "0.8.4-main.1f223c7",
|
|
85
|
+
"@dxos/local-storage": "0.8.4-main.1f223c7",
|
|
86
|
+
"@dxos/log": "0.8.4-main.1f223c7",
|
|
87
|
+
"@dxos/plugin-attention": "0.8.4-main.1f223c7",
|
|
88
|
+
"@dxos/plugin-client": "0.8.4-main.1f223c7",
|
|
89
|
+
"@dxos/plugin-deck": "0.8.4-main.1f223c7",
|
|
90
|
+
"@dxos/live-object": "0.8.4-main.1f223c7",
|
|
91
|
+
"@dxos/plugin-explorer": "0.8.4-main.1f223c7",
|
|
92
|
+
"@dxos/plugin-graph": "0.8.4-main.1f223c7",
|
|
93
|
+
"@dxos/plugin-markdown": "0.8.4-main.1f223c7",
|
|
94
|
+
"@dxos/plugin-preview": "0.8.4-main.1f223c7",
|
|
95
|
+
"@dxos/plugin-board": "0.8.4-main.1f223c7",
|
|
96
|
+
"@dxos/plugin-sketch": "0.8.4-main.1f223c7",
|
|
97
|
+
"@dxos/plugin-script": "0.8.4-main.1f223c7",
|
|
98
|
+
"@dxos/plugin-space": "0.8.4-main.1f223c7",
|
|
99
|
+
"@dxos/plugin-stack": "0.8.4-main.1f223c7",
|
|
100
|
+
"@dxos/plugin-transcription": "0.8.4-main.1f223c7",
|
|
101
|
+
"@dxos/react-edge-client": "0.8.4-main.1f223c7",
|
|
102
|
+
"@dxos/react-ui-attention": "0.8.4-main.1f223c7",
|
|
103
|
+
"@dxos/plugin-wnfs": "0.8.4-main.1f223c7",
|
|
104
|
+
"@dxos/react-ui-canvas-editor": "0.8.4-main.1f223c7",
|
|
105
|
+
"@dxos/react-ui-canvas-compute": "0.8.4-main.1f223c7",
|
|
106
|
+
"@dxos/react-ui-chat": "0.8.4-main.1f223c7",
|
|
107
|
+
"@dxos/react-ui-components": "0.8.4-main.1f223c7",
|
|
108
|
+
"@dxos/protocols": "0.8.4-main.1f223c7",
|
|
109
|
+
"@dxos/react-client": "0.8.4-main.1f223c7",
|
|
110
|
+
"@dxos/react-ui-form": "0.8.4-main.1f223c7",
|
|
111
|
+
"@dxos/react-ui-editor": "0.8.4-main.1f223c7",
|
|
112
|
+
"@dxos/react-ui-graph": "0.8.4-main.1f223c7",
|
|
113
|
+
"@dxos/react-ui-list": "0.8.4-main.1f223c7",
|
|
114
|
+
"@dxos/react-ui-menu": "0.8.4-main.1f223c7",
|
|
115
|
+
"@dxos/react-ui-searchlist": "0.8.4-main.1f223c7",
|
|
116
|
+
"@dxos/react-ui-sfx": "0.8.4-main.1f223c7",
|
|
117
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.1f223c7",
|
|
118
|
+
"@dxos/react-ui-tabs": "0.8.4-main.1f223c7",
|
|
119
|
+
"@dxos/react-ui-tag-picker": "0.8.4-main.1f223c7",
|
|
120
|
+
"@dxos/react-ui-stack": "0.8.4-main.1f223c7",
|
|
121
|
+
"@dxos/schema": "0.8.4-main.1f223c7",
|
|
122
|
+
"@dxos/util": "0.8.4-main.1f223c7"
|
|
124
123
|
},
|
|
125
124
|
"devDependencies": {
|
|
126
125
|
"@effect-rx/rx-react": "^0.38.0",
|
|
@@ -133,31 +132,31 @@
|
|
|
133
132
|
"react": "~18.2.0",
|
|
134
133
|
"react-dom": "~18.2.0",
|
|
135
134
|
"vite": "7.1.1",
|
|
136
|
-
"@dxos/assistant-testing": "0.8.4-main.
|
|
137
|
-
"@dxos/devtools": "0.8.4-main.
|
|
138
|
-
"@dxos/echo-db": "0.8.4-main.
|
|
139
|
-
"@dxos/plugin-attention": "0.8.4-main.
|
|
140
|
-
"@dxos/plugin-
|
|
141
|
-
"@dxos/plugin-
|
|
142
|
-
"@dxos/plugin-
|
|
143
|
-
"@dxos/plugin-
|
|
144
|
-
"@dxos/plugin-markdown": "0.8.4-main.
|
|
145
|
-
"@dxos/plugin-
|
|
146
|
-
"@dxos/plugin-
|
|
147
|
-
"@dxos/plugin-
|
|
148
|
-
"@dxos/plugin-stack": "0.8.4-main.
|
|
149
|
-
"@dxos/plugin-
|
|
150
|
-
"@dxos/plugin-table": "0.8.4-main.
|
|
151
|
-
"@dxos/plugin-
|
|
152
|
-
"@dxos/plugin-
|
|
153
|
-
"@dxos/plugin-token-manager": "0.8.4-main.
|
|
154
|
-
"@dxos/
|
|
155
|
-
"@dxos/random": "0.8.4-main.
|
|
156
|
-
"@dxos/react-ui-menu": "0.8.4-main.
|
|
157
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
158
|
-
"@dxos/
|
|
159
|
-
"@dxos/storybook-utils": "0.8.4-main.
|
|
160
|
-
"@dxos/react-ui-theme": "0.8.4-main.
|
|
135
|
+
"@dxos/assistant-testing": "0.8.4-main.1f223c7",
|
|
136
|
+
"@dxos/devtools": "0.8.4-main.1f223c7",
|
|
137
|
+
"@dxos/echo-db": "0.8.4-main.1f223c7",
|
|
138
|
+
"@dxos/plugin-attention": "0.8.4-main.1f223c7",
|
|
139
|
+
"@dxos/plugin-automation": "0.8.4-main.1f223c7",
|
|
140
|
+
"@dxos/plugin-board": "0.8.4-main.1f223c7",
|
|
141
|
+
"@dxos/plugin-chess": "0.8.4-main.1f223c7",
|
|
142
|
+
"@dxos/plugin-inbox": "0.8.4-main.1f223c7",
|
|
143
|
+
"@dxos/plugin-markdown": "0.8.4-main.1f223c7",
|
|
144
|
+
"@dxos/plugin-map": "0.8.4-main.1f223c7",
|
|
145
|
+
"@dxos/plugin-preview": "0.8.4-main.1f223c7",
|
|
146
|
+
"@dxos/plugin-sketch": "0.8.4-main.1f223c7",
|
|
147
|
+
"@dxos/plugin-stack": "0.8.4-main.1f223c7",
|
|
148
|
+
"@dxos/plugin-script": "0.8.4-main.1f223c7",
|
|
149
|
+
"@dxos/plugin-table": "0.8.4-main.1f223c7",
|
|
150
|
+
"@dxos/plugin-thread": "0.8.4-main.1f223c7",
|
|
151
|
+
"@dxos/plugin-wnfs": "0.8.4-main.1f223c7",
|
|
152
|
+
"@dxos/plugin-token-manager": "0.8.4-main.1f223c7",
|
|
153
|
+
"@dxos/react-ui": "0.8.4-main.1f223c7",
|
|
154
|
+
"@dxos/random": "0.8.4-main.1f223c7",
|
|
155
|
+
"@dxos/react-ui-menu": "0.8.4-main.1f223c7",
|
|
156
|
+
"@dxos/react-ui-table": "0.8.4-main.1f223c7",
|
|
157
|
+
"@dxos/plugin-theme": "0.8.4-main.1f223c7",
|
|
158
|
+
"@dxos/storybook-utils": "0.8.4-main.1f223c7",
|
|
159
|
+
"@dxos/react-ui-theme": "0.8.4-main.1f223c7"
|
|
161
160
|
},
|
|
162
161
|
"peerDependencies": {
|
|
163
162
|
"@effect-rx/rx-react": "^0.34.1",
|
|
@@ -165,8 +164,8 @@
|
|
|
165
164
|
"effect": "^3.13.3",
|
|
166
165
|
"react": "~18.2.0",
|
|
167
166
|
"react-dom": "~18.2.0",
|
|
168
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
169
|
-
"@dxos/react-ui-theme": "0.8.4-main.
|
|
167
|
+
"@dxos/react-ui": "0.8.4-main.1f223c7",
|
|
168
|
+
"@dxos/react-ui-theme": "0.8.4-main.1f223c7"
|
|
170
169
|
},
|
|
171
170
|
"publishConfig": {
|
|
172
171
|
"access": "public"
|
package/src/AssistantPlugin.tsx
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { Capabilities, Events, contributes, createIntent, defineModule, definePlugin } from '@dxos/app-framework';
|
|
6
6
|
import { ResearchGraph, ResearchOn } from '@dxos/assistant-testing';
|
|
7
|
-
import { Blueprint
|
|
7
|
+
import { Blueprint } from '@dxos/blueprints';
|
|
8
8
|
import { Sequence } from '@dxos/conductor';
|
|
9
9
|
import { Type } from '@dxos/echo';
|
|
10
10
|
import { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
AppGraphBuilder,
|
|
17
17
|
AssistantState,
|
|
18
18
|
BlueprintDefinition,
|
|
19
|
+
ComputeRuntime,
|
|
19
20
|
EdgeModelResolver,
|
|
20
21
|
IntentResolver,
|
|
21
22
|
LocalModelResolver,
|
|
@@ -104,13 +105,7 @@ export const AssistantPlugin = () =>
|
|
|
104
105
|
id: `${meta.id}/module/schema`,
|
|
105
106
|
activatesOn: ClientEvents.SetupSchema,
|
|
106
107
|
activate: () =>
|
|
107
|
-
contributes(ClientCapabilities.Schema, [
|
|
108
|
-
ServiceType,
|
|
109
|
-
Assistant.CompanionTo,
|
|
110
|
-
ResearchGraph,
|
|
111
|
-
ResearchOn,
|
|
112
|
-
Prompt.Prompt,
|
|
113
|
-
]),
|
|
108
|
+
contributes(ClientCapabilities.Schema, [ServiceType, Assistant.CompanionTo, ResearchGraph, ResearchOn]),
|
|
114
109
|
}),
|
|
115
110
|
defineModule({
|
|
116
111
|
id: `${meta.id}/module/on-space-created`,
|
|
@@ -165,4 +160,10 @@ export const AssistantPlugin = () =>
|
|
|
165
160
|
activatesOn: Events.Startup,
|
|
166
161
|
activate: Toolkit,
|
|
167
162
|
}),
|
|
163
|
+
defineModule({
|
|
164
|
+
id: `${meta.id}/module/compute-runtime`,
|
|
165
|
+
// TODO(wittjosiah): Use a different event.
|
|
166
|
+
activatesOn: Events.Startup,
|
|
167
|
+
activate: ComputeRuntime,
|
|
168
|
+
}),
|
|
168
169
|
]);
|
|
@@ -5,10 +5,12 @@
|
|
|
5
5
|
import { Effect, Layer } from 'effect';
|
|
6
6
|
|
|
7
7
|
import { AiServiceRouter } from '@dxos/ai';
|
|
8
|
-
import {
|
|
8
|
+
import { type PluginContext, contributes } from '@dxos/app-framework';
|
|
9
|
+
|
|
10
|
+
import { AssistantCapabilities } from './capabilities';
|
|
9
11
|
|
|
10
12
|
export default (context: PluginContext) => {
|
|
11
|
-
const resolvers = context.getCapabilities(
|
|
13
|
+
const resolvers = context.getCapabilities(AssistantCapabilities.AiModelResolver);
|
|
12
14
|
|
|
13
15
|
// TODO(dmaretskyi): Extract function to reduce them.
|
|
14
16
|
const combinedLayer = resolvers.reduce(
|
|
@@ -19,7 +21,7 @@ export default (context: PluginContext) => {
|
|
|
19
21
|
return [
|
|
20
22
|
// TODO(dmaretskyi): Read config from settings.
|
|
21
23
|
contributes(
|
|
22
|
-
|
|
24
|
+
AssistantCapabilities.AiServiceLayer,
|
|
23
25
|
AiServiceRouter.AiModelResolver.buildAiService.pipe(Layer.provide(combinedLayer)),
|
|
24
26
|
),
|
|
25
27
|
];
|
|
@@ -8,8 +8,6 @@ import {
|
|
|
8
8
|
DISCORD_BLUEPRINT,
|
|
9
9
|
LINEAR_BLUEPRINT,
|
|
10
10
|
RESEARCH_BLUEPRINT,
|
|
11
|
-
agent,
|
|
12
|
-
createResearchNote,
|
|
13
11
|
fetchDiscordMessages,
|
|
14
12
|
research,
|
|
15
13
|
syncLinearIssues,
|
|
@@ -49,8 +47,7 @@ const blueprint = createBlueprint();
|
|
|
49
47
|
// TODO(dmaretskyi): Consider splitting into multiple modules.
|
|
50
48
|
export default (): Capability<any>[] => [
|
|
51
49
|
contributes(Capabilities.Functions, functions),
|
|
52
|
-
contributes(Capabilities.Functions, [
|
|
53
|
-
contributes(Capabilities.Functions, [research, createResearchNote]),
|
|
50
|
+
contributes(Capabilities.Functions, [research]),
|
|
54
51
|
contributes(Capabilities.BlueprintDefinition, blueprint),
|
|
55
52
|
contributes(Capabilities.BlueprintDefinition, RESEARCH_BLUEPRINT),
|
|
56
53
|
// TODO(burdon): Move out of assistant.
|
|
@@ -2,7 +2,22 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { type Layer, type ManagedRuntime } from 'effect';
|
|
6
|
+
|
|
7
|
+
import { type AiService, type AiServiceRouter, type ToolExecutionService, type ToolResolverService } from '@dxos/ai';
|
|
5
8
|
import { defineCapability } from '@dxos/app-framework';
|
|
9
|
+
import type {
|
|
10
|
+
CredentialsService,
|
|
11
|
+
DatabaseService,
|
|
12
|
+
FunctionImplementationResolver,
|
|
13
|
+
InvocationTracer,
|
|
14
|
+
LocalFunctionExecutionService,
|
|
15
|
+
QueueService,
|
|
16
|
+
RemoteFunctionExecutionService,
|
|
17
|
+
TriggerDispatcher,
|
|
18
|
+
TriggerStateStore,
|
|
19
|
+
} from '@dxos/functions';
|
|
20
|
+
import type { SpaceId } from '@dxos/keys';
|
|
6
21
|
import { type DeepReadonly } from '@dxos/util';
|
|
7
22
|
|
|
8
23
|
import { meta } from '../meta';
|
|
@@ -15,4 +30,42 @@ export namespace AssistantCapabilities {
|
|
|
15
30
|
};
|
|
16
31
|
export const State = defineCapability<DeepReadonly<AssistantState>>(`${meta.id}/capability/state`);
|
|
17
32
|
export const MutableState = defineCapability<AssistantState>(`${meta.id}/capability/state`);
|
|
33
|
+
|
|
34
|
+
export type AiServiceLayer = Layer.Layer<AiService.AiService>;
|
|
35
|
+
export const AiServiceLayer = defineCapability<AiServiceLayer>(`${meta.id}/capability/ai-service-factory`);
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Plugins can contribute them to provide model resolvers.
|
|
39
|
+
*/
|
|
40
|
+
export const AiModelResolver = defineCapability<Layer.Layer<AiServiceRouter.AiModelResolver>>(
|
|
41
|
+
`${meta.id}/capability/ai-model-resolver`,
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Service stack for executing agents, functions, and triggers.
|
|
46
|
+
*/
|
|
47
|
+
export type ComputeServices =
|
|
48
|
+
| TriggerDispatcher
|
|
49
|
+
| AiService.AiService
|
|
50
|
+
| DatabaseService
|
|
51
|
+
| QueueService
|
|
52
|
+
| CredentialsService
|
|
53
|
+
| LocalFunctionExecutionService
|
|
54
|
+
| RemoteFunctionExecutionService
|
|
55
|
+
// TODO(dmaretskyi): This service is private and shouldn't be exposed as a part of public API.
|
|
56
|
+
| FunctionImplementationResolver
|
|
57
|
+
| InvocationTracer
|
|
58
|
+
| TriggerStateStore
|
|
59
|
+
// TODO(dmaretskyi): Those should be provided at AI-chat call site.
|
|
60
|
+
| ToolResolverService
|
|
61
|
+
| ToolExecutionService;
|
|
62
|
+
|
|
63
|
+
export interface ComputeRuntimeProvider {
|
|
64
|
+
getRuntime(spaceId: SpaceId): ManagedRuntime.ManagedRuntime<ComputeServices, never>;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Runtime for executing agents, functions, and triggers.
|
|
69
|
+
*/
|
|
70
|
+
export const ComputeRuntime = defineCapability<ComputeRuntimeProvider>(`${meta.id}/capability/compute-runtime`);
|
|
18
71
|
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type AiTool, AiToolkit } from '@effect/ai';
|
|
6
|
+
import { BrowserKeyValueStore } from '@effect/platform-browser';
|
|
7
|
+
import { Effect, Layer, ManagedRuntime } from 'effect';
|
|
8
|
+
|
|
9
|
+
import { Capabilities, type PluginContext, contributes } from '@dxos/app-framework';
|
|
10
|
+
import { makeToolExecutionServiceFromFunctions, makeToolResolverFromFunctions } from '@dxos/assistant';
|
|
11
|
+
import { PropertiesType } from '@dxos/client/echo';
|
|
12
|
+
import { Resource } from '@dxos/context';
|
|
13
|
+
import { Query, Ref } from '@dxos/echo';
|
|
14
|
+
import {
|
|
15
|
+
CredentialsService,
|
|
16
|
+
DatabaseService,
|
|
17
|
+
FunctionImplementationResolver,
|
|
18
|
+
InvocationTracer,
|
|
19
|
+
LocalFunctionExecutionService,
|
|
20
|
+
QueueService,
|
|
21
|
+
RemoteFunctionExecutionService,
|
|
22
|
+
TriggerDispatcher,
|
|
23
|
+
} from '@dxos/functions';
|
|
24
|
+
import { TriggerStateStore } from '@dxos/functions';
|
|
25
|
+
import { invariant } from '@dxos/invariant';
|
|
26
|
+
import { type SpaceId } from '@dxos/keys';
|
|
27
|
+
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
28
|
+
|
|
29
|
+
import { AssistantCapabilities } from './capabilities';
|
|
30
|
+
|
|
31
|
+
export default async (context: PluginContext) => {
|
|
32
|
+
const provider = await new ComputeRuntimeProviderImpl(context).open();
|
|
33
|
+
return contributes(AssistantCapabilities.ComputeRuntime, provider, async () => {
|
|
34
|
+
await provider.close();
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
class ComputeRuntimeProviderImpl extends Resource implements AssistantCapabilities.ComputeRuntimeProvider {
|
|
39
|
+
readonly #runtimes = new Map<SpaceId, ManagedRuntime.ManagedRuntime<AssistantCapabilities.ComputeServices, never>>();
|
|
40
|
+
readonly #context: PluginContext;
|
|
41
|
+
|
|
42
|
+
constructor(context: PluginContext) {
|
|
43
|
+
super();
|
|
44
|
+
this.#context = context;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
protected override async _open() {}
|
|
48
|
+
|
|
49
|
+
protected override async _close() {
|
|
50
|
+
await Promise.all(Array.from(this.#runtimes.values()).map((rt) => rt.dispose()));
|
|
51
|
+
this.#runtimes.clear();
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
getRuntime(spaceId: SpaceId): ManagedRuntime.ManagedRuntime<AssistantCapabilities.ComputeServices, never> {
|
|
55
|
+
if (this.#runtimes.has(spaceId)) {
|
|
56
|
+
return this.#runtimes.get(spaceId)!;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const layer = Layer.unwrapEffect(
|
|
60
|
+
Effect.gen(this, function* () {
|
|
61
|
+
const client = this.#context.getCapability(ClientCapabilities.Client);
|
|
62
|
+
const serviceLayer =
|
|
63
|
+
this.#context.getCapability(AssistantCapabilities.AiServiceLayer) ?? Layer.die('AiService not found');
|
|
64
|
+
|
|
65
|
+
// TODO(dmaretskyi): Make those reactive.
|
|
66
|
+
const functions = this.#context.getCapabilities(Capabilities.Functions);
|
|
67
|
+
const toolkits = this.#context.getCapabilities(Capabilities.Toolkit);
|
|
68
|
+
const handlers = this.#context.getCapabilities(Capabilities.ToolkitHandler);
|
|
69
|
+
|
|
70
|
+
const allFunctions = functions.flat();
|
|
71
|
+
// TODO(wittjosiah): Don't cast.
|
|
72
|
+
const toolkit = AiToolkit.merge(...toolkits) as AiToolkit.Any as AiToolkit.AiToolkit<AiTool.Any>;
|
|
73
|
+
const handlersLayer = Layer.mergeAll(Layer.empty, ...handlers);
|
|
74
|
+
|
|
75
|
+
const space = client.spaces.get(spaceId);
|
|
76
|
+
invariant(space);
|
|
77
|
+
yield* Effect.promise(() => space.waitUntilReady());
|
|
78
|
+
|
|
79
|
+
return Layer.mergeAll(TriggerDispatcher.layer({ timeControl: 'natural' })).pipe(
|
|
80
|
+
Layer.provideMerge(
|
|
81
|
+
Layer.mergeAll(
|
|
82
|
+
IvocationTracerLive,
|
|
83
|
+
TriggerStateStore.layerKv.pipe(Layer.provide(BrowserKeyValueStore.layerLocalStorage)),
|
|
84
|
+
serviceLayer,
|
|
85
|
+
makeToolResolverFromFunctions(allFunctions, toolkit),
|
|
86
|
+
makeToolExecutionServiceFromFunctions(allFunctions, toolkit, handlersLayer),
|
|
87
|
+
CredentialsService.layerFromDatabase(),
|
|
88
|
+
),
|
|
89
|
+
),
|
|
90
|
+
Layer.provideMerge(
|
|
91
|
+
Layer.mergeAll(
|
|
92
|
+
space ? DatabaseService.layer(space.db) : DatabaseService.notAvailable,
|
|
93
|
+
space ? QueueService.layer(space.queues) : QueueService.notAvailable,
|
|
94
|
+
LocalFunctionExecutionService.layerLive,
|
|
95
|
+
RemoteFunctionExecutionService.mockLayer,
|
|
96
|
+
),
|
|
97
|
+
),
|
|
98
|
+
Layer.provideMerge(FunctionImplementationResolver.layerTest({ functions: allFunctions })),
|
|
99
|
+
);
|
|
100
|
+
}),
|
|
101
|
+
);
|
|
102
|
+
|
|
103
|
+
const runtime = ManagedRuntime.make(layer);
|
|
104
|
+
this.#runtimes.set(spaceId, runtime);
|
|
105
|
+
|
|
106
|
+
return runtime;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const IvocationTracerLive = Layer.unwrapEffect(
|
|
111
|
+
Effect.gen(function* () {
|
|
112
|
+
const {
|
|
113
|
+
objects: [properties],
|
|
114
|
+
} = yield* DatabaseService.runQuery(Query.type(PropertiesType));
|
|
115
|
+
invariant(properties);
|
|
116
|
+
if (!properties.invocationTraceQueue) {
|
|
117
|
+
const queue = yield* QueueService.createQueue({ subspaceTag: 'trace' });
|
|
118
|
+
properties.invocationTraceQueue = Ref.fromDXN(queue.dxn);
|
|
119
|
+
}
|
|
120
|
+
const queue = properties.invocationTraceQueue.target;
|
|
121
|
+
invariant(queue);
|
|
122
|
+
return InvocationTracer.layerLive({ invocationTraceQueue: queue });
|
|
123
|
+
}),
|
|
124
|
+
);
|
|
@@ -7,11 +7,13 @@ import { FetchHttpClient } from '@effect/platform';
|
|
|
7
7
|
import { Layer } from 'effect';
|
|
8
8
|
|
|
9
9
|
import { AiServiceRouter } from '@dxos/ai';
|
|
10
|
-
import {
|
|
10
|
+
import { type Capability, contributes } from '@dxos/app-framework';
|
|
11
|
+
|
|
12
|
+
import { AssistantCapabilities } from './capabilities';
|
|
11
13
|
|
|
12
14
|
export default (): Capability<any>[] => [
|
|
13
15
|
contributes(
|
|
14
|
-
|
|
16
|
+
AssistantCapabilities.AiModelResolver,
|
|
15
17
|
AiServiceRouter.AnthropicResolver.pipe(
|
|
16
18
|
Layer.provide(
|
|
17
19
|
AnthropicClient.layer({
|
|
@@ -14,6 +14,7 @@ export const LocalModelResolver = lazy(() => import('./local-model-resolver'));
|
|
|
14
14
|
export const ReactSurface = lazy(() => import('./react-surface'));
|
|
15
15
|
export const Settings = lazy(() => import('./settings'));
|
|
16
16
|
export const Toolkit = lazy(() => import('./toolkit'));
|
|
17
|
+
export const ComputeRuntime = lazy(() => import('./compute-runtime'));
|
|
17
18
|
|
|
18
19
|
export * from './blueprint-definition';
|
|
19
20
|
export * from './capabilities';
|
|
@@ -7,7 +7,9 @@ import { FetchHttpClient } from '@effect/platform';
|
|
|
7
7
|
import { Layer } from 'effect';
|
|
8
8
|
|
|
9
9
|
import { AiServiceRouter } from '@dxos/ai';
|
|
10
|
-
import {
|
|
10
|
+
import { type Capability, contributes } from '@dxos/app-framework';
|
|
11
|
+
|
|
12
|
+
import { AssistantCapabilities } from './capabilities';
|
|
11
13
|
|
|
12
14
|
/**
|
|
13
15
|
* To start LM Studio server:
|
|
@@ -17,7 +19,7 @@ import { Capabilities, type Capability, contributes } from '@dxos/app-framework'
|
|
|
17
19
|
*/
|
|
18
20
|
export default (): Capability<any>[] => [
|
|
19
21
|
contributes(
|
|
20
|
-
|
|
22
|
+
AssistantCapabilities.AiModelResolver,
|
|
21
23
|
AiServiceRouter.LMStudioResolver.pipe(
|
|
22
24
|
Layer.provide(
|
|
23
25
|
OpenAiClient.layer({
|
|
@@ -12,7 +12,6 @@ import {
|
|
|
12
12
|
createDataExtensions,
|
|
13
13
|
createMarkdownExtensions,
|
|
14
14
|
createThemeExtensions,
|
|
15
|
-
decorateMarkdown,
|
|
16
15
|
useTextEditor,
|
|
17
16
|
} from '@dxos/react-ui-editor';
|
|
18
17
|
import { mx } from '@dxos/react-ui-theme';
|
|
@@ -47,8 +46,9 @@ export const TemplateEditor = ({ id, classNames, template }: TemplateEditorProps
|
|
|
47
46
|
placeholder: t('template placeholder'),
|
|
48
47
|
}),
|
|
49
48
|
createThemeExtensions({ themeMode }),
|
|
49
|
+
|
|
50
|
+
// Extend markdown with handlebars support.
|
|
50
51
|
createMarkdownExtensions(),
|
|
51
|
-
decorateMarkdown(),
|
|
52
52
|
handlebars(),
|
|
53
53
|
].filter(isNotFalsy),
|
|
54
54
|
};
|
package/src/hooks/index.ts
CHANGED
|
@@ -8,9 +8,9 @@ import { useMemo } from 'react';
|
|
|
8
8
|
import { useCapability } from '@dxos/app-framework';
|
|
9
9
|
import { type Space } from '@dxos/client/echo';
|
|
10
10
|
import { TracingService } from '@dxos/functions';
|
|
11
|
-
import { AutomationCapabilities } from '@dxos/plugin-automation';
|
|
12
11
|
import { useClient } from '@dxos/react-client';
|
|
13
12
|
|
|
13
|
+
import { AssistantCapabilities } from '../capabilities';
|
|
14
14
|
import { type AiChatServices } from '../processor';
|
|
15
15
|
import { type Assistant } from '../types';
|
|
16
16
|
|
|
@@ -30,7 +30,7 @@ export const useChatServices = ({
|
|
|
30
30
|
const client = useClient();
|
|
31
31
|
space ??= client.spaces.default;
|
|
32
32
|
|
|
33
|
-
const computeRuntimeResolver = useCapability(
|
|
33
|
+
const computeRuntimeResolver = useCapability(AssistantCapabilities.ComputeRuntime);
|
|
34
34
|
|
|
35
35
|
return useMemo(() => {
|
|
36
36
|
const runtime = computeRuntimeResolver.getRuntime(space.id);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import type { Effect } from 'effect';
|
|
6
|
+
import { useCallback } from 'react';
|
|
7
|
+
|
|
8
|
+
import { useCapability } from '@dxos/app-framework';
|
|
9
|
+
import type { Space } from '@dxos/client/echo';
|
|
10
|
+
|
|
11
|
+
import { AssistantCapabilities } from '../capabilities';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Create an effectful function that has access to compute services
|
|
15
|
+
*/
|
|
16
|
+
export const useComputeRuntimeCallback = <T>(
|
|
17
|
+
space: Space,
|
|
18
|
+
fn: () => Effect.Effect<T, any, AssistantCapabilities.ComputeServices>,
|
|
19
|
+
deps?: React.DependencyList,
|
|
20
|
+
): (() => Promise<T>) => {
|
|
21
|
+
const computeRuntime = useCapability(AssistantCapabilities.ComputeRuntime);
|
|
22
|
+
const runtime = computeRuntime.getRuntime(space.id);
|
|
23
|
+
|
|
24
|
+
return useCallback(() => runtime.runPromise(fn()), [runtime, ...(deps ?? [])]);
|
|
25
|
+
};
|