@phi-code-admin/phi-code 0.75.6 → 0.75.7

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.
@@ -2688,6 +2688,16 @@ export class InteractiveMode {
2688
2688
  // This prevents escape sequences from leaking to the parent shell over slow SSH.
2689
2689
  await this.ui.terminal.drainInput(1000);
2690
2690
  this.stop();
2691
+ // Flush pending settings writes (defaultProvider/defaultModel from /model,
2692
+ // theme changes, etc.) before process.exit so the user's choice survives
2693
+ // the next session. The settings writer is async (writeQueue) so without
2694
+ // this, process.exit(0) can race the file write and lose the update.
2695
+ try {
2696
+ await this.settingsManager.flush();
2697
+ }
2698
+ catch {
2699
+ // Persisting settings should never block shutdown — best effort.
2700
+ }
2691
2701
  await this.runtimeHost.dispose();
2692
2702
  process.exit(0);
2693
2703
  }