feat(extensions): detect Pi and OpenCode in GNOME agent tab filter

Mirror the Mac ProviderFilter expansion by letting the GNOME popup
surface Pi and OpenCode tabs when their session stores are present.
Extends the provider detection paths with:

  opencode: $XDG_DATA_HOME/opencode (defaults to ~/.local/share/opencode)
  pi:       ~/.pi/agent/sessions

When two or more providers are detected the agent tab row renders with
All plus the detected providers; otherwise the row stays hidden so the
popup doesn't show a filter UI with nothing to filter against.
This commit is contained in:
AgentSeal 2026-04-18 05:10:29 -07:00
parent 6e354c17ed
commit ce94786185

View file

@ -40,6 +40,8 @@ const PROVIDERS = [
{id: 'codex', label: 'Codex'},
{id: 'cursor', label: 'Cursor'},
{id: 'copilot', label: 'Copilot'},
{id: 'opencode', label: 'OpenCode'},
{id: 'pi', label: 'Pi'},
];
const CURRENCIES = [
@ -184,11 +186,14 @@ class CodeburnIndicator extends PanelMenu.Button {
/// only; the CLI still owns real "has usable data" semantics.
_detectAvailableProviders() {
const home = GLib.get_home_dir();
const xdgData = GLib.getenv('XDG_DATA_HOME') || `${home}/.local/share`;
const paths = {
claude: `${home}/.claude/projects`,
codex: `${home}/.codex/sessions`,
cursor: `${home}/.config/Cursor/User/globalStorage/state.vscdb`,
copilot: `${home}/.copilot/session-state`,
opencode: `${xdgData}/opencode`,
pi: `${home}/.pi/agent/sessions`,
};
const out = [];
for (const [id, path] of Object.entries(paths)) {