add sub-bar usage widget extension with opencode-go support

This commit is contained in:
2026-03-12 12:30:09 +00:00
parent 9ad10a016c
commit 3fd3fb5916
70 changed files with 14776 additions and 6 deletions
@@ -0,0 +1,21 @@
/**
* Shared path helpers for sub-bar settings storage.
*/
import { getAgentDir } from "@mariozechner/pi-coding-agent";
import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
const SETTINGS_FILE_NAME = "pi-sub-bar-settings.json";
export function getExtensionDir(): string {
return join(dirname(fileURLToPath(import.meta.url)), "..");
}
export function getSettingsPath(): string {
return join(getAgentDir(), SETTINGS_FILE_NAME);
}
export function getLegacySettingsPath(): string {
return join(getExtensionDir(), "settings.json");
}