pi-llama-cpp 0.9.0 → 0.9.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-llama-cpp",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "description": "Pi extension for llama.cpp integration. Supports router, single and legacy models. Supports multiple servers.",
5
5
  "keywords": [
6
6
  "pi",
@@ -177,15 +177,20 @@ export class CommandManager {
177
177
  }
178
178
  };
179
179
 
180
+ const onFinished = async () => {
181
+ cleanupProgress();
182
+ EventManager.resetInflightModel();
183
+
184
+ // Re-scan providers to ensure accuracy of loaded models
185
+ await this.serverManager.update(pi);
186
+
187
+ // Force TUI refresh so Pi picks up the updated model states
188
+ ctx.ui.setStatus(PROVIDER_NAME, " ");
189
+ ctx.ui.setStatus(PROVIDER_NAME, undefined);
190
+ };
191
+
180
192
  // Load the model without blocking the UI
181
- model
182
- .load()
183
- .then(onSuccess)
184
- .catch(onFailure)
185
- .finally(() => {
186
- cleanupProgress();
187
- EventManager.resetInflightModel();
188
- });
193
+ model.load().then(onSuccess).catch(onFailure).finally(onFinished);
189
194
  }
190
195
  }
191
196