Hey @narghev — wanted to share something I built on top of askdiff,
in case it's useful for other heavy Claude Code users.
Repo / branch: https://github.com/xiaoneng666/askdiff/tree/askdiff-cc
It lives as an orphan branch in my fork (not a PR target) — the 2500+
lines are bash / Python stdlib / vanilla JS, intentionally separate
from the TypeScript packages so it doesn't fit upstream. But it
heavily depends on askdiff at runtime: spawns the CLI as a library,
patches the bundled index.html to inject a sidebar, hooks
window.WebSocket to reuse your diff_request flow.
What it adds on top of /askdiff
- Auto-launch via four Claude Code hooks (PreToolUse,
PostToolUse, Stop, SessionEnd) — diff opens at the end of every
CC turn that touched files in scope
- Per-query archive of changes, labeled with the original user
query text, using pre-edit snapshots (commit-resilient — survives
git commit / reset / amend / rebase)
- Multi-repo parent
cwd — walks each touched file to its .git,
unions per-repo diffs with path-prefix rewriting
- Per-CC-session isolation — separate askdiff CLI + HTTP sidecar
per session UUID, history namespaced
- IDEA-style right-side sidebar — collapsible, drag-resizable,
search/filter, persistent state via localStorage
- Double-click variable highlight (CSS Custom Highlight API with
<mark> fallback), Enter-sends chat with CJK IME safety,
chat-header archive tags
What it patches in your bundle (idempotent, re-applied on every fire)
dist/index.js CSP: adds http://localhost:* http://127.0.0.1:*
to connect-src so the sidebar's HTTP sidecar is reachable
dist/ui/index.html: injects one <script> block at end of
<body> (before deferred React module) to capture the WS instance
Not asking anything
Just a heads-up + a thank-you. askdiff is the foundation that
everything builds on, and the WebSocket protocol + the --resume
mechanism are exactly the right primitives for this kind of
orchestration. If anything in there inspires upstream changes — or
if you'd rather I not patch your dist bytes — happy to chat.
Cheers.
Hey @narghev — wanted to share something I built on top of askdiff,
in case it's useful for other heavy Claude Code users.
Repo / branch: https://github.com/xiaoneng666/askdiff/tree/askdiff-cc
It lives as an orphan branch in my fork (not a PR target) — the 2500+
lines are bash / Python stdlib / vanilla JS, intentionally separate
from the TypeScript packages so it doesn't fit upstream. But it
heavily depends on askdiff at runtime: spawns the CLI as a library,
patches the bundled
index.htmlto inject a sidebar, hookswindow.WebSocketto reuse yourdiff_requestflow.What it adds on top of
/askdiffPostToolUse, Stop, SessionEnd) — diff opens at the end of every
CC turn that touched files in scope
query text, using pre-edit snapshots (commit-resilient — survives
git commit / reset / amend / rebase)cwd— walks each touched file to its.git,unions per-repo diffs with path-prefix rewriting
per session UUID, history namespaced
search/filter, persistent state via localStorage
<mark>fallback), Enter-sends chat with CJK IME safety,chat-header archive tags
What it patches in your bundle (idempotent, re-applied on every fire)
dist/index.jsCSP: addshttp://localhost:* http://127.0.0.1:*to
connect-srcso the sidebar's HTTP sidecar is reachabledist/ui/index.html: injects one<script>block at end of<body>(before deferred React module) to capture the WS instanceNot asking anything
Just a heads-up + a thank-you. askdiff is the foundation that
everything builds on, and the WebSocket protocol + the
--resumemechanism are exactly the right primitives for this kind of
orchestration. If anything in there inspires upstream changes — or
if you'd rather I not patch your dist bytes — happy to chat.
Cheers.