feat(config): synchronize terminal settings with environment variables

- Added functionality to keep the .env file in sync with terminal configuration settings in config.yaml, ensuring terminal_tool can directly access necessary environment variables.
- Updated setup wizard to save selected backend and associated Docker image to .env for improved consistency and usability.
This commit is contained in:
teknium1 2026-02-26 20:02:46 -08:00
parent 7c1f90045e
commit 0a231c0783
2 changed files with 21 additions and 0 deletions

View file

@ -1015,6 +1015,14 @@ def run_setup_wizard(args):
print_success("Terminal set to SSH")
# else: Keep current (selected_backend is None)
# Sync terminal backend to .env so terminal_tool picks it up directly.
# config.yaml is the source of truth, but terminal_tool reads TERMINAL_ENV.
if selected_backend:
save_env_value("TERMINAL_ENV", selected_backend)
docker_image = config.get('terminal', {}).get('docker_image')
if docker_image:
save_env_value("TERMINAL_DOCKER_IMAGE", docker_image)
# =========================================================================
# Step 5: Agent Settings
# =========================================================================