Commit graph

831 commits

Author SHA1 Message Date
Mike Sawka
ae42e2ccce
fix padding for header buttons (tailwind regression) (#2458) 2025-10-20 10:09:34 -07:00
Copilot
665facbc7c
Add mobile user agent emulation for web widgets (#2454)
This PR adds support for mobile user agent emulation in web widgets,
enabling developers to test mobile-responsive websites directly within
WaveTerm.

## Changes

### New Meta Key: `web:useragenttype`

Added a new metadata key that accepts the following values:
- `"default"` (or `null`) - Uses the standard browser user agent
- `"mobile:iphone"` - Emulates iPhone Safari (iOS 17.0)
- `"mobile:android"` - Emulates Android Chrome (Android 13)

### User Interface

**Settings Menu**: Added a "User Agent Type" submenu to web widget
settings (accessible via right-click → Settings) with radio button
options for Default, Mobile: iPhone, and Mobile: Android.

**Visual Indicator**: When a mobile user agent is active, a mobile
device icon appears in the widget's header toolbar with an appropriate
tooltip indicating the current emulation mode.

### Implementation Details

The implementation leverages Electron's webview `useragent` attribute to
override the default user agent string. The setting is persisted in the
block's metadata and automatically applied when the webview is rendered.

User agent strings used:
- **iPhone**: `Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X)
AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148
Safari/604.1`
- **Android**: `Mozilla/5.0 (Linux; Android 13) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/120.0.6099.43 Mobile Safari/537.36`

## Use Cases

This feature is particularly useful for:
- Testing mobile-responsive web designs
- Debugging mobile-specific website behaviors
- Viewing mobile versions of websites without needing physical devices
- Web development workflows that require testing across different user
agents

## Files Changed

- `pkg/waveobj/wtypemeta.go` - Added `WebUserAgentType` field to
metadata type
- `frontend/types/gotypes.d.ts` - Generated TypeScript types for the new
meta key
- `frontend/app/view/webview/webview.tsx` - Implemented user agent
selection UI and webview configuration
- `pkg/waveobj/metaconsts.go` - Generated Go constants for the new meta
key


Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
2025-10-17 17:45:32 -07:00
Mike Sawka
38ede673aa
Add AI Response Feedback + Copy Buttons (#2457) 2025-10-17 14:18:30 -07:00
Mike Sawka
6a173a6227
working on more terminal context (#2444)
* add automatic OSC 7 support to bash and zsh
* add new wave OSC 16162 (planck length) to get up-to-date shell
information into blockrtinfo. currently implemented only for zsh. bash
will not support as rich of data as zsh, but we'll be able to do some.
* new rtinfo will be used to provide better context for AI in the
future, and to make sure AI is running safe commands.
* added a small local machine description to tab context (so AI knows
we're running on MacOS, Linux, or Windows)
2025-10-17 12:19:40 -07:00
Mike Sawka
af3279b411
handle reasoning deltas and display them in the UI (#2443) 2025-10-16 11:17:24 -07:00
Mike Sawka
38163e7633
exclude autoupdate channel in custom settings (#2438) 2025-10-15 21:20:58 -07:00
Mike Sawka
0fd0daf134
Reimplement wsh ai, fix text file attaching format (#2435) 2025-10-15 17:28:56 -07:00
Mike Sawka
0e8eb83f62
Updates to prepare for v0.12 launch (#2434)
Documentation Updates (removing AI Widget Information / deprecation)
Hover effect on tool calls shows which widget is effected
Remove AI Widget from sidebar unless there is customized presets
Backend now provides blockid (if available) to frontend for tool calls
2025-10-15 16:10:37 -07:00
Mike Sawka
50cf6b589b
add an onboarding upgrade modal (#2433) 2025-10-14 20:21:10 -07:00
Mike Sawka
2480ebe2dd
Batch Approval for AI Tool Calls, fix "AI is thinking" message, chunk JS (#2430)
We now show all Read File/Dir calls together and batch approve them
(backend change to emit them all at once, and FE change to display them
as a batch)

JS chunking for monaco, mermaid, and shiki, etc. shiki is huge, almost
10M but can't be easily split out of Streamdown. Tried making it load
async, but w/ Streamdown we can't do that easily. Trying to split the JS
up because of a build error we were running into in build-helper.
2025-10-13 23:37:45 -07:00
Mike Sawka
7e8dca8ed6
small bug fixes noticed in beta 0 (#2429) 2025-10-13 18:01:24 -07:00
Mike Sawka
822f05e379
Big Onboarding Updates (#2428) 2025-10-13 16:39:37 -07:00
Mike Sawka
b78cdbf821
fix wave ai scrolling bug (and some other small UI fixes) (#2416) 2025-10-09 23:57:23 -07:00
Mike Sawka
2463e54479
Make Block Close / Cmd-W more consistent (#2417)
Don't allow tabs with active Wave AI sessions to get closed when we
close the last block. Have Cmd-W close Wave AI if it is focused (rather
than a random node). Also fixes some lurking bugs with the pinned tab
functionality (and adds some nice visual feedback when we try to close a
pinned tab).
2025-10-09 23:57:02 -07:00
Mike Sawka
7451294f11
onboarding and polish for v0.12 (#2411) 2025-10-09 16:29:09 -07:00
Mike Sawka
fd0e75a984
New data-tooluse AI SDK packet and Tool Approvals Implemented (#2407)
provides richer information for FE to use to display tools. also implements a full approve/deny flow for tools that require approval (readfile)
2025-10-09 10:21:01 -07:00
Oleksandr Hreshchuk
7681214fa1
feat(cli): add blocks list with filtering and JSON output (#2337)
### What This Does
Adds a new `wsh blocks list` subcommand that lists all blocks in all or
specified workspace, window, or tab. Includes filtering options and JSON
output for automation.

### Motivation
Wave users had no simple way to programmatically discover block IDs for
scripting and automation. This feature:
- Enables workflows like syncing Preview widgets with `cd` changes.
- Simplifies debugging and introspection.
- Provides a foundation for future CLI enhancements (focus/close
blocks).

### Usage
```wsh blocks [list|ls|get] [--workspace=<workspace-id>] [--window=<window-id>] [--tab=<tab-id>] [--view=<view-type>] [--json]```

Where `<view-type>` can be one of: term, terminal, shell, console, web, browser, url, preview, edit, sysinfo, sys, system, waveai, ai, or assistant.

### Notes
- Fully backward compatible.
- Code follows existing CLI patterns.
2025-10-08 13:41:24 -07:00
Mike Sawka
2312752003
custom streamdown components for wave ai (#2404)
much nicer markdown display for assistant messages.  lots of fixes for code components.
2025-10-08 13:22:00 -07:00
Mike Sawka
a6c160f093
add clear history/storage for web widgets (#2383) 2025-10-07 17:15:01 -07:00
Mike Sawka
28385ce08a
update react, fix tool def (#2402) 2025-10-07 16:57:23 -07:00
Mike Sawka
d272a4ec03
New AIPanel (#2370)
Massive PR, over 13k LOC updated, 128 commits to implement the first pass at the new Wave AI panel.  Two backend adapters (OpenAI and Anthropic), layout changes to support the panel, keyboard shortcuts, and a huge focus/layout change to integrate the panel seamlessly into the UI.

Also fixes some small issues found during the Wave AI journey (zoom fixes, documentation, more scss removal, circular dependency issues, settings, etc)
2025-10-07 13:32:10 -07:00
Mike Sawka
5a95e827bf
layout simplification (#2387)
The current layout system uses a complex bidirectional atom architecture
that forces every layout change to round-trip through the backend
WaveObject, even though **the backend never reads this data** - it only
queues actions via `PendingBackendActions`. By switching to a "write
cache" pattern where local atoms are the source of truth and backend
writes are fire-and-forget, we can eliminate ~70% of the complexity
while maintaining full persistence.

----

Every layout change (split, close, focus, magnify) currently follows
this flow:

```
User action
  ↓
treeReducer() mutates layoutState
  ↓
layoutState.generation++  ← Only purpose: trigger the write
  ↓
Bidirectional atom setter (checks generation)
  ↓
Write to WaveObject {rootnode, focusednodeid, magnifiednodeid}
  ↓
WaveObject update notification
  ↓
Bidirectional atom getter runs
  ↓
ALL dependent atoms recalculate (every isFocused, etc.)
  ↓
React re-renders with updated state
```

---

## Proposed "Write Cache" Architecture

### Core Concept

```
User action
  ↓
Update LOCAL atom (immediate, synchronous)
  ↓
React re-renders (single tick, all atoms see new state)
  ↓
[async, fire-and-forget] Persist to WaveObject
```

### Key Principles

1. **Local atoms are source of truth** during runtime
2. **WaveObject is persistence layer** only (read on init, write async)
3. **Backend actions still work** via `PendingBackendActions`
4. **No generation tracking needed** (no need to trigger writes)
2025-10-03 10:10:07 -07:00
Mike Sawka
fb4125465b
move tsunami views to webviews. also fix git+ssh urls in package-lock.json (#2355) 2025-09-15 17:11:24 -07:00
Mike Sawka
77bbf74ef9
fix bug with CodeEditor/monaco model, more preview refactoring (#2353)
the primary purpose of this PR is to fix a showstopper bug in the
CodeEditor component by setting "path" to a stable UUID. the bug was
that it started as empty string, so it created a shared model between
all of the codeeditor components. now each will get their own monaco
model.

also took this opportunity to do more more preview view refactoring,
splitting up code, and more tailwind migrations.
2025-09-15 16:01:29 -07:00
Mike Sawka
50cc08a769
add tsunami view in wave (#2350)
checkpoint.  good to merge.  we have a working tsunami view inside of wave (with lots of caveats).  but enough for some dev testing.  merge so we dont drift too far from main and while we're at a stable point.
2025-09-15 12:58:59 -07:00
Mike Sawka
dc3b2c267d
mermaid support in markdown (#2348)
fix for #2248
2025-09-15 12:51:58 -07:00
Mike Sawka
3b9aab207f
refactor preview.tsx to make it more manageable (#2351)
no functionality changes, but splits the giant preview.tsx to a model
file and the sub-views for more manageable code.
2025-09-15 11:50:15 -07:00
Mike Sawka
88747742c9
switch from yarn to npm (#2347)
no need for yarn anymore in 2025 (especially yarn berry which is just an AI + githubactions nightmare). switch to the more standard npm.  update go version to 1.24 across the board.  cleanup some vite stuff, and deps.  all-around improvements.
2025-09-12 15:36:03 -07:00
Mike Sawka
9f1022cea8
pin sass back to 1.91 to prevent mixed-decls warnings (#2333)
also fix a couple small sass issues
2025-09-11 14:51:33 -07:00
Mike Sawka
e7cd584659
tsunami framework (waveapps v2) (#2315)
Huge PR.  135 commits here to rebuild waveapps into the "Tsunami" framework.

* Simplified API
* Updated system.md prompt
* Basic applications building and running
* /api/config and /api/data support
* tailwind styling
* no need for async updates
* goroutine/timer primitives for async routing handling
* POC for integrating 3rd party react frameworks (recharts)
* POC for server side components (table.go)
* POC for interacting with apps via /api/config (tsunamiconfig)

Checkpoint.  Still needs to be tightly integrated with Wave (lifecycle, AI interaction, etc.) but looking very promising 🚀
2025-09-11 14:25:07 -07:00
Mike Sawka
76afdc65ce
update widgets bar to be MUCH more responsive (#2311) 2025-08-29 13:04:22 -07:00
Mike Sawka
0f7159858e
add tooltip element (based on floating ui) (#2310) 2025-08-29 11:44:36 -07:00
Mike Sawka
5c28874f34
switch to using gpt-5-mini for free proxy (#2297) 2025-08-28 14:28:49 -07:00
Mike Sawka
d47b9f2ba8
add config setting to disable overlay blocknums from showing when holding ctrl:shift (#2288) 2025-08-25 21:47:35 -07:00
Mike Sawka
a85b658cd7
migrate to react 19 (#2272)
migrate to react 19 + fix lingering typescript errors and weirdness.
2025-08-25 21:17:15 -07:00
Mike Sawka
515863b55b
tailwind v4 updates (removing some more scss) (#2287) 2025-08-22 14:29:30 -07:00
Mike Sawka
66164ac15e
term shiftenternewline config for claude code Shift+Enter support (#2285) 2025-08-22 14:08:48 -07:00
Mike Sawka
0b07dc1665
migrate TOS modal to use tailwind (#2276)
also remove "legacy" pages in the TOS
2025-08-21 11:16:55 -07:00
Mike Sawka
c7e9e88913
migrate about modal to use tailwind (#2275) 2025-08-21 11:02:09 -07:00
Mike Sawka
7a19b9473c
fix linting errors, fix electron vite popping up index.html, docs typescript errors, etc. (#2265) 2025-08-19 15:50:25 -07:00
Mike Sawka
c66e79bc26
implement ai:proxyurl for proxy url access to different models (#2263) 2025-08-19 10:19:27 -07:00
Tenet
aaca301a14
Feat add editor fontsize (#2088)
I added editor fontsize configuration.
I found an issue that had related requirements, so I added it.
I hope I can be of some help.


![feat-editorFontsize](https://github.com/user-attachments/assets/e6b4567b-384f-4132-861d-6675ff5543de)
2025-05-02 11:10:17 -07:00
Mike Sawka
c840c39052
fix issue with directory "oversearch" causing an error with pinned rows (#2134) 2025-04-28 12:49:00 -07:00
Sylvie Crowe
6ffc3f57bd
fix: sysinfo scroll data on initialization (#2023)
A bug in sysinfo made it so the initial data would load but not update
until refreshed. This updates the subscription handler with the correct
addContinuousData function to correct this.
2025-02-21 17:53:57 -08:00
Evan Simkowitz
a1950fd6f6
Fix row pinning effect so it always runs (#2022)
The old effect wasn't running on every data change, since it depended on
table, which is a ref. Now, it will always run on any data change and as
a Layout Effect so it will run before paint.
2025-02-21 16:57:29 -08:00
Evan Simkowitz
d469432b75
Don't show .. dir on root dir (#2021) 2025-02-21 16:35:41 -08:00
Evan Simkowitz
d51ff87c26
Not found paths in prefix fs always treated as dir (#2002)
Gracefully handle prefix paths that don't exist, representing them as
directories so they can be escaped from.

Also removes the ".." file info from the backend, instead only creating
it on the frontend
2025-02-21 16:32:14 -08:00
Sylvie Crowe
1a90474830
Frontend S3 Improvements (#2018)
This adds the following changes:
- S3 icons have been changed to the database icon
- S3 icons always show up in green
- frontend crash errors are now wrapped within their block
- fileinfo errors have a special case view and display the error in the
modal
2025-02-21 12:03:09 -08:00
Sylvie Crowe
27c01cfb28
fix: dismiss the error when changing path
The error overlay used to persist even after the path was changed. This
changes this behavior so it is automatically dismissed when changing the
path.
2025-02-20 12:09:50 -08:00
Evan Simkowitz
b0e3b6d777
Fix move & copy for prefix filesystems (#1998)
Also makes recursive the default for copy, adds better error for move
without recursive
2025-02-20 10:17:32 -08:00