prompt-forge-studio-cli 1.0.4 → 1.0.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prompt-forge-studio-cli",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Professional terminal-native prompt engineering studio",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -21,6 +21,6 @@
21
21
  "gradient-string": "^3.0.0",
22
22
  "inquirer": "^8.2.7",
23
23
  "ora": "^5.4.1",
24
- "prompt-forge-studio-cli": "^1.0.3"
24
+ "prompt-forge-studio-cli": "^1.0.4"
25
25
  }
26
26
  }
package/src/api.js CHANGED
@@ -76,8 +76,13 @@ async function executeWithFailover(prompt, primaryModel, autoFailover) {
76
76
  }
77
77
 
78
78
  // Auto-failover logic
79
- console.log(chalk.yellow(`\n⚠ Auto-failover triggered. ${primaryModel} failed.`));
80
- const allModels = ['gpt-4o', 'claude', 'gemini'].filter(m => m !== primaryModel);
79
+ if (primaryModel === 'gemini') {
80
+ console.log(chalk.red(`\n[!] Google Gemini API outage detected. Switching back to Nvidia API...`));
81
+ } else {
82
+ console.log(chalk.yellow(`\n⚠ Auto-failover triggered. ${primaryModel} failed.`));
83
+ }
84
+
85
+ const allModels = ['nvidia', 'gemini'].filter(m => m !== primaryModel);
81
86
 
82
87
  // Find next healthy model (simulated)
83
88
  for (const backup of allModels) {
package/src/health.js CHANGED
@@ -1,6 +1,6 @@
1
1
  const ora = require('ora');
2
2
 
3
- const MODELS = ['gpt-4o', 'claude', 'gemini'];
3
+ const MODELS = ['nvidia', 'gemini'];
4
4
 
5
5
  // Simulates checking latency and status for available models
6
6
  async function checkAllModelsHealth() {
package/src/init.js CHANGED
@@ -35,10 +35,12 @@ function initProject(projectName) {
35
35
  // Create files
36
36
  spinner.start('Generating configuration files...');
37
37
 
38
+ const pkg = require('../package.json');
39
+
38
40
  const configContent = {
39
41
  project: projectName,
40
- version: '1.0.0',
41
- defaultModel: 'gpt-4o',
42
+ version: pkg.version,
43
+ defaultModel: 'nvidia',
42
44
  autoFailover: true
43
45
  };
44
46
  fs.writeFileSync(
package/src/studio.js CHANGED
@@ -6,10 +6,10 @@ const { checkAllModelsHealth } = require('./health');
6
6
  const { showSessionPanel, showModelComparison, formatAIResponse, showInfoBox, showErrorBox } = require('./ui');
7
7
  const { getConfig } = require('./config');
8
8
 
9
- const AVAILABLE_MODELS = ['gpt-4o', 'claude', 'gemini'];
9
+ const AVAILABLE_MODELS = ['nvidia', 'gemini'];
10
10
 
11
11
  let state = {
12
- model: 'gpt-4o',
12
+ model: 'nvidia',
13
13
  status: 'Active',
14
14
  autoFailover: true
15
15
  };
@@ -110,7 +110,7 @@ async function handleCommand(input) {
110
110
 
111
111
  formatAIResponse(result.text, result.metadata);
112
112
  } catch (error) {
113
- showErrorBox('Generation Failed', error.message);
113
+ showErrorBox('Generation Failed', error.message || String(error));
114
114
  if (!state.autoFailover) {
115
115
  console.log(chalk.cyan('Hint: Try running `:test all` to check model health, or enable auto-failover with `:auto`.\n'));
116
116
  }