Skip to content
33 linesCodeBlameRaw
1import { Inbox } from "lucide-react";
2import { useOutletContext, useParams } from "react-router";
3
4import type { WorkspaceAgent } from "@g1t/contracts";
5
6import { MessageAgent } from "./agent";
7
8/**
9 * Every task the agent holds, as live cards. Tasks arrive with the desk
10 * (docs/WORKSPACE.md, "Tasks"); until then, the way to give it one.
11 */
12export default function Desk() {
13 const agent = useOutletContext<WorkspaceAgent>();
14 const { owner = "" } = useParams();
15 return (
16 <div className="rounded-2xl border border-dashed border-line bg-surface/40 px-6 py-16 text-center">
17 <span className="mx-auto flex size-12 items-center justify-center rounded-xl bg-raised text-muted">
18 <Inbox size={22} />
19 </span>
20 <h2 className="mt-4 text-base font-semibold">No tasks yet</h2>
21 <p className="mx-auto mt-1.5 max-w-md text-sm text-muted">
22 DM {agent.display_name} to give it one. It answers questions in the conversation and opens a task when the work needs one; each task
23 shows here with its steps, cost and what it&apos;s waiting on.
24 </p>
25 <div className="mt-6 flex justify-center">
26 <MessageAgent slug={owner} agent={agent} variant="accent" />
27 </div>
28 <p className="mt-4 text-xs text-faint">
29 Works up to {agent.capacity} {agent.capacity === 1 ? "task" : "tasks"} at once; more wait here in line.
30 </p>
31 </div>
32 );
33}