7 Commits

Author SHA1 Message Date
e57209a1f8 feat: adding multiple files
### Added

- **Smart Scope Resolution** — Tree-sitter + indentation context for
selections
  - `resolve_selection_context()` in `scope/init.lua` handles partial
functions,
    whole functions, multi-function spans, indent blocks, and whole-file
selections
  - Enclosing function automatically sent as context when selecting code
inside one
  - Whole-file selection (>=80% of lines) triggers project tree as
context
  - Indentation-based fallback when Tree-sitter is unavailable

- **Explain-to-Document Intent** — "explain" prompts generate
documentation
  - Detects prompts like "explain this", "tell me about", "what does",
"question"
  - Generates documentation comments and inserts them above selected
code
  - Shows notification if nothing is selected
  - Updated intent action from "none" to "insert" for explain intent

- **Granular LLM Status Notifications** — Real-time progress reporting
  - Inline virtual text and floating status window show current stage
  - Stages: "Reading context...", "Searching index...", "Gathering
context...",
    "Recalling patterns...", "Building prompt...", "Sending to
[provider]...",
    "Processing response...", "Generating patch...", "Applying code..."
  - `update_inline_status()` in `thinking_placeholder.lua`
  - `update_stage()` in `thinking.lua`

- **Thinking Placeholder Positioning** — "Implementing..." appears above
selection
  - Uses `virt_lines_above = true` on extmark at selection start line
  - Dynamic status text updates during LLM processing

### Changed

- **Providers reduced to Copilot and Ollama only**
  - Removed Claude, OpenAI, and Gemini provider integrations
  - Deleted `llm/openai.lua` and `llm/gemini.lua`
  - Cleaned `llm/init.lua`, `config/defaults.lua`, `types.lua`,
`credentials.lua`,
    `cost/init.lua`, and `events/queue.lua` of all references
  - `valid_providers` now only includes "copilot" and "ollama"

- **Removed timer-based delayed processing** — Prompts are processed
instantly
  - Removed `timer` field, `timeout_ms`, and timer setup/cancellation
from `worker.lua`

- **Removed chat/agent/split window UI**
  - Deleted `ui/chat.lua`, `windows.lua`, `ui/switcher.lua`
  - Removed `CoderOpen`, `CoderClose`, `CoderToggle` commands
  - Removed window management from `autocmds.lua`, `inject.lua`,
`executor.lua`
  - Removed auto-open companion file logic

- **Commands removed from menu** (code retained with TODOs for
re-enabling)
  - `CoderAddApiKey`, `CoderRemoveApiKey`, `CoderBrain`,
`CoderFeedback`,
    `CoderMemories`, `CoderForget`, `CoderProcess`
  - Subcommands `process`, `status`, `memories`, `forget`,
`llm-feedback-good`,
    `llm-feedback-bad`, `add-api-key`, `remove-api-key` removed from
completion

### Fixed

- Fixed `patch.lua` syntax error — missing `if` wrapper around
SEARCH/REPLACE block
- Fixed `CoderModel` require path typo
(`codetyper.adapters.config.credentials`
  → `codetyper.config.credentials`)
- Fixed `thinking_placeholder` extmark placement appearing after
selection
  instead of above it
2026-03-18 23:05:26 -04:00
f110a3ed25 Modifying the doc files 2026-03-18 22:02:10 -04:00
9f229b26c9 Fixing the old configuration 2026-03-18 21:56:45 -04:00
4463a8144d Patch/inject: plain-code inline, inject() API, range capture, logger
- 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>
2026-02-16 18:06:21 -05:00
60577f8951 feat: add conflict resolution, linter validation, and SEARCH/REPLACE system
- 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>
2026-01-16 09:00:35 -05:00
8a3ee81c3f feat: add event-driven architecture with scope resolution
- 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>
2026-01-13 21:55:44 -05:00
bba0647b47 feat: initial release of codetyper.nvim v0.2.0
AI-powered coding partner for Neovim with LLM integration.

Features:
- Split view for coder files (*.coder.*) and target files
- Tag-based prompts with /@ and @/ syntax
- Claude API and Ollama (local) LLM support
- Smart prompt detection (refactor, add, document, explain)
- Automatic code injection into target files
- Project tree logging (.coder/tree.log)
- Auto .gitignore management

Ask Panel (chat interface):
- Fixed at 1/4 screen width
- File attachment with @ key
- Ctrl+n for new chat
- Ctrl+Enter to submit
- Proper window close behavior
- Navigation with Ctrl+h/j/k/l

Commands: Coder, CoderOpen, CoderClose, CoderToggle,
CoderProcess, CoderAsk, CoderTree, CoderTreeView
2026-01-11 15:24:06 -05:00