+ {count} account{count === 1 ? "" : "s"}. +
+ ); +} diff --git a/app/src/components/marketplace/BrowsePane.tsx b/app/src/components/marketplace/BrowsePane.tsx new file mode 100644 index 0000000..b97c93e --- /dev/null +++ b/app/src/components/marketplace/BrowsePane.tsx @@ -0,0 +1,9 @@ +import type { MarketplaceApi } from "../../hooks/useMarketplace"; + +export default function BrowsePane({ mp }: { mp: MarketplaceApi }) { + return ( ++ {mp.snapshots.length} marketplace{mp.snapshots.length === 1 ? "" : "s"} configured. +
+ ); +} diff --git a/app/src/components/marketplace/InstalledPane.tsx b/app/src/components/marketplace/InstalledPane.tsx new file mode 100644 index 0000000..be7c5d1 --- /dev/null +++ b/app/src/components/marketplace/InstalledPane.tsx @@ -0,0 +1,9 @@ +import type { MarketplaceApi } from "../../hooks/useMarketplace"; + +export default function InstalledPane({ mp }: { mp: MarketplaceApi }) { + return ( ++ {mp.updates.length} update{mp.updates.length === 1 ? "" : "s"} available. +
+ ); +} diff --git a/app/src/components/marketplace/MarketplaceView.test.tsx b/app/src/components/marketplace/MarketplaceView.test.tsx new file mode 100644 index 0000000..512d955 --- /dev/null +++ b/app/src/components/marketplace/MarketplaceView.test.tsx @@ -0,0 +1,45 @@ +import { describe, it, expect, vi, beforeEach } from "vitest"; +import { fireEvent, render, screen, waitFor } from "@testing-library/react"; + +const load = vi.fn(async () => {}); +vi.mock("../../hooks/useMarketplace", () => ({ + useMarketplace: () => ({ + snapshots: [], + updates: [], + loading: false, + refreshing: [], + load, + refresh: vi.fn(), + reloadState: vi.fn(), + install: vi.fn(), + uninstall: vi.fn(), + setDisabled: vi.fn(), + update: vi.fn(), + forget: vi.fn(), + remove: vi.fn(), + }), +})); +vi.mock("./BrowsePane", () => ({ default: () =>+ {plural(marketplaces, "marketplace", "marketplaces")} ·{" "} + {globalInstalls} installed for all projects + {updateCount !== null && updateCount > 0 && ( + <> · {plural(updateCount, "update available", "updates available")}> + )} +
++ Agents, skills, commands, hooks and plugins from git repositories, installed for all + projects or per project. Changes apply to new Claude sessions. +
+ +