Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/release-notes/v0.1.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
## Highlights

- DSH 0.2.2-rc.2 verified: every contract this plugin depends on — the keyed `tool.call.toolview`
slot declaration with its `ToolCallOwnerProps` and `ToolCallCommonProps` fields, the `ToolResultNode`
block fields, `useCodeHighlighter`, `languageForPath`, and the reused primitives and icons — is
unchanged between 0.2.2-rc.1 and 0.2.2-rc.2, so the 0.1.0 build already runs on the new release.
- `node scripts/contract.mjs` and the `ci` workflow now check three public DSH releases:
0.2.2-rc.2, 0.2.2-rc.1 and 0.2.1-rc.5.
- `devDependencies` are pinned to 0.2.2-rc.2 (the release `npm`'s `next` tag points at), and
`pnpm-workspace.yaml` records pnpm 11's version-pinned supply-chain exemptions for those packages
so `pnpm install --frozen-lockfile` resolves them locally and in CI.

## Breaking changes

- None. `peerDependencies` and `engines.dsh` stay at `>=0.2.1-rc.5 <0.3.0-0`, a range that covers
0.2.2-rc.2 and 0.2.2-rc.1 alike, so the plugin keeps installing on either Desktop build.
- No card behaviour changed: `dist/` is built from the same `src/` as 0.1.0.

## Fixes

- Nothing needed adapting in the implementation; this release re-verifies it against 0.2.2-rc.2 and
refreshes the pinned toolchain packages.

## Compatibility

- DSH 0.2.2-rc.2: contract-checked against its public npm packages; not verified in the GUI.
- DSH 0.2.2-rc.1: contract-checked; verified in the GUI.
- DSH 0.2.1-rc.5: contract-checked against its public npm packages; not verified in the GUI.
- Upstream changes that do not affect this plugin: primitives removed the `useAnchoredPosition` and
`AnchoredPositionOptions` exports and replaced the `Menu` `getAnchorRect` prop with `anchorRef` /
`anchorPoint`; the slots package added a `'hoc'` slot kind. The `window-drag-regions` migration does
not apply because the card renders inline in the chat rather than as an overlay over a draggable
header.
- Inherited DSH limits (unchanged): languages are chosen by file extension only, lines of 1000+ characters
stay plain, and unknown languages, diffs over 2000 rows and preparing/failed/stopped calls fall back
to the stock card.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- run: pnpm run typecheck
- run: pnpm run build
- run: pnpm test
# Contract against the public npm packages of DSH 0.2.1-rc.5 and 0.2.2-rc.1.
# Contract against the public npm packages of DSH 0.2.2-rc.2, 0.2.2-rc.1 and 0.2.1-rc.5.
- run: node scripts/contract.mjs
- name: Reproducible build
run: scripts/check-reproducible.sh
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ Inherited from DSH, deliberately not worked around:
detection, so an extension-less script such as `deploy` stays plain.
- Lines of 1000 or more characters stay plain.

One row differs from the stock card on purpose: the collapsed `apply_patch` row shows only the
`+N −M` totals. Stock names the patched files there, and since DSH 0.2.2-rc.2 it links each file of a
multi-file patch individually; this card names the files once it is expanded instead.

Cases that render with the **stock card, unchanged**:

- languages DSH does not map;
Expand All @@ -47,10 +51,11 @@ Cases that render with the **stock card, unchanged**:

| DSH | Status |
|---|---|
| 0.2.2-rc.2 | Contract-checked against its public npm packages; not verified in the GUI |
| 0.2.2-rc.1 | Contract-checked; verified in the GUI |
| 0.2.1-rc.5 | Contract-checked against its public npm packages; not verified in the GUI |

`node scripts/contract.mjs` downloads the public packages of both releases from npm. It fails if
`node scripts/contract.mjs` downloads the public packages of all three releases from npm. It fails if
`tool.call.toolview`, `useCodeHighlighter`, `languageForPath` or the reused primitives change shape.

## Develop
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dsh-code-highlight",
"version": "0.1.0",
"version": "0.1.1",
"description": "Syntax-highlighted diffs for edit / write / apply_patch tool cards in the DeepSeek Harness chat, using DSH's own highlighter.",
"type": "module",
"license": "MIT",
Expand Down Expand Up @@ -66,12 +66,12 @@
},
"devDependencies": {
"@deepseek-ai/cordis": "^4.1.0",
"@deepseek-ai/dsh-client-ui-chat": "0.2.2-rc.1",
"@deepseek-ai/dsh-client-ui-conversation": "0.2.2-rc.1",
"@deepseek-ai/dsh-client-ui-primitives": "0.2.2-rc.1",
"@deepseek-ai/dsh-client-ui-slots": "0.2.2-rc.1",
"@deepseek-ai/dsh-client-ui-tool": "0.2.2-rc.1",
"@deepseek-ai/dsh-util-code-language": "0.2.2-rc.1",
"@deepseek-ai/dsh-client-ui-chat": "0.2.2-rc.2",
"@deepseek-ai/dsh-client-ui-conversation": "0.2.2-rc.2",
"@deepseek-ai/dsh-client-ui-primitives": "0.2.2-rc.2",
"@deepseek-ai/dsh-client-ui-slots": "0.2.2-rc.2",
"@deepseek-ai/dsh-client-ui-tool": "0.2.2-rc.2",
"@deepseek-ai/dsh-util-code-language": "0.2.2-rc.2",
"@testing-library/react": "^16.3.3",
"@types/node": "^22.20.5",
"@types/react": "~18.3.31",
Expand Down
61 changes: 31 additions & 30 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,13 @@ packages:
- .
allowBuilds:
esbuild: true
# rc.2 packages published 2026-11-12, inside pnpm's default 24h minimumReleaseAge
# window. Version-pinned exemptions let local and CI installs resolve the exact
# versions this plugin is contract-tested against; drop them once rc.2 ages out.
minimumReleaseAgeExclude:
- '@deepseek-ai/dsh-client-ui-chat@0.2.2-rc.2'
- '@deepseek-ai/dsh-client-ui-conversation@0.2.2-rc.2'
- '@deepseek-ai/dsh-client-ui-primitives@0.2.2-rc.2'
- '@deepseek-ai/dsh-client-ui-slots@0.2.2-rc.2'
- '@deepseek-ai/dsh-client-ui-tool@0.2.2-rc.2'
- '@deepseek-ai/dsh-util-code-language@0.2.2-rc.2'
4 changes: 2 additions & 2 deletions scripts/contract.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
* `languageForPath`, …), the slot registry surface, and `languageForPath`'s
* behaviour for the five target languages. Fails (exit 1) on any drift.
*
* Usage: node scripts/contract.mjs [version ...] (default: 0.2.2-rc.1 0.2.1-rc.5)
* Usage: node scripts/contract.mjs [version ...] (default: 0.2.2-rc.2 0.2.2-rc.1 0.2.1-rc.5)
*/
import { execFileSync } from 'node:child_process'
import { existsSync, mkdirSync, readFileSync } from 'node:fs'
import { join } from 'node:path'
import { tmpdir } from 'node:os'
import { pathToFileURL } from 'node:url'

const versions = process.argv.slice(2).length > 0 ? process.argv.slice(2) : ['0.2.2-rc.1', '0.2.1-rc.5']
const versions = process.argv.slice(2).length > 0 ? process.argv.slice(2) : ['0.2.2-rc.2', '0.2.2-rc.1', '0.2.1-rc.5']
const cache = join(tmpdir(), 'dsh-code-highlight-contract')
const PACKAGES = ['dsh-client-ui-tool', 'dsh-client-ui-primitives', 'dsh-client-ui-slots', 'dsh-client-ui-conversation', 'dsh-util-code-language']

Expand Down
Loading