- Your task will be running in a few moments
+
+ );
+};
+
+type TaskStartingAgentProps = {
+ agent: WorkspaceAgent;
+};
-
-
+const TaskStartingAgent: FC
= ({ agent }) => {
+ const logs = useAgentLogs(agent, true);
+ const listRef = useRef(null);
-
-
-
+ useLayoutEffect(() => {
+ if (listRef.current) {
+ listRef.current.scrollToItem(logs.length - 1, "end");
+ }
+ }, [logs]);
+
+ return (
+
+
+
+
+
+
+
+
({
+ id: l.id,
+ level: l.level,
+ output: l.output,
+ sourceId: l.source_id,
+ time: l.created_at,
+ }))}
+ sources={agent.log_sources}
+ height={96 * 4}
+ width="100%"
+ ref={listRef}
+ />
+
+
@@ -265,3 +327,11 @@ export const data = {
} satisfies Task;
},
};
+
+function selectAgent(task: Task) {
+ const agents = task.workspace.latest_build.resources
+ .flatMap((r) => r.agents)
+ .filter((a) => !!a);
+
+ return agents.at(0);
+}
diff --git a/site/src/pages/TaskPage/TaskTopbar.tsx b/site/src/pages/TaskPage/TaskTopbar.tsx
index 4f51812b4712d..945a9fc179537 100644
--- a/site/src/pages/TaskPage/TaskTopbar.tsx
+++ b/site/src/pages/TaskPage/TaskTopbar.tsx
@@ -22,7 +22,7 @@ type TaskTopbarProps = { task: Task };
export const TaskTopbar: FC = ({ task }) => {
return (
-