feat: improve onboard with merge-or-overwrite prompt

This commit is contained in:
Re-bin 2026-02-14 00:58:43 +00:00
parent 835a10e1a9
commit 12540ba8cb
2 changed files with 13 additions and 7 deletions

View File

@ -16,7 +16,7 @@
⚡️ Delivers core agent functionality in just **~4,000** lines of code — **99% smaller** than Clawdbot's 430k+ lines.
📏 Real-time line count: **3,582 lines** (run `bash core_agent_lines.sh` to verify anytime)
📏 Real-time line count: **3,583 lines** (run `bash core_agent_lines.sh` to verify anytime)
## 📢 News

View File

@ -162,13 +162,19 @@ def onboard():
config_path = get_config_path()
if config_path.exists():
# Load existing config — Pydantic fills in defaults for any new fields
console.print(f"[yellow]Config already exists at {config_path}[/yellow]")
console.print(" [bold]y[/bold] = overwrite with defaults (existing values will be lost)")
console.print(" [bold]N[/bold] = refresh config, keeping existing values and adding new fields")
if typer.confirm("Overwrite?"):
config = Config()
save_config(config)
console.print(f"[green]✓[/green] Config reset to defaults at {config_path}")
else:
config = load_config()
save_config(config)
console.print(f"[green]✓[/green] Config refreshed at {config_path} (existing values preserved)")
else:
config = Config()
save_config(config)
save_config(Config())
console.print(f"[green]✓[/green] Created config at {config_path}")
# Create workspace