9087 / dsh-diff-approval

목록에 있음

Pending-change review for DeepSeek Harness: whole-file diffs with per-file Keep/Revert, create/delete tracking, and restart-safe persistence.

main기타 소스 보기

설치

npx @deepseek-ai/dsh plugin --profile web add dsh-diff-approval

이 명령은 GitHub 저장소 주소에서 생성됩니다. 실행 전에 업스트림 README와 소스를 검토하고 재현성이 필요하면 release 또는 commit을 고정하세요.

README

유지 관리자가 작성한 문서 스냅샷입니다.

GitHub에서 보기 ↗
커밋 6a3d506동기화 2026. 8. 18.

dsh-diff-approval

English | 中文

npm version CI

A DeepSeek Harness (DSH) plugin for pending-change review: it automatically tracks every successful edit, write, and editor (str_replace_editor) mutation, folds all unhandled changes into one entry per file, and shows each file's diff with Keep/Revert in the sidebar — no git involved.

Pending changes panel

✨ Features

  • Diff view: syntax-highlighted diff with +/− counts and change-block jump (previous/next diff). Select text in the diff and the bottom status bar shows its file:start-end reference — click it (or press Ctrl+L) to copy.
  • Highlight language: the diff's status bar picks the highlight language — auto-detected from the file extension (shown as "Auto: …"), or overridden manually from the dropdown.
  • Keep / Revert: one decision per file. Keep accepts the changes; Revert writes the file back to its earliest basis (a created file is removed, a deleted tracked file is restored).
  • Open / Reveal: open a file in its default app, or reveal it in the file manager, right from the diff header.
  • Persistence: pending state is stored per workspace at <dshHome>/diff-approval/workspaces/<workspaceId>.json and survives restarts — unhandled changes are still there when you come back, even in a fresh session.

📦 Install

If dsh is on your PATH:

dsh plugin --profile web add dsh-diff-approval

Or, if you run the harness through npx (e.g. npx @deepseek-ai/dsh web):

npx @deepseek-ai/dsh plugin --profile web add dsh-diff-approval

or manually: add the package to your profile's package.json dependencies and insert this row into the profile's cordis.patch.yml:

- insert:
    - id: diff-approval
      name: dsh-diff-approval
      # Optional: relocate durable pending state (defaults to
      # <dshHome>/diff-approval/workspaces).
      # config:
      #   storageDir: ~/dsh-pending

Then restart dsh web.

🚀 Usage

  1. Work with the agent as usual — successful edit / write calls are recorded automatically.
  2. Click the Pending changes action at the sidebar footer (the badge shows the count).
  3. Click a file row to expand its full diff; use Previous diff / Next diff to jump between change blocks. Select text and click the reference in the bottom status bar (or press Ctrl+L) to copy a line reference.
  4. Keep accepts the file's changes; Revert restores its earliest basis. The row then leaves the list.

📝 Notes

  • Only tracked mutations (edit, write, and str_replace_editor editor calls) are recorded. Deletions made outside these tools (e.g. shell rm) are sensed only for tracked files: the entry turns "File is gone" and its Revert restores the file.
  • Reverting a created file deletes it (the fs seam has no delete API).
  • Sessions with no workspace keep their entries memory-only; corrupt persistence files are rejected and can be deleted to reset.

🛠 Development

corepack pnpm install
pnpm run typecheck   # tsc over both faces
pnpm run build       # emits lib/index.js and lib/client.js
pnpm test

프로젝트 파일 및 신호

표시된 항목은 디렉터리 스냅샷에서 감지된 공개 저장소 신호입니다.

테스트감지됨
문서감지됨

저장소 정보

언어
TypeScript
라이선스
MIT
최신 릴리스
v0.4.0
마지막 업데이트
2026. 8. 17. 오후 5:34

신중하게 설치하기

소스 코드, 권한, 수명 주기 스크립트, 의존성 및 네트워크 접근을 검토하고 신뢰하지 않는 플러그인은 격리 환경에서 테스트하세요.