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

Method GetChatDebugRetentionDays

codersdk/chats.go:2667–2678  ·  view source on GitHub ↗

GetChatDebugRetentionDays returns the configured chat debug run retention period.

(ctx context.Context)

Source from the content-addressed store, hash-verified

2665// GetChatDebugRetentionDays returns the configured chat debug run
2666// retention period.
2667func (c *ExperimentalClient) GetChatDebugRetentionDays(ctx context.Context) (ChatDebugRetentionDaysResponse, error) {
2668 res, err := c.Request(ctx, http.MethodGet, "/api/experimental/chats/config/debug-retention-days", nil)
2669 if err != nil {
2670 return ChatDebugRetentionDaysResponse{}, err
2671 }
2672 defer res.Body.Close()
2673 if res.StatusCode != http.StatusOK {
2674 return ChatDebugRetentionDaysResponse{}, ReadBodyAsError(res)
2675 }
2676 var resp ChatDebugRetentionDaysResponse
2677 return resp, json.NewDecoder(res.Body).Decode(&resp)
2678}
2679
2680// UpdateChatDebugRetentionDays updates the chat debug run retention period.
2681func (c *ExperimentalClient) UpdateChatDebugRetentionDays(ctx context.Context, req UpdateChatDebugRetentionDaysRequest) error {

Callers 1

Calls 3

ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65
RequestMethod · 0.45

Tested by 1