From 6bc8b7de951a7403efbfd1f572ceb0deea536e7f Mon Sep 17 00:00:00 2001 From: catlog22 Date: Fri, 26 Dec 2025 12:21:55 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E8=BE=93=E5=87=BA=E6=A0=BC=E5=BC=8F=EF=BC=8C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8F=90=E7=A4=BA=E4=BF=A1=E6=81=AF=E5=B9=B6?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=8F=90=E7=A4=BA=E9=A2=84=E8=A7=88=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ccw/src/commands/cli.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ccw/src/commands/cli.ts b/ccw/src/commands/cli.ts index d30a700e..f04e77a7 100644 --- a/ccw/src/commands/cli.ts +++ b/ccw/src/commands/cli.ts @@ -803,9 +803,11 @@ async function historyAction(options: HistoryOptions): Promise { const timeAgo = getTimeAgo(new Date(exec.updated_at || exec.timestamp)); const turnInfo = exec.turn_count && exec.turn_count > 1 ? chalk.cyan(`[${exec.turn_count}t]`) : ' '; - // Compact single-line format: status tool time duration [turns] id - const shortId = exec.id.length > 25 ? exec.id.substring(0, 22) + '...' : exec.id; - console.log(` ${statusIcon} ${chalk.bold.white(exec.tool.padEnd(8))} ${chalk.gray(timeAgo.padEnd(11))} ${chalk.gray(duration.padEnd(8))} ${turnInfo} ${chalk.dim(shortId)}`); + // Compact format: status tool time duration [turns] + id on same line (no truncation) + // Truncate prompt preview to 50 chars for compact display + const shortPrompt = exec.prompt_preview.replace(/\n/g, ' ').substring(0, 50).trim(); + console.log(` ${statusIcon} ${chalk.bold.white(exec.tool.padEnd(8))} ${chalk.gray(timeAgo.padEnd(11))} ${chalk.gray(duration.padEnd(8))} ${turnInfo} ${chalk.dim(exec.id)}`); + console.log(chalk.gray(` ${shortPrompt}${exec.prompt_preview.length > 50 ? '...' : ''}`)); } // Usage hint