fix: stabilize tests and logging
This commit is contained in:
@@ -176,10 +176,7 @@ export async function applyAuthChoicePluginProvider(
|
||||
if (result.defaultModel) {
|
||||
if (params.setDefaultModel) {
|
||||
nextConfig = applyDefaultModel(nextConfig, result.defaultModel);
|
||||
await params.prompter.note(
|
||||
`Default model set to ${result.defaultModel}`,
|
||||
"Model configured",
|
||||
);
|
||||
await params.prompter.note(`Default model set to ${result.defaultModel}`, "Model configured");
|
||||
} else if (params.agentId) {
|
||||
agentModelOverride = result.defaultModel;
|
||||
await params.prompter.note(
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import type { ClawdbotConfig } from "../config/config.js";
|
||||
import { resolveGatewayPort } from "../config/config.js";
|
||||
import { resolveGatewayLaunchAgentLabel, resolveNodeLaunchAgentLabel } from "../daemon/constants.js";
|
||||
import {
|
||||
resolveGatewayLaunchAgentLabel,
|
||||
resolveNodeLaunchAgentLabel,
|
||||
} from "../daemon/constants.js";
|
||||
import { readLastGatewayErrorLine } from "../daemon/diagnostics.js";
|
||||
import {
|
||||
isLaunchAgentListed,
|
||||
@@ -44,10 +47,7 @@ async function maybeRepairLaunchAgentBootstrap(params: {
|
||||
const plistExists = await launchAgentPlistExists(params.env);
|
||||
if (!plistExists) return false;
|
||||
|
||||
note(
|
||||
"LaunchAgent is listed but not loaded in launchd.",
|
||||
`${params.title} LaunchAgent`,
|
||||
);
|
||||
note("LaunchAgent is listed but not loaded in launchd.", `${params.title} LaunchAgent`);
|
||||
|
||||
const shouldFix = await params.prompter.confirmSkipInNonInteractive({
|
||||
message: `Repair ${params.title} LaunchAgent bootstrap now?`,
|
||||
|
||||
@@ -50,7 +50,6 @@ describe("onboard (non-interactive): remote gateway config", () => {
|
||||
process.env.HOME = tempHome;
|
||||
delete process.env.CLAWDBOT_STATE_DIR;
|
||||
delete process.env.CLAWDBOT_CONFIG_PATH;
|
||||
vi.resetModules();
|
||||
|
||||
const port = await getFreePort();
|
||||
const token = "tok_remote_123";
|
||||
@@ -85,8 +84,8 @@ describe("onboard (non-interactive): remote gateway config", () => {
|
||||
runtime,
|
||||
);
|
||||
|
||||
const { CONFIG_PATH_CLAWDBOT } = await import("../config/config.js");
|
||||
const cfg = JSON.parse(await fs.readFile(CONFIG_PATH_CLAWDBOT, "utf8")) as {
|
||||
const { resolveConfigPath } = await import("../config/config.js");
|
||||
const cfg = JSON.parse(await fs.readFile(resolveConfigPath(), "utf8")) as {
|
||||
gateway?: { mode?: string; remote?: { url?: string; token?: string } };
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user