chore: test deploy snapshot
This commit is contained in:
@@ -3042,6 +3042,19 @@ async function cancelRunnerCodexExecution(requestId: string) {
|
||||
}
|
||||
}
|
||||
|
||||
function isRunnerTerminatedMessage(message: string) {
|
||||
const normalizedMessage = message.trim().toLowerCase();
|
||||
return normalizedMessage === 'terminated' || normalizedMessage.endsWith(': terminated');
|
||||
}
|
||||
|
||||
function normalizeRunnerExecutionErrorMessage(message: string) {
|
||||
if (isRunnerTerminatedMessage(message)) {
|
||||
return 'Codex 실행이 중간에 종료되었습니다. 잠시 후 다시 시도해 주세요.';
|
||||
}
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
async function runAgenticCodexReply(
|
||||
context: ChatContext | null,
|
||||
input: string,
|
||||
@@ -3441,7 +3454,16 @@ async function runAgenticCodexReply(
|
||||
}
|
||||
|
||||
if (remoteErrorMessage) {
|
||||
reject(new Error(remoteErrorMessage));
|
||||
const hasMeaningfulOutput = Boolean(
|
||||
completedAgentMessage.trim() || streamedOutput.trim() || stdoutTail.trim(),
|
||||
);
|
||||
|
||||
if (isRunnerTerminatedMessage(remoteErrorMessage) && hasMeaningfulOutput) {
|
||||
resolve();
|
||||
return;
|
||||
}
|
||||
|
||||
reject(new Error(normalizeRunnerExecutionErrorMessage(remoteErrorMessage)));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user