Chuyển đến nội dung chính

dsh-syntax-highlight

Đã xác minh

@ch4acko3/dsh-syntax-highlight · v0.1.1 · MIT · Giao diện web

Structured syntax highlighting service for DeepSeek Harness Web plugins

Cài đặt

dsh plugin add @ch4acko3/dsh-syntax-highlight

Xác nhận layer đã áp bằng dsh --profile default --dump-config — xem hướng dẫn cài plugin.

Mã nguồn

Phát hành lên npm mà không có repository công khai. Hãy kiểm tra nội dung package trước khi cài.

Thẻ

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.