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

Method AIBridgeListSessions

codersdk/aibridge.go:321–332  ·  view source on GitHub ↗

AIBridgeListSessions returns AI Bridge sessions with the given filter.

(ctx context.Context, filter AIBridgeListSessionsFilter)

Source from the content-addressed store, hash-verified

319
320// AIBridgeListSessions returns AI Bridge sessions with the given filter.
321func (c *Client) AIBridgeListSessions(ctx context.Context, filter AIBridgeListSessionsFilter) (AIBridgeListSessionsResponse, error) {
322 res, err := c.Request(ctx, http.MethodGet, "/api/v2/aibridge/sessions", nil, filter.asRequestOption(), filter.Pagination.asRequestOption())
323 if err != nil {
324 return AIBridgeListSessionsResponse{}, err
325 }
326 defer res.Body.Close()
327 if res.StatusCode != http.StatusOK {
328 return AIBridgeListSessionsResponse{}, ReadBodyAsError(res)
329 }
330 var resp AIBridgeListSessionsResponse
331 return resp, json.NewDecoder(res.Body).Decode(&resp)
332}
333
334// AIBridgeGetSessionThreads returns a single session with expanded
335// thread details including agentic actions and thinking blocks.

Callers 1

TestAIBridgeListSessionsFunction · 0.80

Calls 4

RequestMethod · 0.95
ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65
asRequestOptionMethod · 0.45

Tested by 1

TestAIBridgeListSessionsFunction · 0.64