refactor(runtime): reuse the shared default chat label on a replacement tab

The replacement tab open-coded `'Claude Chat' : 'Codex Chat'` while every other
publisher already calls `defaultAgentChatLabel`. One writer for the placeholder.
This commit is contained in:
Merge Sim
2026-09-10 16:10:09 -07:00
parent 68b8c2a397
commit 92c79ec8d1
@@ -1,3 +1,4 @@
import { defaultAgentChatLabel } from '../../shared/agent-session-chat-label'
import type { RuntimeMobileSessionTabsSnapshot } from '../../shared/runtime-types'
import type { ConversationReplacement } from '../native-chat/agent-session-wire/structured-conversation-command'
@@ -30,7 +31,7 @@ export function replaceConversationInSnapshot(
id,
sessionId: replacement.sessionId,
agent: replacement.agent,
title: replacement.agent === 'claude' ? 'Claude Chat' : 'Codex Chat',
title: defaultAgentChatLabel(replacement.agent),
replacesSessionId: replacement.sourceSessionId
}
: tab