Function
latestText
(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) |
Tested by
no test coverage detected