MCPcopy Create free account
hub / github.com/anomalyco/opencode / latestText

Function latestText

packages/core/src/session/message-updater.ts:89–90  ·  view source on GitHub ↗
(assistant: DraftAssistant | undefined, textID: string)

Source from the content-addressed store, hash-verified

87 )
88
89 const latestText = (assistant: DraftAssistant | undefined, textID: string) =>
90 assistant?.content.findLast((item): item is DraftText => item.type === "text" && item.id === textID)
91
92 const latestReasoning = (assistant: DraftAssistant | undefined, reasoningID: string) =>
93 assistant?.content.findLast((item): item is DraftReasoning => item.type === "reasoning" && item.id === reasoningID)

Callers 1

updateFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected