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: handle chat app not found#19947

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
BrunoQuaresma merged 11 commits intomainfrombq/fix-show-error-when-chat-unhelathy
Sep 26, 2025
Merged
Show file tree
Hide file tree
Changes from1 commit
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
PrevPrevious commit
NextNext commit
handle unhealthy
  • Loading branch information
@BrunoQuaresma
BrunoQuaresma committedSep 25, 2025
commit984e5cc67b46fead063efeef48a3ddd1646fad3c

Some comments aren't visible on the classic Files Changed page.

8 changes: 0 additions & 8 deletionssite/src/modules/tasks/tasks.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -25,11 +25,3 @@ export function getTaskApps(task: Task): WorkspaceAppWithAgent[] {
})),
);
}

export function getTaskWebApps(task: Task): WorkspaceAppWithAgent[] {
// The Chat UI app will be displayed in the sidebar, so we don't want to
// show it as a web app.
return getTaskApps(task).filter(
(app) => app.id !== task.workspace.latest_build.ai_task_sidebar_app_id,
);
}
8 changes: 6 additions & 2 deletionssite/src/pages/TaskPage/TaskApps.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,7 +12,7 @@ import { ScrollArea, ScrollBar } from "components/ScrollArea/ScrollArea";
import { ChevronDownIcon, LayoutGridIcon } from "lucide-react";
import { useAppLink } from "modules/apps/useAppLink";
import {
getTaskWebApps,
getTaskApps,
type Task,
type WorkspaceAppWithAgent,
} from "modules/tasks/tasks";
Expand All@@ -28,7 +28,11 @@ type TaskAppsProps = {
};

export const TaskApps: FC<TaskAppsProps> = ({ task }) => {
const apps = getTaskWebApps(task);
const apps = getTaskApps(task).filter(
// The Chat UI app will be displayed in the sidebar, so we don't want to
// show it as a web app.
(app) => app.id !== task.workspace.latest_build.ai_task_sidebar_app_id,
);
Comment on lines 31 to 37
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I think agetTaskApp helper could still be nice here

Copy link
CollaboratorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Not sure if I understood—getTaskApps is already being used 🤔

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

sorry, I meantgetChatApp

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

and you're right, it's doing the opposite here 🤦‍♀️

const [embeddedApps, externalApps] = splitEmbeddedAndExternalApps(apps);
const [activeAppId, setActiveAppId] = useState(embeddedApps.at(0)?.id);

Expand Down
10 changes: 3 additions & 7 deletionssite/src/pages/TaskPage/TaskPage.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -130,7 +130,9 @@ const TaskPage = () => {
} else if (agent && ["created", "starting"].includes(agent.lifecycle_state)) {
content = <TaskStartingAgent agent={agent} />;
} else {
const chatApp = selectChatApp(task);
const chatApp = getTaskApps(task).find(
(app) => app.id === task.workspace.latest_build.ai_task_sidebar_app_id,
);
Comment on lines +149 to +151
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

...and could be used here as well

Copy link
CollaboratorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

They’re quite different:

  • The first removes the chat app from the apps list.
  • The second fetches the chat app.

The only common part is accessingai_task_sidebar_app_id, so a helper could be:

functiongetChatAppId(task:Task){returntask.workspace.latest_build.ai_task_sidebar_app_id;}

That said, I don’t see much value in adding this helper right now—what do you think?

content = (
<PanelGroup autoSaveId="task" direction="horizontal">
<Panel defaultSize={25} minSize={20}>
Expand DownExpand Up@@ -405,9 +407,3 @@ function selectAgent(task: Task) {

return agents.at(0);
}

function selectChatApp(task: Task) {
return getTaskApps(task).find(
(app) => app.id === task.workspace.latest_build.ai_task_sidebar_app_id,
);
}

[8]ページ先頭

©2009-2025 Movatter.jp