MCPcopy
hub / github.com/opentrace/opentrace / Summarizer

Interface Summarizer

ui/src/components/pipeline/summarizer/types.ts:65–91  ·  ui/src/components/pipeline/summarizer/types.ts::Summarizer

Source from the content-addressed store, hash-verified

63};
64
65export interface Summarizer {
66 /** Load the model into memory. Must be called before summarize(). */
67 init(): Promise<void>;
68
69 /**
70 * Generate a one-sentence summary for a code snippet.
71 *
72 * @param source - The source code to summarize (will be truncated internally).
73 * @param kind - What kind of code entity this is (function, class, file).
74 * @returns The generated summary string.
75 */
76 summarize(source: string, kind: NodeKind): Promise<string>;
77
78 /**
79 * Summarize multiple items in a single batched forward pass.
80 * Much faster than calling summarize() in a loop.
81 *
82 * @param items - Array of {source, kind} pairs to summarize.
83 * @returns Array of summary strings (same order as input).
84 */
85 summarizeBatch(
86 items: Array<{ source: string; kind: NodeKind }>,
87 ): Promise<string[]>;
88
89 /** Release model resources. */
90 dispose(): Promise<void>;
91}

Callers 6

_initMethod · 0.65
initTreeSitterFunction · 0.65
disposeLadybugStoreFunction · 0.65
dispatchFunction · 0.65

Implementers 6

TemplateSummarizerui/src/components/pipeline/summarizer/
FlanT5Summarizerui/src/runner/browser/enricher/summari
TemplateStrategyui/src/runner/browser/enricher/summari
MlStrategyui/src/runner/browser/enricher/summari
LlmStrategyui/src/runner/browser/enricher/summari
NoopStrategyui/src/runner/browser/enricher/summari

Calls

no outgoing calls

Tested by

no test coverage detected