Commit graph

607 commits

Author SHA1 Message Date
Mike Sawka
3c3c665ac2
fix tool approval lifecycle to match SSE connection, not keep-alives (#2693)
tie the tool approvals to the lifecycle of the SSE connection, NOT FE
keepalive packets. this prevents timeouts when the FE hasn't rendered
the tools (or FE tool rendering lifecycle issues). also allows immediate
timeouts on refresh.

other small fixes: convert to use wshclient in wshcmd-*.go files,
cleanup in SSE code
2025-12-18 16:43:59 -08:00
Mike Sawka
cd7a940209
Docs and v0.13.1 release notes (#2687) 2025-12-16 09:30:28 -08:00
Mike Sawka
667de56198
updates to allow wave ai panel to function without telemetry with BYOK/local models (#2685)
* lots of changes to how aimodes are shown on frontend
* backend now requires aimode to be sent with request
* diagnostic ping
2025-12-16 09:06:56 -08:00
Andy_Allan
f622c658b0
feat: implement SSH agent for Windows with tests (#2644)
#2643 

## Implementation
1. Add platform-aware identity-agent dialing: on Window, default to `//./pipe/openssh-ssh-agent`.
2. Keep Unix agent dialing via Unix sockets; unify agent resolution
across platforms.
3. Add cross-platform unit tests covering dialer selection and failure
paths.
2025-12-15 11:05:11 -08:00
Mike Sawka
fbb0c4d052
windows, have a new "local" conn option for Git Bash if installed (#2666) 2025-12-12 14:05:48 -08:00
Mike Sawka
a5599e9105
QoL and Layout Fixes for Windows (#2661)
* remove title bar on windows windows
* re-integrate native controls into our tab bar
* remove menu completely (weird "Alt" activation)
* actually fix Ctrl-V in terminal
* clamp zoom levels better (0.4 - 2.6)
* simplify macos / windows drag regions (keep responsive to zoom)
* fix settings schemas for windows
2025-12-11 17:50:02 -08:00
Mike Sawka
96b397f5a6
default tool type to "function" (sometimes APIs omit this from deltas) (#2662) 2025-12-10 18:46:14 -08:00
Mike Sawka
c9c6192fc9
minor v0.13 fixes (#2649) 2025-12-08 21:58:54 -08:00
Mike Sawka
ea68aec9f4
v0.13 Release Notes, Docs Updates, Onboarding Updates (#2642) 2025-12-08 16:29:19 -08:00
Mike Sawka
f6bd5930ad
AI model compatibility, other misc fixes for release (#2641) 2025-12-05 16:23:54 -08:00
Mike Sawka
0c60f2c8a7
set Ctrl+V as a paste accelerator by default on windows (#2640) 2025-12-05 16:00:14 -08:00
Mike Sawka
0d60950915
default bracketed paste mode ON, add context menu (#2639)
We were too conservative by defaulting ignorebrackedpastemode in
xterm.js to true. it should have been set to false. this solves issues
with pasting multi-line strings into zsh, claude code, etc.

add a new context menu option to more easily disable if you're in a
weird ssh session or a REPL that doesn't support bracketedpaste.
2025-12-05 14:41:17 -08:00
Copilot
4449895424
Add Google Gemini backend for AI chat (#2602)
- [x] Add new API type constant for Google Gemini in uctypes.go
- [x] Create gemini directory under pkg/aiusechat/
- [x] Implement gemini-backend.go with streaming chat support
- [x] Implement gemini-convertmessage.go for message conversion
- [x] Implement gemini-types.go for Google-specific types
- [x] Add gemini backend to usechat-backend.go
- [x] Support tool calling with structured arguments
- [x] Support image upload (base64 inline data)
- [x] Support PDF upload (base64 inline data)
- [x] Support file upload (text files, directory listings)
- [x] Build verification passed
- [x] Add documentation for Gemini backend usage
- [x] Security scan passed (CodeQL found 0 issues)
- [x] Code review passed with no comments
- [x] Revert tsunami demo go.mod/go.sum files (per feedback - twice)
- [x] Add `--gemini` flag to main-testai.go for testing
- [x] Fix schema validation for tool calling (clean unsupported fields)
- [x] Preserve non-map property values in schema cleaning

## Summary

Successfully implemented a complete Google Gemini backend for WaveTerm's
AI chat system. The implementation:

- **Follows existing patterns**: Matches the structure of OpenAI and
Anthropic backends
- **Fully featured**: Supports all required capabilities including tool
calling, images, PDFs, and files
- **Properly tested**: Builds successfully with no errors or warnings
- **Secure**: Passed CodeQL security scanning with 0 issues
- **Well documented**: Includes comprehensive package documentation with
usage examples
- **Minimal changes**: Only affects backend code under pkg/aiusechat
(tsunami demo files reverted twice)
- **Testable**: Added `--gemini` flag to main-testai.go for easy testing
with SSE output
- **Schema compatible**: Cleans JSON schemas to remove fields
unsupported by Gemini API while preserving valid structure

## Testing

To test the Gemini backend using main-testai.go:
```bash
export GOOGLE_APIKEY="your-api-key"
cd cmd/testai
go run main-testai.go --gemini 'What is 2+2?'
go run main-testai.go --gemini --model gemini-1.5-pro 'Explain quantum computing'
go run main-testai.go --gemini --tools 'Help me configure GitHub Actions monitoring'
```


Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
2025-12-05 12:43:42 -08:00
Mike Sawka
2f92e23ece
more config updates (secrets, waveai, ai:provider) (#2631) 2025-12-05 10:10:43 -08:00
Mike Sawka
c32eb6690b
fixup macos zsh_history (merge wave history back to => ~/.zsh_history) (#2625) 2025-12-02 15:50:23 -08:00
Mike Sawka
d1ebcc9d07
new waveconfig widget, consolidate config/help in widget sidebar (#2604) 2025-11-28 11:56:59 -08:00
Mike Sawka
73e56193e7
implement openai chat completions api -- enables local model support (#2600) 2025-11-26 11:43:19 -08:00
Mike Sawka
7b99b80474
more misc builder improvements (#2592) 2025-11-24 13:37:24 -08:00
Mike Sawka
f621e61953
v0.12.4 release notes (#2590)
also stop sending OLD telemetry events (new tevents still sent)
2025-11-21 16:03:15 -08:00
Mike Sawka
cc51509fe7
add new setting term:macoptionismeta (#2589) 2025-11-21 10:54:58 -08:00
Mike Sawka
e0ca73ad53
builder secrets, builder config/data tab hooked up (#2581)
builder secrets, builder config/data tab hooked up, and tsunami cors
config env var
2025-11-21 10:36:51 -08:00
Mike Sawka
4f6aa38363
fix issue when tab does not exist in workspace (#2580)
this fixes a rare case where a workspace tries to load a tab that
doesn't exist. this allows the UI to load even despite that condition.
in addition it fixes the "delete tab" path so, even if the tab doesn't
exist, it will get cleaned up correctly out of the workspace.
2025-11-20 17:01:29 -08:00
Mike Sawka
8b246d749c
fix osc7 encoding for zsh (bad regex substitutions) (#2578) 2025-11-20 12:42:17 -08:00
Mike Sawka
6420ae9095
various AI updates (#2574)
* roundtrip image filenames correctly
* fix scrolling issue where the thumbs-up/thumbs-down buttons were cut
off
* update ai-sdk / ai-sdk react to current versions
* fix a focus issue when moving to AI panel using ctrl:shift:arrowleft
2025-11-19 13:01:29 -08:00
Mike Sawka
cd6389d1ec
Create Interface for Backend AI Providers (#2572)
Created an interface in aiusechat for the backend providers. Use that
interface throughout the usechat code. Isolate the backend
implementations to only the new file usechat-backend.go.
2025-11-19 11:38:56 -08:00
Mike Sawka
ce978c1205
More Builder Improvements + Tsunami AppInit (#2571)
* Kebab Menu + Switch App Functionality
* Updated Secrets Tab (still more to do, but closer)
* Better Error Handling (Switch to Secrets Tab)
* Add AppInit functionality to Tsunami (fixes initialization issues and
races with embedded assets, and error handling)
* Tsunami - ListStaticFiles
* Tsunami - More Robust Manifest generation (even when there are extra
stdout messages)
2025-11-19 09:41:11 -08:00
Mike Sawka
44a068833f
builder files tab (#2569) 2025-11-18 10:46:30 -08:00
Mike Sawka
7324f5babd
bump tsunami version to v0.12.3 (#2568) 2025-11-17 16:25:43 -08:00
Mike Sawka
3b97084471
fix tsunami scaffold in build (#2564) 2025-11-14 16:35:37 -08:00
Mike Sawka
6c4744bffd
dont grow events unbounded when persisting (#2560) 2025-11-14 11:04:45 -08:00
Mike Sawka
9b4f696d65
show apps icon in the widgets bar which shows a tsunami app launcher (#2554) 2025-11-14 09:34:14 -08:00
Mike Sawka
347eef289d
more builder updates (#2553)
* load manifest metadata into the FE
* builder only edits draft/ apps (convert local => draft)
* gofmt app.go after saving (AI tools and manual user save)
* dont open duplicate builder windows
* remix app context menu in waveapp
* add icon/iconcolor in appmeta and implement in the wave block frame
2025-11-13 22:47:46 -08:00
Mike Sawka
d6578b7929
update to gpt-5.1 (#2552) 2025-11-13 21:10:28 -08:00
Mike Sawka
7ac2f25b04
big improvements to waveapp builder (#2550)
* build manifest
* working on secrets injection (secretstore + secret-bindings.json)
* tool progress indicators
* build output and errors injected as the result of the edit calls so AI
gets instant feedback on edits
* change edits to not be atomic (allows AI to make better progress)
* updated binary location for waveapps
* publish button
* new partial json parser (for sending incremental tool progress
indication)
* updated tsunami view to use new embedded scaffold + config vars
* lots of work on cleaning up the output so it is more useful to users +
AI agents
* fix builder init flow
2025-11-13 17:54:17 -08:00
Mike Sawka
4da6a39303
New AI Thinking Control (#2543)
Create an AI Thinking Dropdown in Wave AI.
Quick, Balanced, or Deep which map to gpt-5-mini, gpt-5 (low thinking),
or gpt-5 (medium thinking). Also default down to Quick when no premium
requests.
2025-11-11 19:46:10 -08:00
Mike Sawka
0da0a6421e
when the AI edits a file it now triggers a rebuild and the AI gets the tool output (#2546) 2025-11-11 18:08:56 -08:00
Mike Sawka
eb3ba64121
cleaned up build output w/ "debug" lines and filtering (#2545) 2025-11-11 11:53:57 -08:00
Mike Sawka
3a08c5518d
add a 'check go version' command to RPC (#2542) 2025-11-10 22:46:56 -08:00
Mike Sawka
34062ad226
capture go build / go mod tidy output to outputcapture (#2540) 2025-11-10 19:55:46 -08:00
Copilot
f12ae1ee78
Add RenameLocalApp function to waveappstore (#2536)
## Plan: Add RenameLocalApp function to waveappstore

- [x] Analyze existing code patterns in waveappstore.go
- [x] Implement RenameLocalApp(appName string, newAppName string) error
function
  - Validate newAppName using existing validation
- Check if local/[appname] exists and rename to local/[newAppName] if it
does
- Check if draft/[appname] exists and rename to draft/[newAppName] if it
does
  - Handle errors appropriately including rollback on partial failure
- [x] Add documentation comments
- [x] Run security checks (CodeQL - no issues found)

## Summary

Successfully implemented `RenameLocalApp(appName string, newAppName
string) error` function that:
- Renames local apps in both `local/` and `draft/` namespaces
- Validates app names and checks for conflicts
- Implements proper error handling with rollback on partial failure
- Passes all security checks with zero vulnerabilities



Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
2025-11-10 16:46:52 -08:00
Mike Sawka
8c50f7b0b3
revert file telemetry (#2538) 2025-11-10 16:34:35 -08:00
Mike Sawka
e9bc34a03a
more work on tsunami builder (#2534) 2025-11-07 18:19:52 -08:00
Mike Sawka
a9db209218
Big Paste Handler Cleanup (#2535)
Handle both types of paste data. Write utility functions to normalize
paste events to {text; image}[]. Fix duplication issue (call
preventDefault() early). Handle multiple image pasting (by adding a
slight delay). Convert Ctrl:Shift:v to use a *native paste* which allows
capturing of images!
2025-11-07 18:15:49 -08:00
Mike Sawka
4b6a3ed330
secrets view (UI to manage wave secrets) (#2526) 2025-11-07 13:59:09 -08:00
togo01
8435958e32
feat(terminal): improve input handling for interactive CLI tools (#2523)
## Summary

This PR includes three terminal input improvements that enhance the
experience when using interactive CLI tools and IME input:

1. **Shift+Enter newline support**: Enable Shift+Enter to insert
newlines by default
2. **Image paste support**: Allow pasting images by saving them as
temporary files and pasting the file path
3. **IME duplicate input fix**: Fix duplicate text when switching input
methods during composition

## Motivation

### Shift+Enter for newlines
Currently, pressing Shift+Enter in the terminal behaves the same as
Enter, making it difficult to input multi-line commands or text in
interactive CLI tools. This change enables Shift+Enter to insert
newlines by default, matching common terminal emulator behavior.

### Image paste support
Interactive AI tools like Claude Code support receiving images through
file paths, but Wave Terminal currently doesn't support pasting images.
This change implements image paste functionality similar to iTerm2's
behavior: when an image is pasted, it's saved to a temporary file and
the path is pasted into the terminal.

### IME duplicate input fix
When using Chinese/Japanese/Korean IME in the terminal, switching input
methods with Capslock during composition causes the composed text to be
sent twice, resulting in duplicate output (e.g., "你好" becomes "你好你好").
This issue severely impacts users who frequently switch between
languages.

## Changes

### Shift+Enter newline (`frontend/app/view/term/term-model.ts`)
- Change default `shiftenternewline` config from `false` to `true`
- Send standard newline character (`\n`) instead of escape sequence
(`\^[\n`)

### Image paste (`frontend/app/view/term/term-model.ts`,
`frontend/app/view/term/termwrap.ts`)
- Add `handlePaste()` method to intercept Cmd+Shift+V paste events
- Add `handleImagePasteBlob()` to save images to `/tmp` and paste the
file path
- Detect image data in clipboard using both
`ClipboardEvent.clipboardData` and Clipboard API
- Support both screenshot paste and file copy scenarios
- Add 5MB size limit for pasted images
- Temporary files are created with format:
`waveterm_paste_[timestamp].[ext]`

### IME duplicate input fix (`frontend/app/view/term/termwrap.ts`,
`frontend/app/view/term/term-model.ts`)

**IME Composition Handling:**
- Track composition state (isComposing, composingData, etc.) in TermWrap
- Register compositionstart/update/end event listeners on xterm.js
textarea
- Block all data sends during composition, only allow after
compositionend
- Prevents xterm.js from sending intermediate data during
compositionupdate phase

**Deduplication Logic:**
- Implement 50ms time window deduplication for both IME and paste
operations
- Track first send after composition, block duplicate sends from
Capslock switching
- Ensure Ctrl+Space and Fn switching work correctly (single send only)

**Edge Case Handling:**
- Add blur event handler to reset composition state on focus loss
- Add Escape key handling to cancel composition in progress

## Testing

### Shift+Enter
1. Open a terminal in Wave
2. Press Shift+Enter
3. Verify that a newline is inserted instead of executing the command

### Image paste
1. Take a screenshot and copy it to clipboard (or copy an image file in
Finder)
2. In a terminal running Claude Code, paste the image (Cmd+V or
Cmd+Shift+V)
3. Verify that the image path appears and Claude Code recognizes it

### IME Input Testing

**IME Input:**
- [x] macOS Zhuyin IME + Capslock switching - no duplicate output 
- [x] macOS Zhuyin IME + Ctrl+Space switching - normal single input 
- [x] macOS Zhuyin IME + Fn switching - normal single input 

**Regression Testing:**
- [x] English keyboard input - normal operation 
- [x] Shift+Enter multiline input - works correctly 
- [x] Text paste (Cmd+Shift+V) - no duplicates 
- [x] Image paste - works correctly 
- [x] Basic command execution (ls, echo, etc.) - normal 
- [x] Cmd+K clear terminal - works correctly 
- [x] Copy selected text (Cmd+Shift+C) - works correctly 

## Demo


https://github.com/user-attachments/assets/8341cdf9-6c57-413e-b940-89e50cc79ff0


https://github.com/user-attachments/assets/d3a6e72a-f488-45c1-ab58-88391639455a


https://github.com/user-attachments/assets/ac178abd-caf3-40bf-9ef7-7cc0567a32c3




All features have been tested successfully on macOS with Claude Code in
Wave Terminal.
2025-11-07 13:56:06 -08:00
Mike Sawka
46218827c1
fix path mismatch issue, always expand path (#2527) 2025-11-07 13:09:38 -08:00
Mike Sawka
58392f7601
new secret store impl (#2525)
adds a new secret store protected by electron's safeStorage API.
currently just hooked up to the CLI via a new wsh command: `wsh secret`.

will be used to power secrets in tsunami later (and for config +
connections)
2025-11-05 15:40:54 -08:00
Mike Sawka
8ab15ef653
better panic debug strs (#2524) 2025-11-05 14:57:10 -08:00
Mike Sawka
03f776a301
remove the redundant term_command_output tool (#2522) 2025-11-04 16:39:19 -08:00
Mike Sawka
d82672c919
track number of terminal commands run (#2519) 2025-11-04 14:41:27 -08:00