CH4ACKO3/dsh-render-engine--packages-structured-render ↗★ 1
@ch4acko3/dsh-structured-render
提供安全且支持主题的结构化数据折叠渲染 适合需要展示JSON等结构化数据并支持键盘无障碍折叠的场景。
同名包的其他仓库
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:CH4ACKO3/dsh-render-engine#cca409bdfbcdb58e20267f970744d9b2918d218a&path:packages/structured-render说明文档
阅读完整 README ↗@ch4acko3/dsh-structured-render
Safe, theme-aware structured data rendering for DeepSeek Harness Web plugins.
export const inject = ['structuredRenderer']
export function apply(ctx) {
const result = ctx.structuredRenderer.render({
label: 'response',
value: { ready: true, items: [{ id: 1 }, { id: 2 }] },
expandedDepth: 2,
})
console.log(result.html)
console.log(result.nodeCount)
}
The service accepts JSON-compatible values, escapes labels and strings, and uses native `` elements for keyboard-accessible disclosure. expandedDepth controls how many levels begin open and defaults to 1.