-
-
Notifications
You must be signed in to change notification settings - Fork 926
tsunami / builder updates (jsfuncs, devtools, gpt-5.4, etc) #3226
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
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c26e6f3
added a JS outlet to tsunami. enables native copy (and other things)
sawka f5d8ed6
better and more generic js event handlers
sawka c55631d
builder window updates, use gpt-5.4, webview/devtools fixes, scrollba…
sawka a086179
fix go docs
sawka 9dce6c5
type import for webview tag
sawka d63a1d7
remove downlevel iterator setting
sawka 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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
🧩 Analysis chain
🏁 Script executed:
git ls-files | head -20Repository: wavetermdev/waveterm
Length of output: 662
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 760
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 2515
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 105
🏁 Script executed:
rg -n "isValidMode|BuilderAIModeConfigs" frontend/app/aipanel/ -A 3Repository: wavetermdev/waveterm
Length of output: 2113
🏁 Script executed:
rg -n "const.*isValidMode|function.*isValidMode|export.*isValidMode" frontend/ -A 5Repository: wavetermdev/waveterm
Length of output: 46
🏁 Script executed:
cat -n frontend/app/aipanel/aimode.tsx | head -100Repository: wavetermdev/waveterm
Length of output: 4536
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 629
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 636
🏁 Script executed:
rg -n "return.*isValidMode|const.*modes" frontend/app/aipanel/waveai-model.tsx -A 2 -B 2Repository: wavetermdev/waveterm
Length of output: 46
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 633
🏁 Script executed:
rg -n "defaultModeAtom" frontend/app/aipanel/waveai-model.tsxRepository: wavetermdev/waveterm
Length of output: 382
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 1353
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 413
🏁 Script executed:
rg -n "telemetryrequired|TelemetryRequired" frontend/app/aipanel/ -i -A 2Repository: wavetermdev/waveterm
Length of output: 1232
🏁 Script executed:
cat -n frontend/app/aipanel/telemetryrequired.tsx | head -50Repository: wavetermdev/waveterm
Length of output: 2718
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 1736
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 2760
🏁 Script executed:
rg -n "telemetry.*builder|builder.*telemetry" frontend/app/aipanel/ -i -B 2 -A 2Repository: wavetermdev/waveterm
Length of output: 551
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 1886
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 1814
🏁 Script executed:
rg -n "SetRTInfoCommand|req\.AIMode|invalid" frontend/app/aipanel/waveai-model.tsx -B 2 -A 2Repository: wavetermdev/waveterm
Length of output: 1330
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 5799
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 2451
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 1806
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 690
🏁 Script executed:
rg -n "unknown" frontend/app/aipanel/waveai-model.tsx -B 2 -A 2Repository: wavetermdev/waveterm
Length of output: 552
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 46
🏁 Script executed:
rg -n "aimode" frontend/app/aipanel/aipanel.tsx -B 3 -A 3Repository: wavetermdev/waveterm
Length of output: 837
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 815
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 1658
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 3101
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 46
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 4099
🏁 Script executed:
rg -n "invalid.*mode|AIMode.*invalid" pkg/aiusechat/ -B 3 -A 3Repository: wavetermdev/waveterm
Length of output: 501
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 605
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 788
Return
"unknown"instead of hard-coded"invalid"for telemetry-disabled builder mode, and consider an explicit guard insetAIModeToDefault().When
inBuilder && !telemetryEnabled,defaultModeAtomreturns"invalid"(line 146). While the frontend UI is blocked viaallowAccess = false(line 274) and showsTelemetryRequiredMessage, the hard-coded sentinel creates two issues:Inconsistency: Non-builder telemetry-disabled mode returns
"unknown"(line 152), but builder returns"invalid". If any code path bypasses the UI block or if a race condition occurs,isValidMode("invalid")returnsfalseand the backend rejects with"invalid AI mode: invalid"(pkg/aiusechat/usechat-mode.go:291).Circular fallback logic:
setAIModeToDefault()(line 447) callsglobalStore.get(this.defaultModeAtom), which can return"invalid"in the builder case. If called, this creates a scenario where the default itself is invalid.Align with the non-builder pattern by returning
"unknown"instead, and consider adding an explicit guard insetAIModeToDefault()to prevent propagating an invalid default.🤖 Prompt for AI Agents