mirror of
https://github.com/block/buzz.git
synced 2026-11-08 02:11:36 +00:00
feat(desktop): add a Discover button to the Agents page header
The agent catalog was only reachable through the New agent card's dropdown; give discovery a first-class entry point next to the other page actions (and in the compact overflow menu). Signed-off-by: Thomas Petersen <thomasp@squareup.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import * as React from "react";
|
||||
import { EllipsisVertical, OctagonX, Settings2 } from "lucide-react";
|
||||
import { Compass, EllipsisVertical, OctagonX, Settings2 } from "lucide-react";
|
||||
import {
|
||||
consumePendingSnapshotImport,
|
||||
subscribeSnapshotImport,
|
||||
@@ -141,6 +141,16 @@ export function AgentsView() {
|
||||
action={
|
||||
<>
|
||||
<div className="flex flex-wrap justify-end gap-2 [@container(max-width:40rem)]:hidden">
|
||||
<Button
|
||||
data-testid="discover-agents-button"
|
||||
disabled={personas.isPending}
|
||||
onClick={() => personas.openCatalog()}
|
||||
size="sm"
|
||||
variant="outline"
|
||||
>
|
||||
<Compass />
|
||||
Discover
|
||||
</Button>
|
||||
<Button
|
||||
data-testid="agent-defaults-button"
|
||||
ref={fullAiDefaultsTriggerRef}
|
||||
@@ -183,6 +193,13 @@ export function AgentsView() {
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="end">
|
||||
<DropdownMenuItem
|
||||
disabled={personas.isPending}
|
||||
onSelect={() => personas.openCatalog()}
|
||||
>
|
||||
<Compass />
|
||||
Discover
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem
|
||||
onSelect={() => {
|
||||
openAiDefaults(compactActionsTriggerRef.current);
|
||||
|
||||
Reference in New Issue
Block a user