neovim: CodeCompanion session id from git repo+branch; extract plugin module (#24) #26
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-24-codecompanion-session-id"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #24.
What
X-Hermes-Session-Idis now a function (hermes_session_id) instead of a static string. CodeCompanion'sset_env_vars(adapters/utils/init.lua) evaluates function header values on every request, so the id is recomputed per message:nvim-<repo>-<branch>viagit rev-parse --show-toplevel+--abbrev-ref HEAD(vim.system, no shell quoting issues, ~1-5 ms per send).nvim-<cwd-name>behaviour.nvim-<repo>-HEAD; branch names are sanitized to ASCII-safe header chars (feature/foo bar→feature-foo-bar).git switch/:cd.codecompanionblock (strategies, interactions, hermes adapter) and its three keymaps (<leader>a,<leader>ac,<leader>ae) move fromusers/modules/neovim/default.nixtousers/modules/neovim/plugins/codecompanion.nix, imported fromplugins/default.nix, matching how telescope/lsp/cmp are structured. No behaviour change in the settings themselves (only the trailing-whitespace nit onrun_commandwas cleaned).Verification
__rawblock parses (luaparser, Lua 5.4 grammar)..nixfiles passnix-instantiate --parse(nix 2.32.2).Plan reference: #24 (comment)
Merged as part of #25
Pull request closed