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
@@ -9,6 +9,14 @@ pub struct NvimTelemetry {
|
||||
pub file: Option<String>,
|
||||
pub line: Option<i64>,
|
||||
pub col: Option<i64>,
|
||||
// New interactive fields
|
||||
pub prompt: Option<String>,
|
||||
pub response: Option<String>,
|
||||
pub index: Option<i64>,
|
||||
pub request_id: Option<String>,
|
||||
pub diff_id: Option<String>,
|
||||
pub start_row: Option<i64>,
|
||||
pub end_row: Option<i64>,
|
||||
}
|
||||
|
||||
pub async fn nvim_telemetry_handler(
|
||||
|
||||
@@ -247,6 +247,17 @@ async fn run_server(state: Arc<MemoryState>) -> Result<(), Box<dyn std::error::E
|
||||
};
|
||||
let _ = nvim_udp_state.handler.state.event_bus_tx.send(event);
|
||||
}
|
||||
|
||||
// 4. Interactive Agent UI Events
|
||||
if payload.event.starts_with("agent_") {
|
||||
let topic = format!("nvim:ui:{}", payload.event);
|
||||
let event = crate::state::GenericEvent {
|
||||
topic,
|
||||
session_id: Some(payload.session_id.clone()),
|
||||
payload: serde_json::json!(&payload),
|
||||
};
|
||||
let _ = nvim_udp_state.handler.state.event_bus_tx.send(event);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user