feat: summarize codex app server turns

This commit is contained in:
AI Bot
2026-06-03 10:17:07 +08:00
parent 74b333ba2f
commit 1ae81fa3af
11 changed files with 200 additions and 5 deletions

View File

@@ -120,6 +120,7 @@ export function buildDeviceWorkspaceDetailCards(workspace: DeviceWorkspaceView)
const codexConfigRequirements = objectFromMetadata(codexAppServerMetadata.configRequirements);
const codexExternalAgentMigration = objectFromMetadata(codexAppServerMetadata.externalAgentMigration);
const codexThreadSummary = objectFromMetadata(codexAppServerMetadata.threadSummary);
const codexThreadTurnSummary = objectFromMetadata(codexAppServerMetadata.threadTurnSummary);
return {
capabilities: {
@@ -159,6 +160,11 @@ export function buildDeviceWorkspaceDetailCards(workspace: DeviceWorkspaceView)
)} 个 · 活跃 ${numberFromMetadata(codexThreadSummary.activeThreadCount)} 个 · 最新 ${minuteTimestampFromMetadata(
codexThreadSummary.latestUpdatedAt,
)}`,
codexTurns: `轮次:${numberFromMetadata(codexThreadTurnSummary.totalTurnCount)} 个 · 运行中 ${numberFromMetadata(
codexThreadTurnSummary.runningTurnCount,
)} 个 · 完成 ${numberFromMetadata(codexThreadTurnSummary.completedTurnCount)} 个 · 最新 ${minuteTimestampFromMetadata(
codexThreadTurnSummary.latestUpdatedAt,
)}`,
preferredExecutionMode: `默认执行模式:${
selectedDevice?.preferredExecutionMode === "gui"
? "GUI"
@@ -802,6 +808,9 @@ export function DeviceEditorCard({
<div className="rounded-2xl bg-[#F7F8FA] px-3 py-2">
{detailCards.capabilities.items.codexThreads}
</div>
<div className="rounded-2xl bg-[#F7F8FA] px-3 py-2">
{detailCards.capabilities.items.codexTurns}
</div>
<div className="rounded-2xl bg-[#F7F8FA] px-3 py-2">
{detailCards.capabilities.items.preferredExecutionMode}
</div>