- Cowork: ComboFormModal
- BaseUrlSelect: add cloud endpoint option, custom URL local state, always default to first option; new cliEndpointMatch helper; CLI tool cards refactor - API: new /v1/audio/voices and /v1/models/info; /v1/models filters disabled models, drop unused timestamp - initializeApp: guard tunnel/tailscale auto-resume to once-per-process - geminiHelper: ensureObjectType for schemas with properties but no type - skills: minor SKILL.md tweaks (chat/embeddings/image/stt/tts/web-*)
This commit is contained in:
1 parent
6344abcf8d
commit
5c62e73cc6
28 files changed
+1897
-320
No files matched your search
@@ -0,0 +1,13 @@
|
||||
// Match a configured CLI base URL against all known endpoints (local/tunnel/tailscale/cloud)
|
||||
const stripTrailingSlash = (s) => (s || "").replace(/\/+$/, "");
|
||||
|
||||
export function matchKnownEndpoint(currentUrl, opts = {}) {
|
||||
if (!currentUrl) return false;
|
||||
const url = stripTrailingSlash(currentUrl);
|
||||
const { tunnelPublicUrl, tailscaleUrl, cloudUrl } = opts;
|
||||
if (/localhost|127\.0\.0\.1|0\.0\.0\.0/.test(url)) return true;
|
||||
if (tunnelPublicUrl && url.startsWith(stripTrailingSlash(tunnelPublicUrl))) return true;
|
||||
if (tailscaleUrl && url.startsWith(stripTrailingSlash(tailscaleUrl))) return true;
|
||||
if (cloudUrl && url.startsWith(stripTrailingSlash(cloudUrl))) return true;
|
||||
return false;
|
||||
}
|
||||
Reference in new issue
Block a user