MCPcopy Create free account
hub / github.com/Noumena-Network/code / removeInterruptedMessage

Function removeInterruptedMessage

src/cli/print.ts:4909–4919  ·  view source on GitHub ↗
(
  messages: Message[],
  interruptedUserMessage: NormalizedUserMessage,
)

Source from the content-addressed store, hash-verified

4907 * @internal Exported for testing
4908 */
4909export function removeInterruptedMessage(
4910 messages: Message[],
4911 interruptedUserMessage: NormalizedUserMessage,
4912): void {
4913 const idx = messages.findIndex(m => m.uuid === interruptedUserMessage.uuid)
4914 if (idx !== -1) {
4915 // Remove the user message and the sentinel that immediately follows it.
4916 // splice safely handles the case where idx is the last element.
4917 messages.splice(idx, 2)
4918 }
4919}
4920
4921type LoadInitialMessagesResult = {
4922 messages: Message[]

Callers 1

runHeadlessStreamingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected