fss-link 1.1.3 → 1.1.5
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 +47 -30
- package/package.json +1 -1
package/bundle/fss-link.js
CHANGED
|
@@ -8710,7 +8710,9 @@ var init_metrics = __esm({
|
|
|
8710
8710
|
ValueType = otelApi.ValueType;
|
|
8711
8711
|
openTelemetryAvailable = true;
|
|
8712
8712
|
} catch (error) {
|
|
8713
|
-
|
|
8713
|
+
if (process.env["FSS_DEBUG"] === "true") {
|
|
8714
|
+
console.debug("OpenTelemetry unavailable, using fallback metrics system");
|
|
8715
|
+
}
|
|
8714
8716
|
openTelemetryAvailable = false;
|
|
8715
8717
|
metrics = { getMeter: () => null };
|
|
8716
8718
|
ValueType = { INT: "int" };
|
|
@@ -11081,7 +11083,9 @@ var init_sdk = __esm({
|
|
|
11081
11083
|
HttpInstrumentation = otelInstrumentationHttp.HttpInstrumentation;
|
|
11082
11084
|
openTelemetryAvailable2 = true;
|
|
11083
11085
|
} catch (error) {
|
|
11084
|
-
|
|
11086
|
+
if (process.env["FSS_DEBUG"] === "true") {
|
|
11087
|
+
console.debug("OpenTelemetry SDK unavailable, telemetry disabled");
|
|
11088
|
+
}
|
|
11085
11089
|
openTelemetryAvailable2 = false;
|
|
11086
11090
|
}
|
|
11087
11091
|
if (openTelemetryAvailable2 && diag && DiagConsoleLogger && DiagLogLevel) {
|
|
@@ -11601,7 +11605,9 @@ var init_loggers = __esm({
|
|
|
11601
11605
|
SemanticAttributes = otelSemanticConventions.SemanticAttributes;
|
|
11602
11606
|
openTelemetryAvailable3 = true;
|
|
11603
11607
|
} catch (error) {
|
|
11604
|
-
|
|
11608
|
+
if (process.env["FSS_DEBUG"] === "true") {
|
|
11609
|
+
console.debug("OpenTelemetry loggers unavailable, using stubs");
|
|
11610
|
+
}
|
|
11605
11611
|
openTelemetryAvailable3 = false;
|
|
11606
11612
|
LogAttributes = {};
|
|
11607
11613
|
LogRecord = class {
|
|
@@ -22084,7 +22090,7 @@ async function createContentGeneratorConfig(config, authType) {
|
|
|
22084
22090
|
async function createContentGenerator(config, gcConfig, sessionId2) {
|
|
22085
22091
|
if (DEBUG_CONTENT)
|
|
22086
22092
|
console.log(`\u{1F41B} DEBUG createContentGenerator: authType=${config.authType}, apiKey=${config.apiKey}, baseUrl=${config.baseUrl}`);
|
|
22087
|
-
const version = "1.1.
|
|
22093
|
+
const version = "1.1.5";
|
|
22088
22094
|
const userAgent = `FSS-Link/${version} (${process.platform}; ${process.arch})`;
|
|
22089
22095
|
const baseHeaders = {
|
|
22090
22096
|
"User-Agent": userAgent
|
|
@@ -81842,7 +81848,9 @@ var init_databaseMigrations = __esm({
|
|
|
81842
81848
|
const currentVersion = this.getCurrentVersion(db);
|
|
81843
81849
|
const latestVersion = this.getLatestVersion();
|
|
81844
81850
|
if (currentVersion >= latestVersion) {
|
|
81845
|
-
|
|
81851
|
+
if (process.env["FSS_DEBUG"] === "true") {
|
|
81852
|
+
console.log(`Database is up to date (version ${currentVersion})`);
|
|
81853
|
+
}
|
|
81846
81854
|
return;
|
|
81847
81855
|
}
|
|
81848
81856
|
console.log(`Migrating database from version ${currentVersion} to ${latestVersion}`);
|
|
@@ -82546,7 +82554,9 @@ var init_core_database = __esm({
|
|
|
82546
82554
|
]);
|
|
82547
82555
|
insertStmt.free();
|
|
82548
82556
|
}
|
|
82549
|
-
|
|
82557
|
+
if (process.env["FSS_DEBUG"] === "true") {
|
|
82558
|
+
console.log(`Created ${defaultConfigs.length} default model configurations`);
|
|
82559
|
+
}
|
|
82550
82560
|
}
|
|
82551
82561
|
/**
|
|
82552
82562
|
* Get current database schema version
|
|
@@ -83032,7 +83042,7 @@ var DEBUG_DB, DatabaseError, dbQueue;
|
|
|
83032
83042
|
var init_database_utils = __esm({
|
|
83033
83043
|
"packages/cli/src/config/database-utils.ts"() {
|
|
83034
83044
|
init_database_queue();
|
|
83035
|
-
DEBUG_DB =
|
|
83045
|
+
DEBUG_DB = process.env["FSS_DEBUG"] === "true" || process.env["NODE_ENV"] === "development" || process.env["FSS_DB_DEBUG"] === "true";
|
|
83036
83046
|
DatabaseError = class extends Error {
|
|
83037
83047
|
constructor(message, cause) {
|
|
83038
83048
|
super(message);
|
|
@@ -84879,11 +84889,11 @@ var init_modelManager = __esm({
|
|
|
84879
84889
|
const db2 = await this.getDb();
|
|
84880
84890
|
const existingSettings = await db2.getProviderSettings(modelId);
|
|
84881
84891
|
if (!existingSettings["num_ctx"]) {
|
|
84882
|
-
console.log(`Creating provider settings for model ${modelId}`);
|
|
84883
|
-
console.log(`\u2705 Created default provider settings for Ollama model ${modelId}: num_ctx=32768`);
|
|
84892
|
+
if (DEBUG_MODEL) console.log(`Creating provider settings for model ${modelId}`);
|
|
84893
|
+
if (DEBUG_MODEL) console.log(`\u2705 Created default provider settings for Ollama model ${modelId}: num_ctx=32768`);
|
|
84884
84894
|
}
|
|
84885
84895
|
} catch (error) {
|
|
84886
|
-
console.warn("Failed to initialize provider settings for new model:", error);
|
|
84896
|
+
if (DEBUG_MODEL) console.warn("Failed to initialize provider settings for new model:", error);
|
|
84887
84897
|
}
|
|
84888
84898
|
}
|
|
84889
84899
|
await this.updateEnvironmentFromModel(config);
|
|
@@ -84914,7 +84924,7 @@ var init_modelManager = __esm({
|
|
|
84914
84924
|
await this.updateEnvironmentFromModel(config);
|
|
84915
84925
|
if (this.configRef && this.configRef.setModel) {
|
|
84916
84926
|
this.configRef.setModel(modelName);
|
|
84917
|
-
console.log(`\u{1F527} Notified Config of model change: ${modelName}`);
|
|
84927
|
+
if (DEBUG_MODEL) console.log(`\u{1F527} Notified Config of model change: ${modelName}`);
|
|
84918
84928
|
}
|
|
84919
84929
|
return modelId;
|
|
84920
84930
|
}
|
|
@@ -84938,7 +84948,7 @@ var init_modelManager = __esm({
|
|
|
84938
84948
|
if (DEBUG_MODEL) console.log(`\u274C [MODEL-MANAGER] Failed to switch to model ID: ${modelId} - model not found`);
|
|
84939
84949
|
return false;
|
|
84940
84950
|
} catch (error) {
|
|
84941
|
-
console.error(`\u274C [MODEL-MANAGER] Failed to switch to model ID ${modelId}:`, error);
|
|
84951
|
+
if (DEBUG_MODEL) console.error(`\u274C [MODEL-MANAGER] Failed to switch to model ID ${modelId}:`, error);
|
|
84942
84952
|
return false;
|
|
84943
84953
|
}
|
|
84944
84954
|
}
|
|
@@ -84967,7 +84977,7 @@ var init_modelManager = __esm({
|
|
|
84967
84977
|
});
|
|
84968
84978
|
const modelToActivate = models[0];
|
|
84969
84979
|
if (!modelToActivate.id) {
|
|
84970
|
-
console.error(`\u274C [MODEL-MANAGER] Model missing ID, cannot activate`);
|
|
84980
|
+
if (DEBUG_MODEL) console.error(`\u274C [MODEL-MANAGER] Model missing ID, cannot activate`);
|
|
84971
84981
|
return false;
|
|
84972
84982
|
}
|
|
84973
84983
|
if (DEBUG_MODEL) {
|
|
@@ -84980,7 +84990,7 @@ var init_modelManager = __esm({
|
|
|
84980
84990
|
}
|
|
84981
84991
|
return true;
|
|
84982
84992
|
} catch (error) {
|
|
84983
|
-
console.error(`\u274C [MODEL-MANAGER] Failed to switch to auth type ${authType}:`, error);
|
|
84993
|
+
if (DEBUG_MODEL) console.error(`\u274C [MODEL-MANAGER] Failed to switch to auth type ${authType}:`, error);
|
|
84984
84994
|
return false;
|
|
84985
84995
|
}
|
|
84986
84996
|
}
|
|
@@ -85011,7 +85021,7 @@ var init_modelManager = __esm({
|
|
|
85011
85021
|
const db = await this.getDb();
|
|
85012
85022
|
const models = await db.getAllModelConfigs();
|
|
85013
85023
|
const modelConfigs = models.map((model) => model);
|
|
85014
|
-
console.log(`\u2705 [MODEL-MANAGER] Retrieved ${modelConfigs.length} models`);
|
|
85024
|
+
if (DEBUG_MODEL) console.log(`\u2705 [MODEL-MANAGER] Retrieved ${modelConfigs.length} models`);
|
|
85015
85025
|
return modelConfigs;
|
|
85016
85026
|
}
|
|
85017
85027
|
/**
|
|
@@ -85024,7 +85034,7 @@ var init_modelManager = __esm({
|
|
|
85024
85034
|
const db = await this.getDb();
|
|
85025
85035
|
const favoriteModels = await db.getFavoriteModels();
|
|
85026
85036
|
const modelConfigs = favoriteModels.map((model) => model);
|
|
85027
|
-
console.log(`\u2705 [MODEL-MANAGER] Retrieved ${modelConfigs.length} favorite models`);
|
|
85037
|
+
if (DEBUG_MODEL) console.log(`\u2705 [MODEL-MANAGER] Retrieved ${modelConfigs.length} favorite models`);
|
|
85028
85038
|
return modelConfigs;
|
|
85029
85039
|
}
|
|
85030
85040
|
/**
|
|
@@ -85037,7 +85047,7 @@ var init_modelManager = __esm({
|
|
|
85037
85047
|
const db = await this.getDb();
|
|
85038
85048
|
const recentModels = await db.getRecentlyUsedModels(limit2);
|
|
85039
85049
|
const modelConfigs = recentModels.map((model) => model);
|
|
85040
|
-
console.log(`\u2705 [MODEL-MANAGER] Retrieved ${modelConfigs.length} recent models`);
|
|
85050
|
+
if (DEBUG_MODEL) console.log(`\u2705 [MODEL-MANAGER] Retrieved ${modelConfigs.length} recent models`);
|
|
85041
85051
|
return modelConfigs;
|
|
85042
85052
|
}
|
|
85043
85053
|
/**
|
|
@@ -85054,7 +85064,7 @@ var init_modelManager = __esm({
|
|
|
85054
85064
|
return;
|
|
85055
85065
|
}
|
|
85056
85066
|
const newFavoriteStatus = await db.toggleModelFavorite(modelId);
|
|
85057
|
-
console.log(`\u2705 [MODEL-MANAGER] Model ID ${modelId} favorite status: ${newFavoriteStatus ? "enabled" : "disabled"}`);
|
|
85067
|
+
if (DEBUG_MODEL) console.log(`\u2705 [MODEL-MANAGER] Model ID ${modelId} favorite status: ${newFavoriteStatus ? "enabled" : "disabled"}`);
|
|
85058
85068
|
}
|
|
85059
85069
|
/**
|
|
85060
85070
|
* Delete a model configuration
|
|
@@ -85116,7 +85126,7 @@ var init_modelManager = __esm({
|
|
|
85116
85126
|
if (DEBUG_MODEL) console.log(`\u26A0\uFE0F [MODEL-MANAGER] No active model or auth type found`);
|
|
85117
85127
|
return void 0;
|
|
85118
85128
|
}
|
|
85119
|
-
console.log(`\u2705 [MODEL-MANAGER] Current auth type: ${activeModel.authType}`);
|
|
85129
|
+
if (DEBUG_MODEL) console.log(`\u2705 [MODEL-MANAGER] Current auth type: ${activeModel.authType}`);
|
|
85120
85130
|
return activeModel.authType;
|
|
85121
85131
|
}
|
|
85122
85132
|
/**
|
|
@@ -85132,7 +85142,7 @@ var init_modelManager = __esm({
|
|
|
85132
85142
|
if (DEBUG_MODEL) console.log(`\u26A0\uFE0F [MODEL-MANAGER] No active model or auth type found for FSS auth type`);
|
|
85133
85143
|
return void 0;
|
|
85134
85144
|
}
|
|
85135
|
-
console.log(`\u2705 [MODEL-MANAGER] Current FSS auth type: ${activeModel.authType}`);
|
|
85145
|
+
if (DEBUG_MODEL) console.log(`\u2705 [MODEL-MANAGER] Current FSS auth type: ${activeModel.authType}`);
|
|
85136
85146
|
return activeModel.authType;
|
|
85137
85147
|
}
|
|
85138
85148
|
/**
|
|
@@ -85149,7 +85159,7 @@ var init_modelManager = __esm({
|
|
|
85149
85159
|
settings = await db.getProviderSettings(model.id);
|
|
85150
85160
|
}
|
|
85151
85161
|
} catch (error) {
|
|
85152
|
-
console.warn("Failed to load provider settings:", error);
|
|
85162
|
+
if (DEBUG_MODEL) console.warn("Failed to load provider settings:", error);
|
|
85153
85163
|
}
|
|
85154
85164
|
await this.applyEnvironmentVariables(model, settings);
|
|
85155
85165
|
}
|
|
@@ -85202,7 +85212,7 @@ var init_modelManager = __esm({
|
|
|
85202
85212
|
case "qwen-oauth":
|
|
85203
85213
|
break;
|
|
85204
85214
|
default:
|
|
85205
|
-
console.warn(`Unknown auth type: ${model.authType}`);
|
|
85215
|
+
if (DEBUG_MODEL) console.warn(`Unknown auth type: ${model.authType}`);
|
|
85206
85216
|
break;
|
|
85207
85217
|
}
|
|
85208
85218
|
if (Object.keys(settings).length > 0) {
|
|
@@ -85228,10 +85238,10 @@ var init_modelManager = __esm({
|
|
|
85228
85238
|
samplingParams["top_k"] = parseInt(settings["top_k"], 10);
|
|
85229
85239
|
}
|
|
85230
85240
|
if (Object.keys(samplingParams).length > 0) {
|
|
85231
|
-
console.debug("Provider settings ready for application:", samplingParams);
|
|
85241
|
+
if (DEBUG_MODEL) console.debug("Provider settings ready for application:", samplingParams);
|
|
85232
85242
|
}
|
|
85233
85243
|
} catch (error) {
|
|
85234
|
-
console.warn("Failed to apply provider settings:", error);
|
|
85244
|
+
if (DEBUG_MODEL) console.warn("Failed to apply provider settings:", error);
|
|
85235
85245
|
}
|
|
85236
85246
|
}
|
|
85237
85247
|
/**
|
|
@@ -85252,7 +85262,7 @@ var init_modelManager = __esm({
|
|
|
85252
85262
|
settings = await db.getProviderSettings(activeModel.id);
|
|
85253
85263
|
if (DEBUG_MODEL) console.log(`\u{1F41B} DEBUG getCurrentSamplingParams: Retrieved settings for model ID ${activeModel.id}:`, settings);
|
|
85254
85264
|
} catch (dbError) {
|
|
85255
|
-
console.warn(`\u26A0\uFE0F Database connection issue for provider settings (non-critical):`, dbError);
|
|
85265
|
+
if (DEBUG_MODEL) console.warn(`\u26A0\uFE0F Database connection issue for provider settings (non-critical):`, dbError);
|
|
85256
85266
|
return {};
|
|
85257
85267
|
}
|
|
85258
85268
|
const samplingParams = {};
|
|
@@ -85271,7 +85281,7 @@ var init_modelManager = __esm({
|
|
|
85271
85281
|
if (DEBUG_MODEL) console.log(`\u{1F41B} DEBUG getCurrentSamplingParams: Final sampling params:`, samplingParams);
|
|
85272
85282
|
return samplingParams;
|
|
85273
85283
|
} catch (error) {
|
|
85274
|
-
console.warn("Failed to get current sampling params:", error);
|
|
85284
|
+
if (DEBUG_MODEL) console.warn("Failed to get current sampling params:", error);
|
|
85275
85285
|
return {};
|
|
85276
85286
|
}
|
|
85277
85287
|
}
|
|
@@ -94137,7 +94147,7 @@ async function getPackageJson() {
|
|
|
94137
94147
|
// packages/cli/src/utils/version.ts
|
|
94138
94148
|
async function getCliVersion() {
|
|
94139
94149
|
const pkgJson = await getPackageJson();
|
|
94140
|
-
return "1.1.
|
|
94150
|
+
return "1.1.5";
|
|
94141
94151
|
}
|
|
94142
94152
|
|
|
94143
94153
|
// packages/cli/src/ui/commands/aboutCommand.ts
|
|
@@ -94189,7 +94199,7 @@ import open4 from "open";
|
|
|
94189
94199
|
import process11 from "node:process";
|
|
94190
94200
|
|
|
94191
94201
|
// packages/cli/src/generated/git-commit.ts
|
|
94192
|
-
var GIT_COMMIT_INFO = "
|
|
94202
|
+
var GIT_COMMIT_INFO = "425b354b";
|
|
94193
94203
|
|
|
94194
94204
|
// packages/cli/src/ui/commands/bugCommand.ts
|
|
94195
94205
|
init_dist2();
|
|
@@ -117977,8 +117987,9 @@ import { useState as useState33 } from "react";
|
|
|
117977
117987
|
init_dist2();
|
|
117978
117988
|
init_settings();
|
|
117979
117989
|
init_database();
|
|
117990
|
+
var DEBUG_AUTH = process.env["FSS_DEBUG"] === "true" || process.env["NODE_ENV"] === "development";
|
|
117980
117991
|
var validateAuthMethod = (authMethod) => {
|
|
117981
|
-
console.log(`\u{1F510} [AUTH-SYSTEM] Legacy auth validation: ${authMethod}`);
|
|
117992
|
+
if (DEBUG_AUTH) console.log(`\u{1F510} [AUTH-SYSTEM] Legacy auth validation: ${authMethod}`);
|
|
117982
117993
|
loadEnvironment();
|
|
117983
117994
|
return validateAuthEnvironment(authMethod);
|
|
117984
117995
|
};
|
|
@@ -128177,7 +128188,9 @@ async function main() {
|
|
|
128177
128188
|
try {
|
|
128178
128189
|
const modelManager2 = getModelManager();
|
|
128179
128190
|
await modelManager2.initializeFromStore();
|
|
128180
|
-
|
|
128191
|
+
if (process.env["FSS_DEBUG"] === "true") {
|
|
128192
|
+
console.log("\u2705 Database-first model persistence initialized");
|
|
128193
|
+
}
|
|
128181
128194
|
} catch (error) {
|
|
128182
128195
|
console.warn("\u26A0\uFE0F Database initialization failed, falling back to environment variables:", error);
|
|
128183
128196
|
}
|
|
@@ -128196,6 +128209,10 @@ async function main() {
|
|
|
128196
128209
|
process.exit(1);
|
|
128197
128210
|
}
|
|
128198
128211
|
const argv = await parseArguments();
|
|
128212
|
+
if (argv.debug) {
|
|
128213
|
+
process.env["FSS_DEBUG"] = "true";
|
|
128214
|
+
process.env["FSS_DB_DEBUG"] = "true";
|
|
128215
|
+
}
|
|
128199
128216
|
const extensions = loadExtensions(workspaceRoot);
|
|
128200
128217
|
const config = await loadCliConfig(
|
|
128201
128218
|
settings.merged,
|