feat: Implement lightweight UDP interactive UI for Neovim
- Rewrote gemini-ui.lua to send native Neovim prompt selections, Ghost Text diff accept/reject actions, and smart context highlighting directly to the backend via zero-latency UDP port 3002, entirely replacing the old xecute_agent terminal subprocesses. - Added prompt_user and preview_diff extmark lua functions for non-destructive diff review. - Updated the Rust backend mcp-memory-server UDP listener to ingest the new gent_ask and interactive schema payloads and route them to the EventBus. - Updated README.md and instructions.md with UDP documentation.
This commit is contained in:
1 parent
b3c64c1ad8
commit
4e23043f5d
5 files changed
+147
-27
No files matched your search
@@ -107,6 +107,14 @@ Whenever you alt-tab into a Neovim window (FocusGained) or switch files (BufEnte
|
||||
2. **WebSocket Telemetry:** Neovim pushes a JSON payload containing the active filename, cursor row, and column via a connectionless UDP datagram to the Rust server's port 3002 listener.
|
||||
3. **UI Broadcast:** The Rust server updates the global state and broadcasts this over WebSockets (/ws) so that the Brain Monitor Dashboard can animate your active file live in the UI!
|
||||
|
||||
### Interactive UDP UI (New)
|
||||
The UI script (`gemini-ui.lua`) provides a deeply integrated, non-blocking pair-programming experience using zero-latency UDP:
|
||||
* **Interactive Prompts:** The agent can trigger native `vim.ui.select` or `vim.ui.input` dialogs in your editor. Your responses are instantly routed back to the agent via UDP.
|
||||
* **Smart Context (`<leader>ai`):** Highlighting code and pressing `<leader>ai` will package your prompt, file, and exact cursor/selection coordinates into a UDP packet and send it directly to the agent without spawning any subprocesses.
|
||||
* **Ghost Text Diffs (Non-Destructive Review):** Instead of modifying your buffers directly, the agent uses `extmarks` to overlay proposed code changes as grayed-out "Ghost Text".
|
||||
* Press `<leader>aa` (**A**gent **A**ccept) to apply the change and notify the agent.
|
||||
* Press `<leader>ar` (**A**gent **R**eject) to dismiss the change and notify the agent.
|
||||
|
||||
### Neovim MCP Tools
|
||||
The LLM agent interacts with your active Neovim session using a dedicated set of MCP tools. *(Note: /nvim/telemetry is strictly a one-way webhook for Neovim; the LLM uses the tools below to interact).*
|
||||
* **vim_goto_line**: Open files and jump cursors directly from the LLM.
|
||||
|
||||
Reference in new issue
Block a user