fix: align pi model discovery with auth storage

This commit is contained in:
Peter Steinberger
2025-12-26 11:49:13 +01:00
parent d31c5d7a2c
commit 82ced33747
6 changed files with 90 additions and 63 deletions

View File

@@ -325,9 +325,7 @@ export function subscribeEmbeddedPiSession(params: {
if (evt.type === "auto_compaction_end") {
compactionInFlight = false;
const willRetry = Boolean(
(evt as { willRetry?: unknown }).willRetry,
);
const willRetry = Boolean((evt as { willRetry?: unknown }).willRetry);
if (willRetry) {
noteCompactionRetry();
resetForCompactionRetry();
@@ -357,7 +355,7 @@ export function subscribeEmbeddedPiSession(params: {
ensureCompactionPromise();
return compactionRetryPromise ?? Promise.resolve();
}
return new Promise((resolve) => {
return new Promise<void>((resolve) => {
queueMicrotask(() => {
if (compactionInFlight || pendingCompactionRetry > 0) {
ensureCompactionPromise();