- Add usage guide for <leader>ctt in Normal and Visual mode
- Document insert at cursor vs replace selection behavior
- Add queue waiting notification explanation
- Update commands reference
- Inline prompts: use plain 'replace selection' prompt instead of SEARCH/REPLACE
- Add codetyper.inject.inject(bufnr, code, opts) for patch apply (replace/insert/append)
- Patch: on SEARCH/REPLACE failure use REPLACE parts only; inline always replace range
- Fix 0-0 range: clamp in create_from_event, prefer scope_range when invalid
- Commands: capture injection range from selection (derive end from line count); no selection = whole file
- Commands: log injection range; pass injection_range in prompt; autocmds prefer it
- Replace diagnostic logs with codetyper.support.logger in patch and scheduler
- Fix patch apply syntax (code_to_inject variable for multi-line logger call)
Co-authored-by: Cursor <cursoragent@cursor.com>
- Add git-style conflict resolution with visual diff highlighting
- Add buffer-local keymaps: co/ct/cb/cn for conflict resolution
- Add floating menu with auto-show after code injection
- Add linter validation that auto-checks LSP diagnostics after accepting code
- Add SEARCH/REPLACE block parsing with fuzzy matching
- Add new commands: CoderConflictMenu, CoderLintCheck, CoderLintFix
- Update README with complete keymaps reference and issue reporting guide
- Update CHANGELOG and llms.txt with full documentation
- Clean up code comments and documentation
Co-Authored-By: Claude <noreply@anthropic.com>
- Test default values and loading preferences
- Test saving and persistence to .coder/preferences.json
- Test get/set individual preference values
- Test is_auto_process_enabled and has_asked_auto_process
- Test toggle_auto_process behavior
- Test cache management (clear_cache)
- Handle invalid JSON gracefully
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add preferences.lua module for managing per-project preferences
- Stores preferences in .coder/preferences.json
- Shows floating dialog to ask user on first /@ @/ tag
- Supports toggle between auto/manual modes
- Update autocmds.lua with preference-aware wrapper functions
- check_for_closed_prompt_with_preference()
- check_all_prompts_with_preference()
- Only auto-process when user chose automatic mode
- Add CoderAutoToggle and CoderAutoSet commands
- Toggle between automatic and manual modes
- Set mode directly with :CoderAutoSet auto|manual
- Fix completion.lua to work in directories outside project
- Use current file's directory as base when editing files
outside cwd (e.g., ~/.config/* files)
- Search in both current dir and cwd for completions
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Major improvements to the event-driven prompt processing system:
Function Completion:
- Override intent to "complete" when prompt is inside function/method scope
- Use Tree-sitter to detect enclosing scope and replace entire function
- Special LLM prompt instructs to complete function body without duplicating
- Patch apply uses "replace" strategy for scope range instead of appending
Apply Delay:
- Add `apply_delay_ms` config option (default 5000ms) for code review time
- Log "Code ready. Applying in X seconds..." before applying patches
- Configurable wait time before removing tags and injecting code
VimLeavePre Cleanup:
- Logs panel and queue windows close automatically on Neovim exit
- Context modal closes on VimLeavePre
- Scheduler stops timer and cleans up augroup on exit
- Handle QuitPre for :qa, :wqa commands
- Force close with buffer deletion for robust cleanup
Response Cleaning:
- Remove LLM special tokens (deepseek, llama markers)
- Add blank line spacing before appended code
- Log full raw LLM response in logs panel for debugging
Documentation:
- Add required dependencies (plenary.nvim, nvim-treesitter)
- Add optional dependencies (nvim-treesitter-textobjects, nui.nvim)
- Document all intent types including "complete"
- Add Logs Panel section with features and keymaps
- Update lazy.nvim example with dependencies
Tests:
- Add tests for patch create_from_event with different strategies
- Fix assert.is_true to assert.is_truthy for string.match
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add event queue system (queue.lua) with priority-based processing
- Add patch system (patch.lua) with staleness detection via changedtick
- Add confidence scoring (confidence.lua) with 5 weighted heuristics
- Add async worker wrapper (worker.lua) with timeout handling
- Add scheduler (scheduler.lua) with completion-aware injection
- Add Tree-sitter scope resolution (scope.lua) for functions/methods/classes
- Add intent detection (intent.lua) for complete/refactor/fix/add/etc
- Add tag precedence rules (first tag in scope wins)
- Update autocmds to emit events instead of direct processing
- Add scheduler config options (ollama_scout, escalation_threshold)
- Update prompts with scope-aware context
- Update README with emojis and new features
- Update documentation (llms.txt, CHANGELOG.md, doc/codetyper.txt)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add logs_panel.lua module for standalone logs display
- Add logging to generate() functions in claude.lua and ollama.lua
- Show logs panel automatically when running transform commands
- Log request/response with token counting for both providers
- Add :CoderLogs command to toggle logs panel manually
- Clean up duplicate generate_with_tools function in claude.lua
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add agent module with tool execution support (read_file, edit_file, bash)
- Add agent/ui.lua with chat sidebar, input area, and real-time logs panel
- Add agent/logs.lua for token counting and request/response logging
- Add generate_with_tools to claude.lua and ollama.lua for tool use
- Add chat_switcher.lua modal picker for Ask/Agent mode selection
- Add CoderType command to show mode switcher (replaces C-Tab keymaps)
- Update ask.lua and agent/ui.lua headers to reference :CoderType
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add explicit instruction to all code generation prompts to return
only raw code without explanations, markdown, or code fences.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fixed keymaps to use command strings instead of function references:
- <leader>ctt (visual): Uses :<C-u>CoderTransformVisual<CR>
- <leader>ctt (normal): Uses <cmd>CoderTransformCursor<CR>
- <leader>ctT (normal): Uses <cmd>CoderTransform<CR>
Also fixed CoderTransformVisual to properly receive line range from opts.
New keymaps for inline /@ @/ tag transformation:
- <leader>ctt (visual): Transform tags within selection
- <leader>ctt (normal): Transform tag at cursor
- <leader>ctT (normal): Transform ALL tags in file
New command:
- :CoderTransformVisual - Transform tags in visual selection
Usage:
1. Select lines containing /@ @/ tags
2. Press <leader>ctt
3. Selected tags are replaced with generated code
New feature: Transform /@ @/ tags directly in any file, not just
.coder.* files. The tags are replaced inline with LLM-generated code.
New commands:
- :CoderTransform - Transform ALL /@ @/ tags in current file
- :CoderTransformCursor - Transform only the tag at cursor position
- :Coder transform - Same as :CoderTransform
- :Coder transform-cursor - Same as :CoderTransformCursor
How it works:
1. Write /@ your prompt @/ anywhere in your code
2. Run :CoderTransform
3. The tag is replaced with generated code matching your file's style
Example:
/@ create a function to validate email @/
Becomes:
function validateEmail(email) {
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
}