| 275 | /** Run `/ctx-session-upgrade` for the session (full recomp + once-per-project |
| 276 | * memory migration). Fired from the upgrade dialog's "Run upgrade now" action. */ |
| 277 | export async function requestUpgrade(sessionId: string): Promise<boolean> { |
| 278 | if (!rpcClient) return false; |
| 279 | try { |
| 280 | const result = await rpcClient.call<{ ok: boolean }>("upgrade", { sessionId }); |
| 281 | return result.ok ?? false; |
| 282 | } catch { |
| 283 | return false; |
| 284 | } |
| 285 | } |
| 286 | |
| 287 | /** Mark the upgrade reminder dismissed (the user made an explicit Confirm/Cancel |
| 288 | * choice), setting the durable stamp so the FRESH dialog won't re-show. Resume |