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

Method UpdateChatLastInjectedContext

coderd/database/querier.go:1219–1219  ·  view source on GitHub ↗

Updates the cached injected context parts (AGENTS.md + skills) on the chat row. Called only when context changes (first workspace attach or agent change). updated_at is intentionally not touched to avoid reordering the chat list.

(ctx context.Context, arg UpdateChatLastInjectedContextParams)

Source from the content-addressed store, hash-verified

1217 // (first workspace attach or agent change). updated_at is
1218 // intentionally not touched to avoid reordering the chat list.
1219 UpdateChatLastInjectedContext(ctx context.Context, arg UpdateChatLastInjectedContextParams) (Chat, error)
1220 UpdateChatLastModelConfigByID(ctx context.Context, arg UpdateChatLastModelConfigByIDParams) (Chat, error)
1221 // Updates the last read message ID for a chat. This is used to track
1222 // which messages the owner has seen, enabling unread indicators.

Implementers 5

sqlQueriercoderd/database/db.go
queryMetricsStorecoderd/database/dbmetrics/querymetrics
queriercoderd/database/dbauthz/dbauthz.go
MockStorecoderd/database/dbmock/dbmock.go
MockStoreMockRecordercoderd/database/dbmock/dbmock.go

Calls

no outgoing calls