MCPcopy Index your code
hub / github.com/coder/coder / clearLastTurnSummaryAsync

Method clearLastTurnSummaryAsync

coderd/x/chatd/chatd.go:9771–9785  ·  view source on GitHub ↗
(
	ctx context.Context,
	chat database.Chat,
	logger slog.Logger,
)

Source from the content-addressed store, hash-verified

9769}
9770
9771func (p *Server) clearLastTurnSummaryAsync(
9772 ctx context.Context,
9773 chat database.Chat,
9774 logger slog.Logger,
9775) {
9776 if !chat.LastTurnSummary.Valid {
9777 return
9778 }
9779 // This helper runs during processChat cleanup, while processChat is
9780 // still counted in p.inflight. Do not take inflightMu here because
9781 // drainInflight holds it while waiting.
9782 p.inflight.Go(func() {
9783 p.updateLastTurnSummary(context.WithoutCancel(ctx), chat, chat.UpdatedAt, "", logger)
9784 })
9785}
9786
9787// updateLastTurnSummary writes the cached sidebar summary for a chat.
9788// Callers should pass a detached context because this method is used for

Calls 2

updateLastTurnSummaryMethod · 0.95
GoMethod · 0.80

Tested by

no test coverage detected