-
Notifications
You must be signed in to change notification settings - Fork 554
feat(chat): add tool input streaming support and loader in tool layout component #6947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 14 commits
43e9d36
8355da7
929f2c0
80c4486
fa6af66
c09fd2e
68bc15b
ddaf0ae
d431b2f
609b7dd
2aa21f6
29b58fb
82f571f
7e1d9f4
dc5a32b
a6acc0a
108af75
6cdad46
08721f1
2098ffa
2d97af6
7c91920
aed2537
cdea719
8a96e55
e16c8c4
60788da
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -7,6 +7,7 @@ import { createButtonComponent } from '../Button'; | |||||
| import { MenuIcon } from './icons'; | ||||||
|
|
||||||
| import type { ComponentProps, Renderer, VNode } from '../../types'; | ||||||
| import type { ChatMessageLoaderProps } from './ChatMessageLoader'; | ||||||
| import type { | ||||||
| AddToolResultWithOutput, | ||||||
| ChatMessageBase, | ||||||
|
|
@@ -135,6 +136,10 @@ export type ChatMessageProps = ComponentProps<'article'> & { | |||||
| * Array of tools available for the assistant (for tool messages) | ||||||
| */ | ||||||
| tools: ClientSideTools; | ||||||
| /** | ||||||
| * Loader component passed to tool layout components | ||||||
| */ | ||||||
| loaderComponent: (props: ChatMessageLoaderProps) => JSX.Element; | ||||||
| /** | ||||||
| * Optional suggestions element | ||||||
| */ | ||||||
|
|
@@ -171,6 +176,7 @@ export function createChatMessageComponent({ createElement }: Renderer) { | |||||
| indexUiState, | ||||||
| setIndexUiState, | ||||||
| onClose, | ||||||
| loaderComponent: LoaderComponent, | ||||||
| translations: userTranslations, | ||||||
| suggestionsElement, | ||||||
| ...props | ||||||
|
|
@@ -252,8 +258,9 @@ export function createChatMessageComponent({ createElement }: Renderer) { | |||||
| setIndexUiState={setIndexUiState} | ||||||
| addToolResult={boundAddToolResult} | ||||||
| applyFilters={tool.applyFilters} | ||||||
| sendEvent={tool.sendEvent || (() => {})} | ||||||
| sendEvent={tool.sendEvent || (() => { })} | ||||||
|
||||||
| sendEvent={tool.sendEvent || (() => { })} | |
| sendEvent={tool.sendEvent || (() => {})} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why was this resolved @shaejaz?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I thought I addressed it, will fix.
Side note: it seems like the new linting is not a 100% the same as one with eslint, I think this should have been picked up by it.
Uh oh!
There was an error while loading. Please reload this page.