|
1 | | -M.show_in_float() *M.show_in_float* |
2 | | - Creates a floating window to show content. |
3 | | - @param content string The content to display. |
4 | | - @param on_close function A callback to execute when the window is closed. |
5 | | - @param editable boolean|nil Whether the window should be editable (default: false). |
6 | | - @param on_apply function|nil Callback for apply action (Q key) - receives edited content. |
7 | | - @return number, number The window ID and buffer ID. |
8 | | - |
9 | | - |
10 | | -M.update_float() *M.update_float* |
11 | | - Updates the content of a floating window. |
12 | | - @param win_id number The ID of the window to update. |
13 | | - @param buf_id number The ID of the buffer to update. |
14 | | - @param content string The new content. |
15 | | - @param replacement? boolean if the buffer is for replacement command |
16 | | - @param cursor_line number|nil Optional line number to position cursor (defaults to end). |
17 | | - |
18 | | - |
19 | 1 | Config *Config* |
20 | 2 |
|
21 | 3 | Fields: ~ |
@@ -85,44 +67,6 @@ M.ask() *M.ask* |
85 | 67 | @return string? The response from the CLI, or nil if an error occurred. |
86 | 68 |
|
87 | 69 |
|
88 | | -M.setup() *M.setup* |
89 | | - Merges the given configuration with the default settings. |
90 | | - This function will be used to configure the agent in the future. |
91 | | - @param cfg table The configuration table to merge. |
92 | | - |
93 | | - |
94 | | -M.prepare_command() *M.prepare_command* |
95 | | - Prepares the shell command for sending a prompt to the Gemini CLI. |
96 | | - @param prompt string The prompt to be sent. |
97 | | - @return string The fully formed shell command. |
98 | | - |
99 | | - |
100 | | -M.parse_response() *M.parse_response* |
101 | | - Parses the JSON response from the Gemini CLI. |
102 | | - @param json_string string The JSON string to parse. |
103 | | - @return string? The extracted response, or nil if parsing fails. |
104 | | - |
105 | | - |
106 | | -M.ask() *M.ask* |
107 | | - Sends a prompt to the Gemini CLI and returns the response. |
108 | | - It uses a non-interactive mode by piping the prompt to the CLI. |
109 | | - @param prompt string The prompt to send to the Gemini CLI. |
110 | | - @return string? The response from the CLI, or nil if an error occurred. |
111 | | - |
112 | | - |
113 | | -M.setup({cfg?}) *M.setup* |
114 | | - setup function |
115 | | - |
116 | | - Parameters: ~ |
117 | | - {cfg?} (Config) |
118 | | - |
119 | | - |
120 | | -M.ask() *M.ask* |
121 | | - Starts a new conversation with an AI agent about selected code |
122 | | - Closes any existing conversation and creates a new floating window |
123 | | - @param question string The question to ask the AI agent |
124 | | - @param mode string The mode context (e.g., visual selection info) |
125 | | - |
126 | 70 |
|
127 | 71 | M.follow_up() *M.follow_up* |
128 | 72 | Continues an existing conversation with a follow-up question |
|
0 commit comments