fss-link 1.2.18 → 1.2.19
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/bundle/fss-link.js +25 -8
- package/package.json +1 -1
package/bundle/fss-link.js
CHANGED
|
@@ -22343,7 +22343,7 @@ async function createContentGeneratorConfig(config, authType) {
|
|
|
22343
22343
|
async function createContentGenerator(config, gcConfig, sessionId2) {
|
|
22344
22344
|
if (DEBUG_CONTENT)
|
|
22345
22345
|
console.log(`\u{1F41B} DEBUG createContentGenerator: authType=${config.authType}, apiKey=${config.apiKey}, baseUrl=${config.baseUrl}`);
|
|
22346
|
-
const version = "1.2.
|
|
22346
|
+
const version = "1.2.19";
|
|
22347
22347
|
const userAgent = `FSS-Link/${version} (${process.platform}; ${process.arch})`;
|
|
22348
22348
|
const baseHeaders = {
|
|
22349
22349
|
"User-Agent": userAgent
|
|
@@ -86142,17 +86142,34 @@ var init_modelManager = __esm({
|
|
|
86142
86142
|
* 🔒 MIGRATED: Now uses UnifiedDatabase for thread-safe operations
|
|
86143
86143
|
*/
|
|
86144
86144
|
/**
|
|
86145
|
-
* Normalize base URLs for OpenAI-compatible endpoints
|
|
86146
|
-
*
|
|
86145
|
+
* Normalize base URLs for OpenAI-compatible endpoints (Ollama, LM Studio)
|
|
86146
|
+
*
|
|
86147
|
+
* CRITICAL FIX: OpenAI SDK appends `/chat/completions` to baseURL, NOT `/v1/chat/completions`!
|
|
86148
|
+
* Therefore baseURL MUST include /v1 for LM Studio and Ollama to work correctly.
|
|
86149
|
+
*
|
|
86150
|
+
* Ensures URL has correct `/v1` suffix and handles edge cases:
|
|
86151
|
+
* - Adds `/v1` if missing for Ollama and LM Studio
|
|
86152
|
+
* - Removes duplicate `/v1/v1` if present
|
|
86153
|
+
* - Handles trailing slashes correctly
|
|
86154
|
+
* - Enforces HTTPS for non-local endpoints
|
|
86155
|
+
*
|
|
86156
|
+
* @param url - The base URL to normalize
|
|
86157
|
+
* @param authType - Auth type to determine if /v1 is needed
|
|
86158
|
+
* @returns Normalized URL
|
|
86147
86159
|
*/
|
|
86148
86160
|
normalizeEndpointUrl(url2, authType) {
|
|
86149
86161
|
if (!url2) return void 0;
|
|
86150
86162
|
let normalized2 = url2.trim();
|
|
86151
|
-
|
|
86152
|
-
|
|
86163
|
+
normalized2 = normalized2.replace(/\/+$/, "");
|
|
86164
|
+
if (normalized2.endsWith("/v1/v1")) {
|
|
86153
86165
|
normalized2 = normalized2.slice(0, -3);
|
|
86166
|
+
if (DEBUG_MODEL) console.log(`\u26A0\uFE0F [URL-NORMALIZE] Removed duplicate /v1 from URL: ${url2} \u2192 ${normalized2}`);
|
|
86167
|
+
}
|
|
86168
|
+
const needsV1 = authType === AuthType.OLLAMA || authType === AuthType.LM_STUDIO;
|
|
86169
|
+
if (needsV1 && !normalized2.endsWith("/v1")) {
|
|
86170
|
+
normalized2 = `${normalized2}/v1`;
|
|
86171
|
+
if (DEBUG_MODEL) console.log(`\u2705 [URL-NORMALIZE] Added /v1 suffix to URL: ${url2} \u2192 ${normalized2}`);
|
|
86154
86172
|
}
|
|
86155
|
-
normalized2 = normalized2.replace(/\/+$/, "");
|
|
86156
86173
|
if (!normalized2.startsWith("http://localhost") && !normalized2.startsWith("http://127.0.0.1") && normalized2.startsWith("http://")) {
|
|
86157
86174
|
if (DEBUG_MODEL) console.log(`\u{1F527} [URL-NORMALIZE] Upgrading HTTP to HTTPS: ${normalized2}`);
|
|
86158
86175
|
normalized2 = normalized2.replace("http://", "https://");
|
|
@@ -95410,7 +95427,7 @@ async function getPackageJson() {
|
|
|
95410
95427
|
// packages/cli/src/utils/version.ts
|
|
95411
95428
|
async function getCliVersion() {
|
|
95412
95429
|
const pkgJson = await getPackageJson();
|
|
95413
|
-
return "1.2.
|
|
95430
|
+
return "1.2.19";
|
|
95414
95431
|
}
|
|
95415
95432
|
|
|
95416
95433
|
// packages/cli/src/ui/commands/aboutCommand.ts
|
|
@@ -95462,7 +95479,7 @@ import open4 from "open";
|
|
|
95462
95479
|
import process11 from "node:process";
|
|
95463
95480
|
|
|
95464
95481
|
// packages/cli/src/generated/git-commit.ts
|
|
95465
|
-
var GIT_COMMIT_INFO = "
|
|
95482
|
+
var GIT_COMMIT_INFO = "5d20178b";
|
|
95466
95483
|
|
|
95467
95484
|
// packages/cli/src/ui/commands/bugCommand.ts
|
|
95468
95485
|
init_dist2();
|