ccmanager 2.9.2 → 2.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.
@@ -48,8 +48,9 @@ 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)) {
51
+ // Check for "Do you want" or "Would you like" pattern with options
52
+ // Handles both simple ("Do you want...\nYes") and complex (numbered options) formats
53
+ if (/(?:do you want|would you like).+\n+[\s\S]*?(?:yes|❯)/.test(lowerContent)) {
53
54
  return 'waiting_input';
54
55
  }
55
56
  // Check for busy state
@@ -193,6 +193,51 @@ describe('ClaudeStateDetector', () => {
193
193
  // Assert
194
194
  expect(state).toBe('waiting_input'); // waiting_input should take precedence
195
195
  });
196
+ it('should detect waiting_input with "Would you like" and multiple numbered options', () => {
197
+ // Arrange
198
+ terminal = createMockTerminal([
199
+ 'Some previous output',
200
+ 'Would you like to proceed?',
201
+ '',
202
+ '❯ 1. Yes, and auto-accept edits',
203
+ ' 2. Yes, and manually approve edits',
204
+ ' 3. No, keep planning',
205
+ ]);
206
+ // Act
207
+ const state = detector.detectState(terminal, 'idle');
208
+ // Assert
209
+ expect(state).toBe('waiting_input');
210
+ });
211
+ it('should detect waiting_input with complex multi-line prompt and cursor indicator', () => {
212
+ // Arrange
213
+ terminal = createMockTerminal([
214
+ 'Processing complete.',
215
+ 'Would you like to apply these changes?',
216
+ '',
217
+ '❯ 1. Yes, apply all changes',
218
+ ' 2. Yes, review changes first',
219
+ ' 3. No, discard changes',
220
+ ' 4. Cancel operation',
221
+ ]);
222
+ // Act
223
+ const state = detector.detectState(terminal, 'idle');
224
+ // Assert
225
+ expect(state).toBe('waiting_input');
226
+ });
227
+ it('should detect waiting_input when cursor indicator is present without explicit "yes" text', () => {
228
+ // Arrange
229
+ terminal = createMockTerminal([
230
+ 'Do you want to proceed?',
231
+ '',
232
+ '❯ 1. Apply all',
233
+ ' 2. Review first',
234
+ ' 3. Skip',
235
+ ]);
236
+ // Act
237
+ const state = detector.detectState(terminal, 'idle');
238
+ // Assert
239
+ expect(state).toBe('waiting_input');
240
+ });
196
241
  });
197
242
  });
198
243
  describe('GeminiStateDetector', () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccmanager",
3
- "version": "2.9.2",
3
+ "version": "2.9.3",
4
4
  "description": "TUI application for managing multiple Claude Code sessions across Git worktrees",
5
5
  "license": "MIT",
6
6
  "author": "Kodai Kabasawa",