@dxos/react-ui-canvas-compute 0.8.3 → 0.8.4-main.2e9d522

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.
Files changed (34) hide show
  1. package/dist/lib/browser/index.mjs +74 -70
  2. package/dist/lib/browser/index.mjs.map +3 -3
  3. package/dist/lib/browser/meta.json +1 -1
  4. package/dist/lib/node-esm/index.mjs +74 -70
  5. package/dist/lib/node-esm/index.mjs.map +3 -3
  6. package/dist/lib/node-esm/meta.json +1 -1
  7. package/dist/types/src/compute.stories.d.ts +1 -1
  8. package/dist/types/src/compute.stories.d.ts.map +1 -1
  9. package/dist/types/src/graph/controller.d.ts +1 -1
  10. package/dist/types/src/graph/controller.d.ts.map +1 -1
  11. package/dist/types/src/shapes/Beacon.d.ts.map +1 -1
  12. package/dist/types/src/shapes/RNG.d.ts.map +1 -1
  13. package/dist/types/src/shapes/Table.d.ts.map +1 -1
  14. package/dist/types/src/shapes/Thread.d.ts.map +1 -1
  15. package/dist/types/src/shapes/Trigger.d.ts.map +1 -1
  16. package/dist/types/src/testing/circuits.d.ts +1 -1
  17. package/dist/types/src/testing/circuits.d.ts.map +1 -1
  18. package/dist/types/tsconfig.tsbuildinfo +1 -1
  19. package/package.json +46 -44
  20. package/src/compute.stories.tsx +17 -29
  21. package/src/graph/controller.ts +2 -2
  22. package/src/graph/node-defs.ts +1 -0
  23. package/src/shapes/Beacon.tsx +1 -2
  24. package/src/shapes/Function.tsx +2 -2
  25. package/src/shapes/RNG.tsx +1 -2
  26. package/src/shapes/Surface.tsx +1 -1
  27. package/src/shapes/Table.tsx +4 -3
  28. package/src/shapes/Thread.tsx +4 -3
  29. package/src/shapes/Trigger.tsx +5 -5
  30. package/src/shapes/common/Box.tsx +1 -1
  31. package/src/testing/circuits.ts +4 -4
  32. package/dist/lib/node/index.cjs +0 -2896
  33. package/dist/lib/node/index.cjs.map +0 -7
  34. 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",
3
+ "version": "0.8.4-main.2e9d522",
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.80.12",
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.3",
29
- "@dxos/artifact": "0.8.3",
30
- "@dxos/assistant": "0.8.3",
31
- "@dxos/async": "0.8.3",
32
- "@dxos/app-framework": "0.8.3",
33
- "@dxos/conductor": "0.8.3",
34
- "@dxos/context": "0.8.3",
35
- "@dxos/debug": "0.8.3",
36
- "@dxos/echo-schema": "0.8.3",
37
- "@dxos/edge-client": "0.8.3",
38
- "@dxos/invariant": "0.8.3",
39
- "@dxos/graph": "0.8.3",
40
- "@dxos/keys": "0.8.3",
41
- "@dxos/live-object": "0.8.3",
42
- "@dxos/log": "0.8.3",
43
- "@dxos/react-client": "0.8.3",
44
- "@dxos/react-ui-attention": "0.8.3",
45
- "@dxos/react-edge-client": "0.8.3",
46
- "@dxos/react-ui-canvas": "0.8.3",
47
- "@dxos/functions": "0.8.3",
48
- "@dxos/react-ui-canvas-editor": "0.8.3",
49
- "@dxos/react-ui-editor": "0.8.3",
50
- "@dxos/react-ui-form": "0.8.3",
51
- "@dxos/react-ui-stack": "0.8.3",
52
- "@dxos/react-ui-sfx": "0.8.3",
53
- "@dxos/react-ui-syntax-highlighter": "0.8.3",
54
- "@dxos/schema": "0.8.3",
55
- "@dxos/util": "0.8.3"
31
+ "@dxos/ai": "0.8.4-main.2e9d522",
32
+ "@dxos/app-framework": "0.8.4-main.2e9d522",
33
+ "@dxos/assistant": "0.8.4-main.2e9d522",
34
+ "@dxos/async": "0.8.4-main.2e9d522",
35
+ "@dxos/blueprints": "0.8.4-main.2e9d522",
36
+ "@dxos/conductor": "0.8.4-main.2e9d522",
37
+ "@dxos/context": "0.8.4-main.2e9d522",
38
+ "@dxos/debug": "0.8.4-main.2e9d522",
39
+ "@dxos/echo-schema": "0.8.4-main.2e9d522",
40
+ "@dxos/edge-client": "0.8.4-main.2e9d522",
41
+ "@dxos/functions": "0.8.4-main.2e9d522",
42
+ "@dxos/graph": "0.8.4-main.2e9d522",
43
+ "@dxos/invariant": "0.8.4-main.2e9d522",
44
+ "@dxos/keys": "0.8.4-main.2e9d522",
45
+ "@dxos/live-object": "0.8.4-main.2e9d522",
46
+ "@dxos/log": "0.8.4-main.2e9d522",
47
+ "@dxos/react-client": "0.8.4-main.2e9d522",
48
+ "@dxos/react-edge-client": "0.8.4-main.2e9d522",
49
+ "@dxos/react-ui-attention": "0.8.4-main.2e9d522",
50
+ "@dxos/react-ui-canvas": "0.8.4-main.2e9d522",
51
+ "@dxos/react-ui-canvas-editor": "0.8.4-main.2e9d522",
52
+ "@dxos/react-ui-editor": "0.8.4-main.2e9d522",
53
+ "@dxos/react-ui-form": "0.8.4-main.2e9d522",
54
+ "@dxos/react-ui-sfx": "0.8.4-main.2e9d522",
55
+ "@dxos/react-ui-stack": "0.8.4-main.2e9d522",
56
+ "@dxos/schema": "0.8.4-main.2e9d522",
57
+ "@dxos/react-ui-syntax-highlighter": "0.8.4-main.2e9d522",
58
+ "@dxos/util": "0.8.4-main.2e9d522"
56
59
  },
57
60
  "devDependencies": {
58
- "@effect/ai": "0.8.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.14.21",
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.3",
69
- "@dxos/artifact-testing": "0.8.3",
70
- "@dxos/compute": "0.8.3",
71
- "@dxos/echo-signals": "0.8.3",
72
- "@dxos/random": "0.8.3",
73
- "@dxos/react-ui": "0.8.3",
74
- "@dxos/storybook-utils": "0.8.3",
75
- "@dxos/react-ui-theme": "0.8.3"
70
+ "@dxos/app-framework": "0.8.4-main.2e9d522",
71
+ "@dxos/assistant-testing": "0.8.4-main.2e9d522",
72
+ "@dxos/compute": "0.8.4-main.2e9d522",
73
+ "@dxos/echo-signals": "0.8.4-main.2e9d522",
74
+ "@dxos/random": "0.8.4-main.2e9d522",
75
+ "@dxos/react-ui": "0.8.4-main.2e9d522",
76
+ "@dxos/storybook-utils": "0.8.4-main.2e9d522",
77
+ "@dxos/react-ui-theme": "0.8.4-main.2e9d522"
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.3",
82
- "@dxos/react-ui-theme": "0.8.3"
83
+ "@dxos/react-ui": "0.8.4-main.2e9d522",
84
+ "@dxos/react-ui-theme": "0.8.4-main.2e9d522"
83
85
  },
84
86
  "publishConfig": {
85
87
  "access": "public"
@@ -4,15 +4,13 @@
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 { createTestOllamaClient } from '@dxos/ai/testing';
12
10
  import { withPluginManager } from '@dxos/app-framework/testing';
13
- import { capabilities, localServiceEndpoints } from '@dxos/artifact-testing';
11
+ import { capabilities } from '@dxos/assistant-testing';
14
12
  import { type ComputeGraphModel, type ComputeNode, type GraphDiagnostic } from '@dxos/conductor';
15
- import { AiService, ServiceContainer } from '@dxos/functions';
13
+ import { ServiceContainer } from '@dxos/functions';
16
14
  import { withClientProvider } from '@dxos/react-client/testing';
17
15
  import { Select, Toolbar } from '@dxos/react-ui';
18
16
  import { withAttention } from '@dxos/react-ui-attention/testing';
@@ -34,16 +32,16 @@ import { ComputeContext, useComputeGraphController, useGraphMonitor } from './ho
34
32
  import { computeShapes } from './registry';
35
33
  import { type ComputeShape } from './shapes';
36
34
  import {
35
+ createArtifactCircuit,
36
+ createAudioCircuit,
37
+ createBasicCircuit,
38
+ createComputeGraphController,
37
39
  createControlCircuit,
40
+ createGptCircuit,
38
41
  createGPTRealtimeCircuit,
39
42
  createLogicCircuit,
40
- createComputeGraphController,
41
- createBasicCircuit,
42
- createGptCircuit,
43
- createAudioCircuit,
44
- createTransformCircuit,
45
43
  createTemplateCircuit,
46
- createArtifactCircuit,
44
+ createTransformCircuit,
47
45
  } from './testing';
48
46
 
49
47
  // const FormSchema = Schema.omit<any, any, ['subgraph']>('subgraph')(ComputeNode);
@@ -182,9 +180,9 @@ const meta: Meta<RenderProps> = {
182
180
  component: Editor.Root,
183
181
  render: DefaultStory,
184
182
  decorators: [
185
- withClientProvider({ createIdentity: true, createSpace: true }),
186
183
  withTheme,
187
184
  withAttention,
185
+ withClientProvider({ createIdentity: true, createSpace: true }),
188
186
  withLayout({ fullscreen: true }),
189
187
  withPluginManager({ capabilities }),
190
188
  ],
@@ -249,16 +247,6 @@ export const Control: Story = {
249
247
  },
250
248
  };
251
249
 
252
- // export const Ollama: Story = {
253
- // args: {
254
- // // debug: true,
255
- // showGrid: false,
256
- // snapToGrid: false,
257
- // registry: new ShapeRegistry(computeShapes),
258
- // ...createComputeGraphController(createTest3(), createEdgeServices()),
259
- // },
260
- // };
261
-
262
250
  export const Template: Story = {
263
251
  args: {
264
252
  showGrid: false,
@@ -268,7 +256,7 @@ export const Template: Story = {
268
256
  ...createComputeGraphController(
269
257
  createTemplateCircuit(),
270
258
  new ServiceContainer().setServices({
271
- ai: AiService.make(new EdgeAiServiceClient({ endpoint: localServiceEndpoints.ai })),
259
+ // ai: AiService.make(new Edge AiServiceClient({ endpoint: localServiceEndpoints.ai })),
272
260
  }),
273
261
  ),
274
262
  },
@@ -285,7 +273,7 @@ export const GPT: Story = {
285
273
  ...createComputeGraphController(
286
274
  createGptCircuit({ history: true }),
287
275
  new ServiceContainer().setServices({
288
- ai: AiService.make(new EdgeAiServiceClient({ endpoint: localServiceEndpoints.ai })),
276
+ // ai: AiService.make(new Edge AiServiceClient({ endpoint: localServiceEndpoints.ai })),
289
277
  }),
290
278
  ),
291
279
  },
@@ -301,7 +289,7 @@ export const Plugins: Story = {
301
289
  ...createComputeGraphController(
302
290
  createGptCircuit({ history: true, image: true, artifact: true }),
303
291
  new ServiceContainer().setServices({
304
- ai: AiService.make(new EdgeAiServiceClient({ endpoint: localServiceEndpoints.ai })),
292
+ // ai: AiService.make(new Edge AiServiceClient({ endpoint: localServiceEndpoints.ai })),
305
293
  }),
306
294
  ),
307
295
  },
@@ -317,7 +305,7 @@ export const Artifact: Story = {
317
305
  ...createComputeGraphController(
318
306
  createArtifactCircuit(),
319
307
  new ServiceContainer().setServices({
320
- ai: AiService.make(new EdgeAiServiceClient({ endpoint: localServiceEndpoints.ai })),
308
+ // ai: AiService.make(new Edge AiServiceClient({ endpoint: localServiceEndpoints.ai })),
321
309
  }),
322
310
  ),
323
311
  },
@@ -334,7 +322,7 @@ export const ImageGen: Story = {
334
322
  ...createComputeGraphController(
335
323
  createGptCircuit({ image: true, artifact: true }),
336
324
  new ServiceContainer().setServices({
337
- ai: AiService.make(createTestOllamaClient()),
325
+ // ai: AiService.make(createTestAiServiceClient()),
338
326
  }),
339
327
  ),
340
328
  },
@@ -350,7 +338,7 @@ export const Audio: Story = {
350
338
  ...createComputeGraphController(
351
339
  createAudioCircuit(),
352
340
  new ServiceContainer().setServices({
353
- ai: AiService.make(createTestOllamaClient()),
341
+ // ai: AiService.make(createTestAiServiceClient()),
354
342
  }),
355
343
  ),
356
344
  },
@@ -365,7 +353,7 @@ export const Voice: Story = {
365
353
  ...createComputeGraphController(
366
354
  createGPTRealtimeCircuit(),
367
355
  new ServiceContainer().setServices({
368
- ai: AiService.make(createTestOllamaClient()),
356
+ // ai: AiService.make(createTestAiServiceClient()),
369
357
  }),
370
358
  ),
371
359
  },
@@ -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 { ServiceContainer } from '@dxos/functions';
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
 
@@ -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'),
@@ -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={mx('transition opacity-20 duration-1000', isTruthy(value) && 'opacity-100 text-yellow-500')}
38
+ classNames={['transition opacity-20 duration-1000', isTruthy(value) && 'opacity-100 text-yellow-500']}
40
39
  size={8}
41
40
  />
42
41
  </div>
@@ -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, makeRef, parseId } from '@dxos/react-client/echo';
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 = makeRef(fn);
72
+ node.function = Ref.make(fn);
73
73
  node.inputSchema = getSnapshot(fn.inputSchema);
74
74
  node.outputSchema = getSnapshot(fn.outputSchema);
75
75
  },
@@ -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={mx(spin && 'animate-[spin_1s]')} size={10} onClick={handleClick} />
71
+ <Icon icon={icon} classNames={spin && 'animate-[spin_1s]'} size={10} onClick={handleClick} />
73
72
  </div>
74
73
  );
75
74
  };
@@ -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='canvas-node' data={{ value }} limit={1} />}
44
+ {value !== null && <Surface role='card--extrinsic' data={{ value }} limit={1} />}
45
45
  </Box>
46
46
  );
47
47
  };
@@ -5,14 +5,15 @@
5
5
  import { Schema } from 'effect';
6
6
  import React from 'react';
7
7
 
8
- import { createInputSchema, createOutputSchema, GptMessage } from '@dxos/conductor';
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(GptMessage);
15
- const OutputSchema = createOutputSchema(Schema.mutable(Schema.Array(GptMessage)));
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,
@@ -5,16 +5,17 @@
5
5
  import { Schema } from 'effect';
6
6
  import React, { useEffect, useRef } from 'react';
7
7
 
8
- import { createInputSchema, createOutputSchema, GptMessage } from '@dxos/conductor';
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(GptMessage);
17
- const OutputSchema = createOutputSchema(Schema.mutable(Schema.Array(GptMessage)));
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,
@@ -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, makeRef, useSpace } from '@dxos/react-client/echo';
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: makeRef(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'
@@ -2,9 +2,9 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import { createSystemPrompt } from '@dxos/artifact';
5
+ import { createSystemPrompt } from '@dxos/assistant';
6
6
  import { ObjectId } from '@dxos/echo-schema';
7
- import type { ServiceContainer } from '@dxos/functions';
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
  );