ccmanager 2.9.1 → 2.9.2

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.
@@ -48,6 +48,10 @@ export class ClaudeStateDetector extends BaseStateDetector {
48
48
  content.includes('│ Would you like')) {
49
49
  return 'waiting_input';
50
50
  }
51
+ // Check for "Do you want" pattern with options (e.g., "Do you want...\n...Yes")
52
+ if (/do you want.+\n.*yes/.test(lowerContent)) {
53
+ return 'waiting_input';
54
+ }
51
55
  // Check for busy state
52
56
  if (lowerContent.includes('esc to interrupt')) {
53
57
  return 'busy';
@@ -153,6 +153,46 @@ describe('ClaudeStateDetector', () => {
153
153
  expect(state).toBe('busy');
154
154
  }
155
155
  });
156
+ it('should detect waiting_input when "Do you want" with options prompt is present', () => {
157
+ // Arrange
158
+ terminal = createMockTerminal([
159
+ 'Some previous output',
160
+ 'Do you want to make this edit to test.txt?',
161
+ '❯ 1. Yes',
162
+ '2. Yes, allow all edits during this session (shift+tab)',
163
+ '3. No, and tell Claude what to do differently (esc)',
164
+ ]);
165
+ // Act
166
+ const state = detector.detectState(terminal, 'idle');
167
+ // Assert
168
+ expect(state).toBe('waiting_input');
169
+ });
170
+ it('should detect waiting_input when "Do you want" with options prompt is present (case insensitive)', () => {
171
+ // Arrange
172
+ terminal = createMockTerminal([
173
+ 'Some output',
174
+ 'DO YOU WANT to make this edit?',
175
+ '❯ 1. YES',
176
+ '2. NO',
177
+ ]);
178
+ // Act
179
+ const state = detector.detectState(terminal, 'idle');
180
+ // Assert
181
+ expect(state).toBe('waiting_input');
182
+ });
183
+ it('should prioritize "Do you want" with options over busy state', () => {
184
+ // Arrange
185
+ terminal = createMockTerminal([
186
+ 'Press ESC to interrupt',
187
+ 'Do you want to continue?',
188
+ '❯ 1. Yes',
189
+ '2. No',
190
+ ]);
191
+ // Act
192
+ const state = detector.detectState(terminal, 'idle');
193
+ // Assert
194
+ expect(state).toBe('waiting_input'); // waiting_input should take precedence
195
+ });
156
196
  });
157
197
  });
158
198
  describe('GeminiStateDetector', () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccmanager",
3
- "version": "2.9.1",
3
+ "version": "2.9.2",
4
4
  "description": "TUI application for managing multiple Claude Code sessions across Git worktrees",
5
5
  "license": "MIT",
6
6
  "author": "Kodai Kabasawa",