fss-link 1.2.20 → 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 +26 -3
  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.20";
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,
@@ -95429,7 +95452,7 @@ async function getPackageJson() {
95429
95452
  // packages/cli/src/utils/version.ts
95430
95453
  async function getCliVersion() {
95431
95454
  const pkgJson = await getPackageJson();
95432
- return "1.2.20";
95455
+ return "1.2.21";
95433
95456
  }
95434
95457
 
95435
95458
  // packages/cli/src/ui/commands/aboutCommand.ts
@@ -95481,7 +95504,7 @@ import open4 from "open";
95481
95504
  import process11 from "node:process";
95482
95505
 
95483
95506
  // packages/cli/src/generated/git-commit.ts
95484
- var GIT_COMMIT_INFO = "fccbeb7a";
95507
+ var GIT_COMMIT_INFO = "725e77af";
95485
95508
 
95486
95509
  // packages/cli/src/ui/commands/bugCommand.ts
95487
95510
  init_dist2();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fss-link",
3
- "version": "1.2.20",
3
+ "version": "1.2.21",
4
4
  "engines": {
5
5
  "node": ">=20.0.0"
6
6
  },