summaryrefslogtreecommitdiff
path: root/autoload/vim_ai.vim (unfollow)
Commit message (Collapse)AuthorFiles
2024-12-10allow passing single line rangeMartin Bielik1
2024-12-08don't include not selected line, refactor ranges, fixes #112Martin Bielik1
2024-07-29remove useless buffer in keep open modeMartin Bielik1
2024-07-25private MakeScratchWindow functionMartin Bielik1
2024-07-24switch to last created buffer in keep open modeMartin Bielik1
2024-07-23allow multiple chats in keep open modeMartin Bielik1
2024-06-09added abort flag to the plugin functionsMartin Bielik1
2024-06-09handle paste mode in finally blockMartin Bielik1
2024-03-24refactoring: extracted to helper function, using guardsMartin Bielik1
2024-03-24retabMartin Bielik1
2024-03-24consistent execution delimiterMartin Bielik1
2024-03-14automatically unset &paste also after failed commandKonfekt1
2024-03-11Implement smarter AI chat window detection to reuse existing AI chat windows.Konfekt1
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)
2024-03-10detect chat window in other tabs as wellKonfekt1
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)
2024-03-09removed unused logMartin Bielik1
2024-03-09roles example fileMartin Bielik1
2024-03-09roles completionMartin Bielik1
2024-03-09removed unused variableMartin Bielik1
2024-03-09remove garbled textKonfekt1
2024-03-09fix typoKonfekt1
2024-03-08allow overriding range if called on visual selectionKonfekt1
Check if the start and end line of range equals that of visual selection. If so, take the visual selection; otherwise the supplied range
2024-02-26removed debug logMartin Bielik1
2024-02-26apply suggestions of review at PR #77Konfekt1
2024-02-26drop superfluous selection argument and fix instruction argumentKonfekt1
2024-02-26align AIRedo with AI/AIEdit/ChatKonfekt1
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.
2024-02-26fix selection handling in vim_ai functionsKonfekt1
addresses https://github.com/madox2/vim-ai/issues/76
2023-12-02added explaining commentMartin Bielik1
2023-12-02fix selection include extra content when the user is in visual modecposture1
2023-05-02configurable paste modeMartin Bielik1
2023-05-02using value from extended configMartin Bielik1
2023-04-22added AINewChat commandMartin Bielik1
2023-04-22open_chat_command presetsMartin Bielik1
2023-04-22custom commands documentationMartin Bielik1
2023-04-22pass config as a parameterMartin Bielik1
2023-04-22fixed redo in chatMartin Bielik1
2023-04-22fixed redo in chatMartin Bielik1
2023-04-21move prompt to pythonMartin Bielik1
2023-04-21reuse chat if it is active in current tabMartin Bielik1
2023-04-20selection boundary configMartin Bielik1
2023-04-19use selection block only if it is safeMartin Bielik1
2023-04-18seleciton block boundary to eliminate empty responseMartin Bielik1
2023-04-15fixed buffer name on windowsMartin Bielik1
2023-04-15allow chat only in aichat filesMartin Bielik1
2023-04-15using messages to show error/warningMartin Bielik1
2023-04-15using scoped variablesMartin Bielik1
2023-04-15moving files to autoloadMartin Bielik1
2023-04-15scratch buffer optionsMartin Bielik1
2023-04-02open chat command configMartin Bielik1