summaryrefslogtreecommitdiff
path: root/autoload/vim_ai.vim (follow)
Commit message (Collapse)AuthorAgeFiles
* allow multiple chats in keep open modeMartin Bielik2024-07-231
|
* added abort flag to the plugin functionsMartin Bielik2024-06-091
|
* handle paste mode in finally blockMartin Bielik2024-06-091
|
* Merge pull request #88 from Konfekt/tabwinMartin Bielik2024-03-241
|\ | | | | detect chat window in other tabs as well
| * refactoring: extracted to helper function, using guardsMartin Bielik2024-03-241
| |
| * retabMartin Bielik2024-03-241
| |
| * Implement smarter AI chat window detection to reuse existing AI chat windows.Konfekt2024-03-111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First search for AI chat windows within the same tab and then within other tabs if none are found in the current tab. It now prioritizes the reusing of an existing chat window that matches the '.aichat' filetype before considering opening a new one. If there are no existing AI chat windows, the plugin will open a new chat window as a last resort. diff --git a/autoload/vim_ai.vim b/autoload/vim_ai.vim: - " reuse chat in active window or tab + " TODO: look for first active chat buffer. If .aichat file is used, + " then reuse chat in active window - " allow .aichat files windows to be switched to, preferably on same tab - let buffer_list_tab = tabpagebuflist(tabpagenr()) - let buffer_list_tab = filter(buffer_list_tab, 'getbufvar(v:val, "&filetype") ==# "aichat"') - - let buffer_list = [] - for i in range(tabpagenr('$')) - call extend(buffer_list, tabpagebuflist(i + 1)) - endfor - let buffer_list = filter(buffer_list, 'getbufvar(v:val, "&filetype") ==# "aichat"') - - if len(buffer_list_tab) > 0 - call win_gotoid(win_findbuf(buffer_list_tab[0])[0]) - elseif len(buffer_list) > 0 - call win_gotoid(win_findbuf(buffer_list[0])[0]) - else - " open new chat window - let l:open_conf = l:config['ui']['open_chat_command'] - call s:OpenChatWindow(l:open_conf) - endif + " open new chat window + let l:open_conf = l:config['ui']['open_chat_command'] + call s:OpenChatWindow(l:open_conf)
| * detect chat window in other tabs as wellKonfekt2024-03-101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | diff --git a/autoload/vim_ai.vim b/autoload/vim_ai.vim: - - let l:chat_win_ids = win_findbuf(bufnr(s:scratch_buffer_name)) - if !empty(l:chat_win_ids) - " TODO: look for first active chat buffer. If .aichat file is used, - " then reuse chat in active window - call win_gotoid(l:chat_win_ids[0]) + let l:chat_win_id = bufwinid(s:scratch_buffer_name) + if l:chat_win_id != -1 + " TODO: look for first active chat buffer, in case .aichat file is used + " reuse chat in active window + call win_gotoid(l:chat_win_id)
* | Merge pull request #89 from Konfekt/pasteMartin Bielik2024-03-241
|\ \ | | | | | | automatically unset &paste also after failed command
| * | consistent execution delimiterMartin Bielik2024-03-241
| | |
| * | automatically unset &paste also after failed commandKonfekt2024-03-141
| |/
* | removed unused logMartin Bielik2024-03-091
| |
* | roles example fileMartin Bielik2024-03-091
| |
* | roles completionMartin Bielik2024-03-091
|/
* removed unused variableMartin Bielik2024-03-091
|
* remove garbled textKonfekt2024-03-091
|
* fix typoKonfekt2024-03-091
|
* allow overriding range if called on visual selectionKonfekt2024-03-081
| | | | | | | Check if the start and end line of range equals that of visual selection. If so, take the visual selection; otherwise the supplied range
* removed debug logMartin Bielik2024-02-261
|
* apply suggestions of review at PR #77Konfekt2024-02-261
|
* drop superfluous selection argument and fix instruction argumentKonfekt2024-02-261
|
* align AIRedo with AI/AIEdit/ChatKonfekt2024-02-261
| | | | | | | | These changes were necessary to fix a bug where commands were not being executed correctly in non-visual modes, and to make the code cleaner and more efficient. By explicitly handling the visual selection state, it ensures that the plugin functions correctly regardless of how the user invokes the AI features.
* fix selection handling in vim_ai functionsKonfekt2024-02-261
| | | | addresses https://github.com/madox2/vim-ai/issues/76
* added explaining commentMartin Bielik2023-12-021
|
* fix selection include extra content when the user is in visual modecposture2023-12-021
|
* configurable paste modeMartin Bielik2023-05-021
|
* using value from extended configMartin Bielik2023-05-021
|
* added AINewChat commandMartin Bielik2023-04-221
|
* open_chat_command presetsMartin Bielik2023-04-221
|
* custom commands documentationMartin Bielik2023-04-221
|
* pass config as a parameterMartin Bielik2023-04-221
|
* fixed redo in chatMartin Bielik2023-04-221
|
* fixed redo in chatMartin Bielik2023-04-221
|
* move prompt to pythonMartin Bielik2023-04-211
|
* reuse chat if it is active in current tabMartin Bielik2023-04-211
|
* selection boundary configMartin Bielik2023-04-201
|
* use selection block only if it is safeMartin Bielik2023-04-191
|
* seleciton block boundary to eliminate empty responseMartin Bielik2023-04-181
|
* fixed buffer name on windowsMartin Bielik2023-04-151
|
* allow chat only in aichat filesMartin Bielik2023-04-151
|
* using messages to show error/warningMartin Bielik2023-04-151
|
* using scoped variablesMartin Bielik2023-04-151
|
* moving files to autoloadMartin Bielik2023-04-151
|
* scratch buffer optionsMartin Bielik2023-04-151
|
* open chat command configMartin Bielik2023-04-021