Skip to content

Commit 38c3483

Browse files
authored
show why autopilot would continue (#5015)
* show why autopilot would continue * more generic error message
1 parent b7e094d commit 38c3483

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/extension/intents/node/toolCallingLoop.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,7 +1046,11 @@ export abstract class ToolCallingLoop<TOptions extends IToolCallingLoopOptions =
10461046
if (result.response.type !== ChatFetchResponseType.Success && this.shouldAutoRetry(result.response)) {
10471047
this.autopilotRetryCount++;
10481048
this._logService.info(`[ToolCallingLoop] Auto-retrying on error (attempt ${this.autopilotRetryCount}/${ToolCallingLoop.MAX_AUTOPILOT_RETRIES}): ${result.response.type}`);
1049-
this.showAutopilotProgress(outputStream, l10n.t('Retrying with Autopilot...'), l10n.t('Retried with Autopilot'));
1049+
if (this.options.request.permissionLevel === 'autopilot') {
1050+
this.showAutopilotProgress(outputStream, l10n.t('Request failed, retrying with Autopilot...'), l10n.t('Request failed, retried with Autopilot'));
1051+
} else {
1052+
this.showAutopilotProgress(outputStream, l10n.t('Request failed, retrying request...'), l10n.t('Request failed, retried request'));
1053+
}
10501054
await timeout(1000, token);
10511055
continue;
10521056
}
@@ -1095,7 +1099,7 @@ export abstract class ToolCallingLoop<TOptions extends IToolCallingLoopOptions =
10951099
const autopilotContinue = this.shouldAutopilotContinue(result);
10961100
if (autopilotContinue) {
10971101
this._logService.info(`[ToolCallingLoop] Autopilot internal stop hook: continuing because task may not be complete`);
1098-
this.showAutopilotProgress(outputStream, l10n.t('Continuing with Autopilot...'), l10n.t('Continued with Autopilot'));
1102+
this.showAutopilotProgress(outputStream, l10n.t('Continuing with Autopilot: Task not yet complete'), l10n.t('Continued with Autopilot: Task not yet complete'));
10991103
this.stopHookReason = autopilotContinue;
11001104
result.round.hookContext = formatHookContext([autopilotContinue]);
11011105
this.autopilotStopHookActive = true;

0 commit comments

Comments
 (0)