add sub-bar usage widget extension with opencode-go support
This commit is contained in:
@@ -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");
|
||||
}
|
||||
Reference in New Issue
Block a user