fix(state): auto-migrate legacy agent dir
This commit is contained in:
1 parent
7aa7fa79d0
commit
2771001720
6 files changed
+570
-457
No files matched your search
@@ -19,6 +19,7 @@ import {
|
||||
writeConfigFile,
|
||||
} from "../config/config.js";
|
||||
import { danger, setVerbose } from "../globals.js";
|
||||
import { autoMigrateLegacyAgentDir } from "../infra/state-migrations.js";
|
||||
import { loginWeb, logoutWeb } from "../provider-web.js";
|
||||
import { defaultRuntime } from "../runtime.js";
|
||||
import { VERSION } from "../version.js";
|
||||
@@ -127,6 +128,11 @@ export function buildProgram() {
|
||||
);
|
||||
process.exit(1);
|
||||
});
|
||||
program.hook("preAction", async (_thisCommand, actionCommand) => {
|
||||
if (actionCommand.name() === "doctor") return;
|
||||
const cfg = loadConfig();
|
||||
await autoMigrateLegacyAgentDir({ cfg });
|
||||
});
|
||||
const examples = [
|
||||
[
|
||||
"clawdbot login --verbose",
|
||||
|
||||
Reference in new issue
Block a user