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

Method UpdateChat

codersdk/chats.go:3165–3175  ·  view source on GitHub ↗

UpdateChat patches a chat resource.

(ctx context.Context, chatID uuid.UUID, req UpdateChatRequest)

Source from the content-addressed store, hash-verified

3163
3164// UpdateChat patches a chat resource.
3165func (c *ExperimentalClient) UpdateChat(ctx context.Context, chatID uuid.UUID, req UpdateChatRequest) error {
3166 res, err := c.Request(ctx, http.MethodPatch, fmt.Sprintf("/api/experimental/chats/%s", chatID), req)
3167 if err != nil {
3168 return err
3169 }
3170 defer res.Body.Close()
3171 if res.StatusCode != http.StatusNoContent {
3172 return ReadBodyAsError(res)
3173 }
3174 return nil
3175}
3176
3177// CreateChatMessage adds a message to a chat.
3178func (c *ExperimentalClient) CreateChatMessage(ctx context.Context, chatID uuid.UUID, req CreateChatMessageRequest) (CreateChatMessageResponse, error) {

Callers 4

TestListChatsFunction · 0.95
TestWatchChatsFunction · 0.95
TestPatchChatFunction · 0.95

Calls 3

ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65
RequestMethod · 0.45

Tested by 4

TestListChatsFunction · 0.76
TestWatchChatsFunction · 0.76
TestPatchChatFunction · 0.76