brainstorm-companion 2.0.5 → 2.0.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brainstorm-companion",
3
- "version": "2.0.5",
3
+ "version": "2.0.9",
4
4
  "description": "AI-assisted visual brainstorming companion",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
package/src/mcp.js CHANGED
@@ -317,6 +317,15 @@ Use clear_after_read: true between brainstorming rounds to avoid stale events.`,
317
317
  fs.writeFileSync(path.join(slotDir, '.label'), String(label), 'utf8');
318
318
  }
319
319
  } else {
320
+ // Single-screen mode: clear any existing slot dirs so server doesn't stay in comparison mode
321
+ try {
322
+ const entries = fs.readdirSync(this.sessionDir, { withFileTypes: true });
323
+ for (const entry of entries) {
324
+ if (entry.isDirectory() && entry.name.startsWith('slot-')) {
325
+ fs.rmSync(path.join(this.sessionDir, entry.name), { recursive: true, force: true });
326
+ }
327
+ }
328
+ } catch { /* ignore */ }
320
329
  filePath = path.join(this.sessionDir, `screen-${Date.now()}.html`);
321
330
  }
322
331
 
package/src/session.js CHANGED
@@ -111,6 +111,15 @@ class SessionManager {
111
111
  fs.writeFileSync(path.join(slotDir, '.label'), String(label), 'utf8');
112
112
  }
113
113
  } else {
114
+ // Single-screen mode: clear any existing slot dirs so server switches out of comparison mode
115
+ try {
116
+ const entries = fs.readdirSync(sessionDir, { withFileTypes: true });
117
+ for (const entry of entries) {
118
+ if (entry.isDirectory() && entry.name.startsWith('slot-')) {
119
+ fs.rmSync(path.join(sessionDir, entry.name), { recursive: true, force: true });
120
+ }
121
+ }
122
+ } catch { /* ignore */ }
114
123
  filePath = path.join(sessionDir, filename || `screen-${Date.now()}.html`);
115
124
  }
116
125