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

Method UpdateChatWorkspaceTTL

codersdk/chats.go:2626–2636  ·  view source on GitHub ↗

UpdateChatWorkspaceTTL updates the chat workspace TTL setting.

(ctx context.Context, req UpdateChatWorkspaceTTLRequest)

Source from the content-addressed store, hash-verified

2624
2625// UpdateChatWorkspaceTTL updates the chat workspace TTL setting.
2626func (c *ExperimentalClient) UpdateChatWorkspaceTTL(ctx context.Context, req UpdateChatWorkspaceTTLRequest) error {
2627 res, err := c.Request(ctx, http.MethodPut, "/api/experimental/chats/config/workspace-ttl", req)
2628 if err != nil {
2629 return err
2630 }
2631 defer res.Body.Close()
2632 if res.StatusCode != http.StatusNoContent {
2633 return ReadBodyAsError(res)
2634 }
2635 return nil
2636}
2637
2638// GetChatRetentionDays returns the configured chat retention period.
2639func (c *ExperimentalClient) GetChatRetentionDays(ctx context.Context) (ChatRetentionDaysResponse, error) {

Callers 1

TestChatWorkspaceTTLFunction · 0.95

Calls 3

ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65
RequestMethod · 0.45

Tested by 1

TestChatWorkspaceTTLFunction · 0.76