dsh-code-render
已验证@ch4acko3/dsh-code-render · v0.1.2 · MIT · Web 界面
Safe HTML code rendering service for DeepSeek Harness Web plugins
安装
dsh plugin add @ch4acko3/dsh-code-render 用 dsh --profile default --dump-config 确认 layer 已生效 —— 参见安装指南。
源码
发布到 npm 但没有公开仓库。安装前请检查包内容。
标签
说明文档
@ch4acko3/dsh-code-render
A browser-side Cordis service that renders ctx.syntaxHighlighter tokens as safe, theme-aware HTML code blocks.
export const inject = ['codeRenderer']
export function apply(ctx) {
const result = ctx.codeRenderer.render({
code: 'const answer = 42',
language: 'ts',
})
console.log(result.html)
}
Source text and HTML attributes are escaped. Colors follow DSH's --shiki-* CSS variables, and original LF, CRLF, or CR line endings are retained.