ccmanager 3.6.4 → 3.6.5

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.
@@ -28,7 +28,7 @@ export class ClaudeStateDetector extends BaseStateDetector {
28
28
  const lines = this.getTerminalLines(terminal, 3);
29
29
  const content = lines.join('\n').toLowerCase();
30
30
  // Check for "N background task(s)" pattern first (content already lowercased)
31
- const countMatch = content.match(/(\d+)\s+background\s+task/);
31
+ const countMatch = content.match(/(\d+)\s+(?:background\s+task|local\s+agent)/);
32
32
  if (countMatch?.[1]) {
33
33
  return parseInt(countMatch[1], 10);
34
34
  }
@@ -387,6 +387,49 @@ describe('ClaudeStateDetector', () => {
387
387
  // Assert
388
388
  expect(count).toBe(1);
389
389
  });
390
+ it('should return count 3 when "3 local agents" is in status bar', () => {
391
+ // Arrange
392
+ terminal = createMockTerminal([
393
+ 'Some output',
394
+ 'More output',
395
+ 'bypass permissions on - 3 local agents',
396
+ ]);
397
+ // Act
398
+ const count = detector.detectBackgroundTask(terminal);
399
+ // Assert
400
+ expect(count).toBe(3);
401
+ });
402
+ it('should return count 1 when "1 local agent" is in status bar', () => {
403
+ // Arrange
404
+ terminal = createMockTerminal(['Some output', '1 local agent']);
405
+ // Act
406
+ const count = detector.detectBackgroundTask(terminal);
407
+ // Assert
408
+ expect(count).toBe(1);
409
+ });
410
+ it('should detect local agent count case-insensitively', () => {
411
+ // Arrange
412
+ terminal = createMockTerminal([
413
+ 'Output line 1',
414
+ 'Output line 2',
415
+ '2 LOCAL AGENTS running',
416
+ ]);
417
+ // Act
418
+ const count = detector.detectBackgroundTask(terminal);
419
+ // Assert
420
+ expect(count).toBe(2);
421
+ });
422
+ it('should prioritize explicit count from "N local agents" over "(running)"', () => {
423
+ // Arrange
424
+ terminal = createMockTerminal([
425
+ 'Some output',
426
+ '3 local agents | task1 (running)',
427
+ ]);
428
+ // Act
429
+ const count = detector.detectBackgroundTask(terminal);
430
+ // Assert
431
+ expect(count).toBe(3);
432
+ });
390
433
  it('should prioritize count from "N background task" over "(running)"', () => {
391
434
  // Arrange - both patterns present, count should be from explicit pattern
392
435
  terminal = createMockTerminal([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccmanager",
3
- "version": "3.6.4",
3
+ "version": "3.6.5",
4
4
  "description": "TUI application for managing multiple Claude Code sessions across Git worktrees",
5
5
  "license": "MIT",
6
6
  "author": "Kodai Kabasawa",
@@ -41,11 +41,11 @@
41
41
  "bin"
42
42
  ],
43
43
  "optionalDependencies": {
44
- "@kodaikabasawa/ccmanager-darwin-arm64": "3.6.4",
45
- "@kodaikabasawa/ccmanager-darwin-x64": "3.6.4",
46
- "@kodaikabasawa/ccmanager-linux-arm64": "3.6.4",
47
- "@kodaikabasawa/ccmanager-linux-x64": "3.6.4",
48
- "@kodaikabasawa/ccmanager-win32-x64": "3.6.4"
44
+ "@kodaikabasawa/ccmanager-darwin-arm64": "3.6.5",
45
+ "@kodaikabasawa/ccmanager-darwin-x64": "3.6.5",
46
+ "@kodaikabasawa/ccmanager-linux-arm64": "3.6.5",
47
+ "@kodaikabasawa/ccmanager-linux-x64": "3.6.5",
48
+ "@kodaikabasawa/ccmanager-win32-x64": "3.6.5"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@eslint/js": "^9.28.0",