fix: preserve code queue prompt observation fields
This commit is contained in:
@@ -228,6 +228,8 @@ function compactSummary(summary: unknown, options: CodexTaskOptions, taskId: str
|
||||
const transcriptCount = asNumber(record.transcriptCount, 0);
|
||||
const transcriptMaxSeq = transcriptCount > 0 ? record.transcriptMaxSeq ?? null : null;
|
||||
const initialPrompt = asString(record.initialPrompt ?? record.prompt);
|
||||
const initialPromptView = textView(initialPrompt, options.full, 3000);
|
||||
const basePromptView = textView(asString(record.basePrompt), options.full, 2000);
|
||||
return {
|
||||
id: record.id ?? taskId,
|
||||
queueId: record.queueId ?? null,
|
||||
@@ -256,8 +258,9 @@ function compactSummary(summary: unknown, options: CodexTaskOptions, taskId: str
|
||||
startedAt: record.startedAt ?? null,
|
||||
updatedAt: record.updatedAt ?? null,
|
||||
finishedAt: record.finishedAt ?? null,
|
||||
initialPrompt: textView(initialPrompt, options.full, 3000),
|
||||
basePrompt: textView(asString(record.basePrompt), options.full, 2000),
|
||||
...(options.full
|
||||
? { initialPrompt: initialPromptView, basePrompt: basePromptView }
|
||||
: { initialPromptPreview: initialPromptView, basePromptPreview: basePromptView }),
|
||||
referenceTaskIds: record.referenceTaskIds ?? [],
|
||||
referenceInjection: record.referenceInjection ?? null,
|
||||
lastAssistantMessage: compactLastAssistant(record.lastAssistantMessage, options.full),
|
||||
@@ -825,7 +828,7 @@ function compactTaskMutationResponse(task: unknown, options: CompactTaskMutation
|
||||
startedAt: record.startedAt ?? null,
|
||||
updatedAt: record.updatedAt ?? null,
|
||||
finishedAt: record.finishedAt ?? null,
|
||||
prompt: textView(prompt, options.fullPrompt === true, 1200),
|
||||
...(options.fullPrompt === true ? { prompt: textView(prompt, true, 1200) } : { promptPreview: textView(prompt, false, 1200) }),
|
||||
commands: taskId.length === 0 ? null : {
|
||||
show: `bun scripts/cli.ts codex task ${taskId}`,
|
||||
trace: `bun scripts/cli.ts codex task ${taskId} --trace --tail --limit ${defaultTraceLimit}`,
|
||||
|
||||
Reference in New Issue
Block a user