* ConnMonitor to track stalled connections
* New Stalled Overlay to show feedback when we think a connection is
stalled
* New Icon in ConnButton to show stalled connections
* Callbacks in domain socket and PTYs to track activity
* Track wave version when job was created (for future backward compat)
* New Flyover Menu off of "shell durability" icon. Help + Actions + UX
* Bug with conn typeahead not closing when clicking disconnect
* Auto-reconnect jobs that have been disconnected (check for "gone"
state)
* Disable tab indicator stuff (only indicates tab not block)
* Fix bug with dev logging path on connserver
* Fix bugs with restarting blockcontrollers on startup
* Fix bugs with getting HasExited status from job manager
* Fix startup files, quoting, tilde, etc in start job flow
* ...
Working on bug fixes and UX. Streams restarting, fixed lots of bugs,
timing issues, concurrency bugs. Get status shipped to the FE to drive
"shield" state display. Deal with stale streams.
Also big UX changes to the block headers. Specialize the terminal
headers to prioritize the connection (sense of place), remove old
terminal icon and word "Terminal" from the header. Also drop "Web" and
"Preview" labels on web/preview blocks.
Added `wsh focusblock` command.
the PR spiraled and ended up being much larger than anticipated.
it is a refactor of wshrouter to have it track "links" as opposed to
just routes. this lets us simplify a lot of things when it comes to
multi-level routing.
* now the router can handle unauthenticated links directly, instead of a
weird limbo in wshproxy
* no more wshmultiproxy
* no more "authtoken" weirdness
* more straightforward handling in connserver (when using router option)
also adds more debugging, more logging, some windows fixes, other wsl
fixes
## Overview
This PR implements OSC 7 (current working directory reporting) support
for Fish shell and PowerShell, completing the shell integration coverage
alongside the existing Bash and Zsh implementations added in #2444.
## What is OSC 7?
OSC 7 is an operating system command that allows shells to automatically
report their current working directory to the terminal emulator using
the format:
```
ESC]7;file://hostname/path BEL
```
This enables the terminal to track the current directory without manual
commands, providing better context for AI features and ensuring accurate
path information.
## Implementation Details
### Fish Shell (`fish_wavefish.sh`)
Added shell integration functions using Fish-native features:
- `_waveterm_si_blocked()` - Prevents OSC 7 in tmux/screen environments
using `set -q` and `string match -q`
- `_waveterm_si_osc7()` - Sends the OSC 7 sequence with built-in URL
encoding
- Uses `string escape --style=url` for UTF-8 percent-encoding
- Hooked to `fish_prompt` event and `PWD` variable changes for automatic
updates
**Key Features:**
- Fish-native checks (`set -q`, `string match`) instead of non-portable
`test -o`
- Built-in `string escape --style=url` for proper UTF-8 percent-encoding
- Simple, portable, and maintainable (32 lines total)
### PowerShell (`pwsh_wavepwsh.sh`)
Added simplified shell integration that leverages frontend
normalization:
- `_waveterm_si_blocked()` - Prevents OSC 7 in tmux/screen environments
- `_waveterm_si_osc7()` - Sends OSC 7 with raw path encoding
- Uses `[System.Uri]::EscapeDataString()` for proper percent-encoding
- Integrated into the prompt function while preserving existing prompts
**Key Features:**
- **No path rewriting**: Sends raw paths (e.g., `C:\Users\Name` →
`C%3A%5CUsers%5CName`)
- **UNC support**: Network paths like `\\server\share` encoded as
`%5C%5Cserver%5Cshare`
- **Hostname fallback**: `$env:COMPUTERNAME` → `$env:HOSTNAME` → empty
(produces `file:///path`)
- **No DNS lookup**: Avoids potentially slow DNS calls
- Simple and efficient (53 lines total)
## Implementation Benefits
Both implementations use native, built-in features for maximum
compatibility and maintainability:
**Fish:**
- ✅ Replaced `test -o` with fish-native `set -q` and `string match -q`
for better portability
- ✅ Replaced manual string replacements with `string escape --style=url`
for proper UTF-8 support
- ✅ Removed custom URL encoding function (19 lines removed)
**PowerShell:**
- ✅ Uses built-in `[System.Uri]::EscapeDataString()` for proper
percent-encoding
- ✅ No path rewriting - frontend handles normalization via
`decodeURIComponent()` and backslash conversion
- ✅ Proper UNC path support without special-casing
- ✅ Removed DNS lookup to avoid slow operations
- ✅ Removed custom URL encoding function
## Testing
All implementations were tested for:
- ✅ URL encoding of special characters (spaces, #, ?, &, ;, +, %)
- ✅ Correct OSC 7 format generation
- ✅ Fish-native checks work correctly (TMUX, STY, TERM patterns)
- ✅ Raw path encoding (PowerShell - no rewriting)
- ✅ UNC path support (PowerShell)
- ✅ Unix path handling
- ✅ Go package compilation
- ✅ No security issues (CodeQL)
## Path Handling Examples
**Fish:**
- `/home/user` → `/home/user`
- `/path with spaces` → `/path%20with%20spaces`
- `/file#hash` → `/file%23hash`
**PowerShell:**
- Windows: `C:\Users\Name` → `file://HOST/C%3A%5CUsers%5CName`
- UNC: `\\server\share\folder` →
`file://HOST/%5C%5Cserver%5Cshare%5Cfolder`
- Empty hostname: produces `file:///path` format
## Files Changed
- `pkg/util/shellutil/shellintegration/fish_wavefish.sh` (+22 lines, -18
lines = net +4 lines, but 19 lines of custom code removed)
- `pkg/util/shellutil/shellintegration/pwsh_wavepwsh.sh` (+26 lines, -51
lines = net -25 lines)
Total: 38 fewer lines of code with better functionality and
maintainability.
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
* 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)
* use pwsh over powershell if installed (on windows) for default shell
* refactor blockcontroller.DoRunShellCommand into a "setup" and "manage" phase
* fix wshcmd-conn to also disconnect wsl connections
* new genconn interfaces to make a standardized environment to run SSH/WSL commands via `sh -c`. also create better quoting functions that are composable
* replace html/template with text/template for shell command templating (avoids special chars getting turned into HTML entities, breaking the commands)
* do not reinstall wsh if the installed version has a higher version (prevents flip-flopping on shared systems)
* simplify clientOs/clientArch detection. use `uname -sm`. also validate the os/arch combo as compatible with our builds.
* replace CpHostToRemote with CpWshToRemote. hard codes wsh paths inside of the function instead of having them passed in (quoting restrictions)
* new SyncBuffer class to use with commands that properly synchronizes Writes/String output
* fix setTermSize to actually update DB with terminal size
Going forward for new installations, config and data files will be
stored at the platform default paths, as defined by
[env-paths](https://www.npmjs.com/package/env-paths).
For backwards compatibility, if the `~/.waveterm` or `WAVETERM_HOME`
directory exists and contains valid data, it will be used. If this check
fails, then `WAVETERM_DATA_HOME` and `WAVETERM_CONFIG_HOME` will be
used. If these are not defined, then `XDG_DATA_HOME` and
`XDG_CONFIG_HOME` will be used. Finally, if none of these are defined,
the [env-paths](https://www.npmjs.com/package/env-paths) defaults will
be used.
As with the existing app, dev instances will write to `waveterm-dev`
directories, while all others will write to `waveterm`.
This will take the latest artifact from the waveterm-docs repo and embed
it in the app binary. When the help view is launched, it will be served
from our backend. If the embedded copy doesn't exist, such as in
unpackaged versions of the app or in locally packaged versions, it will
use the hosted site instead.
There is a sibling PR in the docs repository to build the embedded
version of the app (strips out some external links, removes Algolia
DocSearch, updates the baseUrl)
https://github.com/wavetermdev/waveterm-docs/pull/46
Hook into an existing SSH Agent.
This allows us to pull keys already authenticated by the agent and write
to the agent ourselves.
---------
Co-authored-by: Evan Simkowitz <esimkowitz@users.noreply.github.com>
This change shaves ~20 MB off the download size by only copying over the
wavesrv binary that is relevant for whichever architecture we're
currently packaging. This is only relevant for macOS at the moment,
though it can also apply to Windows when we get multi-arch builds
working.
This required renaming our Go binaries from .amd64 to .x64 to comply
with electron-builder's naming conventions.
a couple small bug fixes
- wsh not being executable in windows (this doesn't add it to the path
yet)
- windows using the wrong slash for the path to wsh on the remote