From 687a8b076f6c0dfe78b409b650f9719649e26b68 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Sat, 21 Feb 2026 19:51:41 -0500 Subject: [PATCH] wip multi-project --- config.toml | 12 ++---------- dpg_layout.ini | 25 +++++++++++++++---------- manual_slop.toml | 6 ++---- 3 files changed, 19 insertions(+), 24 deletions(-) diff --git a/config.toml b/config.toml index 04e64ba..004c598 100644 --- a/config.toml +++ b/config.toml @@ -28,10 +28,6 @@ paths = [ [discussion] history = [ - "User:\nOk it seems fixed now... (themeing for fonts, nice job). \nNow lets do those adjustments to discussion history:\nIt'd also be nice if we can collapse the discussion entries indvidual and with a collapse/expand all button.\nAlso there is no way right now for me to define new roles for the discussion other than by editing the source.\nShould at least be configurable frm the config.toml...", - "AI:\nGood, I have a clear picture. Here's the plan:\n\n**Changes needed:**\n1. **`config.toml`** — add `[discussion] roles = [...]` so roles are configurable\n2. **`gui.py`** — 4 targeted edits:\n - `DISC_ROLES` becomes a module-level fallback; the real list comes from config at load time and lives on `App`\n - `_parse_history_entries()` takes `roles` as a parameter\n - `_rebuild_disc_list()` — add collapse/expand per entry (using a `bool` `collapsed` flag in each dict), Collapse All / Expand All buttons in the toolbar\n - Add a \"Roles\" sub-section in the Discussion window for adding/removing role names from the config list, and wire it into `_flush_to_config()`\n\nI'll do this as a Python patch script to avoid PowerShell string escaping issues:", - "User:\nSure, go ahead and make to those change patches and apply them.", - "AI:\nAll 16 checks pass. Now update `MainContext.md` and clean up the patch file:\n(Note from user: the AI did so!)", "User:\nLets add multiple project support. currently this project would be the \"manual_slop\" project. \nI need to make a separate \"manual_slop.toml\" for this and offload things that would be within a per project to it.\nI also want to have several discussion histories that I can label. \nThis would allow me to stash and continue separate effort's histories..\nIt would be important if these discussions saved the last git commit they were on. (I'll need a buton to manually update it).\nAnd timestamps on each discussion entry to give an idea of the duration involved and \nhow the project has evolved since the discussion stream's effort was last done.\nBasically preserve context so ai can use that as valuable information in its working memory.\n\nTo load a project I'll need to hoist it into the config by providing the path.\nMaybe allow multiple project tomls to be specified path wise in the array.", "AI:\nAnnotated by user:\nNo response from AI, taking sceenshot of scripts run... and directory's state", "User:\nHey it seems like you were not done want to continue?", @@ -39,13 +35,9 @@ history = [ "User:\ncontinue. You made a file but no changes have been made yet to gui.py. Still in progress to add all the multiple project support wishlist from user message earlier.", "AI:\nNo response yet again maybe the response box is broken (User annotated)", "User:\ncontinue. Sending multiple project wishlist more concise here:\n- Adding multiple project support. \n- Currently this project would be the \"manual_slop\" project. \n- Make a separate \"manual_slop.toml\" for this and offload things that would be within a per project to it.\n- Want to have several discussion histories that I can label. \n- This would allow me to stash and continue separate effort's histories..\n- It would be important if these discussions saved the last git commit they were on. (I'll need a buton to manually update it).\n- And timestamps on each discussion entry to give an idea of the duration involved and indicate if the project has evolved since the discussion stream's effort was last done.\n - Basically preserve context so ai can use that as valuable information in its working memory.\n- To load a project I'll need to hoist it into the config by providing the path.\n- Maybe allow multiple project tomls to be specified path wise in the array.", - "AI:\n(No response from ai again as a final message, most likely bugged...)", - "User:\ncontinue. You made a backup of gui.py before patching among other misc changes. (See screenshots)", - "Vendor API:\nERROR: Error code: 400 - {'type': 'error', 'error': {'type': 'invalid_request_error', 'message': 'messages.36: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01EhYwL9u1XRe2561myVh6pG. Each `tool_use` block must have a corresponding `tool_result` block in the next message.'}, 'request_id': 'req_011CYNASDjd17PQzS6dGWDEN'}", - "User:\ncontinue. we got an error last messaage still working on multiple project support.", "AI:\nGood. I have a complete picture. Here's the plan:\n\n**What we need to do:**\n\n1. **Create `manual_slop.toml`** — the per-project file, migrated from `config.toml`, with the new project structure (`project_manager.default_project` shape)\n2. **Update `config.toml`** — strip out project-specific sections, add `[projects]` array pointing to `manual_slop.toml`, keep `[ai]` and `[theme]` here as \"global\" app config\n3. **Rewrite `gui.py`** with a Python patch script that adds:\n - Project loading/switching panel (load from path, list of loaded projects, active project indicator)\n - Discussion switcher (list discussions by label, new/rename/delete discussion)\n - Git commit display + \"Update Commit\" button per discussion\n - Timestamps on entries (wired to `project_manager.entry_to_str/str_to_entry`)\n - All save/flush operations target the active project `.toml` via `project_manager.save_project()`\n - `App` state restructured: `self.proj` (active project dict), `self.proj_path`, `self.active_disc_name`\n\nI'll use a Python patch script to avoid PowerShell escaping issues. Let me write it:", - "User:\nPlan of action sounds good, go for it!", - "AI:\nGood. Now I'll write the Python patch script. This is a large change so I'll write it to a file and run it:", + "User:\nYep, write that file! No need to backup they've been done multiple times!", + "AI:\nWriting the new `gui.py` via a Python script to avoid PowerShell escaping issues. This is a full rewrite with multi-project support.", ] roles = [ "User", diff --git a/dpg_layout.ini b/dpg_layout.ini index 434d7fe..5e7103b 100644 --- a/dpg_layout.ini +++ b/dpg_layout.ini @@ -663,19 +663,19 @@ DockId=0x00000034,0 [Window][###94] Pos=1360,0 -Size=621,2137 +Size=959,2137 Collapsed=0 DockId=0x00000038,0 [Window][###117] -Pos=1983,0 -Size=1857,1171 +Pos=2321,0 +Size=1519,1158 Collapsed=0 DockId=0x00000035,0 [Window][###125] -Pos=1983,1173 -Size=1857,964 +Pos=2321,1160 +Size=1519,977 Collapsed=0 DockId=0x0000001F,0 @@ -751,6 +751,11 @@ Pos=1578,868 Size=700,440 Collapsed=0 +[Window][###369] +Pos=1578,868 +Size=700,440 +Collapsed=0 + [Docking][Data] DockSpace ID=0x7C6B3D9B Window=0xA87D555D Pos=0,0 Size=3840,2137 Split=X Selected=0x40484D8F DockNode ID=0x00000003 Parent=0x7C6B3D9B SizeRef=498,1161 Split=Y Selected=0xEE087978 @@ -778,12 +783,12 @@ DockSpace ID=0x7C6B3D9B Window=0xA87D555D Pos=0,0 Size DockNode ID=0x00000001 Parent=0x00000004 SizeRef=1060,1161 Split=Y Selected=0x40484D8F DockNode ID=0x00000007 Parent=0x00000001 SizeRef=595,492 Selected=0xBA13FCDE DockNode ID=0x00000008 Parent=0x00000001 SizeRef=595,1643 Split=X Selected=0x40484D8F - DockNode ID=0x0000000F Parent=0x00000008 SizeRef=1481,2137 Split=Y Selected=0x07E8375F + DockNode ID=0x0000000F Parent=0x00000008 SizeRef=1819,2137 Split=Y Selected=0x07E8375F DockNode ID=0x00000011 Parent=0x0000000F SizeRef=835,425 Selected=0x72F373AE DockNode ID=0x00000012 Parent=0x0000000F SizeRef=835,1710 Split=X Selected=0xC6DC3F21 DockNode ID=0x00000037 Parent=0x00000012 SizeRef=858,2137 Selected=0xC6DC3F21 - DockNode ID=0x00000038 Parent=0x00000012 SizeRef=621,2137 Selected=0x0B8F7C1B - DockNode ID=0x00000010 Parent=0x00000008 SizeRef=1857,2137 Split=Y Selected=0xCE7F911A + DockNode ID=0x00000038 Parent=0x00000012 SizeRef=959,2137 Selected=0x0B8F7C1B + DockNode ID=0x00000010 Parent=0x00000008 SizeRef=1519,2137 Split=Y Selected=0xCE7F911A DockNode ID=0x00000013 Parent=0x00000010 SizeRef=1967,1690 Split=X Selected=0xCE7F911A DockNode ID=0x00000017 Parent=0x00000013 SizeRef=1314,1749 Selected=0x4B454E0B DockNode ID=0x00000018 Parent=0x00000013 SizeRef=1309,1749 Split=Y Selected=0x88A8C2FF @@ -793,8 +798,8 @@ DockSpace ID=0x7C6B3D9B Window=0xA87D555D Pos=0,0 Size DockNode ID=0x00000029 Parent=0x00000025 SizeRef=853,1867 Split=X Selected=0xFDB3860E DockNode ID=0x00000031 Parent=0x00000029 SizeRef=1055,2137 Selected=0x4C2F06CB DockNode ID=0x00000032 Parent=0x00000029 SizeRef=1536,2137 Split=Y Selected=0x0D80EC84 - DockNode ID=0x00000035 Parent=0x00000032 SizeRef=2500,1171 Selected=0xF1D4CD4A - DockNode ID=0x00000036 Parent=0x00000032 SizeRef=2500,964 Split=Y Selected=0xF5102835 + DockNode ID=0x00000035 Parent=0x00000032 SizeRef=2500,1158 Selected=0xF1D4CD4A + DockNode ID=0x00000036 Parent=0x00000032 SizeRef=2500,977 Split=Y Selected=0xF5102835 DockNode ID=0x0000001F Parent=0x00000036 SizeRef=1325,1069 CentralNode=1 Selected=0x0D80EC84 DockNode ID=0x00000020 Parent=0x00000036 SizeRef=1325,1066 Selected=0xC56063F4 DockNode ID=0x0000002A Parent=0x00000025 SizeRef=890,1867 Selected=0x40484D8F diff --git a/manual_slop.toml b/manual_slop.toml index d4ab511..fd8c877 100644 --- a/manual_slop.toml +++ b/manual_slop.toml @@ -21,14 +21,12 @@ paths = [ "C:/projects/manual_slop/file_cache.py", "C:/projects/manual_slop/theme.py", "C:/projects/manual_slop/project_manager.py", + "C:/projects/manual_slop/manual_slop.toml", ] [screenshots] base_dir = "C:/Users/Ed/scoop/apps/sharex/current/ShareX/Screenshots/2026-02" -paths = [ - "C:/Users/Ed/scoop/apps/sharex/current/ShareX/Screenshots/2026-02/2026-02-21_19-17-10.png", - "C:/Users/Ed/scoop/apps/sharex/current/ShareX/Screenshots/2026-02/Code_-_Insiders_2026-02-21_19-17-23.png", -] +paths = [] [discussion] roles = [