@assistant-ui/react 0.11.32 → 0.11.34

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 (68) hide show
  1. package/dist/client/ThreadMessageClient.d.ts.map +1 -1
  2. package/dist/client/ThreadMessageClient.js +1 -1
  3. package/dist/client/ThreadMessageClient.js.map +1 -1
  4. package/dist/client/types/Message.d.ts +3 -0
  5. package/dist/client/types/Message.d.ts.map +1 -1
  6. package/dist/legacy-runtime/runtime/MessageRuntime.d.ts +3 -0
  7. package/dist/legacy-runtime/runtime/MessageRuntime.d.ts.map +1 -1
  8. package/dist/legacy-runtime/runtime/MessageRuntime.js.map +1 -1
  9. package/dist/legacy-runtime/runtime/RuntimeBindings.d.ts +2 -1
  10. package/dist/legacy-runtime/runtime/RuntimeBindings.d.ts.map +1 -1
  11. package/dist/legacy-runtime/runtime/ThreadListRuntime.js +1 -1
  12. package/dist/legacy-runtime/runtime/ThreadListRuntime.js.map +1 -1
  13. package/dist/legacy-runtime/runtime/ThreadRuntime.d.ts +3 -4
  14. package/dist/legacy-runtime/runtime/ThreadRuntime.d.ts.map +1 -1
  15. package/dist/legacy-runtime/runtime/ThreadRuntime.js +1 -1
  16. package/dist/legacy-runtime/runtime/ThreadRuntime.js.map +1 -1
  17. package/dist/legacy-runtime/runtime-cores/core/BaseThreadRuntimeCore.d.ts +0 -3
  18. package/dist/legacy-runtime/runtime-cores/core/BaseThreadRuntimeCore.d.ts.map +1 -1
  19. package/dist/legacy-runtime/runtime-cores/core/BaseThreadRuntimeCore.js +0 -7
  20. package/dist/legacy-runtime/runtime-cores/core/BaseThreadRuntimeCore.js.map +1 -1
  21. package/dist/legacy-runtime/runtime-cores/core/ThreadRuntimeCore.d.ts +0 -1
  22. package/dist/legacy-runtime/runtime-cores/core/ThreadRuntimeCore.d.ts.map +1 -1
  23. package/dist/legacy-runtime/runtime-cores/external-store/ExternalStoreThreadRuntimeCore.js.map +1 -1
  24. package/dist/legacy-runtime/runtime-cores/external-store/ThreadMessageLike.d.ts +3 -0
  25. package/dist/legacy-runtime/runtime-cores/external-store/ThreadMessageLike.d.ts.map +1 -1
  26. package/dist/legacy-runtime/runtime-cores/external-store/ThreadMessageLike.js +4 -1
  27. package/dist/legacy-runtime/runtime-cores/external-store/ThreadMessageLike.js.map +1 -1
  28. package/dist/legacy-runtime/runtime-cores/external-store/external-message-converter.d.ts.map +1 -1
  29. package/dist/legacy-runtime/runtime-cores/external-store/external-message-converter.js +3 -0
  30. package/dist/legacy-runtime/runtime-cores/external-store/external-message-converter.js.map +1 -1
  31. package/dist/legacy-runtime/runtime-cores/external-store/getExternalStoreMessage.d.ts +1 -1
  32. package/dist/legacy-runtime/runtime-cores/external-store/getExternalStoreMessage.js.map +1 -1
  33. package/dist/legacy-runtime/runtime-cores/remote-thread-list/EMPTY_THREAD_CORE.d.ts.map +1 -1
  34. package/dist/legacy-runtime/runtime-cores/remote-thread-list/EMPTY_THREAD_CORE.js +0 -3
  35. package/dist/legacy-runtime/runtime-cores/remote-thread-list/EMPTY_THREAD_CORE.js.map +1 -1
  36. package/dist/legacy-runtime/runtime-cores/remote-thread-list/RemoteThreadListHookInstanceManager.d.ts +0 -2
  37. package/dist/legacy-runtime/runtime-cores/remote-thread-list/RemoteThreadListHookInstanceManager.d.ts.map +1 -1
  38. package/dist/legacy-runtime/runtime-cores/remote-thread-list/RemoteThreadListThreadListRuntimeCore.d.ts +0 -2
  39. package/dist/legacy-runtime/runtime-cores/remote-thread-list/RemoteThreadListThreadListRuntimeCore.d.ts.map +1 -1
  40. package/dist/primitives/actionBar/ActionBarFeedbackNegative.js +1 -1
  41. package/dist/primitives/actionBar/ActionBarFeedbackNegative.js.map +1 -1
  42. package/dist/primitives/actionBar/ActionBarFeedbackPositive.js +1 -1
  43. package/dist/primitives/actionBar/ActionBarFeedbackPositive.js.map +1 -1
  44. package/dist/primitives/message/MessageIf.js +1 -2
  45. package/dist/primitives/message/MessageIf.js.map +1 -1
  46. package/dist/tests/setup.js +201 -465
  47. package/dist/tests/setup.js.map +1 -1
  48. package/dist/types/AssistantTypes.d.ts +13 -0
  49. package/dist/types/AssistantTypes.d.ts.map +1 -1
  50. package/package.json +7 -7
  51. package/src/client/ThreadMessageClient.tsx +1 -4
  52. package/src/client/types/Message.ts +3 -0
  53. package/src/legacy-runtime/runtime/MessageRuntime.ts +3 -0
  54. package/src/legacy-runtime/runtime/RuntimeBindings.ts +2 -1
  55. package/src/legacy-runtime/runtime/ThreadListRuntime.ts +1 -1
  56. package/src/legacy-runtime/runtime/ThreadRuntime.ts +4 -7
  57. package/src/legacy-runtime/runtime-cores/core/BaseThreadRuntimeCore.tsx +0 -8
  58. package/src/legacy-runtime/runtime-cores/core/ThreadRuntimeCore.tsx +1 -2
  59. package/src/legacy-runtime/runtime-cores/external-store/ExternalStoreAdapter.tsx +1 -1
  60. package/src/legacy-runtime/runtime-cores/external-store/ExternalStoreThreadRuntimeCore.tsx +1 -1
  61. package/src/legacy-runtime/runtime-cores/external-store/ThreadMessageLike.tsx +4 -0
  62. package/src/legacy-runtime/runtime-cores/external-store/external-message-converter.tsx +5 -0
  63. package/src/legacy-runtime/runtime-cores/external-store/getExternalStoreMessage.tsx +2 -2
  64. package/src/legacy-runtime/runtime-cores/remote-thread-list/EMPTY_THREAD_CORE.tsx +0 -4
  65. package/src/primitives/actionBar/ActionBarFeedbackNegative.tsx +1 -1
  66. package/src/primitives/actionBar/ActionBarFeedbackPositive.tsx +1 -1
  67. package/src/primitives/message/MessageIf.tsx +2 -2
  68. package/src/types/AssistantTypes.ts +11 -0
@@ -44,6 +44,11 @@ export type ThreadSystemMessage = MessageCommonProps & {
44
44
  readonly role: "system";
45
45
  readonly content: readonly [TextMessagePart];
46
46
  readonly metadata: {
47
+ readonly unstable_state?: undefined;
48
+ readonly unstable_annotations?: undefined;
49
+ readonly unstable_data?: undefined;
50
+ readonly steps?: undefined;
51
+ readonly submittedFeedback?: undefined;
47
52
  readonly custom: Record<string, unknown>;
48
53
  };
49
54
  };
@@ -52,6 +57,11 @@ export type ThreadUserMessage = MessageCommonProps & {
52
57
  readonly content: readonly ThreadUserMessagePart[];
53
58
  readonly attachments: readonly CompleteAttachment[];
54
59
  readonly metadata: {
60
+ readonly unstable_state?: undefined;
61
+ readonly unstable_annotations?: undefined;
62
+ readonly unstable_data?: undefined;
63
+ readonly steps?: undefined;
64
+ readonly submittedFeedback?: undefined;
55
65
  readonly custom: Record<string, unknown>;
56
66
  };
57
67
  };
@@ -87,6 +97,9 @@ type BaseThreadMessage = {
87
97
  readonly unstable_annotations?: readonly ReadonlyJSONValue[];
88
98
  readonly unstable_data?: readonly ReadonlyJSONValue[];
89
99
  readonly steps?: readonly ThreadStep[];
100
+ readonly submittedFeedback?: {
101
+ readonly type: "positive" | "negative";
102
+ };
90
103
  readonly custom: Record<string, unknown>;
91
104
  };
92
105
  readonly attachments?: ThreadUserMessage["attachments"];
@@ -1 +1 @@
1
- {"version":3,"file":"AssistantTypes.d.ts","sourceRoot":"","sources":["../../src/types/AssistantTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,yBAAyB,EACzB,mBAAmB,EACnB,qBAAqB,EACrB,0BAA0B,EAC3B,MAAM,oBAAoB,CAAC;AAG5B,YAAY,EACV,eAAe,EACf,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,yBAAyB,EACzB,mBAAmB,EACnB,qBAAqB,EACrB,0BAA0B,GAC3B,CAAC;AAGF,MAAM,MAAM,WAAW,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;AAEhD,KAAK,kBAAkB,GAAG;IACxB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;I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
  "type": "module",
34
34
  "exports": {
@@ -48,8 +48,8 @@
48
48
  ],
49
49
  "sideEffects": false,
50
50
  "dependencies": {
51
- "assistant-cloud": "^0.1.4",
52
- "@assistant-ui/tap": "^0.1.3",
51
+ "assistant-cloud": "^0.1.5",
52
+ "@assistant-ui/tap": "^0.1.4",
53
53
  "@radix-ui/primitive": "^1.1.3",
54
54
  "@radix-ui/react-compose-refs": "^1.1.2",
55
55
  "@radix-ui/react-context": "^1.1.2",
@@ -59,7 +59,7 @@
59
59
  "@radix-ui/react-use-callback-ref": "^1.1.1",
60
60
  "@radix-ui/react-use-escape-keydown": "^1.1.1",
61
61
  "@standard-schema/spec": "^1.0.0",
62
- "assistant-stream": "^0.2.36",
62
+ "assistant-stream": "^0.2.37",
63
63
  "json-schema": "^0.4.0",
64
64
  "nanoid": "5.1.6",
65
65
  "react-textarea-autosize": "^8.5.9",
@@ -84,11 +84,11 @@
84
84
  "@stryker-mutator/core": "^9.2.0",
85
85
  "@stryker-mutator/vitest-runner": "^9.2.0",
86
86
  "@types/json-schema": "^7.0.15",
87
- "@types/node": "^24.8.1",
87
+ "@types/node": "^24.9.1",
88
88
  "eslint": "^9",
89
- "eslint-config-next": "15.5.6",
89
+ "eslint-config-next": "16.0.0",
90
90
  "tsx": "^4.20.6",
91
- "vitest": "^3.2.4",
91
+ "vitest": "^4.0.1",
92
92
  "@assistant-ui/x-buildutils": "0.0.1"
93
93
  },
94
94
  "publishConfig": {
@@ -106,10 +106,7 @@ export const ThreadMessageClient = resource(
106
106
  branchNumber,
107
107
  branchCount,
108
108
  speech: undefined,
109
- submittedFeedback:
110
- message.role === "assistant"
111
- ? message.metadata.submittedFeedback
112
- : undefined,
109
+ submittedFeedback: message.metadata.submittedFeedback,
113
110
  isCopied: isCopiedState,
114
111
  isHovering: isHoveringState,
115
112
  };
@@ -20,6 +20,9 @@ export type MessageClientState = ThreadMessage & {
20
20
  * @deprecated This API is still under active development and might change without notice.
21
21
  */
22
22
  readonly speech: SpeechState | undefined;
23
+ /**
24
+ * @deprecated Use `message.metadata.submittedFeedback` instead. This will be removed in 0.12.0.
25
+ */
23
26
  readonly submittedFeedback: SubmittedFeedback | undefined;
24
27
 
25
28
  readonly composer: ComposerClientState;
@@ -89,6 +89,9 @@ export type MessageState = ThreadMessage & {
89
89
  * @deprecated This API is still under active development and might change without notice.
90
90
  */
91
91
  readonly speech: SpeechState | undefined;
92
+ /**
93
+ * @deprecated Use `message.metadata.submittedFeedback` instead. This will be removed in 0.12.0.
94
+ */
92
95
  readonly submittedFeedback: SubmittedFeedback | undefined;
93
96
  };
94
97
 
@@ -49,6 +49,7 @@ export type MessageStateBinding = SubscribableWithState<
49
49
  readonly branchNumber: number;
50
50
  readonly branchCount: number;
51
51
  readonly speech: SpeechState | undefined;
52
+ /** @deprecated Use `message.metadata.submittedFeedback` instead. This will be removed in 0.12.0. */
52
53
  readonly submittedFeedback: SubmittedFeedback | undefined;
53
54
  },
54
55
  MessageRuntimePath
@@ -62,7 +63,7 @@ export type ThreadListItemState = {
62
63
  readonly remoteId: string | undefined;
63
64
  readonly externalId: string | undefined;
64
65
  /**
65
- * @deprecated Use `id` instead. This field will be removed in version 0.8.0.
66
+ * @deprecated Use `id` instead. This field will be removed in version 0.12.0.
66
67
  */
67
68
  readonly threadId: string;
68
69
  readonly status: ThreadListItemStatus;
@@ -67,7 +67,7 @@ const getThreadListItemState = (
67
67
  if (!threadData) return SKIP_UPDATE;
68
68
  return {
69
69
  id: threadData.id,
70
- threadId: threadData.id, // TODO remove in 0.8.0
70
+ threadId: threadData.id, // TODO remove in 0.12.0
71
71
  remoteId: threadData.remoteId,
72
72
  externalId: threadData.externalId,
73
73
  title: threadData.title,
@@ -124,14 +124,14 @@ export type ThreadListItemRuntimeBinding = SubscribableWithState<
124
124
  export type ThreadState = {
125
125
  /**
126
126
  * The thread ID.
127
- * @deprecated This field is deprecated and will be removed in 0.8.0. Use `useThreadListItem().id` instead.
127
+ * @deprecated This field is deprecated and will be removed in 0.12.0. Use `useThreadListItem().id` instead.
128
128
  */
129
129
  readonly threadId: string;
130
130
 
131
131
  /**
132
132
  * The thread metadata.
133
133
  *
134
- * @deprecated Use `useThreadListItem()` instead. This field is deprecated and will be removed in 0.8.0.
134
+ * @deprecated Use `useThreadListItem()` instead. This field is deprecated and will be removed in 0.12.0.
135
135
  */
136
136
  readonly metadata: ThreadListItemState;
137
137
 
@@ -241,7 +241,7 @@ export type ThreadRuntime = {
241
241
  append(message: CreateAppendMessage): void;
242
242
 
243
243
  /**
244
- * @deprecated pass an object with `parentId` instead. This will be removed in 0.8.0.
244
+ * @deprecated pass an object with `parentId` instead. This will be removed in 0.12.0.
245
245
  */
246
246
  startRun(parentId: string | null): void;
247
247
  /**
@@ -485,10 +485,7 @@ export class ThreadRuntimeImpl implements ThreadRuntime {
485
485
  const thread = this._threadBinding.getState();
486
486
 
487
487
  const branches = thread.getBranches(message.id);
488
- const submittedFeedback =
489
- message.role === "assistant"
490
- ? message.metadata.submittedFeedback
491
- : undefined;
488
+ const submittedFeedback = message.metadata.submittedFeedback;
492
489
 
493
490
  return {
494
491
  ...message,
@@ -126,14 +126,6 @@ export abstract class BaseThreadRuntimeCore implements ThreadRuntimeCore {
126
126
  return () => this._subscriptions.delete(callback);
127
127
  }
128
128
 
129
- public getSubmittedFeedback(messageId: string) {
130
- const messageData = this.repository.getMessage(messageId);
131
- if (messageData.message.role === "assistant") {
132
- return messageData.message.metadata.submittedFeedback;
133
- }
134
- return undefined;
135
- }
136
-
137
129
  public submitFeedback({ messageId, type }: SubmitFeedbackOptions) {
138
130
  const adapter = this.adapters?.feedback;
139
131
  if (!adapter) throw new Error("Feedback adapter not configured");
@@ -96,7 +96,6 @@ export type ThreadRuntimeCore = Readonly<{
96
96
  speak: (messageId: string) => void;
97
97
  stopSpeaking: () => void;
98
98
 
99
- getSubmittedFeedback: (messageId: string) => SubmittedFeedback | undefined;
100
99
  submitFeedback: (feedback: SubmitFeedbackOptions) => void;
101
100
 
102
101
  getModelContext: () => ModelContext;
@@ -116,7 +115,7 @@ export type ThreadRuntimeCore = Readonly<{
116
115
 
117
116
  // TODO deprecate for a more elegant solution
118
117
  // /**
119
- // * @deprecated This field is deprecated and will be removed in 0.8.0.
118
+ // * @deprecated This field is deprecated and will be removed in 0.12.0.
120
119
  // * Please migrate to using `AssistantRuntimeCore.Provider` instead.
121
120
  // */
122
121
  extras: unknown;
@@ -69,7 +69,7 @@ type ExternalStoreAdapterBase<T> = {
69
69
  onLoadExternalState?: ((state: any) => void) | undefined;
70
70
  onNew: (message: AppendMessage) => Promise<void>;
71
71
  onEdit?: ((message: AppendMessage) => Promise<void>) | undefined;
72
- onReload?: // TODO: remove parentId in 0.8.0
72
+ onReload?: // TODO: remove parentId in 0.12.0
73
73
  | ((parentId: string | null, config: StartRunConfig) => Promise<void>)
74
74
  | undefined;
75
75
  onResume?: ((config: ResumeRunConfig) => Promise<void>) | undefined;
@@ -339,7 +339,7 @@ export class ExternalStoreThreadRuntimeCore
339
339
  messages.flatMap(getExternalStoreMessage).filter((m) => m != null),
340
340
  );
341
341
  } else {
342
- // TODO mark this as readonly in v0.8.0
342
+ // TODO mark this as readonly in v0.12.0
343
343
  this._store.setMessages?.(messages as ThreadMessage[]);
344
344
  }
345
345
  };
@@ -57,6 +57,7 @@ export type ThreadMessageLike = {
57
57
  | undefined;
58
58
  readonly unstable_data?: readonly ReadonlyJSONValue[] | undefined;
59
59
  readonly steps?: readonly ThreadStep[] | undefined;
60
+ readonly submittedFeedback?: { readonly type: "positive" | "negative" };
60
61
  readonly custom?: Record<string, unknown> | undefined;
61
62
  }
62
63
  | undefined;
@@ -161,6 +162,9 @@ export const fromThreadMessageLike = (
161
162
  unstable_data: metadata?.unstable_data ?? [],
162
163
  custom: metadata?.custom ?? {},
163
164
  steps: metadata?.steps ?? [],
165
+ ...(metadata?.submittedFeedback && {
166
+ submittedFeedback: metadata.submittedFeedback,
167
+ }),
164
168
  },
165
169
  } satisfies ThreadAssistantMessage;
166
170
 
@@ -155,6 +155,11 @@ const joinExternalMessages = (
155
155
  ...output.metadata.custom,
156
156
  };
157
157
  }
158
+
159
+ if (output.metadata.submittedFeedback) {
160
+ assistantMessage.metadata.submittedFeedback =
161
+ output.metadata.submittedFeedback;
162
+ }
158
163
  }
159
164
  // TODO keep this in sync
160
165
  }
@@ -10,7 +10,7 @@ type WithInnerMessages<T> = {
10
10
  };
11
11
 
12
12
  /**
13
- * @deprecated Use `getExternalStoreMessages` (plural) instead. This function will be removed in 0.8.0.
13
+ * @deprecated Use `getExternalStoreMessages` (plural) instead. This function will be removed in 0.12.0.
14
14
  */
15
15
  export const getExternalStoreMessage = <T,>(input: ThreadMessage) => {
16
16
  const withInnerMessages = input as WithInnerMessages<T>;
@@ -22,7 +22,7 @@ const EMPTY_ARRAY: never[] = [];
22
22
  export const getExternalStoreMessages = <T,>(
23
23
  input: ThreadState | ThreadMessage | ThreadMessage["content"][number],
24
24
  ) => {
25
- // TODO temp until 0.8.0 (migrate useExternalStoreRuntime to always set an array)
25
+ // TODO temp until 0.12.0 (migrate useExternalStoreRuntime to always set an array)
26
26
 
27
27
  const container = (
28
28
  "messages" in input ? input.messages : input
@@ -48,10 +48,6 @@ export const EMPTY_THREAD_CORE: ThreadRuntimeCore = {
48
48
  throw EMPTY_THREAD_ERROR;
49
49
  },
50
50
 
51
- getSubmittedFeedback() {
52
- return undefined;
53
- },
54
-
55
51
  submitFeedback() {
56
52
  throw EMPTY_THREAD_ERROR;
57
53
  },
@@ -27,7 +27,7 @@ export const ActionBarPrimitiveFeedbackNegative = forwardRef<
27
27
  ActionBarPrimitiveFeedbackNegative.Props
28
28
  >(({ onClick, disabled, ...props }, forwardedRef) => {
29
29
  const isSubmitted = useAssistantState(
30
- (s) => s.message.submittedFeedback?.type === "negative",
30
+ (s) => s.message.metadata.submittedFeedback?.type === "negative",
31
31
  );
32
32
  const callback = useActionBarFeedbackNegative();
33
33
  return (
@@ -26,7 +26,7 @@ export const ActionBarPrimitiveFeedbackPositive = forwardRef<
26
26
  ActionBarPrimitiveFeedbackPositive.Props
27
27
  >(({ onClick, disabled, ...props }, forwardedRef) => {
28
28
  const isSubmitted = useAssistantState(
29
- (s) => s.message.submittedFeedback?.type === "positive",
29
+ (s) => s.message.metadata.submittedFeedback?.type === "positive",
30
30
  );
31
31
  const callback = useActionBarFeedbackPositive();
32
32
  return (
@@ -28,7 +28,6 @@ const useMessageIf = (props: UseMessageIfProps) => {
28
28
  branchCount,
29
29
  isLast,
30
30
  speech,
31
- submittedFeedback,
32
31
  isCopied,
33
32
  isHovering,
34
33
  } = message;
@@ -65,7 +64,8 @@ const useMessageIf = (props: UseMessageIfProps) => {
65
64
 
66
65
  if (
67
66
  props.submittedFeedback !== undefined &&
68
- (submittedFeedback?.type ?? null) !== props.submittedFeedback
67
+ (message.metadata.submittedFeedback?.type ?? null) !==
68
+ props.submittedFeedback
69
69
  )
70
70
  return false;
71
71
 
@@ -96,6 +96,11 @@ export type ThreadSystemMessage = MessageCommonProps & {
96
96
  readonly role: "system";
97
97
  readonly content: readonly [TextMessagePart];
98
98
  readonly metadata: {
99
+ readonly unstable_state?: undefined;
100
+ readonly unstable_annotations?: undefined;
101
+ readonly unstable_data?: undefined;
102
+ readonly steps?: undefined;
103
+ readonly submittedFeedback?: undefined;
99
104
  readonly custom: Record<string, unknown>;
100
105
  };
101
106
  };
@@ -105,6 +110,11 @@ export type ThreadUserMessage = MessageCommonProps & {
105
110
  readonly content: readonly ThreadUserMessagePart[];
106
111
  readonly attachments: readonly CompleteAttachment[];
107
112
  readonly metadata: {
113
+ readonly unstable_state?: undefined;
114
+ readonly unstable_annotations?: undefined;
115
+ readonly unstable_data?: undefined;
116
+ readonly steps?: undefined;
117
+ readonly submittedFeedback?: undefined;
108
118
  readonly custom: Record<string, unknown>;
109
119
  };
110
120
  };
@@ -144,6 +154,7 @@ type BaseThreadMessage = {
144
154
  readonly unstable_annotations?: readonly ReadonlyJSONValue[];
145
155
  readonly unstable_data?: readonly ReadonlyJSONValue[];
146
156
  readonly steps?: readonly ThreadStep[];
157
+ readonly submittedFeedback?: { readonly type: "positive" | "negative" };
147
158
  readonly custom: Record<string, unknown>;
148
159
  };
149
160
  readonly attachments?: ThreadUserMessage["attachments"];