agent-mp 0.5.41 → 0.5.42
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/commands/repl.js +12 -4
- package/dist/utils/deepseek.d.ts +1 -0
- package/dist/utils/deepseek.js +1 -0
- package/package.json +1 -1
package/dist/commands/repl.js
CHANGED
|
@@ -12,7 +12,7 @@ import { log } from '../utils/logger.js';
|
|
|
12
12
|
import { AgentEngine, ExitError } from '../core/engine.js';
|
|
13
13
|
import { qwenAuthStatus, QWEN_AGENT_HOME, fetchQwenModels, loadApiKeyConfig, saveApiKeyConfig, fetchApiKeyModels, DEFAULT_API_BASE_URL } from '../utils/qwen-auth.js';
|
|
14
14
|
import { loadGeminiApiKey, saveGeminiApiKey, geminiAuthStatus, deleteGeminiApiKey, GEMINI_MODELS, fetchGeminiModels } from '../utils/gemini.js';
|
|
15
|
-
import { loadDeepSeekApiKey, saveDeepSeekApiKey, deleteDeepSeekApiKey, fetchDeepSeekModels } from '../utils/deepseek.js';
|
|
15
|
+
import { loadDeepSeekApiKey, saveDeepSeekApiKey, deleteDeepSeekApiKey, fetchDeepSeekModels, DEEPSEEK_DEFAULT_MODELS } from '../utils/deepseek.js';
|
|
16
16
|
import { renderWelcomePanel, renderHelpHint, renderSectionBox, renderMultiSectionBox } from '../ui/theme.js';
|
|
17
17
|
import { FixedInput } from '../ui/input.js';
|
|
18
18
|
import { newSession, saveSession } from '../utils/sessions.js';
|
|
@@ -416,10 +416,16 @@ async function promptDeepseekKeySetup(rl, askFn) {
|
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
418
|
else {
|
|
419
|
-
console.log(chalk.yellow(' No se pudieron cargar modelos de la API.'));
|
|
420
|
-
|
|
421
|
-
|
|
419
|
+
console.log(chalk.yellow(' No se pudieron cargar modelos de la API — usando defaults.'));
|
|
420
|
+
DEEPSEEK_DEFAULT_MODELS.forEach((m, i) => console.log(chalk.dim(` ${i + 1}. ${m}`)));
|
|
421
|
+
const pick = await askFn(` Modelo [${chosenModel}]: `);
|
|
422
|
+
const num = parseInt(pick.trim());
|
|
423
|
+
if (!isNaN(num) && num >= 1 && num <= DEEPSEEK_DEFAULT_MODELS.length) {
|
|
424
|
+
chosenModel = DEEPSEEK_DEFAULT_MODELS[num - 1];
|
|
425
|
+
}
|
|
426
|
+
else if (pick.trim()) {
|
|
422
427
|
chosenModel = pick.trim();
|
|
428
|
+
}
|
|
423
429
|
}
|
|
424
430
|
await saveDeepSeekApiKey({ api_key: resolvedKey, model: chosenModel });
|
|
425
431
|
console.log(chalk.green(`\n ✓ DeepSeek API key guardada — ${chosenModel}\n`));
|
|
@@ -803,6 +809,8 @@ async function cmdModels(roleArg, fi, rl) {
|
|
|
803
809
|
else if (isDeepSeekActive || activeProvider === 'deepseek') {
|
|
804
810
|
console.log(chalk.dim(' Fetching DeepSeek models...'));
|
|
805
811
|
models = await fetchDeepSeekModels(deepseekCfg);
|
|
812
|
+
if (!models.length)
|
|
813
|
+
models = DEEPSEEK_DEFAULT_MODELS;
|
|
806
814
|
}
|
|
807
815
|
else if (activeProvider === 'qwen') {
|
|
808
816
|
console.log(chalk.dim(' Fetching Qwen models...'));
|
package/dist/utils/deepseek.d.ts
CHANGED
|
@@ -10,4 +10,5 @@ export declare function deepseekAuthStatus(): Promise<{
|
|
|
10
10
|
model?: string;
|
|
11
11
|
}>;
|
|
12
12
|
export declare function callDeepSeekAPI(prompt: string, model?: string, onData?: (chunk: string) => void): Promise<string>;
|
|
13
|
+
export declare const DEEPSEEK_DEFAULT_MODELS: string[];
|
|
13
14
|
export declare function fetchDeepSeekModels(cfg?: DeepSeekKeyConfig | null): Promise<string[]>;
|
package/dist/utils/deepseek.js
CHANGED
|
@@ -94,6 +94,7 @@ export async function callDeepSeekAPI(prompt, model = 'deepseek-chat', onData) {
|
|
|
94
94
|
}
|
|
95
95
|
throw lastErr;
|
|
96
96
|
}
|
|
97
|
+
export const DEEPSEEK_DEFAULT_MODELS = ['deepseek-chat', 'deepseek-reasoner'];
|
|
97
98
|
export async function fetchDeepSeekModels(cfg) {
|
|
98
99
|
const resolved = cfg ?? await loadDeepSeekApiKey();
|
|
99
100
|
if (!resolved?.api_key)
|