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

Commit984e5cc

Browse files
committed
handle unhealthy
1 parent735586d commit984e5cc

File tree

3 files changed

+9
-17
lines changed

3 files changed

+9
-17
lines changed

‎site/src/modules/tasks/tasks.ts‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,3 @@ export function getTaskApps(task: Task): WorkspaceAppWithAgent[] {
2525
})),
2626
);
2727
}
28-
29-
exportfunctiongetTaskWebApps(task:Task):WorkspaceAppWithAgent[]{
30-
// The Chat UI app will be displayed in the sidebar, so we don't want to
31-
// show it as a web app.
32-
returngetTaskApps(task).filter(
33-
(app)=>app.id!==task.workspace.latest_build.ai_task_sidebar_app_id,
34-
);
35-
}

‎site/src/pages/TaskPage/TaskApps.tsx‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { ScrollArea, ScrollBar } from "components/ScrollArea/ScrollArea";
1212
import{ChevronDownIcon,LayoutGridIcon}from"lucide-react";
1313
import{useAppLink}from"modules/apps/useAppLink";
1414
import{
15-
getTaskWebApps,
15+
getTaskApps,
1616
typeTask,
1717
typeWorkspaceAppWithAgent,
1818
}from"modules/tasks/tasks";
@@ -28,7 +28,11 @@ type TaskAppsProps = {
2828
};
2929

3030
exportconstTaskApps:FC<TaskAppsProps>=({ task})=>{
31-
constapps=getTaskWebApps(task);
31+
constapps=getTaskApps(task).filter(
32+
// The Chat UI app will be displayed in the sidebar, so we don't want to
33+
// show it as a web app.
34+
(app)=>app.id!==task.workspace.latest_build.ai_task_sidebar_app_id,
35+
);
3236
const[embeddedApps,externalApps]=splitEmbeddedAndExternalApps(apps);
3337
const[activeAppId,setActiveAppId]=useState(embeddedApps.at(0)?.id);
3438

‎site/src/pages/TaskPage/TaskPage.tsx‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,9 @@ const TaskPage = () => {
130130
}elseif(agent&&["created","starting"].includes(agent.lifecycle_state)){
131131
content=<TaskStartingAgentagent={agent}/>;
132132
}else{
133-
constchatApp=selectChatApp(task);
133+
constchatApp=getTaskApps(task).find(
134+
(app)=>app.id===task.workspace.latest_build.ai_task_sidebar_app_id,
135+
);
134136
content=(
135137
<PanelGroupautoSaveId="task"direction="horizontal">
136138
<PaneldefaultSize={25}minSize={20}>
@@ -405,9 +407,3 @@ function selectAgent(task: Task) {
405407

406408
returnagents.at(0);
407409
}
408-
409-
functionselectChatApp(task:Task){
410-
returngetTaskApps(task).find(
411-
(app)=>app.id===task.workspace.latest_build.ai_task_sidebar_app_id,
412-
);
413-
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp