Compare commits

...
Author SHA1 Message Date
celestial-vault e8a19d264d remove console log 2025-07-20 23:53:40 -07:00
celestial-vault 326b6edba6 add missing taskId to buildApiHandler 2025-07-20 23:51:43 -07:00
3 changed files with 5 additions and 4 deletions
+3 -2
View File
@@ -260,7 +260,7 @@ export class Controller {
// Update API handler with new mode (buildApiHandler now selects provider based on mode)
if (this.task) {
const { apiConfiguration } = await getAllExtensionState(this.context)
this.task.api = buildApiHandler(apiConfiguration, chatSettings.mode)
this.task.api = buildApiHandler({ ...apiConfiguration, taskId: this.task.taskId }, chatSettings.mode)
}
// Save only non-mode properties to global storage
@@ -355,7 +355,7 @@ export class Controller {
await updateGlobalState(this.context, "welcomeViewCompleted", true)
if (this.task) {
this.task.api = buildApiHandler(updatedConfig, currentMode)
this.task.api = buildApiHandler({ ...updatedConfig, taskId: this.task.taskId }, currentMode)
}
await this.postStateToWebview()
@@ -523,6 +523,7 @@ export class Controller {
const updatedConfig = {
...apiConfiguration,
openRouterApiKey: apiKey,
taskId: this.task.taskId,
}
this.task.api = buildApiHandler(updatedConfig, currentMode)
}
@@ -30,7 +30,7 @@ export async function updateApiConfigurationProto(
// Update the task's API handler if there's an active task
if (controller.task) {
const currentMode = await controller.getCurrentMode()
controller.task.api = buildApiHandler(appApiConfiguration, currentMode)
controller.task.api = buildApiHandler({ ...appApiConfiguration, taskId: controller.task.taskId }, currentMode)
}
// Post updated state to webview
+1 -1
View File
@@ -22,7 +22,7 @@ export async function updateSettings(controller: Controller, request: UpdateSett
if (controller.task) {
const currentMode = await controller.getCurrentMode()
controller.task.api = buildApiHandler(apiConfiguration, currentMode)
controller.task.api = buildApiHandler({ ...apiConfiguration, taskId: controller.task.taskId }, currentMode)
}
}