mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-15 12:41:37 +03:00
refactor(core): drop redundant String casts on Model.Ref in to-llm-message (#57887)
This commit is contained in:
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,
|
||||
|
||||
Reference in New Issue
Block a user