Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: complete Tasks GA promotion (docs, site)#20927

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mafredri merged 2 commits intomainfromupdate-coder-tasks-docs-ga
Nov 25, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletionscoderd/aitasks.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -35,7 +35,7 @@ import (
// @Security CoderSessionToken
// @Accept json
// @Produce json
// @TagsExperimental
// @TagsTasks
// @Param user path string true "Username, user ID, or 'me' for the authenticated user"
// @Param request body codersdk.CreateTaskRequest true "Create task request"
// @Success 201 {object} codersdk.Task
Expand DownExpand Up@@ -401,7 +401,7 @@ func deriveTaskCurrentState(
// @ID list-ai-tasks
// @Security CoderSessionToken
// @Produce json
// @TagsExperimental
// @TagsTasks
// @Param q query string false "Search query for filtering tasks. Supports: owner:<username/uuid/me>, organization:<org-name/uuid>, status:<status>"
// @Success 200 {object} codersdk.TasksListResponse
// @Router /tasks [get]
Expand DownExpand Up@@ -501,7 +501,7 @@ func (api *API) convertTasks(ctx context.Context, requesterID uuid.UUID, dbTasks
// @ID get-ai-task-by-id-or-name
// @Security CoderSessionToken
// @Produce json
// @TagsExperimental
// @TagsTasks
// @Param user path string true "Username, user ID, or 'me' for the authenticated user"
// @Param task path string true "Task ID, or task name"
// @Success 200 {object} codersdk.Task
Expand DownExpand Up@@ -573,7 +573,7 @@ func (api *API) taskGet(rw http.ResponseWriter, r *http.Request) {
// @Summary Delete AI task
// @ID delete-ai-task
// @Security CoderSessionToken
// @TagsExperimental
// @TagsTasks
// @Param user path string true "Username, user ID, or 'me' for the authenticated user"
// @Param task path string true "Task ID, or task name"
// @Success 202
Expand DownExpand Up@@ -642,7 +642,7 @@ func (api *API) taskDelete(rw http.ResponseWriter, r *http.Request) {
// @ID update-ai-task-input
// @Security CoderSessionToken
// @Accept json
// @TagsExperimental
// @TagsTasks
// @Param user path string true "Username, user ID, or 'me' for the authenticated user"
// @Param task path string true "Task ID, or task name"
// @Param request body codersdk.UpdateTaskInputRequest true "Update task input request"
Expand DownExpand Up@@ -722,7 +722,7 @@ func (api *API) taskUpdateInput(rw http.ResponseWriter, r *http.Request) {
// @ID send-input-to-ai-task
// @Security CoderSessionToken
// @Accept json
// @TagsExperimental
// @TagsTasks
// @Param user path string true "Username, user ID, or 'me' for the authenticated user"
// @Param task path string true "Task ID, or task name"
// @Param request body codersdk.TaskSendRequest true "Task input request"
Expand DownExpand Up@@ -791,7 +791,7 @@ func (api *API) taskSend(rw http.ResponseWriter, r *http.Request) {
// @ID get-ai-task-logs
// @Security CoderSessionToken
// @Produce json
// @TagsExperimental
// @TagsTasks
// @Param user path string true "Username, user ID, or 'me' for the authenticated user"
// @Param task path string true "Task ID, or task name"
// @Success 200 {object} codersdk.TaskLogsResponse
Expand Down
14 changes: 7 additions & 7 deletionscoderd/apidoc/docs.go
View file
Open in desktop

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.

14 changes: 7 additions & 7 deletionscoderd/apidoc/swagger.json
View file
Open in desktop

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.

8 changes: 4 additions & 4 deletionsdocs/manifest.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1166,10 +1166,6 @@
"title": "Enterprise",
"path": "./reference/api/enterprise.md"
},
{
"title": "Experimental",
"path": "./reference/api/experimental.md"
},
{
"title": "Files",
"path": "./reference/api/files.md"
Expand DownExpand Up@@ -1214,6 +1210,10 @@
"title": "Schemas",
"path": "./reference/api/schemas.md"
},
{
"title": "Tasks",
"path": "./reference/api/tasks.md"
},
{
"title": "Templates",
"path": "./reference/api/templates.md"
Expand Down
View file
Open in desktop

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.

32 changes: 16 additions & 16 deletionssite/src/api/api.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2644,22 +2644,6 @@ class ApiMethods {
markAllInboxNotificationsAsRead = async () => {
await this.axios.put<void>("/api/v2/notifications/inbox/mark-all-as-read");
};
}

// Experimental API methods call endpoints under the /api/experimental/ prefix.
// These endpoints are not stable and may change or be removed at any time.
//
// All methods must be defined with arrow function syntax. See the docstring
// above the ApiMethods class for a full explanation.

export type TaskFeedbackRating = "good" | "okay" | "bad";

export type CreateTaskFeedbackRequest = {
rate: TaskFeedbackRating;
comment?: string;
};
class ExperimentalApiMethods {
constructor(protected readonly axios: AxiosInstance) {}

createTask = async (
user: string,
Expand DownExpand Up@@ -2716,6 +2700,22 @@ class ExperimentalApiMethods {
setTimeout(() => res(), 500);
});
};
}

export type TaskFeedbackRating = "good" | "okay" | "bad";

export type CreateTaskFeedbackRequest = {
rate: TaskFeedbackRating;
comment?: string;
};

// Experimental API methods call endpoints under the /api/experimental/ prefix.
// These endpoints are not stable and may change or be removed at any time.
//
// All methods must be defined with arrow function syntax. See the docstring
// above the ApiMethods class for a full explanation.
class ExperimentalApiMethods {
constructor(protected readonly axios: AxiosInstance) {}

getAIBridgeInterceptions = async (options: SearchParamOptions) => {
const url = getURLWithSearchParams(
Expand Down
2 changes: 1 addition & 1 deletionsite/src/modules/dashboard/Navbar/NavbarView.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -207,7 +207,7 @@ const TasksNavItem: FC<TasksNavItemProps> = ({ user }) => {
};
const { data: idleCount } = useQuery({
queryKey: ["tasks", filter],
queryFn: () => API.experimental.getTasks(filter),
queryFn: () => API.getTasks(filter),
refetchInterval: 1_000 * 60,
enabled: canSeeTasks,
refetchOnWindowFocus: true,
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -27,7 +27,7 @@ export const DeleteTaskSuccess: Story = {
},
},
beforeEach: () => {
spyOn(API.experimental, "deleteTask").mockResolvedValue();
spyOn(API, "deleteTask").mockResolvedValue();
},
play: async ({ canvasElement, step }) => {
const body = within(canvasElement.ownerDocument.body);
Expand All@@ -39,7 +39,7 @@ export const DeleteTaskSuccess: Story = {
await userEvent.click(confirmButton);
await step("Confirm delete", async () => {
await waitFor(() => {
expect(API.experimental.deleteTask).toHaveBeenCalledWith(
expect(API.deleteTask).toHaveBeenCalledWith(
MockTask.owner_name,
MockTask.id,
);
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,7 +20,7 @@ export const TaskDeleteDialog: FC<TaskDeleteDialogProps> = ({
}) => {
const queryClient = new QueryClient();
const deleteTaskMutation = useMutation({
mutationFn: () => API.experimental.deleteTask(task.owner_name, task.id),
mutationFn: () => API.deleteTask(task.owner_name, task.id),
onSuccess: async () => {
await queryClient.invalidateQueries({ queryKey: ["tasks"] });
},
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -21,7 +21,7 @@ export const Idle: Story = {};

export const Submitting: Story = {
beforeEach: async () => {
spyOn(API.experimental, "createTaskFeedback").mockImplementation(() => {
spyOn(API, "createTaskFeedback").mockImplementation(() => {
return new Promise(() => {});
});
},
Expand DownExpand Up@@ -53,7 +53,7 @@ export const Success: Story = {
},
decorators: [withGlobalSnackbar],
beforeEach: async () => {
spyOn(API.experimental, "createTaskFeedback").mockResolvedValue();
spyOn(API, "createTaskFeedback").mockResolvedValue();
},
play: async ({ canvasElement, step }) => {
const body = within(canvasElement.ownerDocument.body);
Expand All@@ -77,20 +77,17 @@ export const Success: Story = {

step("submitted successfully", async () => {
await body.findByText("Feedback submitted successfully");
expect(API.experimental.createTaskFeedback).toHaveBeenCalledWith(
MockTask.id,
{
rate: "regular",
comment: "This is my comment",
},
);
expect(API.createTaskFeedback).toHaveBeenCalledWith(MockTask.id, {
rate: "regular",
comment: "This is my comment",
});
});
},
};

export const Failure: Story = {
beforeEach: async () => {
spyOn(API.experimental, "createTaskFeedback").mockRejectedValue(
spyOn(API, "createTaskFeedback").mockRejectedValue(
mockApiError({
message: "Failed to submit feedback",
detail: "Server is down",
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -42,7 +42,7 @@ export const TaskFeedbackDialog: FC<TaskFeedbackDialogProps> = ({
isPending,
} = useMutation({
mutationFn: (req: CreateTaskFeedbackRequest) =>
API.experimental.createTaskFeedback(taskId, req),
API.createTaskFeedback(taskId, req),
onSuccess: () => {
displaySuccess("Feedback submitted successfully");
},
Expand Down
Loading
Loading

[8]ページ先頭

©2009-2025 Movatter.jp