跳到主要内容

dsh-shiki

已验证

@ch4acko3/dsh-shiki · v0.1.2 · MIT · Web 界面

Shared Shiki engine service for DeepSeek Harness Web plugins

安装

dsh plugin add @ch4acko3/dsh-shiki

dsh --profile default --dump-config 确认 layer 已生效 —— 参见安装指南

源码

发布到 npm 但没有公开仓库。安装前请检查包内容。

标签

说明文档

@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.