MCPcopy
hub / github.com/codeaashu/claude-code / generate

Function generate

src/hooks/useAwaySummary.ts:69–81  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

67 }
68
69 async function generate(): Promise<void> {
70 pendingRef.current = false
71 if (hasSummarySinceLastUserTurn(messagesRef.current)) return
72 abortInFlight()
73 const controller = new AbortController()
74 abortRef.current = controller
75 const text = await generateAwaySummary(
76 messagesRef.current,
77 controller.signal,
78 )
79 if (controller.signal.aborted || text === null) return
80 setMessages(prev => [...prev, createAwaySummaryMessage(text)])
81 }
82
83 function onBlurTimerFire(): void {
84 timerRef.current = null

Callers 1

onBlurTimerFireFunction · 0.85

Calls 4

abortInFlightFunction · 0.85
generateAwaySummaryFunction · 0.85
createAwaySummaryMessageFunction · 0.85

Tested by

no test coverage detected