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

Function patch

src/bridge/initReplBridge.ts:286–300  ·  view source on GitHub ↗
(
    derived: string,
    bridgeSessionId: string,
    atCount: number,
  )

Source from the content-addressed store, hash-verified

284 let lastBridgeSessionId: string | undefined
285 let genSeq = 0
286 const patch = (
287 derived: string,
288 bridgeSessionId: string,
289 atCount: number,
290 ): void => {
291 hasTitle = true
292 title = derived
293 logForDebugging(
294 `[bridge:repl] derived title from message ${atCount}: ${derived}`,
295 )
296 void updateBridgeSessionTitle(bridgeSessionId, derived, {
297 baseUrl,
298 getAccessToken: bridgeRuntimeAuth.getAccessToken,
299 }).catch(() => {})
300 }
301 // Fire-and-forget Haiku generation with post-await guards. Re-checks /rename
302 // (sessionStorage), v1 env-lost (lastBridgeSessionId), and same-session
303 // out-of-order resolution (genSeq — count-1's Haiku resolving after count-3

Callers 3

generateAndPatchFunction · 0.85
onUserMessageFunction · 0.85
getSemverPartFunction · 0.85

Calls 2

updateBridgeSessionTitleFunction · 0.85
logForDebuggingFunction · 0.50

Tested by

no test coverage detected