@dxos/react-ui-canvas-compute 0.8.3 → 0.8.4-main.3f58842
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/index.mjs +74 -70
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +74 -70
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/compute.stories.d.ts +1 -1
- package/dist/types/src/compute.stories.d.ts.map +1 -1
- package/dist/types/src/graph/controller.d.ts +1 -1
- package/dist/types/src/graph/controller.d.ts.map +1 -1
- package/dist/types/src/shapes/Beacon.d.ts.map +1 -1
- package/dist/types/src/shapes/RNG.d.ts.map +1 -1
- package/dist/types/src/shapes/Table.d.ts.map +1 -1
- package/dist/types/src/shapes/Thread.d.ts.map +1 -1
- package/dist/types/src/shapes/Trigger.d.ts.map +1 -1
- package/dist/types/src/testing/circuits.d.ts +1 -1
- package/dist/types/src/testing/circuits.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +46 -44
- package/src/compute.stories.tsx +9 -9
- package/src/graph/controller.ts +2 -2
- package/src/graph/node-defs.ts +1 -0
- package/src/shapes/Beacon.tsx +1 -2
- package/src/shapes/Function.tsx +2 -2
- package/src/shapes/RNG.tsx +1 -2
- package/src/shapes/Surface.tsx +1 -1
- package/src/shapes/Table.tsx +4 -3
- package/src/shapes/Thread.tsx +4 -3
- package/src/shapes/Trigger.tsx +5 -5
- package/src/shapes/common/Box.tsx +1 -1
- package/src/testing/circuits.ts +4 -4
- package/dist/lib/node/index.cjs +0 -2896
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/react-ui-canvas-compute",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.4-main.3f58842",
|
|
4
4
|
"description": "A compute graph extension for the canvas editor component.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -15,6 +15,9 @@
|
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"types": "dist/types/src/index.d.ts",
|
|
18
|
+
"typesVersions": {
|
|
19
|
+
"*": {}
|
|
20
|
+
},
|
|
18
21
|
"files": [
|
|
19
22
|
"dist",
|
|
20
23
|
"src"
|
|
@@ -22,64 +25,63 @@
|
|
|
22
25
|
"dependencies": {
|
|
23
26
|
"@antv/graphlib": "^2.0.4",
|
|
24
27
|
"@antv/layout": "^1.2.13",
|
|
25
|
-
"@effect/platform": "0.
|
|
28
|
+
"@effect/platform": "0.89.0",
|
|
26
29
|
"@preact-signals/safe-react": "^0.9.0",
|
|
27
30
|
"chess.js": "^1.0.0",
|
|
28
|
-
"@dxos/ai": "0.8.
|
|
29
|
-
"@dxos/
|
|
30
|
-
"@dxos/
|
|
31
|
-
"@dxos/
|
|
32
|
-
"@dxos/
|
|
33
|
-
"@dxos/
|
|
34
|
-
"@dxos/
|
|
35
|
-
"@dxos/
|
|
36
|
-
"@dxos/
|
|
37
|
-
"@dxos/
|
|
38
|
-
"@dxos/
|
|
39
|
-
"@dxos/graph": "0.8.
|
|
40
|
-
"@dxos/keys": "0.8.
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/react-
|
|
45
|
-
"@dxos/react-
|
|
46
|
-
"@dxos/react-
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/react-ui-canvas-editor": "0.8.
|
|
49
|
-
"@dxos/react-ui-editor": "0.8.
|
|
50
|
-
"@dxos/react-ui-form": "0.8.
|
|
51
|
-
"@dxos/react-ui-
|
|
52
|
-
"@dxos/react-ui-
|
|
53
|
-
"@dxos/react-ui-syntax-highlighter": "0.8.
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/
|
|
31
|
+
"@dxos/ai": "0.8.4-main.3f58842",
|
|
32
|
+
"@dxos/assistant": "0.8.4-main.3f58842",
|
|
33
|
+
"@dxos/app-framework": "0.8.4-main.3f58842",
|
|
34
|
+
"@dxos/blueprints": "0.8.4-main.3f58842",
|
|
35
|
+
"@dxos/conductor": "0.8.4-main.3f58842",
|
|
36
|
+
"@dxos/async": "0.8.4-main.3f58842",
|
|
37
|
+
"@dxos/debug": "0.8.4-main.3f58842",
|
|
38
|
+
"@dxos/echo-schema": "0.8.4-main.3f58842",
|
|
39
|
+
"@dxos/context": "0.8.4-main.3f58842",
|
|
40
|
+
"@dxos/functions": "0.8.4-main.3f58842",
|
|
41
|
+
"@dxos/edge-client": "0.8.4-main.3f58842",
|
|
42
|
+
"@dxos/graph": "0.8.4-main.3f58842",
|
|
43
|
+
"@dxos/keys": "0.8.4-main.3f58842",
|
|
44
|
+
"@dxos/invariant": "0.8.4-main.3f58842",
|
|
45
|
+
"@dxos/live-object": "0.8.4-main.3f58842",
|
|
46
|
+
"@dxos/log": "0.8.4-main.3f58842",
|
|
47
|
+
"@dxos/react-client": "0.8.4-main.3f58842",
|
|
48
|
+
"@dxos/react-ui-attention": "0.8.4-main.3f58842",
|
|
49
|
+
"@dxos/react-edge-client": "0.8.4-main.3f58842",
|
|
50
|
+
"@dxos/react-ui-canvas": "0.8.4-main.3f58842",
|
|
51
|
+
"@dxos/react-ui-canvas-editor": "0.8.4-main.3f58842",
|
|
52
|
+
"@dxos/react-ui-editor": "0.8.4-main.3f58842",
|
|
53
|
+
"@dxos/react-ui-form": "0.8.4-main.3f58842",
|
|
54
|
+
"@dxos/react-ui-sfx": "0.8.4-main.3f58842",
|
|
55
|
+
"@dxos/react-ui-stack": "0.8.4-main.3f58842",
|
|
56
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.3f58842",
|
|
57
|
+
"@dxos/util": "0.8.4-main.3f58842",
|
|
58
|
+
"@dxos/schema": "0.8.4-main.3f58842"
|
|
56
59
|
},
|
|
57
60
|
"devDependencies": {
|
|
58
|
-
"@effect/ai": "0.
|
|
59
|
-
"@effect/platform": "^0.72.1",
|
|
61
|
+
"@effect/ai": "0.23.0",
|
|
60
62
|
"@types/lodash.defaultsdeep": "^4.6.6",
|
|
61
63
|
"@types/react": "~18.2.0",
|
|
62
64
|
"@types/react-dom": "~18.2.0",
|
|
63
|
-
"effect": "3.
|
|
65
|
+
"effect": "3.17.0",
|
|
64
66
|
"lodash.defaultsdeep": "^4.6.1",
|
|
65
67
|
"react": "~18.2.0",
|
|
66
68
|
"react-dom": "~18.2.0",
|
|
67
69
|
"vite": "5.4.7",
|
|
68
|
-
"@dxos/app-framework": "0.8.
|
|
69
|
-
"@dxos/
|
|
70
|
-
"@dxos/compute": "0.8.
|
|
71
|
-
"@dxos/echo-signals": "0.8.
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/
|
|
70
|
+
"@dxos/app-framework": "0.8.4-main.3f58842",
|
|
71
|
+
"@dxos/assistant-testing": "0.8.4-main.3f58842",
|
|
72
|
+
"@dxos/compute": "0.8.4-main.3f58842",
|
|
73
|
+
"@dxos/echo-signals": "0.8.4-main.3f58842",
|
|
74
|
+
"@dxos/react-ui": "0.8.4-main.3f58842",
|
|
75
|
+
"@dxos/random": "0.8.4-main.3f58842",
|
|
76
|
+
"@dxos/react-ui-theme": "0.8.4-main.3f58842",
|
|
77
|
+
"@dxos/storybook-utils": "0.8.4-main.3f58842"
|
|
76
78
|
},
|
|
77
79
|
"peerDependencies": {
|
|
78
|
-
"effect": "3.13.3",
|
|
80
|
+
"effect": "^3.13.3",
|
|
79
81
|
"react": "~18.2.0",
|
|
80
82
|
"react-dom": "~18.2.0",
|
|
81
|
-
"@dxos/react-ui": "0.8.
|
|
82
|
-
"@dxos/react-ui-theme": "0.8.
|
|
83
|
+
"@dxos/react-ui": "0.8.4-main.3f58842",
|
|
84
|
+
"@dxos/react-ui-theme": "0.8.4-main.3f58842"
|
|
83
85
|
},
|
|
84
86
|
"publishConfig": {
|
|
85
87
|
"access": "public"
|
package/src/compute.stories.tsx
CHANGED
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
import '@dxos-theme';
|
|
6
6
|
|
|
7
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
7
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
8
8
|
import React, { type PropsWithChildren, useEffect, useMemo, useRef, useState } from 'react';
|
|
9
9
|
|
|
10
|
-
import { EdgeAiServiceClient } from '@dxos/ai';
|
|
11
|
-
import {
|
|
10
|
+
import { EdgeAiServiceClient, AiService } from '@dxos/ai';
|
|
11
|
+
import { createTestAiServiceClient } from '@dxos/ai/testing';
|
|
12
12
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
13
|
-
import { capabilities, localServiceEndpoints } from '@dxos/
|
|
13
|
+
import { capabilities, localServiceEndpoints } from '@dxos/assistant-testing';
|
|
14
14
|
import { type ComputeGraphModel, type ComputeNode, type GraphDiagnostic } from '@dxos/conductor';
|
|
15
|
-
import {
|
|
15
|
+
import { ServiceContainer } from '@dxos/functions';
|
|
16
16
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
17
17
|
import { Select, Toolbar } from '@dxos/react-ui';
|
|
18
18
|
import { withAttention } from '@dxos/react-ui-attention/testing';
|
|
@@ -182,9 +182,9 @@ const meta: Meta<RenderProps> = {
|
|
|
182
182
|
component: Editor.Root,
|
|
183
183
|
render: DefaultStory,
|
|
184
184
|
decorators: [
|
|
185
|
-
withClientProvider({ createIdentity: true, createSpace: true }),
|
|
186
185
|
withTheme,
|
|
187
186
|
withAttention,
|
|
187
|
+
withClientProvider({ createIdentity: true, createSpace: true }),
|
|
188
188
|
withLayout({ fullscreen: true }),
|
|
189
189
|
withPluginManager({ capabilities }),
|
|
190
190
|
],
|
|
@@ -334,7 +334,7 @@ export const ImageGen: Story = {
|
|
|
334
334
|
...createComputeGraphController(
|
|
335
335
|
createGptCircuit({ image: true, artifact: true }),
|
|
336
336
|
new ServiceContainer().setServices({
|
|
337
|
-
ai: AiService.make(
|
|
337
|
+
ai: AiService.make(createTestAiServiceClient()),
|
|
338
338
|
}),
|
|
339
339
|
),
|
|
340
340
|
},
|
|
@@ -350,7 +350,7 @@ export const Audio: Story = {
|
|
|
350
350
|
...createComputeGraphController(
|
|
351
351
|
createAudioCircuit(),
|
|
352
352
|
new ServiceContainer().setServices({
|
|
353
|
-
ai: AiService.make(
|
|
353
|
+
ai: AiService.make(createTestAiServiceClient()),
|
|
354
354
|
}),
|
|
355
355
|
),
|
|
356
356
|
},
|
|
@@ -365,7 +365,7 @@ export const Voice: Story = {
|
|
|
365
365
|
...createComputeGraphController(
|
|
366
366
|
createGPTRealtimeCircuit(),
|
|
367
367
|
new ServiceContainer().setServices({
|
|
368
|
-
ai: AiService.make(
|
|
368
|
+
ai: AiService.make(createTestAiServiceClient()),
|
|
369
369
|
}),
|
|
370
370
|
),
|
|
371
371
|
},
|
package/src/graph/controller.ts
CHANGED
|
@@ -17,11 +17,11 @@ import {
|
|
|
17
17
|
type GptOutput,
|
|
18
18
|
type GraphDiagnostic,
|
|
19
19
|
GraphExecutor,
|
|
20
|
-
isNotExecuted,
|
|
21
20
|
ValueBag,
|
|
21
|
+
isNotExecuted,
|
|
22
22
|
} from '@dxos/conductor';
|
|
23
23
|
import { Resource } from '@dxos/context';
|
|
24
|
-
import type
|
|
24
|
+
import { type ServiceContainer } from '@dxos/functions';
|
|
25
25
|
import { log } from '@dxos/log';
|
|
26
26
|
import { type CanvasGraphModel } from '@dxos/react-ui-canvas-editor';
|
|
27
27
|
|
package/src/graph/node-defs.ts
CHANGED
|
@@ -49,6 +49,7 @@ const nodeFactory: Record<NodeType | 'trigger', (shape: ComputeShape) => Compute
|
|
|
49
49
|
createNode('constant', {
|
|
50
50
|
value: (shape as ConstantShape).value,
|
|
51
51
|
}),
|
|
52
|
+
['make-queue' as const]: () => createNode('make-queue'),
|
|
52
53
|
['database' as const]: () => createNode('database'),
|
|
53
54
|
['gpt' as const]: () => createNode('gpt'),
|
|
54
55
|
['gpt-realtime' as const]: () => createNode('gpt-realtime'),
|
package/src/shapes/Beacon.tsx
CHANGED
|
@@ -8,7 +8,6 @@ import React from 'react';
|
|
|
8
8
|
import { DEFAULT_INPUT, isTruthy } from '@dxos/conductor';
|
|
9
9
|
import { Icon } from '@dxos/react-ui';
|
|
10
10
|
import { createAnchorMap, type ShapeComponentProps, type ShapeDef } from '@dxos/react-ui-canvas-editor';
|
|
11
|
-
import { mx } from '@dxos/react-ui-theme';
|
|
12
11
|
|
|
13
12
|
import { ComputeShape, createAnchorId, createShape, type CreateShapeProps } from './defs';
|
|
14
13
|
import { useComputeNodeState } from '../hooks';
|
|
@@ -36,7 +35,7 @@ export const BeaconComponent = ({ shape }: ShapeComponentProps<BeaconShape>) =>
|
|
|
36
35
|
<div className='flex w-full justify-center items-center'>
|
|
37
36
|
<Icon
|
|
38
37
|
icon='ph--sun--regular'
|
|
39
|
-
classNames={
|
|
38
|
+
classNames={['transition opacity-20 duration-1000', isTruthy(value) && 'opacity-100 text-yellow-500']}
|
|
40
39
|
size={8}
|
|
41
40
|
/>
|
|
42
41
|
</div>
|
package/src/shapes/Function.tsx
CHANGED
|
@@ -9,7 +9,7 @@ import { AnyOutput, FunctionInput } from '@dxos/conductor';
|
|
|
9
9
|
import { getSnapshot, isInstanceOf, Ref } from '@dxos/echo-schema';
|
|
10
10
|
import { FunctionType, ScriptType } from '@dxos/functions';
|
|
11
11
|
import { useClient } from '@dxos/react-client';
|
|
12
|
-
import { Filter,
|
|
12
|
+
import { Filter, parseId } from '@dxos/react-client/echo';
|
|
13
13
|
import {
|
|
14
14
|
TextBox,
|
|
15
15
|
type TextBoxControl,
|
|
@@ -69,7 +69,7 @@ const TextInputComponent = ({ shape, title, ...props }: TextInputComponentProps)
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
node.value = value;
|
|
72
|
-
node.function =
|
|
72
|
+
node.function = Ref.make(fn);
|
|
73
73
|
node.inputSchema = getSnapshot(fn.inputSchema);
|
|
74
74
|
node.outputSchema = getSnapshot(fn.outputSchema);
|
|
75
75
|
},
|
package/src/shapes/RNG.tsx
CHANGED
|
@@ -8,7 +8,6 @@ import React, { useEffect, useState } from 'react';
|
|
|
8
8
|
import { DEFAULT_OUTPUT } from '@dxos/conductor';
|
|
9
9
|
import { Icon, type IconProps } from '@dxos/react-ui';
|
|
10
10
|
import { createAnchorMap, type ShapeComponentProps, type ShapeDef } from '@dxos/react-ui-canvas-editor';
|
|
11
|
-
import { mx } from '@dxos/react-ui-theme';
|
|
12
11
|
|
|
13
12
|
import { ComputeShape, createAnchorId, createShape, type CreateShapeProps } from './defs';
|
|
14
13
|
import { useComputeNodeState } from '../hooks';
|
|
@@ -69,7 +68,7 @@ export const RandomComponent = ({ shape }: ShapeComponentProps<RandomShape>) =>
|
|
|
69
68
|
|
|
70
69
|
return (
|
|
71
70
|
<div className='flex grow items-center justify-center'>
|
|
72
|
-
<Icon icon={icon} classNames={
|
|
71
|
+
<Icon icon={icon} classNames={spin && 'animate-[spin_1s]'} size={10} onClick={handleClick} />
|
|
73
72
|
</div>
|
|
74
73
|
);
|
|
75
74
|
};
|
package/src/shapes/Surface.tsx
CHANGED
|
@@ -41,7 +41,7 @@ export const SurfaceComponent = ({ shape }: ShapeComponentProps<SurfaceShape>) =
|
|
|
41
41
|
|
|
42
42
|
return (
|
|
43
43
|
<Box shape={shape} onAction={handleAction}>
|
|
44
|
-
{value !== null && <Surface role='
|
|
44
|
+
{value !== null && <Surface role='card--extrinsic' data={{ value }} limit={1} />}
|
|
45
45
|
</Box>
|
|
46
46
|
);
|
|
47
47
|
};
|
package/src/shapes/Table.tsx
CHANGED
|
@@ -5,14 +5,15 @@
|
|
|
5
5
|
import { Schema } from 'effect';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
|
|
8
|
-
import { createInputSchema, createOutputSchema
|
|
8
|
+
import { createInputSchema, createOutputSchema } from '@dxos/conductor';
|
|
9
9
|
import { type ShapeComponentProps, type ShapeDef } from '@dxos/react-ui-canvas-editor';
|
|
10
|
+
import { DataType } from '@dxos/schema';
|
|
10
11
|
|
|
11
12
|
import { createFunctionAnchors, Box } from './common';
|
|
12
13
|
import { ComputeShape, createShape, type CreateShapeProps } from './defs';
|
|
13
14
|
|
|
14
|
-
const InputSchema = createInputSchema(
|
|
15
|
-
const OutputSchema = createOutputSchema(Schema.mutable(Schema.Array(
|
|
15
|
+
const InputSchema = createInputSchema(DataType.Message);
|
|
16
|
+
const OutputSchema = createOutputSchema(Schema.mutable(Schema.Array(DataType.Message)));
|
|
16
17
|
|
|
17
18
|
export const TableShape = Schema.extend(
|
|
18
19
|
ComputeShape,
|
package/src/shapes/Thread.tsx
CHANGED
|
@@ -5,16 +5,17 @@
|
|
|
5
5
|
import { Schema } from 'effect';
|
|
6
6
|
import React, { useEffect, useRef } from 'react';
|
|
7
7
|
|
|
8
|
-
import { createInputSchema, createOutputSchema
|
|
8
|
+
import { createInputSchema, createOutputSchema } from '@dxos/conductor';
|
|
9
9
|
import { type ThemedClassName } from '@dxos/react-ui';
|
|
10
10
|
import { type ShapeComponentProps, type ShapeDef } from '@dxos/react-ui-canvas-editor';
|
|
11
11
|
import { mx } from '@dxos/react-ui-theme';
|
|
12
|
+
import { DataType } from '@dxos/schema';
|
|
12
13
|
|
|
13
14
|
import { createFunctionAnchors, Box } from './common';
|
|
14
15
|
import { ComputeShape, createShape, type CreateShapeProps } from './defs';
|
|
15
16
|
|
|
16
|
-
const InputSchema = createInputSchema(
|
|
17
|
-
const OutputSchema = createOutputSchema(Schema.mutable(Schema.Array(
|
|
17
|
+
const InputSchema = createInputSchema(DataType.Message);
|
|
18
|
+
const OutputSchema = createOutputSchema(Schema.mutable(Schema.Array(DataType.Message)));
|
|
18
19
|
|
|
19
20
|
export const ThreadShape = Schema.extend(
|
|
20
21
|
ComputeShape,
|
package/src/shapes/Trigger.tsx
CHANGED
|
@@ -9,21 +9,21 @@ import { VoidInput } from '@dxos/conductor';
|
|
|
9
9
|
import { ObjectId, Ref } from '@dxos/echo-schema';
|
|
10
10
|
import {
|
|
11
11
|
type EmailTrigger,
|
|
12
|
+
EmailTriggerOutput,
|
|
12
13
|
FunctionTrigger,
|
|
13
14
|
type QueueTrigger,
|
|
15
|
+
QueueTriggerOutput,
|
|
14
16
|
type SubscriptionTrigger,
|
|
15
17
|
type TimerTrigger,
|
|
16
18
|
TriggerKind,
|
|
17
19
|
type TriggerType,
|
|
18
|
-
type WebhookTrigger,
|
|
19
|
-
EmailTriggerOutput,
|
|
20
|
-
QueueTriggerOutput,
|
|
21
20
|
SubscriptionTriggerOutput,
|
|
22
21
|
TimerTriggerOutput,
|
|
22
|
+
type WebhookTrigger,
|
|
23
23
|
WebhookTriggerOutput,
|
|
24
24
|
} from '@dxos/functions';
|
|
25
25
|
import { DXN, SpaceId } from '@dxos/keys';
|
|
26
|
-
import { live,
|
|
26
|
+
import { live, useSpace } from '@dxos/react-client/echo';
|
|
27
27
|
import { Select, type SelectRootProps } from '@dxos/react-ui';
|
|
28
28
|
import { type ShapeComponentProps, type ShapeDef } from '@dxos/react-ui-canvas-editor';
|
|
29
29
|
|
|
@@ -51,7 +51,7 @@ export const createTrigger = (props: CreateTriggerProps): TriggerShape => {
|
|
|
51
51
|
});
|
|
52
52
|
return createShape<TriggerShape>({
|
|
53
53
|
type: 'trigger',
|
|
54
|
-
functionTrigger:
|
|
54
|
+
functionTrigger: Ref.make(functionTrigger),
|
|
55
55
|
size: { width: 192, height: getHeight(EmailTriggerOutput) },
|
|
56
56
|
...props,
|
|
57
57
|
});
|
|
@@ -35,7 +35,7 @@ export const Box = forwardRef<HTMLDivElement, BoxProps>(
|
|
|
35
35
|
<div ref={forwardedRef} className='flex flex-col h-full w-full justify-between'>
|
|
36
36
|
<div className='flex shrink-0 w-full justify-between items-center h-[32px] bg-hoverSurface'>
|
|
37
37
|
<Icon icon={icon} classNames='mx-2' />
|
|
38
|
-
<div className='grow text-sm truncate'>{debug ? shape.type : name ?? shape.text ?? title}</div>
|
|
38
|
+
<div className='grow text-sm truncate'>{debug ? shape.type : (name ?? shape.text ?? title)}</div>
|
|
39
39
|
<IconButton
|
|
40
40
|
classNames='p-1 text-green-500'
|
|
41
41
|
variant='ghost'
|
package/src/testing/circuits.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { createSystemPrompt } from '@dxos/
|
|
5
|
+
import { createSystemPrompt } from '@dxos/assistant';
|
|
6
6
|
import { ObjectId } from '@dxos/echo-schema';
|
|
7
|
-
import type
|
|
7
|
+
import { type ServiceContainer } from '@dxos/functions';
|
|
8
8
|
import { DXN, SpaceId } from '@dxos/keys';
|
|
9
9
|
import { type Dimension, type Point } from '@dxos/react-ui-canvas';
|
|
10
10
|
import { CanvasGraphModel, createNote, pointMultiply, pointsToRect, rectToPoints } from '@dxos/react-ui-canvas-editor';
|
|
@@ -207,7 +207,7 @@ export const createArtifactCircuit = () => {
|
|
|
207
207
|
model.builder.call((builder) => {
|
|
208
208
|
const prompt = model.createNode(
|
|
209
209
|
createTemplate({
|
|
210
|
-
text: createSystemPrompt(),
|
|
210
|
+
text: createSystemPrompt({}),
|
|
211
211
|
...position({ x: -10, y: -5, width: 8, height: 18 }),
|
|
212
212
|
}),
|
|
213
213
|
);
|
|
@@ -262,7 +262,7 @@ export const createGptCircuit = (options: {
|
|
|
262
262
|
if (options.instructions) {
|
|
263
263
|
const prompt = model.createNode(
|
|
264
264
|
createTemplate({
|
|
265
|
-
text: createSystemPrompt(),
|
|
265
|
+
text: createSystemPrompt({}),
|
|
266
266
|
...position({ x: -18, y: -12, width: 8, height: 10 }),
|
|
267
267
|
}),
|
|
268
268
|
);
|