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

Method TaskSend

codersdk/aitasks.go:302–312  ·  view source on GitHub ↗

TaskSend submits task input to the tasks sidebar app.

(ctx context.Context, user string, id uuid.UUID, req TaskSendRequest)

Source from the content-addressed store, hash-verified

300
301// TaskSend submits task input to the tasks sidebar app.
302func (c *Client) TaskSend(ctx context.Context, user string, id uuid.UUID, req TaskSendRequest) error {
303 res, err := c.Request(ctx, http.MethodPost, fmt.Sprintf("/api/v2/tasks/%s/%s/send", user, id.String()), req)
304 if err != nil {
305 return err
306 }
307 defer res.Body.Close()
308 if res.StatusCode != http.StatusNoContent {
309 return ReadBodyAsError(res)
310 }
311 return nil
312}
313
314// UpdateTaskInputRequest is used to update a task's input.
315type UpdateTaskInputRequest struct {

Callers 3

TestTasksFunction · 0.80
toolsdk.goFile · 0.80
taskSendMethod · 0.80

Calls 4

RequestMethod · 0.95
ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65
StringMethod · 0.45

Tested by 1

TestTasksFunction · 0.64