@oqtopus-team/pi-qdash 0.1.10-beta.14 → 0.1.10-beta.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/extensions/lib/links.ts +11 -1
- package/package.json +1 -1
- package/skills/qdash/SKILL.md +1 -0
package/extensions/lib/links.ts
CHANGED
|
@@ -9,7 +9,17 @@ function firstString(object: Record<string, unknown>, keys: string[]): string |
|
|
|
9
9
|
return undefined;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Where the QDash web UI lives, for links in tool output.
|
|
14
|
+
*
|
|
15
|
+
* `QDASH_WEB_URL` wins when set: inside a deployment the API base URL is an
|
|
16
|
+
* internal address (`http://api:5715`) that no browser can open. Without it,
|
|
17
|
+
* the UI is assumed to sit next to the API with the `/api` prefix stripped,
|
|
18
|
+
* which holds for a local checkout.
|
|
19
|
+
*/
|
|
20
|
+
export function qdashWebBaseUrl(client: QDashClient, env: NodeJS.ProcessEnv = process.env): string {
|
|
21
|
+
const configured = env.QDASH_WEB_URL?.trim();
|
|
22
|
+
if (configured) return configured.replace(/\/+$/, "");
|
|
13
23
|
return client.config.baseUrl.replace(/\/api\/?$/, "").replace(/\/$/, "");
|
|
14
24
|
}
|
|
15
25
|
|
package/package.json
CHANGED
package/skills/qdash/SKILL.md
CHANGED
|
@@ -134,6 +134,7 @@ For cryostat wiring requests, start with `qdash_get_cooldown_wiring`. Pass `cool
|
|
|
134
134
|
The extension uses `@oqtopus-team/qdash-client` and supports:
|
|
135
135
|
|
|
136
136
|
- `QDASH_*` environment variables (`QDASH_BASE_URL`, `QDASH_API_TOKEN`, `QDASH_PROJECT_ID`, etc.)
|
|
137
|
+
- `QDASH_WEB_URL`: the QDash web UI address used for links in tool output, when it differs from the API base URL (for example inside a deployment where the API is reached by an internal hostname)
|
|
137
138
|
- `$XDG_CONFIG_HOME/qdash/config.ini`
|
|
138
139
|
- `~/.config/qdash/config.ini`
|
|
139
140
|
- explicit `profile` / `configPath` parameters
|