Skip to content

The agent that grows with you

Merge remote-tracking branch 'origin/main' into mergemain-138820

Austin Pickettd0e5cf43a8a8
diff --cc apps/desktop/src/app/capabilities/plugins/plugins-tab.test.tsx
index f67b41896ef,5ec61e92657..d4cae460088
--- a/apps/desktop/src/app/capabilities/plugins/plugins-tab.test.tsx
+++ b/apps/desktop/src/app/capabilities/plugins/plugins-tab.test.tsx
@@@ -637,116 -551,34 +637,115 @@@ describe('PluginsTab', () =>
})
describe('PluginsTab catalog UX', () => {
- beforeEach(() => {
- $agentPlugins.set([])
- $agentPluginsStatus.set('ready')
- closePluginInstallRequest()
- requestGateway.mockClear()
- setPaneHeightOverride('capabilities-plugin-catalog', undefined)
+ it('requires widening consent before retrying an update, and leaves a declined update untouched', async () => {
+ $agentPlugins.set([
+ {
+ name: 'demo-weather',
+ key: 'demo-weather',
+ description: '',
+ source: 'git',
+ status: 'enabled',
+ version: '1',
+ catalog_sha: 'b'.repeat(40),
+ update_available: true
+ }
+ ])
+ requestGateway.mockImplementation(async (_method, params) => {
+ if (params?.action !== 'update') {
+ return { plugins: $agentPlugins.get() }
+ }
+
+ return params.accept_capabilities
+ ? { ok: true, unchanged: false }
+ : { consent_required: true, sha: 'b'.repeat(40), delta_lines: ['Tools: weather-alerts'] }
+ })
+ await act(async () => {
+ renderPlugins({ profile: 'workbot' })
+ })
+ fireEvent.click(screen.getByRole('button', { name: `Update to ${'b'.repeat(8)}` }))
+ await waitFor(() => expect($confirmRequest.get()?.description).toContain('Tools: weather-alerts'))
+ expect($confirmRequest.get()?.title).toBe('demo-weather asks for more')
+ await act(async () => {
+ settleConfirm(false)
+ })
+ expect(requestGateway).not.toHaveBeenCalledWith(
+ 'plugins.manage',
+ expect.objectContaining({ accept_capabilities: true })
+ )
+ expect(screen.getByRole('button', { name: `Update to ${'b'.repeat(8)}` })).toBeTruthy()
+
+ fireEvent.click(screen.getByRole('button', { name: `Update to ${'b'.repeat(8)}` }))
+ await waitFor(() => expect($confirmRequest.get()).not.toBeNull())
+ await act(async () => {
+ settleConfirm(true)
+ })
- expect(requestGateway).toHaveBeenCalledWith('plugins.manage', {
- action: 'update',
- name: 'demo-weather',
- profile: 'workbot',
- accept_capabilities: true
- })
++ expect(requestGateway).toHaveBeenCalledWith(
++ 'plugins.manage',
++ { action: 'update', name: 'demo-weather', profile: 'workbot', accept_capabilities: true },
++ expect.any(Number)
++ )
})
- afterEach(cleanup)
+ it('fetches the catalog once, retaining parent search across selection and filters', async () => {
+ queryClient.clear()
+
+ const fetchCatalog = vi.fn().mockResolvedValue({
+ ok: true,
+ json: async () => [
+ weatherEntry,
+ { ...weatherEntry, name: 'garden-plugin', category: 'garden', description: 'Garden planning' }
+ ]
+ })
+
+ vi.stubGlobal('fetch', fetchCatalog)
+ await act(async () => {
+ renderPlugins({ profile: null })
+ })
+
+ await selectCatalogEntry('garden-plugin')
+
+ const search = screen.getByRole<HTMLInputElement>('textbox', { name: 'Search plugins' })
+
+ fireEvent.change(search, { target: { value: 'weather' } })
+ expect(await screen.findByRole('heading', { name: weatherEntry.name })).toBeTruthy()
+ expect(screen.queryByRole('button', { name: 'garden-plugin' })).toBeNull()
+ fireEvent.click(screen.getByRole('button', { name: /^Filters/ }))
+ fireEvent.click(await screen.findByRole('button', { name: 'Installed', pressed: false }))
+ expect(screen.queryByRole('heading', { name: weatherEntry.name })).toBeNull()
+ expect(search.value).toBe('weather')
+ fireEvent.click(screen.getAllByRole('button', { name: 'Clear filters' })[0])
+ expect(search.value).toBe('')
+ await selectCatalogEntry('garden-plugin')
+
+ expect(fetchCatalog).toHaveBeenCalledTimes(1)
+ expect(fetchCatalog.mock.calls[0][0]).toMatch(/\/docs\/api\/plugins\.json$/)
+ expect(fetchCatalog.mock.calls[0][1]).toMatchObject({ credentials: 'omit' })
+ expect($pluginInstallRequest.get()).toBeNull()
+ })
+
+ it('retries a failed catalog only when asked, not on tab bounce', async () => {
+ queryClient.clear()
- it('grows the catalog when its top-edge sash is dragged up, and resets on double-click', () => {
- // jsdom has no layout: give the Capabilities column a real height so the
- // "never crush the lists above" clamp has something to clamp against.
- const clientHeight = vi.spyOn(HTMLElement.prototype, 'clientHeight', 'get').mockReturnValue(900)
- Object.defineProperty(window, 'innerHeight', { configurable: true, value: 1000 })
- render(<PluginsTab profile={null} />)
- const sash = screen.getByTestId('plugin-catalog-sash')
+ const fetchCatalog = vi
+ .fn()
+ .mockResolvedValueOnce({ ok: false, status: 503 })
+ .mockResolvedValue({ ok: true, json: async () => [weatherEntry] })
- fireEvent.pointerDown(sash, { button: 0, clientY: 600 })
- fireEvent.pointerMove(window, { clientY: 400 })
- fireEvent.pointerUp(window)
+ vi.stubGlobal('fetch', fetchCatalog)
+ const view = renderPlugins({ profile: null })
- // Default 380px + 200px of upward drag (clamped only by window/column size).
- expect($paneHeightOverride('capabilities-plugin-catalog').get()).toBe(580)
+ expect(await screen.findByText('Catalog HTTP 503')).toBeTruthy()
+ expect(fetchCatalog).toHaveBeenCalledTimes(1)
+ view.unmount()
+ await act(async () => {
+ renderPlugins({ profile: null })
+ })
+ expect(fetchCatalog).toHaveBeenCalledTimes(1)
+ expect(screen.getByText('Catalog HTTP 503')).toBeTruthy()
+ fireEvent.click(screen.getByRole('button', { name: 'Try again' }))
- fireEvent.doubleClick(sash)
- expect($paneHeightOverride('capabilities-plugin-catalog').get()).toBeUndefined()
- clientHeight.mockRestore()
+ expect(await screen.findByRole('heading', { name: weatherEntry.name })).toBeTruthy()
+ expect(fetchCatalog).toHaveBeenCalledTimes(2)
})
it('shows an Update chip when the catalog pin moved past the installed SHA', () => {
diff --cc apps/desktop/src/app/capabilities/plugins/plugins-tab.tsx
index 8c168b0387f,26395bb667e..1aa5af7ed5f
--- a/apps/desktop/src/app/capabilities/plugins/plugins-tab.tsx
+++ b/apps/desktop/src/app/capabilities/plugins/plugins-tab.tsx
@@@ -48,7 -53,38 +46,8 @@@ import { CatalogSwitch } from '../catal
import { TOOLSETS_QUERY_KEY } from '../toolsets/toolsets-data'
import { mergePluginPackages, type PackageKind, type PluginPackage } from './plugin-packages'
+ import { runPluginUpdate } from './plugin-update'
-// The REAL Plugin Catalog page (docs site) embedded as a one-click picker —
-// the same pattern as the Skills tab's EmbeddedHubPicker. `?embed=picker`
-// hides the docs chrome and adds "+ Add to this Agent" per card, which posts
-// { type: 'hermes-plugin-pick', name, repo, sha, subdir, tier, installCmd }
-// to the parent window. We validate the origin and open the shared
-// dual-target install modal (agent half → catalog-pinned install into the
-// scoped profile; desktop half → this app), so unified packages install both
-// halves in one flow. URLs live in `@/lib/plugin-catalog` so the
-// `hermes://plugin/install?catalog=` deep link resolves against the same feed.
-
-// Catalog viewport: persisted through the shared pane store, dragged from the
-// section's TOP edge ("pull the catalog up"), clamped so neither the catalog
-// nor the plugin list above can vanish. Same contract as EmbeddedHubPicker.
-const CATALOG_PANE_ID = 'capabilities-plugin-catalog'
-const CATALOG_DEFAULT_PX = 380
-const CATALOG_MIN_PX = 120
-const CATALOG_MAX_VH = 0.75
-const CATALOG_COLLAPSED_PX = 4
-const CATALOG_LIST_RESERVED_PX = 176
-
-interface PluginPickMessage {
- installCmd?: string
- name?: string
- repo?: string
- sha?: string
- subdir?: string
- tier?: string
- type?: string
-}
-
/** Deep-link anchor for a package row (`/capabilities?tab=plugins&plugin=<key>`).
* Accepts the agent key, the agent name, or the desktop record id. */
export const pluginElementId = (target: string) => `plugin-${target}`
@@@ -571,247 -578,302 +577,226 @@@ export const PluginsTab = memo(functio
[agentRows, desktopRecords]
)
- useDeepLinkHighlight({ param: 'plugin', ready: () => true, elementId: pluginElementId })
+ const [selectedEntryId, setSelectedEntryId] = useState<string | null>(null)
- // Catalog picker viewport (persisted height, collapse toggle, top-edge sash).
- const heightOverride = useStore($paneHeightOverride(CATALOG_PANE_ID))
- const height = heightOverride ?? CATALOG_DEFAULT_PX
- const open = height > CATALOG_COLLAPSED_PX
- const [pickerMounted, setPickerMounted] = useState(open)
- const [dragging, setDragging] = useState(false)
- const sectionRef = useRef<HTMLElement>(null)
+ const packageForTarget = useCallback(
+ (target: string) =>
+ packages.find(pkg => [pkg.key, pkg.agent?.key, pkg.agent?.name, pkg.desktop?.id].includes(target)),
+ [packages]
+ )
- if (open && !pickerMounted) {
- setPickerMounted(true)
- }
+ useDeepLinkHighlight({
+ param: 'plugin',
+ ready: target => Boolean(packageForTarget(target)),
+ elementId: target => {
+ const pkg = packageForTarget(target)
+
+ return pluginElementId(pkg?.agent?.key ?? pkg?.agent?.name ?? pkg?.desktop?.id ?? target)
+ },
+ onResolve: useCallback(
+ (target: string) => {
+ const pkg = packageForTarget(target)
+
+ if (pkg) {
+ onQueryChange?.('')
+ setSelectedEntryId(`installed:${pkg.key}`)
+ }
+ },
+ [onQueryChange, packageForTarget]
+ )
+ })
- const startDrag = (event: ReactPointerEvent<HTMLDivElement>) => {
- if (event.button !== 0) {
- return
- }
+ const agentBusy = (row: AgentPluginRow) => busyKey === (row.key ?? row.name) || busyKey === row.name
- event.preventDefault()
- const startY = event.clientY
- const startHeight = height
- const column = sectionRef.current?.parentElement
- const columnMax = column ? column.clientHeight - CATALOG_LIST_RESERVED_PX : Number.POSITIVE_INFINITY
- const max = Math.max(CATALOG_MIN_PX, Math.round(Math.min(window.innerHeight * CATALOG_MAX_VH, columnMax)))
- setDragging(true)
-
- const onMove = (move: globalThis.PointerEvent) => {
- setPaneHeightOverride(
- CATALOG_PANE_ID,
- Math.round(Math.min(max, Math.max(CATALOG_MIN_PX, startHeight + (startY - move.clientY))))
- )
- }
+ const installedEntries = useMemo(
+ () =>
+ parseCatalog(
+ 'plugins',
+ packages.map(pkg => ({
+ name: pkg.name,
+ identifier: pkg.key,
+ description: pkg.description,
+ category: pkg.kind === 'desktop' ? 'desktop' : 'general',
+ tier: pkg.agent?.catalog_tier ?? pkg.agent?.source ?? pkg.desktop?.kind ?? '',
+ repo: pkg.desktop?.packageOrigin?.repo ?? '',
+ sha: pkg.agent?.installed_sha ?? pkg.desktop?.packageOrigin?.sha ?? '',
+ version: pkg.agent?.version ?? ''
+ }))
+ ).map(entry => ({ ...entry, id: `installed:${entry.identifier}` })),
+ [packages]
+ )
- const onUp = () => {
- window.removeEventListener('pointermove', onMove)
- setDragging(false)
- }
+ const packageById = useMemo(() => new Map(packages.map(pkg => [`installed:${pkg.key}`, pkg])), [packages])
- window.addEventListener('pointermove', onMove)
- window.addEventListener('pointerup', onUp, { once: true })
- }
+ const installedByCatalogName = useMemo(() => {
+ const byName = new Map<string, CatalogEntry>()
- useEffect(() => {
- if (!open) {
- return undefined
- }
+ for (const entry of installedEntries) {
+ const pkg = packageById.get(entry.id)
+ const name = pkg?.agent?.catalog_name ?? pkg?.desktop?.packageOrigin?.catalogName
- const onMessage = (event: MessageEvent) => {
- if (event.origin !== CATALOG_ORIGIN) {
- return
+ if (name) {
+ byName.set(name, entry)
}
+ }
- const data = event.data as null | PluginPickMessage
+ return byName
+ }, [installedEntries, packageById])
- if (!data || data.type !== 'hermes-plugin-pick' || !data.name || !data.repo) {
- return
- }
+ const matchInstalled = useCallback(
+ (entry: CatalogEntry) => installedByCatalogName.get(entry.name),
+ [installedByCatalogName]
+ )
- // Already-installed short-circuit + the dialog itself live in the shared
- // helper so a catalog deep link behaves identically to this pick.
- openCatalogPluginInstall(
- {
- name: String(data.name),
- repo: String(data.repo),
- sha: data.sha ? String(data.sha) : undefined,
- subdir: data.subdir ? String(data.subdir) : undefined
- },
- scope
- )
- }
+ const isInstalled = (entry: CatalogEntry) => packageById.has(entry.id)
+
+ const handleAgentRemove = useCallback(
+ (row: AgentPluginRow) => {
+ void confirm({
+ confirmLabel: p.uninstall,
+ description: p.uninstallConfirmBody(row.name, label),
+ destructive: true,
+ title: p.uninstallConfirmTitle(row.name)
+ }).then(async ok => {
+ if (!ok) {
+ return
+ }
- window.addEventListener('message', onMessage)
+ if (await removeAgentPlugin(requestGateway, row.name, p.uninstallFailed(row.name), scope)) {
+ notify({ kind: 'success', message: p.uninstalled(row.name) })
+ // Prunes the app-level desktop half whose source package just went away.
+ void rescanAll(requestGateway, scope)
+ }
+ })
+ },
+ [label, p, requestGateway, scope]
+ )
- return () => window.removeEventListener('message', onMessage)
- }, [open, p, scope])
+ const handleDesktopRemove = useCallback(
+ (record: PluginRecord) => {
+ void confirm({
+ confirmLabel: p.uninstall,
+ description: p.uninstallDesktopConfirmBody(record.name),
+ destructive: true,
+ title: p.uninstallConfirmTitle(record.name)
+ }).then(async ok => {
+ if (!ok) {
+ return
+ }
- const agentBusy = (row: AgentPluginRow) => busyKey === (row.key ?? row.name) || busyKey === row.name
+ const result = await uninstallDiskPlugin(record.id)
- return (
- <div className="flex h-full min-h-0 flex-col">
- <div className="min-h-32 flex-1 overflow-y-auto">
- {/* Header: what the two columns mean, and the controls that act on
- the whole page (install, folder, rescan). */}
- <div className="flex flex-wrap items-start justify-between gap-3 px-3 pt-3 pb-2">
- <p className="min-w-0 flex-1 text-[length:var(--conversation-caption-font-size)] text-(--ui-text-tertiary)">
- {p.pageBlurb}
- </p>
- <div className="flex shrink-0 items-center gap-1">
- <Button
- onClick={() => openPluginInstallRequest({ profile: scope, repo: '' })}
- size="sm"
- type="button"
- variant="secondary"
- >
- {d.installModal.installFromGit}
- </Button>
- <Tip label={d.openFolder}>
- <Button
- aria-label={d.openFolder}
- onClick={() => void revealPluginsDir()}
- size="icon"
- type="button"
- variant="ghost"
- >
- <FolderOpen className="size-3.5" />
- </Button>
- </Tip>
- <Tip label={d.rescan}>
- <Button
- aria-label={d.rescan}
- onClick={() => {
- triggerHaptic('selection')
- void rescanAll(requestGateway, scope)
- }}
- size="icon"
- type="button"
- variant="ghost"
- >
- <RefreshCw className="size-3.5" />
- </Button>
- </Tip>
- </div>
- </div>
+ if (result.ok) {
+ notify({ kind: 'success', message: p.uninstalledDesktop(record.name) })
+ } else {
+ notifyError(result.error, p.uninstallFailed(record.name))
+ }
+ })
+ },
+ [p]
+ )
- {status === 'error' ? (
- <PanelEmpty
- action={
- <Button onClick={() => void loadAgentPlugins(requestGateway, scope)} size="sm">
- {t.skills.refresh}
- </Button>
- }
- description={error ?? undefined}
- icon="error"
- title={p.loadFailed}
- />
- ) : packages.length === 0 && status === 'ready' ? (
- <p className="px-3 py-3 text-[length:var(--conversation-caption-font-size)] text-(--ui-text-tertiary)">
- {p.emptyAll} {p.emptyHint}
- </p>
- ) : (
- <div className="flex flex-col" role="table">
- {/* Column header: the visible labels for the two control columns,
- aligned with the cells below. The profile selector sits INSIDE
- the Agent header so it visibly governs only that column. */}
- <div
- className="flex items-center gap-3 border-y border-(--ui-stroke-tertiary) bg-(--ui-bg-quinary) px-3 py-1.5 text-[0.68rem] text-(--ui-text-tertiary)"
- role="row"
- >
- <div className="min-w-0 flex-1" role="columnheader" />
- <div className={HALF_COL} role="columnheader">
- <Monitor aria-hidden className="size-3.5 shrink-0" />
- <Tip label={p.halfDesktopHint}>
- <span className="font-medium">{p.halfDesktop}</span>
- </Tip>
- </div>
- <div className={HALF_COL} role="columnheader">
- <Package aria-hidden className="size-3.5 shrink-0" />
- {scopeSelector ?? <span className="truncate font-medium">{p.halfAgentIn(label)}</span>}
- </div>
- </div>
- {packages.map(pkg => (
- <PackageRow
- busy={pkg.agent ? agentBusy(pkg.agent) : false}
- key={pkg.key}
- onAgentRemove={row => {
- void confirm({
- confirmLabel: p.uninstall,
- description: p.uninstallConfirmBody(row.name, label),
- destructive: true,
- title: p.uninstallConfirmTitle(row.name)
- }).then(async ok => {
- if (!ok) {
- return
- }
-
- if (await removeAgentPlugin(requestGateway, row.name, p.uninstallFailed(row.name), scope)) {
- notify({ kind: 'success', message: p.uninstalled(row.name) })
- // Prunes the app-level desktop half whose source package just went away.
- void rescanAll(requestGateway, scope)
- }
- })
- }}
- onAgentToggle={(row, enable) => {
- if (!row.key) {
- return
- }
-
- void toggleAgentPlugin(requestGateway, row.key, enable, p.toggleFailed(row.name), scope).then(ok => {
- // Turning a unified package on turns its desktop half on too
- // (unless the user switched that half off on purpose).
- // Off stays per half: the desktop half is app-wide, and
- // another profile may still run the agent half.
- const half = pkg.desktop?.packageName
-
- if (ok && enable && half) {
- void enablePackageDesktopHalf(half, { keepUserChoice: true })
- }
- })
- }}
- onAgentUpdate={row => {
- void runPluginUpdate(requestGateway, row, scope, p).then(outcome => {
- if (outcome.kind === 'applied') {
- void rescanAll(requestGateway, scope)
- }
- })
- }}
- onDesktopRemove={record => {
- void confirm({
- confirmLabel: p.uninstall,
- description: p.uninstallDesktopConfirmBody(record.name),
- destructive: true,
- title: p.uninstallConfirmTitle(record.name)
- }).then(async ok => {
- if (!ok) {
- return
- }
-
- const result = await uninstallDiskPlugin(record.id)
-
- if (result.ok) {
- notify({ kind: 'success', message: p.uninstalledDesktop(record.name) })
- } else {
- notifyError(result.error, p.uninstallFailed(record.name))
- }
- })
- }}
- pkg={pkg}
- profile={profile}
- scope={scope}
- scopeLabel={label}
- />
- ))}
- </div>
- )}
- </div>
+ // The card switch turns the whole package on or off, like a skill's; per-half
+ // switches and uninstall (trash + confirm) live in the detail's PackageRow.
+ const packageSwitch = (pkg: PluginPackage) => {
+ const { agent, desktop } = pkg
- <section
- className="relative flex min-h-9 flex-col overflow-hidden border-t border-(--ui-stroke-secondary)"
- ref={sectionRef}
+ const setEnabled = (enable: boolean) => {
+ if (agent?.key) {
+ void toggleAgentPlugin(requestGateway, agent.key, enable, p.toggleFailed(agent.name), scope)
+ }
+
+ if (desktop) {
+ void setPluginEnabled(desktop.id, enable)
+ }
+ }
+
+ return (
+ <CatalogSwitch
+ aria-label={pkg.name}
+ checked={agent ? agent.status === 'enabled' : desktop?.status !== 'disabled'}
+ disabled={agent ? !agent.key || agentBusy(agent) : false}
+ onCheckedChange={setEnabled}
+ size="xs"
+ />
+ )
+ }
+
+ const notice =
+ status === 'error' ? (
+ <CatalogAlert
+ onRetry={() => void loadAgentPlugins(requestGateway, scope)}
+ retryLabel={t.catalog.retry}
+ title={p.loadFailed}
>
- <div
- className="group/catsash absolute inset-x-0 top-0 z-10 h-1 -translate-y-1/2 cursor-row-resize"
- data-testid="plugin-catalog-sash"
- onDoubleClick={() => setPaneHeightOverride(CATALOG_PANE_ID, undefined)}
- onPointerDown={startDrag}
- >
- <div
- className={cn(
- 'absolute inset-x-0 top-1/2 h-px -translate-y-1/2 transition-colors',
- dragging ? 'bg-(--ui-stroke-secondary)' : 'group-hover/catsash:bg-(--ui-stroke-secondary)'
- )}
+ {error}
+ </CatalogAlert>
+ ) : null
+
+ return (
+ <CatalogBrowser
+ headerActions={<PluginActions profile={profile} />}
+ installedEntries={installedEntries}
+ installedPending={status !== 'ready'}
+ isInstalled={isInstalled}
+ kind="plugins"
+ matchInstalled={matchInstalled}
+ notice={notice}
+ onInstall={entry => openCatalogPluginInstall(entry, scope)}
+ onQueryChange={onQueryChange}
+ query={query}
+ renderInstalledAction={entry => {
+ const pkg = packageById.get(entry.id)
+
+ return pkg ? packageSwitch(pkg) : null
+ }}
+ renderInstalledDetail={entry => {
+ const pkg = packageById.get(entry.id)
+
+ if (!pkg) {
+ return null
+ }
+
+ return (
+ <PackageRow
+ busy={pkg.agent ? agentBusy(pkg.agent) : false}
+ key={pkg.key}
+ onAgentRemove={handleAgentRemove}
+ onAgentToggle={(row, enable) => {
+ if (!row.key) {
+ return
+ }
+
+ void toggleAgentPlugin(requestGateway, row.key, enable, p.toggleFailed(row.name), scope).then(ok => {
+ // Turning a unified package on turns its desktop half on too
+ // (unless the user switched that half off on purpose). Off
+ // stays per half: the desktop half is app-wide, and another
+ // profile may still run the agent half.
+ const half = pkg.desktop?.packageName
+
+ if (ok && enable && half) {
+ void enablePackageDesktopHalf(half, { keepUserChoice: true })
+ }
+ })
+ }}
+ onAgentUpdate={row => {
- const finish = (outcome: AgentPluginUpdateOutcome) => {
++ void runPluginUpdate(requestGateway, row, scope, p).then(outcome => {
+ if (outcome.kind === 'applied') {
- notify({ kind: 'success', message: p.updated(row.name) })
+ void rescanAll(requestGateway, scope)
+ }
- }
-
- void updateAgentPlugin(requestGateway, row.name, p.updateFailed(row.name), scope).then(async outcome => {
- if (outcome.kind !== 'consent') {
- finish(outcome)
-
- return
- }
-
- // The new pin widens the plugin (tools, hooks, deps, capabilities, a Desktop
- // half); the backend changed nothing until the user confirms the delta.
- const ok = await confirm({
- confirmLabel: p.updateConsentConfirm,
- description: [p.updateConsentBody(row.name, outcome.sha), ...outcome.deltaLines].join('\n'),
- title: p.updateConsentTitle(row.name)
- })
-
- if (ok) {
- finish(await updateAgentPlugin(requestGateway, row.name, p.updateFailed(row.name), scope, true))
- }
+ })
+ }}
+ onDesktopRemove={handleDesktopRemove}
+ pkg={pkg}
+ profile={profile}
+ request={requestGateway}
+ scope={scope}
+ scopeLabel={label}
+ scopeSelector={scopeSelector}
/>
- </div>
- <div className="flex shrink-0 items-center justify-between px-3 py-1.5">
- <span className="text-[0.62rem] font-medium tracking-wide uppercase text-(--ui-text-quaternary)">
- {p.catalogTitle}
- </span>
- <Button onClick={() => setPaneHeightOverride(CATALOG_PANE_ID, open ? 0 : undefined)} size="xs" variant="text">
- {open ? p.catalogHide : p.catalogBrowse}
- </Button>
- </div>
- {pickerMounted && (
- <div className={cn('flex min-h-0 flex-col gap-1 px-3 pb-2', !open && 'hidden')}>
- <div
- style={{
- border: '1px solid var(--ui-stroke-secondary)',
- borderRadius: 8,
- flex: `0 1 ${height}px`,
- maxWidth: '100%',
- minHeight: 0,
- minWidth: 320,
- overflow: 'hidden',
- position: 'relative',
- width: '100%'
- }}
- >
- <iframe
- sandbox="allow-scripts allow-same-origin"
- src={CATALOG_PICKER_URL}
- style={{
- background: 'transparent',
- border: 'none',
- height: '133.34%',
- pointerEvents: dragging ? 'none' : 'auto',
- transform: 'scale(0.75)',
- transformOrigin: 'top left',
- width: '133.34%'
- }}
- title={p.catalogTitle}
- />
- </div>
- <p className="shrink-0 px-1 text-[0.65rem] leading-4 text-(--ui-text-quaternary)">{p.catalogHint}</p>
- </div>
- )}
- </section>
- </div>
+ )
+ }}
+ selectedEntryId={selectedEntryId}
+ />
)
})
diff --cc apps/desktop/src/i18n/en.ts
index 8193322d828,ac39e143900..a628617d194
--- a/apps/desktop/src/i18n/en.ts
+++ b/apps/desktop/src/i18n/en.ts
@@@ -9,7 -8,7 +9,8 @@@ import { enClarify } from './en_clarify
import { enConnectorAccounts } from './en_connector_accounts'
import { enConnectorCard } from './en_connector_card'
import { enGatewayGroupOpen, enSkillDeepLink } from './en_deep_links'
+ import { enErrorLayers } from './en_error_layers'
+import { enExternalOpenFailed } from './en_external_open'
import { enFirstRun } from './en_first_run'
import { enLocalModels } from './en_local_models'
import { enModelMenu } from './en_model_menu'