Skip to content

feat: add Reasonix agent and edit diff previews#37

Open
yes999zc wants to merge 5 commits into
formulahendry:mainfrom
yes999zc:add-reasonix-agent
Open

feat: add Reasonix agent and edit diff previews#37
yes999zc wants to merge 5 commits into
formulahendry:mainfrom
yes999zc:add-reasonix-agent

Conversation

@yes999zc

@yes999zc yes999zc commented May 17, 2026

Copy link
Copy Markdown

Summary

Adds Reasonix as a pre-configured ACP agent and improves file-edit visibility for agents that edit files through their own tools.

Reasonix is a DeepSeek-native coding agent. It exposes reasonix acp over stdio NDJSON JSON-RPC, matching the same direct-binary integration pattern as Kiro CLI and Hermes Agent.

  • command = "reasonix"
  • args = ["acp"]

Why

Reasonix users currently have to configure the agent manually in settings.json. A pre-configured entry makes it discoverable and reduces setup friction.

While testing Reasonix through ACP, I also found that some agents write files directly through their own tooling instead of calling the client's writeTextFile method. The client therefore needs to follow ACP tool_call / tool_call_update notifications to show the user which files are being edited and to open a final diff.

Changes

  • Add Reasonix to acp.agents defaults in package.json
  • Add Reasonix to the pre-configured agents table in README.md
  • Add a CHANGELOG.md entry under Unreleased
  • Add DiffPreviewHandler for edit-kind tool calls
  • Fix diff preview handling to read ACP notifications from params.update
  • Track toolCallId state across incremental tool_call_update payloads
  • Extract edited file paths from locations, diff content, raw tool input, and title fallback
  • Highlight active edit locations while an edit tool is running, then open a before/after diff on completion

Validation

  • Verified locally that reasonix acp spawns successfully via vscode-acp
  • Verified ACP traffic contains tool_call / tool_call_update notifications from Reasonix
  • Verified chat, filesystem reads, permission prompts, and tool-call streaming locally
  • Ran npm run compile-tests -- --pretty false
  • Ran npm run lint
  • Ran npm run compile

Compatibility

  • Existing agent entries are unchanged.
  • Reasonix requires reasonix to be on PATH (brew install reasonix or install from GitHub Releases).
  • Diff/follow-along behavior is best-effort and only activates when an agent emits edit-kind tool calls or file path metadata.

🤖 Generated with Claude Code

Reasonix (https://github.com/esengine/DeepSeek-Reasonix) is a DeepSeek-native
coding agent with a cache-first loop architecture. It exposes `reasonix acp` as
a stdio ACP entry point, matching the same pattern as Kiro CLI and Hermes Agent
(direct binary invocation, not an npx package).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
yes999zc and others added 3 commits May 18, 2026 00:04
Before overwriting, read the old file content. After writing, open a
vscode.diff editor comparing old (temp file) vs new content so users
can review changes inline instead of just seeing the final state.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Many ACP agents (including Reasonix) write files directly via Node.js fs
rather than calling the client's writeTextFile. This adds a DiffPreviewHandler
that listens for session/update notifications, caches old file content when
an edit-kind tool call starts, and opens a vscode.diff view when it completes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@yes999zc yes999zc changed the title feat: add Reasonix as pre-configured ACP agent feat: add Reasonix agent and edit diff previews May 17, 2026
alanjds pushed a commit to alanjds/vscode-acp that referenced this pull request Jun 30, 2026
Cherry-picked and adapted from formulahendry/vscode-acp:

- fix(formulahendry#46): use correct Copilot package (@github/copilot@latest)
- fix(#2): serialize concurrent permission requests to prevent silent
  cancellations when multiple QuickPick dialogs overlap
- fix(formulahendry#6): respect acp.defaultWorkingDirectory in CWD resolution so
  workspace-scoped agents (kiro-cli etc.) find their config files
- fix(formulahendry#13): add 30s AbortController timeout to registry fetch;
  make connect/newConversation/restart progress notifications cancellable
- fix(formulahendry#47): redirect ACP pipe to fd 3 on login shells to prevent
  profile scripts (e.g. distrobox_profile.sh) from consuming fd 0
- feat(formulahendry#18): security hardening — workspace path validation in
  FileSystemHandler, env var filtering and shell:false in TerminalHandler
- feat(formulahendry#42): editor context link — toggle to prepend active file/cursor
  info to chat prompts (acp.toggleEditorContext command)
- feat(formulahendry#40): add Grok Build as pre-configured agent
- feat(formulahendry#35): add openHarness as pre-configured agent
- feat(formulahendry#44): add siGit Code as pre-configured agent
- feat(formulahendry#37/agent): add Reasonix as pre-configured agent
  (diff preview implementation deferred to separate PR using formulahendry#43 approach)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
pantelicmilan pushed a commit to pantelicmilan/CortexPipe that referenced this pull request Jul 6, 2026
Implements real-time diff preview when ACP agents edit files, using
VS Code's native diff editor with a custom URI scheme.

Key changes:
- DiffContentProvider: custom acp-diff: URI scheme (base64-encoded
  old content, no temp files)
- DiffPreviewHandler: listens to session/update tool_call notifications,
  synchronously snapshots old content before edits, opens diff on completion
- extension.ts: registers both providers with proper lifecycle management

Architecture inspired by Cline's DiffViewProvider. Fixes race conditions
and resource leaks from PR formulahendry#37 by using synchronous file reads and
URI-based content storage.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Reasonix <noreply@deepseek.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant