micro-models-agent 0.11.0 → 0.12.1
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/cli/repl.js +42 -0
- package/dist/i18n/en.json +4 -2
- package/dist/i18n/ru.json +4 -0
- package/package.json +1 -1
package/dist/cli/repl.js
CHANGED
|
@@ -20,6 +20,8 @@ const COMMAND_GROUPS = {
|
|
|
20
20
|
reasoning: "agent",
|
|
21
21
|
provider: "agent",
|
|
22
22
|
model: "agent",
|
|
23
|
+
context: "agent",
|
|
24
|
+
reload: "agent",
|
|
23
25
|
wizard: "agent",
|
|
24
26
|
sessions: "session",
|
|
25
27
|
new: "session",
|
|
@@ -307,6 +309,46 @@ export class Repl {
|
|
|
307
309
|
console.log(pc.green(t("cli.context_set", { size })));
|
|
308
310
|
},
|
|
309
311
|
});
|
|
312
|
+
this.registerCommand({
|
|
313
|
+
name: "reload",
|
|
314
|
+
description: t("repl.reload"),
|
|
315
|
+
usage: t("repl.reload_usage"),
|
|
316
|
+
action: async () => {
|
|
317
|
+
console.log(pc.yellow(t("repl.reloading")));
|
|
318
|
+
// Save current session if auto-save enabled
|
|
319
|
+
if (this.sessionManager && this.config.session.autoSave) {
|
|
320
|
+
const active = this.sessionManager.getActiveMeta();
|
|
321
|
+
if (active) {
|
|
322
|
+
// Session is already auto-saved on each message
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
// Shutdown current agent
|
|
326
|
+
this.agent.shutdown();
|
|
327
|
+
// Reload config from disk
|
|
328
|
+
const { loadConfig } = await import("../config/config");
|
|
329
|
+
const { homedir } = await import("os");
|
|
330
|
+
const { join } = await import("path");
|
|
331
|
+
const configDir = join(homedir(), ".mma");
|
|
332
|
+
const projectConfigPath = join(process.cwd(), ".mmrc");
|
|
333
|
+
const freshConfig = loadConfig({ configDir, projectConfigPath });
|
|
334
|
+
// Update config reference
|
|
335
|
+
Object.assign(this.config, freshConfig);
|
|
336
|
+
// Recreate agent with new config (re-bootstrap)
|
|
337
|
+
const { bootstrap } = await import("../core/bootstrap");
|
|
338
|
+
const result = await bootstrap(configDir, process.cwd(), this.noAgentsMd, false);
|
|
339
|
+
// Replace agent and related components
|
|
340
|
+
this.agent = result.agent;
|
|
341
|
+
this.sessionManager = result.sessionManager;
|
|
342
|
+
this.skillsModule = result.skillsModule;
|
|
343
|
+
this.pluginManager = result.pluginManager;
|
|
344
|
+
// Update completer with new session/skill data
|
|
345
|
+
this.setupCompleter();
|
|
346
|
+
console.log(pc.green(t("repl.reloaded")));
|
|
347
|
+
console.log(`${t("repl.model")} ${this.config.model}`);
|
|
348
|
+
console.log(`${t("repl.context")} ${this.config.contextWindow}`);
|
|
349
|
+
console.log(`${t("repl.provider")} ${this.config.provider.type} @ ${this.config.provider.baseUrl}`);
|
|
350
|
+
},
|
|
351
|
+
});
|
|
310
352
|
}
|
|
311
353
|
registerSessionCommands() {
|
|
312
354
|
if (!this.sessionManager)
|
package/dist/i18n/en.json
CHANGED
|
@@ -185,8 +185,10 @@
|
|
|
185
185
|
"cli.manage_context": "Manage context window",
|
|
186
186
|
"cli.invalid_context_size": "Invalid context size. Must be a number >= 1024",
|
|
187
187
|
"cli.context_set": "Context window set to: {size} tokens",
|
|
188
|
-
"
|
|
189
|
-
"
|
|
188
|
+
"repl.reload": "Reload agent with current config",
|
|
189
|
+
"repl.reload_usage": "Usage: /reload",
|
|
190
|
+
"repl.reloading": "Reloading agent...",
|
|
191
|
+
"repl.reloaded": "Agent reloaded",
|
|
190
192
|
"cli.set_model": "Set default model",
|
|
191
193
|
"cli.model_set": "Model set to: {name}",
|
|
192
194
|
"cli.manage_providers": "Manage providers",
|
package/dist/i18n/ru.json
CHANGED
|
@@ -317,6 +317,10 @@
|
|
|
317
317
|
"repl.model_current": "Текущая модель",
|
|
318
318
|
"repl.model_set": "Модель установлена: {name}",
|
|
319
319
|
"repl.model_usage": "Использование: /model list | /model use <имя>",
|
|
320
|
+
"repl.reload": "Перезагрузить агента с текущим конфигом",
|
|
321
|
+
"repl.reload_usage": "Использование: /reload",
|
|
322
|
+
"repl.reloading": "Перезагрузка агента...",
|
|
323
|
+
"repl.reloaded": "Агент перезагружен",
|
|
320
324
|
"repl.group.general": "Общее",
|
|
321
325
|
"repl.group.agent": "Агент",
|
|
322
326
|
"repl.group.session": "Сессии",
|