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

Method GetUserChatDebugLogging

codersdk/chats.go:2989–3000  ·  view source on GitHub ↗

GetUserChatDebugLogging returns whether chat debug logging is active for the current user and whether the user may change it.

(ctx context.Context)

Source from the content-addressed store, hash-verified

2987// GetUserChatDebugLogging returns whether chat debug logging is active
2988// for the current user and whether the user may change it.
2989func (c *ExperimentalClient) GetUserChatDebugLogging(ctx context.Context) (UserChatDebugLoggingSettings, error) {
2990 res, err := c.Request(ctx, http.MethodGet, "/api/experimental/chats/config/user-debug-logging", nil)
2991 if err != nil {
2992 return UserChatDebugLoggingSettings{}, err
2993 }
2994 defer res.Body.Close()
2995 if res.StatusCode != http.StatusOK {
2996 return UserChatDebugLoggingSettings{}, ReadBodyAsError(res)
2997 }
2998 var resp UserChatDebugLoggingSettings
2999 return resp, json.NewDecoder(res.Body).Decode(&resp)
3000}
3001
3002// UpdateUserChatDebugLogging updates the current user's chat debug
3003// logging preference.

Callers 1

Calls 3

ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65
RequestMethod · 0.45

Tested by 1