feat: surface codex reasoning summaries
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user