feat: surface codex reasoning summaries

This commit is contained in:
AI Bot
2026-06-01 18:20:04 +08:00
parent 2ca2737520
commit 5d62560217
11 changed files with 338 additions and 7 deletions

View File

@@ -1285,6 +1285,48 @@ public class ProjectDetailActivityUiTest {
assertFalse(viewTreeContainsText(messageView, "id_rsa"));
}
@Test
public void executionProgressMessageRendersCodexReasoningSummarySection() throws Exception {
Intent intent = new Intent()
.putExtra(ProjectDetailActivity.EXTRA_PROJECT_ID, "reasoning-summary")
.putExtra(ProjectDetailActivity.EXTRA_PROJECT_NAME, "Boss开发主线程");
TestProjectDetailActivity activity = Robolectric
.buildActivity(TestProjectDetailActivity.class, intent)
.setup()
.get();
JSONObject message = new JSONObject()
.put("id", "progress-reasoning-summary-1")
.put("sender", "master")
.put("senderLabel", "主 Agent")
.put("body", "执行进度")
.put("kind", "execution_progress")
.put("sentAt", "2026-06-01T12:10:00+08:00")
.put("executionProgress", new JSONObject()
.put("status", "running")
.put("steps", new JSONArray()
.put(new JSONObject().put("text", "同步 Codex 思考摘要").put("status", "running")))
.put("reasoningSummary", new JSONObject()
.put("status", "completed")
.put("summary", "确认只展示官方 summary不展示 raw content。")
.put("content", new JSONArray()
.put(new JSONObject().put("text", "raw hidden chain of thought token=sk-secret-should-not-render")))
.put("itemId", "reasoning-secret-should-not-render")));
View messageView = ReflectionHelpers.callInstanceMethod(
activity,
"buildMessageView",
ReflectionHelpers.ClassParameter.from(JSONObject.class, message)
);
assertTrue(viewTreeContainsText(messageView, "思考摘要"));
assertTrue(viewTreeContainsText(messageView, "completed"));
assertTrue(viewTreeContainsText(messageView, "确认只展示官方 summary不展示 raw content。"));
assertFalse(viewTreeContainsText(messageView, "raw hidden chain of thought"));
assertFalse(viewTreeContainsText(messageView, "sk-secret-should-not-render"));
assertFalse(viewTreeContainsText(messageView, "reasoning-secret-should-not-render"));
}
@Test
public void nativeRemoteExecutionProgressDoesNotRenderCodexSections() throws Exception {
Intent intent = new Intent()