← Catalog

@brightmeows/pi-tui-thinking-flow

thinking 呈现接管:流式完整渲染、历史收起可展开

Package

Install

Install with PiG

pig install npm:@brightmeows/pi-tui-thinking-flow

Install with Pi

pi install npm:@brightmeows/pi-tui-thinking-flow
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./index.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 0.1.2 (README.md). PiG does not review it.

@brightmeows/pi-tui-thinking-flow

接管 thinking 块的默认呈现:进行中的 thinking 完整渲染,历史的收起为一行占位,可点击展开。

两态

  • flow 态(默认):流式 thinking 随 Markdown 实时渲染,带上下标题行;历史 thinking 收起为一行彩色占位,显示字符数与 token 估算,鼠标点击展开单块
  • expanded 态(ctrl+t 切换):全部 thinking 完整渲染,持久化到设置

语义说明

内置 hideThinkingBlock 的语义被本扩展反转为“全量展示”:ctrl+t 与 /settings 的开关文案沿用内置(hidden 或 visible),与实际行为相反,以本说明为准。

安装

pi install npm:@brightmeows/pi-tui-thinking-flow

版本敏感性

实现方式为接管 AssistantMessageComponent 的渲染方法(pi 对 thinking 渲染暂无 replace 钩子),私有成员经形状守卫读取,结构不匹配时降级原生渲染不崩溃。跨 pi 升级必须 tmux 实测复核。当前实测 pi 1.6.0。

1.6.0 的 Markdown 转换上下文新增可选 messageId 与 timestamp,本扩展已同步传入;内置的 Markdown slot 复用未采用。

License

MIT