An open-source, AI-integrated, cross-platform terminal for seamless workflows
Find a file
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
.github Bump github/codeql-action from 3 to 4 in /.github/workflows (#2423) 2025-10-10 10:00:05 -07:00
.roo/rules handle reasoning deltas and display them in the UI (#2443) 2025-10-16 11:17:24 -07:00
.storybook add tailwind to wave, support shadcn + donut chart as a POC (#1775) 2025-02-04 17:58:36 -08:00
.vscode tsunami framework (waveapps v2) (#2315) 2025-09-11 14:25:07 -07:00
.zed Add basic Zed workspace configs (#1942) 2025-02-09 15:00:46 -08:00
aiprompts working on more terminal context (#2444) 2025-10-17 12:19:40 -07:00
assets Make the Wave logo icons slightly smaller (#1500) 2024-12-11 13:24:12 -08:00
build Squash some leftover bugs (#1495) 2024-12-11 12:52:15 -08:00
cmd Add Google AI file summarization package (#2455) 2025-10-17 17:24:06 -07:00
db Allow AI Presets To Automatically Update Widgets (#1954) 2025-02-13 13:38:12 -08:00
docs wsh ai example was missing -m flag (#2452) 2025-10-17 11:14:44 -07:00
emain add an onboarding upgrade modal (#2433) 2025-10-14 20:21:10 -07:00
frontend Add mobile user agent emulation for web widgets (#2454) 2025-10-17 17:45:32 -07:00
pkg Add mobile user agent emulation for web widgets (#2454) 2025-10-17 17:45:32 -07:00
public tsunami framework (waveapps v2) (#2315) 2025-09-11 14:25:07 -07:00
schema add config setting to disable overlay blocknums from showing when holding ctrl:shift (#2288) 2025-08-25 21:47:35 -07:00
testdriver touch up final test condition (#1338) 2024-11-22 17:16:04 -08:00
tests/copytests Add S3 fileshare implementation, improve cp behavior (#1896) 2025-02-14 17:27:02 -08:00
tsunami working on more terminal context (#2444) 2025-10-17 12:19:40 -07:00
.editorconfig Oops i actually made the tabs wrong (#1384) 2024-12-04 13:49:14 -08:00
.gitattributes WSL Integration (#1031) 2024-10-23 22:43:17 -07:00
.gitignore Batch Approval for AI Tool Calls, fix "AI is thinking" message, chunk JS (#2430) 2025-10-13 23:37:45 -07:00
.golangci.yml reduce some logging for prod release (#2440) 2025-10-15 22:10:00 -07:00
.prettierignore Add filewatcher for config files (#63) 2024-06-19 23:59:41 -07:00
ACKNOWLEDGEMENTS.md Add back the acknowledgements readme, update about modal link (#818) 2024-09-24 16:58:18 -07:00
BUILD.md switch from yarn to npm (#2347) 2025-09-12 15:36:03 -07:00
CNAME Move docsite to main repo (#1204) 2024-11-06 10:45:21 -08:00
CODE_OF_CONDUCT.md move some metadata files over to new repo 2024-09-18 12:04:28 -07:00
CONTRIBUTING.md Add link to Good First Issues in Contributing Guide (#1991) 2025-02-18 17:06:56 -08:00
electron-builder.config.cjs move rpm section to top level instead of under linux (#2301) 2025-08-28 15:13:29 -07:00
electron.vite.config.ts Batch Approval for AI Tool Calls, fix "AI is thinking" message, chunk JS (#2430) 2025-10-13 23:37:45 -07:00
eslint.config.js Switch to using electron-vite instead of WebPack (#45) 2024-06-13 16:49:25 -07:00
go.mod Bump github.com/shirou/gopsutil/v4 from 4.25.8 to 4.25.9 (#2418) 2025-10-10 10:12:10 -07:00
go.sum Bump github.com/shirou/gopsutil/v4 from 4.25.8 to 4.25.9 (#2418) 2025-10-10 10:12:10 -07:00
index.html add tailwind to wave, support shadcn + donut chart as a POC (#1775) 2025-02-04 17:58:36 -08:00
LICENSE Happy new year! (#1684) 2025-01-04 20:56:57 -08:00
NOTICE Happy new year! (#1684) 2025-01-04 20:56:57 -08:00
package-lock.json handle reasoning deltas and display them in the UI (#2443) 2025-10-16 11:17:24 -07:00
package.json chore: bump package version to 0.12.0 2025-10-16 05:23:52 +00:00
prettier.config.cjs Windows Line Endings (#923) 2024-10-01 12:54:15 -07:00
README.md Update README.md (#2079) 2025-03-24 23:56:53 -07:00
RELEASES.md Update more links in releases.md (#1826) 2025-01-23 17:59:16 -08:00
ROADMAP.md new tevents analytics framework (#1894) 2025-02-03 15:32:44 -08:00
SECURITY.md Add markdown alert parsing, fix buffer issue when switching files (#988) 2024-10-08 09:25:41 -07:00
staticcheck.conf standalone fixes, linting errors, speedups, QOL changes ported from wave-12 branch (#2271) 2025-08-20 18:07:11 -07:00
Taskfile.yml working on more terminal context (#2444) 2025-10-17 12:19:40 -07:00
tsconfig.json custom streamdown components for wave ai (#2404) 2025-10-08 13:22:00 -07:00
version.cjs If prerelease is false and action is none, remove the prerelease version string (#395) 2024-09-18 13:12:34 -07:00
vitest.config.ts Switch to using electron-vite instead of WebPack (#45) 2024-06-13 16:49:25 -07:00

Wave Terminal Logo

Wave Terminal

FOSSA Status

Wave is an open-source terminal that combines traditional terminal features with graphical capabilities like file previews, web browsing, and AI assistance. It runs on MacOS, Linux, and Windows.

Modern development involves constantly switching between terminals and browsers - checking documentation, previewing files, monitoring systems, and using AI tools. Wave brings these graphical tools directly into the terminal, letting you control them from the command line. This means you can stay in your terminal workflow while still having access to the visual interfaces you need.

WaveTerm Screenshot

Key Features

  • Flexible drag & drop interface to organize terminal blocks, editors, web browsers, and AI assistants
  • Built-in editor for seamlessly editing remote files with syntax highlighting and modern editor features
  • Rich file preview system for remote files (markdown, images, video, PDFs, CSVs, directories)
  • Integrated AI chat with support for multiple models (OpenAI, Claude, Azure, Perplexity, Ollama)
  • Command Blocks for isolating and monitoring individual commands with auto-close options
  • One-click remote connections with full terminal and file system access
  • Rich customization including tab themes, terminal styles, and background images
  • Powerful wsh command system for managing your workspace from the CLI and sharing data between terminal sessions

Installation

Wave Terminal works on macOS, Linux, and Windows.

Platform-specific installation instructions can be found here.

You can also install Wave Terminal directly from: www.waveterm.dev/download.

Minimum requirements

Wave Terminal runs on the following platforms:

  • macOS 11 or later (arm64, x64)
  • Windows 10 1809 or later (x64)
  • Linux based on glibc-2.28 or later (Debian 10, RHEL 8, Ubuntu 20.04, etc.) (arm64, x64)

The WSH helper runs on the following platforms:

  • macOS 11 or later (arm64, x64)
  • Windows 10 or later (arm64, x64)
  • Linux Kernel 2.6.32 or later (x64), Linux Kernel 3.1 or later (arm64)

Roadmap

Wave is constantly improving! Our roadmap will be continuously updated with our goals for each release. You can find it here.

Want to provide input to our future releases? Connect with us on Discord or open a Feature Request!

Building from Source

See Building Wave Terminal.

Contributing

Wave uses GitHub Issues for issue tracking.

Find more information in our Contributions Guide, which includes:

License

Wave Terminal is licensed under the Apache-2.0 License. For more information on our dependencies, see here.