Commit Graph
5 Commits
Author SHA1 Message Date
Eric Traut 6743672ad7 Add TUI composer support for prompt suggestions (#47911)
## What changed

Add `tui.prompt_suggestions`, defaulting to `false`, along with suggestion request state, a generation prompt, and strict parsing of single-line suggestions up to 240 characters. Suggestion generation is not connected yet.

Keep suggestions outside the draft and render them dimly in an empty, focused composer. `Tab` accepts a suggestion for editing, a separate `Enter` submits, and `Escape` cancels pending suggestions. Respect active key bindings, popups, attachments, paste bursts, and interactive transcript footers; ignore stale results and cancel suggestions when a task starts.

## Testing

Add parser tests, composer interaction tests, and snapshots covering acceptance, dismissal, stale results, input precedence, wrapping, and transcript search layout.

GitOrigin-RevId: 868001a0fc3e6fd8c11ef1650aabc477fa36e03d
2026-09-24 18:37:33 +00:00
Eric Traut 57567b8d9e Use shared, keymap-aware tips in the fullscreen composer (#46931)
## Why

Fullscreen composer hints used a small, fixed rotation, while catalog shortcut tips hard-coded default bindings. Tips should reflect the user's configured shortcuts and expose the shared catalog with working links.

## What changed

- Select complete, single-row catalog tips that fit the composer gap, keeping selection stable across redraws and varying it across sessions and turns.
- Prefer eligible startup announcements until a user turn begins, without restoring them after history is cleared. Cache parsed announcements while reevaluating eligibility.
- Resolve `{key:context.action}` placeholders using current primary shortcuts and chords; skip tips with invalid or unbound actions.
- Expand the tip catalog and share Markdown rendering between composer and session tips, preserving hyperlinks and supporting Ctrl/Super-click in the composer gap.
- Keep usage notices and interaction controls ahead of tips, and respect `show_tooltips` and idle, empty input.

## Testing

Add tests and snapshots for remapped shortcuts, unbound actions, stable tip selection, announcement dismissal, narrow layouts, styled links, and removal of stale link targets.

GitOrigin-RevId: 64751293d9f91e4444b112361540a73234f1d51d
2026-09-21 03:02:45 +00:00
Eric Traut 907b751eab Add six bundled TUI themes and theme-aware accents (#46504)
## What changed

- Bundle `ada`, `babbage`, `curie`, `cushman`, `dali`, and `davinci` themes for configuration and the theme picker, preserving precedence and invalid-file warnings for custom themes with the same names.
- Use `codex.accent` for active and selected controls on truecolor and 256-color terminals, retaining existing fallbacks at lower color depths.
- Honor terminal-default diff backgrounds and clear matching gutter fills, allowing `dali` and `davinci` to show diffs without background fills.
- Restrict Windows native palette fallback to `ConsoleWindowClass` so a ConPTY palette is not mistaken for the renderer's colors when OSC probing fails.

## Testing

Add tests and snapshots for theme preview, selection, cancellation, custom-theme precedence, invalid-file warnings, accent color depth, and disabling individual diff fills.

GitOrigin-RevId: 72f3ef08f82626436dd2d80d40210cc77e1a5616
2026-09-18 23:16:04 +00:00
rhan-oai 12e82f44f8 Remove personality selection from the TUI (#44935)
## What changed

Remove the `/personality` command, selection popup, tooltip, and associated settings update and persistence handlers. Stop sending a personality override with TUI user turns.

GitOrigin-RevId: 0549a1f9dcfd8118340fad4b60fd24d4eee7f93a
2026-09-11 23:28:38 +00:00
Tamir Duberstein 6478a751fd Organize bundled Rust resources under asset directories (#41477)
## Why

The `core` and `tui` Bazel targets treated nearly their entire crate trees as
compile-time data, mixing embedded runtime resources with source files and test
fixtures.

## What changed

- Move embedded resources for `core` and `tui` into dedicated `assets/`
  directories and update their `include_str!` paths.
- Restrict Bazel compile data to explicit asset and frame directories.
- Move test-only prompts into `tests/fixtures`, resolve the core prompt through
  `find_resource!`, and reuse the integration-test file glob when assembling
  Bazel test data.

GitOrigin-RevId: eee9b0e41df77ea2604215a7f7333a6fe8317bfa
2026-08-29 06:05:28 +00:00