diff options
| author | Martin Bielik <martin.bielik@instea.sk> | 2024-12-16 23:46:17 +0100 |
|---|---|---|
| committer | Martin Bielik <martin.bielik@instea.sk> | 2024-12-16 23:46:17 +0100 |
| commit | 8fde389664ca59773c38dc0ec1a434a98bc2428b (patch) | |
| tree | 9cfd732f0c9c8820b6d2c3fce945fa8c266ec92d /py/context.py | |
| parent | 2a418adca13bc7f8d4b35a4a1ec83fe0e5aedd91 (diff) | |
| download | vim-ai-8fde389664ca59773c38dc0ec1a434a98bc2428b.tar.gz | |
command-type only roles
Diffstat (limited to 'py/context.py')
| -rw-r--r-- | py/context.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/py/context.py b/py/context.py index f1eacd6..87c3a14 100644 --- a/py/context.py +++ b/py/context.py @@ -92,7 +92,8 @@ def load_role_config(role): enhance_roles_with_custom_function(roles) - if not role in roles: + postfixes = ["", ".complete", ".edit", ".chat"] + if not any([f"{role}{postfix}" in roles for postfix in postfixes]): raise Exception(f"Role `{role}` not found") if is_deprecated_role_syntax(roles, role): |