fss-link 1.0.79 → 1.0.80

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 +27 -8
  2. package/package.json +1 -1
@@ -22379,7 +22379,7 @@ function createContentGeneratorConfig(config, authType) {
22379
22379
  return contentGeneratorConfig;
22380
22380
  }
22381
22381
  async function createContentGenerator(config, gcConfig, sessionId2) {
22382
- const version = "1.0.79";
22382
+ const version = "1.0.80";
22383
22383
  const userAgent = `FSS-Link/${version} (${process.platform}; ${process.arch})`;
22384
22384
  const baseHeaders = {
22385
22385
  "User-Agent": userAgent
@@ -371813,6 +371813,24 @@ var FSSLinkDatabase = class {
371813
371813
  return result && result.id ? this.mapRowToModelConfig(result) : null;
371814
371814
  });
371815
371815
  }
371816
+ /**
371817
+ * Get the first model configuration for a specific auth type (for provider settings lookup)
371818
+ */
371819
+ async getModelByAuthType(authType) {
371820
+ await this.ensureInitialized();
371821
+ return await this.pool.withConnection(async (db) => {
371822
+ const query = `
371823
+ SELECT id, auth_type, model_name, endpoint_url, api_key, display_name,
371824
+ is_favorite, is_active, last_used, created_at, source
371825
+ FROM model_configs
371826
+ WHERE auth_type = ?
371827
+ ORDER BY id ASC
371828
+ LIMIT 1
371829
+ `;
371830
+ const result = await this.queryOptimizer.executeQuerySingle(db, query, [authType]);
371831
+ return result && result.id ? this.mapRowToModelConfig(result) : null;
371832
+ });
371833
+ }
371816
371834
  /**
371817
371835
  * Set a model as active (and deactivate all others)
371818
371836
  */
@@ -372642,13 +372660,14 @@ var ModelManager = class {
372642
372660
  */
372643
372661
  async updateEnvironmentFromModel(model) {
372644
372662
  let settings = {};
372645
- if (model.id) {
372646
- try {
372647
- const db = await this.getDb();
372648
- settings = await db.getProviderSettings(model.id);
372649
- } catch (error) {
372650
- console.warn("Failed to load provider settings:", error);
372663
+ try {
372664
+ const db = await this.getDb();
372665
+ const providerModel = await db.getModelByAuthType(model.authType);
372666
+ if (providerModel && providerModel.id) {
372667
+ settings = await db.getProviderSettings(providerModel.id);
372651
372668
  }
372669
+ } catch (error) {
372670
+ console.warn("Failed to load provider settings:", error);
372652
372671
  }
372653
372672
  switch (model.authType) {
372654
372673
  // Handle both AuthType enum and string values
@@ -373566,7 +373585,7 @@ async function getPackageJson() {
373566
373585
  // packages/cli/src/utils/version.ts
373567
373586
  async function getCliVersion() {
373568
373587
  const pkgJson = await getPackageJson();
373569
- return "1.0.79";
373588
+ return "1.0.80";
373570
373589
  }
373571
373590
 
373572
373591
  // packages/cli/src/ui/commands/aboutCommand.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fss-link",
3
- "version": "1.0.79",
3
+ "version": "1.0.80",
4
4
  "engines": {
5
5
  "node": ">=20.0.0"
6
6
  },