chore: migrate global agent rules into repository and update deployment scripts
This commit is contained in:
1 parent
917a9058f9
commit
5dd413c397
20 files changed
+295
No files matched your search
@@ -0,0 +1,18 @@
|
||||
# Neovim UX Protocol & Live Editing
|
||||
|
||||
Whenever you need to actively interact with the user's Neovim UI or dynamically inject code edits into their live buffers, use the nvim_execute_lua tool (the "God Mode" escape hatch).
|
||||
|
||||
## 1. Showing UI Feedback (Agent Notifications)
|
||||
The user has a global Lua table _G.gemini loaded in their Neovim environment. You can use it to pop up a floating notification window when you are starting a background task.
|
||||
|
||||
**Lua snippet to execute:**
|
||||
``lua
|
||||
_G.gemini.show_progress("Analyzing...")
|
||||
``
|
||||
|
||||
## 2. Live Undo-able Code Injection
|
||||
Instead of using replace_file_content to write code directly to the hard drive, you can pipe your code changes directly into the user's active buffer memory. This allows the user to instantly press undo to revert your code.
|
||||
|
||||
**Workflow Rule:**
|
||||
If the user asks you to "refactor this block", use vim.api.nvim_buf_set_lines to inject your response instantly into their live editor. Do NOT write to disk unless they explicitly say "save the file".
|
||||
|
||||
Reference in new issue
Block a user