feat: improve onboard with merge-or-overwrite prompt
This commit is contained in:
parent
835a10e1a9
commit
12540ba8cb
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
⚡️ Delivers core agent functionality in just **~4,000** lines of code — **99% smaller** than Clawdbot's 430k+ lines.
|
⚡️ 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
|
## 📢 News
|
||||||
|
|
||||||
|
|||||||
@ -162,13 +162,19 @@ def onboard():
|
|||||||
config_path = get_config_path()
|
config_path = get_config_path()
|
||||||
|
|
||||||
if config_path.exists():
|
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]")
|
||||||
config = load_config()
|
console.print(" [bold]y[/bold] = overwrite with defaults (existing values will be lost)")
|
||||||
save_config(config)
|
console.print(" [bold]N[/bold] = refresh config, keeping existing values and adding new fields")
|
||||||
console.print(f"[green]✓[/green] Config refreshed at {config_path} (existing values preserved)")
|
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:
|
else:
|
||||||
config = Config()
|
save_config(Config())
|
||||||
save_config(config)
|
|
||||||
console.print(f"[green]✓[/green] Created config at {config_path}")
|
console.print(f"[green]✓[/green] Created config at {config_path}")
|
||||||
|
|
||||||
# Create workspace
|
# Create workspace
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user