CH4ACKO3/dsh-render-engine--packages-ansi-render ↗★ 1

@ch4acko3/dsh-ansi-render

为 DeepSeek Harness Web 插件提供的安全 ANSI 终端输出渲染服务。 核心用途是将 ANSI 终端输出(含颜色、样式、超链接)安全地渲染为 HTML。适合需要向用户展示富文本终端日志或命令行输出的 Web 插件开发者。

包名
@ch4acko3/dsh-ansi-render
兼容性
待验证
Harness 依赖范围
>=0.1.0-rc.8
Cordis 依赖范围
^4.0.1
版本
0.1.2
许可证
MIT
最近更新
2026年8月28日

同名包的其他仓库

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:CH4ACKO3/dsh-render-engine#cca409bdfbcdb58e20267f970744d9b2918d218a&path:packages/ansi-render

@ch4acko3/dsh-ansi-render

A browser-side Cordis service that renders ANSI terminal output as escaped HTML. It supports common SGR styles, 16-color, 256-color, true-color, and allowlisted HTTP or HTTPS terminal hyperlinks through ansi_up.

const result = ctx.ansiRenderer.render({
  text: '\u001b[1;31mERROR\u001b[0m build failed',
})

console.log(result.html)

The service creates a fresh parser for each render call. It does not emulate a terminal, execute control sequences, or maintain cursor state between requests.