mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-26 02:05:31 +00:00
Show the sidebar Usage summary by default instead of requiring opt-in in Appearance settings, while honoring explicit off preferences and continuing to hide the row when no enabled source has pinned windows. Let usage sources declare optional provider hints (`providers` on the registration and `provider` on discovered accounts) so the daemon can mark reports `defaultEnabled: false` when their hinted providers are neither enabled nor installed, keeping usage sources decoupled from agent providers while avoiding clutter from leftover credentials. Move per-source show/hide controls out of individual card headers into a dedicated `Sources` submenu inside Usage Settings (with tri-state `cardVisibility` preferences migrating legacy `cardsOff`) so disabled sources stay out of the main card list.
17 lines
534 B
TypeScript
17 lines
534 B
TypeScript
import type { PluginServerContext } from "@getpaseo/plugin/server";
|
|
import { inputSchema } from "./shared/input.js";
|
|
import { discover, fetchUsage } from "./server/usage.js";
|
|
|
|
export default function contribute(server: PluginServerContext) {
|
|
server.registerUsageSource({
|
|
id: "opencode-go",
|
|
label: "OpenCode Go",
|
|
icon: "icon.svg",
|
|
providers: ["opencode"],
|
|
input: inputSchema,
|
|
discover: (scope) => (scope.kind === "global" ? discover() : Promise.resolve([])),
|
|
fetch: fetchUsage,
|
|
});
|
|
return () => {};
|
|
}
|