diff --git a/app/lib/runtime/action-runner.ts b/app/lib/runtime/action-runner.ts index 13b17ef11..5fb984fd8 100644 --- a/app/lib/runtime/action-runner.ts +++ b/app/lib/runtime/action-runner.ts @@ -95,11 +95,12 @@ export class ActionRunner { this.#currentExecutionPromise = this.#currentExecutionPromise .then(() => { - this.#executeAction(actionId, isStreaming); + return this.#executeAction(actionId, isStreaming); }) .catch((error) => { console.error('Action failed:', error); }); + return this.#currentExecutionPromise; } async #executeAction(actionId: string, isStreaming: boolean = false) { diff --git a/app/utils/logger.ts b/app/utils/logger.ts index 9b2c31c95..1a5c932c5 100644 --- a/app/utils/logger.ts +++ b/app/utils/logger.ts @@ -11,7 +11,7 @@ interface Logger { setLevel: (level: DebugLevel) => void; } -let currentLevel: DebugLevel = (import.meta.env.VITE_LOG_LEVEL ?? import.meta.env.DEV) ? 'debug' : 'info'; +let currentLevel: DebugLevel = import.meta.env.VITE_LOG_LEVEL ?? import.meta.env.DEV ? 'debug' : 'info'; const isWorker = 'HTMLRewriter' in globalThis; const supportsColor = !isWorker;