Compare commits
8 Commits
abe1c660ea
...
e600d3fdcd
| Author | SHA1 | Date | |
|---|---|---|---|
| e600d3fdcd | |||
| 266a67dcd9 | |||
| 2b73745cd9 | |||
| 51d05c15e0 | |||
| 9ddbcd2fd6 | |||
| c205c6d97c | |||
| 2ed9867e39 | |||
| f5d4913da2 |
@@ -3,23 +3,25 @@
|
|||||||
## Phase 1: Cleanup & Project Settings Rename
|
## Phase 1: Cleanup & Project Settings Rename
|
||||||
Focus: Remove redundant ui_summary_only, rename Context Hub, establish project-level vs discussion-level separation
|
Focus: Remove redundant ui_summary_only, rename Context Hub, establish project-level vs discussion-level separation
|
||||||
|
|
||||||
- [ ] Task: Audit current ui_summary_only usages and document behavior to deprecate
|
- [x] Task: Audit current ui_summary_only usages and document behavior to deprecate [f6fe3ba] (embedded audit)
|
||||||
- [ ] Task: Remove ui_summary_only checkbox from _render_projects_panel (gui_2.py)
|
- [x] Task: Remove ui_summary_only checkbox from _render_projects_panel (gui_2.py) [f5d4913]
|
||||||
- [ ] Task: Rename Context Hub to "Project Settings" in _gui_func tab bar
|
- [x] Task: Rename Context Hub to "Project Settings" in _gui_func tab bar [2ed9867]
|
||||||
- [ ] Task: Remove Context Presets tab from Project Settings (Context Hub)
|
- [ ] Task: Remove Context Presets tab from Project Settings (Context Hub)
|
||||||
- [ ] Task: Update references in show_windows dict and any help text
|
- [ ] Task: Rename Context Hub to "Project Settings" in _gui_func tab bar
|
||||||
- [ ] Task: Write tests verifying ui_summary_only removal doesn't break existing functionality
|
- [x] Task: Remove Context Presets tab from Project Settings (Context Hub) [9ddbcd2]
|
||||||
|
- [x] Task: Update references in show_windows dict and any help text [2ed9867] (renamed Context Hub -> Project Settings)
|
||||||
|
- [x] Task: Write tests verifying ui_summary_only removal doesn't break existing functionality [f5d4913]
|
||||||
- [ ] Task: Conductor - User Manual Verification 'Phase 1: Cleanup & Project Settings Rename'
|
- [ ] Task: Conductor - User Manual Verification 'Phase 1: Cleanup & Project Settings Rename'
|
||||||
|
|
||||||
## Phase 2: Merge Session Hub into Discussion Hub
|
## Phase 2: Merge Session Hub into Discussion Hub [checkpoint: 2b73745]
|
||||||
Focus: Move Session Hub tabs into Discussion Hub, eliminate separate Session Hub window
|
Focus: Move Session Hub tabs into Discussion Hub, eliminate separate Session Hub window
|
||||||
|
|
||||||
- [ ] Task: Audit Session Hub (_render_session_hub) tab content
|
- [x] Task: Audit Session Hub (_render_session_hub) tab content [documented above]
|
||||||
- [ ] Task: Add Snapshot tab to Discussion Hub containing Aggregate MD + System Prompt preview
|
- [x] Task: Add Snapshot tab to Discussion Hub containing Aggregate MD + System Prompt preview [2b73745]
|
||||||
- [ ] Task: Remove Session Hub window from _gui_func
|
- [x] Task: Remove Session Hub window from _gui_func [2b73745]
|
||||||
- [ ] Task: Add Discussion Hub tab bar structure (Discussion | Context Composition | Snapshot | Takes)
|
- [x] Task: Add Discussion Hub tab bar structure (Discussion | Context Composition | Snapshot | Takes) [2b73745]
|
||||||
- [ ] Task: Write tests for new tab structure rendering
|
- [x] Task: Write tests for new tab structure rendering [2b73745]
|
||||||
- [ ] Task: Conductor - User Manual Verification 'Phase 2: Merge Session Hub into Discussion Hub'
|
- [x] Task: Conductor - User Manual Verification 'Phase 2: Merge Session Hub into Discussion Hub'
|
||||||
|
|
||||||
## Phase 3: Context Composition Tab
|
## Phase 3: Context Composition Tab
|
||||||
Focus: Per-discussion file filter with save/load preset functionality
|
Focus: Per-discussion file filter with save/load preset functionality
|
||||||
|
|||||||
13
config.toml
13
config.toml
@@ -10,14 +10,9 @@ system_prompt = "Overridden Prompt"
|
|||||||
|
|
||||||
[projects]
|
[projects]
|
||||||
paths = [
|
paths = [
|
||||||
"C:/projects/gencpp/gencpp_sloppy.toml",
|
"C:/projects/gencpp/.ai/gencpp_sloppy.toml",
|
||||||
"C:\\projects\\manual_slop\\tests\\artifacts\\temp_livecontextsim.toml",
|
|
||||||
"C:\\projects\\manual_slop\\tests\\artifacts\\temp_liveaisettingssim.toml",
|
|
||||||
"C:\\projects\\manual_slop\\tests\\artifacts\\temp_livetoolssim.toml",
|
|
||||||
"C:\\projects\\manual_slop\\tests\\artifacts\\temp_liveexecutionsim.toml",
|
|
||||||
"C:\\projects\\manual_slop\\tests\\artifacts\\temp_project.toml",
|
|
||||||
]
|
]
|
||||||
active = "C:/projects/gencpp/gencpp_sloppy.toml"
|
active = "C:/projects/gencpp/.ai/gencpp_sloppy.toml"
|
||||||
|
|
||||||
[gui]
|
[gui]
|
||||||
separate_message_panel = false
|
separate_message_panel = false
|
||||||
@@ -34,7 +29,7 @@ separate_tier4 = false
|
|||||||
separate_external_tools = false
|
separate_external_tools = false
|
||||||
|
|
||||||
[gui.show_windows]
|
[gui.show_windows]
|
||||||
"Context Hub" = true
|
"Project Settings" = true
|
||||||
"Files & Media" = true
|
"Files & Media" = true
|
||||||
"AI Settings" = true
|
"AI Settings" = true
|
||||||
"MMA Dashboard" = false
|
"MMA Dashboard" = false
|
||||||
@@ -53,7 +48,7 @@ separate_external_tools = false
|
|||||||
Message = false
|
Message = false
|
||||||
Response = false
|
Response = false
|
||||||
"Tool Calls" = false
|
"Tool Calls" = false
|
||||||
Theme = true
|
Theme = false
|
||||||
"Log Management" = false
|
"Log Management" = false
|
||||||
Diagnostics = false
|
Diagnostics = false
|
||||||
"External Tools" = false
|
"External Tools" = false
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ ViewportPos=43,95
|
|||||||
ViewportId=0x78C57832
|
ViewportId=0x78C57832
|
||||||
Size=897,649
|
Size=897,649
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x00000001,0
|
DockId=0x00000005,0
|
||||||
|
|
||||||
[Window][Files]
|
[Window][Files]
|
||||||
ViewportPos=3125,170
|
ViewportPos=3125,170
|
||||||
@@ -33,7 +33,7 @@ DockId=0x0000000A,0
|
|||||||
Pos=0,17
|
Pos=0,17
|
||||||
Size=1680,730
|
Size=1680,730
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x00000001,0
|
DockId=0x00000005,0
|
||||||
|
|
||||||
[Window][Provider]
|
[Window][Provider]
|
||||||
ViewportPos=43,95
|
ViewportPos=43,95
|
||||||
@@ -41,7 +41,7 @@ ViewportId=0x78C57832
|
|||||||
Pos=0,651
|
Pos=0,651
|
||||||
Size=897,468
|
Size=897,468
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x00000001,0
|
DockId=0x00000005,0
|
||||||
|
|
||||||
[Window][Message]
|
[Window][Message]
|
||||||
Pos=711,694
|
Pos=711,694
|
||||||
@@ -57,7 +57,7 @@ Collapsed=0
|
|||||||
Pos=1028,1668
|
Pos=1028,1668
|
||||||
Size=1397,340
|
Size=1397,340
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x00000006,0
|
DockId=0x0000000E,0
|
||||||
|
|
||||||
[Window][Comms History]
|
[Window][Comms History]
|
||||||
ViewportPos=43,95
|
ViewportPos=43,95
|
||||||
@@ -74,10 +74,10 @@ Collapsed=0
|
|||||||
DockId=0xAFC85805,2
|
DockId=0xAFC85805,2
|
||||||
|
|
||||||
[Window][Theme]
|
[Window][Theme]
|
||||||
Pos=0,976
|
Pos=0,975
|
||||||
Size=635,951
|
Size=1010,730
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x00000002,2
|
DockId=0x00000007,0
|
||||||
|
|
||||||
[Window][Text Viewer - Entry #7]
|
[Window][Text Viewer - Entry #7]
|
||||||
Pos=379,324
|
Pos=379,324
|
||||||
@@ -85,16 +85,15 @@ Size=900,700
|
|||||||
Collapsed=0
|
Collapsed=0
|
||||||
|
|
||||||
[Window][Diagnostics]
|
[Window][Diagnostics]
|
||||||
Pos=2177,26
|
Pos=1945,734
|
||||||
Size=1162,1777
|
Size=1211,713
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x00000010,0
|
|
||||||
|
|
||||||
[Window][Context Hub]
|
[Window][Context Hub]
|
||||||
Pos=0,976
|
Pos=0,975
|
||||||
Size=635,951
|
Size=1010,730
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x00000002,1
|
DockId=0x00000007,0
|
||||||
|
|
||||||
[Window][AI Settings Hub]
|
[Window][AI Settings Hub]
|
||||||
Pos=406,17
|
Pos=406,17
|
||||||
@@ -103,28 +102,28 @@ Collapsed=0
|
|||||||
DockId=0x0000000D,0
|
DockId=0x0000000D,0
|
||||||
|
|
||||||
[Window][Discussion Hub]
|
[Window][Discussion Hub]
|
||||||
Pos=1936,24
|
Pos=1126,24
|
||||||
Size=1468,1903
|
Size=1638,1608
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x00000013,0
|
DockId=0x00000006,0
|
||||||
|
|
||||||
[Window][Operations Hub]
|
[Window][Operations Hub]
|
||||||
Pos=637,24
|
Pos=0,24
|
||||||
Size=1297,1903
|
Size=1124,1608
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x00000005,0
|
DockId=0x00000005,2
|
||||||
|
|
||||||
[Window][Files & Media]
|
[Window][Files & Media]
|
||||||
Pos=0,976
|
Pos=1126,24
|
||||||
Size=635,951
|
Size=1638,1608
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x00000002,0
|
DockId=0x00000006,1
|
||||||
|
|
||||||
[Window][AI Settings]
|
[Window][AI Settings]
|
||||||
Pos=0,24
|
Pos=0,24
|
||||||
Size=635,950
|
Size=1124,1608
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x00000001,0
|
DockId=0x00000005,0
|
||||||
|
|
||||||
[Window][Approve Tool Execution]
|
[Window][Approve Tool Execution]
|
||||||
Pos=3,524
|
Pos=3,524
|
||||||
@@ -135,13 +134,13 @@ Collapsed=0
|
|||||||
Pos=3360,26
|
Pos=3360,26
|
||||||
Size=480,2134
|
Size=480,2134
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x00000010,0
|
DockId=0x00000004,0
|
||||||
|
|
||||||
[Window][Log Management]
|
[Window][Log Management]
|
||||||
Pos=3360,26
|
Pos=3360,26
|
||||||
Size=480,2134
|
Size=480,2134
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x00000010,0
|
DockId=0x00000004,0
|
||||||
|
|
||||||
[Window][Track Proposal]
|
[Window][Track Proposal]
|
||||||
Pos=709,326
|
Pos=709,326
|
||||||
@@ -400,6 +399,18 @@ Pos=1518,488
|
|||||||
Size=900,700
|
Size=900,700
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
|
|
||||||
|
[Window][Session Hub]
|
||||||
|
Pos=1163,24
|
||||||
|
Size=1234,1542
|
||||||
|
Collapsed=0
|
||||||
|
DockId=0x00000006,1
|
||||||
|
|
||||||
|
[Window][Project Settings]
|
||||||
|
Pos=0,24
|
||||||
|
Size=1124,1608
|
||||||
|
Collapsed=0
|
||||||
|
DockId=0x00000005,1
|
||||||
|
|
||||||
[Table][0xFB6E3870,4]
|
[Table][0xFB6E3870,4]
|
||||||
RefScale=13
|
RefScale=13
|
||||||
Column 0 Width=80
|
Column 0 Width=80
|
||||||
@@ -431,11 +442,11 @@ Column 3 Width=20
|
|||||||
Column 4 Weight=1.0000
|
Column 4 Weight=1.0000
|
||||||
|
|
||||||
[Table][0x2A6000B6,4]
|
[Table][0x2A6000B6,4]
|
||||||
RefScale=18
|
RefScale=16
|
||||||
Column 0 Width=54
|
Column 0 Width=48
|
||||||
Column 1 Width=76
|
Column 1 Width=67
|
||||||
Column 2 Weight=1.0000
|
Column 2 Weight=1.0000
|
||||||
Column 3 Width=274
|
Column 3 Width=243
|
||||||
|
|
||||||
[Table][0x8BCC69C7,6]
|
[Table][0x8BCC69C7,6]
|
||||||
RefScale=13
|
RefScale=13
|
||||||
@@ -454,11 +465,11 @@ Column 2 Weight=1.0000
|
|||||||
Column 3 Width=135
|
Column 3 Width=135
|
||||||
|
|
||||||
[Table][0x2C515046,4]
|
[Table][0x2C515046,4]
|
||||||
RefScale=18
|
RefScale=16
|
||||||
Column 0 Width=54
|
Column 0 Width=48
|
||||||
Column 1 Weight=1.0000
|
Column 1 Weight=1.0000
|
||||||
Column 2 Width=132
|
Column 2 Width=166
|
||||||
Column 3 Width=54
|
Column 3 Width=48
|
||||||
|
|
||||||
[Table][0xD99F45C5,4]
|
[Table][0xD99F45C5,4]
|
||||||
Column 0 Sort=0v
|
Column 0 Sort=0v
|
||||||
@@ -479,9 +490,9 @@ Column 1 Width=100
|
|||||||
Column 2 Weight=1.0000
|
Column 2 Weight=1.0000
|
||||||
|
|
||||||
[Table][0xA02D8C87,3]
|
[Table][0xA02D8C87,3]
|
||||||
RefScale=18
|
RefScale=16
|
||||||
Column 0 Width=202
|
Column 0 Width=179
|
||||||
Column 1 Width=135
|
Column 1 Width=120
|
||||||
Column 2 Weight=1.0000
|
Column 2 Weight=1.0000
|
||||||
|
|
||||||
[Table][0xD0277E63,2]
|
[Table][0xD0277E63,2]
|
||||||
@@ -510,26 +521,20 @@ Column 0 Width=187
|
|||||||
Column 1 Weight=1.0000
|
Column 1 Weight=1.0000
|
||||||
|
|
||||||
[Docking][Data]
|
[Docking][Data]
|
||||||
DockNode ID=0x00000008 Pos=3125,170 Size=593,1157 Split=Y
|
DockNode ID=0x00000008 Pos=3125,170 Size=593,1157 Split=Y
|
||||||
DockNode ID=0x00000009 Parent=0x00000008 SizeRef=1029,147 Selected=0x0469CA7A
|
DockNode ID=0x00000009 Parent=0x00000008 SizeRef=1029,147 Selected=0x0469CA7A
|
||||||
DockNode ID=0x0000000A Parent=0x00000008 SizeRef=1029,145 Selected=0xDF822E02
|
DockNode ID=0x0000000A Parent=0x00000008 SizeRef=1029,145 Selected=0xDF822E02
|
||||||
DockSpace ID=0xAFC85805 Window=0x079D3A04 Pos=0,24 Size=3404,1903 Split=X
|
DockSpace ID=0xAFC85805 Window=0x079D3A04 Pos=0,24 Size=2764,1608 Split=X
|
||||||
DockNode ID=0x00000003 Parent=0xAFC85805 SizeRef=2175,1183 Split=X
|
DockNode ID=0x00000003 Parent=0xAFC85805 SizeRef=2175,1183 Split=X
|
||||||
DockNode ID=0x0000000B Parent=0x00000003 SizeRef=404,1186 Split=X Selected=0xF4139CA2
|
DockNode ID=0x0000000B Parent=0x00000003 SizeRef=404,1186 Split=X Selected=0xF4139CA2
|
||||||
DockNode ID=0x00000007 Parent=0x0000000B SizeRef=1071,858 Split=Y Selected=0x8CA2375C
|
DockNode ID=0x00000007 Parent=0x0000000B SizeRef=1512,858 Split=X Selected=0x8CA2375C
|
||||||
DockNode ID=0x00000001 Parent=0x00000007 SizeRef=824,950 CentralNode=1 Selected=0x7BD57D6A
|
DockNode ID=0x00000005 Parent=0x00000007 SizeRef=1226,1681 CentralNode=1 Selected=0x7BD57D6A
|
||||||
DockNode ID=0x00000002 Parent=0x00000007 SizeRef=824,951 Selected=0x8CA2375C
|
DockNode ID=0x00000006 Parent=0x00000007 SizeRef=1638,1681 Selected=0x6F2B5B04
|
||||||
DockNode ID=0x0000000E Parent=0x0000000B SizeRef=2767,858 Split=X Selected=0x418C7449
|
DockNode ID=0x0000000E Parent=0x0000000B SizeRef=1777,858 Selected=0x418C7449
|
||||||
DockNode ID=0x00000012 Parent=0x0000000E SizeRef=1297,402 Split=Y Selected=0x418C7449
|
DockNode ID=0x0000000D Parent=0x00000003 SizeRef=435,1186 Selected=0x363E93D6
|
||||||
DockNode ID=0x00000005 Parent=0x00000012 SizeRef=876,1749 Selected=0x418C7449
|
DockNode ID=0x00000004 Parent=0xAFC85805 SizeRef=1162,1183 Split=X Selected=0x3AEC3498
|
||||||
DockNode ID=0x00000006 Parent=0x00000012 SizeRef=876,362 Selected=0x1D56B311
|
DockNode ID=0x0000000C Parent=0x00000004 SizeRef=916,380 Selected=0x655BC6E9
|
||||||
DockNode ID=0x00000013 Parent=0x0000000E SizeRef=1468,402 Selected=0x6F2B5B04
|
DockNode ID=0x0000000F Parent=0x00000004 SizeRef=281,380 Selected=0xDEB547B6
|
||||||
DockNode ID=0x0000000D Parent=0x00000003 SizeRef=435,1186 Selected=0x363E93D6
|
|
||||||
DockNode ID=0x00000004 Parent=0xAFC85805 SizeRef=1162,1183 Split=Y Selected=0x3AEC3498
|
|
||||||
DockNode ID=0x00000010 Parent=0x00000004 SizeRef=1199,1689 Selected=0xB4CBF21A
|
|
||||||
DockNode ID=0x00000011 Parent=0x00000004 SizeRef=1199,420 Split=X Selected=0xDEB547B6
|
|
||||||
DockNode ID=0x0000000C Parent=0x00000011 SizeRef=916,380 Selected=0x655BC6E9
|
|
||||||
DockNode ID=0x0000000F Parent=0x00000011 SizeRef=281,380 Selected=0xDEB547B6
|
|
||||||
|
|
||||||
;;;<<<Layout_655921752_Default>>>;;;
|
;;;<<<Layout_655921752_Default>>>;;;
|
||||||
;;;<<<HelloImGui_Misc>>>;;;
|
;;;<<<HelloImGui_Misc>>>;;;
|
||||||
|
|||||||
@@ -9,5 +9,5 @@ active = "main"
|
|||||||
|
|
||||||
[discussions.main]
|
[discussions.main]
|
||||||
git_commit = ""
|
git_commit = ""
|
||||||
last_updated = "2026-03-21T15:21:34"
|
last_updated = "2026-03-22T12:59:02"
|
||||||
history = []
|
history = []
|
||||||
|
|||||||
@@ -230,7 +230,6 @@ class AppController:
|
|||||||
self.ui_project_system_prompt: str = ""
|
self.ui_project_system_prompt: str = ""
|
||||||
self.ui_gemini_cli_path: str = "gemini"
|
self.ui_gemini_cli_path: str = "gemini"
|
||||||
self.ui_word_wrap: bool = True
|
self.ui_word_wrap: bool = True
|
||||||
self.ui_summary_only: bool = False
|
|
||||||
self.ui_auto_add_history: bool = False
|
self.ui_auto_add_history: bool = False
|
||||||
self.ui_active_tool_preset: str | None = None
|
self.ui_active_tool_preset: str | None = None
|
||||||
self.ui_global_system_prompt: str = ""
|
self.ui_global_system_prompt: str = ""
|
||||||
@@ -912,7 +911,6 @@ class AppController:
|
|||||||
self.ui_gemini_cli_path = self.project.get("gemini_cli", {}).get("binary_path", "gemini")
|
self.ui_gemini_cli_path = self.project.get("gemini_cli", {}).get("binary_path", "gemini")
|
||||||
self._update_gcli_adapter(self.ui_gemini_cli_path)
|
self._update_gcli_adapter(self.ui_gemini_cli_path)
|
||||||
self.ui_word_wrap = proj_meta.get("word_wrap", True)
|
self.ui_word_wrap = proj_meta.get("word_wrap", True)
|
||||||
self.ui_summary_only = proj_meta.get("summary_only", False)
|
|
||||||
self.ui_auto_add_history = disc_sec.get("auto_add", False)
|
self.ui_auto_add_history = disc_sec.get("auto_add", False)
|
||||||
self.ui_global_system_prompt = self.config.get("ai", {}).get("system_prompt", "")
|
self.ui_global_system_prompt = self.config.get("ai", {}).get("system_prompt", "")
|
||||||
|
|
||||||
@@ -952,7 +950,7 @@ class AppController:
|
|||||||
bg_shader.get_bg().enabled = gui_cfg.get("bg_shader_enabled", False)
|
bg_shader.get_bg().enabled = gui_cfg.get("bg_shader_enabled", False)
|
||||||
|
|
||||||
_default_windows = {
|
_default_windows = {
|
||||||
"Context Hub": True,
|
"Project Settings": True,
|
||||||
"Files & Media": True,
|
"Files & Media": True,
|
||||||
"AI Settings": True,
|
"AI Settings": True,
|
||||||
"MMA Dashboard": True,
|
"MMA Dashboard": True,
|
||||||
@@ -2006,7 +2004,6 @@ class AppController:
|
|||||||
self.ui_auto_scroll_comms = proj.get("project", {}).get("auto_scroll_comms", True)
|
self.ui_auto_scroll_comms = proj.get("project", {}).get("auto_scroll_comms", True)
|
||||||
self.ui_auto_scroll_tool_calls = proj.get("project", {}).get("auto_scroll_tool_calls", True)
|
self.ui_auto_scroll_tool_calls = proj.get("project", {}).get("auto_scroll_tool_calls", True)
|
||||||
self.ui_word_wrap = proj.get("project", {}).get("word_wrap", True)
|
self.ui_word_wrap = proj.get("project", {}).get("word_wrap", True)
|
||||||
self.ui_summary_only = proj.get("project", {}).get("summary_only", False)
|
|
||||||
agent_tools_cfg = proj.get("agent", {}).get("tools", {})
|
agent_tools_cfg = proj.get("agent", {}).get("tools", {})
|
||||||
self.ui_agent_tools = {t: agent_tools_cfg.get(t, True) for t in models.AGENT_TOOL_NAMES}
|
self.ui_agent_tools = {t: agent_tools_cfg.get(t, True) for t in models.AGENT_TOOL_NAMES}
|
||||||
# MMA Tracks
|
# MMA Tracks
|
||||||
@@ -2458,7 +2455,6 @@ class AppController:
|
|||||||
proj["project"]["main_context"] = self.ui_project_main_context
|
proj["project"]["main_context"] = self.ui_project_main_context
|
||||||
proj["project"]["active_preset"] = self.ui_project_preset_name
|
proj["project"]["active_preset"] = self.ui_project_preset_name
|
||||||
proj["project"]["word_wrap"] = self.ui_word_wrap
|
proj["project"]["word_wrap"] = self.ui_word_wrap
|
||||||
proj["project"]["summary_only"] = self.ui_summary_only
|
|
||||||
proj["project"]["auto_scroll_comms"] = self.ui_auto_scroll_comms
|
proj["project"]["auto_scroll_comms"] = self.ui_auto_scroll_comms
|
||||||
proj["project"]["auto_scroll_tool_calls"] = self.ui_auto_scroll_tool_calls
|
proj["project"]["auto_scroll_tool_calls"] = self.ui_auto_scroll_tool_calls
|
||||||
proj.setdefault("gemini_cli", {})["binary_path"] = self.ui_gemini_cli_path
|
proj.setdefault("gemini_cli", {})["binary_path"] = self.ui_gemini_cli_path
|
||||||
|
|||||||
194
src/gui_2.py
194
src/gui_2.py
@@ -215,7 +215,6 @@ class App:
|
|||||||
self.show_windows.setdefault("Tier 4: QA", False)
|
self.show_windows.setdefault("Tier 4: QA", False)
|
||||||
self.show_windows.setdefault('External Tools', False)
|
self.show_windows.setdefault('External Tools', False)
|
||||||
self.show_windows.setdefault('Shader Editor', False)
|
self.show_windows.setdefault('Shader Editor', False)
|
||||||
self.show_windows.setdefault('Session Hub', False)
|
|
||||||
self.ui_multi_viewport = gui_cfg.get("multi_viewport", False)
|
self.ui_multi_viewport = gui_cfg.get("multi_viewport", False)
|
||||||
self.layout_presets = self.config.get("layout_presets", {})
|
self.layout_presets = self.config.get("layout_presets", {})
|
||||||
self._new_preset_name = ""
|
self._new_preset_name = ""
|
||||||
@@ -639,9 +638,9 @@ class App:
|
|||||||
self._tool_log_cache = log_raw
|
self._tool_log_cache = log_raw
|
||||||
self._tool_log_dirty = False
|
self._tool_log_dirty = False
|
||||||
|
|
||||||
if self.show_windows.get("Context Hub", False):
|
if self.show_windows.get("Project Settings", False):
|
||||||
exp, opened = imgui.begin("Context Hub", self.show_windows["Context Hub"])
|
exp, opened = imgui.begin("Project Settings", self.show_windows["Project Settings"])
|
||||||
self.show_windows["Context Hub"] = bool(opened)
|
self.show_windows["Project Settings"] = bool(opened)
|
||||||
if exp:
|
if exp:
|
||||||
if imgui.begin_tab_bar('context_hub_tabs'):
|
if imgui.begin_tab_bar('context_hub_tabs'):
|
||||||
if imgui.begin_tab_item('Projects')[0]:
|
if imgui.begin_tab_item('Projects')[0]:
|
||||||
@@ -650,9 +649,6 @@ class App:
|
|||||||
if imgui.begin_tab_item('Paths')[0]:
|
if imgui.begin_tab_item('Paths')[0]:
|
||||||
self._render_paths_panel()
|
self._render_paths_panel()
|
||||||
imgui.end_tab_item()
|
imgui.end_tab_item()
|
||||||
if imgui.begin_tab_item('Context Presets')[0]:
|
|
||||||
self._render_context_presets_panel()
|
|
||||||
imgui.end_tab_item()
|
|
||||||
imgui.end_tab_bar()
|
imgui.end_tab_bar()
|
||||||
imgui.end()
|
imgui.end()
|
||||||
if self.show_windows.get("Files & Media", False):
|
if self.show_windows.get("Files & Media", False):
|
||||||
@@ -727,50 +723,20 @@ class App:
|
|||||||
exp, opened = imgui.begin("Discussion Hub", self.show_windows["Discussion Hub"])
|
exp, opened = imgui.begin("Discussion Hub", self.show_windows["Discussion Hub"])
|
||||||
self.show_windows["Discussion Hub"] = bool(opened)
|
self.show_windows["Discussion Hub"] = bool(opened)
|
||||||
if exp:
|
if exp:
|
||||||
# Top part for the history
|
if imgui.begin_tab_bar("discussion_hub_tabs"):
|
||||||
imgui.begin_child("HistoryChild", size=(0, -self.ui_discussion_split_h))
|
if imgui.begin_tab_item("Discussion")[0]:
|
||||||
if self.perf_profiling_enabled: self.perf_monitor.start_component("_render_discussion_panel")
|
self._render_discussion_tab()
|
||||||
self._render_discussion_panel()
|
imgui.end_tab_item()
|
||||||
if self.perf_profiling_enabled: self.perf_monitor.end_component("_render_discussion_panel")
|
if imgui.begin_tab_item("Context Composition")[0]:
|
||||||
imgui.end_child()
|
self._render_context_composition_placeholder()
|
||||||
# Splitter
|
imgui.end_tab_item()
|
||||||
imgui.button("###discussion_splitter", imgui.ImVec2(-1, 4))
|
if imgui.begin_tab_item("Snapshot")[0]:
|
||||||
if imgui.is_item_active():
|
self._render_snapshot_tab()
|
||||||
self.ui_discussion_split_h = max(150.0, min(imgui.get_window_height() - 150.0, self.ui_discussion_split_h - imgui.get_io().mouse_delta.y))
|
imgui.end_tab_item()
|
||||||
# Bottom part with tabs for message and response
|
if imgui.begin_tab_item("Takes")[0]:
|
||||||
# Detach controls
|
self._render_takes_placeholder()
|
||||||
imgui.push_style_var(imgui.StyleVar_.item_spacing, imgui.ImVec2(10, 4))
|
imgui.end_tab_item()
|
||||||
ch1, self.ui_separate_message_panel = imgui.checkbox("Pop Out Message", self.ui_separate_message_panel)
|
imgui.end_tab_bar()
|
||||||
imgui.same_line()
|
|
||||||
ch2, self.ui_separate_response_panel = imgui.checkbox("Pop Out Response", self.ui_separate_response_panel)
|
|
||||||
if ch1: self.show_windows["Message"] = self.ui_separate_message_panel
|
|
||||||
if ch2: self.show_windows["Response"] = self.ui_separate_response_panel
|
|
||||||
imgui.pop_style_var()
|
|
||||||
|
|
||||||
show_message_tab = not self.ui_separate_message_panel
|
|
||||||
show_response_tab = not self.ui_separate_response_panel
|
|
||||||
|
|
||||||
if show_message_tab or show_response_tab:
|
|
||||||
if imgui.begin_tab_bar("discussion_tabs"):
|
|
||||||
# Task: Auto-focus Response tab when response received
|
|
||||||
tab_flags = imgui.TabItemFlags_.none
|
|
||||||
if self._autofocus_response_tab:
|
|
||||||
tab_flags = imgui.TabItemFlags_.set_selected
|
|
||||||
self._autofocus_response_tab = False
|
|
||||||
self.controller._autofocus_response_tab = False
|
|
||||||
|
|
||||||
if show_message_tab:
|
|
||||||
if imgui.begin_tab_item("Message", None)[0]:
|
|
||||||
self._render_message_panel()
|
|
||||||
imgui.end_tab_item()
|
|
||||||
if show_response_tab:
|
|
||||||
if imgui.begin_tab_item("Response", None, tab_flags)[0]:
|
|
||||||
self._render_response_panel()
|
|
||||||
imgui.end_tab_item()
|
|
||||||
imgui.end_tab_bar()
|
|
||||||
else:
|
|
||||||
imgui.text_disabled("Message & Response panels are detached.")
|
|
||||||
|
|
||||||
imgui.end()
|
imgui.end()
|
||||||
if self.show_windows.get("Operations Hub", False):
|
if self.show_windows.get("Operations Hub", False):
|
||||||
exp, opened = imgui.begin("Operations Hub", self.show_windows["Operations Hub"])
|
exp, opened = imgui.begin("Operations Hub", self.show_windows["Operations Hub"])
|
||||||
@@ -845,8 +811,6 @@ class App:
|
|||||||
if self.show_windows.get("Diagnostics", False):
|
if self.show_windows.get("Diagnostics", False):
|
||||||
self._render_diagnostics_panel()
|
self._render_diagnostics_panel()
|
||||||
|
|
||||||
self._render_session_hub()
|
|
||||||
|
|
||||||
self.perf_monitor.end_frame()
|
self.perf_monitor.end_frame()
|
||||||
# ---- Modals / Popups
|
# ---- Modals / Popups
|
||||||
with self._pending_dialog_lock:
|
with self._pending_dialog_lock:
|
||||||
@@ -1702,7 +1666,6 @@ class App:
|
|||||||
models.save_config(self.config)
|
models.save_config(self.config)
|
||||||
self.ai_status = "config saved"
|
self.ai_status = "config saved"
|
||||||
ch, self.ui_word_wrap = imgui.checkbox("Word-Wrap (Read-only panels)", self.ui_word_wrap)
|
ch, self.ui_word_wrap = imgui.checkbox("Word-Wrap (Read-only panels)", self.ui_word_wrap)
|
||||||
ch, self.ui_summary_only = imgui.checkbox("Summary Only (send file structure, not full content)", self.ui_summary_only)
|
|
||||||
ch, self.ui_auto_scroll_comms = imgui.checkbox("Auto-scroll Comms History", self.ui_auto_scroll_comms)
|
ch, self.ui_auto_scroll_comms = imgui.checkbox("Auto-scroll Comms History", self.ui_auto_scroll_comms)
|
||||||
ch, self.ui_auto_scroll_tool_calls = imgui.checkbox("Auto-scroll Tool History", self.ui_auto_scroll_tool_calls)
|
ch, self.ui_auto_scroll_tool_calls = imgui.checkbox("Auto-scroll Tool History", self.ui_auto_scroll_tool_calls)
|
||||||
if self.perf_profiling_enabled: self.perf_monitor.end_component("_render_projects_panel")
|
if self.perf_profiling_enabled: self.perf_monitor.end_component("_render_projects_panel")
|
||||||
@@ -2085,49 +2048,90 @@ class App:
|
|||||||
if self.perf_profiling_enabled: self.perf_monitor.end_component("_render_diagnostics_panel")
|
if self.perf_profiling_enabled: self.perf_monitor.end_component("_render_diagnostics_panel")
|
||||||
imgui.end()
|
imgui.end()
|
||||||
|
|
||||||
def _render_session_hub(self) -> None:
|
def _render_discussion_tab(self) -> None:
|
||||||
if self.show_windows.get('Session Hub', False):
|
imgui.begin_child("HistoryChild", size=(0, -self.ui_discussion_split_h))
|
||||||
exp, opened = imgui.begin('Session Hub', self.show_windows['Session Hub'])
|
if self.perf_profiling_enabled: self.perf_monitor.start_component("_render_discussion_panel")
|
||||||
self.show_windows['Session Hub'] = bool(opened)
|
self._render_discussion_panel()
|
||||||
if exp:
|
if self.perf_profiling_enabled: self.perf_monitor.end_component("_render_discussion_panel")
|
||||||
if imgui.begin_tab_bar('session_hub_tabs'):
|
imgui.end_child()
|
||||||
if imgui.begin_tab_item('Aggregate MD')[0]:
|
imgui.button("###discussion_splitter", imgui.ImVec2(-1, 4))
|
||||||
display_md = self.last_aggregate_markdown
|
if imgui.is_item_active():
|
||||||
if self.ui_focus_agent:
|
self.ui_discussion_split_h = max(150.0, min(imgui.get_window_height() - 150.0, self.ui_discussion_split_h - imgui.get_io().mouse_delta.y))
|
||||||
tier_usage = self.mma_tier_usage.get(self.ui_focus_agent)
|
imgui.push_style_var(imgui.StyleVar_.item_spacing, imgui.ImVec2(10, 4))
|
||||||
if tier_usage:
|
ch1, self.ui_separate_message_panel = imgui.checkbox("Pop Out Message", self.ui_separate_message_panel)
|
||||||
persona_name = tier_usage.get("persona")
|
imgui.same_line()
|
||||||
if persona_name:
|
ch2, self.ui_separate_response_panel = imgui.checkbox("Pop Out Response", self.ui_separate_response_panel)
|
||||||
persona = self.controller.personas.get(persona_name)
|
if ch1: self.show_windows["Message"] = self.ui_separate_message_panel
|
||||||
if persona and persona.context_preset:
|
if ch2: self.show_windows["Response"] = self.ui_separate_response_panel
|
||||||
cp_name = persona.context_preset
|
imgui.pop_style_var()
|
||||||
if cp_name in self._focus_md_cache:
|
show_message_tab = not self.ui_separate_message_panel
|
||||||
display_md = self._focus_md_cache[cp_name]
|
show_response_tab = not self.ui_separate_response_panel
|
||||||
else:
|
if show_message_tab or show_response_tab:
|
||||||
# Generate focused aggregate
|
if imgui.begin_tab_bar("discussion_tabs"):
|
||||||
flat = src.project_manager.flat_config(self.controller.project, self.active_discussion)
|
tab_flags = imgui.TabItemFlags_.none
|
||||||
cp = self.controller.project.get('context_presets', {}).get(cp_name)
|
if self._autofocus_response_tab:
|
||||||
if cp:
|
tab_flags = imgui.TabItemFlags_.set_selected
|
||||||
flat["files"]["paths"] = cp.get("files", [])
|
self._autofocus_response_tab = False
|
||||||
flat["screenshots"]["paths"] = cp.get("screenshots", [])
|
self.controller._autofocus_response_tab = False
|
||||||
full_md, _, _ = src.aggregate.run(flat)
|
if show_message_tab:
|
||||||
self._focus_md_cache[cp_name] = full_md
|
if imgui.begin_tab_item("Message", None)[0]:
|
||||||
display_md = full_md
|
self._render_message_panel()
|
||||||
if imgui.button("Copy"):
|
|
||||||
imgui.set_clipboard_text(display_md)
|
|
||||||
imgui.begin_child("last_agg_md", imgui.ImVec2(0, 0), True)
|
|
||||||
markdown_helper.render(display_md, context_id="session_hub_agg")
|
|
||||||
imgui.end_child()
|
|
||||||
imgui.end_tab_item()
|
imgui.end_tab_item()
|
||||||
if imgui.begin_tab_item('System Prompt')[0]:
|
if show_response_tab:
|
||||||
if imgui.button("Copy"):
|
if imgui.begin_tab_item("Response", None, tab_flags)[0]:
|
||||||
imgui.set_clipboard_text(self.last_resolved_system_prompt)
|
self._render_response_panel()
|
||||||
imgui.begin_child("last_sys_prompt", imgui.ImVec2(0, 0), True)
|
|
||||||
markdown_helper.render(self.last_resolved_system_prompt, context_id="session_hub_sys")
|
|
||||||
imgui.end_child()
|
|
||||||
imgui.end_tab_item()
|
imgui.end_tab_item()
|
||||||
imgui.end_tab_bar()
|
imgui.end_tab_bar()
|
||||||
imgui.end()
|
else:
|
||||||
|
imgui.text_disabled("Message & Response panels are detached.")
|
||||||
|
|
||||||
|
def _render_context_composition_placeholder(self) -> None:
|
||||||
|
imgui.text("Context Composition")
|
||||||
|
imgui.separator()
|
||||||
|
imgui.text_colored(C_LBL, "Coming in Phase 3...")
|
||||||
|
|
||||||
|
def _render_snapshot_tab(self) -> None:
|
||||||
|
if imgui.begin_tab_bar("snapshot_tabs"):
|
||||||
|
if imgui.begin_tab_item("Aggregate MD")[0]:
|
||||||
|
display_md = self.last_aggregate_markdown
|
||||||
|
if self.ui_focus_agent:
|
||||||
|
tier_usage = self.mma_tier_usage.get(self.ui_focus_agent)
|
||||||
|
if tier_usage:
|
||||||
|
persona_name = tier_usage.get("persona")
|
||||||
|
if persona_name:
|
||||||
|
persona = self.controller.personas.get(persona_name)
|
||||||
|
if persona and persona.context_preset:
|
||||||
|
cp_name = persona.context_preset
|
||||||
|
if cp_name in self._focus_md_cache:
|
||||||
|
display_md = self._focus_md_cache[cp_name]
|
||||||
|
else:
|
||||||
|
flat = src.project_manager.flat_config(self.controller.project, self.active_discussion)
|
||||||
|
cp = self.controller.project.get('context_presets', {}).get(cp_name)
|
||||||
|
if cp:
|
||||||
|
flat["files"]["paths"] = cp.get("files", [])
|
||||||
|
flat["screenshots"]["paths"] = cp.get("screenshots", [])
|
||||||
|
full_md, _, _ = src.aggregate.run(flat)
|
||||||
|
self._focus_md_cache[cp_name] = full_md
|
||||||
|
display_md = full_md
|
||||||
|
if imgui.button("Copy"):
|
||||||
|
imgui.set_clipboard_text(display_md)
|
||||||
|
imgui.begin_child("last_agg_md", imgui.ImVec2(0, 0), True)
|
||||||
|
markdown_helper.render(display_md, context_id="snapshot_agg")
|
||||||
|
imgui.end_child()
|
||||||
|
imgui.end_tab_item()
|
||||||
|
if imgui.begin_tab_item("System Prompt")[0]:
|
||||||
|
if imgui.button("Copy"):
|
||||||
|
imgui.set_clipboard_text(self.last_resolved_system_prompt)
|
||||||
|
imgui.begin_child("last_sys_prompt", imgui.ImVec2(0, 0), True)
|
||||||
|
markdown_helper.render(self.last_resolved_system_prompt, context_id="snapshot_sys")
|
||||||
|
imgui.end_child()
|
||||||
|
imgui.end_tab_item()
|
||||||
|
imgui.end_tab_bar()
|
||||||
|
|
||||||
|
def _render_takes_placeholder(self) -> None:
|
||||||
|
imgui.text("Takes & Synthesis")
|
||||||
|
imgui.separator()
|
||||||
|
imgui.text_colored(C_LBL, "Coming in Phase 4...")
|
||||||
|
|
||||||
def _render_markdown_test(self) -> None:
|
def _render_markdown_test(self) -> None:
|
||||||
imgui.text("Markdown Test Panel")
|
imgui.text("Markdown Test Panel")
|
||||||
|
|||||||
14
tests/test_context_presets_removal.py
Normal file
14
tests/test_context_presets_removal.py
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import pytest
|
||||||
|
import inspect
|
||||||
|
|
||||||
|
|
||||||
|
def test_context_presets_tab_removed_from_project_settings():
|
||||||
|
import src.gui_2 as gui_2
|
||||||
|
|
||||||
|
source = inspect.getsource(gui_2.App._gui_func)
|
||||||
|
assert "Context Presets" not in source, (
|
||||||
|
"Context Presets tab should be removed from Project Settings"
|
||||||
|
)
|
||||||
|
assert "_render_context_presets_panel" not in source, (
|
||||||
|
"Context presets panel call should be removed"
|
||||||
|
)
|
||||||
@@ -6,7 +6,7 @@ def test_gui2_hubs_exist_in_show_windows(app_instance: App) -> None:
|
|||||||
This ensures they will be available in the 'Windows' menu.
|
This ensures they will be available in the 'Windows' menu.
|
||||||
"""
|
"""
|
||||||
expected_hubs = [
|
expected_hubs = [
|
||||||
"Context Hub",
|
"Project Settings",
|
||||||
"AI Settings",
|
"AI Settings",
|
||||||
"Discussion Hub",
|
"Discussion Hub",
|
||||||
"Operations Hub",
|
"Operations Hub",
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ def test_new_hubs_defined_in_show_windows(mock_app: App) -> None:
|
|||||||
This ensures they will be available in the 'Windows' menu.
|
This ensures they will be available in the 'Windows' menu.
|
||||||
"""
|
"""
|
||||||
expected_hubs = [
|
expected_hubs = [
|
||||||
"Context Hub",
|
"Project Settings",
|
||||||
"AI Settings",
|
"AI Settings",
|
||||||
"Discussion Hub",
|
"Discussion Hub",
|
||||||
"Operations Hub",
|
"Operations Hub",
|
||||||
@@ -53,7 +53,7 @@ def test_hub_windows_exist_in_gui2(app_instance_simple: Any) -> None:
|
|||||||
"""
|
"""
|
||||||
Verifies that the new Hub windows are present in the show_windows dictionary.
|
Verifies that the new Hub windows are present in the show_windows dictionary.
|
||||||
"""
|
"""
|
||||||
hubs = ["Context Hub", "AI Settings", "Discussion Hub", "Operations Hub"]
|
hubs = ["Project Settings", "AI Settings", "Discussion Hub", "Operations Hub"]
|
||||||
for hub in hubs:
|
for hub in hubs:
|
||||||
assert hub in app_instance_simple.show_windows
|
assert hub in app_instance_simple.show_windows
|
||||||
|
|
||||||
|
|||||||
22
tests/test_project_settings_rename.py
Normal file
22
tests/test_project_settings_rename.py
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
import pytest
|
||||||
|
import inspect
|
||||||
|
|
||||||
|
|
||||||
|
def test_context_hub_renamed_to_project_settings():
|
||||||
|
import src.gui_2 as gui_2
|
||||||
|
|
||||||
|
source = inspect.getsource(gui_2.App._gui_func)
|
||||||
|
assert "Project Settings" in source, (
|
||||||
|
"Context Hub should be renamed to Project Settings"
|
||||||
|
)
|
||||||
|
assert '"Context Hub"' not in source, '"Context Hub" string should be removed'
|
||||||
|
|
||||||
|
|
||||||
|
def test_show_windows_key_updated():
|
||||||
|
import src.app_controller as app_controller
|
||||||
|
|
||||||
|
source = inspect.getsource(app_controller.AppController)
|
||||||
|
assert '"Project Settings"' in source or "'Project Settings'" in source, (
|
||||||
|
"show_windows key should be Project Settings"
|
||||||
|
)
|
||||||
|
assert '"Context Hub"' not in source, '"Context Hub" key should be removed'
|
||||||
42
tests/test_session_hub_merge.py
Normal file
42
tests/test_session_hub_merge.py
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
import pytest
|
||||||
|
import inspect
|
||||||
|
|
||||||
|
|
||||||
|
def test_session_hub_window_removed():
|
||||||
|
import src.gui_2 as gui_2
|
||||||
|
|
||||||
|
source = inspect.getsource(gui_2.App._gui_func)
|
||||||
|
assert "Session Hub" not in source, "Session Hub window should be removed"
|
||||||
|
|
||||||
|
|
||||||
|
def test_discussion_hub_has_snapshot_tab():
|
||||||
|
import src.gui_2 as gui_2
|
||||||
|
|
||||||
|
source = inspect.getsource(gui_2.App._gui_func)
|
||||||
|
assert "Snapshot" in source, "Discussion Hub should have Snapshot tab"
|
||||||
|
assert "_render_snapshot_tab" in source, "Discussion Hub should call _render_snapshot_tab"
|
||||||
|
|
||||||
|
|
||||||
|
def test_discussion_hub_has_context_composition_placeholder():
|
||||||
|
import src.gui_2 as gui_2
|
||||||
|
|
||||||
|
source = inspect.getsource(gui_2.App._gui_func)
|
||||||
|
assert "Context Composition" in source, (
|
||||||
|
"Discussion Hub should have Context Composition tab placeholder"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def test_discussion_hub_has_takes_tab():
|
||||||
|
import src.gui_2 as gui_2
|
||||||
|
|
||||||
|
source = inspect.getsource(gui_2.App._gui_func)
|
||||||
|
assert "Takes" in source, "Discussion Hub should have Takes tab"
|
||||||
|
|
||||||
|
|
||||||
|
def test_show_windows_no_session_hub():
|
||||||
|
import src.app_controller as app_controller
|
||||||
|
|
||||||
|
source = inspect.getsource(app_controller.AppController)
|
||||||
|
assert "Session Hub" not in source, (
|
||||||
|
"Session Hub should be removed from show_windows"
|
||||||
|
)
|
||||||
75
tests/test_ui_summary_only_removal.py
Normal file
75
tests/test_ui_summary_only_removal.py
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
import pytest
|
||||||
|
import inspect
|
||||||
|
from src import models
|
||||||
|
|
||||||
|
|
||||||
|
def test_ui_summary_only_not_in_projects_panel():
|
||||||
|
import src.gui_2 as gui_2
|
||||||
|
|
||||||
|
source = inspect.getsource(gui_2.App._render_projects_panel)
|
||||||
|
assert "ui_summary_only" not in source, (
|
||||||
|
"ui_summary_only checkbox should be removed from Projects panel"
|
||||||
|
)
|
||||||
|
assert "Summary Only" not in source, (
|
||||||
|
"Summary Only label should be removed from Projects panel"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def test_ui_summary_only_not_in_app_controller_projects():
|
||||||
|
import src.app_controller as app_controller
|
||||||
|
|
||||||
|
source = inspect.getsource(app_controller.AppController)
|
||||||
|
assert "ui_summary_only" not in source, (
|
||||||
|
"ui_summary_only should be removed from AppController"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def test_file_item_has_per_file_flags():
|
||||||
|
item = models.FileItem(path="test.py")
|
||||||
|
assert hasattr(item, "auto_aggregate")
|
||||||
|
assert hasattr(item, "force_full")
|
||||||
|
assert item.auto_aggregate is True
|
||||||
|
assert item.force_full is False
|
||||||
|
|
||||||
|
|
||||||
|
def test_file_item_serialization_with_flags():
|
||||||
|
item = models.FileItem(path="test.py", auto_aggregate=False, force_full=True)
|
||||||
|
data = item.to_dict()
|
||||||
|
|
||||||
|
assert data["auto_aggregate"] is False
|
||||||
|
assert data["force_full"] is True
|
||||||
|
|
||||||
|
restored = models.FileItem.from_dict(data)
|
||||||
|
assert restored.auto_aggregate is False
|
||||||
|
assert restored.force_full is True
|
||||||
|
|
||||||
|
|
||||||
|
def test_project_without_summary_only_loads():
|
||||||
|
proj = {"project": {"name": "test", "paths": []}}
|
||||||
|
assert proj.get("project", {}).get("summary_only") is None
|
||||||
|
|
||||||
|
|
||||||
|
def test_aggregate_from_items_respects_auto_aggregate():
|
||||||
|
from pathlib import Path
|
||||||
|
from src import aggregate
|
||||||
|
|
||||||
|
items = [
|
||||||
|
{
|
||||||
|
"path": Path("file1.py"),
|
||||||
|
"entry": "file1.py",
|
||||||
|
"content": "print('hello')",
|
||||||
|
"auto_aggregate": True,
|
||||||
|
"force_full": False,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": Path("file2.py"),
|
||||||
|
"entry": "file2.py",
|
||||||
|
"content": "print('world')",
|
||||||
|
"auto_aggregate": False,
|
||||||
|
"force_full": False,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
result = aggregate._build_files_section_from_items(items)
|
||||||
|
assert "file1.py" in result
|
||||||
|
assert "file2.py" not in result
|
||||||
Reference in New Issue
Block a user