CH4ACKO3/dsh-render-engine--packages-shiki0

@ch4acko3/dsh-shiki

Shared Shiki engine service for DeepSeek Harness Web plugins

包名
@ch4acko3/dsh-shiki
版本
0.1.1
许可证
MIT
最近更新
2026年8月21日

安装

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

@ch4acko3/dsh-shiki

A browser-side Cordis service that owns one lazily created Shiki engine for DeepSeek Harness Web plugins.

export const inject = ['shiki']

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

resolveLanguage() accepts common aliases, including patch for the bundled diff grammar. tokenize() requires a supported language and returns Shiki tokens using DSH's --shiki-* CSS variables. Its lineEndings field preserves the source's original LF, CRLF, or CR separators.