ccmanager 2.2.2 → 2.2.4

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.
@@ -4,6 +4,7 @@ import TextInputWrapper from './TextInputWrapper.js';
4
4
  import SelectInput from 'ink-select-input';
5
5
  import { configurationManager } from '../services/configurationManager.js';
6
6
  import { shortcutManager } from '../services/shortcutManager.js';
7
+ import Confirmation from './Confirmation.js';
7
8
  const formatDetectionStrategy = (strategy) => {
8
9
  const value = strategy || 'claude';
9
10
  switch (value) {
@@ -354,12 +355,8 @@ const ConfigureCommand = ({ onComplete }) => {
354
355
  // Render delete confirmation
355
356
  if (viewMode === 'delete-confirm') {
356
357
  const preset = presets.find(p => p.id === selectedPresetId);
357
- const confirmItems = [
358
- { label: 'Yes, delete', value: 'yes' },
359
- { label: 'Cancel', value: 'cancel' },
360
- ];
361
- const handleConfirmSelect = (item) => {
362
- if (item.value === 'yes') {
358
+ const handleConfirmSelect = (value) => {
359
+ if (value === 'yes') {
363
360
  handleDeleteConfirm();
364
361
  }
365
362
  else {
@@ -367,23 +364,16 @@ const ConfigureCommand = ({ onComplete }) => {
367
364
  setSelectedIndex(6); // Return to delete option in edit menu
368
365
  }
369
366
  };
370
- return (React.createElement(Box, { flexDirection: "column" },
371
- React.createElement(Box, { marginBottom: 1 },
372
- React.createElement(Text, { bold: true, color: "red" }, "Confirm Delete")),
373
- React.createElement(Box, { marginBottom: 1 },
374
- React.createElement(Text, null,
375
- "Delete preset \"",
376
- preset?.name,
377
- "\"?")),
378
- React.createElement(SelectInput, { items: confirmItems, onSelect: handleConfirmSelect, initialIndex: 1, indicatorComponent: ({ isSelected }) => (React.createElement(Text, { color: isSelected ? 'red' : undefined }, isSelected ? '>' : ' ')), itemComponent: ({ isSelected, label }) => (React.createElement(Text, { color: label === 'Yes, delete'
379
- ? isSelected
380
- ? 'red'
381
- : undefined
382
- : isSelected
383
- ? 'cyan'
384
- : undefined, inverse: isSelected }, label)) }),
385
- React.createElement(Box, { marginTop: 1 },
386
- React.createElement(Text, { dimColor: true }, "Press \u2191\u2193/j/k to navigate, Enter to confirm"))));
367
+ const title = (React.createElement(Text, { bold: true, color: "red" }, "Confirm Delete"));
368
+ const message = React.createElement(Text, null,
369
+ "Delete preset \"",
370
+ preset?.name,
371
+ "\"?");
372
+ const hint = (React.createElement(Text, { dimColor: true }, "Press \u2191\u2193/j/k to navigate, Enter to confirm"));
373
+ return (React.createElement(Confirmation, { title: title, message: message, options: [
374
+ { label: 'Yes, delete', value: 'yes', color: 'red' },
375
+ { label: 'Cancel', value: 'cancel', color: 'cyan' },
376
+ ], onSelect: handleConfirmSelect, initialIndex: 1, indicatorColor: "red", hint: hint }));
387
377
  }
388
378
  // Render edit preset view
389
379
  if (viewMode === 'edit') {
@@ -1,5 +1,29 @@
1
1
  import React from 'react';
2
+ export interface ConfirmationOption {
3
+ label: string;
4
+ value: string;
5
+ color?: string;
6
+ }
2
7
  interface ConfirmationProps {
8
+ title?: React.ReactNode;
9
+ message?: React.ReactNode;
10
+ options: ConfirmationOption[];
11
+ onSelect: (value: string) => void;
12
+ initialIndex?: number;
13
+ indicatorColor?: string;
14
+ hint?: React.ReactNode;
15
+ onCancel?: () => void;
16
+ onEscape?: () => void;
17
+ onCustomInput?: (input: string, key: {
18
+ [key: string]: boolean;
19
+ }) => boolean;
20
+ }
21
+ /**
22
+ * Reusable confirmation component with SelectInput UI pattern
23
+ */
24
+ declare const Confirmation: React.FC<ConfirmationProps>;
25
+ export default Confirmation;
26
+ interface SimpleConfirmationProps {
3
27
  message: string | React.ReactNode;
4
28
  onConfirm: () => void;
5
29
  onCancel: () => void;
@@ -8,5 +32,4 @@ interface ConfirmationProps {
8
32
  confirmColor?: string;
9
33
  cancelColor?: string;
10
34
  }
11
- declare const Confirmation: React.FC<ConfirmationProps>;
12
- export default Confirmation;
35
+ export declare const SimpleConfirmation: React.FC<SimpleConfirmationProps>;
@@ -1,42 +1,63 @@
1
- import React, { useState } from 'react';
1
+ import React from 'react';
2
2
  import { Box, Text, useInput } from 'ink';
3
+ import SelectInput from 'ink-select-input';
3
4
  import { shortcutManager } from '../services/shortcutManager.js';
4
- const Confirmation = ({ message, onConfirm, onCancel, confirmText = 'Yes', cancelText = 'No', confirmColor = 'green', cancelColor = 'red', }) => {
5
- const [focused, setFocused] = useState(true); // true = confirm, false = cancel
5
+ /**
6
+ * Reusable confirmation component with SelectInput UI pattern
7
+ */
8
+ const Confirmation = ({ title, message, options, onSelect, initialIndex = 0, indicatorColor, hint, onCancel, onEscape, onCustomInput, }) => {
6
9
  useInput((input, key) => {
7
- if (key.leftArrow || key.rightArrow) {
8
- setFocused(!focused);
10
+ // Check custom input handler first
11
+ if (onCustomInput && onCustomInput(input, key)) {
12
+ return;
9
13
  }
10
- else if (key.return) {
11
- if (focused) {
12
- onConfirm();
13
- }
14
- else {
15
- onCancel();
16
- }
17
- }
18
- else if (shortcutManager.matchesShortcut('cancel', input, key)) {
14
+ // Handle cancel shortcut
15
+ if (onCancel && shortcutManager.matchesShortcut('cancel', input, key)) {
19
16
  onCancel();
17
+ return;
18
+ }
19
+ // Handle escape key
20
+ if (onEscape && key['escape']) {
21
+ onEscape();
22
+ return;
20
23
  }
21
24
  });
25
+ const handleSelect = (item) => {
26
+ onSelect(item.value);
27
+ };
22
28
  return (React.createElement(Box, { flexDirection: "column" },
23
- React.createElement(Box, { marginBottom: 1 }, message),
24
- React.createElement(Box, null,
25
- React.createElement(Box, { marginRight: 2 },
26
- React.createElement(Text, { color: focused ? confirmColor : 'white', inverse: focused },
27
- ' ',
28
- confirmText,
29
- ' ')),
30
- React.createElement(Box, null,
31
- React.createElement(Text, { color: !focused ? cancelColor : 'white', inverse: !focused },
32
- ' ',
33
- cancelText,
34
- ' '))),
29
+ title && React.createElement(Box, { marginBottom: 1 }, title),
30
+ message && React.createElement(Box, { marginBottom: 1 }, message),
35
31
  React.createElement(Box, { marginTop: 1 },
36
- React.createElement(Text, { dimColor: true },
37
- "Use \u2190 \u2192 to navigate, Enter to select,",
38
- ' ',
39
- shortcutManager.getShortcutDisplay('cancel'),
40
- " to cancel"))));
32
+ React.createElement(SelectInput, { items: options, onSelect: handleSelect, initialIndex: initialIndex, indicatorComponent: ({ isSelected }) => (React.createElement(Text, { color: isSelected && indicatorColor ? indicatorColor : undefined }, isSelected ? '>' : ' ')), itemComponent: ({ isSelected, label }) => {
33
+ // Find the color for this option
34
+ const option = options.find(opt => opt.label === label);
35
+ const color = option?.color;
36
+ return (React.createElement(Text, { color: isSelected && color ? color : isSelected ? undefined : 'white', inverse: isSelected },
37
+ ' ',
38
+ label,
39
+ ' '));
40
+ } })),
41
+ hint && React.createElement(Box, { marginTop: 1 }, hint)));
41
42
  };
42
43
  export default Confirmation;
44
+ export const SimpleConfirmation = ({ message, onConfirm, onCancel, confirmText = 'Yes', cancelText = 'No', confirmColor = 'green', cancelColor = 'red', }) => {
45
+ const options = [
46
+ { label: confirmText, value: 'confirm', color: confirmColor },
47
+ { label: cancelText, value: 'cancel', color: cancelColor },
48
+ ];
49
+ const handleSelect = (value) => {
50
+ if (value === 'confirm') {
51
+ onConfirm();
52
+ }
53
+ else {
54
+ onCancel();
55
+ }
56
+ };
57
+ const hint = (React.createElement(Text, { dimColor: true },
58
+ "Use \u2191\u2193/j/k to navigate, Enter to select,",
59
+ ' ',
60
+ shortcutManager.getShortcutDisplay('cancel'),
61
+ " to cancel"));
62
+ return (React.createElement(Confirmation, { message: message, options: options, onSelect: handleSelect, initialIndex: 0, hint: hint, onCancel: onCancel }));
63
+ };
@@ -2,6 +2,7 @@ import React, { useState } from 'react';
2
2
  import { Box, Text, useInput } from 'ink';
3
3
  import SelectInput from 'ink-select-input';
4
4
  import { shortcutManager } from '../services/shortcutManager.js';
5
+ import Confirmation from './Confirmation.js';
5
6
  const DeleteConfirmation = ({ worktrees, onConfirm, onCancel, }) => {
6
7
  // Check if any worktrees have branches
7
8
  const hasAnyBranches = worktrees.some(wt => wt.branch);
@@ -19,36 +20,26 @@ const DeleteConfirmation = ({ worktrees, onConfirm, onCancel, }) => {
19
20
  value: 'keepBranch',
20
21
  },
21
22
  ];
22
- // Menu items for actions
23
- const actionOptions = [
24
- { label: 'Confirm', value: 'confirm' },
25
- { label: 'Cancel', value: 'cancel' },
26
- ];
27
23
  const handleBranchSelect = (item) => {
28
24
  // Don't toggle on Enter - only update focused option
29
25
  setFocusedOption(item.value);
30
26
  };
31
- const handleActionSelect = (item) => {
32
- if (item.value === 'confirm') {
27
+ const handleActionSelect = (value) => {
28
+ if (value === 'confirm') {
33
29
  onConfirm(deleteBranch);
34
30
  }
35
31
  else {
36
32
  onCancel();
37
33
  }
38
34
  };
39
- useInput((input, key) => {
40
- if (shortcutManager.matchesShortcut('cancel', input, key)) {
41
- onCancel();
42
- }
43
- else if (hasAnyBranches && view === 'options' && key.return) {
44
- // Move to confirm view when Enter is pressed in options
35
+ // Handle keyboard input for branch options view
36
+ const handleBranchOptionsInput = (input, key) => {
37
+ if (key['return']) {
38
+ // Move to confirm view when Enter is pressed
45
39
  setView('confirm');
40
+ return true;
46
41
  }
47
- else if (hasAnyBranches && view === 'confirm' && key.escape) {
48
- // Go back to options when Escape is pressed in confirm
49
- setView('options');
50
- }
51
- else if (hasAnyBranches && view === 'options' && input === ' ') {
42
+ else if (input === ' ') {
52
43
  // Toggle selection on space for radio buttons
53
44
  if (focusedOption === 'deleteBranch') {
54
45
  setDeleteBranch(true);
@@ -56,63 +47,75 @@ const DeleteConfirmation = ({ worktrees, onConfirm, onCancel, }) => {
56
47
  else {
57
48
  setDeleteBranch(false);
58
49
  }
50
+ return true;
51
+ }
52
+ return false;
53
+ };
54
+ useInput((input, key) => {
55
+ if (hasAnyBranches && view === 'options') {
56
+ if (handleBranchOptionsInput(input, key)) {
57
+ return;
58
+ }
59
+ if (shortcutManager.matchesShortcut('cancel', input, key)) {
60
+ onCancel();
61
+ }
59
62
  }
60
63
  });
61
- return (React.createElement(Box, { flexDirection: "column" },
62
- React.createElement(Text, { bold: true, color: "red" }, "\u26A0\uFE0F Delete Confirmation"),
63
- React.createElement(Box, { marginTop: 1, marginBottom: 1, flexDirection: "column" },
64
- React.createElement(Text, null, "You are about to delete the following worktrees:"),
65
- worktrees.length <= 10 ? (worktrees.map(wt => (React.createElement(Text, { key: wt.path, color: "red" },
64
+ // Title component
65
+ const title = (React.createElement(Text, { bold: true, color: "red" }, "\u26A0\uFE0F Delete Confirmation"));
66
+ // Message component
67
+ const message = (React.createElement(Box, { flexDirection: "column" },
68
+ React.createElement(Text, null, "You are about to delete the following worktrees:"),
69
+ worktrees.length <= 10 ? (worktrees.map(wt => (React.createElement(Text, { key: wt.path, color: "red" },
70
+ "\u2022 ",
71
+ wt.branch ? wt.branch.replace('refs/heads/', '') : 'detached',
72
+ " (",
73
+ wt.path,
74
+ ")")))) : (React.createElement(React.Fragment, null,
75
+ worktrees.slice(0, 8).map(wt => (React.createElement(Text, { key: wt.path, color: "red" },
66
76
  "\u2022 ",
67
77
  wt.branch ? wt.branch.replace('refs/heads/', '') : 'detached',
68
78
  ' ',
69
79
  "(",
70
80
  wt.path,
71
- ")")))) : (React.createElement(React.Fragment, null,
72
- worktrees.slice(0, 8).map(wt => (React.createElement(Text, { key: wt.path, color: "red" },
73
- "\u2022",
74
- ' ',
75
- wt.branch ? wt.branch.replace('refs/heads/', '') : 'detached',
76
- ' ',
77
- "(",
78
- wt.path,
79
- ")"))),
80
- React.createElement(Text, { color: "red", dimColor: true },
81
- "... and ",
82
- worktrees.length - 8,
83
- " more worktrees")))),
84
- hasAnyBranches && view === 'options' && (React.createElement(Box, { marginBottom: 1, flexDirection: "column" },
85
- React.createElement(Text, { bold: true }, "What do you want to do with the associated branches?"),
81
+ ")"))),
82
+ React.createElement(Text, { color: "red", dimColor: true },
83
+ "... and ",
84
+ worktrees.length - 8,
85
+ " more worktrees")))));
86
+ if (hasAnyBranches && view === 'options') {
87
+ return (React.createElement(Box, { flexDirection: "column" },
88
+ title,
89
+ React.createElement(Box, { marginTop: 1, marginBottom: 1 }, message),
90
+ React.createElement(Box, { marginBottom: 1, flexDirection: "column" },
91
+ React.createElement(Text, { bold: true }, "What do you want to do with the associated branches?"),
92
+ React.createElement(Box, { marginTop: 1 },
93
+ React.createElement(SelectInput, { items: branchOptions, onSelect: handleBranchSelect, onHighlight: (item) => {
94
+ setFocusedOption(item.value);
95
+ }, initialIndex: deleteBranch ? 0 : 1, indicatorComponent: ({ isSelected }) => (React.createElement(Text, { color: isSelected ? 'red' : undefined }, isSelected ? '>' : ' ')), itemComponent: ({ isSelected, label }) => (React.createElement(Text, { color: isSelected ? 'red' : undefined, inverse: isSelected }, label)) }))),
86
96
  React.createElement(Box, { marginTop: 1 },
87
- React.createElement(SelectInput, { items: branchOptions, onSelect: handleBranchSelect, onHighlight: (item) => {
88
- setFocusedOption(item.value);
89
- }, initialIndex: deleteBranch ? 0 : 1, indicatorComponent: ({ isSelected }) => (React.createElement(Text, { color: isSelected ? 'red' : undefined }, isSelected ? '>' : ' ')), itemComponent: ({ isSelected, label }) => (React.createElement(Text, { color: isSelected ? 'red' : undefined, inverse: isSelected }, label)) })))),
90
- hasAnyBranches && view === 'confirm' && (React.createElement(Box, { marginBottom: 1, flexDirection: "column" },
97
+ React.createElement(Text, { dimColor: true },
98
+ "Use \u2191\u2193/j/k to navigate, Space to toggle, Enter to continue,",
99
+ ' ',
100
+ shortcutManager.getShortcutDisplay('cancel'),
101
+ " to cancel"))));
102
+ }
103
+ // Confirmation view (either after selecting branch option or if no branches)
104
+ const confirmHint = (React.createElement(Text, { dimColor: true },
105
+ "Use \u2191\u2193/j/k to navigate, Enter to select,",
106
+ ' ',
107
+ shortcutManager.getShortcutDisplay('cancel'),
108
+ " to cancel"));
109
+ const confirmMessage = (React.createElement(Box, { flexDirection: "column" },
110
+ message,
111
+ hasAnyBranches && view === 'confirm' && (React.createElement(Box, { marginTop: 1, flexDirection: "column" },
91
112
  React.createElement(Text, { bold: true }, "Branch option selected:"),
92
- React.createElement(Text, { color: "yellow" }, deleteBranch ? '✓ Delete the branches too' : '✓ Keep the branches'))),
93
- (view === 'confirm' || !hasAnyBranches) && (React.createElement(Box, { marginTop: 1 },
94
- React.createElement(SelectInput, { items: actionOptions, onSelect: handleActionSelect, initialIndex: 1, indicatorComponent: ({ isSelected }) => (React.createElement(Text, null, isSelected ? '>' : ' ')), itemComponent: ({ isSelected, label }) => {
95
- const color = label === 'Confirm' ? 'green' : 'red';
96
- return (React.createElement(Text, { color: isSelected ? color : 'white', inverse: isSelected },
97
- ' ',
98
- label,
99
- ' '));
100
- } }))),
101
- React.createElement(Box, { marginTop: 1 },
102
- React.createElement(Text, { dimColor: true }, hasAnyBranches && view === 'options' ? (React.createElement(React.Fragment, null,
103
- "Use \u2191\u2193/j/k to navigate, Space to toggle, Enter to continue,",
104
- ' ',
105
- shortcutManager.getShortcutDisplay('cancel'),
106
- " to cancel")) : view === 'confirm' ? (React.createElement(React.Fragment, null,
107
- "Use \u2191\u2193/j/k to navigate, Enter to select",
108
- hasAnyBranches ? ', Esc to go back' : '',
109
- ",",
110
- ' ',
111
- shortcutManager.getShortcutDisplay('cancel'),
112
- " to cancel")) : (React.createElement(React.Fragment, null,
113
- "Use \u2191\u2193/j/k to navigate, Enter to select,",
114
- ' ',
115
- shortcutManager.getShortcutDisplay('cancel'),
116
- " to cancel"))))));
113
+ React.createElement(Text, { color: "yellow" }, deleteBranch ? '✓ Delete the branches too' : '✓ Keep the branches')))));
114
+ return (React.createElement(Confirmation, { title: title, message: confirmMessage, options: [
115
+ { label: 'Confirm', value: 'confirm', color: 'green' },
116
+ { label: 'Cancel', value: 'cancel', color: 'red' },
117
+ ], onSelect: handleActionSelect, initialIndex: 1, hint: confirmHint, onCancel: onCancel, onEscape: hasAnyBranches && view === 'confirm'
118
+ ? () => setView('options')
119
+ : undefined }));
117
120
  };
118
121
  export default DeleteConfirmation;
@@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react';
2
2
  import { Box, Text, useInput } from 'ink';
3
3
  import SelectInput from 'ink-select-input';
4
4
  import { WorktreeService } from '../services/worktreeService.js';
5
- import Confirmation from './Confirmation.js';
5
+ import Confirmation, { SimpleConfirmation } from './Confirmation.js';
6
6
  import { shortcutManager } from '../services/shortcutManager.js';
7
7
  const MergeWorktree = ({ onComplete, onCancel, }) => {
8
8
  const [step, setStep] = useState('select-source');
@@ -11,7 +11,6 @@ const MergeWorktree = ({ onComplete, onCancel, }) => {
11
11
  const [branchItems, setBranchItems] = useState([]);
12
12
  const [originalBranchItems, setOriginalBranchItems] = useState([]);
13
13
  const [useRebase, setUseRebase] = useState(false);
14
- const [operationFocused, setOperationFocused] = useState(false);
15
14
  const [mergeError, setMergeError] = useState(null);
16
15
  const [worktreeService] = useState(() => new WorktreeService());
17
16
  useEffect(() => {
@@ -30,16 +29,7 @@ const MergeWorktree = ({ onComplete, onCancel, }) => {
30
29
  onCancel();
31
30
  return;
32
31
  }
33
- if (step === 'select-operation') {
34
- if (key.leftArrow || key.rightArrow) {
35
- const newOperationFocused = !operationFocused;
36
- setOperationFocused(newOperationFocused);
37
- setUseRebase(newOperationFocused);
38
- }
39
- else if (key.return) {
40
- setStep('confirm-merge');
41
- }
42
- }
32
+ // Operation selection is now handled by ConfirmationView
43
33
  if (step === 'merge-error') {
44
34
  // Any key press returns to menu
45
35
  onCancel();
@@ -105,34 +95,27 @@ const MergeWorktree = ({ onComplete, onCancel, }) => {
105
95
  " to cancel"))));
106
96
  }
107
97
  if (step === 'select-operation') {
108
- return (React.createElement(Box, { flexDirection: "column" },
109
- React.createElement(Box, { marginBottom: 1 },
110
- React.createElement(Text, { bold: true, color: "green" }, "Select Operation")),
111
- React.createElement(Box, { marginBottom: 1 },
112
- React.createElement(Text, null,
113
- "Choose how to integrate ",
114
- React.createElement(Text, { color: "yellow" }, sourceBranch),
115
- ' ',
116
- "into ",
117
- React.createElement(Text, { color: "yellow" }, targetBranch),
118
- ":")),
119
- React.createElement(Box, null,
120
- React.createElement(Box, { marginRight: 2 },
121
- React.createElement(Text, { color: !operationFocused ? 'green' : 'white', inverse: !operationFocused },
122
- ' ',
123
- "Merge",
124
- ' ')),
125
- React.createElement(Box, null,
126
- React.createElement(Text, { color: operationFocused ? 'blue' : 'white', inverse: operationFocused },
127
- ' ',
128
- "Rebase",
129
- ' '))),
130
- React.createElement(Box, { marginTop: 1 },
131
- React.createElement(Text, { dimColor: true },
132
- "Use \u2190 \u2192 to navigate, Enter to select,",
133
- ' ',
134
- shortcutManager.getShortcutDisplay('cancel'),
135
- " to cancel"))));
98
+ const title = (React.createElement(Text, { bold: true, color: "green" }, "Select Operation"));
99
+ const message = (React.createElement(Text, null,
100
+ "Choose how to integrate ",
101
+ React.createElement(Text, { color: "yellow" }, sourceBranch),
102
+ " into",
103
+ ' ',
104
+ React.createElement(Text, { color: "yellow" }, targetBranch),
105
+ ":"));
106
+ const hint = (React.createElement(Text, { dimColor: true },
107
+ "Use \u2191\u2193/j/k to navigate, Enter to select,",
108
+ ' ',
109
+ shortcutManager.getShortcutDisplay('cancel'),
110
+ " to cancel"));
111
+ const handleOperationSelect = (value) => {
112
+ setUseRebase(value === 'rebase');
113
+ setStep('confirm-merge');
114
+ };
115
+ return (React.createElement(Confirmation, { title: title, message: message, options: [
116
+ { label: 'Merge', value: 'merge', color: 'green' },
117
+ { label: 'Rebase', value: 'rebase', color: 'blue' },
118
+ ], onSelect: handleOperationSelect, initialIndex: 0, hint: hint }));
136
119
  }
137
120
  if (step === 'confirm-merge') {
138
121
  const confirmMessage = (React.createElement(Box, { flexDirection: "column" },
@@ -149,7 +132,7 @@ const MergeWorktree = ({ onComplete, onCancel, }) => {
149
132
  ' ',
150
133
  React.createElement(Text, { color: "yellow" }, targetBranch),
151
134
  "?")));
152
- return (React.createElement(Confirmation, { message: confirmMessage, onConfirm: () => setStep('executing-merge'), onCancel: onCancel }));
135
+ return (React.createElement(SimpleConfirmation, { message: confirmMessage, onConfirm: () => setStep('executing-merge'), onCancel: onCancel }));
153
136
  }
154
137
  if (step === 'executing-merge') {
155
138
  return (React.createElement(Box, { flexDirection: "column" },
@@ -177,7 +160,7 @@ const MergeWorktree = ({ onComplete, onCancel, }) => {
177
160
  React.createElement(Text, { color: "yellow" }, sourceBranch),
178
161
  ' ',
179
162
  "and its worktree?")));
180
- return (React.createElement(Confirmation, { message: deleteMessage, onConfirm: () => {
163
+ return (React.createElement(SimpleConfirmation, { message: deleteMessage, onConfirm: () => {
181
164
  const deleteResult = worktreeService.deleteWorktreeByBranch(sourceBranch);
182
165
  if (deleteResult.success) {
183
166
  onComplete();
@@ -12,7 +12,7 @@ const execAsync = promisify(exec);
12
12
  export class SessionManager extends EventEmitter {
13
13
  async spawn(command, args, worktreePath) {
14
14
  const spawnOptions = {
15
- name: 'xterm-color',
15
+ name: 'xterm-256color',
16
16
  cols: process.stdout.columns || 80,
17
17
  rows: process.stdout.rows || 24,
18
18
  cwd: worktreePath,
@@ -108,7 +108,7 @@ describe('SessionManager', () => {
108
108
  await sessionManager.createSessionWithPreset('/test/worktree');
109
109
  // Verify spawn was called with preset config
110
110
  expect(spawn).toHaveBeenCalledWith('claude', ['--preset-arg'], {
111
- name: 'xterm-color',
111
+ name: 'xterm-256color',
112
112
  cols: expect.any(Number),
113
113
  rows: expect.any(Number),
114
114
  cwd: '/test/worktree',
@@ -132,7 +132,7 @@ describe('SessionManager', () => {
132
132
  expect(configurationManager.getPresetById).toHaveBeenCalledWith('2');
133
133
  // Verify spawn was called with preset config
134
134
  expect(spawn).toHaveBeenCalledWith('claude', ['--resume', '--dev'], {
135
- name: 'xterm-color',
135
+ name: 'xterm-256color',
136
136
  cols: expect.any(Number),
137
137
  rows: expect.any(Number),
138
138
  cwd: '/test/worktree',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccmanager",
3
- "version": "2.2.2",
3
+ "version": "2.2.4",
4
4
  "description": "TUI application for managing multiple Claude Code sessions across Git worktrees",
5
5
  "license": "MIT",
6
6
  "author": "Kodai Kabasawa",