Wire up completion keyboard navigation and add AGENTS.md
- Tab/Enter confirms the selected completion item - Up/Down arrows navigate the completion menu - Escape dismisses the menu (via existing dismiss_lsp_overlays) - Editor intercepts keys via completion_intercept_keys flag when menu is showing - Add AGENTS.md with LLM-powered predictive autocomplete idea Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
a75bc99852
commit
d421b9583f
@@ -0,0 +1,28 @@
|
||||
# Galaxy AI Agents - Ideas & Future Work
|
||||
|
||||
## LLM-Powered Predictive Autocomplete
|
||||
|
||||
**Idea:** As the user types in the code editor, stream the current context (surrounding code, file structure, recent edits) to an LLM and predict what they're about to write — offering inline ghost-text completions similar to GitHub Copilot.
|
||||
|
||||
**Scope options:**
|
||||
- By line (predict the rest of the current line)
|
||||
- By function (predict the full function body)
|
||||
- By class/module (predict structural code)
|
||||
|
||||
**Challenges:**
|
||||
- Latency: can't hit the LLM on every keystroke. Need aggressive debouncing (500ms+), speculative pre-fetching, and streaming partial results.
|
||||
- Cost: high token volume. May need a small/fast model (Haiku) for inline suggestions with a larger model for multi-line predictions.
|
||||
- Context window: need to efficiently pack relevant context (current file, imports, related types, recent edits) without blowing the token budget.
|
||||
- Cancellation: must cancel in-flight requests when the user keeps typing past the prediction point.
|
||||
- UX: ghost text rendering, Tab to accept, partial accept (word-by-word), dismiss on divergence.
|
||||
|
||||
**Possible approaches:**
|
||||
- Debounce + streaming: wait 500ms after last keystroke, stream tokens as they arrive, render as ghost text
|
||||
- Predictive pre-fetch: on function signature completion or newline, proactively request the likely next block
|
||||
- Local model: run a small code model locally for instant line completions, use cloud model for multi-line
|
||||
- Hybrid: use LSP completions for symbol-level, LLM for line/block-level predictions
|
||||
|
||||
**Integration points in Galaxy:**
|
||||
- `app/src/code/completion.rs` — extend the completion state machine with an LLM provider
|
||||
- `crates/ai/` — existing Bedrock/LLM infrastructure can be reused
|
||||
- Editor decoration system — for rendering ghost text (similar to inlay hints)
|
||||
Reference in New Issue
Block a user