@dxos/plugin-assistant 0.8.2-main.5ca3450 → 0.8.2-main.600d381
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/{AssistantDialog-NWOABDST.mjs → AssistantDialog-BUHPFIHN.mjs} +2 -2
- package/dist/lib/browser/{ChatContainer-FTPJJSTK.mjs → ChatContainer-X7JBCLFK.mjs} +2 -2
- package/dist/lib/browser/{app-graph-builder-J5ISIFTE.mjs → app-graph-builder-JJCBQZGC.mjs} +3 -3
- package/dist/lib/browser/{app-graph-builder-J5ISIFTE.mjs.map → app-graph-builder-JJCBQZGC.mjs.map} +1 -1
- package/dist/lib/browser/{chunk-HNXMUBW2.mjs → chunk-PFIXSSN2.mjs} +3 -3
- package/dist/lib/browser/{chunk-QDMVFPHJ.mjs → chunk-QGZETTI3.mjs} +12 -13
- package/dist/lib/browser/chunk-QGZETTI3.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +2 -2
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-RGQ6O3Y5.mjs → react-surface-JSHNKGXY.mjs} +3 -3
- package/dist/lib/node/{AssistantDialog-XK7NZLCM.cjs → AssistantDialog-XIAFCAGB.cjs} +6 -6
- package/dist/lib/node/{ChatContainer-2VI43SOE.cjs → ChatContainer-MAGI5QD6.cjs} +6 -6
- package/dist/lib/node/{app-graph-builder-BBNLIGYJ.cjs → app-graph-builder-7EJJHBRH.cjs} +6 -6
- package/dist/lib/node/{app-graph-builder-BBNLIGYJ.cjs.map → app-graph-builder-7EJJHBRH.cjs.map} +1 -1
- package/dist/lib/node/{chunk-EIO6L3EG.cjs → chunk-EWY6HDMS.cjs} +14 -15
- package/dist/lib/node/chunk-EWY6HDMS.cjs.map +7 -0
- package/dist/lib/node/{chunk-AFTZZPJ5.cjs → chunk-V4WPZXN2.cjs} +6 -6
- package/dist/lib/node/index.cjs +16 -16
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-surface-J3EEVX2R.cjs → react-surface-M3OXAXKR.cjs} +12 -12
- package/dist/lib/node-esm/{AssistantDialog-CMCZM3GW.mjs → AssistantDialog-SDGQK5TF.mjs} +2 -2
- package/dist/lib/node-esm/{ChatContainer-NNHVY6RY.mjs → ChatContainer-AM4BDTXU.mjs} +2 -2
- package/dist/lib/node-esm/{app-graph-builder-245AWCPJ.mjs → app-graph-builder-ZDI7EVEN.mjs} +3 -3
- package/dist/lib/node-esm/{app-graph-builder-245AWCPJ.mjs.map → app-graph-builder-ZDI7EVEN.mjs.map} +1 -1
- package/dist/lib/node-esm/{chunk-2EYTPI7A.mjs → chunk-RDU7QEFL.mjs} +12 -13
- package/dist/lib/node-esm/chunk-RDU7QEFL.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-COTAZTJL.mjs → chunk-RN3I3BVC.mjs} +3 -3
- package/dist/lib/node-esm/index.mjs +2 -2
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-ISKACPXD.mjs → react-surface-RZBDBP42.mjs} +3 -3
- package/dist/types/src/components/Prompt/PromptBar.d.ts.map +1 -1
- package/dist/types/src/components/Thread/Thread.stories.d.ts.map +1 -1
- package/dist/types/src/tools/function.d.ts +1 -1
- package/dist/types/src/tools/function.d.ts.map +1 -1
- package/package.json +58 -58
- package/src/capabilities/app-graph-builder.ts +2 -2
- package/src/components/AmbientDialog/AmbientDialog.stories.tsx +1 -1
- package/src/components/Prompt/Prompt.stories.tsx +1 -1
- package/src/components/Prompt/PromptBar.tsx +4 -12
- package/src/components/Thread/Thread.stories.tsx +2 -5
- package/src/components/Thread/ThreadContainer.stories.tsx +1 -1
- package/src/components/Thread/ThreadMessage.tsx +1 -1
- package/src/components/Toolbox/Toolbox.stories.tsx +1 -1
- package/src/hooks/useChatProcessor.tsx +2 -2
- package/src/tools/function.ts +2 -4
- package/dist/lib/browser/chunk-QDMVFPHJ.mjs.map +0 -7
- package/dist/lib/node/chunk-EIO6L3EG.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-2EYTPI7A.mjs.map +0 -7
- /package/dist/lib/browser/{AssistantDialog-NWOABDST.mjs.map → AssistantDialog-BUHPFIHN.mjs.map} +0 -0
- /package/dist/lib/browser/{ChatContainer-FTPJJSTK.mjs.map → ChatContainer-X7JBCLFK.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-HNXMUBW2.mjs.map → chunk-PFIXSSN2.mjs.map} +0 -0
- /package/dist/lib/browser/{react-surface-RGQ6O3Y5.mjs.map → react-surface-JSHNKGXY.mjs.map} +0 -0
- /package/dist/lib/node/{AssistantDialog-XK7NZLCM.cjs.map → AssistantDialog-XIAFCAGB.cjs.map} +0 -0
- /package/dist/lib/node/{ChatContainer-2VI43SOE.cjs.map → ChatContainer-MAGI5QD6.cjs.map} +0 -0
- /package/dist/lib/node/{chunk-AFTZZPJ5.cjs.map → chunk-V4WPZXN2.cjs.map} +0 -0
- /package/dist/lib/node/{react-surface-J3EEVX2R.cjs.map → react-surface-M3OXAXKR.cjs.map} +0 -0
- /package/dist/lib/node-esm/{AssistantDialog-CMCZM3GW.mjs.map → AssistantDialog-SDGQK5TF.mjs.map} +0 -0
- /package/dist/lib/node-esm/{ChatContainer-NNHVY6RY.mjs.map → ChatContainer-AM4BDTXU.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-COTAZTJL.mjs.map → chunk-RN3I3BVC.mjs.map} +0 -0
- /package/dist/lib/node-esm/{react-surface-ISKACPXD.mjs.map → react-surface-RZBDBP42.mjs.map} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-assistant",
|
|
3
|
-
"version": "0.8.2-main.
|
|
3
|
+
"version": "0.8.2-main.600d381",
|
|
4
4
|
"description": "Assistant plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -46,51 +46,51 @@
|
|
|
46
46
|
"jsonpointer": "^5.0.1",
|
|
47
47
|
"lodash.get": "^4.4.2",
|
|
48
48
|
"unified": "^11.0.0",
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/context": "0.8.2-main.
|
|
56
|
-
"@dxos/echo
|
|
57
|
-
"@dxos/echo": "0.8.2-main.
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/
|
|
62
|
-
"@dxos/
|
|
63
|
-
"@dxos/
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/live-object": "0.8.2-main.
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/
|
|
70
|
-
"@dxos/plugin-deck": "0.8.2-main.
|
|
71
|
-
"@dxos/plugin-graph": "0.8.2-main.
|
|
72
|
-
"@dxos/plugin-markdown": "0.8.2-main.
|
|
73
|
-
"@dxos/plugin-
|
|
74
|
-
"@dxos/plugin-sketch": "0.8.2-main.
|
|
75
|
-
"@dxos/plugin-
|
|
76
|
-
"@dxos/plugin-
|
|
77
|
-
"@dxos/plugin-
|
|
78
|
-
"@dxos/plugin-
|
|
79
|
-
"@dxos/plugin-
|
|
80
|
-
"@dxos/react-client": "0.8.2-main.
|
|
81
|
-
"@dxos/react-edge-client": "0.8.2-main.
|
|
82
|
-
"@dxos/react-ui-canvas-compute": "0.8.2-main.
|
|
83
|
-
"@dxos/react-ui-canvas-editor": "0.8.2-main.
|
|
84
|
-
"@dxos/react-ui-
|
|
85
|
-
"@dxos/react-ui-
|
|
86
|
-
"@dxos/react-ui-
|
|
87
|
-
"@dxos/react-ui-
|
|
88
|
-
"@dxos/react-ui-
|
|
89
|
-
"@dxos/react-ui-
|
|
90
|
-
"@dxos/react-ui-syntax-highlighter": "0.8.2-main.
|
|
91
|
-
"@dxos/
|
|
92
|
-
"@dxos/
|
|
93
|
-
"@dxos/react-ui-stack": "0.8.2-main.
|
|
49
|
+
"@dxos/app-framework": "0.8.2-main.600d381",
|
|
50
|
+
"@dxos/artifact": "0.8.2-main.600d381",
|
|
51
|
+
"@dxos/assistant": "0.8.2-main.600d381",
|
|
52
|
+
"@dxos/async": "0.8.2-main.600d381",
|
|
53
|
+
"@dxos/compute": "0.8.2-main.600d381",
|
|
54
|
+
"@dxos/client": "0.8.2-main.600d381",
|
|
55
|
+
"@dxos/context": "0.8.2-main.600d381",
|
|
56
|
+
"@dxos/echo": "0.8.2-main.600d381",
|
|
57
|
+
"@dxos/echo-db": "0.8.2-main.600d381",
|
|
58
|
+
"@dxos/conductor": "0.8.2-main.600d381",
|
|
59
|
+
"@dxos/echo-protocol": "0.8.2-main.600d381",
|
|
60
|
+
"@dxos/echo-schema": "0.8.2-main.600d381",
|
|
61
|
+
"@dxos/edge-client": "0.8.2-main.600d381",
|
|
62
|
+
"@dxos/effect": "0.8.2-main.600d381",
|
|
63
|
+
"@dxos/functions": "0.8.2-main.600d381",
|
|
64
|
+
"@dxos/invariant": "0.8.2-main.600d381",
|
|
65
|
+
"@dxos/keys": "0.8.2-main.600d381",
|
|
66
|
+
"@dxos/live-object": "0.8.2-main.600d381",
|
|
67
|
+
"@dxos/log": "0.8.2-main.600d381",
|
|
68
|
+
"@dxos/plugin-client": "0.8.2-main.600d381",
|
|
69
|
+
"@dxos/local-storage": "0.8.2-main.600d381",
|
|
70
|
+
"@dxos/plugin-deck": "0.8.2-main.600d381",
|
|
71
|
+
"@dxos/plugin-graph": "0.8.2-main.600d381",
|
|
72
|
+
"@dxos/plugin-markdown": "0.8.2-main.600d381",
|
|
73
|
+
"@dxos/plugin-inbox": "0.8.2-main.600d381",
|
|
74
|
+
"@dxos/plugin-sketch": "0.8.2-main.600d381",
|
|
75
|
+
"@dxos/plugin-script": "0.8.2-main.600d381",
|
|
76
|
+
"@dxos/plugin-stack": "0.8.2-main.600d381",
|
|
77
|
+
"@dxos/plugin-space": "0.8.2-main.600d381",
|
|
78
|
+
"@dxos/plugin-transcription": "0.8.2-main.600d381",
|
|
79
|
+
"@dxos/plugin-wnfs": "0.8.2-main.600d381",
|
|
80
|
+
"@dxos/react-client": "0.8.2-main.600d381",
|
|
81
|
+
"@dxos/react-edge-client": "0.8.2-main.600d381",
|
|
82
|
+
"@dxos/react-ui-canvas-compute": "0.8.2-main.600d381",
|
|
83
|
+
"@dxos/react-ui-canvas-editor": "0.8.2-main.600d381",
|
|
84
|
+
"@dxos/react-ui-dnd": "0.8.2-main.600d381",
|
|
85
|
+
"@dxos/react-ui-components": "0.8.2-main.600d381",
|
|
86
|
+
"@dxos/react-ui-editor": "0.8.2-main.600d381",
|
|
87
|
+
"@dxos/react-ui-form": "0.8.2-main.600d381",
|
|
88
|
+
"@dxos/react-ui-sfx": "0.8.2-main.600d381",
|
|
89
|
+
"@dxos/react-ui-list": "0.8.2-main.600d381",
|
|
90
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.2-main.600d381",
|
|
91
|
+
"@dxos/util": "0.8.2-main.600d381",
|
|
92
|
+
"@dxos/schema": "0.8.2-main.600d381",
|
|
93
|
+
"@dxos/react-ui-stack": "0.8.2-main.600d381"
|
|
94
94
|
},
|
|
95
95
|
"devDependencies": {
|
|
96
96
|
"@types/lodash.get": "^4.4.7",
|
|
@@ -101,23 +101,23 @@
|
|
|
101
101
|
"react": "~18.2.0",
|
|
102
102
|
"react-dom": "~18.2.0",
|
|
103
103
|
"vite": "5.4.7",
|
|
104
|
-
"@dxos/artifact-testing": "0.8.2-main.
|
|
105
|
-
"@dxos/
|
|
106
|
-
"@dxos/
|
|
107
|
-
"@dxos/plugin-inbox": "0.8.2-main.
|
|
108
|
-
"@dxos/plugin-map": "0.8.2-main.
|
|
109
|
-
"@dxos/plugin-table": "0.8.2-main.
|
|
110
|
-
"@dxos/random": "0.8.2-main.
|
|
111
|
-
"@dxos/react-ui": "0.8.2-main.
|
|
112
|
-
"@dxos/react-ui-theme": "0.8.2-main.
|
|
113
|
-
"@dxos/storybook-utils": "0.8.2-main.
|
|
104
|
+
"@dxos/artifact-testing": "0.8.2-main.600d381",
|
|
105
|
+
"@dxos/echo-db": "0.8.2-main.600d381",
|
|
106
|
+
"@dxos/plugin-chess": "0.8.2-main.600d381",
|
|
107
|
+
"@dxos/plugin-inbox": "0.8.2-main.600d381",
|
|
108
|
+
"@dxos/plugin-map": "0.8.2-main.600d381",
|
|
109
|
+
"@dxos/plugin-table": "0.8.2-main.600d381",
|
|
110
|
+
"@dxos/random": "0.8.2-main.600d381",
|
|
111
|
+
"@dxos/react-ui": "0.8.2-main.600d381",
|
|
112
|
+
"@dxos/react-ui-theme": "0.8.2-main.600d381",
|
|
113
|
+
"@dxos/storybook-utils": "0.8.2-main.600d381"
|
|
114
114
|
},
|
|
115
115
|
"peerDependencies": {
|
|
116
116
|
"effect": "^3.13.3",
|
|
117
117
|
"react": "~18.2.0",
|
|
118
118
|
"react-dom": "~18.2.0",
|
|
119
|
-
"@dxos/react-ui": "0.8.2-main.
|
|
120
|
-
"@dxos/react-ui-theme": "0.8.2-main.
|
|
119
|
+
"@dxos/react-ui": "0.8.2-main.600d381",
|
|
120
|
+
"@dxos/react-ui-theme": "0.8.2-main.600d381"
|
|
121
121
|
},
|
|
122
122
|
"publishConfig": {
|
|
123
123
|
"access": "public"
|
|
@@ -71,7 +71,7 @@ export default (context: PluginsContext) =>
|
|
|
71
71
|
},
|
|
72
72
|
properties: {
|
|
73
73
|
label: ['open assistant label', { ns: ASSISTANT_PLUGIN }],
|
|
74
|
-
icon: 'ph--
|
|
74
|
+
icon: 'ph--sparkle--regular',
|
|
75
75
|
disposition: 'pin-end',
|
|
76
76
|
position: 'hoist',
|
|
77
77
|
keyBinding: {
|
|
@@ -94,7 +94,7 @@ export default (context: PluginsContext) =>
|
|
|
94
94
|
data: 'assistant-chat',
|
|
95
95
|
properties: {
|
|
96
96
|
label: ['assistant chat label', { ns: ASSISTANT_PLUGIN }],
|
|
97
|
-
icon: 'ph--
|
|
97
|
+
icon: 'ph--sparkle--regular',
|
|
98
98
|
position: 'hoist',
|
|
99
99
|
},
|
|
100
100
|
},
|
|
@@ -17,7 +17,7 @@ import translations from '../../translations';
|
|
|
17
17
|
const meta: Meta<typeof Prompt> = {
|
|
18
18
|
title: 'plugins/plugin-automation/Prompt',
|
|
19
19
|
component: Prompt,
|
|
20
|
-
decorators: [withTheme, withLayout(
|
|
20
|
+
decorators: [withTheme, withLayout()],
|
|
21
21
|
parameters: {
|
|
22
22
|
layout: 'centered',
|
|
23
23
|
translations,
|
|
@@ -7,7 +7,7 @@ import React, { useRef, useState } from 'react';
|
|
|
7
7
|
import { useVoiceInput } from '@dxos/plugin-transcription';
|
|
8
8
|
import { Icon, IconButton, type ThemedClassName, Tooltip, useTranslation } from '@dxos/react-ui';
|
|
9
9
|
import { Spinner } from '@dxos/react-ui-sfx';
|
|
10
|
-
import {
|
|
10
|
+
import { errorText, mx } from '@dxos/react-ui-theme';
|
|
11
11
|
|
|
12
12
|
import { Prompt, type PromptController, type PromptProps } from './Prompt';
|
|
13
13
|
import { ASSISTANT_PLUGIN } from '../../meta';
|
|
@@ -54,17 +54,9 @@ export const PromptBar = ({
|
|
|
54
54
|
>
|
|
55
55
|
<div className='flex w-[--rail-action] h-[--rail-action] items-center justify-center'>
|
|
56
56
|
{(error && (
|
|
57
|
-
<Tooltip.
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
</Tooltip.Trigger>
|
|
61
|
-
<Tooltip.Portal>
|
|
62
|
-
<Tooltip.Content>
|
|
63
|
-
<div className={mx('text-sm', errorMessageColors)}>{error.message}</div>
|
|
64
|
-
<Tooltip.Arrow />
|
|
65
|
-
</Tooltip.Content>
|
|
66
|
-
</Tooltip.Portal>
|
|
67
|
-
</Tooltip.Root>
|
|
57
|
+
<Tooltip.Trigger content={error.message} delayDuration={0}>
|
|
58
|
+
<Icon icon='ph--warning-circle--regular' classNames={errorText} size={5} />
|
|
59
|
+
</Tooltip.Trigger>
|
|
68
60
|
)) || <Spinner active={processing} />}
|
|
69
61
|
</div>
|
|
70
62
|
<Prompt
|
|
@@ -74,13 +74,10 @@ const meta: Meta<ThreadProps> = {
|
|
|
74
74
|
component: Thread,
|
|
75
75
|
decorators: [
|
|
76
76
|
withSignals,
|
|
77
|
-
withClientProvider({
|
|
78
|
-
createIdentity: true,
|
|
79
|
-
createSpace: true,
|
|
80
|
-
}),
|
|
77
|
+
withClientProvider({ createIdentity: true, createSpace: true }),
|
|
81
78
|
withPluginManager({ plugins: [IntentPlugin()] }),
|
|
82
79
|
withTheme,
|
|
83
|
-
withLayout({ fullscreen: true,
|
|
80
|
+
withLayout({ fullscreen: true, classNames: 'flex justify-center' }),
|
|
84
81
|
],
|
|
85
82
|
parameters: {
|
|
86
83
|
translations,
|
|
@@ -21,7 +21,7 @@ import { ToolBlock, isToolMessage } from './ToolInvocations';
|
|
|
21
21
|
import { ToolboxContainer } from '../Toolbox';
|
|
22
22
|
|
|
23
23
|
const panelClassNames = 'flex flex-col w-full px-2 bg-groupSurface rounded-md';
|
|
24
|
-
const userClassNames = 'bg-[--user-fill] text-
|
|
24
|
+
const userClassNames = 'bg-[--user-fill] text-accentSurfaceText';
|
|
25
25
|
|
|
26
26
|
const ToggleContainer = (props: ToggleContainerProps) => {
|
|
27
27
|
return <NativeToggleContainer {...props} classNames={mx(panelClassNames, props.classNames)} />;
|
|
@@ -15,7 +15,7 @@ import { isNonNullable } from '@dxos/util';
|
|
|
15
15
|
|
|
16
16
|
import { AssistantCapabilities } from '../capabilities';
|
|
17
17
|
import { ChatProcessor, type ChatProcessorOptions } from '../hooks';
|
|
18
|
-
import {
|
|
18
|
+
import { convertFunctionToTool, createToolsFromService } from '../tools';
|
|
19
19
|
import { type AIChatType, type AssistantSettingsProps, ServiceType } from '../types';
|
|
20
20
|
|
|
21
21
|
type UseChatProcessorProps = {
|
|
@@ -63,7 +63,7 @@ export const useChatProcessor = ({
|
|
|
63
63
|
...globalTools.flat(),
|
|
64
64
|
...serviceTools,
|
|
65
65
|
...functions
|
|
66
|
-
.map((fn) =>
|
|
66
|
+
.map((fn) => convertFunctionToTool(fn, config.values.runtime?.services?.edge?.url ?? '', space?.id))
|
|
67
67
|
.filter(isNonNullable),
|
|
68
68
|
];
|
|
69
69
|
const extensions = { space, dispatch, pivotId: chatId, part };
|
package/src/tools/function.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { log } from '@dxos/log';
|
|
|
11
11
|
import type { SpaceId } from '@dxos/react-client/echo';
|
|
12
12
|
import { getMeta } from '@dxos/react-client/echo';
|
|
13
13
|
|
|
14
|
-
export const
|
|
14
|
+
export const convertFunctionToTool = (
|
|
15
15
|
fn: FunctionType,
|
|
16
16
|
edgeUrl: string,
|
|
17
17
|
spaceId?: SpaceId | undefined,
|
|
@@ -24,9 +24,7 @@ export const covertFunctionToTool = (
|
|
|
24
24
|
if (!existingFunctionUrl) {
|
|
25
25
|
return undefined;
|
|
26
26
|
}
|
|
27
|
-
const url = getInvocationUrl(existingFunctionUrl, edgeUrl, {
|
|
28
|
-
spaceId,
|
|
29
|
-
});
|
|
27
|
+
const url = getInvocationUrl(existingFunctionUrl, edgeUrl, { spaceId });
|
|
30
28
|
|
|
31
29
|
return defineTool('user-function', {
|
|
32
30
|
name: fn.name,
|