MCPcopy
hub / github.com/opentrace/opentrace / TemplateStrategy

Class TemplateStrategy

ui/src/runner/browser/enricher/summarizer/strategy.ts:69–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67// ---------------------------------------------------------------------------
68
69class TemplateStrategy implements SummarizationStrategy {
70 readonly type = 'template' as const;
71
72 async init(): Promise<void> {
73 // Templates are instant — nothing to load
74 }
75
76 async summarize(meta: SymbolMetadata): Promise<string> {
77 return summarizeFromMetadata(meta);
78 }
79
80 async summarizeBatch(items: SymbolMetadata[]): Promise<string[]> {
81 return items.map(summarizeFromMetadata);
82 }
83
84 async dispose(): Promise<void> {}
85}
86
87// ---------------------------------------------------------------------------
88// ML strategy — wraps FlanT5Summarizer under the new interface

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected