fixing...

This commit is contained in:
2026-02-21 20:22:19 -05:00
parent 4a9c23b2da
commit c101d7b7d1
5 changed files with 262 additions and 119 deletions

28
patch_test.py Normal file
View File

@@ -0,0 +1,28 @@
# patch_gui.py — apply multi-project support to gui.py
import re
from pathlib import Path
src = Path("C:/projects/manual_slop/gui.py").read_text(encoding="utf-8")
# ── 1. Add project_manager import after "import theme" ──────────────────────
src = src.replace(
"import theme\n",
"import theme\nimport project_manager\n",
1
)
# ── 2. Add PROJECT_TOML_PATH constant after CONFIG_PATH line ─────────────────
src = src.replace(
'CONFIG_PATH = Path("config.toml")\n',
'CONFIG_PATH = Path("config.toml")\nPROVIDERS = ["gemini", "anthropic"]\n',
1
)
# Remove the duplicate PROVIDERS = [...] that already exists two lines down
src = src.replace(
'PROVIDERS = ["gemini", "anthropic"]\nPROVIDERS = ["gemini", "anthropic"]\n',
'PROVIDERS = ["gemini", "anthropic"]\n',
1
)
print("Pass 1 done - imports & constants")
print(repr(src[:300]))