Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions desktop/src/features/agents/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export function usePersonasQuery() {
queryKey: personasQueryKey,
queryFn: listPersonas,
staleTime: 30_000,
refetchInterval: 30_000,
});
}

Expand Down Expand Up @@ -125,6 +126,7 @@ export function useRelayAgentsQuery() {
queryKey: relayAgentsQueryKey,
queryFn: listRelayAgents,
staleTime: 15_000,
refetchInterval: 15_000,
});
}

Expand Down
10 changes: 0 additions & 10 deletions desktop/src/features/agents/ui/AgentsView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,6 @@ export function AgentsView() {
void relayAgentsQuery.refetch();
}

function handleRefresh() {
void managedAgentsQuery.refetch();
void relayAgentsQuery.refetch();
void managedAgentLogQuery.refetch();
}

const isActionPending =
startMutation.isPending ||
stopMutation.isPending ||
Expand Down Expand Up @@ -341,9 +335,6 @@ export function AgentsView() {
},
});
}}
onRefresh={() => {
void personasQuery.refetch();
}}
personas={personas}
/>

Expand Down Expand Up @@ -373,7 +364,6 @@ export function AgentsView() {
onMintToken={(pubkey, name) => {
void handleMintToken(pubkey, name);
}}
onRefresh={handleRefresh}
onStart={(pubkey) => {
void handleStart(pubkey);
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ export function CreateAgentOptionToggles({
type="button"
>
<p className="text-sm font-semibold tracking-tight">Mint token</p>
<p className="mt-1 text-sm text-muted-foreground">
<p className="mt-1 text-sm text-foreground/70">
{prereqs !== null && !isMintSupported
? `Unavailable until ${prereqs.admin.command} is installed.`
: "Use `sprout-admin` to create a bearer token for this agent."}
Expand All @@ -317,7 +317,7 @@ export function CreateAgentOptionToggles({
<p className="text-sm font-semibold tracking-tight">
Start on app launch
</p>
<p className="mt-1 text-sm text-muted-foreground">
<p className="mt-1 text-sm text-foreground/70">
Reopen this local ACP harness automatically when the desktop app
starts.
</p>
Expand All @@ -339,7 +339,7 @@ export function CreateAgentOptionToggles({
<p className="text-sm font-semibold tracking-tight">
Spawn after create
</p>
<p className="mt-1 text-sm text-muted-foreground">
<p className="mt-1 text-sm text-foreground/70">
{prereqs !== null && !isSpawnSupported
? "Requires both the ACP harness and MCP server binaries."
: "Start the local ACP harness immediately after the profile is saved."}
Expand Down Expand Up @@ -392,6 +392,9 @@ export function CreateAgentTokenSection({
type="button"
>
{scope.label}
<span className="block text-xs text-foreground/60">
{scope.description}
</span>
</button>
);
})}
Expand Down
33 changes: 16 additions & 17 deletions desktop/src/features/agents/ui/ManagedAgentsSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
Play,
Plus,
Power,
RefreshCcw,
Square,
Trash2,
UserPlus,
Expand All @@ -23,6 +22,7 @@ import {
DropdownMenuTrigger,
} from "@/shared/ui/dropdown-menu";
import { Skeleton } from "@/shared/ui/skeleton";
import { Tooltip, TooltipContent, TooltipTrigger } from "@/shared/ui/tooltip";
import { ModelPicker } from "./ModelPicker";
import { truncatePubkey } from "./agentUi";

Expand All @@ -38,7 +38,6 @@ export function ManagedAgentsSection({
onCreate,
onDelete,
onMintToken,
onRefresh,
onStart,
onStop,
onToggleStartOnAppLaunch,
Expand All @@ -55,7 +54,6 @@ export function ManagedAgentsSection({
onCreate: () => void;
onDelete: (pubkey: string) => void;
onMintToken: (pubkey: string, name: string) => void;
onRefresh: () => void;
onStart: (pubkey: string) => void;
onStop: (pubkey: string) => void;
onToggleStartOnAppLaunch: (pubkey: string, startOnAppLaunch: boolean) => void;
Expand All @@ -72,16 +70,20 @@ export function ManagedAgentsSection({
Saved agent profiles and local ACP process state.
</p>
</div>
<div className="flex flex-wrap gap-2">
<Button onClick={onCreate} type="button">
<Plus className="h-4 w-4" />
Create agent
</Button>
<Button onClick={onRefresh} type="button" variant="outline">
<RefreshCcw className="h-4 w-4" />
Refresh
</Button>
</div>
<Tooltip>
<TooltipTrigger asChild>
<Button
aria-label="Create agent"
onClick={onCreate}
type="button"
variant="ghost"
size="icon"
>
<Plus className="h-4 w-4" />
</Button>
</TooltipTrigger>
<TooltipContent>Create agent</TooltipContent>
</Tooltip>
</div>

{isLoading ? (
Expand Down Expand Up @@ -138,7 +140,6 @@ export function ManagedAgentsSection({
onAddToChannel={onAddToChannel}
onDelete={onDelete}
onMintToken={onMintToken}
onModelChanged={onRefresh}
onStart={onStart}
onStop={onStop}
onToggleStartOnAppLaunch={onToggleStartOnAppLaunch}
Expand Down Expand Up @@ -179,7 +180,6 @@ function ManagedAgentRow({
onAddToChannel,
onDelete,
onMintToken,
onModelChanged,
onStart,
onStop,
onToggleStartOnAppLaunch,
Expand All @@ -191,7 +191,6 @@ function ManagedAgentRow({
onAddToChannel: (agent: ManagedAgent) => void;
onDelete: (pubkey: string) => void;
onMintToken: (pubkey: string, name: string) => void;
onModelChanged?: () => void;
onStart: (pubkey: string) => void;
onStop: (pubkey: string) => void;
onToggleStartOnAppLaunch: (pubkey: string, startOnAppLaunch: boolean) => void;
Expand Down Expand Up @@ -233,7 +232,7 @@ function ManagedAgentRow({
</span>
</td>
<td className="px-4 py-3">
<ModelPicker agent={agent} onModelChanged={onModelChanged} />
<ModelPicker agent={agent} />
</td>
<td className="px-4 py-3 text-muted-foreground">{agent.agentCommand}</td>
<td className="px-3 py-3">
Expand Down
Loading
Loading