@dxos/react-ui-assistant 0.11.1

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 (91) hide show
  1. package/LICENSE +105 -0
  2. package/dist/lib/index.mjs +839 -0
  3. package/dist/lib/index.mjs.map +1 -0
  4. package/dist/lib/testing.mjs +214 -0
  5. package/dist/lib/testing.mjs.map +1 -0
  6. package/dist/types/src/components/ChatThread/ChatThread.d.ts +52 -0
  7. package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -0
  8. package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +38 -0
  9. package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -0
  10. package/dist/types/src/components/ChatThread/index.d.ts +2 -0
  11. package/dist/types/src/components/ChatThread/index.d.ts.map +1 -0
  12. package/dist/types/src/components/MessageChrome/MessageChrome.d.ts +28 -0
  13. package/dist/types/src/components/MessageChrome/MessageChrome.d.ts.map +1 -0
  14. package/dist/types/src/components/MessageChrome/index.d.ts +2 -0
  15. package/dist/types/src/components/MessageChrome/index.d.ts.map +1 -0
  16. package/dist/types/src/components/index.d.ts +4 -0
  17. package/dist/types/src/components/index.d.ts.map +1 -0
  18. package/dist/types/src/components/widgets/FallbackWidget.d.ts +7 -0
  19. package/dist/types/src/components/widgets/FallbackWidget.d.ts.map +1 -0
  20. package/dist/types/src/components/widgets/ReasoningWidget.d.ts +25 -0
  21. package/dist/types/src/components/widgets/ReasoningWidget.d.ts.map +1 -0
  22. package/dist/types/src/components/widgets/ReasoningWidget.stories.d.ts +18 -0
  23. package/dist/types/src/components/widgets/ReasoningWidget.stories.d.ts.map +1 -0
  24. package/dist/types/src/components/widgets/ReferenceWidget.d.ts +9 -0
  25. package/dist/types/src/components/widgets/ReferenceWidget.d.ts.map +1 -0
  26. package/dist/types/src/components/widgets/SelectWidget.d.ts +14 -0
  27. package/dist/types/src/components/widgets/SelectWidget.d.ts.map +1 -0
  28. package/dist/types/src/components/widgets/StatsWidget.d.ts +12 -0
  29. package/dist/types/src/components/widgets/StatsWidget.d.ts.map +1 -0
  30. package/dist/types/src/components/widgets/StatusWidget.d.ts +12 -0
  31. package/dist/types/src/components/widgets/StatusWidget.d.ts.map +1 -0
  32. package/dist/types/src/components/widgets/SuggestionWidget.d.ts +11 -0
  33. package/dist/types/src/components/widgets/SuggestionWidget.d.ts.map +1 -0
  34. package/dist/types/src/components/widgets/SummaryWidget.d.ts +4 -0
  35. package/dist/types/src/components/widgets/SummaryWidget.d.ts.map +1 -0
  36. package/dist/types/src/components/widgets/ToolWidget.d.ts +10 -0
  37. package/dist/types/src/components/widgets/ToolWidget.d.ts.map +1 -0
  38. package/dist/types/src/components/widgets/ToolWidget.stories.d.ts +31 -0
  39. package/dist/types/src/components/widgets/ToolWidget.stories.d.ts.map +1 -0
  40. package/dist/types/src/components/widgets/defaults.d.ts +11 -0
  41. package/dist/types/src/components/widgets/defaults.d.ts.map +1 -0
  42. package/dist/types/src/components/widgets/format-time.d.ts +2 -0
  43. package/dist/types/src/components/widgets/format-time.d.ts.map +1 -0
  44. package/dist/types/src/components/widgets/index.d.ts +11 -0
  45. package/dist/types/src/components/widgets/index.d.ts.map +1 -0
  46. package/dist/types/src/index.d.ts +6 -0
  47. package/dist/types/src/index.d.ts.map +1 -0
  48. package/dist/types/src/registry.d.ts +11 -0
  49. package/dist/types/src/registry.d.ts.map +1 -0
  50. package/dist/types/src/renderer.d.ts +25 -0
  51. package/dist/types/src/renderer.d.ts.map +1 -0
  52. package/dist/types/src/testing/index.d.ts +2 -0
  53. package/dist/types/src/testing/index.d.ts.map +1 -0
  54. package/dist/types/src/testing/test-generator.d.ts +7 -0
  55. package/dist/types/src/testing/test-generator.d.ts.map +1 -0
  56. package/dist/types/src/testing/test-generator.test.d.ts +2 -0
  57. package/dist/types/src/testing/test-generator.test.d.ts.map +1 -0
  58. package/dist/types/src/translations.d.ts +19 -0
  59. package/dist/types/src/translations.d.ts.map +1 -0
  60. package/dist/types/src/types.d.ts +28 -0
  61. package/dist/types/src/types.d.ts.map +1 -0
  62. package/dist/types/tsconfig.tsbuildinfo +1 -0
  63. package/package.json +67 -0
  64. package/src/components/ChatThread/ChatThread.stories.tsx +419 -0
  65. package/src/components/ChatThread/ChatThread.tsx +188 -0
  66. package/src/components/ChatThread/index.ts +5 -0
  67. package/src/components/MessageChrome/MessageChrome.tsx +147 -0
  68. package/src/components/MessageChrome/index.ts +5 -0
  69. package/src/components/index.ts +7 -0
  70. package/src/components/widgets/FallbackWidget.tsx +26 -0
  71. package/src/components/widgets/ReasoningWidget.stories.tsx +68 -0
  72. package/src/components/widgets/ReasoningWidget.ts +139 -0
  73. package/src/components/widgets/ReferenceWidget.ts +28 -0
  74. package/src/components/widgets/SelectWidget.ts +39 -0
  75. package/src/components/widgets/StatsWidget.ts +31 -0
  76. package/src/components/widgets/StatusWidget.ts +53 -0
  77. package/src/components/widgets/SuggestionWidget.ts +50 -0
  78. package/src/components/widgets/SummaryWidget.tsx +27 -0
  79. package/src/components/widgets/ToolWidget.stories.tsx +55 -0
  80. package/src/components/widgets/ToolWidget.tsx +185 -0
  81. package/src/components/widgets/defaults.ts +14 -0
  82. package/src/components/widgets/format-time.ts +45 -0
  83. package/src/components/widgets/index.ts +14 -0
  84. package/src/index.ts +9 -0
  85. package/src/registry.tsx +144 -0
  86. package/src/renderer.ts +216 -0
  87. package/src/testing/index.ts +5 -0
  88. package/src/testing/test-generator.test.ts +75 -0
  89. package/src/testing/test-generator.ts +280 -0
  90. package/src/translations.ts +27 -0
  91. package/src/types.ts +32 -0
@@ -0,0 +1,9 @@
1
+ import { WidgetType } from '@codemirror/view';
2
+ export declare class ReferenceWidget extends WidgetType {
3
+ private text;
4
+ private dxn;
5
+ constructor(text: string, dxn: string);
6
+ eq(other: this): boolean;
7
+ toDOM(): HTMLDivElement;
8
+ }
9
+ //# sourceMappingURL=ReferenceWidget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReferenceWidget.d.ts","sourceRoot":"","sources":["../../../../../src/components/widgets/ReferenceWidget.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAM9C,qBAAa,eAAgB,SAAQ,UAAU;IAE3C,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,GAAG;IAFb,YACU,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EAGpB;IAEQ,EAAE,CAAC,KAAK,EAAE,IAAI,WAEtB;IAEQ,KAAK,mBAIb;CACF"}
@@ -0,0 +1,14 @@
1
+ import { WidgetType } from '@codemirror/view';
2
+ /**
3
+ * Simple prompt widget.
4
+ */
5
+ export declare class SelectWidget extends WidgetType {
6
+ private options;
7
+ constructor(options: string[]);
8
+ eq(other: this): boolean;
9
+ /**
10
+ * NOTE: Container must set var based on user's identity.
11
+ */
12
+ toDOM(): HTMLDivElement;
13
+ }
14
+ //# sourceMappingURL=SelectWidget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectWidget.d.ts","sourceRoot":"","sources":["../../../../../src/components/widgets/SelectWidget.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAM9C;;GAEG;AACH,qBAAa,YAAa,SAAQ,UAAU;IAC9B,OAAO,CAAC,OAAO;IAA3B,YAAoB,OAAO,EAAE,MAAM,EAAE,EAEpC;IAEQ,EAAE,CAAC,KAAK,EAAE,IAAI,WAEtB;IAED;;OAEG;IACM,KAAK,mBAYb;CACF"}
@@ -0,0 +1,12 @@
1
+ import { WidgetType } from '@codemirror/view';
2
+ /**
3
+ * Simple stats widget.
4
+ */
5
+ export declare class StatsWidget extends WidgetType {
6
+ private text;
7
+ constructor(text: string);
8
+ eq(other: this): boolean;
9
+ toDOM(): HTMLDivElement;
10
+ updateDOM(dom: HTMLElement): boolean;
11
+ }
12
+ //# sourceMappingURL=StatsWidget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StatsWidget.d.ts","sourceRoot":"","sources":["../../../../../src/components/widgets/StatsWidget.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAM9C;;GAEG;AACH,qBAAa,WAAY,SAAQ,UAAU;IAC7B,OAAO,CAAC,IAAI;IAAxB,YAAoB,IAAI,EAAE,MAAM,EAE/B;IAEQ,EAAE,CAAC,KAAK,EAAE,IAAI,WAEtB;IAEQ,KAAK,mBAEb;IAEQ,SAAS,CAAC,GAAG,EAAE,WAAW,WAGlC;CACF"}
@@ -0,0 +1,12 @@
1
+ import { WidgetType } from '@codemirror/view';
2
+ /**
3
+ * AI status widget.
4
+ */
5
+ export declare class StatusWidget extends WidgetType {
6
+ private readonly text;
7
+ constructor(text: string);
8
+ eq(other: this): boolean;
9
+ toDOM(): HTMLDivElement;
10
+ updateDOM(dom: HTMLElement): boolean;
11
+ }
12
+ //# sourceMappingURL=StatusWidget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StatusWidget.d.ts","sourceRoot":"","sources":["../../../../../src/components/widgets/StatusWidget.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAM9C;;GAEG;AACH,qBAAa,YAAa,SAAQ,UAAU;IAC9B,OAAO,CAAC,QAAQ,CAAC,IAAI;IAAjC,YAA6B,IAAI,EAAE,MAAM,EAExC;IAEQ,EAAE,CAAC,KAAK,EAAE,IAAI,WAEtB;IAEQ,KAAK,mBAwBb;IAEQ,SAAS,CAAC,GAAG,EAAE,WAAW,WAGlC;CACF"}
@@ -0,0 +1,11 @@
1
+ import { WidgetType } from '@codemirror/view';
2
+ /**
3
+ * Simple prompt widget.
4
+ */
5
+ export declare class SuggestionWidget extends WidgetType {
6
+ private text;
7
+ constructor(text: string);
8
+ eq(other: this): boolean;
9
+ toDOM(): HTMLSpanElement;
10
+ }
11
+ //# sourceMappingURL=SuggestionWidget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SuggestionWidget.d.ts","sourceRoot":"","sources":["../../../../../src/components/widgets/SuggestionWidget.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAI9C;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,UAAU;IAClC,OAAO,CAAC,IAAI;IAAxB,YAAoB,IAAI,EAAE,MAAM,EAE/B;IAEQ,EAAE,CAAC,KAAK,EAAE,IAAI,WAEtB;IAEQ,KAAK,oBA4Bb;CACF"}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { type XmlWidgetProps } from '@dxos/ui-editor';
3
+ export declare const SummaryWidget: ({ children }: XmlWidgetProps) => React.JSX.Element;
4
+ //# sourceMappingURL=SummaryWidget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SummaryWidget.d.ts","sourceRoot":"","sources":["../../../../../src/components/widgets/SummaryWidget.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,KAAK,cAAc,EAAmB,MAAM,iBAAiB,CAAC;AAKvE,eAAO,MAAM,aAAa,iBAAkB,cAAc,sBAazD,CAAC"}
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { type XmlWidgetProps } from '@dxos/ui-editor';
3
+ export type ToolWidgetProps = XmlWidgetProps;
4
+ /**
5
+ * A run of tool blocks as one collapsible panel with a tab per call. The `<toolkit>` tag carries
6
+ * the run as JSON — the item is rebuilt from its message alone, so there is no widget-state side
7
+ * channel to accumulate blocks through.
8
+ */
9
+ export declare const ToolWidget: ({ view, children }: ToolWidgetProps) => React.JSX.Element | null;
10
+ //# sourceMappingURL=ToolWidget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToolWidget.d.ts","sourceRoot":"","sources":["../../../../../src/components/widgets/ToolWidget.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAMjF,OAAO,EAAE,KAAK,cAAc,EAAmB,MAAM,iBAAiB,CAAC;AAKvE,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC;AAE7C;;;;GAIG;AACH,eAAO,MAAM,UAAU,uBAAwB,eAAe,6BAqF7D,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { type StoryObj } from '@storybook/react-vite';
2
+ import { type ToolWidgetProps } from './ToolWidget';
3
+ declare const meta: {
4
+ title: string;
5
+ component: ({ view, children }: ToolWidgetProps) => import("react").JSX.Element | null;
6
+ decorators: import("@storybook/react").Decorator[];
7
+ parameters: {
8
+ layout: string;
9
+ translations: [{
10
+ readonly 'en-US': {
11
+ readonly "@dxos/react-ui-assistant": {
12
+ readonly 'copy.label': 'Copy';
13
+ readonly 'rewind.label': 'Rewind to this prompt';
14
+ readonly 'summary.label': 'Summary';
15
+ readonly 'stats.label': 'Stats';
16
+ readonly 'tool-call.label': 'Calling';
17
+ readonly 'tool-result.label': 'Result';
18
+ readonly 'tool-error.label': 'Tool error';
19
+ readonly 'nav-first.label': 'First message';
20
+ readonly 'nav-previous.label': 'Previous message';
21
+ readonly 'nav-next.label': 'Next message';
22
+ readonly 'nav-last.label': 'Last message';
23
+ };
24
+ };
25
+ }];
26
+ };
27
+ };
28
+ export default meta;
29
+ type Story = StoryObj<typeof meta>;
30
+ export declare const Default: Story;
31
+ //# sourceMappingURL=ToolWidget.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToolWidget.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/widgets/ToolWidget.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAMjE,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAwBhE,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;CAQyB,CAAC;eAErB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC"}
@@ -0,0 +1,11 @@
1
+ export declare const styles: {
2
+ /**
3
+ * Vertical rhythm for block widgets. Padding, never margin: CodeMirror measures a widget from its own
4
+ * box, so a margin sits outside what it can see and its height model drifts from what is rendered —
5
+ * the error accumulates down the document until the turn-fold gutter markers are visibly misaligned.
6
+ * Note padding does not collapse between adjacent siblings the way margins do
7
+ */
8
+ padding: string;
9
+ border: string;
10
+ };
11
+ //# sourceMappingURL=defaults.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../../../src/components/widgets/defaults.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM;IACjB;;;;;OAKG;IACH,OAAO;IACP,MAAM;CACP,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const formatTime: (created: string, now?: number) => string;
2
+ //# sourceMappingURL=format-time.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format-time.d.ts","sourceRoot":"","sources":["../../../../../src/components/widgets/format-time.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,UAAU,YAAa,MAAM,mBAAqB,MA4B9D,CAAC"}
@@ -0,0 +1,11 @@
1
+ export * from './format-time';
2
+ export * from './FallbackWidget';
3
+ export * from './ReasoningWidget';
4
+ export * from './ReferenceWidget';
5
+ export * from './SelectWidget';
6
+ export * from './StatsWidget';
7
+ export * from './StatusWidget';
8
+ export * from './SuggestionWidget';
9
+ export * from './SummaryWidget';
10
+ export * from './ToolWidget';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/widgets/index.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC"}
@@ -0,0 +1,6 @@
1
+ export * from './components';
2
+ export * from './registry';
3
+ export * from './renderer';
4
+ export * from './translations';
5
+ export * from './types';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { type XmlWidgetRegistry } from '@dxos/ui-editor';
2
+ /**
3
+ * Widgets for the tags {@link createRenderer} emits.
4
+ *
5
+ * Host-extensible by spreading: the plugin adds its `surface` widget (which renders an
6
+ * app-framework Surface this package must not depend on) over the fallback registered here.
7
+ * DOM widgets render synchronously from the tag alone; React widgets are portaled and declare a
8
+ * collapsed-height floor so the row's first measurement is honest.
9
+ */
10
+ export declare const assistantRegistry: XmlWidgetRegistry;
11
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/registry.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAgB,KAAK,iBAAiB,EAAmB,MAAM,iBAAiB,CAAC;AAqBxF;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,EAAE,iBA8GtB,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { type URI } from '@dxos/keys';
2
+ import { type MessageRenderer } from '@dxos/react-ui-feed';
3
+ import { type Message } from '@dxos/types';
4
+ import { type ChatView } from './types';
5
+ export type CreateRendererOptions = {
6
+ /** Resolves a reference's display label; the tag carries the DXN either way. */
7
+ getObjectLabel?: (uri: URI.URI) => string;
8
+ };
9
+ /**
10
+ * The assistant's projection of a message: each block flattened to markdown, everything that is not
11
+ * prose emitted as an XML tag for the registry's widgets. The view type is a filter over blocks —
12
+ * the model always carries everything, so switching views is a re-render, not a re-fetch.
13
+ *
14
+ * Consecutive tool blocks (`toolCall`/`toolResult`/`stats`) render as ONE `<toolkit>` tag carrying
15
+ * the run as JSON: the panel widget shows a run of calls as tabs, and the item is rebuilt from its
16
+ * message alone — there is no side channel accumulating widget state (the old `MessageSyncer`
17
+ * machinery this package retires).
18
+ */
19
+ export declare const createRenderer: (viewType: ChatView | undefined, { getObjectLabel }?: CreateRendererOptions) => MessageRenderer;
20
+ /**
21
+ * What a row will measure, from the message alone. Rough on purpose — its only job is to be close
22
+ * enough that measuring the row does not move the rows below it.
23
+ */
24
+ export declare const estimateRow: (message: Message.Message) => number;
25
+ //# sourceMappingURL=renderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../../src/renderer.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAqB,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AAE9D,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,MAAM,qBAAqB,GAAG;IAClC,gFAAgF;IAChF,cAAc,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,KAAK,MAAM,CAAC;CAC3C,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,aACf,QAAQ,GAAG,SAAS,uBACO,qBAAqB,KACzD,eA4CF,CAAC;AAiHF;;;GAGG;AACH,eAAO,MAAM,WAAW,YAAa,OAAO,CAAC,OAAO,KAAG,MA0BtD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './test-generator';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/testing/index.ts"],"names":[],"mappings":"AAIA,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import * as Effect from 'effect/Effect';
2
+ import { Database, Feed } from '@dxos/echo';
3
+ import { type Actor, type ContentBlock, Message } from '@dxos/types';
4
+ export declare const createMessage: (role: Actor.Role, blocks: ContentBlock.Any[]) => Message.Message;
5
+ export type MessageGenerator = Effect.Effect<void, never, Database.Service | Feed.ContextFeedService>;
6
+ export declare const createMessageGenerator: () => MessageGenerator[];
7
+ //# sourceMappingURL=test-generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-generator.d.ts","sourceRoot":"","sources":["../../../../src/testing/test-generator.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAO,MAAM,YAAY,CAAC;AAIjD,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,YAAY,EAAE,OAAO,EAAgB,MAAM,aAAa,CAAC;AAGnF,eAAO,MAAM,aAAa,SAAU,KAAK,CAAC,IAAI,UAAU,YAAY,CAAC,GAAG,EAAE,KAAG,OAAO,CAAC,OAMpF,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,IAAI,CAAC,kBAAkB,CAAC,CAAC;AAEtG,eAAO,MAAM,sBAAsB,QAAO,gBAAgB,EAgQzD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=test-generator.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-generator.test.d.ts","sourceRoot":"","sources":["../../../../src/testing/test-generator.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,19 @@
1
+ export declare const translationKey = "@dxos/react-ui-assistant";
2
+ export declare const translations: [{
3
+ readonly 'en-US': {
4
+ readonly "@dxos/react-ui-assistant": {
5
+ readonly 'copy.label': 'Copy';
6
+ readonly 'rewind.label': 'Rewind to this prompt';
7
+ readonly 'summary.label': 'Summary';
8
+ readonly 'stats.label': 'Stats';
9
+ readonly 'tool-call.label': 'Calling';
10
+ readonly 'tool-result.label': 'Result';
11
+ readonly 'tool-error.label': 'Tool error';
12
+ readonly 'nav-first.label': 'First message';
13
+ readonly 'nav-previous.label': 'Previous message';
14
+ readonly 'nav-next.label': 'Next message';
15
+ readonly 'nav-last.label': 'Last message';
16
+ };
17
+ };
18
+ }];
19
+ //# sourceMappingURL=translations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,6BAA6B,CAAC;AAEzD,eAAO,MAAM,YAAY;;;qBAIjB,YAAY,EAAE,MAAM;qBACpB,cAAc,EAAE,uBAAuB;qBACvC,eAAe,EAAE,SAAS;qBAC1B,aAAa,EAAE,OAAO;qBACtB,iBAAiB,EAAE,SAAS;qBAC5B,mBAAmB,EAAE,QAAQ;qBAC7B,kBAAkB,EAAE,YAAY;qBAChC,iBAAiB,EAAE,eAAe;qBAClC,oBAAoB,EAAE,kBAAkB;qBACxC,gBAAgB,EAAE,cAAc;qBAChC,gBAAgB,EAAE,cAAc;;;EAIT,CAAC"}
@@ -0,0 +1,28 @@
1
+ import * as Schema from 'effect/Schema';
2
+ /**
3
+ * Which projection of the thread the reader sees. A view is a filter over blocks, applied by the
4
+ * renderer — the model always carries everything.
5
+ *
6
+ * - `summary`: only conversational text (prompts and replies).
7
+ * - `normal`: everything except reasoning.
8
+ * - `thinking`: everything, reasoning included.
9
+ * - `debug`: every block, raw fallbacks visible.
10
+ */
11
+ export declare const ChatView: Schema.Union<readonly [Schema.Literal<"normal">, Schema.Literal<"summary">, Schema.Literal<"thinking">, Schema.Literal<"debug">]>;
12
+ export type ChatView = Schema.Schema.Type<typeof ChatView>;
13
+ /**
14
+ * What the thread reports outward. Deliberately the same shapes the assistant plugin's event bus
15
+ * speaks, so a host can pipe these straight through.
16
+ */
17
+ export type ChatThreadEvent =
18
+ /** A suggestion or select option was chosen — the text is ready to submit. */
19
+ {
20
+ type: 'submit';
21
+ text: string;
22
+ }
23
+ /** Soft-fork the thread from the given message (the prompt toolbar's rewind). */
24
+ | {
25
+ type: 'rewind';
26
+ id: string;
27
+ };
28
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC;;;;;;;;GAQG;AACH,eAAO,MAAM,QAAQ,mIAKnB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,QAAQ,CAAC,CAAC;AAE3D;;;GAGG;AACH,MAAM,MAAM,eAAe;AACzB,8EAA8E;AAC5E;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE;AAClC,iFAAiF;GAC/E;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC"}