- 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);
}
The plugin now properly detects and uses the file's language based on
its extension, rather than focusing on TypeScript.
Changes:
- Updated all system prompts to use {{language}} placeholder
- Removed hardcoded TypeScript references
- Expanded language mappings to support 50+ file extensions:
- JavaScript/TypeScript (js, ts, jsx, tsx, mjs, cjs)
- Python (py, pyw, pyx)
- Systems (c, cpp, rs, go, zig, nim)
- JVM (java, kt, scala, clj)
- Web (html, css, scss, vue, svelte)
- Scripting (lua, rb, php, sh, bash)
- .NET (cs, fs, vb)
- Data (json, yaml, toml, sql, graphql)
- And many more...
Improved prompts and code extraction to ensure generated code:
- Matches the file type and existing code structure
- Contains NO markdown code blocks (```)
- Contains NO explanations or comments about what was done
- Is ready to be directly inserted into the target file
Changes:
- Enhanced system prompts with stricter "ABSOLUTE RULES"
- Added explicit instructions about no markdown in user prompts
- Improved extract_code() to strip markdown and explanations
- Added processing notification with prompt preview