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 /tests/context_test.py | |
| parent | 2a418adca13bc7f8d4b35a4a1ec83fe0e5aedd91 (diff) | |
| download | vim-ai-8fde389664ca59773c38dc0ec1a434a98bc2428b.tar.gz | |
command-type only roles
Diffstat (limited to 'tests/context_test.py')
| -rw-r--r-- | tests/context_test.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/context_test.py b/tests/context_test.py index 1e179f1..9f7d004 100644 --- a/tests/context_test.py +++ b/tests/context_test.py @@ -115,6 +115,17 @@ def test_multiple_role_configs(): assert 'https://localhost/chat' == actual_config['options']['endpoint_url'] assert 'simple role prompt:\nhello' == actual_prompt +def test_chat_only_role(): + context = make_ai_context({ + 'config_default': default_config, + 'config_extension': {}, + 'user_instruction': '/chat-only-role', + 'user_selection': '', + 'command_type': 'chat', + }) + actual_config = context['config'] + assert 'preset_tab' == actual_config['options']['open_chat_command'] + def test_user_prompt(): assert 'fix grammar: helo word' == make_prompt( '', 'fix grammar: helo word', '', '') assert 'fix grammar:\nhelo word' == make_prompt( '', 'fix grammar', 'helo word', '') |