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

Method ListAIBridgeSessions

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

Returns paginated sessions with aggregated metadata, token counts, and the most recent user prompt. A "session" is a logical grouping of interceptions that share the same session_id (set by the client). Pagination-first strategy: identify the page of sessions cheaply via a single GROUP BY scan, the

(ctx context.Context, arg ListAIBridgeSessionsParams)

Source from the content-addressed store, hash-verified

1054 // single GROUP BY scan, then do expensive lateral joins (tokens, prompts,
1055 // first-interception metadata) only for the ~page-size result set.
1056 ListAIBridgeSessions(ctx context.Context, arg ListAIBridgeSessionsParams) ([]ListAIBridgeSessionsRow, error)
1057 ListAIBridgeTokenUsagesByInterceptionIDs(ctx context.Context, interceptionIds []uuid.UUID) ([]AIBridgeTokenUsage, error)
1058 ListAIBridgeToolUsagesByInterceptionIDs(ctx context.Context, interceptionIds []uuid.UUID) ([]AIBridgeToolUsage, error)
1059 ListAIBridgeUserPromptsByInterceptionIDs(ctx context.Context, interceptionIds []uuid.UUID) ([]AIBridgeUserPrompt, error)

Callers 3

ListAIBridgeSessionsMethod · 0.65
aiBridgeListSessionsMethod · 0.65

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

Tested by

no test coverage detected