From e323636977dfac11b0871aacec7a1d2d447bc9c5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 24 Oct 2026 09:21:56 +0000 Subject: [PATCH] chore(release): 0.4.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 68 +++++++++++++++++++++++++---------- VERSION | 2 +- 3 files changed, 51 insertions(+), 21 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 0ee8c012..2537c1f1 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.3.0" + ".": "0.4.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 796f6da9..f152b7e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,25 +2,55 @@ ## [Unreleased] -### Features - -- `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 run arbitrary post-send logic — in particular, focus a Claude session running outside Neovim (`provider = "none"`/`"external"`), e.g. via `tmux select-pane`, which `focus_after_send` cannot do. ([#228](https://github.com/coder/claudecode.nvim/issues/228)) -- `:ClaudeCodeCloseAllDiffs` command to close pending Claude diffs at once (e.g. proposals orphaned by resolving them via Claude remote control). Diffs you have already accepted but whose file has not been written yet are left intact so saved edits are never discarded. ([#248](https://github.com/coder/claudecode.nvim/issues/248)) -- `:ClaudeCodeSendText {text}` command (and `require("claudecode.terminal").send_to_terminal(text, opts)` function) to send arbitrary text to the open Claude terminal as if typed at the prompt, submitting it by default. `:ClaudeCodeSendText!` inserts the text without submitting. Handy for scripting and keymaps; multi-line text is sent via bracketed paste. Works with the in-editor `native`/`snacks` providers only — `external`/`none` run Claude outside Neovim, where there is no pane to write to. ([#197](https://github.com/coder/claudecode.nvim/issues/197)) -- `terminal.auto_insert` option (default `true`) controlling whether the Claude terminal auto-enters insert/terminal mode when its window gains focus. With the default Snacks provider, switching back into the terminal window (e.g. `l`) previously re-entered terminal mode and jumped to the bottom prompt, discarding your Normal-mode scroll/reading position; set `auto_insert = false` to stay in Normal mode and preserve the scroll position (press `i` to type). Applies to the `native` and `snacks` providers and the new-tab diff terminal. ([#232](https://github.com/coder/claudecode.nvim/issues/232), [#145](https://github.com/coder/claudecode.nvim/issues/145)) -- `diff_opts.layout = "unified"`: a unified diff rendered in a single buffer with deleted (red/strikethrough) and added (green) lines interleaved, as a compact alternative to the two-pane `"vertical"`/`"horizontal"` layouts. Requires Neovim >= 0.9.0; the `ClaudeCodeInlineDiffAdd`/`Delete`/`AddSign`/`DeleteSign` highlight groups are customizable. ([#82](https://github.com/coder/claudecode.nvim/issues/82), [#195](https://github.com/coder/claudecode.nvim/pull/195), [#293](https://github.com/coder/claudecode.nvim/issues/293)) - -### Bug Fixes - -- `closeAllDiffTabs` no longer destroys diffs it does not own. It previously closed every window with `&diff` set and force-deleted any buffer named like `*.diff`/`diff://`/`fugitive://`, so an open diffview.nvim, fugitive, or native `:diffsplit` review was wiped out — and because the Claude CLI calls this tool at the start of every turn, it happened on essentially every prompt. The tool is now scoped to claudecode's own tracked diffs (matching the official VS Code extension, which only closes the tabs it labelled). Relatedly, `openFile`/`openDiff` no longer reuse a window that is in diff mode, which previously `:edit`-ed over one side of an unrelated diff and broke its layout. ([#277](https://github.com/coder/claudecode.nvim/issues/277)) -- The Claude terminal now adds the loopback hosts (`localhost`, `127.0.0.1`, `::1`) to `no_proxy`/`NO_PROXY`, so a configured `http_proxy`/`all_proxy` no longer tunnels Claude's `ws://127.0.0.1` IDE connection and causes queued @ mentions to time out. Existing `no_proxy` exclusions are preserved. ([#70](https://github.com/coder/claudecode.nvim/issues/70)) -- `focus_after_send = true` no longer fails silently with `terminal.provider = "none"`/`"external"`: those providers run Claude outside Neovim, so focus cannot move there. A one-time warning is now emitted at setup pointing to the new `User ClaudeCodeSendComplete` autocmd, which you can hook to focus your own terminal. (`focus_after_send` still only auto-focuses the in-editor providers.) ([#228](https://github.com/coder/claudecode.nvim/issues/228)) -- Rejecting a Claude diff with `:q` (or `:close` / `c` / closing the tab) now resolves it as rejected, matching the documented behavior. The proposed buffer is a scratch buffer that `:q` only hides, so the existing `BufDelete`/`BufUnload`/`BufWipeout` autocmds never fired; a `WinClosed` autocmd now handles window-close rejection. ([#238](https://github.com/coder/claudecode.nvim/issues/238)) -- Push quickly-made visual selections to Claude reliably. Selections made and released faster than the selection-tracking debounce were never broadcast, and any selection was wiped shortly after leaving visual mode when Claude runs in an external terminal (the `/ide` flow) — so single-line selections in particular often never reached Claude. Selections are now flushed synchronously on visual-mode exit (from the `'<`/`'>` marks) and persist until the cursor actually moves; a single-line linewise `V` made right after a charwise selection is also no longer mis-extracted to a single character. ([#246](https://github.com/coder/claudecode.nvim/issues/246)) -- Diffs opened via `openDiff` no longer linger forever when they are resolved outside this Neovim or their Claude session goes away. Pending diffs are now automatically closed when the client that opened them disconnects or the integration is stopped, and `closeAllDiffTabs` now also resolves/cleans the diff module's tracked state instead of only closing windows. ([#248](https://github.com/coder/claudecode.nvim/issues/248)) -- Show diffs when the Claude Code terminal is the only window (no other splits). Previously `openDiff` failed with "No suitable editor window found"; now a split is created to host the diff, matching the behavior of the `openFile` tool. ([#231](https://github.com/coder/claudecode.nvim/issues/231)) -- Fix the "climbing cursor" in the Snacks terminal: hiding and re-showing the Claude panel no longer leaves the cursor one row above the prompt (so typed text lands on the wrong line). The Snacks provider now hides/shows without destroying the window — floats are parked via `nvim_win_set_config({hide=...})` and splits are recreated like the native provider — which preserves the cursor anchor Claude re-renders against on focus-in. Splits are fixed on all supported Neovim versions; the float fix requires Neovim >= 0.10. ([#240](https://github.com/coder/claudecode.nvim/issues/240), [#183](https://github.com/coder/claudecode.nvim/issues/183)) -- Work around a Neovim core bug (< 0.12.2) that fragmented large bracketed pastes into the terminal across `vim.paste` phases, making Cmd+V appear to truncate content. Added a scoped, version-gated `vim.paste` shim controlled by `terminal.fix_streamed_paste` (`"auto"` by default; no-op on Neovim >= 0.12.2). ([#161](https://github.com/coder/claudecode.nvim/issues/161)) +## [0.4.0] - 2026-10-24 + +### Added + +- `:ClaudeCodeSendText {text}` command and `require("claudecode.terminal").send_to_terminal(text, opts)` to send arbitrary text to the open Claude pane as if typed at the prompt; `:ClaudeCodeSendText!` inserts without submitting. In-editor providers (`native`/`snacks`) only. ([#272](https://github.com/coder/claudecode.nvim/pull/272)) +- `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 external-terminal users focus their own session (e.g. via `tmux select-pane`). ([#265](https://github.com/coder/claudecode.nvim/pull/265)) +- `:ClaudeCodeCloseAllDiffs` command to close pending Claude diffs at once; already-accepted-but-unwritten diffs are left intact. ([#261](https://github.com/coder/claudecode.nvim/pull/261)) +- `:checkhealth claudecode` health check covering Neovim version, `setup()`, Claude CLI resolution, terminal provider, WebSocket server, lock file, and client connection. ([#275](https://github.com/coder/claudecode.nvim/pull/275)) +- `diff_opts.layout = "unified"`: a VS Code-style unified diff rendered in a single buffer with deleted and added lines interleaved; customizable `ClaudeCodeInlineDiff*` highlight groups. Requires Neovim >= 0.9.0. ([#195](https://github.com/coder/claudecode.nvim/pull/195), [#295](https://github.com/coder/claudecode.nvim/pull/295), [#297](https://github.com/coder/claudecode.nvim/pull/297)) +- `terminal.auto_insert` option (default `true`): set to `false` to stay in Normal mode when refocusing the Claude terminal, preserving scroll position. ([#233](https://github.com/coder/claudecode.nvim/pull/233)) +- `terminal.diff_split_width_percentage` and `diff_opts.auto_resize_terminal`, plus `User ClaudeCodeDiffOpened` / `ClaudeCodeDiffClosed` autocmds for reacting to diff lifecycle. ([#270](https://github.com/coder/claudecode.nvim/pull/270)) +- Netrw file selection for @-mentions via `as` (marked files or file under cursor). ([#62](https://github.com/coder/claudecode.nvim/pull/62)) +- `:ClaudeCodeTreeAdd` support in snacks.nvim pickers (`snacks_picker_list`), including `Snacks.explorer()` and modal pickers. ([#269](https://github.com/coder/claudecode.nvim/pull/269)) +- `terminal.fix_streamed_paste` option (`"auto"` by default) working around a Neovim < 0.12.2 bracketed-paste fragmentation bug. ([#252](https://github.com/coder/claudecode.nvim/pull/252)) + +### Fixed + +- `closeAllDiffTabs` is now scoped to claudecode's own tracked diffs and no longer destroys open diffview.nvim, fugitive, or native `:diffsplit` reviews; `openFile`/`openDiff` also no longer reuse windows in diff mode. ([#290](https://github.com/coder/claudecode.nvim/pull/290)) +- The Claude terminal now adds loopback hosts to `no_proxy`/`NO_PROXY`, so a configured `http_proxy`/`all_proxy` no longer tunnels Claude's `ws://127.0.0.1` IDE connection and times out queued @ mentions. ([#268](https://github.com/coder/claudecode.nvim/pull/268)) +- Fixed the "climbing cursor" in the Snacks terminal on hide/show toggle, so typed text no longer lands on the wrong line. Splits fixed on all versions; float fix requires Neovim >= 0.10. ([#271](https://github.com/coder/claudecode.nvim/pull/271)) +- Rejecting a Claude diff with `:q` / `:close` / `c` now resolves it as rejected via a `WinClosed` autocmd. ([#266](https://github.com/coder/claudecode.nvim/pull/266)) +- Quickly-made visual selections (single-line `viw`/`v$`/`V`, mouse) are now pushed to Claude reliably, flushed synchronously on visual-mode exit and persisting until the cursor moves. ([#267](https://github.com/coder/claudecode.nvim/pull/267)) +- Diffs opened via `openDiff` are now auto-closed when the client that opened them disconnects or the integration stops, instead of lingering forever. ([#261](https://github.com/coder/claudecode.nvim/pull/261)) +- Diffs now open when the Claude terminal is the only window, creating a split instead of failing with "No suitable editor window found". ([#260](https://github.com/coder/claudecode.nvim/pull/260)) +- Fixed a segfault (exit 139) when accepting a new-file diff with `render-markdown.nvim` installed. ([#224](https://github.com/coder/claudecode.nvim/pull/224)) +- `ClaudeCodeSend` now classifies tree buffers by filetype only, so an ordinary file whose path contains `neo-tree`/`NvimTree` is no longer misrouted. ([#292](https://github.com/coder/claudecode.nvim/pull/292)) +- Snacks Explorer and picker windows are excluded from main-editor-window detection, so diffs no longer open on top of the explorer. ([#255](https://github.com/coder/claudecode.nvim/pull/255), [#165](https://github.com/coder/claudecode.nvim/pull/165)) +- Legacy `vertical_split` / `open_in_current_tab` diff options now apply correctly again (merge-order bug). ([#142](https://github.com/coder/claudecode.nvim/pull/142)) +- Handle `$` in file paths for `ClaudeCodeAdd` and `openFile`. ([#286](https://github.com/coder/claudecode.nvim/pull/286)) +- `getDiagnostics` now accepts a bare file path (no `file://` schema), which Claude frequently sends. ([#163](https://github.com/coder/claudecode.nvim/pull/163)) +- IDE diagnostics now return grouped, URI-based payloads with editor-native ranges and severity names; the unsupported resources capability is no longer advertised, and background file opens preserve focus. ([#274](https://github.com/coder/claudecode.nvim/pull/274)) +- `keep_terminal_focus` now works for floating Claude terminals. ([#178](https://github.com/coder/claudecode.nvim/pull/178)) +- Plugin-created diff splits are now closed deterministically on cleanup, preventing leftover windows. ([#175](https://github.com/coder/claudecode.nvim/pull/175)) +- A stranded empty tab is now closed when `open_in_new_tab` diff setup errors before the diff registers. ([#264](https://github.com/coder/claudecode.nvim/pull/264)) +- Empty scratch buffer is wiped when the terminal provider is `none`. ([#223](https://github.com/coder/claudecode.nvim/pull/223)) +- `focus_after_send = true` now emits a one-time warning with `provider = "none"`/`"external"` (where it cannot focus), pointing at the new `ClaudeCodeSendComplete` event. ([#265](https://github.com/coder/claudecode.nvim/pull/265)) +- The WebSocket server now closes connections on malformed frames instead of stalling, and fires `on_disconnect` on all teardown paths to prevent phantom clients. ([#258](https://github.com/coder/claudecode.nvim/pull/258), [#176](https://github.com/coder/claudecode.nvim/pull/176)) +- Port binding now retries on `EADDRINUSE`, so parallel Neovim instances start on different ports instead of colliding. ([#284](https://github.com/coder/claudecode.nvim/pull/284)) +- System sleep is detected to prevent false keepalive timeouts and disconnections on wake. ([#141](https://github.com/coder/claudecode.nvim/pull/141)) +- Selection updates are now also sent on `BufEnter`, and external-terminal (`provider = "none"`) buffers are correctly skipped via substring matching. ([#159](https://github.com/coder/claudecode.nvim/pull/159), [#160](https://github.com/coder/claudecode.nvim/pull/160)) + +### Changed + +- Modernized the `:ClaudeCodeSelectModel` picker with version-free labels (`Claude Opus (Latest)`, etc.), 1M-context variants, and a `Default (account recommended)` entry. ([#256](https://github.com/coder/claudecode.nvim/pull/256)) +- The Snacks provider now launches Claude via an argv list instead of a shell string, fixing a zsh glob bug that broke 1M-context model aliases. ([#256](https://github.com/coder/claudecode.nvim/pull/256)) + +### Security + +- The WebSocket auth token is now generated from a CSPRNG and the lock file is written atomically with `0600` permissions in a `0700` directory. ([#259](https://github.com/coder/claudecode.nvim/pull/259)) ## [0.3.0] - 2025-09-15 diff --git a/VERSION b/VERSION index 0d91a54c..1d0ba9ea 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.0 +0.4.0