feat: summarize codex stream progress events
This commit is contained in:
@@ -1679,6 +1679,49 @@ public final class BossUi {
|
||||
}
|
||||
}
|
||||
|
||||
JSONObject streamEvents = progress == null ? null : progress.optJSONObject("streamEvents");
|
||||
if (streamEvents != null) {
|
||||
int agentDeltaCount = streamEvents.optInt("agentDeltaCount", 0);
|
||||
int planDeltaCount = streamEvents.optInt("planDeltaCount", 0);
|
||||
int reasoningDeltaCount = streamEvents.optInt("reasoningDeltaCount", 0);
|
||||
int toolProgressCount = streamEvents.optInt("toolProgressCount", 0);
|
||||
int commandOutputChunkCount = streamEvents.optInt("commandOutputChunkCount", 0);
|
||||
int terminalInteractionCount = streamEvents.optInt("terminalInteractionCount", 0);
|
||||
int fileOutputChunkCount = streamEvents.optInt("fileOutputChunkCount", 0);
|
||||
boolean hasStreamEvents = agentDeltaCount > 0 || planDeltaCount > 0 || reasoningDeltaCount > 0 ||
|
||||
toolProgressCount > 0 || commandOutputChunkCount > 0 || terminalInteractionCount > 0 ||
|
||||
fileOutputChunkCount > 0;
|
||||
if (hasStreamEvents) {
|
||||
card.addView(divider(context));
|
||||
card.addView(sectionTitle(context, "流式增量"));
|
||||
String status = streamEvents.optString("status", "").trim();
|
||||
if (!TextUtils.isEmpty(status)) {
|
||||
card.addView(detailRow(context, "◇", "状态 " + status, "", false));
|
||||
}
|
||||
if (agentDeltaCount > 0) {
|
||||
card.addView(detailRow(context, "", "回复片段 " + agentDeltaCount, "", false, true));
|
||||
}
|
||||
if (planDeltaCount > 0) {
|
||||
card.addView(detailRow(context, "", "计划片段 " + planDeltaCount, "", false, true));
|
||||
}
|
||||
if (reasoningDeltaCount > 0) {
|
||||
card.addView(detailRow(context, "", "思考片段 " + reasoningDeltaCount, "", false, true));
|
||||
}
|
||||
if (toolProgressCount > 0) {
|
||||
card.addView(detailRow(context, "", "工具进度 " + toolProgressCount, "", false, true));
|
||||
}
|
||||
if (commandOutputChunkCount > 0) {
|
||||
card.addView(detailRow(context, "", "命令输出片段 " + commandOutputChunkCount, "", false, true));
|
||||
}
|
||||
if (terminalInteractionCount > 0) {
|
||||
card.addView(detailRow(context, "", "终端交互 " + terminalInteractionCount, "", false, true));
|
||||
}
|
||||
if (fileOutputChunkCount > 0) {
|
||||
card.addView(detailRow(context, "", "文件输出片段 " + fileOutputChunkCount, "", false, true));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
JSONArray warnings = progress == null ? null : progress.optJSONArray("warnings");
|
||||
if (warnings != null && warnings.length() > 0) {
|
||||
card.addView(divider(context));
|
||||
|
||||
Reference in New Issue
Block a user