mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: improve sidebar chat loading UX in tasks (#18254)
Addresses https://github.com/coder/internal/issues/668
This commit is contained in:
@@ -40,6 +40,8 @@ export const TaskSidebar: FC<TaskSidebarProps> = ({ task }) => {
|
||||
.flatMap((r) => r.agents)
|
||||
.flatMap((a) => a?.apps)
|
||||
.find((a) => a?.slug === AI_APP_CHAT_SLUG);
|
||||
const showChatApp =
|
||||
chatApp && (chatApp.health === "disabled" || chatApp.health === "healthy");
|
||||
|
||||
return (
|
||||
<aside
|
||||
@@ -49,7 +51,7 @@ export const TaskSidebar: FC<TaskSidebarProps> = ({ task }) => {
|
||||
"border-0 border-r border-solid border-border",
|
||||
],
|
||||
// We want to make the sidebar wider for chat apps
|
||||
chatApp ? "w-[520px]" : "w-[320px]",
|
||||
showChatApp ? "w-[520px]" : "w-[320px]",
|
||||
])}
|
||||
>
|
||||
<header className="border-0 border-b border-solid border-border p-4 pt-0">
|
||||
@@ -104,7 +106,7 @@ export const TaskSidebar: FC<TaskSidebarProps> = ({ task }) => {
|
||||
)}
|
||||
</header>
|
||||
|
||||
{chatApp ? (
|
||||
{showChatApp ? (
|
||||
<TaskAppIFrame
|
||||
active
|
||||
key={chatApp.id}
|
||||
|
||||
Reference in New Issue
Block a user