EXPERIMENTAL: this endpoint is experimental and is subject to change. @Summary Get chat diff contents @ID get-chat-diff-contents @Security CoderSessionToken @Tags Chats @Produce json @Param chat path string true "Chat ID" format(uuid) @Success 200 {object} codersdk.ChatDiffContents @Router /api/exp
(rw http.ResponseWriter, r *http.Request)
| 3760 | // |
| 3761 | //nolint:revive // HTTP handler writes to ResponseWriter. |
| 3762 | func (api *API) getChatDiffContents(rw http.ResponseWriter, r *http.Request) { |
| 3763 | ctx := r.Context() |
| 3764 | chat := httpmw.ChatParam(r) |
| 3765 | |
| 3766 | diff, err := api.resolveChatDiffContents(ctx, chat) |
| 3767 | if err != nil { |
| 3768 | httpapi.Write(ctx, rw, http.StatusInternalServerError, codersdk.Response{ |
| 3769 | Message: "Failed to get chat diff.", |
| 3770 | Detail: err.Error(), |
| 3771 | }) |
| 3772 | return |
| 3773 | } |
| 3774 | |
| 3775 | httpapi.Write(ctx, rw, http.StatusOK, diff) |
| 3776 | } |
| 3777 | |
| 3778 | // chatCreateWorkspace provides workspace creation for the chat |
| 3779 | // processor. RBAC authorization uses context-based checks via |
no test coverage detected