diff --git a/conductor/tracks/gui2_feature_parity_20260223/plan.md b/conductor/tracks/gui2_feature_parity_20260223/plan.md index 3f0fa11..017de27 100644 --- a/conductor/tracks/gui2_feature_parity_20260223/plan.md +++ b/conductor/tracks/gui2_feature_parity_20260223/plan.md @@ -7,13 +7,13 @@ - [x] Sub-task: Refactor the `ai_client` call in `_do_send` to use the event-driven `send` method. - [x] Sub-task: Create event handlers in `App` class for `request_start`, `response_received`, and `tool_execution`. - [x] Sub-task: Subscribe the handlers to `ai_client.events` upon `App` initialization. -- [~] **Task:** Integrate `mcp_client.py` for native file tools. - - [ ] Sub-task: Import `mcp_client` in `gui_2.py`. - - [ ] Sub-task: Add `mcp_client.perf_monitor_callback` to the `App` initialization. - - [ ] Sub-task: In `ai_client`, ensure the MCP tools are registered and available for the AI to call when `gui_2.py` is the active UI. -- [ ] **Task:** Write tests for new core integrations. +- [x] **Task:** Integrate `mcp_client.py` for native file tools. [ece84d4] + - [x] Sub-task: Import `mcp_client` in `gui_2.py`. + - [x] Sub-task: Add `mcp_client.perf_monitor_callback` to the `App` initialization. + - [x] Sub-task: In `ai_client`, ensure the MCP tools are registered and available for the AI to call when `gui_2.py` is the active UI. +- [x] **Task:** Write tests for new core integrations. [ece84d4] - [x] Sub-task: Create `tests/test_gui2_events.py` to verify that `gui_2.py` correctly handles AI lifecycle events. - - [ ] Sub-task: Create `tests/test_gui2_mcp.py` to verify that the AI can use MCP tools through `gui_2.py`. + - [x] Sub-task: Create `tests/test_gui2_mcp.py` to verify that the AI can use MCP tools through `gui_2.py`. - [ ] **Task:** Conductor - User Manual Verification 'Core Architectural Integration' (Protocol in workflow.md) ## Phase 2: Major Feature Implementation diff --git a/config.toml b/config.toml index 8c481ba..5f0ff12 100644 --- a/config.toml +++ b/config.toml @@ -1,6 +1,6 @@ [ai] provider = "gemini" -model = "gemini-2.0-flash" +model = "gemini-2.5-flash" temperature = 0.0 max_tokens = 8192 history_trunc_limit = 8000 @@ -18,7 +18,7 @@ paths = [ "C:/projects/forth/bootslop/bootslop.toml", "C:\\projects\\manual_slop\\tests\\temp_project.toml", ] -active = "manual_slop.toml" +active = "C:\\projects\\manual_slop\\tests\\temp_project.toml" [gui.show_windows] Projects = true diff --git a/manual_slop.toml b/manual_slop.toml index c2a6631..1567390 100644 --- a/manual_slop.toml +++ b/manual_slop.toml @@ -65,77 +65,58 @@ history = [ [discussion.discussions."test for gemini conductor"] git_commit = "ccdba69214aea169a4e707da7b425ae0c6139fca" -last_updated = "2026-02-23T21:48:57" +last_updated = "2026-02-23T22:07:51" history = [ - "User:\nadded a file to yoru exposed files read it.", - "User:\nI have read the `MainContext.md` file. It contains extensive documentation about the \"Manual Slop\" project.\n\nWas `MainContext.md` the file you were referring to? If not, please specify the file's name or path.", - "User:\ntesting to see if you can still run powershell even though I disabled the capability...", - "User:\nI cannot directly run PowerShell scripts. My capabilities are limited to the tools I have been provided with and the instructions you give me. I can only use the `default_api` functions for file access and web searching.", - "User:\n[PERFORMANCE ALERT] Frame time high: 906.5ms. Please consider optimizing recent changes or reducing load.", - "User:\n[PERFORMANCE ALERT] Frame time high: 194.0ms; Input lag high: 156.2ms. Please consider optimizing recent changes or reducing load.", - "User:\n[PERFORMANCE ALERT] Frame time high: 117.4ms; Input lag high: 156.2ms. Please consider optimizing recent changes or reducing load.", - "User:\n[PERFORMANCE ALERT] Frame time high: 206.5ms; Input lag high: 156.2ms. Please consider optimizing recent changes or reducing load.", - "User:\n[PERFORMANCE ALERT] Frame time high: 817.2ms. Please consider optimizing recent changes or reducing load.", - "User:\n[PERFORMANCE ALERT] Frame time high: 679.9ms. Please consider optimizing recent changes or reducing load.", - "User:\n[PERFORMANCE ALERT] Frame time high: 701.5ms. Please consider optimizing recent changes or reducing load.", - "User:\n[PERFORMANCE ALERT] Frame time high: 111.9ms. Please consider optimizing recent changes or reducing load.", - "User:\n[PERFORMANCE ALERT] Frame time high: 113.7ms. Please consider optimizing recent changes or reducing load.", - "User:\n[PERFORMANCE ALERT] Frame time high: 106.9ms. Please consider optimizing recent changes or reducing load.", - "User:\n[PERFORMANCE ALERT] Frame time high: 119.9ms. Please consider optimizing recent changes or reducing load.", - "User:\n[PERFORMANCE ALERT] Frame time high: 106.0ms. Please consider optimizing recent changes or reducing load.", - "User:\n[PERFORMANCE ALERT] Frame time high: 873.7ms. Please consider optimizing recent changes or reducing load.", - "User:\n[PERFORMANCE ALERT] Frame time high: 821.3ms. Please consider optimizing recent changes or reducing load.", - "User:\n[PERFORMANCE ALERT] Frame time high: 119.2ms; Input lag high: 251.6ms. Please consider optimizing recent changes or reducing load.", - "User:\n[PERFORMANCE ALERT] Frame time high: 685.6ms. Please consider optimizing recent changes or reducing load.", - "User:\nStress test entry 20 Stress test entry 20 Stress test entry 20 Stress test entry 20 Stress test entry 20 Stress test entry 20 Stress test entry 20 Stress test entry 20 Stress test entry 20 Stress test entry 20", - "User:\nStress test entry 21 Stress test entry 21 Stress test entry 21 Stress test entry 21 Stress test entry 21 Stress test entry 21 Stress test entry 21 Stress test entry 21 Stress test entry 21 Stress test entry 21", - "User:\nStress test entry 22 Stress test entry 22 Stress test entry 22 Stress test entry 22 Stress test entry 22 Stress test entry 22 Stress test entry 22 Stress test entry 22 Stress test entry 22 Stress test entry 22", - "User:\nStress test entry 23 Stress test entry 23 Stress test entry 23 Stress test entry 23 Stress test entry 23 Stress test entry 23 Stress test entry 23 Stress test entry 23 Stress test entry 23 Stress test entry 23", - "User:\nStress test entry 24 Stress test entry 24 Stress test entry 24 Stress test entry 24 Stress test entry 24 Stress test entry 24 Stress test entry 24 Stress test entry 24 Stress test entry 24 Stress test entry 24", - "User:\nStress test entry 25 Stress test entry 25 Stress test entry 25 Stress test entry 25 Stress test entry 25 Stress test entry 25 Stress test entry 25 Stress test entry 25 Stress test entry 25 Stress test entry 25", - "User:\nStress test entry 26 Stress test entry 26 Stress test entry 26 Stress test entry 26 Stress test entry 26 Stress test entry 26 Stress test entry 26 Stress test entry 26 Stress test entry 26 Stress test entry 26", - "User:\nStress test entry 27 Stress test entry 27 Stress test entry 27 Stress test entry 27 Stress test entry 27 Stress test entry 27 Stress test entry 27 Stress test entry 27 Stress test entry 27 Stress test entry 27", - "User:\nStress test entry 28 Stress test entry 28 Stress test entry 28 Stress test entry 28 Stress test entry 28 Stress test entry 28 Stress test entry 28 Stress test entry 28 Stress test entry 28 Stress test entry 28", - "User:\nStress test entry 29 Stress test entry 29 Stress test entry 29 Stress test entry 29 Stress test entry 29 Stress test entry 29 Stress test entry 29 Stress test entry 29 Stress test entry 29 Stress test entry 29", - "User:\nStress test entry 30 Stress test entry 30 Stress test entry 30 Stress test entry 30 Stress test entry 30 Stress test entry 30 Stress test entry 30 Stress test entry 30 Stress test entry 30 Stress test entry 30", - "User:\nStress test entry 31 Stress test entry 31 Stress test entry 31 Stress test entry 31 Stress test entry 31 Stress test entry 31 Stress test entry 31 Stress test entry 31 Stress test entry 31 Stress test entry 31", - "User:\nStress test entry 32 Stress test entry 32 Stress test entry 32 Stress test entry 32 Stress test entry 32 Stress test entry 32 Stress test entry 32 Stress test entry 32 Stress test entry 32 Stress test entry 32", - "User:\nStress test entry 33 Stress test entry 33 Stress test entry 33 Stress test entry 33 Stress test entry 33 Stress test entry 33 Stress test entry 33 Stress test entry 33 Stress test entry 33 Stress test entry 33", - "User:\nStress test entry 34 Stress test entry 34 Stress test entry 34 Stress test entry 34 Stress test entry 34 Stress test entry 34 Stress test entry 34 Stress test entry 34 Stress test entry 34 Stress test entry 34", - "User:\nStress test entry 35 Stress test entry 35 Stress test entry 35 Stress test entry 35 Stress test entry 35 Stress test entry 35 Stress test entry 35 Stress test entry 35 Stress test entry 35 Stress test entry 35", - "User:\nStress test entry 36 Stress test entry 36 Stress test entry 36 Stress test entry 36 Stress test entry 36 Stress test entry 36 Stress test entry 36 Stress test entry 36 Stress test entry 36 Stress test entry 36", - "User:\nStress test entry 37 Stress test entry 37 Stress test entry 37 Stress test entry 37 Stress test entry 37 Stress test entry 37 Stress test entry 37 Stress test entry 37 Stress test entry 37 Stress test entry 37", - "User:\nStress test entry 38 Stress test entry 38 Stress test entry 38 Stress test entry 38 Stress test entry 38 Stress test entry 38 Stress test entry 38 Stress test entry 38 Stress test entry 38 Stress test entry 38", - "User:\nStress test entry 39 Stress test entry 39 Stress test entry 39 Stress test entry 39 Stress test entry 39 Stress test entry 39 Stress test entry 39 Stress test entry 39 Stress test entry 39 Stress test entry 39", - "User:\nStress test entry 40 Stress test entry 40 Stress test entry 40 Stress test entry 40 Stress test entry 40 Stress test entry 40 Stress test entry 40 Stress test entry 40 Stress test entry 40 Stress test entry 40", - "User:\nStress test entry 41 Stress test entry 41 Stress test entry 41 Stress test entry 41 Stress test entry 41 Stress test entry 41 Stress test entry 41 Stress test entry 41 Stress test entry 41 Stress test entry 41", - "User:\nStress test entry 42 Stress test entry 42 Stress test entry 42 Stress test entry 42 Stress test entry 42 Stress test entry 42 Stress test entry 42 Stress test entry 42 Stress test entry 42 Stress test entry 42", - "User:\nStress test entry 43 Stress test entry 43 Stress test entry 43 Stress test entry 43 Stress test entry 43 Stress test entry 43 Stress test entry 43 Stress test entry 43 Stress test entry 43 Stress test entry 43", - "User:\nStress test entry 44 Stress test entry 44 Stress test entry 44 Stress test entry 44 Stress test entry 44 Stress test entry 44 Stress test entry 44 Stress test entry 44 Stress test entry 44 Stress test entry 44", - "User:\nStress test entry 45 Stress test entry 45 Stress test entry 45 Stress test entry 45 Stress test entry 45 Stress test entry 45 Stress test entry 45 Stress test entry 45 Stress test entry 45 Stress test entry 45", - "User:\nStress test entry 46 Stress test entry 46 Stress test entry 46 Stress test entry 46 Stress test entry 46 Stress test entry 46 Stress test entry 46 Stress test entry 46 Stress test entry 46 Stress test entry 46", - "User:\nStress test entry 47 Stress test entry 47 Stress test entry 47 Stress test entry 47 Stress test entry 47 Stress test entry 47 Stress test entry 47 Stress test entry 47 Stress test entry 47 Stress test entry 47", - "User:\nStress test entry 48 Stress test entry 48 Stress test entry 48 Stress test entry 48 Stress test entry 48 Stress test entry 48 Stress test entry 48 Stress test entry 48 Stress test entry 48 Stress test entry 48", - "User:\nStress test entry 49 Stress test entry 49 Stress test entry 49 Stress test entry 49 Stress test entry 49 Stress test entry 49 Stress test entry 49 Stress test entry 49 Stress test entry 49 Stress test entry 49", - "@2026-02-23T15:28:40\nSystem:\n[PERFORMANCE ALERT] Frame time high: 210.4ms. Please consider optimizing recent changes or reducing load.", - "@2026-02-23T15:29:20\nSystem:\n[PERFORMANCE ALERT] Frame time high: 266.8ms. Please consider optimizing recent changes or reducing load.", - "@2026-02-23T15:29:48\nSystem:\n[PERFORMANCE ALERT] Frame time high: 734.8ms. Please consider optimizing recent changes or reducing load.", - "@2026-02-23T15:30:27\nSystem:\n[PERFORMANCE ALERT] Frame time high: 160.9ms. Please consider optimizing recent changes or reducing load.", - "@2026-02-23T16:03:29\nSystem:\n[PERFORMANCE ALERT] Frame time high: 862.8ms. Please consider optimizing recent changes or reducing load.", - "@2026-02-23T16:04:08\nSystem:\n[PERFORMANCE ALERT] Frame time high: 146.3ms. Please consider optimizing recent changes or reducing load.", - "@2026-02-23T16:17:39\nSystem:\n[PERFORMANCE ALERT] Frame time high: 790.9ms. Please consider optimizing recent changes or reducing load.", - "@2026-02-23T16:18:19\nSystem:\n[PERFORMANCE ALERT] Frame time high: 170.3ms. Please consider optimizing recent changes or reducing load.", - "@2026-02-23T16:18:49\nSystem:\n[PERFORMANCE ALERT] Frame time high: 371.8ms. Please consider optimizing recent changes or reducing load.", - "@2026-02-23T16:19:29\nSystem:\n[PERFORMANCE ALERT] Frame time high: 158.2ms. Please consider optimizing recent changes or reducing load.", - "@2026-02-23T16:19:59\nSystem:\n[PERFORMANCE ALERT] Frame time high: 221.8ms. Please consider optimizing recent changes or reducing load.", - "@2026-02-23T16:29:49\nSystem:\n[PERFORMANCE ALERT] Frame time high: 795.2ms. Please consider optimizing recent changes or reducing load.", - "@2026-02-23T18:57:49\nSystem:\n[PERFORMANCE ALERT] CPU usage high: 123.4%. Please consider optimizing recent changes or reducing load.", - "@2026-02-23T18:58:19\nSystem:\n[PERFORMANCE ALERT] CPU usage high: 109.4%. Please consider optimizing recent changes or reducing load.", - "@2026-02-23T21:08:13\nSystem:\n[PERFORMANCE ALERT] CPU usage high: 92.2%. Please consider optimizing recent changes or reducing load.", - "@2026-02-23T21:08:44\nSystem:\n[PERFORMANCE ALERT] CPU usage high: 201.6%. Please consider optimizing recent changes or reducing load.", - "@2026-02-23T21:09:15\nSystem:\n[PERFORMANCE ALERT] CPU usage high: 104.7%. Please consider optimizing recent changes or reducing load.", - "@2026-02-23T21:09:51\nSystem:\n[PERFORMANCE ALERT] CPU usage high: 103.1%. Please consider optimizing recent changes or reducing load.", - "@2026-02-23T21:28:21\nSystem:\n[PERFORMANCE ALERT] CPU usage high: 87.5%. Please consider optimizing recent changes or reducing load.", + "@1771902467.409145\nUser:\nStress test entry 0 Stress test entry 0 Stress test entry 0 Stress test entry 0 Stress test entry 0 ", + "@1771902467.409145\nUser:\nStress test entry 1 Stress test entry 1 Stress test entry 1 Stress test entry 1 Stress test entry 1 ", + "@1771902467.409145\nUser:\nStress test entry 2 Stress test entry 2 Stress test entry 2 Stress test entry 2 Stress test entry 2 ", + "@1771902467.409145\nUser:\nStress test entry 3 Stress test entry 3 Stress test entry 3 Stress test entry 3 Stress test entry 3 ", + "@1771902467.409145\nUser:\nStress test entry 4 Stress test entry 4 Stress test entry 4 Stress test entry 4 Stress test entry 4 ", + "@1771902467.409145\nUser:\nStress test entry 5 Stress test entry 5 Stress test entry 5 Stress test entry 5 Stress test entry 5 ", + "@1771902467.409145\nUser:\nStress test entry 6 Stress test entry 6 Stress test entry 6 Stress test entry 6 Stress test entry 6 ", + "@1771902467.409145\nUser:\nStress test entry 7 Stress test entry 7 Stress test entry 7 Stress test entry 7 Stress test entry 7 ", + "@1771902467.409145\nUser:\nStress test entry 8 Stress test entry 8 Stress test entry 8 Stress test entry 8 Stress test entry 8 ", + "@1771902467.409145\nUser:\nStress test entry 9 Stress test entry 9 Stress test entry 9 Stress test entry 9 Stress test entry 9 ", + "@1771902467.409145\nUser:\nStress test entry 10 Stress test entry 10 Stress test entry 10 Stress test entry 10 Stress test entry 10 ", + "@1771902467.409145\nUser:\nStress test entry 11 Stress test entry 11 Stress test entry 11 Stress test entry 11 Stress test entry 11 ", + "@1771902467.409145\nUser:\nStress test entry 12 Stress test entry 12 Stress test entry 12 Stress test entry 12 Stress test entry 12 ", + "@1771902467.409145\nUser:\nStress test entry 13 Stress test entry 13 Stress test entry 13 Stress test entry 13 Stress test entry 13 ", + "@1771902467.409145\nUser:\nStress test entry 14 Stress test entry 14 Stress test entry 14 Stress test entry 14 Stress test entry 14 ", + "@1771902467.409145\nUser:\nStress test entry 15 Stress test entry 15 Stress test entry 15 Stress test entry 15 Stress test entry 15 ", + "@1771902467.409145\nUser:\nStress test entry 16 Stress test entry 16 Stress test entry 16 Stress test entry 16 Stress test entry 16 ", + "@1771902467.409145\nUser:\nStress test entry 17 Stress test entry 17 Stress test entry 17 Stress test entry 17 Stress test entry 17 ", + "@1771902467.409145\nUser:\nStress test entry 18 Stress test entry 18 Stress test entry 18 Stress test entry 18 Stress test entry 18 ", + "@1771902467.409145\nUser:\nStress test entry 19 Stress test entry 19 Stress test entry 19 Stress test entry 19 Stress test entry 19 ", + "@1771902467.409145\nUser:\nStress test entry 20 Stress test entry 20 Stress test entry 20 Stress test entry 20 Stress test entry 20 ", + "@1771902467.409145\nUser:\nStress test entry 21 Stress test entry 21 Stress test entry 21 Stress test entry 21 Stress test entry 21 ", + "@1771902467.409145\nUser:\nStress test entry 22 Stress test entry 22 Stress test entry 22 Stress test entry 22 Stress test entry 22 ", + "@1771902467.409145\nUser:\nStress test entry 23 Stress test entry 23 Stress test entry 23 Stress test entry 23 Stress test entry 23 ", + "@1771902467.409145\nUser:\nStress test entry 24 Stress test entry 24 Stress test entry 24 Stress test entry 24 Stress test entry 24 ", + "@1771902467.409145\nUser:\nStress test entry 25 Stress test entry 25 Stress test entry 25 Stress test entry 25 Stress test entry 25 ", + "@1771902467.409145\nUser:\nStress test entry 26 Stress test entry 26 Stress test entry 26 Stress test entry 26 Stress test entry 26 ", + "@1771902467.409145\nUser:\nStress test entry 27 Stress test entry 27 Stress test entry 27 Stress test entry 27 Stress test entry 27 ", + "@1771902467.409145\nUser:\nStress test entry 28 Stress test entry 28 Stress test entry 28 Stress test entry 28 Stress test entry 28 ", + "@1771902467.409145\nUser:\nStress test entry 29 Stress test entry 29 Stress test entry 29 Stress test entry 29 Stress test entry 29 ", + "@1771902467.409145\nUser:\nStress test entry 30 Stress test entry 30 Stress test entry 30 Stress test entry 30 Stress test entry 30 ", + "@1771902467.409145\nUser:\nStress test entry 31 Stress test entry 31 Stress test entry 31 Stress test entry 31 Stress test entry 31 ", + "@1771902467.409145\nUser:\nStress test entry 32 Stress test entry 32 Stress test entry 32 Stress test entry 32 Stress test entry 32 ", + "@1771902467.409145\nUser:\nStress test entry 33 Stress test entry 33 Stress test entry 33 Stress test entry 33 Stress test entry 33 ", + "@1771902467.409145\nUser:\nStress test entry 34 Stress test entry 34 Stress test entry 34 Stress test entry 34 Stress test entry 34 ", + "@1771902467.409145\nUser:\nStress test entry 35 Stress test entry 35 Stress test entry 35 Stress test entry 35 Stress test entry 35 ", + "@1771902467.409145\nUser:\nStress test entry 36 Stress test entry 36 Stress test entry 36 Stress test entry 36 Stress test entry 36 ", + "@1771902467.409145\nUser:\nStress test entry 37 Stress test entry 37 Stress test entry 37 Stress test entry 37 Stress test entry 37 ", + "@1771902467.409145\nUser:\nStress test entry 38 Stress test entry 38 Stress test entry 38 Stress test entry 38 Stress test entry 38 ", + "@1771902467.409145\nUser:\nStress test entry 39 Stress test entry 39 Stress test entry 39 Stress test entry 39 Stress test entry 39 ", + "@1771902467.409145\nUser:\nStress test entry 40 Stress test entry 40 Stress test entry 40 Stress test entry 40 Stress test entry 40 ", + "@1771902467.409145\nUser:\nStress test entry 41 Stress test entry 41 Stress test entry 41 Stress test entry 41 Stress test entry 41 ", + "@1771902467.409145\nUser:\nStress test entry 42 Stress test entry 42 Stress test entry 42 Stress test entry 42 Stress test entry 42 ", + "@1771902467.409145\nUser:\nStress test entry 43 Stress test entry 43 Stress test entry 43 Stress test entry 43 Stress test entry 43 ", + "@1771902467.409145\nUser:\nStress test entry 44 Stress test entry 44 Stress test entry 44 Stress test entry 44 Stress test entry 44 ", + "@1771902467.409145\nUser:\nStress test entry 45 Stress test entry 45 Stress test entry 45 Stress test entry 45 Stress test entry 45 ", + "@1771902467.409145\nUser:\nStress test entry 46 Stress test entry 46 Stress test entry 46 Stress test entry 46 Stress test entry 46 ", + "@1771902467.409145\nUser:\nStress test entry 47 Stress test entry 47 Stress test entry 47 Stress test entry 47 Stress test entry 47 ", + "@1771902467.409145\nUser:\nStress test entry 48 Stress test entry 48 Stress test entry 48 Stress test entry 48 Stress test entry 48 ", + "@1771902467.409145\nUser:\nStress test entry 49 Stress test entry 49 Stress test entry 49 Stress test entry 49 Stress test entry 49 ", ] [discussion.discussions."test gemini mock interaction"] diff --git a/project.toml b/project.toml index cdcf98e..2b37d24 100644 --- a/project.toml +++ b/project.toml @@ -35,5 +35,5 @@ active = "main" [discussion.discussions.main] git_commit = "" -last_updated = "2026-02-23T19:01:39" +last_updated = "2026-02-23T22:07:48" history = [] diff --git a/tests/temp_project.toml b/tests/temp_project.toml index 934f1db..9b92661 100644 --- a/tests/temp_project.toml +++ b/tests/temp_project.toml @@ -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'}}", ] diff --git a/tests/test_gui2_mcp.py b/tests/test_gui2_mcp.py index a91ed5a..69c3b35 100644 --- a/tests/test_gui2_mcp.py +++ b/tests/test_gui2_mcp.py @@ -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",