diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index a88f8fe91..88a580ec1 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -10,6 +10,7 @@ ### Changed +- Changed the default TUI mode to fullscreen. Set `tuiMode` to `"regular"` or pass `--tui-mode regular` to keep the terminal's normal scrollback. - `/login` now offers "Sign in with Radius" at the top level, as the last option, with its status. After a Radius sign-in, `/login` offers to configure the Radius MCP server in the global `mcp.json` with `"auth": { "provider": "radius" }` and reloads. Cancelling a login returns to the menu it was started from. - The provider docs page is renamed to [Providers](docs/providers.md), its "Cloud Providers" section is now "Provider Specific Config", and it documents Radius first. - MCP OAuth credentials are now stored per server name and URL, so MCP servers with the same URL can sign in with different accounts. Credentials stored by URL alone move to the first server that uses them ([#10252](https://github.com/earendil-works/pi/issues/10252)). diff --git a/packages/coding-agent/docs/cli.md b/packages/coding-agent/docs/cli.md index ec4fa5b97..97b4ee870 100644 --- a/packages/coding-agent/docs/cli.md +++ b/packages/coding-agent/docs/cli.md @@ -229,7 +229,7 @@ See [Configuration](configuration.md) for saved configuration, [Security](securi - `--append-system-prompt `
Appends text or an existing file to the system prompt and is repeatable. - `--tui-mode `
- Uses `regular` or `fullscreen` terminal mode. + Uses `fullscreen` (default) or `regular` terminal mode. - `--verbose`
Shows verbose interactive startup information, overriding `quietStartup`. - `-a`, `--approve`
diff --git a/packages/coding-agent/docs/settings.md b/packages/coding-agent/docs/settings.md index 788cff711..689c15b98 100644 --- a/packages/coding-agent/docs/settings.md +++ b/packages/coding-agent/docs/settings.md @@ -91,7 +91,7 @@ See [Compaction Reference](compaction.md) for trigger, summarization, and valida |---|---|---|---| | `theme` | string | `"system"` | Built-in or custom theme name. `system` derives colors from the terminal theme. | | `quietStartup` | boolean \| `"header"` | `false` | `true` hides the startup header and loaded-resource listing. `"header"` keeps the header (version and key hints) but hides the model scope line and loaded-resource listing. | -| `tuiMode` | `"regular" \| "fullscreen"` | `"regular"` | Interactive terminal UI mode. | +| `tuiMode` | `"regular" \| "fullscreen"` | `"fullscreen"` | Interactive terminal UI mode. | | `fullscreenExitOutput` | `"transcript" \| "resume-hint"` | `"transcript"` | Output printed when fullscreen mode exits. | | `fullscreenScrollbar` | `"auto" \| "always" \| "hidden"` | `"auto"` | Fullscreen transcript scrollbar behavior. | | `fullscreenCopyOnSelect` | boolean | `true` | Copy selected text automatically in fullscreen mode. | diff --git a/packages/coding-agent/docs/usage.md b/packages/coding-agent/docs/usage.md index b949aef8c..ae227693c 100644 --- a/packages/coding-agent/docs/usage.md +++ b/packages/coding-agent/docs/usage.md @@ -83,7 +83,7 @@ Use `/share` to upload the session and get a viewer link. With Radius authentica ## Adjust the terminal -Regular mode uses the terminal's normal scrollback. Fullscreen mode keeps the editor and status area fixed while the transcript scrolls within the terminal window. Choose a mode through `/settings` or `--tui-mode`. +Fullscreen mode, the default, keeps the editor and status area fixed while the transcript scrolls within the terminal window. Regular mode uses the terminal's normal scrollback. Choose a mode through `/settings` or `--tui-mode`. Terminal support for mouse input, keyboard shortcuts, and inline images varies. See [Terminal Setup](terminal-setup.md) for platform-specific configuration and [Keybindings](keybindings.md) for every configurable shortcut. Run `/hotkeys` to inspect the shortcuts active in your current session. diff --git a/packages/coding-agent/src/cli/args.ts b/packages/coding-agent/src/cli/args.ts index b3d58d7cb..e29524302 100644 --- a/packages/coding-agent/src/cli/args.ts +++ b/packages/coding-agent/src/cli/args.ts @@ -323,7 +323,7 @@ ${chalk.bold("Options:")} --export Export session file to HTML and exit --list-models [search] List available models (with optional fuzzy search) --verbose Force verbose startup (overrides quietStartup setting) - --tui-mode TUI mode: regular (default) or fullscreen + --tui-mode TUI mode: fullscreen (default) or regular --approve, -a Trust project-local files for this run --no-approve, -na Ignore project-local files for this run --offline Disable startup network operations (same as PI_OFFLINE=1) diff --git a/packages/coding-agent/src/core/settings-manager.ts b/packages/coding-agent/src/core/settings-manager.ts index 7dd11412d..9ae4e53cb 100644 --- a/packages/coding-agent/src/core/settings-manager.ts +++ b/packages/coding-agent/src/core/settings-manager.ts @@ -181,7 +181,7 @@ export interface Settings { httpIdleTimeoutMs?: number; // HTTP header/body idle timeout in milliseconds; 0 disables it cacheWarming?: CacheWarmingMode; // default: "streaming"; global only because each refresh costs money websocketConnectTimeoutMs?: number; // WebSocket connect/open handshake timeout in milliseconds; 0 disables it - tuiMode?: TuiMode; // default: "regular" + tuiMode?: TuiMode; // default: "fullscreen" fullscreenExitOutput?: FullscreenExitOutput; // default: "transcript"; no effect in regular TUI mode fullscreenScrollbar?: ScrollViewScrollbar; // default: "auto"; no effect in regular TUI mode fullscreenCopyOnSelect?: boolean; // default: true; no effect in regular TUI mode @@ -1346,7 +1346,7 @@ export class SettingsManager { } getTuiMode(): TuiMode { - return this.settings.tuiMode === "fullscreen" ? "fullscreen" : "regular"; + return this.settings.tuiMode === "regular" ? "regular" : "fullscreen"; } setTuiMode(mode: TuiMode): void { diff --git a/packages/coding-agent/src/modes/interactive/components/settings-selector.ts b/packages/coding-agent/src/modes/interactive/components/settings-selector.ts index 7093e72ab..22fe0f363 100644 --- a/packages/coding-agent/src/modes/interactive/components/settings-selector.ts +++ b/packages/coding-agent/src/modes/interactive/components/settings-selector.ts @@ -705,7 +705,7 @@ export class SettingsSelectorComponent extends Container { { id: "tui-mode", label: "TUI mode", - description: "Interface layout; fullscreen mode is experimental", + description: "Interface layout; regular mode uses the terminal's normal scrollback", currentValue: config.tuiMode, values: ["regular", "fullscreen"], }, diff --git a/packages/coding-agent/test/settings-manager.test.ts b/packages/coding-agent/test/settings-manager.test.ts index a407fe206..ac7e74a66 100644 --- a/packages/coding-agent/test/settings-manager.test.ts +++ b/packages/coding-agent/test/settings-manager.test.ts @@ -478,33 +478,33 @@ describe("SettingsManager", () => { }); describe("TUI mode", () => { - it("defaults to regular and persists fullscreen mode", async () => { + it("defaults to fullscreen and persists regular mode", async () => { const manager = SettingsManager.create(projectDir, agentDir); - expect(manager.getTuiMode()).toBe("regular"); + expect(manager.getTuiMode()).toBe("fullscreen"); - manager.setTuiMode("fullscreen"); + manager.setTuiMode("regular"); await manager.flush(); - expect(manager.getTuiMode()).toBe("fullscreen"); + expect(manager.getTuiMode()).toBe("regular"); const savedSettings = JSON.parse(readFileSync(join(agentDir, "settings.json"), "utf-8")); - expect(savedSettings.tuiMode).toBe("fullscreen"); + expect(savedSettings.tuiMode).toBe("regular"); }); - it("falls back to regular for unsupported values", () => { + it("falls back to fullscreen for unsupported values", () => { writeFileSync(join(agentDir, "settings.json"), JSON.stringify({ tuiMode: "other" })); const manager = SettingsManager.create(projectDir, agentDir); - expect(manager.getTuiMode()).toBe("regular"); + expect(manager.getTuiMode()).toBe("fullscreen"); }); it("does not recognize the old uiMode setting", () => { - writeFileSync(join(agentDir, "settings.json"), JSON.stringify({ uiMode: "fullscreen" })); + writeFileSync(join(agentDir, "settings.json"), JSON.stringify({ uiMode: "regular" })); const manager = SettingsManager.create(projectDir, agentDir); - expect(manager.getTuiMode()).toBe("regular"); + expect(manager.getTuiMode()).toBe("fullscreen"); }); });