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

Method getChatComputerUseProvider

coderd/exp_chats.go:5113–5126  ·  view source on GitHub ↗

EXPERIMENTAL: this endpoint is experimental and is subject to change. nolint:revive // get-return: revive assumes get* must be a getter, but this is an HTTP handler.

(rw http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

5111//
5112//nolint:revive // get-return: revive assumes get* must be a getter, but this is an HTTP handler.
5113func (api *API) getChatComputerUseProvider(rw http.ResponseWriter, r *http.Request) {
5114 ctx := r.Context()
5115 provider, err := api.Database.GetChatComputerUseProvider(ctx)
5116 if err != nil {
5117 httpapi.Write(ctx, rw, http.StatusInternalServerError, codersdk.Response{
5118 Message: "Internal error fetching computer use provider.",
5119 Detail: err.Error(),
5120 })
5121 return
5122 }
5123 httpapi.Write(ctx, rw, http.StatusOK, codersdk.ChatComputerUseProviderResponse{
5124 Provider: chattool.DefaultComputerUseProvider(provider),
5125 })
5126}
5127
5128// EXPERIMENTAL: this endpoint is experimental and is subject to change.
5129func (api *API) putChatComputerUseProvider(rw http.ResponseWriter, r *http.Request) {

Callers 1

chatComputerUseProviderFunction · 0.80

Calls 5

WriteFunction · 0.92
ContextMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected