This commit is contained in:
2026-02-21 21:29:45 -05:00
parent 0a591d58eb
commit 59208b27ec
4 changed files with 221 additions and 17 deletions

View File

@@ -26,9 +26,7 @@ paths = [
[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/Fork_2026-02-21_21-10-30.png",
]
paths = []
[discussion]
roles = [
@@ -62,16 +60,8 @@ history = [
[discussion.discussions."Support files or mcp, or proper dynamic context uptake."]
git_commit = "d9a51332efb3354c81876f9a230bcedd632e7fd2"
last_updated = "2026-02-21T21:16:37"
history = [
"@2026-02-21T21:04:10\nUser:\nLets add support for mcp, files, or proper dynamic context update. \n\nRight now I'm feeding you files in a giant md text message but you seem to still have the habit of just grabbing the file's latest \ncontents again with powershell... Problably because we are not actually using proper file upload or gathering that \nyour used to with anthropic api or an mcp server.",
"@2026-02-21T21:04:48\nAI:\n(Annotation from user, no reponse from ai.)",
"@2026-02-21T21:06:15\nUser:\nSo you were doing script calls and didn't compelete what you were doing, continue.",
"@2026-02-21T21:07:15\nAI:\nThe system prompt didn't get updated — the old and new strings didn't match exactly (likely a quoting issue in the Python script). Let me check and fix that, and also verify the anthropic tool result injection:",
"@2026-02-21T21:09:49\nUser:\nThis time it seems to have actually patched stuff, let me know if your done and I should restart the gui, otherwise keep going its fine.",
"@2026-02-21T21:09:55\nAI:\n(Annotation from user, no reponse from ai. Seems like it did some work I'll take a screencap of latest and send over)",
"@2026-02-21T21:11:31\nAI:\nEverything is done. You can restart the GUI now. Here's a summary of all changes:\n\n**What changed:**\n\n1. **`ai_client.py`** — 3 new functions + modifications to 4 existing functions:\n - `_reread_file_items(file_items)` — re-reads every file from disk, returns fresh list\n - `_build_file_context_text(file_items)` — formats files as markdown code blocks for injection\n - `_ANTHROPIC_SYSTEM` — added instruction telling the AI not to re-read files already in context\n - `send()` — new `file_items` parameter, passed through to provider functions\n - `_send_anthropic()` — after each tool call round, re-reads files and appends a `[FILES UPDATED]` text block to the tool results message\n - `_send_gemini()` — after each tool call round, re-reads files (updates list, though can't inject into Gemini's structured responses)\n - `tool_result_send` comms logging — filters with `r.get(\"type\") == \"tool_result\"` so the injected text block doesn't crash the list comprehension\n\n2. **`gui.py`** — one-line change:\n - `ai_client.send(self.last_md, user_msg, base_dir, self.last_file_items)` — passes file items through\n\n3. **`MainContext.md`** — new \"Dynamic file context refresh\" documentation section",
]
last_updated = "2026-02-21T21:29:16"
history = []
[discussion.discussions."Word Wrap"]
git_commit = ""