-
Notifications
You must be signed in to change notification settings - Fork 20.6k
ui: added single line reasoning preview #23601
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
Merged
allozaur
merged 14 commits into
ggml-org:master
from
gugugiyu:magicexists/reasoning-previews
Jun 4, 2026
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
b63c6ef
webui: added single line reasoning preview.
gugugiyu c521b93
patch: reduce width slightly for the previewing section
gugugiyu 6118b83
refactor: move formatter constants to the right file
gugugiyu ad84705
feat: reimplement reasoning preview with throttled dynamic per-line r…
gugugiyu fbea873
chore: fix spacing
gugugiyu 0427cd4
chore: refactor to requested changes
gugugiyu 976e271
refactor: grouped by capture pattern instead of block-level + inline
gugugiyu fde29f0
ui: fax interrupt state only trigger for 1st reasoning message
gugugiyu f9722ac
chore: make reasoning preview respects showThoughtInProgress setting
gugugiyu c36223d
chore; newline at EOF
gugugiyu 84d0d67
fix: thread rawContent so collapsible content can handle compute preview
gugugiyu 22ca4e6
patch: showThoughtInProgress accidentally blocks rawContent being passed
gugugiyu 6b25e75
chore: fix lint
gugugiyu 0e4a24c
chore: change smoke test
gugugiyu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| /** | ||
| * Creates a reactive throttle key that increments when `getValue()` changes | ||
| * and the throttle window has elapsed since the last increment. | ||
| * | ||
| * Useful for throttling animations that should not fire on every rapid update. | ||
| * | ||
| * @param getValue - A reactive getter for the value to watch | ||
| * @param ms - Throttle window in milliseconds | ||
| * @returns A reactive number that increments when the throttled value changes | ||
| */ | ||
| export function useThrottle(getValue: () => string | undefined, ms: number) { | ||
| let key = $state(0); | ||
| let throttleEnd = $state(0); | ||
| let lastValue: string | undefined = getValue(); | ||
|
|
||
| $effect(() => { | ||
| const value = getValue(); | ||
| if (value === lastValue) return; | ||
| const now = Date.now(); | ||
| if (now >= throttleEnd) { | ||
| lastValue = value; | ||
| key++; | ||
| throttleEnd = now + ms; | ||
| } | ||
| }); | ||
|
|
||
| return { | ||
| get key() { | ||
| return key; | ||
| } | ||
| }; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.