From 43bbb9e1fe019dfe77bcb0a8081bf237cd395b2d Mon Sep 17 00:00:00 2001 From: Merge Sim Date: Sat, 5 Sep 2026 02:05:39 -0700 Subject: [PATCH] fix(native-chat): give a rollout-transcript shell row the terminal glyph MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `exec` and `local_shell` are what the Codex rollout transcript names a shell call — `native-chat-edit-normalize` already treats those three words as the command tools — but the activity set the glyph vocabulary reuses carries neither, so both rows headed a real command with the generic-tool wrench. Named in the vocabulary rather than in that activity set, because that set also picks the running row's copy and this is only about the glyph. --- src/shared/native-chat-tool-icon.test.ts | 7 ++++++- src/shared/native-chat-tool-icon.ts | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/shared/native-chat-tool-icon.test.ts b/src/shared/native-chat-tool-icon.test.ts index 2ff6091c54c..6403d62038e 100644 --- a/src/shared/native-chat-tool-icon.test.ts +++ b/src/shared/native-chat-tool-icon.test.ts @@ -104,8 +104,13 @@ describe('native chat tool icons', () => { }) it('keeps the terminal glyph for a row that really ran a command', () => { - for (const name of ['shell', 'bash', 'run_terminal_cmd']) { + // `exec` and `local_shell` are how the Codex rollout transcript names a + // shell call; `native-chat-edit-normalize` already calls the three command + // tools by those words, so a wrench on one would deny a command that ran. + for (const name of ['shell', 'bash', 'run_terminal_cmd', 'exec', 'local_shell']) { + expect(nativeChatToolCategory(name)).toBe('unknown') expect(nativeChatToolIconName(name)).toBe('square-terminal') + expect(isShellActivityToolRow(name)).toBe(true) } }) diff --git a/src/shared/native-chat-tool-icon.ts b/src/shared/native-chat-tool-icon.ts index 288b5a47206..c4f8043c8dc 100644 --- a/src/shared/native-chat-tool-icon.ts +++ b/src/shared/native-chat-tool-icon.ts @@ -65,6 +65,11 @@ const CATEGORY_BY_ROW_WORD = new Map([ ['read', 'read'], ['search', 'search'], ['list', 'listFiles'], + // Codex's rollout-transcript names for a shell call, which the activity set + // below does not carry: `isCommandToolName` also picks the running row's copy, + // and this vocabulary only picks a glyph. + ['exec', 'unknown'], + ['local_shell', 'unknown'], // Every Codex file change projects as a `Diff` call, and the edit set below // names the tools that carry the edit in their input, not that projection. ['diff', 'fileChange'],