Private
Public Access
starting human review of ai_client
This commit is contained in:
+2
-14
@@ -206,23 +206,14 @@ def set_custom_system_prompt(prompt: str) -> None:
|
|||||||
_custom_system_prompt = prompt
|
_custom_system_prompt = prompt
|
||||||
|
|
||||||
def set_base_system_prompt(prompt: str) -> None:
|
def set_base_system_prompt(prompt: str) -> None:
|
||||||
"""
|
|
||||||
[C: src/app_controller.py:AppController._do_generate, src/app_controller.py:AppController._handle_request_event, src/app_controller.py:_api_generate, tests/test_system_prompt_exposure.py:TestSystemPromptExposure.setUp, tests/test_system_prompt_exposure.py:TestSystemPromptExposure.test_ai_client_get_combined_respects_use_default, tests/test_system_prompt_exposure.py:TestSystemPromptExposure.test_ai_client_set_base_overrides_when_default_false]
|
|
||||||
"""
|
|
||||||
global _base_system_prompt_override
|
global _base_system_prompt_override
|
||||||
_base_system_prompt_override = prompt
|
_base_system_prompt_override = prompt
|
||||||
|
|
||||||
def set_use_default_base_prompt(use_default: bool) -> None:
|
def set_use_default_base_prompt(use_default: bool) -> None:
|
||||||
"""
|
|
||||||
[C: src/app_controller.py:AppController._do_generate, src/app_controller.py:AppController._handle_request_event, src/app_controller.py:_api_generate, tests/test_system_prompt_exposure.py:TestSystemPromptExposure.setUp, tests/test_system_prompt_exposure.py:TestSystemPromptExposure.test_ai_client_get_combined_respects_use_default, tests/test_system_prompt_exposure.py:TestSystemPromptExposure.test_ai_client_set_base_overrides_when_default_false]
|
|
||||||
"""
|
|
||||||
global _use_default_base_system_prompt
|
global _use_default_base_system_prompt
|
||||||
_use_default_base_system_prompt = use_default
|
_use_default_base_system_prompt = use_default
|
||||||
|
|
||||||
def set_project_context_marker(marker: str) -> None:
|
def set_project_context_marker(marker: str) -> None:
|
||||||
"""
|
|
||||||
[C: src/app_controller.py:AppController._do_generate, src/app_controller.py:AppController._handle_request_event, src/app_controller.py:_api_generate]
|
|
||||||
"""
|
|
||||||
global _project_context_marker
|
global _project_context_marker
|
||||||
_project_context_marker = marker
|
_project_context_marker = marker
|
||||||
|
|
||||||
@@ -230,9 +221,6 @@ def _get_context_marker() -> str:
|
|||||||
return _project_context_marker if _project_context_marker.strip() else "[SYSTEM: FILES UPDATED]"
|
return _project_context_marker if _project_context_marker.strip() else "[SYSTEM: FILES UPDATED]"
|
||||||
|
|
||||||
def _get_combined_system_prompt(preset: Optional[ToolPreset] = None, bias: Optional[BiasProfile] = None) -> str:
|
def _get_combined_system_prompt(preset: Optional[ToolPreset] = None, bias: Optional[BiasProfile] = None) -> str:
|
||||||
"""
|
|
||||||
[C: tests/test_bias_efficacy.py:test_bias_efficacy_prompt_generation, tests/test_bias_integration.py:test_system_prompt_biasing, tests/test_system_prompt_exposure.py:TestSystemPromptExposure.test_ai_client_get_combined_respects_use_default, tests/test_system_prompt_exposure.py:TestSystemPromptExposure.test_ai_client_set_base_overrides_when_default_false]
|
|
||||||
"""
|
|
||||||
if preset is None: preset = _active_tool_preset
|
if preset is None: preset = _active_tool_preset
|
||||||
if bias is None: bias = _active_bias_profile
|
if bias is None: bias = _active_bias_profile
|
||||||
if _use_default_base_system_prompt:
|
if _use_default_base_system_prompt:
|
||||||
@@ -2773,12 +2761,12 @@ def send_result(
|
|||||||
stream, pre_tool_callback, qa_callback, stream_callback, patch_callback
|
stream, pre_tool_callback, qa_callback, stream_callback, patch_callback
|
||||||
)
|
)
|
||||||
elif p == "llama":
|
elif p == "llama":
|
||||||
res = _send_llama_result(
|
res = _send_llama(
|
||||||
md_content, user_message, base_dir, file_items, discussion_history,
|
md_content, user_message, base_dir, file_items, discussion_history,
|
||||||
stream, pre_tool_callback, qa_callback, stream_callback, patch_callback
|
stream, pre_tool_callback, qa_callback, stream_callback, patch_callback
|
||||||
)
|
)
|
||||||
elif p == "grok":
|
elif p == "grok":
|
||||||
res = _send_grok_result(
|
res = _send_grok(
|
||||||
md_content, user_message, base_dir, file_items, discussion_history,
|
md_content, user_message, base_dir, file_items, discussion_history,
|
||||||
stream, pre_tool_callback, qa_callback, stream_callback, patch_callback
|
stream, pre_tool_callback, qa_callback, stream_callback, patch_callback
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user