ClaudeMods
☰
ZH-CN
● 0 人在线 · 浏览 0 次
赞助提交作品
GitHub 仓库 · 发布者 KyongSik-Yoon

desktop-look

让终端记录看起来像 Claude Code 桌面应用:提示气泡、工具卡片和信息栏

KyongSik-Yoon@KyongSik-Yoon

KyongSik-Yoon/claude-mods/tree/main/desktop-look

原帖图片1
已翻译

关于这个 mod

desktop-look

一个让终端记录更像桌面应用的 Claude Code mod。

前后对比、信息栏、运行中和失败状态

  • 提示气泡:你自己的消息位于右侧的圆角气泡中,文字使用主题蓝色,并在终端宽度的一定比例处换行
  • 工具卡片:工具调用、实时进度和结果共用左边缘的一条轨道,因此看起来像一张卡片
  • 状态一目了然:调用运行时轨道为蓝色;发生错误、在对话框中被拒绝或被中断时为红色;完成后变暗
  • 引擎仍会把所有内容绘制在卡片内部,因此每个工具自己的摘要和差异都不变
  • 提示列上方的信息栏:左侧显示这个工作阶段编辑了什么(✎ 2 files +7 -0)以及花费了多少($0.05);右侧显示正在运行的工具(↻ Read ×3, Grep,窄屏时为 ↻ 4 running);没有内容可显示时隐藏
  • 助手回复保持原样,因此可以和 smooth-stream 一起使用
  • 仅限终端;桌面应用、VS Code 和移动端保留各自的外观

安装

claude plugin marketplace add KyongSik-Yoon/claude-mods
claude plugin install desktop-look@kyongsik-mods

然后运行 /reload-plugins 或开始新的工作阶段。需要支持 mods 的 Claude Code 构建版本(已在 2.1.289、全屏以及浅色/深色主题下测试)。

选项

无需设置。要修改某项,运行 /plugin configure desktop-look@kyongsik-mods(或打开 /config):

| 选项 | 默认值 | | | --- | --- | --- | | 气泡宽度 | 75% | 终端宽度的 60%、75% 或 90% | | 信息栏 | 开启 | 提示列上方的信息栏 | | 信息栏:模型 | 关闭 | 模型和 effort,用于不显示这些内容的状态行 | | 信息栏:上下文 | 关闭 | 上下文填充;平稳时为蓝色,达到 300k token 或 70% 后为黄色,达到 500k token 或 90% 后为红色,以先到者为准 |

费用是 Claude Code 按 API 价格计算出的金额;使用订阅时,它不是实际向你收取的金额。

工作原理

  • UserMessage(仅你自己的提示,不包括任务通知或其他工作阶段的消息)会以右对齐、带圆角边框的 Box 绘制。
  • ToolUse、ToolGroup、ToolProgress 和 ToolResult 是分开的渲染位置,因此一条边框无法跨越它们。每个位置都会包装引擎自己的行(await next(e)),并添加一个绝对定位的单列轨道,使其延伸到该行的高度,同时跳过引擎开始工具行时插入的空行。
  • 轨道颜色来自行的 props:isRunning、isErrored、isInterrupted 以及群组的调用。
  • 信息栏是一个读取 $.state 中数值的 AbovePrompt hook,由 tool.call(运行中的工具,以及每个 Edit 和 Write 结果补丁中的 +/- 行)、session.measure(费用、上下文)和 turn.step(模型)写入。新工作阶段(/clear)会重新开始累计;重新加载会保留累计值。

开发

claude plugin validate .
claude plugin test .

安装

请先查看作者 README 确认 marketplace 和插件名称;命令可能随仓库结构改变。

claude plugin marketplace add KyongSik-Yoon/claude-mods
claude plugin install desktop-look
原文 / README

desktop-look

A Claude Code mod that makes the terminal transcript look more like the desktop app.

Before and after, the info band, running and failed states

  • Prompt bubbles: your own messages sit on the right in a rounded bubble, their text in the theme's blue, wrapping at a share of the terminal width
  • Tool cards: a tool call, its live progress and its result share one rail down the left edge, so they read as one card
  • State at a glance: the rail is blue while a call runs, red when it errored, was refused at the dialog or was interrupted, and dim once done
  • The engine still draws everything inside a card, so each tool's own summary and diff are unchanged
  • Info band above the prompt: what this session edited (✎ 2 files +7 -0) and spent ($0.05) on the left, the tools running (↻ Read ×3, Grep, or ↻ 4 running when narrow) on the right; hidden when there is nothing to show
  • Assistant replies are left alone, so it works alongside smooth-stream
  • Terminal only; the desktop app, VS Code and mobile keep their own look

Install

claude plugin marketplace add KyongSik-Yoon/claude-mods
claude plugin install desktop-look@kyongsik-mods

Then run /reload-plugins or start a new session. Requires a Claude Code build with mods support (tested on 2.1.289, fullscreen and light/dark themes).

Options

No setup needed. To change one, run /plugin configure desktop-look@kyongsik-mods (or open /config):

| Option | Default | | | --- | --- | --- | | Bubble width | 75% | 60%, 75% or 90% of the terminal | | Info band | on | The band above the prompt | | Band: model | off | Model and effort, for a status line that does not show them | | Band: context | off | Context fill, for a status line that does not show it: blue while calm, yellow from 300k tokens or 70%, red from 500k tokens or 90%, whichever comes first |

The cost is what Claude Code computes at API prices; on a subscription it is not what you are billed.

How it works

  • UserMessage (your own prompts only, not task notifications or other sessions' messages) is drawn as a right-aligned Box with a round border.
  • ToolUse, ToolGroup, ToolProgress and ToolResult are separate render sites, so one border cannot span them. Each wraps the engine's own row (await next(e)) and adds an absolutely positioned one-column rail that stretches to the row's height, skipping the blank line the engine opens a tool row with.
  • The rail colour comes from the row's props: isRunning, isErrored, isInterrupted, and the calls of a group.
  • The band is an AbovePrompt hook reading values in $.state, written by tool.call (tools running, and the +/- lines of each Edit and Write result's patch), session.measure (cost, context) and turn.step (model). A new session (/clear) starts the tally over; a reload keeps it.

Develop

claude plugin validate .
claude plugin test .

更多类似作品