memorax-ai/dsh-render-engine--packages-syntax-highlight ↗★ 1

@ch4acko3/dsh-syntax-highlight

Structured syntax highlighting service for DeepSeek Harness Web plugins 适合需要对代码文本进行结构化高亮处理和二次开发的插件作者。

パッケージ
@ch4acko3/dsh-syntax-highlight
互換性
未検証
Cordis ピア範囲
^4.0.1
バージョン
0.1.2
ライセンス
MIT
最終更新
2026/09/24

同名パッケージの別リポジトリ

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:memorax-ai/dsh-render-engine#9582bf138d3a6d7381a84359a4a0b878a1ea8952&path:packages/syntax-highlight

ドキュメント

README 全文を読む ↗

@ch4acko3/dsh-syntax-highlight

A browser-side Cordis service that converts the shared ctx.shiki output into a stable token model for DeepSeek Harness plugins.

export const inject = ['syntaxHighlighter']

export function apply(ctx) {
  const result = ctx.syntaxHighlighter.highlight({
    code: 'const answer = 42',
    language: 'ts',
  })
  console.log(result.lines)
}

Unknown or absent language hints return plain tokens instead of throwing. The result's lineEndings field preserves the source's original LF, CRLF, or CR separators.