Skip to content

Commit 42b70e3

Browse files
Merge pull request #175 from openai/dev/weedon/allow-basic-widgets-in-threads
Adjust types to account for BasicRoot widgets in thread items
2 parents 4b0a093 + 0950ca4 commit 42b70e3

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.changeset/real-coins-look.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@openai/chatkit': minor
3+
---
4+
5+
ChatKit threads now support BasicRoot widgets, types updated to reflect this

packages/chatkit/types/index.d.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,10 @@ export type WidgetsOption = {
192192
*/
193193
onAction?: (
194194
action: { type: string; payload?: Record<string, unknown> },
195-
widgetItem: { id: string; widget: Widgets.Card | Widgets.ListView },
195+
widgetItem: {
196+
id: string;
197+
widget: Widgets.Card | Widgets.ListView | Widgets.BasicRoot;
198+
},
196199
) => Promise<void>;
197200
};
198201

0 commit comments

Comments
 (0)