MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / removeInterruptedMessage

Function removeInterruptedMessage

source code/cli/print.ts:4877–4887  ·  view source on GitHub ↗
(
  messages: Message[],
  interruptedUserMessage: NormalizedUserMessage,
)

Source from the content-addressed store, hash-verified

4875 * @internal Exported for testing
4876 */
4877export function removeInterruptedMessage(
4878 messages: Message[],
4879 interruptedUserMessage: NormalizedUserMessage,
4880): void {
4881 const idx = messages.findIndex(m => m.uuid === interruptedUserMessage.uuid)
4882 if (idx !== -1) {
4883 // Remove the user message and the sentinel that immediately follows it.
4884 // splice safely handles the case where idx is the last element.
4885 messages.splice(idx, 2)
4886 }
4887}
4888
4889type LoadInitialMessagesResult = {
4890 messages: Message[]

Callers 1

runHeadlessStreamingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected