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

Commit9748f25

Browse files
committed
fix: handle sidebar app not found
1 parent42dd544 commit9748f25

File tree

5 files changed

+171
-271
lines changed

5 files changed

+171
-271
lines changed

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

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,20 @@ export type WorkspaceAppWithAgent = WorkspaceApp & {
1616
};
1717

1818
exportfunctiongetTaskApps(task:Task):WorkspaceAppWithAgent[]{
19-
return(
20-
task.workspace.latest_build.resources
21-
.flatMap((r)=>r.agents??[])
22-
.flatMap((agent)=>
23-
agent.apps.map((app)=>({
24-
...app,
25-
agent,
26-
})),
27-
)
28-
// The Chat UI app will be displayed in the sidebar, so we don't want to
29-
// show it as a tab.
30-
.filter(
31-
(app)=>app.id!==task.workspace.latest_build.ai_task_sidebar_app_id,
32-
)
19+
returntask.workspace.latest_build.resources
20+
.flatMap((r)=>r.agents??[])
21+
.flatMap((agent)=>
22+
agent.apps.map((app)=>({
23+
...app,
24+
agent,
25+
})),
26+
);
27+
}
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,
3334
);
3435
}

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

Lines changed: 2 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-
getTaskApps,
15+
getTaskWebApps,
1616
typeTask,
1717
typeWorkspaceAppWithAgent,
1818
}from"modules/tasks/tasks";
@@ -28,7 +28,7 @@ type TaskAppsProps = {
2828
};
2929

3030
exportconstTaskApps:FC<TaskAppsProps>=({ task})=>{
31-
constapps=getTaskApps(task);
31+
constapps=getTaskWebApps(task);
3232
const[embeddedApps,externalApps]=splitEmbeddedAndExternalApps(apps);
3333
const[activeAppId,setActiveAppId]=useState(embeddedApps.at(0)?.id);
3434

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp