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

@ch4acko3/dsh-shiki

为 DeepSeek Harness Web 插件提供的共享 Shiki 语法高亮引擎服务。 核心用途是提供一个延迟加载的共享 Shiki 实例,用于对多种编程语言进行词法分析。适合需要高效、统一语法高亮支持的 Web 插件开发者。

套件
@ch4acko3/dsh-shiki
相容性
待驗證
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/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.