conductor(checkpoint): Checkpoint end of Phase 1

This commit is contained in:
2026-02-23 22:10:05 -05:00
parent ece84d4c4f
commit 712d5a856f
6 changed files with 77 additions and 95 deletions

View File

@@ -4,7 +4,6 @@ git_dir = "C:\\projects\\manual_slop"
system_prompt = ""
main_context = ""
word_wrap = true
summary_only = false
[output]
output_dir = "./md_gen"
@@ -38,7 +37,8 @@ auto_add = true
[discussion.discussions.main]
git_commit = ""
last_updated = "2026-02-23T20:56:57"
last_updated = "2026-02-23T22:08:38"
history = [
"@2026-02-23T20:12:12\nSystem:\n[PERFORMANCE ALERT] CPU usage high: 121.9%. Please consider optimizing recent changes or reducing load.",
"@2026-02-23T22:07:54\nUser:\nHello! This is an automated test. Just say 'Acknowledged'.",
"@2026-02-23T22:07:54\nVendor API:\n[GEMINI API ERROR]\n\n404 NOT_FOUND. {'error': {'code': 404, 'message': 'This model models/gemini-2.0-flash is no longer available to new users. Please update your code to use a newer model for the latest features and improvements.', 'status': 'NOT_FOUND'}}",
]

View File

@@ -36,35 +36,36 @@ def test_mcp_tool_call_is_dispatched(app_instance):
# 2. Construct the mock AI response (Gemini format)
mock_response_with_tool = MagicMock()
mock_part = MagicMock()
mock_part.text = ""
mock_part.function_call = mock_fc
mock_candidate = MagicMock()
mock_candidate.content.parts = [mock_part]
mock_candidate.finish_reason.name = "TOOL_CALLING"
mock_response_with_tool.candidates = [mock_candidate]
mock_usage_metadata = MagicMock()
mock_usage_metadata.prompt_token_count = 100
mock_usage_metadata.candidates_token_count = 10
mock_usage_metadata.cached_content_token_count = 0
mock_response_with_tool.usage_metadata = mock_usage_metadata
class DummyUsage:
prompt_token_count = 100
candidates_token_count = 10
cached_content_token_count = 0
mock_response_with_tool.usage_metadata = DummyUsage()
# 3. Create a mock for the final AI response after the tool call
mock_response_final = MagicMock()
mock_response_final.text = "Final answer"
mock_response_final.candidates = []
mock_response_final.usage_metadata = mock_usage_metadata
mock_response_final.usage_metadata = DummyUsage()
# 4. Patch the necessary components
with patch("ai_client._ensure_gemini_client"), \
patch("ai_client._gemini_client"), \
patch("ai_client._gemini_chat") as mock_chat, \
patch("ai_client._gemini_client") as mock_client, \
patch('mcp_client.dispatch', return_value="file content") as mock_dispatch:
mock_chat = mock_client.chats.create.return_value
mock_chat.send_message.side_effect = [mock_response_with_tool, mock_response_final]
ai_client._gemini_chat = mock_chat
ai_client.set_provider("gemini", "mock-model")
# 5. Call the send function
ai_client.send(
md_content="some context",