@nomad-e/bluma-cli 0.0.111 → 0.0.112
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/dist/main.js +11 -9
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -4974,7 +4974,7 @@ var LLMService = class {
|
|
|
4974
4974
|
constructor(config2) {
|
|
4975
4975
|
this.client = new OpenAI({
|
|
4976
4976
|
apiKey: config2.apiKey,
|
|
4977
|
-
baseURL: config2.baseUrl || "
|
|
4977
|
+
baseURL: config2.baseUrl || ""
|
|
4978
4978
|
});
|
|
4979
4979
|
this.defaultModel = config2.model || "";
|
|
4980
4980
|
}
|
|
@@ -5478,35 +5478,37 @@ var Agent = class {
|
|
|
5478
5478
|
const apiKey = process.env.NOMAD_API_KEY;
|
|
5479
5479
|
const baseUrl = process.env.NOMAD_BASE_URL;
|
|
5480
5480
|
this.model = process.env.MODEL_NOMAD || "";
|
|
5481
|
-
|
|
5481
|
+
const requiredEnvVars = ["NOMAD_API_KEY", "NOMAD_BASE_URL"];
|
|
5482
|
+
const missingEnvVars = requiredEnvVars.filter((v) => !process.env[v]);
|
|
5483
|
+
if (missingEnvVars.length > 0) {
|
|
5482
5484
|
const platform = process.platform;
|
|
5483
5485
|
let guidance = "";
|
|
5484
5486
|
if (platform === "win32") {
|
|
5485
5487
|
guidance = [
|
|
5486
5488
|
"Windows (PowerShell):",
|
|
5487
|
-
|
|
5489
|
+
...missingEnvVars.map((v) => ` $env:${v}="<your-value>"`),
|
|
5488
5490
|
" # Para persistir:",
|
|
5489
|
-
|
|
5491
|
+
...missingEnvVars.map((v) => ` [System.Environment]::SetEnvironmentVariable("${v}", "<your-value>", "User")`)
|
|
5490
5492
|
].join("\n");
|
|
5491
5493
|
} else if (platform === "darwin" || platform === "linux") {
|
|
5492
5494
|
guidance = [
|
|
5493
5495
|
"macOS/Linux (bash/zsh):",
|
|
5494
|
-
` echo 'export
|
|
5496
|
+
...missingEnvVars.map((v) => ` echo 'export ${v}="<your-value>"' >> ~/.bashrc`),
|
|
5495
5497
|
" source ~/.bashrc"
|
|
5496
5498
|
].join("\n");
|
|
5497
5499
|
} else {
|
|
5498
|
-
guidance =
|
|
5500
|
+
guidance = missingEnvVars.map((v) => ` export ${v}="<your-value>"`).join("\n");
|
|
5499
5501
|
}
|
|
5500
5502
|
const message2 = [
|
|
5501
|
-
|
|
5502
|
-
`Configure
|
|
5503
|
+
`Missing required environment variables: ${missingEnvVars.join(", ")}.`,
|
|
5504
|
+
`Configure them globally using the commands below, or set them in: ${globalEnvPath}`,
|
|
5503
5505
|
"",
|
|
5504
5506
|
guidance
|
|
5505
5507
|
].join("\n");
|
|
5506
5508
|
this.eventBus.emit("backend_message", {
|
|
5507
5509
|
type: "error",
|
|
5508
5510
|
code: "missing_env",
|
|
5509
|
-
missing:
|
|
5511
|
+
missing: missingEnvVars,
|
|
5510
5512
|
path: globalEnvPath,
|
|
5511
5513
|
message: message2
|
|
5512
5514
|
});
|