vibemon 1.9.2 → 1.9.3

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/main.js CHANGED
@@ -160,6 +160,22 @@ function handleWsStatusUpdate(data) {
160
160
  windowManager.sendToWindow(projectId, 'state-update', stateData);
161
161
  }
162
162
 
163
+ /**
164
+ * Handle project deletion from WebSocket ({type: 'delete', data: {project}}).
165
+ * Closes the window for the deleted project; windowManager.onWindowClosed
166
+ * cascades into stateManager.cleanupProject and tray refresh, so no extra
167
+ * bookkeeping is needed here. No-op when the project is unknown locally.
168
+ */
169
+ function handleWsStatusDelete(projectId) {
170
+ if (typeof projectId !== 'string' || projectId.length === 0) {
171
+ return;
172
+ }
173
+ if (!windowManager.getWindow(projectId)) {
174
+ return;
175
+ }
176
+ windowManager.closeWindow(projectId);
177
+ }
178
+
163
179
  // IPC handlers
164
180
  ipcMain.handle('get-version', () => {
165
181
  return app.getVersion();
@@ -321,6 +337,9 @@ app.whenReady().then(() => {
321
337
  wsClient.onStatusUpdate = (data) => {
322
338
  handleWsStatusUpdate(data);
323
339
  };
340
+ wsClient.onStatusDelete = (projectId) => {
341
+ handleWsStatusDelete(projectId);
342
+ };
324
343
  wsClient.onConnectionChange = () => {
325
344
  if (trayManager) {
326
345
  trayManager.updateMenu();
@@ -41,6 +41,7 @@ class WsClient {
41
41
 
42
42
  // Callbacks
43
43
  this.onStatusUpdate = null; // Called when status message received
44
+ this.onStatusDelete = null; // Called when {type:'delete'} received with project name
44
45
  this.onConnectionChange = null; // Called when connection state changes
45
46
  }
46
47
 
@@ -240,6 +241,15 @@ class WsClient {
240
241
  return;
241
242
  }
242
243
 
244
+ // Handle project deletion (server sends {type: "delete", data: {project}})
245
+ // Emitted by DELETE /api/status?project=X on the server side.
246
+ if (message.type === 'delete' && message.data && typeof message.data.project === 'string') {
247
+ if (this.onStatusDelete) {
248
+ this.onStatusDelete(message.data.project);
249
+ }
250
+ return;
251
+ }
252
+
243
253
  // Handle status update (direct format: {state: "..."})
244
254
  if (message.state) {
245
255
  if (this.onStatusUpdate) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibemon",
3
- "version": "1.9.2",
3
+ "version": "1.9.3",
4
4
  "description": "AI assistant status monitor",
5
5
  "main": "main.js",
6
6
  "bin": {
@@ -37,8 +37,8 @@
37
37
 
38
38
  "PROJECT_NAME_MAX_LENGTH": 20,
39
39
  "PROJECT_NAME_TRUNCATE_AT": 17,
40
- "MODEL_NAME_MAX_LENGTH": 14,
41
- "MODEL_NAME_TRUNCATE_AT": 11,
40
+ "MODEL_NAME_MAX_LENGTH": 20,
41
+ "MODEL_NAME_TRUNCATE_AT": 17,
42
42
 
43
43
  "MATRIX_STREAM_DENSITY": 0.7,
44
44
  "MATRIX_SPEED_MIN": 1,