@dxos/plugin-automation 0.7.5-labs.f5080a1 → 0.7.5-labs.ff2ff30
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/AutomationPanel-VW2XIUPU.mjs +8 -0
- package/dist/lib/browser/ChatContainer-5TAVTN3T.mjs +12 -0
- package/dist/lib/browser/{ai-client-UJLNYP7B.mjs → ai-client-5CNY6JBF.mjs} +3 -3
- package/dist/lib/browser/{app-graph-builder-3H5TCRG4.mjs → app-graph-builder-FZGK55G7.mjs} +39 -4
- package/dist/lib/browser/app-graph-builder-FZGK55G7.mjs.map +7 -0
- package/dist/lib/browser/{chunk-BQHXJZ4K.mjs → chunk-2H2EUYXL.mjs} +2 -2
- package/dist/lib/browser/{chunk-DL7XA62G.mjs → chunk-DVE33EZL.mjs} +224 -153
- package/dist/lib/browser/{chunk-DL7XA62G.mjs.map → chunk-DVE33EZL.mjs.map} +4 -4
- package/dist/lib/browser/{chunk-PQGFC2ZO.mjs → chunk-MJK7GL5P.mjs} +61 -38
- package/dist/lib/browser/chunk-MJK7GL5P.mjs.map +7 -0
- package/dist/lib/browser/{chunk-Z54KIF6H.mjs → chunk-NQFZ6XRX.mjs} +3 -2
- package/dist/lib/browser/{chunk-Z54KIF6H.mjs.map → chunk-NQFZ6XRX.mjs.map} +2 -2
- package/dist/lib/browser/{chunk-43WRHV2L.mjs → chunk-Q4IMHYGH.mjs} +2 -2
- package/dist/lib/browser/{chunk-DQ7ZSYJJ.mjs → chunk-R4JH4TLE.mjs} +3 -1
- package/dist/lib/browser/chunk-R4JH4TLE.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +16 -11
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-5YVZJFS3.mjs → intent-resolver-BWAXKT27.mjs} +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-WRHRCEV5.mjs → react-surface-ILBDBZCN.mjs} +15 -7
- package/dist/lib/browser/react-surface-ILBDBZCN.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +2 -2
- package/dist/lib/node/{AutomationPanel-CO26O75P.cjs → AutomationPanel-G6EDDYWW.cjs} +7 -7
- package/dist/lib/node/{AutomationPanel-CO26O75P.cjs.map → AutomationPanel-G6EDDYWW.cjs.map} +2 -2
- package/dist/lib/node/{ChatContainer-5URBEXQD.cjs → ChatContainer-EN24W3K4.cjs} +10 -10
- package/dist/lib/node/ChatContainer-EN24W3K4.cjs.map +7 -0
- package/dist/lib/node/{ai-client-AOB6TLNW.cjs → ai-client-FKLPDELV.cjs} +7 -7
- package/dist/lib/node/{app-graph-builder-CDEQJEHY.cjs → app-graph-builder-T76NYV42.cjs} +48 -14
- package/dist/lib/node/app-graph-builder-T76NYV42.cjs.map +7 -0
- package/dist/lib/node/{chunk-NH7STAX6.cjs → chunk-CJGJXNY3.cjs} +245 -174
- package/dist/lib/node/chunk-CJGJXNY3.cjs.map +7 -0
- package/dist/lib/node/{chunk-TQEDPRY5.cjs → chunk-EQYHOTGG.cjs} +7 -4
- package/dist/lib/node/chunk-EQYHOTGG.cjs.map +7 -0
- package/dist/lib/node/{chunk-H3RSMGJG.cjs → chunk-GB7245FH.cjs} +6 -6
- package/dist/lib/node/{chunk-D2QQXWOY.cjs → chunk-HMBKP6VG.cjs} +80 -58
- package/dist/lib/node/chunk-HMBKP6VG.cjs.map +7 -0
- package/dist/lib/node/{chunk-OCW5GAVZ.cjs → chunk-QXIHYOMF.cjs} +8 -7
- package/dist/lib/node/{chunk-OCW5GAVZ.cjs.map → chunk-QXIHYOMF.cjs.map} +2 -2
- package/dist/lib/node/{chunk-AWZVJZ2I.cjs → chunk-U5Z7LFWB.cjs} +6 -6
- package/dist/lib/node/index.cjs +79 -74
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/{intent-resolver-MJFZT5IU.cjs → intent-resolver-C6OKFVEW.cjs} +8 -8
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-surface-HDAVE6NU.cjs → react-surface-LWDY7SQG.cjs} +23 -17
- package/dist/lib/node/react-surface-LWDY7SQG.cjs.map +7 -0
- package/dist/lib/node/types/index.cjs +11 -11
- package/dist/lib/node/types/index.cjs.map +1 -1
- package/dist/lib/node-esm/{AutomationPanel-VQZUKPK2.mjs → AutomationPanel-V3IWQAMO.mjs} +3 -3
- package/dist/lib/node-esm/{ChatContainer-23QIVDG5.mjs → ChatContainer-CNTY3C2D.mjs} +5 -5
- package/dist/lib/node-esm/{ai-client-RUCCJ7JZ.mjs → ai-client-XGNA6SJ5.mjs} +3 -3
- package/dist/lib/node-esm/{app-graph-builder-GR3URVNX.mjs → app-graph-builder-IJQEN7WT.mjs} +39 -4
- package/dist/lib/node-esm/app-graph-builder-IJQEN7WT.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-NSVQZ3EH.mjs → chunk-6HLBYDUI.mjs} +3 -2
- package/dist/lib/node-esm/{chunk-NSVQZ3EH.mjs.map → chunk-6HLBYDUI.mjs.map} +2 -2
- package/dist/lib/node-esm/{chunk-7JO77AAS.mjs → chunk-DNCXRGAF.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-JFHI22MF.mjs → chunk-EMVA6QUT.mjs} +3 -1
- package/dist/lib/node-esm/chunk-EMVA6QUT.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-LSSWQIQD.mjs → chunk-IJRTDSKN.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-JJFWFS6P.mjs → chunk-QP47VJT6.mjs} +224 -153
- package/dist/lib/node-esm/{chunk-JJFWFS6P.mjs.map → chunk-QP47VJT6.mjs.map} +4 -4
- package/dist/lib/node-esm/{chunk-VN2AFV25.mjs → chunk-ZLIAMW45.mjs} +61 -38
- package/dist/lib/node-esm/chunk-ZLIAMW45.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +16 -11
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-FCKNRTKQ.mjs → intent-resolver-DCP4ZDBA.mjs} +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-FZ5OFRDE.mjs → react-surface-SBDXFVIN.mjs} +15 -7
- package/dist/lib/node-esm/react-surface-SBDXFVIN.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +2 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts +23 -22
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/AmbientChatDialog/AmbientChatDialog.d.ts +3 -0
- package/dist/types/src/components/AmbientChatDialog/AmbientChatDialog.d.ts.map +1 -0
- package/dist/types/src/components/AmbientChatDialog/index.d.ts +2 -0
- package/dist/types/src/components/AmbientChatDialog/index.d.ts.map +1 -0
- package/dist/types/src/components/Box/StatusLine.d.ts.map +1 -0
- package/dist/types/src/components/Box/StatusLine.stories.d.ts.map +1 -0
- package/dist/types/src/components/Box/Tabbed.d.ts +15 -0
- package/dist/types/src/components/Box/Tabbed.d.ts.map +1 -0
- package/dist/types/src/components/Box/Tabbed.stories.d.ts.map +1 -0
- package/dist/types/src/components/{Thread → Box}/ToggleContainer.d.ts +3 -3
- package/dist/types/src/components/Box/ToggleContainer.d.ts.map +1 -0
- package/dist/types/src/components/Box/ToggleContainer.stories.d.ts.map +1 -0
- package/dist/types/src/components/Box/index.d.ts +4 -0
- package/dist/types/src/components/Box/index.d.ts.map +1 -0
- package/dist/types/src/components/Prompt/Prompt.d.ts +7 -0
- package/dist/types/src/components/Prompt/Prompt.d.ts.map +1 -0
- package/dist/types/src/components/Prompt/Prompt.stories.d.ts +8 -0
- package/dist/types/src/components/Prompt/Prompt.stories.d.ts.map +1 -0
- package/dist/types/src/components/Prompt/index.d.ts +2 -0
- package/dist/types/src/components/Prompt/index.d.ts.map +1 -0
- package/dist/types/src/components/Prompt/prompt-autocomplete.d.ts +20 -0
- package/dist/types/src/components/Prompt/prompt-autocomplete.d.ts.map +1 -0
- package/dist/types/src/components/Thread/Thread.stories.d.ts +1 -0
- package/dist/types/src/components/Thread/Thread.stories.d.ts.map +1 -1
- package/dist/types/src/components/Thread/ThreadMessage.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +1 -0
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +3 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/package.json +52 -50
- package/src/AutomationPlugin.tsx +5 -5
- package/src/capabilities/app-graph-builder.ts +34 -3
- package/src/capabilities/react-surface.tsx +8 -2
- package/src/components/AmbientChatDialog/AmbientChatDialog.tsx +26 -0
- package/src/components/AmbientChatDialog/index.ts +5 -0
- package/src/components/{Thread → Box}/Tabbed.stories.tsx +1 -2
- package/src/components/Box/Tabbed.tsx +89 -0
- package/src/components/{Thread → Box}/ToggleContainer.stories.tsx +0 -1
- package/src/components/{Thread → Box}/ToggleContainer.tsx +28 -23
- package/src/components/Box/index.ts +7 -0
- package/src/components/Prompt/Prompt.stories.tsx +50 -0
- package/src/components/Prompt/Prompt.tsx +36 -0
- package/src/components/Prompt/index.ts +5 -0
- package/src/components/Prompt/prompt-autocomplete.ts +200 -0
- package/src/components/PromptEditor/PromptEditor.stories.tsx +3 -3
- package/src/components/Thread/Thread.stories.tsx +8 -1
- package/src/components/Thread/Thread.tsx +1 -1
- package/src/components/Thread/ThreadMessage.tsx +41 -19
- package/src/components/TriggerEditor/TriggerEditor.tsx +6 -1
- package/src/components/index.ts +1 -0
- package/src/meta.ts +2 -0
- package/src/translations.ts +1 -0
- package/dist/lib/browser/AutomationPanel-YPD3AGQN.mjs +0 -8
- package/dist/lib/browser/ChatContainer-ODZECATM.mjs +0 -12
- package/dist/lib/browser/app-graph-builder-3H5TCRG4.mjs.map +0 -7
- package/dist/lib/browser/chunk-DQ7ZSYJJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-PQGFC2ZO.mjs.map +0 -7
- package/dist/lib/browser/react-surface-WRHRCEV5.mjs.map +0 -7
- package/dist/lib/node/ChatContainer-5URBEXQD.cjs.map +0 -7
- package/dist/lib/node/app-graph-builder-CDEQJEHY.cjs.map +0 -7
- package/dist/lib/node/chunk-D2QQXWOY.cjs.map +0 -7
- package/dist/lib/node/chunk-NH7STAX6.cjs.map +0 -7
- package/dist/lib/node/chunk-TQEDPRY5.cjs.map +0 -7
- package/dist/lib/node/react-surface-HDAVE6NU.cjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-GR3URVNX.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JFHI22MF.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-VN2AFV25.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-FZ5OFRDE.mjs.map +0 -7
- package/dist/types/src/components/Thread/ScrollContainer.d.ts +0 -15
- package/dist/types/src/components/Thread/ScrollContainer.d.ts.map +0 -1
- package/dist/types/src/components/Thread/StatusLine.d.ts.map +0 -1
- package/dist/types/src/components/Thread/StatusLine.stories.d.ts.map +0 -1
- package/dist/types/src/components/Thread/Tabbed.d.ts +0 -9
- package/dist/types/src/components/Thread/Tabbed.d.ts.map +0 -1
- package/dist/types/src/components/Thread/Tabbed.stories.d.ts.map +0 -1
- package/dist/types/src/components/Thread/ToggleContainer.d.ts.map +0 -1
- package/dist/types/src/components/Thread/ToggleContainer.stories.d.ts.map +0 -1
- package/src/components/Thread/ScrollContainer.tsx +0 -92
- package/src/components/Thread/Tabbed.tsx +0 -72
- /package/dist/lib/browser/{AutomationPanel-YPD3AGQN.mjs.map → AutomationPanel-VW2XIUPU.mjs.map} +0 -0
- /package/dist/lib/browser/{ChatContainer-ODZECATM.mjs.map → ChatContainer-5TAVTN3T.mjs.map} +0 -0
- /package/dist/lib/browser/{ai-client-UJLNYP7B.mjs.map → ai-client-5CNY6JBF.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-BQHXJZ4K.mjs.map → chunk-2H2EUYXL.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-43WRHV2L.mjs.map → chunk-Q4IMHYGH.mjs.map} +0 -0
- /package/dist/lib/browser/{intent-resolver-5YVZJFS3.mjs.map → intent-resolver-BWAXKT27.mjs.map} +0 -0
- /package/dist/lib/node/{ai-client-AOB6TLNW.cjs.map → ai-client-FKLPDELV.cjs.map} +0 -0
- /package/dist/lib/node/{chunk-H3RSMGJG.cjs.map → chunk-GB7245FH.cjs.map} +0 -0
- /package/dist/lib/node/{chunk-AWZVJZ2I.cjs.map → chunk-U5Z7LFWB.cjs.map} +0 -0
- /package/dist/lib/node/{intent-resolver-MJFZT5IU.cjs.map → intent-resolver-C6OKFVEW.cjs.map} +0 -0
- /package/dist/lib/node-esm/{AutomationPanel-VQZUKPK2.mjs.map → AutomationPanel-V3IWQAMO.mjs.map} +0 -0
- /package/dist/lib/node-esm/{ChatContainer-23QIVDG5.mjs.map → ChatContainer-CNTY3C2D.mjs.map} +0 -0
- /package/dist/lib/node-esm/{ai-client-RUCCJ7JZ.mjs.map → ai-client-XGNA6SJ5.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-7JO77AAS.mjs.map → chunk-DNCXRGAF.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-LSSWQIQD.mjs.map → chunk-IJRTDSKN.mjs.map} +0 -0
- /package/dist/lib/node-esm/{intent-resolver-FCKNRTKQ.mjs.map → intent-resolver-DCP4ZDBA.mjs.map} +0 -0
- /package/dist/types/src/components/{Thread → Box}/StatusLine.d.ts +0 -0
- /package/dist/types/src/components/{Thread → Box}/StatusLine.stories.d.ts +0 -0
- /package/dist/types/src/components/{Thread → Box}/Tabbed.stories.d.ts +0 -0
- /package/dist/types/src/components/{Thread → Box}/ToggleContainer.stories.d.ts +0 -0
- /package/src/components/{Thread → Box}/StatusLine.stories.tsx +0 -0
- /package/src/components/{Thread → Box}/StatusLine.tsx +0 -0
|
@@ -1,20 +1,42 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
useServices
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-QP47VJT6.mjs";
|
|
5
5
|
import {
|
|
6
6
|
ChainInputType,
|
|
7
7
|
ServiceType,
|
|
8
8
|
categoryIcons
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DNCXRGAF.mjs";
|
|
10
10
|
import {
|
|
11
11
|
AUTOMATION_PLUGIN
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-EMVA6QUT.mjs";
|
|
13
|
+
|
|
14
|
+
// packages/plugins/experimental/plugin-automation/src/components/AmbientChatDialog/AmbientChatDialog.tsx
|
|
15
|
+
import React from "react";
|
|
16
|
+
import { Dialog, Icon, useTranslation } from "@dxos/react-ui";
|
|
17
|
+
var preventDefault = (event) => event.preventDefault();
|
|
18
|
+
var AmbientChatDialog = () => {
|
|
19
|
+
const { t } = useTranslation(AUTOMATION_PLUGIN);
|
|
20
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
21
|
+
role: "none",
|
|
22
|
+
className: "dx-dialog__overlay bg-transparent pointer-events-none",
|
|
23
|
+
"data-block-align": "end"
|
|
24
|
+
}, /* @__PURE__ */ React.createElement(Dialog.Content, {
|
|
25
|
+
onInteractOutside: preventDefault,
|
|
26
|
+
classNames: "pointer-events-auto",
|
|
27
|
+
inOverlayLayout: true
|
|
28
|
+
}, /* @__PURE__ */ React.createElement(Dialog.Title, {
|
|
29
|
+
classNames: "sr-only"
|
|
30
|
+
}, t("ambient chat dialog title")), /* @__PURE__ */ React.createElement(Dialog.Close, null, /* @__PURE__ */ React.createElement(Icon, {
|
|
31
|
+
icon: "ph--x--regular",
|
|
32
|
+
size: 4
|
|
33
|
+
})), /* @__PURE__ */ React.createElement("h1", null, "Hello")));
|
|
34
|
+
};
|
|
13
35
|
|
|
14
36
|
// packages/plugins/experimental/plugin-automation/src/components/PromptEditor/PromptEditor.tsx
|
|
15
|
-
import
|
|
37
|
+
import React2, { useEffect } from "react";
|
|
16
38
|
import { createDocAccessor } from "@dxos/react-client/echo";
|
|
17
|
-
import { Input, Select, useThemeContext, useTranslation } from "@dxos/react-ui";
|
|
39
|
+
import { Input, Select, useThemeContext, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
18
40
|
import { createBasicExtensions, createDataExtensions, createThemeExtensions, useTextEditor } from "@dxos/react-ui-editor";
|
|
19
41
|
import { attentionSurface, groupBorder, mx as mx2 } from "@dxos/react-ui-theme";
|
|
20
42
|
import { nonNullable } from "@dxos/util";
|
|
@@ -130,7 +152,7 @@ var usePromptInputs = (prompt) => {
|
|
|
130
152
|
]);
|
|
131
153
|
};
|
|
132
154
|
var PromptEditor = ({ prompt, commandEditable = true }) => {
|
|
133
|
-
const { t } =
|
|
155
|
+
const { t } = useTranslation2(AUTOMATION_PLUGIN);
|
|
134
156
|
const { themeMode } = useThemeContext();
|
|
135
157
|
const { parentRef } = useTextEditor(() => ({
|
|
136
158
|
initialValue: prompt.template,
|
|
@@ -161,53 +183,53 @@ var PromptEditor = ({ prompt, commandEditable = true }) => {
|
|
|
161
183
|
prompt
|
|
162
184
|
]);
|
|
163
185
|
usePromptInputs(prompt);
|
|
164
|
-
return /* @__PURE__ */
|
|
186
|
+
return /* @__PURE__ */ React2.createElement("div", {
|
|
165
187
|
className: mx2("flex flex-col w-full overflow-hidden gap-4", groupBorder)
|
|
166
|
-
}, commandEditable && /* @__PURE__ */
|
|
188
|
+
}, commandEditable && /* @__PURE__ */ React2.createElement("div", {
|
|
167
189
|
className: "flex items-center pl-4"
|
|
168
|
-
}, /* @__PURE__ */
|
|
190
|
+
}, /* @__PURE__ */ React2.createElement("span", {
|
|
169
191
|
className: "text-neutral-500"
|
|
170
|
-
}, "/"), /* @__PURE__ */
|
|
192
|
+
}, "/"), /* @__PURE__ */ React2.createElement(Input.Root, null, /* @__PURE__ */ React2.createElement(Input.TextInput, {
|
|
171
193
|
placeholder: t("command placeholder"),
|
|
172
194
|
classNames: mx2("is-full bg-transparent m-2"),
|
|
173
195
|
value: prompt.command ?? "",
|
|
174
196
|
onChange: (event) => {
|
|
175
197
|
prompt.command = event.target.value.replace(/\w/g, "");
|
|
176
198
|
}
|
|
177
|
-
}))), /* @__PURE__ */
|
|
199
|
+
}))), /* @__PURE__ */ React2.createElement("div", {
|
|
178
200
|
ref: parentRef,
|
|
179
201
|
className: mx2(attentionSurface, "rounded", "min-h-[120px]")
|
|
180
|
-
}), (prompt.inputs?.length ?? 0) > 0 && /* @__PURE__ */
|
|
202
|
+
}), (prompt.inputs?.length ?? 0) > 0 && /* @__PURE__ */ React2.createElement("div", {
|
|
181
203
|
className: "flex flex-col"
|
|
182
|
-
}, /* @__PURE__ */
|
|
204
|
+
}, /* @__PURE__ */ React2.createElement("table", {
|
|
183
205
|
className: "w-full table-fixed border-collapse my-2"
|
|
184
|
-
}, /* @__PURE__ */
|
|
206
|
+
}, /* @__PURE__ */ React2.createElement("tbody", null, prompt.inputs?.filter(nonNullable).map((input) => /* @__PURE__ */ React2.createElement("tr", {
|
|
185
207
|
key: input.name
|
|
186
|
-
}, /* @__PURE__ */
|
|
208
|
+
}, /* @__PURE__ */ React2.createElement("td", {
|
|
187
209
|
className: "w-[160px] p-1 font-mono text-sm whitespace-nowrap truncate"
|
|
188
|
-
}, /* @__PURE__ */
|
|
210
|
+
}, /* @__PURE__ */ React2.createElement("code", {
|
|
189
211
|
className: "px-2"
|
|
190
|
-
}, input.name)), /* @__PURE__ */
|
|
212
|
+
}, input.name)), /* @__PURE__ */ React2.createElement("td", {
|
|
191
213
|
className: "w-[120px] p-1"
|
|
192
|
-
}, /* @__PURE__ */
|
|
214
|
+
}, /* @__PURE__ */ React2.createElement(Input.Root, null, /* @__PURE__ */ React2.createElement(Select.Root, {
|
|
193
215
|
value: String(input.type),
|
|
194
216
|
onValueChange: (type) => {
|
|
195
217
|
input.type = getInputType(type) ?? ChainInputType.VALUE;
|
|
196
218
|
}
|
|
197
|
-
}, /* @__PURE__ */
|
|
219
|
+
}, /* @__PURE__ */ React2.createElement(Select.TriggerButton, {
|
|
198
220
|
placeholder: "Type",
|
|
199
221
|
classNames: "is-full"
|
|
200
|
-
}), /* @__PURE__ */
|
|
222
|
+
}), /* @__PURE__ */ React2.createElement(Select.Portal, null, /* @__PURE__ */ React2.createElement(Select.Content, null, /* @__PURE__ */ React2.createElement(Select.Viewport, null, inputTypes.map(({ value, label }) => /* @__PURE__ */ React2.createElement(Select.Option, {
|
|
201
223
|
key: value,
|
|
202
224
|
value: String(value)
|
|
203
|
-
}, label)))))))), /* @__PURE__ */
|
|
225
|
+
}, label)))))))), /* @__PURE__ */ React2.createElement("td", {
|
|
204
226
|
className: "p-1 pr-2"
|
|
205
227
|
}, input.type !== void 0 && [
|
|
206
228
|
ChainInputType.VALUE,
|
|
207
229
|
ChainInputType.CONTEXT,
|
|
208
230
|
ChainInputType.RESOLVER,
|
|
209
231
|
ChainInputType.SCHEMA
|
|
210
|
-
].includes(input.type) && /* @__PURE__ */
|
|
232
|
+
].includes(input.type) && /* @__PURE__ */ React2.createElement("div", null, /* @__PURE__ */ React2.createElement(Input.Root, null, /* @__PURE__ */ React2.createElement(Input.TextInput, {
|
|
211
233
|
placeholder: t("command placeholder"),
|
|
212
234
|
classNames: mx2("is-full bg-transparent"),
|
|
213
235
|
value: input.value ?? "",
|
|
@@ -218,10 +240,10 @@ var PromptEditor = ({ prompt, commandEditable = true }) => {
|
|
|
218
240
|
};
|
|
219
241
|
|
|
220
242
|
// packages/plugins/experimental/plugin-automation/src/components/ServiceRegistry/ServiceRegistry.tsx
|
|
221
|
-
import
|
|
243
|
+
import React3, { useMemo } from "react";
|
|
222
244
|
import { Filter } from "@dxos/client/echo";
|
|
223
245
|
import { useQuery } from "@dxos/react-client/echo";
|
|
224
|
-
import { Icon, Input as Input2, List, ListItem } from "@dxos/react-ui";
|
|
246
|
+
import { Icon as Icon2, Input as Input2, List, ListItem } from "@dxos/react-ui";
|
|
225
247
|
var ServiceRegistry = ({ space }) => {
|
|
226
248
|
const matchingServices = useServices(space);
|
|
227
249
|
const enabledServices = useQuery(space, Filter.schema(ServiceType));
|
|
@@ -238,9 +260,9 @@ var ServiceRegistry = ({ space }) => {
|
|
|
238
260
|
space.db.remove(service);
|
|
239
261
|
}
|
|
240
262
|
};
|
|
241
|
-
return /* @__PURE__ */
|
|
263
|
+
return /* @__PURE__ */ React3.createElement(List, {
|
|
242
264
|
classNames: "h-full grid auto-rows-[5rem] gap-2 p-2 pis-2 pie-2 overflow-y-auto scrollbar-thin"
|
|
243
|
-
}, services.map((service) => /* @__PURE__ */
|
|
265
|
+
}, services.map((service) => /* @__PURE__ */ React3.createElement(ServiceItem, {
|
|
244
266
|
key: service.serviceId,
|
|
245
267
|
service,
|
|
246
268
|
enabled: service.enabled,
|
|
@@ -248,38 +270,39 @@ var ServiceRegistry = ({ space }) => {
|
|
|
248
270
|
})));
|
|
249
271
|
};
|
|
250
272
|
var ServiceItem = ({ service, enabled, setEnabled }) => {
|
|
251
|
-
return /* @__PURE__ */
|
|
273
|
+
return /* @__PURE__ */ React3.createElement(ListItem.Root, {
|
|
252
274
|
classNames: "flex flex-col gap-1 p-1 overflow-hidden rounded-md border border-separator"
|
|
253
|
-
}, /* @__PURE__ */
|
|
275
|
+
}, /* @__PURE__ */ React3.createElement("div", {
|
|
254
276
|
className: "grid grid-cols-[40px_1fr_40px]"
|
|
255
|
-
}, /* @__PURE__ */
|
|
277
|
+
}, /* @__PURE__ */ React3.createElement("div", {
|
|
256
278
|
className: "flex gow justify-center items-center"
|
|
257
|
-
}, /* @__PURE__ */
|
|
279
|
+
}, /* @__PURE__ */ React3.createElement(Icon2, {
|
|
258
280
|
icon: categoryIcons[service.category ?? "default"] ?? "ph--placeholder--regular",
|
|
259
281
|
size: 6
|
|
260
|
-
})), /* @__PURE__ */
|
|
282
|
+
})), /* @__PURE__ */ React3.createElement("div", {
|
|
261
283
|
className: "grow items-center truncate mie-2"
|
|
262
|
-
}, service.name), /* @__PURE__ */
|
|
284
|
+
}, service.name), /* @__PURE__ */ React3.createElement("div", {
|
|
263
285
|
className: "flex gow justify-center items-center"
|
|
264
|
-
}, /* @__PURE__ */
|
|
286
|
+
}, /* @__PURE__ */ React3.createElement(Input2.Root, null, /* @__PURE__ */ React3.createElement(Input2.Switch, {
|
|
265
287
|
checked: enabled,
|
|
266
288
|
onClick: () => setEnabled?.(!enabled)
|
|
267
|
-
})))), /* @__PURE__ */
|
|
289
|
+
})))), /* @__PURE__ */ React3.createElement("div", {
|
|
268
290
|
className: "grid grid-cols-[40px_1fr]"
|
|
269
|
-
}, /* @__PURE__ */
|
|
291
|
+
}, /* @__PURE__ */ React3.createElement("div", null), /* @__PURE__ */ React3.createElement("div", {
|
|
270
292
|
className: "text-sm text-subdued line-clamp-2 mie-1"
|
|
271
293
|
}, service.description)));
|
|
272
294
|
};
|
|
273
295
|
|
|
274
296
|
// packages/plugins/experimental/plugin-automation/src/components/index.ts
|
|
275
297
|
import { lazy } from "react";
|
|
276
|
-
var AutomationPanel = lazy(() => import("./AutomationPanel-
|
|
277
|
-
var ChatContainer = lazy(() => import("./ChatContainer-
|
|
298
|
+
var AutomationPanel = lazy(() => import("./AutomationPanel-V3IWQAMO.mjs"));
|
|
299
|
+
var ChatContainer = lazy(() => import("./ChatContainer-CNTY3C2D.mjs"));
|
|
278
300
|
|
|
279
301
|
export {
|
|
302
|
+
AmbientChatDialog,
|
|
280
303
|
PromptEditor,
|
|
281
304
|
ServiceRegistry,
|
|
282
305
|
AutomationPanel,
|
|
283
306
|
ChatContainer
|
|
284
307
|
};
|
|
285
|
-
//# sourceMappingURL=chunk-
|
|
308
|
+
//# sourceMappingURL=chunk-ZLIAMW45.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/AmbientChatDialog/AmbientChatDialog.tsx", "../../../src/components/PromptEditor/PromptEditor.tsx", "../../../src/components/PromptEditor/prompt-extension.ts", "../../../src/components/ServiceRegistry/ServiceRegistry.tsx", "../../../src/components/index.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Dialog, Icon, useTranslation } from '@dxos/react-ui';\n\nimport { AUTOMATION_PLUGIN } from '../../meta';\n\nconst preventDefault = (event: Event) => event.preventDefault();\n\nexport const AmbientChatDialog = () => {\n const { t } = useTranslation(AUTOMATION_PLUGIN);\n return (\n <div role='none' className='dx-dialog__overlay bg-transparent pointer-events-none' data-block-align='end'>\n <Dialog.Content onInteractOutside={preventDefault} classNames='pointer-events-auto' inOverlayLayout>\n <Dialog.Title classNames='sr-only'>{t('ambient chat dialog title')}</Dialog.Title>\n <Dialog.Close>\n <Icon icon='ph--x--regular' size={4} />\n </Dialog.Close>\n <h1>Hello</h1>\n </Dialog.Content>\n </div>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Schema as S } from '@effect/schema';\nimport React, { useEffect } from 'react';\n\nimport { createDocAccessor } from '@dxos/react-client/echo';\nimport { Input, Select, useThemeContext, useTranslation } from '@dxos/react-ui';\nimport {\n createBasicExtensions,\n createDataExtensions,\n createThemeExtensions,\n useTextEditor,\n} from '@dxos/react-ui-editor';\nimport { attentionSurface, groupBorder, mx } from '@dxos/react-ui-theme';\nimport { nonNullable } from '@dxos/util';\n\nimport { nameRegex, promptExtension } from './prompt-extension';\nimport { AUTOMATION_PLUGIN } from '../../meta';\nimport { type ChainInput, ChainInputType, type ChainPromptType } from '../../types';\n\nconst inputTypes = [\n {\n value: ChainInputType.VALUE,\n label: 'Value',\n },\n {\n value: ChainInputType.PASS_THROUGH,\n label: 'Pass through',\n },\n {\n value: ChainInputType.RETRIEVER,\n label: 'Retriever',\n },\n // {\n // value: ChainInputType.FUNCTION,\n // label: 'Function',\n // },\n // {\n // value: ChainInputType.QUERY,\n // label: 'Query',\n // },\n {\n value: ChainInputType.RESOLVER,\n label: 'Resolver',\n },\n {\n value: ChainInputType.CONTEXT,\n label: 'Context',\n },\n {\n value: ChainInputType.SCHEMA,\n label: 'Schema',\n },\n];\n\nconst getInputType = (type: string) => inputTypes.find(({ value }) => String(value) === type)?.value;\n\nconst usePromptInputs = (prompt: ChainPromptType) => {\n useEffect(() => {\n const text = prompt.template ?? '';\n if (!prompt.inputs) {\n prompt.inputs = []; // TODO(burdon): Required?\n }\n\n const regex = new RegExp(nameRegex, 'g');\n const variables = new Set<string>([...text.matchAll(regex)].map((m) => m[1]));\n\n // Create map of unclaimed inputs.\n const unclaimed = new Map<string, ChainInput>(\n prompt.inputs?.filter(nonNullable).map((input) => [input.name, input]),\n );\n const missing: string[] = [];\n Array.from(variables.values()).forEach((name) => {\n if (unclaimed.has(name)) {\n unclaimed.delete(name);\n } else {\n missing.push(name);\n }\n });\n\n // Match or create new inputs.\n const values = unclaimed.values();\n missing.forEach((name) => {\n const next = values.next().value;\n if (next) {\n next.name = name;\n } else {\n prompt.inputs?.push({ name });\n }\n });\n\n // Remove unclaimed (deleted) inputs.\n // TODO(burdon): If user types incorrect name value, it will be deleted. Garbage collect?\n for (const input of values) {\n prompt.inputs.splice(prompt.inputs.indexOf(input), 1);\n }\n }, [prompt.template]);\n};\n\nexport type PromptEditorProps = {\n prompt: ChainPromptType;\n commandEditable?: boolean;\n schema?: S.Schema<any, any, any>;\n};\n\nexport const PromptEditor = ({ prompt, commandEditable = true }: PromptEditorProps) => {\n const { t } = useTranslation(AUTOMATION_PLUGIN);\n const { themeMode } = useThemeContext();\n\n const { parentRef } = useTextEditor(\n () => ({\n initialValue: prompt.template,\n extensions: [\n createDataExtensions({\n id: prompt.id,\n text: prompt.template !== undefined ? createDocAccessor(prompt, ['template']) : undefined,\n }),\n createBasicExtensions({\n bracketMatching: false,\n lineWrapping: true,\n placeholder: t('template placeholder'),\n }),\n createThemeExtensions({\n themeMode,\n slots: {\n content: { className: '!p-3' },\n },\n }),\n promptExtension,\n ],\n }),\n [themeMode, prompt],\n );\n\n usePromptInputs(prompt);\n\n return (\n <div className={mx('flex flex-col w-full overflow-hidden gap-4', groupBorder)}>\n {commandEditable && (\n <div className='flex items-center pl-4'>\n <span className='text-neutral-500'>/</span>\n <Input.Root>\n <Input.TextInput\n placeholder={t('command placeholder')}\n classNames={mx('is-full bg-transparent m-2')}\n value={prompt.command ?? ''}\n onChange={(event) => {\n prompt.command = event.target.value.replace(/\\w/g, '');\n }}\n />\n </Input.Root>\n </div>\n )}\n\n <div ref={parentRef} className={mx(attentionSurface, 'rounded', 'min-h-[120px]')} />\n\n {(prompt.inputs?.length ?? 0) > 0 && (\n <div className='flex flex-col'>\n {/* TODO(zan): Improve layout with grid */}\n <table className='w-full table-fixed border-collapse my-2'>\n <tbody>\n {prompt.inputs?.filter(nonNullable).map((input) => (\n <tr key={input.name}>\n <td className='w-[160px] p-1 font-mono text-sm whitespace-nowrap truncate'>\n <code className='px-2'>{input.name}</code>\n </td>\n <td className='w-[120px] p-1'>\n <Input.Root>\n <Select.Root\n value={String(input.type)}\n onValueChange={(type) => {\n input.type = getInputType(type) ?? ChainInputType.VALUE;\n }}\n >\n <Select.TriggerButton placeholder='Type' classNames='is-full' />\n <Select.Portal>\n <Select.Content>\n <Select.Viewport>\n {inputTypes.map(({ value, label }) => (\n <Select.Option key={value} value={String(value)}>\n {label}\n </Select.Option>\n ))}\n </Select.Viewport>\n </Select.Content>\n </Select.Portal>\n </Select.Root>\n </Input.Root>\n </td>\n <td className='p-1 pr-2'>\n {input.type !== undefined &&\n [\n ChainInputType.VALUE,\n ChainInputType.CONTEXT,\n ChainInputType.RESOLVER,\n ChainInputType.SCHEMA,\n ].includes(input.type) && (\n <div>\n <Input.Root>\n <Input.TextInput\n placeholder={t('command placeholder')}\n classNames={mx('is-full bg-transparent')}\n value={input.value ?? ''}\n onChange={(event) => {\n input.value = event.target.value;\n }}\n />\n </Input.Root>\n </div>\n )}\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n )}\n </div>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { HighlightStyle, StreamLanguage, syntaxHighlighting } from '@codemirror/language';\nimport { type Extension } from '@codemirror/state';\n\nimport { tags } from '@dxos/react-ui-editor';\nimport { mx } from '@dxos/react-ui-theme';\n\nexport const nameRegex = /\\{([\\w-]+)}/;\n\nconst parser = StreamLanguage.define({\n token: (stream) => {\n if (stream.eatSpace()) {\n return null;\n }\n if (stream.match(/^#.*/)) {\n return 'lineComment';\n }\n if (stream.match(/^-+$/)) {\n return 'lineComment';\n }\n if (stream.match(nameRegex)) {\n return 'variableName';\n }\n stream.next();\n return null;\n },\n});\n\n/**\n * https://codemirror.net/examples/styling\n * https://lezer.codemirror.net/docs/ref/#highlight\n */\nconst highlightStyles = HighlightStyle.define([\n {\n tag: tags.variableName,\n class: mx('rounded border border-yellow-500 bg-yellow-100 text-black font-mono text-sm'),\n },\n]);\n\nexport const promptExtension: Extension = [parser, syntaxHighlighting(highlightStyles)];\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useMemo } from 'react';\n\nimport { Filter, type Space } from '@dxos/client/echo';\nimport { useQuery } from '@dxos/react-client/echo';\nimport { Icon, Input, List, ListItem } from '@dxos/react-ui';\n\nimport { useServices } from '../../hooks';\nimport { categoryIcons, ServiceType } from '../../types';\n\n// TODO(burdon): Option to show all/enabled/filter.\nexport const ServiceRegistry = ({ space }: { space: Space }) => {\n const matchingServices = useServices(space);\n const enabledServices = useQuery(space, Filter.schema(ServiceType));\n\n // Join matching services with enabled services.\n const services = useMemo(() => {\n return matchingServices.map((service) => enabledServices.find((s) => s.serviceId === service.serviceId) ?? service);\n }, [matchingServices, enabledServices]);\n\n const handleSetEnabled = (service: ServiceType, enabled: boolean) => {\n if (enabled) {\n space.db.add(service);\n } else {\n // TODO(burdon): Remove or disable?\n space.db.remove(service);\n }\n };\n\n return (\n <List classNames='h-full grid auto-rows-[5rem] gap-2 p-2 pis-2 pie-2 overflow-y-auto scrollbar-thin'>\n {services.map((service) => (\n <ServiceItem\n key={service.serviceId}\n service={service}\n enabled={service.enabled}\n setEnabled={(enabled) => handleSetEnabled(service, enabled)}\n />\n ))}\n </List>\n );\n};\n\nconst ServiceItem = ({\n service,\n enabled,\n setEnabled,\n}: {\n service: ServiceType;\n enabled?: boolean;\n setEnabled?: (enabled: boolean) => void;\n}) => {\n return (\n <ListItem.Root classNames='flex flex-col gap-1 p-1 overflow-hidden rounded-md border border-separator'>\n <div className='grid grid-cols-[40px_1fr_40px]'>\n <div className='flex gow justify-center items-center'>\n <Icon icon={categoryIcons[service.category ?? 'default'] ?? 'ph--placeholder--regular'} size={6} />\n </div>\n <div className='grow items-center truncate mie-2'>{service.name}</div>\n <div className='flex gow justify-center items-center'>\n <Input.Root>\n <Input.Switch checked={enabled} onClick={() => setEnabled?.(!enabled)} />\n </Input.Root>\n </div>\n </div>\n <div className='grid grid-cols-[40px_1fr]'>\n <div />\n <div className='text-sm text-subdued line-clamp-2 mie-1'>{service.description}</div>\n </div>\n </ListItem.Root>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { lazy } from 'react';\n\nexport * from './AmbientChatDialog';\nexport * from './AutomationPanel';\nexport * from './ChatContainer';\nexport * from './MarkdownViewer';\nexport * from './PromptEditor';\nexport * from './ServiceRegistry';\nexport * from './Thread';\nexport * from './TriggerEditor';\n\nexport const AutomationPanel = lazy(() => import('./AutomationPanel'));\nexport const ChatContainer = lazy(() => import('./ChatContainer'));\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,QAAQC,MAAMC,sBAAsB;AAI7C,IAAMC,iBAAiB,CAACC,UAAiBA,MAAMD,eAAc;AAEtD,IAAME,oBAAoB,MAAA;AAC/B,QAAM,EAAEC,EAAC,IAAKC,eAAeC,iBAAAA;A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AACM,SAASC,MAAI;IAACL,YAAW;KACxB,gBAAAF,OAAA,cAACQ,OAAAA;IAAIC,WAAU;KACb,gBAAAT,OAAA,cAACQ,OAAAA;IAAIC,WAAU;KACb,gBAAAT,OAAA,cAACU,OAAAA;IAAKC,MAAMC,cAAcrB,QAAQsB,YAAY,SAAA,KAAc;IAA4BC,MAAM;OAEhG,gBAAAd,OAAA,cAACQ,OAAAA;IAAIC,WAAU;KAAoClB,QAAQwB,IAAI,GAC/D,gBAAAf,OAAA,cAACQ,OAAAA;IAAIC,WAAU;KACb,gBAAAT,OAAA,cAACgB,OAAMT,MAAI,MACT,gBAAAP,OAAA,cAACgB,OAAMC,QAAM;IAACC,SAAStB;IAASuB,SAAS,MAAMd,aAAa,CAACT,OAAAA;SAInE,gBAAAI,OAAA,cAACQ,OAAAA;IAAIC,WAAU;KACb,gBAAAT,OAAA,cAACQ,OAAAA,IAAAA,GACD,gBAAAR,OAAA,cAACQ,OAAAA;IAAIC,WAAU;KAA2ClB,QAAQ6B,WAAW,CAAA,CAAA;AAIrF;;;ACtEA,SAASC,YAAY;AAWd,IAAMC,kBAAkBC,KAAK,MAAM,OAAO,gCAAA,CAAA;AAC1C,IAAMC,gBAAgBD,KAAK,MAAM,OAAO,8BAAA,CAAA;",
|
|
6
|
+
"names": ["React", "Dialog", "Icon", "useTranslation", "preventDefault", "event", "AmbientChatDialog", "t", "useTranslation", "AUTOMATION_PLUGIN", "div", "role", "className", "data-block-align", "Dialog", "Content", "onInteractOutside", "classNames", "inOverlayLayout", "Title", "Close", "Icon", "icon", "size", "h1", "React", "useEffect", "createDocAccessor", "Input", "Select", "useThemeContext", "useTranslation", "createBasicExtensions", "createDataExtensions", "createThemeExtensions", "useTextEditor", "attentionSurface", "groupBorder", "mx", "nonNullable", "HighlightStyle", "StreamLanguage", "syntaxHighlighting", "tags", "mx", "nameRegex", "parser", "StreamLanguage", "define", "token", "stream", "eatSpace", "match", "next", "highlightStyles", "HighlightStyle", "tag", "tags", "variableName", "class", "mx", "promptExtension", "syntaxHighlighting", "inputTypes", "value", "ChainInputType", "VALUE", "label", "PASS_THROUGH", "RETRIEVER", "RESOLVER", "CONTEXT", "SCHEMA", "getInputType", "type", "find", "String", "usePromptInputs", "prompt", "useEffect", "text", "template", "inputs", "regex", "RegExp", "nameRegex", "variables", "Set", "matchAll", "map", "m", "unclaimed", "Map", "filter", "nonNullable", "input", "name", "missing", "Array", "from", "values", "forEach", "has", "delete", "push", "next", "splice", "indexOf", "PromptEditor", "commandEditable", "t", "useTranslation", "AUTOMATION_PLUGIN", "themeMode", "useThemeContext", "parentRef", "useTextEditor", "initialValue", "extensions", "createDataExtensions", "id", "undefined", "createDocAccessor", "createBasicExtensions", "bracketMatching", "lineWrapping", "placeholder", "createThemeExtensions", "slots", "content", "className", "promptExtension", "React", "div", "mx", "groupBorder", "span", "Input", "Root", "TextInput", "classNames", "command", "onChange", "event", "target", "replace", "ref", "attentionSurface", "length", "table", "tbody", "tr", "key", "td", "code", "Select", "onValueChange", "TriggerButton", "Portal", "Content", "Viewport", "Option", "includes", "React", "useMemo", "Filter", "useQuery", "Icon", "Input", "List", "ListItem", "ServiceRegistry", "space", "matchingServices", "useServices", "enabledServices", "useQuery", "Filter", "schema", "ServiceType", "services", "useMemo", "map", "service", "find", "s", "serviceId", "handleSetEnabled", "enabled", "db", "add", "remove", "React", "List", "classNames", "ServiceItem", "key", "setEnabled", "ListItem", "Root", "div", "className", "Icon", "icon", "categoryIcons", "category", "size", "name", "Input", "Switch", "checked", "onClick", "description", "lazy", "AutomationPanel", "lazy", "ChatContainer"]
|
|
7
|
+
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
|
+
AmbientChatDialog,
|
|
3
4
|
AutomationPanel,
|
|
4
5
|
ChatContainer,
|
|
5
6
|
PromptEditor,
|
|
6
7
|
ServiceRegistry
|
|
7
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZLIAMW45.mjs";
|
|
8
9
|
import {
|
|
9
10
|
TriggerEditor
|
|
10
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-6HLBYDUI.mjs";
|
|
11
12
|
import {
|
|
12
13
|
AiClient,
|
|
13
14
|
AppGraphBuilder,
|
|
@@ -15,8 +16,8 @@ import {
|
|
|
15
16
|
MarkdownViewer,
|
|
16
17
|
ReactSurface,
|
|
17
18
|
Thread
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
19
|
+
} from "./chunk-QP47VJT6.mjs";
|
|
20
|
+
import "./chunk-IJRTDSKN.mjs";
|
|
20
21
|
import {
|
|
21
22
|
AIChatType,
|
|
22
23
|
ApiAuthorization,
|
|
@@ -27,11 +28,12 @@ import {
|
|
|
27
28
|
ChainType,
|
|
28
29
|
ServiceType,
|
|
29
30
|
categoryIcons
|
|
30
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-DNCXRGAF.mjs";
|
|
31
32
|
import {
|
|
33
|
+
AMBIENT_CHAT_DIALOG,
|
|
32
34
|
AUTOMATION_PLUGIN,
|
|
33
35
|
meta
|
|
34
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-EMVA6QUT.mjs";
|
|
35
37
|
|
|
36
38
|
// packages/plugins/experimental/plugin-automation/src/AutomationPlugin.tsx
|
|
37
39
|
import { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from "@dxos/app-framework";
|
|
@@ -72,6 +74,7 @@ var translations_default = [
|
|
|
72
74
|
"trigger type websocket": "Websocket",
|
|
73
75
|
"trigger type subscription": "Subscription",
|
|
74
76
|
"trigger type email": "Email",
|
|
77
|
+
"trigger type queue": "Queue",
|
|
75
78
|
"trigger filter": "Filter",
|
|
76
79
|
"trigger cron": "Cron",
|
|
77
80
|
"trigger method": "Method",
|
|
@@ -88,11 +91,6 @@ var translations_default = [
|
|
|
88
91
|
|
|
89
92
|
// packages/plugins/experimental/plugin-automation/src/AutomationPlugin.tsx
|
|
90
93
|
var AutomationPlugin = () => definePlugin(meta, [
|
|
91
|
-
defineModule({
|
|
92
|
-
id: `${meta.id}/module/ai-client`,
|
|
93
|
-
activatesOn: ClientEvents.ClientReady,
|
|
94
|
-
activate: AiClient
|
|
95
|
-
}),
|
|
96
94
|
defineModule({
|
|
97
95
|
id: `${meta.id}/module/translations`,
|
|
98
96
|
activatesOn: Events.SetupTranslations,
|
|
@@ -186,6 +184,11 @@ var AutomationPlugin = () => definePlugin(meta, [
|
|
|
186
184
|
id: `${meta.id}/module/intent-resolver`,
|
|
187
185
|
activatesOn: Events.SetupIntents,
|
|
188
186
|
activate: IntentResolver
|
|
187
|
+
}),
|
|
188
|
+
defineModule({
|
|
189
|
+
id: `${meta.id}/module/ai-client`,
|
|
190
|
+
activatesOn: ClientEvents.ClientReady,
|
|
191
|
+
activate: AiClient
|
|
189
192
|
})
|
|
190
193
|
]);
|
|
191
194
|
|
|
@@ -408,7 +411,9 @@ var chainPresets = [
|
|
|
408
411
|
];
|
|
409
412
|
export {
|
|
410
413
|
AIChatType,
|
|
414
|
+
AMBIENT_CHAT_DIALOG,
|
|
411
415
|
AUTOMATION_PLUGIN,
|
|
416
|
+
AmbientChatDialog,
|
|
412
417
|
ApiAuthorization,
|
|
413
418
|
AutomationAction,
|
|
414
419
|
AutomationPanel,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/AutomationPlugin.tsx", "../../../src/translations.ts", "../../../src/presets.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from '@dxos/app-framework';\nimport { FunctionTrigger } from '@dxos/functions';\nimport { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';\nimport { DeckCapabilities } from '@dxos/plugin-deck';\nimport { RefArray } from '@dxos/react-client/echo';\n\nimport { AiClient, AppGraphBuilder, IntentResolver, ReactSurface } from './capabilities';\nimport { AUTOMATION_PLUGIN, meta } from './meta';\nimport translations from './translations';\nimport { AutomationAction, ChainPromptType, ChainType, AIChatType, ServiceType } from './types';\n\n// TODO(wittjosiah): Rename to AssistantPlugin?\nexport const AutomationPlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/ai-client`,\n activatesOn: ClientEvents.ClientReady,\n activate: AiClient,\n }),\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/metadata`,\n activatesOn: Events.SetupMetadata,\n activate: () => [\n contributes(Capabilities.Metadata, {\n id: ChainType.typename,\n metadata: {\n placeholder: ['object placeholder', { ns: AUTOMATION_PLUGIN }],\n icon: 'ph--magic-wand--regular',\n // TODO(wittjosiah): Move out of metadata.\n loadReferences: async (chain: ChainType) => await RefArray.loadAll(chain.prompts ?? []),\n },\n }),\n contributes(Capabilities.Metadata, {\n id: AIChatType.typename,\n metadata: {\n createObject: (props: { name?: string }) => createIntent(AutomationAction.Create, props),\n placeholder: ['object placeholder', { ns: AUTOMATION_PLUGIN }],\n icon: 'ph--atom--regular',\n },\n }),\n ],\n }),\n defineModule({\n id: `${meta.id}/module/schema`,\n activatesOn: ClientEvents.SetupSchema,\n activate: () => [\n contributes(ClientCapabilities.SystemSchema, [ChainType, ChainPromptType, FunctionTrigger, ServiceType]),\n contributes(ClientCapabilities.Schema, [AIChatType]),\n ],\n }),\n defineModule({\n id: `${meta.id}/module/complementary-panels`,\n activatesOn: Events.Startup,\n activate: () => [\n contributes(DeckCapabilities.ComplementaryPanel, {\n id: 'service-registry',\n label: ['service registry label', { ns: AUTOMATION_PLUGIN }],\n icon: 'ph--plugs--regular',\n }),\n contributes(DeckCapabilities.ComplementaryPanel, {\n id: 'automation',\n label: ['automation panel label', { ns: AUTOMATION_PLUGIN }],\n icon: 'ph--magic-wand--regular',\n }),\n ],\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.SetupSurfaces,\n activate: ReactSurface,\n }),\n defineModule({\n id: `${meta.id}/module/app-graph-builder`,\n activatesOn: Events.SetupAppGraph,\n activate: AppGraphBuilder,\n }),\n defineModule({\n id: `${meta.id}/module/intent-resolver`,\n activatesOn: Events.SetupIntents,\n activate: IntentResolver,\n }),\n ]);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { AUTOMATION_PLUGIN } from './meta';\nimport { AIChatType } from './types';\n\nexport default [\n {\n 'en-US': {\n [AIChatType.typename]: {\n 'typename label': 'AI Chat',\n },\n [AUTOMATION_PLUGIN]: {\n 'plugin name': 'Automation',\n 'object placeholder': 'New prompt',\n 'create object label': 'Create prompt',\n 'create trigger label': 'Create trigger',\n 'create stack section label': 'Create prompt',\n 'command placeholder': 'Enter slash command...',\n 'template placeholder': 'Enter template...',\n 'value placeholder': 'Enter value...',\n 'select preset template placeholder': 'Select preset',\n 'open automation panel label': 'Show Automations',\n 'automation panel label': 'Automations',\n 'service registry label': 'Service Registry',\n\n 'chat input placeholder': 'Ask a question...',\n 'chat stop': 'Cancel request.',\n\n 'function select label': 'Function',\n 'function select placeholder': 'Select function',\n 'function enabled': 'Enabled',\n\n 'trigger select label': 'Trigger',\n 'trigger select placeholder': 'Trigger type',\n\n 'trigger type timer': 'Timer',\n 'trigger type webhook': 'Webhook',\n 'trigger type websocket': 'Websocket',\n 'trigger type subscription': 'Subscription',\n 'trigger type email': 'Email',\n\n 'trigger filter': 'Filter',\n 'trigger cron': 'Cron',\n 'trigger method': 'Method',\n 'trigger endpoint': 'Endpoint',\n\n 'trigger copy url': 'Copy URL',\n 'trigger copy email': 'Copy Email',\n\n 'trigger meta add': 'Add',\n 'trigger meta remove': 'Remove',\n 'trigger meta prop name placeholder': 'New meta property name',\n },\n },\n },\n];\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { create } from '@dxos/live-object';\n\nimport { ChainInputType, ChainPromptType } from './types';\n\nexport const str = (...text: (string | undefined | boolean)[]): string =>\n text\n .filter((value) => value !== undefined && value !== false)\n .flat()\n .join('\\n');\n\nexport type Preset = {\n id: string;\n title: string;\n createPrompt: () => ChainPromptType;\n};\n\nexport const chainPresets: Preset[] = [\n {\n id: 'dxos.org/prompt/translate',\n title: 'Translate',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'say',\n template: str(\n // prettier-ignore\n 'Translate the following into {language}:',\n '',\n '---',\n '',\n '{input}',\n ),\n inputs: [\n {\n type: ChainInputType.VALUE,\n name: 'language',\n value: 'japanese',\n },\n {\n type: ChainInputType.PASS_THROUGH,\n name: 'input',\n },\n // TODO(burdon): Message.\n // {\n // type: ChainInputType.CONTEXT,\n // name: 'input',\n // value: 'object.text',\n // },\n ],\n }),\n },\n {\n id: 'dxos.org/prompt/chess',\n title: 'Chess',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'hint',\n template: str(\n // prettier-ignore\n 'You are a machine that is an expert chess player.',\n '',\n 'The move history of the current game is: {history}',\n '',\n 'Suggest the next move and very briefly explain your strategy in a couple of sentences.',\n ),\n inputs: [\n {\n type: ChainInputType.CONTEXT,\n name: 'history',\n value: 'object.pgn',\n },\n ],\n }),\n },\n {\n id: 'dxos.org/prompt/mermaid',\n title: 'Mermaid',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'draw',\n template: str(\n // prettier-ignore\n 'Create a simplified mermaid graph representing the text below.',\n 'Do not explain anything.',\n '',\n '---',\n '',\n '{input}',\n ),\n inputs: [\n {\n type: ChainInputType.PASS_THROUGH,\n name: 'input',\n },\n ],\n }),\n },\n {\n id: 'dxos.org/prompt/list',\n title: 'List',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'list',\n template: str(\n // prettier-ignore\n 'You are a machine that only replies with valid, iterable RFC8259 compliant JSON in your responses.',\n 'Your entire response should be a single array of JSON objects.',\n '',\n 'Your entire response should be a map where the key is the type and the value is a single array of JSON objects conforming to the following types:',\n '',\n '{schema}',\n '',\n '---',\n '',\n '{question}',\n ),\n inputs: [\n {\n type: ChainInputType.SCHEMA,\n name: 'schema',\n value: 'example.com/type/project',\n },\n {\n type: ChainInputType.PASS_THROUGH,\n name: 'question',\n },\n ],\n }),\n },\n {\n id: 'dxos.org/prompt/base',\n title: 'RAG',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'rag',\n template: str(\n // prettier-ignore\n \"Very briefly answer the question based only on the following context and say if you don't know the answer.\",\n // 'answer the question using the following context as well as your training data:',\n '',\n '{context}',\n '',\n '---',\n '',\n 'question: {question}',\n ),\n inputs: [\n {\n type: ChainInputType.RETRIEVER,\n name: 'context',\n },\n {\n type: ChainInputType.CONTEXT,\n name: 'question',\n value: 'object.text',\n },\n ],\n }),\n },\n {\n id: 'dxos.org/prompt/lookup',\n title: 'Lookup',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'lookup',\n template: str(\n // prettier-ignore\n 'Lookup and very briefly summarize the following topic in one or two sentences:',\n '',\n '---',\n '',\n '{input}',\n ),\n inputs: [\n {\n type: ChainInputType.CONTEXT,\n name: 'input',\n value: 'text',\n },\n ],\n }),\n },\n {\n id: 'dxos.org/prompt/extract',\n title: 'Extract',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'extract',\n template: str(\n // prettier-ignore\n 'List all people and companies mentioned in the text below.',\n '',\n 'You are a machine that only replies with valid, iterable RFC8259 compliant JSON in your responses.',\n 'Your entire response should be a map where the key is the type and the value is a single array of JSON objects conforming to the following types:',\n '',\n '{contact}',\n '{company}',\n '',\n '---',\n '',\n '{input}',\n ),\n inputs: [\n {\n type: ChainInputType.SCHEMA,\n name: 'contact',\n value: 'example.com/type/contact',\n },\n {\n type: ChainInputType.SCHEMA,\n name: 'company',\n value: 'example.com/type/organization',\n },\n {\n type: ChainInputType.CONTEXT,\n name: 'input',\n value: 'text',\n },\n ],\n }),\n },\n {\n id: 'dxos.org/prompt/discord',\n title: 'Summarize',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'summarize',\n template: str(\n // prettier-ignore\n 'Summarize what the team is working on and format it as a markdown table without any explanation.',\n '',\n '---',\n '',\n '{context}',\n ),\n inputs: [\n {\n type: ChainInputType.RESOLVER,\n name: 'context',\n value: 'discord.messages.recent',\n },\n ],\n }),\n },\n];\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["Capabilities", "contributes", "createIntent", "defineModule", "definePlugin", "Events", "FunctionTrigger", "ClientCapabilities", "ClientEvents", "DeckCapabilities", "RefArray", "AIChatType", "typename", "AUTOMATION_PLUGIN", "AutomationPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from '@dxos/app-framework';\nimport { FunctionTrigger } from '@dxos/functions';\nimport { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';\nimport { DeckCapabilities } from '@dxos/plugin-deck';\nimport { RefArray } from '@dxos/react-client/echo';\n\nimport { AiClient, AppGraphBuilder, IntentResolver, ReactSurface } from './capabilities';\nimport { AUTOMATION_PLUGIN, meta } from './meta';\nimport translations from './translations';\nimport { AutomationAction, ChainPromptType, ChainType, AIChatType, ServiceType } from './types';\n\n// TODO(wittjosiah): Rename to AssistantPlugin?\nexport const AutomationPlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/metadata`,\n activatesOn: Events.SetupMetadata,\n activate: () => [\n contributes(Capabilities.Metadata, {\n id: ChainType.typename,\n metadata: {\n placeholder: ['object placeholder', { ns: AUTOMATION_PLUGIN }],\n icon: 'ph--magic-wand--regular',\n // TODO(wittjosiah): Move out of metadata.\n loadReferences: async (chain: ChainType) => await RefArray.loadAll(chain.prompts ?? []),\n },\n }),\n contributes(Capabilities.Metadata, {\n id: AIChatType.typename,\n metadata: {\n createObject: (props: { name?: string }) => createIntent(AutomationAction.Create, props),\n placeholder: ['object placeholder', { ns: AUTOMATION_PLUGIN }],\n icon: 'ph--atom--regular',\n },\n }),\n ],\n }),\n defineModule({\n id: `${meta.id}/module/schema`,\n activatesOn: ClientEvents.SetupSchema,\n activate: () => [\n contributes(ClientCapabilities.SystemSchema, [ChainType, ChainPromptType, FunctionTrigger, ServiceType]),\n contributes(ClientCapabilities.Schema, [AIChatType]),\n ],\n }),\n defineModule({\n id: `${meta.id}/module/complementary-panels`,\n activatesOn: Events.Startup,\n activate: () => [\n contributes(DeckCapabilities.ComplementaryPanel, {\n id: 'service-registry',\n label: ['service registry label', { ns: AUTOMATION_PLUGIN }],\n icon: 'ph--plugs--regular',\n }),\n contributes(DeckCapabilities.ComplementaryPanel, {\n id: 'automation',\n label: ['automation panel label', { ns: AUTOMATION_PLUGIN }],\n icon: 'ph--magic-wand--regular',\n }),\n ],\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.SetupSurfaces,\n activate: ReactSurface,\n }),\n defineModule({\n id: `${meta.id}/module/app-graph-builder`,\n activatesOn: Events.SetupAppGraph,\n activate: AppGraphBuilder,\n }),\n defineModule({\n id: `${meta.id}/module/intent-resolver`,\n activatesOn: Events.SetupIntents,\n activate: IntentResolver,\n }),\n defineModule({\n id: `${meta.id}/module/ai-client`,\n activatesOn: ClientEvents.ClientReady,\n activate: AiClient,\n }),\n ]);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { AUTOMATION_PLUGIN } from './meta';\nimport { AIChatType } from './types';\n\nexport default [\n {\n 'en-US': {\n [AIChatType.typename]: {\n 'typename label': 'AI Chat',\n },\n [AUTOMATION_PLUGIN]: {\n 'plugin name': 'Automation',\n 'object placeholder': 'New prompt',\n 'create object label': 'Create prompt',\n 'create trigger label': 'Create trigger',\n 'create stack section label': 'Create prompt',\n 'command placeholder': 'Enter slash command...',\n 'template placeholder': 'Enter template...',\n 'value placeholder': 'Enter value...',\n 'select preset template placeholder': 'Select preset',\n 'open automation panel label': 'Show Automations',\n 'automation panel label': 'Automations',\n 'service registry label': 'Service Registry',\n\n 'chat input placeholder': 'Ask a question...',\n 'chat stop': 'Cancel request.',\n\n 'function select label': 'Function',\n 'function select placeholder': 'Select function',\n 'function enabled': 'Enabled',\n\n 'trigger select label': 'Trigger',\n 'trigger select placeholder': 'Trigger type',\n\n 'trigger type timer': 'Timer',\n 'trigger type webhook': 'Webhook',\n 'trigger type websocket': 'Websocket',\n 'trigger type subscription': 'Subscription',\n 'trigger type email': 'Email',\n 'trigger type queue': 'Queue',\n\n 'trigger filter': 'Filter',\n 'trigger cron': 'Cron',\n 'trigger method': 'Method',\n 'trigger endpoint': 'Endpoint',\n\n 'trigger copy url': 'Copy URL',\n 'trigger copy email': 'Copy Email',\n\n 'trigger meta add': 'Add',\n 'trigger meta remove': 'Remove',\n 'trigger meta prop name placeholder': 'New meta property name',\n },\n },\n },\n];\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { create } from '@dxos/live-object';\n\nimport { ChainInputType, ChainPromptType } from './types';\n\nexport const str = (...text: (string | undefined | boolean)[]): string =>\n text\n .filter((value) => value !== undefined && value !== false)\n .flat()\n .join('\\n');\n\nexport type Preset = {\n id: string;\n title: string;\n createPrompt: () => ChainPromptType;\n};\n\nexport const chainPresets: Preset[] = [\n {\n id: 'dxos.org/prompt/translate',\n title: 'Translate',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'say',\n template: str(\n // prettier-ignore\n 'Translate the following into {language}:',\n '',\n '---',\n '',\n '{input}',\n ),\n inputs: [\n {\n type: ChainInputType.VALUE,\n name: 'language',\n value: 'japanese',\n },\n {\n type: ChainInputType.PASS_THROUGH,\n name: 'input',\n },\n // TODO(burdon): Message.\n // {\n // type: ChainInputType.CONTEXT,\n // name: 'input',\n // value: 'object.text',\n // },\n ],\n }),\n },\n {\n id: 'dxos.org/prompt/chess',\n title: 'Chess',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'hint',\n template: str(\n // prettier-ignore\n 'You are a machine that is an expert chess player.',\n '',\n 'The move history of the current game is: {history}',\n '',\n 'Suggest the next move and very briefly explain your strategy in a couple of sentences.',\n ),\n inputs: [\n {\n type: ChainInputType.CONTEXT,\n name: 'history',\n value: 'object.pgn',\n },\n ],\n }),\n },\n {\n id: 'dxos.org/prompt/mermaid',\n title: 'Mermaid',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'draw',\n template: str(\n // prettier-ignore\n 'Create a simplified mermaid graph representing the text below.',\n 'Do not explain anything.',\n '',\n '---',\n '',\n '{input}',\n ),\n inputs: [\n {\n type: ChainInputType.PASS_THROUGH,\n name: 'input',\n },\n ],\n }),\n },\n {\n id: 'dxos.org/prompt/list',\n title: 'List',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'list',\n template: str(\n // prettier-ignore\n 'You are a machine that only replies with valid, iterable RFC8259 compliant JSON in your responses.',\n 'Your entire response should be a single array of JSON objects.',\n '',\n 'Your entire response should be a map where the key is the type and the value is a single array of JSON objects conforming to the following types:',\n '',\n '{schema}',\n '',\n '---',\n '',\n '{question}',\n ),\n inputs: [\n {\n type: ChainInputType.SCHEMA,\n name: 'schema',\n value: 'example.com/type/project',\n },\n {\n type: ChainInputType.PASS_THROUGH,\n name: 'question',\n },\n ],\n }),\n },\n {\n id: 'dxos.org/prompt/base',\n title: 'RAG',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'rag',\n template: str(\n // prettier-ignore\n \"Very briefly answer the question based only on the following context and say if you don't know the answer.\",\n // 'answer the question using the following context as well as your training data:',\n '',\n '{context}',\n '',\n '---',\n '',\n 'question: {question}',\n ),\n inputs: [\n {\n type: ChainInputType.RETRIEVER,\n name: 'context',\n },\n {\n type: ChainInputType.CONTEXT,\n name: 'question',\n value: 'object.text',\n },\n ],\n }),\n },\n {\n id: 'dxos.org/prompt/lookup',\n title: 'Lookup',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'lookup',\n template: str(\n // prettier-ignore\n 'Lookup and very briefly summarize the following topic in one or two sentences:',\n '',\n '---',\n '',\n '{input}',\n ),\n inputs: [\n {\n type: ChainInputType.CONTEXT,\n name: 'input',\n value: 'text',\n },\n ],\n }),\n },\n {\n id: 'dxos.org/prompt/extract',\n title: 'Extract',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'extract',\n template: str(\n // prettier-ignore\n 'List all people and companies mentioned in the text below.',\n '',\n 'You are a machine that only replies with valid, iterable RFC8259 compliant JSON in your responses.',\n 'Your entire response should be a map where the key is the type and the value is a single array of JSON objects conforming to the following types:',\n '',\n '{contact}',\n '{company}',\n '',\n '---',\n '',\n '{input}',\n ),\n inputs: [\n {\n type: ChainInputType.SCHEMA,\n name: 'contact',\n value: 'example.com/type/contact',\n },\n {\n type: ChainInputType.SCHEMA,\n name: 'company',\n value: 'example.com/type/organization',\n },\n {\n type: ChainInputType.CONTEXT,\n name: 'input',\n value: 'text',\n },\n ],\n }),\n },\n {\n id: 'dxos.org/prompt/discord',\n title: 'Summarize',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'summarize',\n template: str(\n // prettier-ignore\n 'Summarize what the team is working on and format it as a markdown table without any explanation.',\n '',\n '---',\n '',\n '{context}',\n ),\n inputs: [\n {\n type: ChainInputType.RESOLVER,\n name: 'context',\n value: 'discord.messages.recent',\n },\n ],\n }),\n },\n];\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,SAASA,cAAcC,aAAaC,cAAcC,cAAcC,cAAcC,cAAc;AAC5F,SAASC,uBAAuB;AAChC,SAASC,oBAAoBC,oBAAoB;AACjD,SAASC,wBAAwB;AACjC,SAASC,gBAAgB;;;ACDzB,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACC,WAAWC,QAAQ,GAAG;QACrB,kBAAkB;MACpB;MACA,CAACC,iBAAAA,GAAoB;QACnB,eAAe;QACf,sBAAsB;QACtB,uBAAuB;QACvB,wBAAwB;QACx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J;EACA;IACEK,IAAI;IACJC,OAAO;IACPC,cAAc,MACZC,OAAOC,iBAAiB;MACtBC,SAAS;MACTC,UAAUd;;QAER;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;MAAA;MAEFe,QAAQ;QACN;UACEC,MAAMC,eAAeK;UACrBH,MAAM;UACNhB,OAAO;QACT;QACA;UACEa,MAAMC,eAAeK;UACrBH,MAAM;UACNhB,OAAO;QACT;QACA;UACEa,MAAMC,eAAeI;UACrBF,MAAM;UACNhB,OAAO;QACT;;IAEJ,CAAA;EACJ;EACA;IACEK,IAAI;IACJC,OAAO;IACPC,cAAc,MACZC,OAAOC,iBAAiB;MACtBC,SAAS;MACTC,UAAUd;;QAER;QACA;QACA;QACA;QACA;MAAA;MAEFe,QAAQ;QACN;UACEC,MAAMC,eAAeO;UACrBL,MAAM;UACNhB,OAAO;QACT;;IAEJ,CAAA;EACJ;;",
|
|
6
|
+
"names": ["Capabilities", "contributes", "createIntent", "defineModule", "definePlugin", "Events", "FunctionTrigger", "ClientCapabilities", "ClientEvents", "DeckCapabilities", "RefArray", "AIChatType", "typename", "AUTOMATION_PLUGIN", "AutomationPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "SetupMetadata", "Metadata", "ChainType", "typename", "metadata", "placeholder", "ns", "AUTOMATION_PLUGIN", "icon", "loadReferences", "chain", "RefArray", "loadAll", "prompts", "AIChatType", "createObject", "props", "createIntent", "AutomationAction", "Create", "ClientEvents", "SetupSchema", "ClientCapabilities", "SystemSchema", "ChainPromptType", "FunctionTrigger", "ServiceType", "Schema", "Startup", "DeckCapabilities", "ComplementaryPanel", "label", "SetupSurfaces", "ReactSurface", "SetupAppGraph", "AppGraphBuilder", "SetupIntents", "IntentResolver", "ClientReady", "AiClient", "create", "str", "text", "filter", "value", "undefined", "flat", "join", "chainPresets", "id", "title", "createPrompt", "create", "ChainPromptType", "command", "template", "inputs", "type", "ChainInputType", "VALUE", "name", "PASS_THROUGH", "CONTEXT", "SCHEMA", "RETRIEVER", "RESOLVER"]
|
|
7
7
|
}
|
|
@@ -2,8 +2,8 @@ import { createRequire } from 'node:module';const require = createRequire(import
|
|
|
2
2
|
import {
|
|
3
3
|
AIChatType,
|
|
4
4
|
AutomationAction
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-DNCXRGAF.mjs";
|
|
6
|
+
import "./chunk-EMVA6QUT.mjs";
|
|
7
7
|
|
|
8
8
|
// packages/plugins/experimental/plugin-automation/src/capabilities/intent-resolver.ts
|
|
9
9
|
import { Capabilities, contributes, createResolver } from "@dxos/app-framework";
|
|
@@ -27,4 +27,4 @@ var intent_resolver_default = () => contributes(Capabilities.IntentResolver, cre
|
|
|
27
27
|
export {
|
|
28
28
|
intent_resolver_default as default
|
|
29
29
|
};
|
|
30
|
-
//# sourceMappingURL=intent-resolver-
|
|
30
|
+
//# sourceMappingURL=intent-resolver-DCP4ZDBA.mjs.map
|