@supanadit/morse-web 0.14.0 → 0.14.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/server.mjs +13 -8
- package/dist/server.mjs.map +2 -2
- package/dist/ui/{chunk-CwVAC7xx.js → chunk-BDxa4PZ6.js} +1 -1
- package/dist/ui/{chunk-Dk_j780x.js → chunk-BLn-qnxQ.js} +1 -1
- package/dist/ui/{chunk-veepV9dF.js → chunk-fviAHFag.js} +1 -1
- package/dist/ui/index.html +1 -1
- package/dist/ui/{main-L3KG4R7V.js → main-YPK6Y6LK.js} +3 -3
- package/dist/ui/webview.manifest.json +2 -2
- package/package.json +1 -1
package/dist/server.mjs
CHANGED
|
@@ -1409,24 +1409,29 @@ var PiRpcAgent = class {
|
|
|
1409
1409
|
provider: model.provider,
|
|
1410
1410
|
modelId: model.id
|
|
1411
1411
|
});
|
|
1412
|
-
|
|
1413
|
-
|
|
1412
|
+
const thinking = await this.readThinkingLevels();
|
|
1413
|
+
this.patchState({
|
|
1414
|
+
model: data ? toModelRef(data) : model,
|
|
1415
|
+
...thinking
|
|
1416
|
+
});
|
|
1414
1417
|
}
|
|
1415
1418
|
/**
|
|
1416
|
-
*
|
|
1417
|
-
*
|
|
1419
|
+
* The levels the current model supports, and the level pi settled on (a model
|
|
1420
|
+
* without reasoning resets it to `off`). Returns a patch with nothing to say
|
|
1421
|
+
* when pi did not answer, so the caller keeps the last known levels instead of
|
|
1422
|
+
* inventing the full list — a failed refresh must not make the picker wrong.
|
|
1418
1423
|
*/
|
|
1419
|
-
async
|
|
1424
|
+
async readThinkingLevels() {
|
|
1420
1425
|
const [levels, state] = await Promise.all([
|
|
1421
1426
|
this.client.request({ type: "get_available_thinking_levels" }).catch(() => void 0),
|
|
1422
1427
|
this.client.request({ type: "get_state" }).catch(() => void 0)
|
|
1423
1428
|
]);
|
|
1424
1429
|
const available = dedupeThinkingLevels((levels?.levels ?? []).map(toThinkingLevel).filter(isDefined2));
|
|
1425
1430
|
const thinkingLevel = state ? toThinkingLevel(state.thinkingLevel) : void 0;
|
|
1426
|
-
|
|
1427
|
-
|
|
1431
|
+
return {
|
|
1432
|
+
...available.length > 0 ? { availableThinkingLevels: available } : {},
|
|
1428
1433
|
...thinkingLevel !== void 0 ? { thinkingLevel } : {}
|
|
1429
|
-
}
|
|
1434
|
+
};
|
|
1430
1435
|
}
|
|
1431
1436
|
async setThinkingLevel(level) {
|
|
1432
1437
|
await this.client.request({ type: "set_thinking_level", level });
|