@evandu/super-pi 0.1.127 → 0.1.128

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.
Files changed (31) hide show
  1. package/dist/.super-pi-check-inputs.json +2 -2
  2. package/dist/client/.super-pi-client-sources.json +4 -4
  3. package/dist/client/assets/{CodeMirrorEditor-DpbDVB1W.js → CodeMirrorEditor-BhxCTVTL.js} +2 -2
  4. package/dist/client/assets/{dist-Uvt7BHub.js → dist-5LsaarOt.js} +1 -1
  5. package/dist/client/assets/{dist-ik9WKwIy.js → dist-8-xcbQPp.js} +1 -1
  6. package/dist/client/assets/{dist-DkWOTrCe.js → dist-AtHUPHQe.js} +1 -1
  7. package/dist/client/assets/{dist-3JbohZwT.js → dist-BAmT9jUI.js} +1 -1
  8. package/dist/client/assets/{dist-NukDmwGc.js → dist-BJZUzzzf.js} +1 -1
  9. package/dist/client/assets/{dist-Dx5uAXkp.js → dist-BPBlgusB.js} +1 -1
  10. package/dist/client/assets/{dist-CbkhMDE7.js → dist-BQK4xccN.js} +1 -1
  11. package/dist/client/assets/{dist-XSLGDk_-.js → dist-BeYwU1xB.js} +1 -1
  12. package/dist/client/assets/{dist-CZ_MzICk.js → dist-BfwwrK33.js} +1 -1
  13. package/dist/client/assets/{dist-DL2rVK6z.js → dist-Bof_dYLf.js} +1 -1
  14. package/dist/client/assets/{dist-NOyudbxD.js → dist-Bplw4N5j.js} +1 -1
  15. package/dist/client/assets/{dist-BTxdkV1I.js → dist-Bw8QOdGP.js} +1 -1
  16. package/dist/client/assets/{dist-DhVx85Hi.js → dist-C-hIztMW.js} +1 -1
  17. package/dist/client/assets/{dist-zedNmYPO.js → dist-Cl87QYqE.js} +1 -1
  18. package/dist/client/assets/{dist-C30Mvvko.js → dist-DERv1ty2.js} +1 -1
  19. package/dist/client/assets/{dist-H1xOj1sR.js → dist-DTXHzd8a.js} +1 -1
  20. package/dist/client/assets/{dist-kPkvm0f9.js → dist-DVBpWkDV.js} +1 -1
  21. package/dist/client/assets/{dist-CKY9oRoB.js → dist-Dc6xSTJL.js} +1 -1
  22. package/dist/client/assets/{dist-j9nf5NbD.js → dist-DobX-p1U.js} +1 -1
  23. package/dist/client/assets/{dist-CBqTq6Rd.js → dist-K96Y1Tut.js} +1 -1
  24. package/dist/client/assets/{dist-Cv9yhljh.js → dist-YUFYdtGJ.js} +1 -1
  25. package/dist/client/assets/{dist-qTKaDyIl.js → dist-icIMVISS.js} +1 -1
  26. package/dist/client/assets/{index-BAaymrG2.css → index-B8GInEf1.css} +1 -1
  27. package/dist/client/assets/{index-DvxaTOG8.js → index-BvQ3umhR.js} +2 -2
  28. package/dist/client/index.html +2 -2
  29. package/dist/server/runtime.js +3 -19
  30. package/dist/server/ws-server.js +3 -1
  31. package/package.json +1 -1
@@ -8,8 +8,8 @@
8
8
  <link rel="alternate icon" href="/favicon.ico" />
9
9
  <link rel="apple-touch-icon" href="/favicon.svg" />
10
10
  <title>Super Pi</title>
11
- <script type="module" crossorigin src="/assets/index-DvxaTOG8.js"></script>
12
- <link rel="stylesheet" crossorigin href="/assets/index-BAaymrG2.css">
11
+ <script type="module" crossorigin src="/assets/index-BvQ3umhR.js"></script>
12
+ <link rel="stylesheet" crossorigin href="/assets/index-B8GInEf1.css">
13
13
  </head>
14
14
  <body>
15
15
  <div id="root"></div>
@@ -2421,26 +2421,10 @@ export class PiRpcRuntime {
2421
2421
  if (!models.length)
2422
2422
  return unavailable("Pi's SDK reported no usable models");
2423
2423
  const pick = (model) => (model ? { provider: model.provider, modelId: model.modelId, label: model.label } : undefined);
2424
- // The levels belong to the SELECTED model, so they are asked of the model in question rather
2425
- // than of whatever Pi would have defaulted to.
2426
- //
2427
- // A MODEL THIS PI DOES NOT KNOW IS NOT A REASON TO THROW THE WHOLE READ AWAY. The MODEL LIST
2428
- // does not depend on the selection at all - it is the same list for every conversation - so
2429
- // abandoning it because one model's levels are unknown turns "the model this session used was
2430
- // removed" into "the picker is empty", which is the exact opposite of what the person needs
2431
- // at that moment. Measured before this change: removing the model in use produced a catalog
2432
- // with `source: "unavailable"` and ZERO models, and the spawned fallback that produced it had
2433
- // only reached its own `set_model` rejection ("Model not found").
2434
- //
2435
- // The levels then come from Pi's default model, because that is the model a turn on a
2436
- // nonexistent model actually runs on (the session cannot resolve it and falls back), so they
2437
- // describe the model in force rather than a different one.
2424
+ // Unknown levels do not invalidate the SDK model list or imply an external Pi.
2425
+ // Keep the catalog usable without spawning a process or borrowing another model's levels.
2438
2426
  const forModel = selection ?? reader.defaultModel;
2439
- let levels = forModel ? await reader.thinkingLevelsFor(forModel) : undefined;
2440
- if (forModel && !levels && reader.defaultModel) {
2441
- levels = await reader.thinkingLevelsFor(reader.defaultModel);
2442
- }
2443
- const levelNames = levels ?? [];
2427
+ const levelNames = (forModel ? await reader.thinkingLevelsFor(forModel) : undefined) ?? [];
2444
2428
  const value = {
2445
2429
  source: "pi",
2446
2430
  models,
@@ -255,8 +255,10 @@ export class WsServer {
255
255
  socket.send(JSON.stringify(event));
256
256
  }
257
257
  }, remoteAddress);
258
- if (command.operationRequestId)
258
+ // Void-returning configuration commands also need an ack to release optimistic UI state.
259
+ if (command.operationRequestId && socket.readyState === WebSocket.OPEN) {
259
260
  socket.send(JSON.stringify({ type: "operation.result", requestId: command.operationRequestId, ok: true, entityId }));
261
+ }
260
262
  }
261
263
  catch (error) {
262
264
  if (command?.operationRequestId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evandu/super-pi",
3
- "version": "0.1.127",
3
+ "version": "0.1.128",
4
4
  "description": "Web control plane and companion for Pi",
5
5
  "license": "MIT",
6
6
  "type": "module",