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

Method UpdateChatDesktopEnabled

codersdk/chats.go:2544–2554  ·  view source on GitHub ↗

UpdateChatDesktopEnabled updates the deployment-wide desktop setting.

(ctx context.Context, req UpdateChatDesktopEnabledRequest)

Source from the content-addressed store, hash-verified

2542
2543// UpdateChatDesktopEnabled updates the deployment-wide desktop setting.
2544func (c *ExperimentalClient) UpdateChatDesktopEnabled(ctx context.Context, req UpdateChatDesktopEnabledRequest) error {
2545 res, err := c.Request(ctx, http.MethodPut, "/api/experimental/chats/config/desktop-enabled", req)
2546 if err != nil {
2547 return err
2548 }
2549 defer res.Body.Close()
2550 if res.StatusCode != http.StatusNoContent {
2551 return ReadBodyAsError(res)
2552 }
2553 return nil
2554}
2555
2556// GetChatAdvisorConfig returns the deployment-wide advisor configuration.
2557func (c *ExperimentalClient) GetChatAdvisorConfig(ctx context.Context) (AdvisorConfig, error) {

Callers 1

TestChatDesktopEnabledFunction · 0.95

Calls 3

ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65
RequestMethod · 0.45

Tested by 1

TestChatDesktopEnabledFunction · 0.76