From a0c037ce0ceed3ff5b62166e636004c514eb2e89 Mon Sep 17 00:00:00 2001 From: Johannes Steen Date: Sat, 25 Jul 2026 12:22:57 +0200 Subject: [PATCH] Add placeholderRotationMs config to disable rotating prompt placeholders Users can now set tui.placeholderRotationMs to 0 in config.json to disable the rotating suggestions in the prompt input. Default is 4000ms. --- src/config/config-schema.ts | 20 +++++++++++++++++++- src/config/load-config.ts | 1 + src/tui/tui-app.tsx | 7 ++++++- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/src/config/config-schema.ts b/src/config/config-schema.ts index bf38be4..89ae09b 100644 --- a/src/config/config-schema.ts +++ b/src/config/config-schema.ts @@ -641,6 +641,11 @@ export interface AtomicAgentConfig { */ tui: { theme: string; + /** + * Interval in ms for cycling rotating prompt placeholders. Set to `0` + * to disable the rotating suggestions entirely. Default `4000`. + */ + placeholderRotationMs: number; }; /** * Anonymous product analytics (PostHog). Mirrors @@ -1271,6 +1276,11 @@ export interface UserConfigFile { */ tui: { theme: string; + /** + * Interval in ms for cycling rotating prompt placeholders. Set to `0` + * to disable the rotating suggestions entirely. Default `4000`. + */ + placeholderRotationMs: number; }; /** * Anonymous product analytics (PostHog). Added in config v33. Older @@ -1316,7 +1326,9 @@ export interface UserConfigFile { // v31: skills gains `clawhub` (ClawHub registry — the primary skill // marketplace). Older files inherit it enabled against the public registry // with suspicious skills hidden. -export const USER_CONFIG_VERSION = 33 as const; +// v34: tui gains `placeholderRotationMs` (disable rotating prompt +// placeholders by setting to 0). +export const USER_CONFIG_VERSION = 34 as const; /** * Config v21+ flips the full memory-v2 fabric on by default. Upgrades @@ -1429,6 +1441,7 @@ const SUPPORTED_INPUT_VERSIONS: readonly number[] = [ 30, 31, 32, + 33, USER_CONFIG_VERSION, ]; @@ -1663,6 +1676,7 @@ export const USER_CONFIG_DEFAULTS: UserConfigFile = { }, tui: { theme: "auto", + placeholderRotationMs: 4000, }, analytics: { enabled: true, @@ -3264,6 +3278,10 @@ export function parseUserConfigFile(raw: unknown): UserConfigFile { tui.theme ?? USER_CONFIG_DEFAULTS.tui.theme, "tui.theme", ), + placeholderRotationMs: parseNonNegativeInt( + tui.placeholderRotationMs ?? USER_CONFIG_DEFAULTS.tui.placeholderRotationMs, + "tui.placeholderRotationMs", + ), }, analytics: { enabled: parseBool( diff --git a/src/config/load-config.ts b/src/config/load-config.ts index f01f148..7fdb32b 100644 --- a/src/config/load-config.ts +++ b/src/config/load-config.ts @@ -464,6 +464,7 @@ export function loadConfig(): AtomicAgentConfig { }, tui: { theme: user.tui.theme, + placeholderRotationMs: user.tui.placeholderRotationMs, }, analytics: { enabled: user.analytics.enabled, diff --git a/src/tui/tui-app.tsx b/src/tui/tui-app.tsx index 69fa0ae..42ab308 100644 --- a/src/tui/tui-app.tsx +++ b/src/tui/tui-app.tsx @@ -7,6 +7,7 @@ import { useState, type ReactElement, } from "react"; +import { getConfig } from "../config/index.js"; import { reduceTuiState } from "./agent-event-reducer.js"; import type { TuiAction } from "./tui-action.js"; import { handleAppKey } from "./app-key-bindings.js"; @@ -765,7 +766,11 @@ export function TuiApp({ 0 + ? PROMPT_PLACEHOLDERS + : [] + } model={promptLlm.model} provider={promptLlm.provider} leftSlot={promptLeftSlot}