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

Function mergeHookInstructions

src/services/compact/compact.ts:374–381  ·  view source on GitHub ↗
(
  userInstructions: string | undefined,
  hookInstructions: string | undefined,
)

Source from the content-addressed store, hash-verified

372 * Empty strings normalize to undefined.
373 */
374export function mergeHookInstructions(
375 userInstructions: string | undefined,
376 hookInstructions: string | undefined,
377): string | undefined {
378 if (!hookInstructions) return userInstructions || undefined
379 if (!userInstructions) return hookInstructions
380 return `${userInstructions}\n\n${hookInstructions}`
381}
382
383/**
384 * Creates a compact version of a conversation by summarizing older messages

Callers 2

compactViaReactiveFunction · 0.85
compactConversationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected