xonecas.io
64875
Mc

mini-coder / commit 98579ba

show yellow plan-mode prompt in readline

xonecas2026-02-20 98579bae550e1767b999d2aa0d9a9798828e4819 parent 1e6dd05

2 files changed

src/agent/agent.ts+1−1
@@ -348,7 +348,7 @@ export async function runAgent(opts: AgentOptions): Promise<void> {
348348
349349 let input: InputResult;
350350 try {
351- input = await readline({ cwd });
351+ input = await readline({ cwd, planMode });
352352 } catch {
353353 break;
354354 }
src/cli/input.ts+5−2
@@ -105,10 +105,12 @@ async function readKey(reader: StreamReader): Promise<string> {
105105 // ─── Main readline function ───────────────────────────────────────────────────
106106
107107 const PROMPT = c.green("▶ ");
108-const PROMPT_RAW_LEN = 2; // "▶ " is 2 visible chars
108+const PROMPT_PLAN = c.yellow("⬢ ");
109+const PROMPT_RAW_LEN = 2; // both prompts are 2 visible chars
109110
110111 export async function readline(opts: {
111112 cwd?: string;
113+ planMode?: boolean;
112114 }): Promise<InputResult> {
113115 const cwd = opts.cwd ?? process.cwd();
114116
@@ -134,8 +136,9 @@ export async function readline(opts: {
134136 ? `…${buf.slice(-(cols - PROMPT_RAW_LEN - 3))}`
135137 : buf;
136138
139+ const prompt = opts.planMode ? PROMPT_PLAN : PROMPT;
137140 process.stdout.write(
138- `${CLEAR_LINE}${PROMPT}${display}${CSI}${PROMPT_RAW_LEN + cursor + 1}G`,
141+ `${CLEAR_LINE}${prompt}${display}${CSI}${PROMPT_RAW_LEN + cursor + 1}G`,
139142 );
140143 }