修复策划V2错误结果展示
Project CI / Repository checks (pull_request) Has been cancelled
Project CI / Frontend tests (pull_request) Has been cancelled
Project CI / Backend tests (pull_request) Has been cancelled
Project CI / Native shell tests (pull_request) Has been cancelled

展示后端返回的错误回合结果

在缺少会话错误摘要时回填运行时错误
This commit is contained in:
2026-09-05 12:29:18 +00:00
parent e87cb98d3e
commit 90eae50dd3
+16 -6
View File
@@ -621,7 +621,21 @@ export function App({
planningSessionToPlanGddState(result.session, result.currentArtifact),
);
updateProjectSupervisorRuntime(planningSessionToRuntime(result.session));
const sessionError = result.session.lastError?.summary ?? '';
const resultError =
result.result?.kind === 'error'
? (() => {
const payload = result.result.payload;
if (
payload &&
typeof payload === 'object' &&
typeof (payload as { summary?: unknown }).summary === 'string'
) {
return (payload as { summary: string }).summary.trim();
}
return '';
})()
: '';
const sessionError = result.session.lastError?.summary ?? resultError;
setProjectSupervisorRuntimeError(sessionError);
if (result.conversation) {
const conversationMessages = planningMessagesToChatMessages(
@@ -632,11 +646,7 @@ export function App({
savedConversationProjectPathRef.current = localProjectPathRef.current;
savedConversationCountRef.current = conversationMessages.length;
latestMessagesRef.current = conversationMessages;
} else if (
result.result &&
result.result.kind !== 'error' &&
clientTurnId
) {
} else if (result.result && clientTurnId) {
const displayText = planningResultDisplayText(
result.result,
result.currentArtifact,