mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
84ded81a8c
- Add migrateChannelConfigs() and ValidateModelList() to the fresh- install path (no config.json) so legacy env vars are migrated and model list is validated consistently with the normal loading path - Use os.LookupEnv instead of os.Getenv in loadProviderEnvOverrides so explicitly empty env vars (e.g. PICOCLAW_PROVIDERS_X_API_BASE=) can clear values from config.json - Guard .env loading with sync.Once to avoid repeated disk I/O and noisy log messages when LoadConfig is called from polling handlers - Add tests: .env file loading, missing config.json with env vars, malformed .env non-fatal behavior, and LookupEnv empty-override Note: go.mod tcell/v2 and tview are correctly listed as direct deps (they are imported by the launcher TUI); upstream go.mod was stale. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>