@songsid/agend 2.1.4-beta.3 → 2.1.4-beta.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.
@@ -6533,13 +6533,11 @@ When users create specialized instances, suggest these configurations:
6533
6533
  }
6534
6534
  catch { /* default restart */ }
6535
6535
  const warn = isModelCompatible(backendName, model) ? "" : `⚠️ "${model}" doesn't match ${backendName}'s usual pattern — passing through anyway.\n`;
6536
- if (strategy === "runtime") {
6537
- if (!this.instanceIpcClients.get(instanceName))
6538
- return `${warn}❌ ${instanceName} is not running.`;
6539
- this.pasteRawToClassicInstance(instanceName, `/model ${model}`);
6540
- return `${warn}✅ Switched ${instanceName} to \`${model}\` (runtime).${this.effortSuffix(instanceName)}`;
6536
+ if (strategy === "runtime" && !this.instanceIpcClients.get(instanceName)) {
6537
+ return `${warn}❌ ${instanceName} is not running.`;
6541
6538
  }
6542
- // restart: persist the model so the respawned CLI launches with it.
6539
+ // Persist either way: a runtime switch must survive the next respawn too,
6540
+ // or the instance silently reverts to the CLI default after a fleet restart.
6543
6541
  let persisted = false;
6544
6542
  if (this.fleetConfig?.instances[instanceName]) {
6545
6543
  this.fleetConfig.instances[instanceName].model = model;
@@ -6551,6 +6549,10 @@ When users create specialized instances, suggest these configurations:
6551
6549
  }
6552
6550
  if (!persisted)
6553
6551
  return `${warn}❌ Could not set model for ${instanceName}.`;
6552
+ if (strategy === "runtime") {
6553
+ this.pasteRawToClassicInstance(instanceName, `/model ${model}`);
6554
+ return `${warn}✅ Switched ${instanceName} to \`${model}\` (runtime).${this.effortSuffix(instanceName)}`;
6555
+ }
6554
6556
  await this.restartSingleInstance(instanceName);
6555
6557
  return `${warn}✅ Set ${instanceName} to \`${model}\` and restarted.${this.effortSuffix(instanceName)}`;
6556
6558
  }