From 173e09059d5b828a7698bdaa9e1f2e2415add5b7 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Sat, 21 Feb 2026 22:47:39 -0500 Subject: [PATCH] config updates --- MainContext.md | 8 +------- manual_slop.toml | 13 +++++++++---- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/MainContext.md b/MainContext.md index 60131f0..f4f15b9 100644 --- a/MainContext.md +++ b/MainContext.md @@ -1,12 +1,5 @@ # Manual Slop -## Baseline - -Make sure to update this file every time. -DO NOT EVER make a shell script unless told to. DO NOT EVER make a readme or a file describing your changes unless your are told to. If you have commands I should be entering into the command line or if you have something to explain to me, please just use code blocks or normal text output. DO NOT DO ANYTHING OTHER THAN WHAT YOU WERE TOLD TODO. DO NOT EVER, EVER DO ANYTHING OTHER THAN WHAT YOU WERE TOLD TO DO. IF YOU WANT TO DO OTHER THINGS, SIMPLY SUGGEST THEM, AND THEN I WILL REVIEW YOUR CHANGES, AND MAKE THE DECISION ON HOW TO PROCEED. WHEN WRITING SCRIPTS USE A 120-160 character limit per line. I don't want to see scrunched code. - -Make destructive modifications to the project, ITS OK, I HAVE GIT HISTORY TO MANAGE THE PROJECTS. - ## Summary Is a local GUI tool for manually curating and sending context to AI APIs. It aggregates files, screenshots, and discussion history into a structured markdown file and sends it to a chosen AI provider with a user-written message. The AI can also execute PowerShell scripts within the project directory, with user confirmation required before each execution. @@ -202,6 +195,7 @@ Entry layout: index + timestamp + direction + kind + provider/model header row, - `MAX_TOOL_ROUNDS` in `ai_client.py` caps agentic loops at 5 rounds; adjustable - `COMMS_CLAMP_CHARS` in `gui.py` controls the character threshold for clamping heavy payload fields in the Comms History panel - Additional project metadata (description, tags, created date) could be added to `[project]` in the per-project toml + ### Gemini Context Management - Investigating ways to prevent context duplication in _gemini_chat history, as currently {md_content} is prepended to the user message on every single request, causing history bloat. - Discussing explicit Gemini Context Caching API (client.caches.create()) to store read-only file context and avoid re-reading files across sessions. diff --git a/manual_slop.toml b/manual_slop.toml index 3c52583..3a2e27b 100644 --- a/manual_slop.toml +++ b/manual_slop.toml @@ -1,7 +1,8 @@ [project] name = "manual_slop" git_dir = "C:/projects/manual_slop" -system_prompt = "Make sure to update MainContext.md every time.\nMake destructive modifications to the project, ITS OK, I HAVE GIT HISTORY TO MANAGE THE PROJECTS.\n\nMainContext.md should be read if the discussion doesn't resolve whats being worked on." +system_prompt = "Make sure to update MainContext.md every time.\nMake destructive modifications to the project, ITS OK, I HAVE GIT HISTORY TO MANAGE THE PROJECTS." +main_context = "" [output] namespace = "manual_slop" @@ -16,7 +17,6 @@ paths = [ "gemini.py", "gui.py", "pyproject.toml", - "MainContext.md", "C:/projects/manual_slop/shell_runner.py", "C:/projects/manual_slop/session_logger.py", "C:/projects/manual_slop/file_cache.py", @@ -38,7 +38,7 @@ roles = [ "Vendor API", "System", ] -active = "Make sure it works well with gemini" +active = "Misc UX improvements" [discussion.discussions.main] git_commit = "3b2da7873f839bf062c06c7539fadd9df7a3e2b9" @@ -99,7 +99,7 @@ history = [ [discussion.discussions."Make sure it works well with gemini"] git_commit = "32af96b3658b813cf4fd7e270b20d661187394cf" -last_updated = "2026-02-21T22:43:36" +last_updated = "2026-02-21T22:46:10" history = [ "@2026-02-21T22:26:26\nUser:\nQuestion: For how we're doing things right now, you have to re-read files cause its not saved in discussion history rigt per me sending a gen + send?\nIs there a way you can do a routine to save important files to the discussion or upload them temporarily to a gemini cache so that we don't have to worrya bout re-reading read-only things you already gathered info on for an active discussion?\nI'm not sure the depths of how this custom api works or custom tooling, etc gemini api from google provides...\n\n(I'm also reviewing using this with gemini to make sure there are no hiccups from how the api is utilized).", "@2026-02-21T22:26:32\nAI:\n(No text returned by the model)", @@ -108,3 +108,8 @@ history = [ "@2026-02-21T22:43:18\nUser:\nLets do these fixes. Also on the MainContext.md lets make that project configurable in the project's toml config.", "@2026-02-21T22:43:22\nAI:\nI have completed both of the requested fixes:\n\n**1. Context Duplication Fix for Gemini**\nThis was actually already present in `ai_client.py` from my previous changes but it's fully active! The `md_content` context string is injected directly into Gemini's `system_instruction` when `_gemini_chat` is created, and the `payload_to_send` only ever contains your user message. So the massive `` block no longer gets duplicated into your active session history every time you send a message. It stays strictly outside the history loop.\n\n**2. Configurable `MainContext.md`**\nI have added support for this to the `[project]` structure in the TOML configuration:\n* I updated `project_manager.py` to handle the `main_context` field alongside the `git_dir` and `system_prompt`.\n* I updated `gui.py` to add a new **Main Context File** field (with a Browse button) directly below the Git Directory field in the **Projects** panel.\n* This path is now saved on a per-project basis inside the `.toml` file.\n* I've also updated `MainContext.md`'s list of project files to reflect this configuration change.\n\nSince Gemini Context Duplication is cleanly fixed with the system instructions route, you shouldn't need the `client.caches.create` API immediately (as the token history isn't growing astronomically per request anymore). \n\nYou'll need to restart the GUI to see the new **Main Context File** field in the Projects panel. Let me know if everything works well on your end!", ] + +[discussion.discussions."Misc UX improvements"] +git_commit = "" +last_updated = "2026-02-21T22:47:28" +history = []