Fix tests

This commit is contained in:
cte 2026-01-07 11:24:59 -08:00
parent 616472f807
commit 530b67d2ba
2 changed files with 8 additions and 1 deletions

View file

@ -917,7 +917,12 @@ export class ClineProvider
// The task will continue with the current/default configuration.
}
} catch (error) {
// The task will continue with the current/default configuration.
// Log the error but continue with task restoration.
this.log(
`Failed to restore API configuration for mode '${historyItem.mode}': ${
error instanceof Error ? error.message : String(error)
}. Continuing with default configuration.`,
)
}
}
}

View file

@ -889,6 +889,7 @@ describe("ClineProvider", () => {
listConfig: vi.fn().mockResolvedValue([profile]),
activateProfile: vi.fn().mockResolvedValue(profile),
setModeConfig: vi.fn(),
getProfile: vi.fn().mockResolvedValue(profile),
} as any
// Switch to architect mode
@ -1610,6 +1611,7 @@ describe("ClineProvider", () => {
listConfig: vi.fn().mockResolvedValue([profile]),
activateProfile: vi.fn().mockResolvedValue(profile),
setModeConfig: vi.fn(),
getProfile: vi.fn().mockResolvedValue(profile),
} as any
// Switch to architect mode