diff --git a/ai_client.py b/ai_client.py index 6c19265..a6792f8 100644 --- a/ai_client.py +++ b/ai_client.py @@ -35,7 +35,11 @@ _ANTHROPIC_CHUNK_SIZE = 180_000 _ANTHROPIC_SYSTEM = ( "You are a helpful coding assistant with access to a PowerShell tool. " "When asked to create or edit files, prefer targeted edits over full rewrites. " - "Always explain what you are doing before invoking the tool." + "Always explain what you are doing before invoking the tool.\n\n" + "When writing or rewriting large files (especially those containing quotes, backticks, or special characters), " + "avoid python -c with inline strings. Instead: (1) write a .py helper script to disk using a PS here-string " + "(@'...'@ for literal content), (2) run it with `python