feat: add model connectivity tests and harden cursor heartbeats

This commit is contained in:
leookun
2026-08-24 09:57:28 +08:00
parent 6170778de9
commit 81a1afdae9
24 changed files with 790 additions and 111 deletions
+3 -3
View File
@@ -198,12 +198,12 @@ export const appStore = {
async updateCursorModel(hash: string, model: ModelInput) {
update({ cursorBusy: true, error: null });
try {
await api.updateModel(hash, model);
const updated = await api.updateModel(hash, model);
await appStore.refresh();
return true;
return updated;
} catch (cause) {
update({ error: cause instanceof Error ? cause.message : String(cause) });
return false;
return null;
} finally { update({ cursorBusy: false }); }
},