refactor(core): drop redundant String casts on Model.Ref in to-llm-message (#57887)

This commit is contained in:
Aiden Cline
2026-10-21 16:01:48 -05:00
committed by GitHub
Unverified
parent 3260ec767c
commit e98ab915e6
@@ -152,8 +152,8 @@ const toolResult = (tool: SessionMessage.AssistantTool, providerMetadata: Provid
}
const assistant = (message: SessionMessage.Assistant, model: Model.Ref, providerMetadataKey: string) => {
const sameProvider = String(message.model.providerID) === String(model.providerID)
const sameModel = sameProvider && String(message.model.id) === String(model.id)
const sameProvider = message.model.providerID === model.providerID
const sameModel = sameProvider && message.model.id === model.id
const reuseProviderMetadata = sameModel && message.error === undefined
const reasoningInterrupted = message.content.some(
(item) => item.type === "reasoning" && item.time !== undefined && item.time.completed === undefined,