- 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}
+ />
+
+
@@ -266,6 +328,10 @@ export const data = {
},
};
-const ellipsizeText = (text: string, maxLength = 80): string => {
- return text.length <= maxLength ? text : `${text.slice(0, maxLength - 3)}...`;
-};
+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 e7bc9283a16eb..945a9fc179537 100644
--- a/site/src/pages/TaskPage/TaskTopbar.tsx
+++ b/site/src/pages/TaskPage/TaskTopbar.tsx
@@ -5,7 +5,14 @@ import {
TooltipProvider,
TooltipTrigger,
} from "components/Tooltip/Tooltip";
-import { ArrowLeftIcon } from "lucide-react";
+import { useClipboard } from "hooks";
+import {
+ ArrowLeftIcon,
+ CheckIcon,
+ CopyIcon,
+ LaptopMinimalIcon,
+ TerminalIcon,
+} from "lucide-react";
import type { Task } from "modules/tasks/tasks";
import type { FC } from "react";
import { Link as RouterLink } from "react-router";
@@ -15,7 +22,7 @@ type TaskTopbarProps = { task: Task };
export const TaskTopbar: FC = ({ task }) => {
return (
-