claudecode.nvim icon indicating copy to clipboard operation
claudecode.nvim copied to clipboard

chore(release): 0.4.0

Open github-actions[bot] opened this issue 5 months ago • 0 comments

The next claudecode.nvim release. Merging this PR creates the release tag and GitHub Release, then starts Communique GitHub Release note generation.

[0.4.0] - 2026-06-15

Added

  • :ClaudeCodeSendText {text} command (and require("claudecode.terminal").send_to_terminal(text, opts)) to send arbitrary text to the open Claude terminal as if typed at the prompt, submitting by default; :ClaudeCodeSendText! inserts without submitting. Multi-line text uses bracketed paste. Works with the in-editor native/snacks providers only (#272, #197).
  • User ClaudeCodeSendComplete autocmd, fired once per file when a send is accepted while Claude is connected, with data = { file_path, start_line, end_line, context } (lines 0-indexed). Lets you focus a Claude session running outside Neovim (provider = "none"/"external"), e.g. via tmux select-pane, which focus_after_send cannot do (#265, #228).
  • User ClaudeCodeDiffOpened / ClaudeCodeDiffClosed autocmds carrying diff metadata so configs can react to diffs opening and closing (resize, relayout, statusline, etc.) (#270).
  • terminal.diff_split_width_percentage to set a separate Claude terminal width while a diff is open (falls back to split_width_percentage when unset), and diff_opts.auto_resize_terminal (default true) to opt out of automatic width management entirely (#270).
  • :ClaudeCodeCloseAllDiffs command to close pending Claude diffs at once. Diffs already accepted but not yet written are left intact (#261, #248).
  • :checkhealth claudecode health check that verifies Neovim version, setup(), Claude CLI resolution, terminal provider sanity, the WebSocket server/port, the IDE lock file, and live connection state (#275).
  • netrw file selection support: <leader>as in a netrw buffer adds marked files or the file under the cursor to Claude's context (#62).
  • snacks.nvim picker support for :ClaudeCodeTreeAdd / :ClaudeCodeSend, adding selected files from Snacks.explorer() and Snacks.picker to Claude's context (#269, #192).
  • Model picker labels are now version-free (Claude Opus (Latest), etc.) with new 1M-context aliases (opus[1m], sonnet[1m]) and a Default (account recommended) entry (#256).

Fixed

  • WebSocket server now retries port binding on EADDRINUSE, so a second Neovim instance no longer fails to start with "Failed to listen on port ... address already in use" (#284, #283).
  • Detect system sleep/wake and reset client keepalive timestamps, preventing false disconnections after a laptop resumes from sleep (#141).
  • IDE auth token is now generated from a CSPRNG (vim.loop.random) and the lock file is written atomically with 0600 permissions in a 0700 directory (previously world-readable) (#259).
  • Close the connection on malformed WebSocket frames with the proper RFC 6455 close code instead of stalling forever with un-drained buffer bytes (#258, #257).
  • on_disconnect now fires on all teardown paths (EOF, read/protocol errors, keepalive timeout), fixing "phantom" client entries that accumulated over time (#176, #170).
  • IDE diagnostics tool no longer errors when Claude passes a bare file path instead of a file:// URI (#163).
  • IDE tool responses now return grouped URI-based diagnostics with editor-native ranges and severity names, stop advertising an unsupported resources capability, and harden background file opens (#274).
  • Legacy diff_opts.vertical_split and open_in_current_tab are honored again; they were silently ignored due to merge ordering (#142).
  • keep_terminal_focus = true now works for floating Claude terminals (e.g. Snacks position = "float"), which previously lost focus to the diff split (#178, #150).
  • Diffs now open when the Claude terminal is the only window; previously this failed with "No suitable editor window found" (#260, #231).
  • Rejecting a diff with :q (or :close / <C-w>c / tab close) now resolves it as rejected via a new WinClosed autocmd, matching the documented behavior (#266, #238).
  • Pending diffs are now auto-closed when the client that opened them disconnects or the server stops, instead of lingering when resolved outside this Neovim (#261, #248).
  • Plugin-created diff splits are now closed on cleanup, so accepted/rejected diffs no longer leave stray windows behind (#175, #155).
  • With open_in_new_tab = true, a stranded empty tab is no longer left behind (and focus returns to the original tab) when diff setup errors (#264, #262).
  • Snacks Explorer and picker windows are excluded from main-editor-window detection, so diffs no longer open on top of or corrupt the explorer/picker sidebar (#255, #165).
  • Quickly-made visual selections are now pushed to Claude reliably: selections are flushed synchronously on visual-mode exit and persist until the cursor moves, fixing single-line selections that often never reached Claude (#267, #246).
  • Selection context is now also sent on BufEnter, so switching buffers without moving the cursor updates Claude (#159).
  • Selection-context fallback for external terminals (provider = "none") now matches the Claude buffer name by substring, fixing skipped/incorrect context detection (#160).
  • The Snacks terminal no longer leaves a "climbing cursor" after hide/show toggles; the panel is parked and restored without being destroyed (#271, #240, #183).
  • Loopback hosts (localhost, 127.0.0.1, ::1) are added to no_proxy/NO_PROXY for the Claude terminal so a configured proxy no longer tunnels Claude's ws://127.0.0.1 IDE connection and times out @ mentions (#268, #70).
  • The 1M-context model aliases (opus[1m], sonnet[1m]) launched via the Snacks provider no longer fail with a shell glob error; the launch command is now passed as an argv list (#256).
  • Work around a Neovim core bug (< 0.12.2) that fragmented large bracketed pastes into the terminal; gated by terminal.fix_streamed_paste ("auto" by default) (#252).
  • Debounce timers in selection tracking are now stopped and closed correctly, fixing a libuv handle leak and stale callbacks firing after being superseded (#245).
  • focus_after_send = true now emits a one-time warning under provider = "none"/"external" (which run Claude outside Neovim) pointing to User ClaudeCodeSendComplete (#265, #228).
  • Updated the latest Claude Haiku model version (#146).

Maintained by the release-please workflow. CHANGELOG.md and the release PR body are regenerated by Communique on every push to main, so manual edits to this PR are overwritten.

github-actions[bot] avatar Jun 15 '26 13:06 github-actions[bot]