fss-link 1.2.19 → 1.2.21

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.
Files changed (2) hide show
  1. package/bundle/fss-link.js +30 -5
  2. package/package.json +1 -1
@@ -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.19";
22346
+ const version = "1.2.21";
22347
22347
  const userAgent = `FSS-Link/${version} (${process.platform}; ${process.arch})`;
22348
22348
  const baseHeaders = {
22349
22349
  "User-Agent": userAgent
@@ -84383,6 +84383,29 @@ var init_model_database = __esm({
84383
84383
  encryptedApiKey
84384
84384
  );
84385
84385
  }
84386
+ if (normalizedModelName && normalizedModelName !== "") {
84387
+ console.log(`\u{1F50D} [LEVEL 2.5] Searching for existing model: ${config.authType}/${normalizedModelName}`);
84388
+ existingRecord = await safeQueryFirstWithLocking(
84389
+ this.db,
84390
+ `SELECT id FROM model_configs
84391
+ WHERE auth_type = ?
84392
+ AND model_name = ?
84393
+ LIMIT 1`,
84394
+ [config.authType, normalizedModelName]
84395
+ );
84396
+ if (existingRecord) {
84397
+ console.log(`\u2705 [LEVEL 2.5] Found existing record id=${existingRecord.id}, updating endpoint_url to: ${normalizedEndpointUrl}`);
84398
+ return await this.updateModelRecord(
84399
+ existingRecord.id,
84400
+ config,
84401
+ normalizedModelName,
84402
+ normalizedEndpointUrl,
84403
+ encryptedApiKey
84404
+ );
84405
+ } else {
84406
+ console.log(`\u26A0\uFE0F [LEVEL 2.5] No existing record found, will insert new`);
84407
+ }
84408
+ }
84386
84409
  if (!normalizedModelName || normalizedModelName === "") {
84387
84410
  existingRecord = await safeQueryFirstWithLocking(
84388
84411
  this.db,
@@ -86459,7 +86482,8 @@ var init_modelManager = __esm({
86459
86482
  case AuthType.OLLAMA:
86460
86483
  case "ollama":
86461
86484
  process.env["OLLAMA_API_KEY"] = model.apiKey || "1";
86462
- process.env["OLLAMA_BASE_URL"] = model.endpointUrl || "http://localhost:11434/v1";
86485
+ const ollamaUrl = this.normalizeEndpointUrl(model.endpointUrl || "http://localhost:11434/v1", AuthType.OLLAMA);
86486
+ process.env["OLLAMA_BASE_URL"] = ollamaUrl || "http://localhost:11434/v1";
86463
86487
  process.env["OLLAMA_MODEL"] = model.modelName || "";
86464
86488
  break;
86465
86489
  case AuthType.LM_STUDIO:
@@ -86467,7 +86491,8 @@ var init_modelManager = __esm({
86467
86491
  // New normalized value
86468
86492
  case "lmstudio":
86469
86493
  process.env["LM_STUDIO_API_KEY"] = model.apiKey || "1";
86470
- process.env["LM_STUDIO_BASE_URL"] = model.endpointUrl || "http://localhost:1234/v1";
86494
+ const lmStudioUrl = this.normalizeEndpointUrl(model.endpointUrl || "http://localhost:1234/v1", AuthType.LM_STUDIO);
86495
+ process.env["LM_STUDIO_BASE_URL"] = lmStudioUrl || "http://localhost:1234/v1";
86471
86496
  process.env["LM_STUDIO_MODEL"] = model.modelName || "";
86472
86497
  break;
86473
86498
  case AuthType.USE_GEMINI:
@@ -95427,7 +95452,7 @@ async function getPackageJson() {
95427
95452
  // packages/cli/src/utils/version.ts
95428
95453
  async function getCliVersion() {
95429
95454
  const pkgJson = await getPackageJson();
95430
- return "1.2.19";
95455
+ return "1.2.21";
95431
95456
  }
95432
95457
 
95433
95458
  // packages/cli/src/ui/commands/aboutCommand.ts
@@ -95479,7 +95504,7 @@ import open4 from "open";
95479
95504
  import process11 from "node:process";
95480
95505
 
95481
95506
  // packages/cli/src/generated/git-commit.ts
95482
- var GIT_COMMIT_INFO = "5d20178b";
95507
+ var GIT_COMMIT_INFO = "725e77af";
95483
95508
 
95484
95509
  // packages/cli/src/ui/commands/bugCommand.ts
95485
95510
  init_dist2();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fss-link",
3
- "version": "1.2.19",
3
+ "version": "1.2.21",
4
4
  "engines": {
5
5
  "node": ">=20.0.0"
6
6
  },