fixing...
This commit is contained in:
28
patch_test.py
Normal file
28
patch_test.py
Normal 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]))
|
||||
Reference in New Issue
Block a user