feat: surface codex reasoning summaries
This commit is contained in:
@@ -246,6 +246,11 @@ export interface ExecutionProgressToolActivity {
|
||||
detail?: string;
|
||||
}
|
||||
|
||||
export interface ExecutionProgressReasoningSummary {
|
||||
status: string;
|
||||
summary: string;
|
||||
}
|
||||
|
||||
export interface ExecutionProgressSnapshot {
|
||||
taskId: string;
|
||||
projectId: string;
|
||||
@@ -277,6 +282,7 @@ export interface ExecutionProgressSnapshot {
|
||||
compaction?: ExecutionProgressCompaction;
|
||||
threadCollaboration?: ExecutionProgressThreadCollaboration;
|
||||
toolActivities?: ExecutionProgressToolActivity[];
|
||||
reasoningSummary?: ExecutionProgressReasoningSummary;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
@@ -316,6 +322,10 @@ export interface ExecutionProgressInput {
|
||||
cwd?: unknown;
|
||||
}
|
||||
>;
|
||||
reasoningSummary?: Partial<ExecutionProgressReasoningSummary> & {
|
||||
content?: unknown;
|
||||
itemId?: unknown;
|
||||
};
|
||||
}
|
||||
|
||||
export interface ForwardSource {
|
||||
@@ -4004,6 +4014,9 @@ function normalizeExecutionProgressSnapshot(raw: Partial<ExecutionProgressSnapsh
|
||||
? undefined
|
||||
: normalizeExecutionProgressThreadCollaboration(raw.threadCollaboration),
|
||||
toolActivities: nativeRemoteControl ? undefined : normalizeExecutionProgressToolActivities(raw.toolActivities),
|
||||
reasoningSummary: nativeRemoteControl
|
||||
? undefined
|
||||
: normalizeExecutionProgressReasoningSummary(raw.reasoningSummary),
|
||||
updatedAt: raw.updatedAt ?? nowIso(),
|
||||
};
|
||||
}
|
||||
@@ -5803,6 +5816,22 @@ function normalizeExecutionProgressToolActivities(
|
||||
return activities.length > 0 ? activities : undefined;
|
||||
}
|
||||
|
||||
function normalizeExecutionProgressReasoningSummary(
|
||||
input?: ExecutionProgressInput["reasoningSummary"],
|
||||
): ExecutionProgressReasoningSummary | undefined {
|
||||
if (!input) {
|
||||
return undefined;
|
||||
}
|
||||
const summary = safeExecutionProgressText(input.summary);
|
||||
if (!summary) {
|
||||
return undefined;
|
||||
}
|
||||
return {
|
||||
status: safeExecutionProgressText(input.status) || "running",
|
||||
summary,
|
||||
};
|
||||
}
|
||||
|
||||
function defaultExecutionProgressStepTexts(task: Pick<MasterAgentTask, "taskType" | "relayViaMasterAgent">) {
|
||||
if (task.taskType === "browser_control") {
|
||||
return [
|
||||
@@ -5955,6 +5984,9 @@ function buildExecutionProgressSnapshot(
|
||||
? undefined
|
||||
: normalizeExecutionProgressThreadCollaboration(input?.threadCollaboration),
|
||||
toolActivities: nativeRemoteControl ? undefined : normalizeExecutionProgressToolActivities(input?.toolActivities),
|
||||
reasoningSummary: nativeRemoteControl
|
||||
? undefined
|
||||
: normalizeExecutionProgressReasoningSummary(input?.reasoningSummary),
|
||||
updatedAt: nowIso(),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user