summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFiles
...
| * | automatically unset &paste also after failed commandKonfekt2024-03-141
| |/
* | Merge pull request #85 from madox2/custom-rolesMartin Bielik2024-03-2410
|\ \ | |/ |/| Custom roles
| * reusing parsing codeMartin Bielik2024-03-242
| |
| * Merge pull request #87 from Konfekt/custom-rolesMartin Bielik2024-03-113
| |\ | | | | | | Ensure role config file exists and optional Vim source
| | * optionally supplement roles dict by vim function sourceKonfekt2024-03-113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The application was restricted to loading role configurations only from a predefined config file, which limited extensibility. Enable dynamic role configuration by invoking a custom Vim function if it is defined. This allows users to extend the role configurations beyond the static file. diff --git a/doc/vim-ai.txt b/doc/vim-ai.txt: -The roles in g:vim_ai_roles_config_file are converted to a Vim dictionary. -Optionally, additional roles can be added by defining a function VimAIRoleParser() -whose output is a dictionary of the same format as g:vim_ai_roles_config_file. - diff --git a/py/roles.py b/py/roles.py: -if vim.eval('exists("*VimAIRoleParser")'): - roles.update(vim.eval('VimAIRoleParser()')) - diff --git a/py/utils.py b/py/utils.py: - if vim.eval('exists("*VimAIRoleParser")'): - roles.update(vim.eval('VimAIRoleParser()')) -
| | * Ensure role config file exists before loading to prevent errorsKonfekt2024-03-101
| |/ | | | | | | | | | | | | | | | | | | | | The problem was that the application tried to load a roles configuration file without checking whether it actually exists, potentially leading to unhandled exceptions if the file is missing. Ensure that the roles configuration file exists before attempting to read from it; raise an exception with a clear message if the file is not found. diff --git a/py/roles.py b/py/roles.py: -if not os.path.exists(roles_config_path): - raise Exception(f"Role config file does not exist: {roles_config_path}") -
| * removed unused logMartin Bielik2024-03-091
| |
| * docu typoMartin Bielik2024-03-091
| |
| * supprot config only rolesMartin Bielik2024-03-091
| |
| * roles docuMartin Bielik2024-03-092
| |
| * simple error handlingMartin Bielik2024-03-091
| |
| * fix using role in existing chatMartin Bielik2024-03-091
| |
| * roles example fileMartin Bielik2024-03-095
| |
| * roles completionMartin Bielik2024-03-093
| |
| * parse role optionsMartin Bielik2024-03-093
| |
| * read role prompt from configMartin Bielik2024-03-093
|/
* removed unused variableMartin Bielik2024-03-091
|
* Merge pull request #84 from Konfekt/rangeMartin Bielik2024-03-091
|\ | | | | allow overriding range if called on visual selection
| * 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 config path logMartin Bielik2024-03-091
| |
* | Merge pull request #80 from jiangyinzuo/mainMartin Bielik2024-03-093
|\ \ | | | | | | feat: add an option to customize api key file location
| * | feat: add an option to customize api key file locationjiangyinzuo2024-03-083
| |/
* | Merge pull request #82 from Konfekt/issue81Martin Bielik2024-03-091
|\ \ | |/ |/| fix selection handling in vim_ai functions, fixes #81
| * Fix incorrect argument type passed in AINewChat commandKonfekt2024-03-081
|/ | | | | | | | | The vim-ai plugin had an issue where the AINewChat command was using <q-args> to always pass a quoted (possibly empty!) argument to the vim_ai#AINewChatRun function where an optional <f-args> agument was expected. Addresses https://github.com/madox2/vim-ai/issues/81
* docu range functionalityMartin Bielik2024-02-261
|
* Merge pull request #77 from Konfekt/rangeMartin Bielik2024-02-264
|\ | | | | fix selection handling in vim_ai functions
| * removed debug logMartin Bielik2024-02-261
| |
| * revert ModeChanged because visual to command mode is not detectedKonfekt2024-02-261
| |
| * apply suggestions of review at PR #77Konfekt2024-02-261
| |
| * drop superfluous selection argument and fix instruction argumentKonfekt2024-02-264
| |
| * prefer less frequent ModeChanged event to CursorMoved if availableKonfekt2024-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-262
| | | | | | | | addresses https://github.com/madox2/vim-ai/issues/76
| * Update README.mdChris Stryczynski2024-02-261
| | | | | | Fix instructions which lead to `Undefined variable: g:vim_ai_chat` if config options are not initially set
* | Merge pull request #75 from chrissound/patch-1Martin Bielik2024-02-181
|\ \ | | | | | | Fix instructions which lead to `Undefined variable: g:vim_ai_chat` if config options are not initially set
| * | Update README.mdChris Stryczynski2024-02-171
|/ / | | | | Fix instructions which lead to `Undefined variable: g:vim_ai_chat` if config options are not initially set
* | Merge pull request #74 from jkoelker/includeMartin Bielik2024-01-255
|\| | | | | feat(chat): add `include` role to include files
| * feat(chat): add `include` role to include filesJason Kölker2024-01-245
|/ | | | | | | | | | | | | | | | | | | | | | | | | Files may be included in the chat by a special `include` role. Each file's contents will be added to an additional `user` role message with the files separated by `==> {path} <==` where `{path}` is the path to the file. Globbing is expanded out via `glob.glob` and relative apths to the current working directory (as determined by `getcwd()`) will be resolved to absolute paths. Example: ``` >>> user Generate documentation for the following files >>> include /home/user/myproject/src/../requirements.txt /home/user/myproject/**/*.py ``` Fixes: #69
* import vim before utils, fixes #43Martin Bielik2023-12-232
|
* added explaining commentMartin Bielik2023-12-022
|
* Merge pull request #64 from cposture/fix-visual-selectionMartin Bielik2023-12-024
|\ | | | | fix selection include extra content when the user is in visual mode
| * fix selection include extra content when the user is in visual modecposture2023-12-024
|/
* fixed python3.12 slash escaping, fixes #61Martin Bielik2023-11-011
|
* Merge pull request #59 from madox2/base-url-configMartin Bielik2023-10-216
|\ | | | | Custom APIs, closes #55, closes #51
| * removed unused importMartin Bielik2023-10-212
| |
| * Merge remote-tracking branch 'origin/main' into base-url-configMartin Bielik2023-10-214
| |\ | |/ |/|
* | use gpt-3.5-turbo-instruct by default, closes #48Martin Bielik2023-09-263
| |
* | compact org id docuMartin Bielik2023-09-181
| |