MCPcopy Index your code
hub / github.com/docker/docker-agent / Summarize

Method Summarize

pkg/runtime/runtime.go:1829–1831  ·  view source on GitHub ↗

Summarize generates a summary for the session based on the conversation history. The additionalPrompt parameter allows users to provide additional instructions for the summarization (e.g., "focus on code changes" or "include action items"). Summarize is the public entry point used by user-driven /c

(ctx context.Context, sess *session.Session, additionalPrompt string, events EventSink)

Source from the content-addressed store, hash-verified

1827// Internal callers (proactive threshold, overflow recovery) use
1828// [LocalRuntime.compactWithReason] directly to forward a more specific reason.
1829func (r *LocalRuntime) Summarize(ctx context.Context, sess *session.Session, additionalPrompt string, events EventSink) {
1830 r.compactWithReason(ctx, sess, additionalPrompt, compactionReasonManual, events)
1831}
1832
1833// compactWithReason runs a session compaction with the supplied reason and
1834// emits a TokenUsageEvent so the UI immediately reflects the new context

Callers

nothing calls this directly

Calls 1

compactWithReasonMethod · 0.95

Tested by

no test coverage detected