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

Function createSummary

src/utils/collapseHookSummaries.test.ts:4–17  ·  view source on GitHub ↗
(overrides: Partial<Record<string, unknown>> = {})

Source from the content-addressed store, hash-verified

2import { collapseHookSummaries } from './collapseHookSummaries.js'
3
4function createSummary(overrides: Partial<Record<string, unknown>> = {}) {
5 return {
6 type: 'system',
7 subtype: 'stop_hook_summary',
8 hookLabel: 'PostToolUse',
9 hookCount: 1,
10 hookInfos: ['info-a'],
11 hookErrors: [] as string[],
12 preventedContinuation: false,
13 hasOutput: false,
14 totalDurationMs: 12,
15 ...overrides,
16 }
17}
18
19describe('collapseHookSummaries', () => {
20 it('collapses consecutive labeled summaries with the same hook label', () => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected