-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat(ui): Added UI component for reasoning models #4075
base: main
Are you sure you want to change the base?
Conversation
findMatches( | ||
MARKDOWN_THINK_REGEX, | ||
ThinkPlaceholder, | ||
(match: RegExpExecArray) => ({ | ||
content: decodeURIComponent(match[1]) | ||
}) | ||
) |
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.
instead of converting from PLACEHOLDER_THINK_REGEX format to MARKDOWN_THINK_REGEX format, can we just use PLACEHOLDER_THINK_REGEX here to render the think content?
@@ -396,6 +406,29 @@ export function ErrorMessageBlock({ | |||
) | |||
} | |||
|
|||
function ThinkPlaceholder({ content }: { content: string }): JSX.Element { |
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.
function ThinkPlaceholder({ content }: { content: string }): JSX.Element { | |
function ThinkBlock({ content }: { content: string }): JSX.Element { |
nit
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.
could you also attached a screen recording (we generally use jam.dev) to demonstrate the feature? thanks!
Related issue #3977
Adds a collapsible section that contains the reasoning steps of models such as deepseek-r1.
https://jam.dev/c/56380060-dbfa-4746-9cbd-f41ee3a4375c
Has light and dark variation.
Currently unable to collapse component during reasoning.
Before:
