From 8fde389664ca59773c38dc0ec1a434a98bc2428b Mon Sep 17 00:00:00 2001 From: Martin Bielik Date: Mon, 16 Dec 2024 23:46:17 +0100 Subject: command-type only roles --- tests/context_test.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests/context_test.py') 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', '') -- cgit v1.2.3