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

Commitd77c3d0

Browse files
feat: filter tasks that are waiting for user input (#19377)
Closes#19324<img width="1624" height="974" alt="Screenshot 2025-08-15 at 14 45 39"src="https://github.com/user-attachments/assets/a738d9af-f548-413b-a0e7-3f311cb997ee"/>---------Co-authored-by: ケイラ <mckayla@hey.com>
1 parent014a2d5 commitd77c3d0

File tree

9 files changed

+889
-797
lines changed

9 files changed

+889
-797
lines changed

‎.vscode/settings.json‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,5 @@
6060
"typos.config":".github/workflows/typos.toml",
6161
"[markdown]": {
6262
"editor.defaultFormatter":"DavidAnson.vscode-markdownlint"
63-
},
64-
"biome.configurationPath":"./site/biome.jsonc",
65-
"biome.lsp.bin":"./site/node_modules/.bin/biome"
63+
}
6664
}

‎site/src/api/api.ts‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
*/
2222
importglobalAxios,{typeAxiosInstance,isAxiosError}from"axios";
2323
importtypedayjsfrom"dayjs";
24+
importtype{Task}from"modules/tasks/tasks";
2425
importuserAgentParserfrom"ua-parser-js";
2526
import{delay}from"../utils/delay";
2627
import{OneWayWebSocket}from"../utils/OneWayWebSocket";
@@ -422,6 +423,10 @@ export type GetProvisionerDaemonsParams = {
422423
limit?:number;
423424
};
424425

426+
exporttypeTasksFilter={
427+
username?:string;
428+
};
429+
425430
/**
426431
* This is the container for all API methods. It's split off to make it more
427432
* clear where API methods should go, but it is eventually merged into the Api
@@ -2687,6 +2692,26 @@ class ExperimentalApiMethods {
26872692

26882693
returnresponse.data;
26892694
};
2695+
2696+
getTasks=async(filter:TasksFilter):Promise<Task[]>=>{
2697+
constqueryExpressions=["has-ai-task:true"];
2698+
2699+
if(filter.username){
2700+
queryExpressions.push(`owner:${filter.username}`);
2701+
}
2702+
2703+
constworkspaces=awaitAPI.getWorkspaces({
2704+
q:queryExpressions.join(" "),
2705+
});
2706+
constprompts=awaitAPI.experimental.getAITasksPrompts(
2707+
workspaces.workspaces.map((workspace)=>workspace.latest_build.id),
2708+
);
2709+
2710+
returnworkspaces.workspaces.map((workspace)=>({
2711+
workspace,
2712+
prompt:prompts.prompts[workspace.latest_build.id],
2713+
}));
2714+
};
26902715
}
26912716

26922717
// This is a hard coded CSRF token/cookie pair for local development. In prod,

‎site/src/components/Badge/Badge.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const badgeVariants = cva(
2424
"border border-solid border-border-destructive bg-surface-red text-highlight-red shadow",
2525
green:
2626
"border border-solid border-surface-green bg-surface-green text-highlight-green shadow",
27+
info:"border border-solid border-surface-sky bg-surface-sky text-highlight-sky shadow",
2728
},
2829
size:{
2930
xs:"text-2xs font-regular h-5 [&_svg]:hidden rounded px-1.5",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp