Skip to content

Commit 8a70b8d

Browse files
authored
chore: select the first workspace app to be active in tasks (#18256)
Same as #18239, but only the necessary code
1 parent 60595f3 commit 8a70b8d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

site/src/pages/TaskPage/TaskApps.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ export const TaskApps: FC<TaskAppsProps> = ({ task }) => {
3333
.filter((a) => !!a && a.slug !== AI_APP_CHAT_SLUG);
3434

3535
const [activeAppId, setActiveAppId] = useState<string>(() => {
36-
const appId = task.workspace.latest_app_status?.app_id;
36+
const appId = apps[0]?.id;
3737
if (!appId) {
38-
throw new Error("No active app found in task");
38+
throw new Error("No apps found in task");
3939
}
4040
return appId;
4141
});

0 commit comments

Comments
 (0)