Skip to content

Commit 530b67d

Browse files
committed
Fix tests
1 parent 616472f commit 530b67d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/core/webview/ClineProvider.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,12 @@ export class ClineProvider
917917
// The task will continue with the current/default configuration.
918918
}
919919
} catch (error) {
920-
// The task will continue with the current/default configuration.
920+
// Log the error but continue with task restoration.
921+
this.log(
922+
`Failed to restore API configuration for mode '${historyItem.mode}': ${
923+
error instanceof Error ? error.message : String(error)
924+
}. Continuing with default configuration.`,
925+
)
921926
}
922927
}
923928
}

src/core/webview/__tests__/ClineProvider.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -889,6 +889,7 @@ describe("ClineProvider", () => {
889889
listConfig: vi.fn().mockResolvedValue([profile]),
890890
activateProfile: vi.fn().mockResolvedValue(profile),
891891
setModeConfig: vi.fn(),
892+
getProfile: vi.fn().mockResolvedValue(profile),
892893
} as any
893894

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

16151617
// Switch to architect mode

0 commit comments

Comments
 (0)