- README: what AI off still runs, exactly; what is passed on (nothing
but the question from a full-screen program; a shell over ssh named as
that machine's; the password case as the heuristic it is; context files
removed at once or within ten minutes); suggestions only at a prompt and
taken as drawn; answers bound to what was shown; the status record by
variable decides nothing; settings per pane and not read with AI off;
set-up refuses root and another version's release; TERM_PROGRAM kept on
purpose; screen_lines in the sample; the shell's autocomplete gone.
- llembas/README.md: every function of wezterm.llembas; contracts 1 to 4
as the authority; --cwd as contract 3 has it; context file version 2;
the status authority, the answer lines, settings per pane, the writer
thread, the PATH listings.
- CHANGELOG: under Unreleased, Security and Fixed.
- --help names llembas-term.lua; the fifteen one-word help edits in
wezterm/src/cli carry a LLeMbas TERM: line above them, so that
git grep 'LLeMbas TERM:' lists every change of ours again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- S5: with AI off, LLeMbas: settings and LLeMbas: autocomplete status no
longer ask the CLI what it can do (they use what is known), and forgetting
a directory's settings is an AI key like the others. A test switches
everything with AI off and counts no process, then the AI switch: the
store keeps it and the settings are read.
- S1/S2: while the pane's own shell runs ssh, a shell on the other machine
that says it is at its prompt may have suggestions drawn - nothing else
follows from its word (no mark, no history, the file untouched).
- Tests: M3 (a display that ends gives the question back with what it
said; a split that fails; an ask line already open waits), S4 (two
windows, two directories), S6 (an updated CLI is seen), S7 (question card:
number, n, words; the approve key does not answer it), S15 (numbered
asks; an ask that just changed is not answered; a cut value), S17 (a
shell over ssh: the display opens here, version 1 for an engine of 1).
- The smoke test asks for configure_pane, real_path and local_dir, and
hands the status over without a directory.
- Texts: "choose chat model" and "chat model" for the list and the
selector; "the LLeMbas CLI's own choice"; the built-in configuration's
comment says what a person's file starts from.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
M3. Asked from a full-screen program with nothing of its screen asked
about, the context had nothing in it; the engine refuses such a file and a
display started with one never started. Now no file is written and the
question goes alone. A display that ends before it took a question gives
it back: the ask line opens again with the question on it and what the
display said last before it ended.
S1. What a pane says of its shell by user variable is only what it said.
A record the shell of this machine wrote itself (its process id, no via)
and whose shell still runs is the authority: a user variable never
replaces that file, and only it puts a command into the history, has the
input mark written, and numbers the blocks of a context.
S2. A suggestion is drawn and taken, and the AI asked, only while the
shell's record says it is at its prompt (or there is none); the AI only
while the program in front is a shell.
S3. The ask line opens at once from what is known; the settings and the
model are asked of the engine after, and the prefix follows. Answers and
stop no longer wait for the settings either.
S4. The settings that apply are the pane's own directory's: the layer says
them per pane (wezterm.llembas.configure_pane), so two windows in two
directories each keep theirs.
S5. With AI off nothing of the engine is started to read or keep a
setting, but the AI switch itself; a choice made then holds until the
terminal closes. The store's machine-wide values apply in a directory not
read yet.
S6. What the CLI can do is asked again after a minute, and at once when
it lacked what was needed (it may have been updated).
S7. A question card is answered on the ask line: a number, n, or words;
the notice says so, and the approve key says where the answer goes.
S8. A question that waits for a starting display keeps its context file
and sends it; an older waiting one's file goes at once; left-over files
are swept once a minute while any was written.
S10. A suggestion holds nothing invisible (format characters, bidi,
zero-width, variation selectors, tags, separators: filtered in the crate,
for history too); a key takes exactly what was drawn (a cut suggestion its
drawn part); and none is taken while a key sent to the shell is not on
its screen yet.
S12. No stat per word typed: the directories of PATH are listed at most
once a minute; nothing on a network or automounted file system is looked
at; whether an input line stands is read from the rows already fetched;
input marks and history lines are written by one thread of their own.
S13. The status directory is always this terminal's own: one inherited
from a terminal that started it, or set in the configuration, is not used.
S15. An answer is bound to what was asked: a number the engine gives what
it asks (approval#7 …) goes with the answer (/approve 7); without one, an
ask that changed a moment ago is not answered ("read it, then answer
again"). A cut value says that the rest is in the display.
S17. A context of a shell reached over SSH names its host (context file
version 2, with each block's seq and the exit status the shell said, for
an engine that reads it); the display starts in a directory of this machine.
S18. A notice whose display is gone is taken away at once.
Also: one answer for "is this pane's shell on this machine"
(wezterm.llembas.local_dir); dead complete::run and Log::clear only in
tests; the minimum-version check for a CLI that does not say what it can
do is gone (any such CLI is too old, said with the key that still works).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A pane counted as "the display", or as a pane running LLeMbas, by user
variables alone - which any program printing to a pane can set, and which
stay set when LLeMbas was killed. The next question was then written to that
pane as a paste with Enter, and the path of a context file with it.
Now the display of a tab is the pane the layer itself split and started the
engine in, remembered by its id together with the command started there.
Everything the layer writes (a question, a context file's path, an answer, a
model, a mode) goes through one function, to that pane only, and only when
the process in front of it is seen to be the engine the layer resolved, or
the very command the layer started with that engine under it
(core.display_runs, from pane:get_foreground_process_info()). Where that
cannot be known nothing is sent, and that is said.
- user variables of another pane are not looked at; of the display they are
shown, without control or invisible characters; of a pane whose program in
front is the CLI itself they fill the bar and the tab mark
- the ask line is never typed into the CLI's own interface in a tab
- a display whose engine is gone is forgotten: the next question starts a new
one and closes the old pane
- the shell that keeps a failed display's sentence on screen no longer reads
from the pane (it would take the next question for its Enter); it empties
the variables a killed engine left and sleeps until Ctrl+C
- wezterm.llembas.real_path: the CLI's path with its links followed
Tests: a pane forging each variable and all of them, a forged display beside
the real one, the display's program replaced by a shell, a killed display, a
display whose process cannot be seen, a second window; 49 of the new checks
fail on the layer as it was.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The rename. Commands llembas-term, -gui, -mux-server, -setup; package llembas-term
(Replaces, Conflicts and Provides llembas-tty, so installing it removes the old one);
directories llembas-term; application id eu.llembas.term; the variables a pane sees
LLEMBAS_TERM…; the status record llembas-term-status=1, the input mark
llembas-term-input=1, the user variable llembas_term_status; the shell integration
llembas-term.sh; the workflow llembas-term.yml; every changed upstream block is marked
"LLeMbas TERM:". The terminal needs the engine's terminal contract 4 and says so in
words with an older CLI.
Carried over from the earlier name: the variables LLEMBAS_TTY… of a terminal that
started this one are dropped; a configuration file of the old name is read where it
is while there is none of the new, with a warning; command-history and
settings-chosen are copied once into a data directory that does not exist yet
(llembas-line::migrate); the set-up program prints the new line for an rc file that
has the old one.
Keys. Ctrl+Tab on the ask line switches the mode (the next tab anywhere else);
Ctrl+Shift+M and Ctrl+Alt+M open the lists of chat and autocomplete models, also
over the ask line, which then says the choice. In a pane where LLeMbas IDE says it
is in front (user variable llembas_ide=1) the chords both have are sent on to it as
the keyboard protocol's bytes and the terminal does nothing of its own; the
terminal's palette is also on Ctrl+Shift+Alt+P. The built-in configuration honours
the kitty keyboard protocol for a program that asks for it.
CI: the .deb is installed over the released llembas-tty 1.0.0-beta.5; keys are
pressed in a real window on Xvfb (not a gate).
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
- the terminal writes the input mark (pane-<n>.input beside the status
record): whether anything stands on the input line of that prompt, from
the input cells the shell integration marks. With AI on, for local panes.
- lembas complete: 8 s, and 20 s for the first request after autocomplete
is switched on or its model changes; --debug with an engine of contract 3,
whose decisions the autocomplete status shows.
- settings set and forget with --json.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The pane's directory came from the URL the shell integration reports
(file://<host><directory>) through the URL library's own conversion, which
refuses every URL that names a host. So the engine was started without
--cwd, which it requires, ended with a usage error, and its error output
was thrown away: no suggestion, no request, no word of it.
- llembas-line gains complete: whether a line is asked about (decide), the
directory of a reported URL, one request at a time (Tracker), the engine's
command line and its run (std only), and the last attempts in words. Tested
with a stand-in engine that records its arguments, input and environment.
- the engine's timeout is an option (10 s by default); the autocomplete
model chosen in the terminal is passed on; what the engine says on its
standard error is the sentence shown.
- wezterm.llembas.complete_status(), .hint() (a word that stands at the
cursor's row until it is taken away; gentle: never over a cell that shows
something) and .data_dir().
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Drawn when a pane is painted and nowhere else: nothing is written to the pane and the
terminal's model of the screen is not touched. The input line is found among the cells the
shell integration marked; the painter gets the pane's own lines with copies of the few rows
that are drawn differently.
- The rest of the line, dimmed after the cursor, from the terminal's own history of commands
it saw run (its own file, the person's alone; nothing that starts with a space, was not
found or came from a private pane). Right or End takes it, Alt+Right one word, as if typed.
- With the AI's autocomplete on, LLeMbas is asked after a pause when the history has nothing,
off the window's thread, and its answer shows in the same place.
- The command line in colours of the colour scheme's palette: the command when it exists,
options, strings, variables, operators, comments, paths that exist. Existence is looked up
only for a shell on this machine.
- A word from the terminal at the cursor's row for a moment, in place of a dialog.
- Off under a full-screen program, without shell integration, for a line of more than three
rows, under an overlay, and by its options and switches.
The layer, to the engine's contract as built: answers and stop go as lines (/approve, /deny,
/always, /stop); the display is started so that the pane stays to say why it could not; every
pane is told where the status records of this terminal are, each terminal keeping its own.
The autocomplete drawn by the shell integration is now autocomplete = 'shell'.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The ask key turns the row of the cursor into a line for a question to LLeMbas: a prefix naming
the model and the mode, and a small line editor of the terminal's own (insert, delete, word
motions, paste, earlier questions). Enter hands the line to the layer as its event; Escape or
the key again leaves it. Nothing typed there reaches the shell, and nothing is written to the
pane: it is an overlay over the pane, as the terminal's search and quick select are, drawing
the pane's own lines with the one row replaced.
- llembas/line: a crate of its own with no dependencies for what is decided about a line of
text - the editor, the shell's input line as read from the screen's cells, the terminal's own
command history, suggestions, and the parts of a command line for its colours - with its
tests. The last four are used by what comes next.
- wezterm-gui/src/llembas: the thin part between that and the terminal, and wezterm.llembas
through which the Lua layer asks for it.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
- llembas-cli.version pins the LLeMbas CLI; scripts/fetch-cli.sh fetches it
and checks SHA256SUMS against the release key before anything is bundled.
- llembas/packaging/package.sh stages /usr/lib/llembas-tty (our three
binaries and the CLI beside them), links, shell integration, desktop entry,
icons and licences, and makes the .deb and the tarball.
- .github/workflows/llembas-tty.yml: hygiene, the layer's tests, a release
build, a headless smoke test of what was built, the packages, and on a
v* tag the GitHub Release. WezTerm's workflow files are untouched;
llembas/ci/disable-upstream-workflows.sh switches them off on our repository.
- The window icon is the LLeMbas mark.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
LLeMbas TTY installs and runs beside WezTerm without touching it:
- binaries llembas-tty, llembas-tty-gui, llembas-tty-mux-server (packages keep
upstream's names);
- configuration in $XDG_CONFIG_HOME/llembas-tty/llembas-tty.lua or
~/.llembas-tty.lua; own data, cache and runtime directories;
- LLEMBAS_TTY_CONFIG_FILE / _CONFIG_DIR / _UNIX_SOCKET / _PANE / _EXECUTABLE
replace the WEZTERM_ ones, which are neither read nor passed on, so neither
program talks to the other's panes;
- window class, app id, notification id and bundle id eu.llembas.tty;
- panes get LLEMBAS_TTY=<version>; TERM_PROGRAM stays WezTerm;
- --version shows our version and the WezTerm version it is based on;
- the update check, which asks about WezTerm's releases, is off by default.
The LLeMbas layer (llembas/lua) is compiled in and offered as
require 'llembas'; with no configuration file the built-in one applies it.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Custom branch-drawing glyphs (U+F5D0..U+F60D) previously stroked fading lines (0xF5D2..0xF5D5) and BlockKey::Branches segments with PolyStyle::OutlineHeavy, matching heavy box-drawing glyphs instead of light box-drawing lines (U+2500/U+2502/U+256D..U+2570) and making strokes nearly as wide as the 2/5-radius commit circles.
Switch those strokes to PolyStyle::Outline so branch lines match standard light box-drawing weight and commit nodes remain distinct.
Fixes#8382
Co-authored-by: Yanuo Ma <220247883+yanuoma@users.noreply.github.com>
`wezterm-gui`'s `build.rs` uses `anyhow` on windows and macos. On other
platforms, such as Linux, it produces a warning about the unused build
dependency.
`wezterm-gui` already needs it as a dependency, so removing it as a
build dependency doesn't really help anything.
Thus, rather than encode the targets that use it, add a
```rust
use anyhow as _;
```
to suppress the warning by making it "used" everywhere.
MuxNotification::AssignClipboard was picking any window for clipboard
ownership. With 2+ windows open, OSC 52 from a pane in a newer window
set the clipboard owner as being an unrelated window.
Resolve the pane to its mux window and use the window that owns it,
only using the first/any window if the pane has no associated gui window
(e.g. a non-current workspace).
I know, this is a bit crappy. This variable is intended to help
with logical/physical mapping for RTL text. It is calculated
but not used.
Ideally we'd just delete this code, but this particular bit
of logic is thorny enough that I want to preserve it for
when someone does sit down to finish this bit.
Draws a braille spinner in the tab title when a pane reports
Indeterminate progress, advancing one frame every 100ms.
This only shows when no format-tab-title event is used, and
leverages some of the infra we have for git animation scheduling.
During workspace switches, the mux subscription callback would cancel itself when receiving WindowRemoved notifications for a stale mux_window_id.
This caused the render loop to stop receiving PaneOutput events, freezing
the display until next user input.
So we keep the subscription alive during transient "window not found"
conditions instead of cancelling it, and only mark it as dead when the Window
is Drop'ed.
When using WebGPU front end, creating and closing windows will cause
VM:IOSurface memory leak, due to an unreleased object reference.
Also with some other trivial memory leak prevention measures.
Fixes a bunch of warnings like this:
```
warning: hiding a lifetime that's elided elsewhere is confusing
--> window/src/os/macos/window.rs:670:23
|
670 | fn display_handle(&self) -> Result<DisplayHandle, HandleError> {
| ^^^^^ ------------- the same lifetime is hidden here
| |
| the lifetime is elided here
|
= help: the same lifetime is referred to in inconsistent ways, making the signature confusing
= note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
help: use `'_` for type paths
|
670 | fn display_handle(&self) -> Result<DisplayHandle<'_>, HandleError> {
| ++++
```
This lint was added in Rust 1.89: https://github.com/rust-lang/rust/issues/141787
Now that validating service menu items doesn't loop forever, it can be
re-enabled.
It still won't have all possible services listed until/unless validation
is implemented more thoroughly, but some are already present.
The current `pct_to_glyph` algorithm would unintentionally produce `\u{f0aa6}`
for percentages in the range 96..=100.
Use a different algorithm that:
* uses an empty circle for the first 5%
* uses a filled circle for the last 5%
* has a roughly even distribution for the rest of the range
* feat(mark-last-tab): append last tab name with '*'
I think there should be a better method instead of make the save function so crowded.
But this works for now similar to `tmux` windows. But, `tmux` is using '*' for current and '-' for last
Hardcoded '*'
* Revert "feat(mark-last-tab): append last tab name with '*'"
This reverts commit 6f11c16dd9b034977088820fbc86a4456df9d513.
* feat(tab): add is_last to indicate previous active tab - last tab.
Add usage example to format-tab-title.md
Add docs to TabInformation.md
Couldn't add tests, perhapse can you guide on adding test for this?
* Update docs/config/lua/TabInformation.md
renaming as suggested.
Co-authored-by: Wez Furlong <wez@wezfurlong.org>
* Update wezterm-gui/src/termwindow/mod.rs
renaming as suggested.
Co-authored-by: Wez Furlong <wez@wezfurlong.org>
* Update docs/config/lua/window-events/format-tab-title.md
Co-authored-by: Wez Furlong <wez@wezfurlong.org>
* refactor: rename `TabInformation` attribute to `is_last_active`
---------
Co-authored-by: Omar Elmasri <omarmasri@duck.com>
Co-authored-by: Wez Furlong <wez@wezfurlong.org>
Add below configuration option in config.colors:
- launcher_label_bg
- launcher_label_fg
If above mentioned options are not set in the configuration file then:
- launcher_label_bg defaults to default background color
- launcher_label_fg defaults to default foreground color
* fix: honor environment variables and cwd unconditionally for SpawnCommand
The SpawnCommand specifies information about a new command to be spawned.
If the args field is omitted, the default program for the target domain
is spawned. However, this also causes other fields like environment
variables and cwd to be wiped out.
The command builder now behaves consistently for all fields, whether the
args field is set or omitted.
Co-authored-by: Wez Furlong <wez@wezfurlong.org>