dmux 3.1.1 → 3.2.0

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.
Files changed (232) hide show
  1. package/dist/CleanTextInput.d.ts +9 -0
  2. package/dist/CleanTextInput.d.ts.map +1 -1
  3. package/dist/CleanTextInput.js +127 -47
  4. package/dist/CleanTextInput.js.map +1 -1
  5. package/dist/DmuxApp.d.ts +2 -2
  6. package/dist/DmuxApp.d.ts.map +1 -1
  7. package/dist/DmuxApp.js +1396 -750
  8. package/dist/DmuxApp.js.map +1 -1
  9. package/dist/actions/paneActions.d.ts.map +1 -1
  10. package/dist/actions/paneActions.js +68 -11
  11. package/dist/actions/paneActions.js.map +1 -1
  12. package/dist/actions/types.d.ts +1 -0
  13. package/dist/actions/types.d.ts.map +1 -1
  14. package/dist/actions/types.js +1 -0
  15. package/dist/actions/types.js.map +1 -1
  16. package/dist/components/ActionInputDialog.d.ts.map +1 -1
  17. package/dist/components/ActionInputDialog.js +3 -2
  18. package/dist/components/ActionInputDialog.js.map +1 -1
  19. package/dist/components/DialogBox.d.ts +16 -0
  20. package/dist/components/DialogBox.d.ts.map +1 -0
  21. package/dist/components/DialogBox.js +12 -0
  22. package/dist/components/DialogBox.js.map +1 -0
  23. package/dist/components/FooterHelp.d.ts +9 -0
  24. package/dist/components/FooterHelp.d.ts.map +1 -1
  25. package/dist/components/FooterHelp.js +41 -5
  26. package/dist/components/FooterHelp.js.map +1 -1
  27. package/dist/components/PaneCard.d.ts +3 -1
  28. package/dist/components/PaneCard.d.ts.map +1 -1
  29. package/dist/components/PaneCard.js +50 -33
  30. package/dist/components/PaneCard.js.map +1 -1
  31. package/dist/components/PanesGrid.d.ts +3 -5
  32. package/dist/components/PanesGrid.d.ts.map +1 -1
  33. package/dist/components/PanesGrid.js +40 -10
  34. package/dist/components/PanesGrid.js.map +1 -1
  35. package/dist/dashboard.js +1 -1
  36. package/dist/decorative-pane.d.ts +3 -0
  37. package/dist/decorative-pane.d.ts.map +1 -0
  38. package/dist/decorative-pane.js +136 -0
  39. package/dist/decorative-pane.js.map +1 -0
  40. package/dist/hooks/useActionSystem.d.ts +14 -1
  41. package/dist/hooks/useActionSystem.d.ts.map +1 -1
  42. package/dist/hooks/useActionSystem.js +93 -4
  43. package/dist/hooks/useActionSystem.js.map +1 -1
  44. package/dist/hooks/useNavigation.js +1 -1
  45. package/dist/hooks/useNavigation.js.map +1 -1
  46. package/dist/hooks/usePaneCreation.d.ts +1 -2
  47. package/dist/hooks/usePaneCreation.d.ts.map +1 -1
  48. package/dist/hooks/usePaneCreation.js +13 -27
  49. package/dist/hooks/usePaneCreation.js.map +1 -1
  50. package/dist/hooks/usePaneRunner.d.ts.map +1 -1
  51. package/dist/hooks/usePaneRunner.js +8 -3
  52. package/dist/hooks/usePaneRunner.js.map +1 -1
  53. package/dist/hooks/usePanes.d.ts.map +1 -1
  54. package/dist/hooks/usePanes.js +210 -37
  55. package/dist/hooks/usePanes.js.map +1 -1
  56. package/dist/hooks/useWorktreeActions.d.ts.map +1 -1
  57. package/dist/hooks/useWorktreeActions.js +7 -13
  58. package/dist/hooks/useWorktreeActions.js.map +1 -1
  59. package/dist/index.js +217 -29
  60. package/dist/index.js.map +1 -1
  61. package/dist/popups/agentChoicePopup.d.ts +7 -0
  62. package/dist/popups/agentChoicePopup.d.ts.map +1 -0
  63. package/dist/popups/agentChoicePopup.js +74 -0
  64. package/dist/popups/agentChoicePopup.js.map +1 -0
  65. package/dist/popups/choicePopup.d.ts +7 -0
  66. package/dist/popups/choicePopup.d.ts.map +1 -0
  67. package/dist/popups/choicePopup.js +64 -0
  68. package/dist/popups/choicePopup.js.map +1 -0
  69. package/dist/popups/components/FileList.d.ts +13 -0
  70. package/dist/popups/components/FileList.d.ts.map +1 -0
  71. package/dist/popups/components/FileList.js +61 -0
  72. package/dist/popups/components/FileList.js.map +1 -0
  73. package/dist/popups/components/PopupContainer.d.ts +14 -0
  74. package/dist/popups/components/PopupContainer.d.ts.map +1 -0
  75. package/dist/popups/components/PopupContainer.js +15 -0
  76. package/dist/popups/components/PopupContainer.js.map +1 -0
  77. package/dist/popups/components/PopupInputBox.d.ts +11 -0
  78. package/dist/popups/components/PopupInputBox.d.ts.map +1 -0
  79. package/dist/popups/components/PopupInputBox.js +10 -0
  80. package/dist/popups/components/PopupInputBox.js.map +1 -0
  81. package/dist/popups/components/PopupWrapper.d.ts +37 -0
  82. package/dist/popups/components/PopupWrapper.d.ts.map +1 -0
  83. package/dist/popups/components/PopupWrapper.js +88 -0
  84. package/dist/popups/components/PopupWrapper.js.map +1 -0
  85. package/dist/popups/components/index.d.ts +8 -0
  86. package/dist/popups/components/index.d.ts.map +1 -0
  87. package/dist/popups/components/index.js +8 -0
  88. package/dist/popups/components/index.js.map +1 -0
  89. package/dist/popups/config.d.ts +40 -0
  90. package/dist/popups/config.d.ts.map +1 -0
  91. package/dist/popups/config.js +40 -0
  92. package/dist/popups/config.js.map +1 -0
  93. package/dist/popups/confirmPopup.d.ts +7 -0
  94. package/dist/popups/confirmPopup.d.ts.map +1 -0
  95. package/dist/popups/confirmPopup.js +72 -0
  96. package/dist/popups/confirmPopup.js.map +1 -0
  97. package/dist/popups/hooksPopup.d.ts +7 -0
  98. package/dist/popups/hooksPopup.d.ts.map +1 -0
  99. package/dist/popups/hooksPopup.js +71 -0
  100. package/dist/popups/hooksPopup.js.map +1 -0
  101. package/dist/popups/inputPopup.d.ts +7 -0
  102. package/dist/popups/inputPopup.d.ts.map +1 -0
  103. package/dist/popups/inputPopup.js +48 -0
  104. package/dist/popups/inputPopup.js.map +1 -0
  105. package/dist/popups/kebabMenuPopup.d.ts +7 -0
  106. package/dist/popups/kebabMenuPopup.d.ts.map +1 -0
  107. package/dist/popups/kebabMenuPopup.js +52 -0
  108. package/dist/popups/kebabMenuPopup.js.map +1 -0
  109. package/dist/popups/logsPopup.d.ts +12 -0
  110. package/dist/popups/logsPopup.d.ts.map +1 -0
  111. package/dist/popups/logsPopup.js +364 -0
  112. package/dist/popups/logsPopup.js.map +1 -0
  113. package/dist/popups/mergePopup.d.ts +7 -0
  114. package/dist/popups/mergePopup.d.ts.map +1 -0
  115. package/dist/popups/mergePopup.js +310 -0
  116. package/dist/popups/mergePopup.js.map +1 -0
  117. package/dist/popups/newPanePopup.d.ts +7 -0
  118. package/dist/popups/newPanePopup.d.ts.map +1 -0
  119. package/dist/popups/newPanePopup.js +234 -0
  120. package/dist/popups/newPanePopup.js.map +1 -0
  121. package/dist/popups/progressPopup.d.ts +8 -0
  122. package/dist/popups/progressPopup.d.ts.map +1 -0
  123. package/dist/popups/progressPopup.js +54 -0
  124. package/dist/popups/progressPopup.js.map +1 -0
  125. package/dist/popups/remotePopup.d.ts +6 -0
  126. package/dist/popups/remotePopup.d.ts.map +1 -0
  127. package/dist/popups/remotePopup.js +166 -0
  128. package/dist/popups/remotePopup.js.map +1 -0
  129. package/dist/popups/settingsPopup.d.ts +7 -0
  130. package/dist/popups/settingsPopup.d.ts.map +1 -0
  131. package/dist/popups/settingsPopup.js +212 -0
  132. package/dist/popups/settingsPopup.js.map +1 -0
  133. package/dist/popups/shortcutsPopup.d.ts +6 -0
  134. package/dist/popups/shortcutsPopup.d.ts.map +1 -0
  135. package/dist/popups/shortcutsPopup.js +74 -0
  136. package/dist/popups/shortcutsPopup.js.map +1 -0
  137. package/dist/popups/templates/SimpleInputPopup.d.ts +15 -0
  138. package/dist/popups/templates/SimpleInputPopup.d.ts.map +1 -0
  139. package/dist/popups/templates/SimpleInputPopup.js +28 -0
  140. package/dist/popups/templates/SimpleInputPopup.js.map +1 -0
  141. package/dist/server/embedded-assets.d.ts.map +1 -1
  142. package/dist/server/embedded-assets.js +2066 -968
  143. package/dist/server/embedded-assets.js.map +1 -1
  144. package/dist/server/index.js +1 -1
  145. package/dist/server/index.js.map +1 -1
  146. package/dist/server/routes.d.ts +1 -1
  147. package/dist/server/routes.d.ts.map +1 -1
  148. package/dist/server/routes.js +73 -6
  149. package/dist/server/routes.js.map +1 -1
  150. package/dist/services/ConfigWatcher.d.ts.map +1 -1
  151. package/dist/services/ConfigWatcher.js +10 -3
  152. package/dist/services/ConfigWatcher.js.map +1 -1
  153. package/dist/services/LogService.d.ts +112 -0
  154. package/dist/services/LogService.d.ts.map +1 -0
  155. package/dist/services/LogService.js +252 -0
  156. package/dist/services/LogService.js.map +1 -0
  157. package/dist/services/PaneWorkerManager.d.ts.map +1 -1
  158. package/dist/services/PaneWorkerManager.js +35 -9
  159. package/dist/services/PaneWorkerManager.js.map +1 -1
  160. package/dist/services/TunnelService.d.ts +1 -0
  161. package/dist/services/TunnelService.d.ts.map +1 -1
  162. package/dist/services/TunnelService.js +56 -15
  163. package/dist/services/TunnelService.js.map +1 -1
  164. package/dist/shared/StateManager.d.ts +49 -1
  165. package/dist/shared/StateManager.d.ts.map +1 -1
  166. package/dist/shared/StateManager.js +97 -2
  167. package/dist/shared/StateManager.js.map +1 -1
  168. package/dist/spacer-pane.d.ts +8 -0
  169. package/dist/spacer-pane.d.ts.map +1 -0
  170. package/dist/spacer-pane.js +40 -0
  171. package/dist/spacer-pane.js.map +1 -0
  172. package/dist/theme/colors.d.ts +25 -0
  173. package/dist/theme/colors.d.ts.map +1 -0
  174. package/dist/theme/colors.js +33 -0
  175. package/dist/theme/colors.js.map +1 -0
  176. package/dist/types.d.ts +14 -0
  177. package/dist/types.d.ts.map +1 -1
  178. package/dist/utils/asciiArt.d.ts +26 -0
  179. package/dist/utils/asciiArt.d.ts.map +1 -0
  180. package/dist/utils/asciiArt.js +88 -0
  181. package/dist/utils/asciiArt.js.map +1 -0
  182. package/dist/utils/conflictResolutionPane.d.ts.map +1 -1
  183. package/dist/utils/conflictResolutionPane.js +8 -4
  184. package/dist/utils/conflictResolutionPane.js.map +1 -1
  185. package/dist/utils/fileScanner.d.ts +23 -0
  186. package/dist/utils/fileScanner.d.ts.map +1 -0
  187. package/dist/utils/fileScanner.js +123 -0
  188. package/dist/utils/fileScanner.js.map +1 -0
  189. package/dist/utils/generated-agents-doc.d.ts +1 -1
  190. package/dist/utils/generated-agents-doc.js +1 -1
  191. package/dist/utils/hooks.d.ts.map +1 -1
  192. package/dist/utils/hooks.js +65 -36
  193. package/dist/utils/hooks.js.map +1 -1
  194. package/dist/utils/hooksDocs.d.ts +1 -1
  195. package/dist/utils/layoutManager.d.ts +45 -0
  196. package/dist/utils/layoutManager.d.ts.map +1 -0
  197. package/dist/utils/layoutManager.js +500 -0
  198. package/dist/utils/layoutManager.js.map +1 -0
  199. package/dist/utils/paneCreation.d.ts.map +1 -1
  200. package/dist/utils/paneCreation.js +125 -11
  201. package/dist/utils/paneCreation.js.map +1 -1
  202. package/dist/utils/popup.d.ts +97 -0
  203. package/dist/utils/popup.d.ts.map +1 -0
  204. package/dist/utils/popup.js +509 -0
  205. package/dist/utils/popup.js.map +1 -0
  206. package/dist/utils/postPaneCleanup.d.ts +12 -0
  207. package/dist/utils/postPaneCleanup.d.ts.map +1 -0
  208. package/dist/utils/postPaneCleanup.js +53 -0
  209. package/dist/utils/postPaneCleanup.js.map +1 -0
  210. package/dist/utils/shellPaneDetection.d.ts +44 -0
  211. package/dist/utils/shellPaneDetection.d.ts.map +1 -0
  212. package/dist/utils/shellPaneDetection.js +175 -0
  213. package/dist/utils/shellPaneDetection.js.map +1 -0
  214. package/dist/utils/tmux.d.ts +53 -1
  215. package/dist/utils/tmux.d.ts.map +1 -1
  216. package/dist/utils/tmux.js +352 -84
  217. package/dist/utils/tmux.js.map +1 -1
  218. package/dist/utils/welcomePane.d.ts +22 -0
  219. package/dist/utils/welcomePane.d.ts.map +1 -0
  220. package/dist/utils/welcomePane.js +119 -0
  221. package/dist/utils/welcomePane.js.map +1 -0
  222. package/dist/utils/welcomePaneManager.d.ts +36 -0
  223. package/dist/utils/welcomePaneManager.d.ts.map +1 -0
  224. package/dist/utils/welcomePaneManager.js +160 -0
  225. package/dist/utils/welcomePaneManager.js.map +1 -0
  226. package/dist/workers/PaneWorker.js +2 -0
  227. package/dist/workers/PaneWorker.js.map +1 -1
  228. package/package.json +5 -2
  229. package/dist/components/NewPaneDialog.d.ts +0 -9
  230. package/dist/components/NewPaneDialog.d.ts.map +0 -1
  231. package/dist/components/NewPaneDialog.js +0 -11
  232. package/dist/components/NewPaneDialog.js.map +0 -1
@@ -0,0 +1,310 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Standalone popup for merge workflow
4
+ * Runs in a tmux popup modal and handles the entire merge process
5
+ */
6
+ import React, { useState, useEffect } from 'react';
7
+ import { render, Box, Text, useInput, useApp } from 'ink';
8
+ import TextInput from 'ink-text-input';
9
+ import * as fs from 'fs';
10
+ import { POPUP_CONFIG } from './config.js';
11
+ import { PopupWrapper, writeSuccessAndExit, writeCancelAndExit, writeErrorAndExit } from './components/index.js';
12
+ const MergePopupApp = ({ resultFile, paneSlug, worktreePath, mainRepoPath, mainBranch, }) => {
13
+ const [step, setStep] = useState('validating');
14
+ const [validation, setValidation] = useState(null);
15
+ const [selectedIndex, setSelectedIndex] = useState(0);
16
+ const [commitMessage, setCommitMessage] = useState('');
17
+ const [generatedMessage, setGeneratedMessage] = useState('');
18
+ const [errorMessage, setErrorMessage] = useState('');
19
+ const [statusMessage, setStatusMessage] = useState('Validating merge...');
20
+ const [targetRepo, setTargetRepo] = useState(''); // Track which repo we're committing to
21
+ const { exit } = useApp();
22
+ // Validation on mount
23
+ useEffect(() => {
24
+ (async () => {
25
+ try {
26
+ // Import and run validation
27
+ const { validateMerge } = await import('../utils/mergeValidation.js');
28
+ const result = validateMerge(mainRepoPath, worktreePath, paneSlug);
29
+ setValidation(result);
30
+ if (!result.canMerge) {
31
+ // Check issue types
32
+ const mainDirty = result.issues.find((i) => i.type === 'main_dirty');
33
+ const worktreeUncommitted = result.issues.find((i) => i.type === 'worktree_uncommitted');
34
+ const nothingToMerge = result.issues.find((i) => i.type === 'nothing_to_merge');
35
+ if (nothingToMerge) {
36
+ setStep('error');
37
+ setErrorMessage('No new commits to merge');
38
+ }
39
+ else if (mainDirty) {
40
+ setStep('main_dirty');
41
+ setStatusMessage('Main branch has uncommitted changes');
42
+ }
43
+ else if (worktreeUncommitted) {
44
+ setStep('worktree_uncommitted');
45
+ setStatusMessage('Worktree has uncommitted changes');
46
+ }
47
+ else {
48
+ setStep('error');
49
+ setErrorMessage(result.issues.map((i) => i.message).join('\n'));
50
+ }
51
+ }
52
+ else {
53
+ setStep('confirm');
54
+ setStatusMessage(`Ready to merge "${paneSlug}" into ${result.mainBranch}`);
55
+ }
56
+ }
57
+ catch (error) {
58
+ setStep('error');
59
+ setErrorMessage(`Validation failed: ${error}`);
60
+ }
61
+ })();
62
+ }, []);
63
+ // Handle AI commit message generation
64
+ const generateCommitMessage = async (repoPath) => {
65
+ setStep('generating_commit');
66
+ setStatusMessage('Generating commit message with AI...');
67
+ try {
68
+ const { generateCommitMessage } = await import('../utils/aiMerge.js');
69
+ const message = await generateCommitMessage(repoPath);
70
+ if (message) {
71
+ setGeneratedMessage(message);
72
+ setCommitMessage(message);
73
+ setStep('commit_input');
74
+ setStatusMessage('Review and edit commit message:');
75
+ }
76
+ else {
77
+ // AI generation failed, go straight to manual input
78
+ setStep('commit_input');
79
+ setStatusMessage('Enter commit message (AI generation unavailable):');
80
+ }
81
+ }
82
+ catch (error) {
83
+ setStep('commit_input');
84
+ setStatusMessage('Enter commit message (AI generation failed):');
85
+ }
86
+ };
87
+ // Execute merge
88
+ const executeMerge = async () => {
89
+ setStep('merging');
90
+ setStatusMessage('Merging worktree into main...');
91
+ try {
92
+ const { mergeWorktreeIntoMain } = await import('../utils/mergeExecution.js');
93
+ const result = mergeWorktreeIntoMain(mainRepoPath, paneSlug);
94
+ if (!result.success) {
95
+ setStep('error');
96
+ setErrorMessage(`Merge failed: ${result.error}`);
97
+ return;
98
+ }
99
+ // Merge successful
100
+ setStep('cleanup_confirm');
101
+ setStatusMessage('Merge complete! Close pane and cleanup?');
102
+ }
103
+ catch (error) {
104
+ setStep('error');
105
+ setErrorMessage(`Merge execution failed: ${error}`);
106
+ }
107
+ };
108
+ // Commit changes
109
+ const commitChanges = async (repoPath, message) => {
110
+ try {
111
+ const { stageAllChanges, commitChanges: doCommit } = await import('../utils/mergeValidation.js');
112
+ const stageResult = stageAllChanges(repoPath);
113
+ if (!stageResult.success) {
114
+ setStep('error');
115
+ setErrorMessage(`Failed to stage changes: ${stageResult.error}`);
116
+ return false;
117
+ }
118
+ const commitResult = doCommit(repoPath, message);
119
+ if (!commitResult.success) {
120
+ setStep('error');
121
+ setErrorMessage(`Commit failed: ${commitResult.error}`);
122
+ return false;
123
+ }
124
+ return true;
125
+ }
126
+ catch (error) {
127
+ setStep('error');
128
+ setErrorMessage(`Commit failed: ${error}`);
129
+ return false;
130
+ }
131
+ };
132
+ useInput((input, key) => {
133
+ if (key.escape && step !== 'merging' && step !== 'generating_commit') {
134
+ // User cancelled
135
+ writeCancelAndExit(resultFile, exit);
136
+ return;
137
+ }
138
+ // Step-specific handling
139
+ if (step === 'confirm') {
140
+ if (input === 'y' || input === 'Y' || key.return) {
141
+ executeMerge();
142
+ }
143
+ else if (input === 'n' || input === 'N') {
144
+ writeCancelAndExit(resultFile, exit);
145
+ }
146
+ }
147
+ else if (step === 'main_dirty' || step === 'worktree_uncommitted') {
148
+ const options = ['AI commit (auto)', 'AI commit (editable)', 'Manual commit', 'Cancel'];
149
+ if (key.upArrow) {
150
+ setSelectedIndex(Math.max(0, selectedIndex - 1));
151
+ }
152
+ else if (key.downArrow) {
153
+ setSelectedIndex(Math.min(options.length - 1, selectedIndex + 1));
154
+ }
155
+ else if (key.return) {
156
+ const repoPath = step === 'main_dirty' ? mainRepoPath : worktreePath;
157
+ setTargetRepo(repoPath);
158
+ switch (selectedIndex) {
159
+ case 0: // AI commit (auto)
160
+ (async () => {
161
+ await generateCommitMessage(repoPath);
162
+ if (commitMessage) {
163
+ if (await commitChanges(repoPath, commitMessage)) {
164
+ // Re-validate and proceed
165
+ setStep('validating');
166
+ setStatusMessage('Revalidating...');
167
+ // Trigger re-validation (simplified - would need proper re-run)
168
+ setTimeout(() => {
169
+ setStep('confirm');
170
+ setStatusMessage('Ready to merge');
171
+ }, 500);
172
+ }
173
+ }
174
+ })();
175
+ break;
176
+ case 1: // AI commit (editable)
177
+ generateCommitMessage(repoPath);
178
+ break;
179
+ case 2: // Manual commit
180
+ setStep('commit_input');
181
+ setStatusMessage('Enter commit message:');
182
+ break;
183
+ case 3: // Cancel
184
+ writeCancelAndExit(resultFile, exit);
185
+ break;
186
+ }
187
+ }
188
+ }
189
+ else if (step === 'cleanup_confirm') {
190
+ if (input === 'y' || input === 'Y' || key.return) {
191
+ // Cleanup and close
192
+ (async () => {
193
+ try {
194
+ const { cleanupAfterMerge } = await import('../utils/mergeExecution.js');
195
+ cleanupAfterMerge(mainRepoPath, worktreePath, paneSlug);
196
+ writeSuccessAndExit(resultFile, { merged: true, closedPane: true }, exit);
197
+ }
198
+ catch (error) {
199
+ setStep('error');
200
+ setErrorMessage(`Cleanup failed: ${error}`);
201
+ }
202
+ })();
203
+ }
204
+ else if (input === 'n' || input === 'N') {
205
+ // Just mark as merged, don't close
206
+ writeSuccessAndExit(resultFile, { merged: true, closedPane: false }, exit);
207
+ }
208
+ }
209
+ else if (step === 'error') {
210
+ // Any key exits on error
211
+ writeErrorAndExit(resultFile, errorMessage, exit);
212
+ }
213
+ });
214
+ return (React.createElement(PopupWrapper, { resultFile: resultFile, allowEscapeToCancel: false },
215
+ React.createElement(Box, { flexDirection: "column", paddingX: 2, paddingY: 1 },
216
+ React.createElement(Box, { marginBottom: 1 },
217
+ React.createElement(Text, { bold: true, color: POPUP_CONFIG.titleColor },
218
+ "\uD83D\uDD00 Merge: ",
219
+ paneSlug,
220
+ " \u2192 ",
221
+ mainBranch)),
222
+ React.createElement(Box, { marginBottom: 1 },
223
+ React.createElement(Text, null, statusMessage)),
224
+ step === 'validating' && (React.createElement(Box, null,
225
+ React.createElement(Text, { dimColor: true }, "Checking repository status..."))),
226
+ step === 'confirm' && (React.createElement(Box, { flexDirection: "column" },
227
+ React.createElement(Box, { marginBottom: 1 },
228
+ React.createElement(Text, null, "Proceed with merge?")),
229
+ React.createElement(Box, null,
230
+ React.createElement(Text, { dimColor: true }, "Y to confirm \u2022 N to cancel \u2022 ESC to exit")))),
231
+ (step === 'main_dirty' || step === 'worktree_uncommitted') && (React.createElement(Box, { flexDirection: "column" },
232
+ validation?.issues
233
+ .filter(i => i.type === step)
234
+ .map((issue, idx) => (React.createElement(Box, { key: idx, marginBottom: 1, flexDirection: "column" },
235
+ React.createElement(Text, null, issue.message),
236
+ issue.files && issue.files.length > 0 && (React.createElement(Box, { marginLeft: 2, flexDirection: "column" },
237
+ issue.files.slice(0, 5).map((file, i) => (React.createElement(Text, { key: i, dimColor: true },
238
+ "\u2022 ",
239
+ file))),
240
+ issue.files.length > 5 && (React.createElement(Text, { dimColor: true },
241
+ "... and ",
242
+ issue.files.length - 5,
243
+ " more"))))))),
244
+ React.createElement(Box, { flexDirection: "column", marginTop: 1, marginBottom: 1 }, ['AI commit (auto)', 'AI commit (editable)', 'Manual commit', 'Cancel'].map((option, idx) => (React.createElement(Box, { key: idx },
245
+ React.createElement(Text, { color: selectedIndex === idx ? POPUP_CONFIG.titleColor : 'white', bold: selectedIndex === idx },
246
+ selectedIndex === idx ? '▶ ' : ' ',
247
+ option))))),
248
+ React.createElement(Box, null,
249
+ React.createElement(Text, { dimColor: true }, "\u2191\u2193 to navigate \u2022 Enter to select \u2022 ESC to cancel")))),
250
+ step === 'generating_commit' && (React.createElement(Box, null,
251
+ React.createElement(Text, { dimColor: true }, "\u23F3 Generating commit message with AI..."))),
252
+ step === 'commit_input' && (React.createElement(Box, { flexDirection: "column" },
253
+ generatedMessage && (React.createElement(Box, { marginBottom: 1 },
254
+ React.createElement(Text, { dimColor: true },
255
+ "Generated: ",
256
+ generatedMessage.split('\n')[0]))),
257
+ React.createElement(Box, null,
258
+ React.createElement(Text, null, "Message: "),
259
+ React.createElement(TextInput, { value: commitMessage, onChange: setCommitMessage, onSubmit: async (value) => {
260
+ if (value.trim()) {
261
+ if (await commitChanges(targetRepo, value)) {
262
+ // Re-validate
263
+ setStep('validating');
264
+ setTimeout(() => {
265
+ setStep('confirm');
266
+ setStatusMessage('Ready to merge');
267
+ }, 500);
268
+ }
269
+ }
270
+ } })),
271
+ React.createElement(Box, { marginTop: 1 },
272
+ React.createElement(Text, { dimColor: true }, "Enter to submit \u2022 ESC to cancel")))),
273
+ step === 'merging' && (React.createElement(Box, null,
274
+ React.createElement(Text, { dimColor: true }, "\u23F3 Merging branches..."))),
275
+ step === 'cleanup_confirm' && (React.createElement(Box, { flexDirection: "column" },
276
+ React.createElement(Box, { marginBottom: 1 },
277
+ React.createElement(Text, { color: POPUP_CONFIG.successColor }, "\u2713 Merge successful!")),
278
+ React.createElement(Box, { marginBottom: 1 },
279
+ React.createElement(Text, null, "Close pane and cleanup worktree?")),
280
+ React.createElement(Box, null,
281
+ React.createElement(Text, { dimColor: true }, "Y to cleanup \u2022 N to keep pane \u2022 ESC to exit")))),
282
+ step === 'error' && (React.createElement(Box, { flexDirection: "column" },
283
+ React.createElement(Box, { marginBottom: 1 },
284
+ React.createElement(Text, { color: POPUP_CONFIG.errorColor }, "\u2717 Error")),
285
+ React.createElement(Box, { marginBottom: 1 },
286
+ React.createElement(Text, null, errorMessage)),
287
+ React.createElement(Box, null,
288
+ React.createElement(Text, { dimColor: true }, "Press any key to close")))))));
289
+ };
290
+ // Entry point
291
+ function main() {
292
+ const resultFile = process.argv[2];
293
+ const dataFile = process.argv[3];
294
+ if (!resultFile || !dataFile) {
295
+ console.error('Error: Result file and data file required');
296
+ process.exit(1);
297
+ }
298
+ let data;
299
+ try {
300
+ const dataJson = fs.readFileSync(dataFile, 'utf-8');
301
+ data = JSON.parse(dataJson);
302
+ }
303
+ catch (error) {
304
+ console.error('Error: Failed to read or parse data file');
305
+ process.exit(1);
306
+ }
307
+ render(React.createElement(MergePopupApp, { resultFile: resultFile, paneSlug: data.paneSlug, worktreePath: data.worktreePath, mainRepoPath: data.mainRepoPath, mainBranch: data.mainBranch }));
308
+ }
309
+ main();
310
+ //# sourceMappingURL=mergePopup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mergePopup.js","sourceRoot":"","sources":["../../src/popups/mergePopup.tsx"],"names":[],"mappings":";AAEA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAC1D,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAEzB,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EAElB,MAAM,uBAAuB,CAAC;AAkC/B,MAAM,aAAa,GAA8B,CAAC,EAChD,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,UAAU,GACX,EAAE,EAAE;IACH,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAY,YAAY,CAAC,CAAC;IAC1D,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAA0B,IAAI,CAAC,CAAC;IAC5E,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IACtD,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACvD,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC7D,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACrD,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ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IACZ,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,UAAU,EAAE,IAAI,CAAC,UAAU,GAC3B,CACH,CAAC;AACJ,CAAC;AAED,IAAI,EAAE,CAAC"}
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Standalone popup for creating a new dmux pane
4
+ * Runs in a tmux popup modal and writes result to a file
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=newPanePopup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"newPanePopup.d.ts","sourceRoot":"","sources":["../../src/popups/newPanePopup.tsx"],"names":[],"mappings":";AAEA;;;GAGG"}
@@ -0,0 +1,234 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Standalone popup for creating a new dmux pane
4
+ * Runs in a tmux popup modal and writes result to a file
5
+ */
6
+ import React, { useState, useEffect } from "react";
7
+ import { render, Box, Text, useApp, useInput } from "ink";
8
+ import { PopupContainer, PopupWrapper, writeSuccessAndExit, FileList, } from "./components/index.js";
9
+ import { PopupFooters, POPUP_CONFIG } from "./config.js";
10
+ import CleanTextInput from "../CleanTextInput.js";
11
+ import { scanProjectFiles, fuzzyMatchFiles } from "../utils/fileScanner.js";
12
+ import fs from "fs";
13
+ import path from "path";
14
+ // Debug logging to file
15
+ const DEBUG_LOG = path.join(process.cwd(), '.dmux', 'file-picker-debug.log');
16
+ function debugLog(message, data) {
17
+ const timestamp = new Date().toISOString();
18
+ const logLine = `[${timestamp}] ${message} ${data ? JSON.stringify(data, null, 2) : ''}\n`;
19
+ try {
20
+ fs.appendFileSync(DEBUG_LOG, logLine);
21
+ }
22
+ catch (e) {
23
+ // Ignore write errors
24
+ }
25
+ }
26
+ const NewPanePopupApp = ({ resultFile }) => {
27
+ const [prompt, setPrompt] = useState("");
28
+ const { exit } = useApp();
29
+ // File autocomplete state
30
+ const [isFileListActive, setIsFileListActive] = useState(false);
31
+ const [filteredFiles, setFilteredFiles] = useState([]);
32
+ const [selectedFileIndex, setSelectedFileIndex] = useState(0);
33
+ const [atPosition, setAtPosition] = useState(-1); // Position of @ in text
34
+ const [cursorPosition, setCursorPosition] = useState(undefined);
35
+ const [currentCursor, setCurrentCursor] = useState(0); // Track cursor position from CleanTextInput
36
+ // Reset cursor position override after it's been applied
37
+ useEffect(() => {
38
+ if (cursorPosition !== undefined) {
39
+ // Clear the override on next render to allow normal cursor movement
40
+ const timer = setTimeout(() => setCursorPosition(undefined), 0);
41
+ return () => clearTimeout(timer);
42
+ }
43
+ }, [cursorPosition]);
44
+ // Detect @ and scan files (cursor-aware)
45
+ useEffect(() => {
46
+ debugLog('[@Detection] Running with:', {
47
+ prompt,
48
+ currentCursor,
49
+ promptLength: prompt.length
50
+ });
51
+ // Find the @ symbol that is before the cursor position
52
+ // Cursor position N means cursor is BETWEEN index N-1 and N
53
+ // So we search backwards from index N-1
54
+ let atBeforeCursor = -1;
55
+ for (let i = currentCursor - 1; i >= 0; i--) {
56
+ if (prompt[i] === '@') {
57
+ atBeforeCursor = i;
58
+ debugLog('[@Detection] Found @ at position:', { position: i });
59
+ break;
60
+ }
61
+ }
62
+ if (atBeforeCursor !== -1) {
63
+ // Get the text after @ (until space or end of string)
64
+ const afterAt = prompt.slice(atBeforeCursor + 1);
65
+ const match = afterAt.match(/^([^\s]*)/);
66
+ const query = match ? match[1] : '';
67
+ const endOfQuery = atBeforeCursor + 1 + query.length;
68
+ debugLog('[@Detection] After @:', {
69
+ afterAt,
70
+ query,
71
+ atBeforeCursor,
72
+ endOfQuery,
73
+ cursorInRange: currentCursor >= atBeforeCursor && currentCursor <= endOfQuery
74
+ });
75
+ // Only show file list if cursor is within the @ reference
76
+ if (currentCursor >= atBeforeCursor && currentCursor <= endOfQuery) {
77
+ // Check if there's a space after the query (means reference is complete)
78
+ const charAfterQuery = afterAt[query.length];
79
+ const spacePosition = atBeforeCursor + 1 + query.length;
80
+ debugLog('[@Detection] charAfterQuery:', { char: charAfterQuery, spacePosition, currentCursor });
81
+ // Only hide if:
82
+ // 1. Query is not empty (has actual text)
83
+ // 2. There's a space after the query
84
+ // 3. Cursor is PAST the space (user moved beyond it)
85
+ // This prevents hiding when user is still typing (cursor before/at the space)
86
+ if (charAfterQuery === ' ' && query.length > 0 && currentCursor > spacePosition) {
87
+ // Reference is complete (e.g., "@BUG.md "), and cursor has moved past it
88
+ debugLog('[@Detection] Reference complete (cursor past space), hiding file list');
89
+ setIsFileListActive(false);
90
+ setFilteredFiles([]);
91
+ setAtPosition(-1);
92
+ return;
93
+ }
94
+ // User is actively typing a query, show file list
95
+ debugLog('[@Detection] Showing file list for query:', { query });
96
+ try {
97
+ const projectPath = process.cwd();
98
+ const { files } = scanProjectFiles(projectPath);
99
+ const matches = fuzzyMatchFiles(query, files);
100
+ setFilteredFiles(matches);
101
+ setAtPosition(atBeforeCursor);
102
+ setIsFileListActive(true);
103
+ setSelectedFileIndex(0); // Reset selection when files change
104
+ }
105
+ catch (error) {
106
+ debugLog('[@Detection] Failed to scan files:', error);
107
+ setFilteredFiles([]);
108
+ setIsFileListActive(false);
109
+ }
110
+ }
111
+ else {
112
+ // Cursor is outside the @ reference, hide file list
113
+ debugLog('[@Detection] Cursor outside reference, hiding file list');
114
+ setIsFileListActive(false);
115
+ setFilteredFiles([]);
116
+ setAtPosition(-1);
117
+ }
118
+ }
119
+ else {
120
+ // No @ found before cursor, hide file list
121
+ debugLog('[@Detection] No @ found before cursor');
122
+ setIsFileListActive(false);
123
+ setFilteredFiles([]);
124
+ setAtPosition(-1);
125
+ }
126
+ }, [prompt, currentCursor]);
127
+ // Handle keyboard navigation - runs BEFORE other handlers
128
+ // This is critical: we need to intercept ESC for progressive behavior
129
+ useInput((input, key) => {
130
+ // Handle ESC with progressive behavior:
131
+ // 1. If file list is active, dismiss it
132
+ // 2. If text is present, clear it
133
+ // 3. If no text, allow PopupWrapper to close the popup
134
+ if (key.escape) {
135
+ if (isFileListActive) {
136
+ // Dismiss file list
137
+ debugLog('[ESC] Dismissing file list');
138
+ setIsFileListActive(false);
139
+ setFilteredFiles([]);
140
+ setAtPosition(-1);
141
+ return; // Prevent further handling
142
+ }
143
+ else if (prompt.length > 0) {
144
+ // Clear the text input
145
+ debugLog('[ESC] Clearing text input');
146
+ setPrompt('');
147
+ return; // Prevent further handling (don't close popup)
148
+ }
149
+ // If no file list and no text, let PopupWrapper close the popup
150
+ // (don't return, let the event propagate)
151
+ }
152
+ // Only handle other keys when file list is active
153
+ if (!isFileListActive) {
154
+ return; // Let CleanTextInput handle keys
155
+ }
156
+ // Arrow up - move selection up
157
+ if (key.upArrow) {
158
+ setSelectedFileIndex(prev => Math.max(0, prev - 1));
159
+ return;
160
+ }
161
+ // Arrow down - move selection down
162
+ if (key.downArrow) {
163
+ setSelectedFileIndex(prev => Math.min(filteredFiles.length - 1, prev + 1));
164
+ return;
165
+ }
166
+ // Tab or Enter - select file and insert it
167
+ if (key.tab || key.return) {
168
+ if (filteredFiles.length > 0 && selectedFileIndex < filteredFiles.length) {
169
+ const selectedFile = filteredFiles[selectedFileIndex];
170
+ // Replace the query after @ with the selected file path (keep the @)
171
+ const beforeAt = prompt.slice(0, atPosition);
172
+ const afterAt = prompt.slice(atPosition);
173
+ const afterAtMatch = afterAt.match(/^@[^\s]*/);
174
+ const queryLength = afterAtMatch ? afterAtMatch[0].length : 1;
175
+ const afterQuery = prompt.slice(atPosition + queryLength);
176
+ // Insert @filepath (with space after if there isn't one)
177
+ const fileReference = '@' + selectedFile;
178
+ const newPrompt = beforeAt + fileReference + (afterQuery.startsWith(' ') ? '' : ' ') + afterQuery;
179
+ setPrompt(newPrompt);
180
+ // Set cursor position to end of the inserted file reference
181
+ const newCursorPos = beforeAt.length + fileReference.length;
182
+ setCursorPosition(newCursorPos);
183
+ // Reset file list
184
+ setIsFileListActive(false);
185
+ setFilteredFiles([]);
186
+ setAtPosition(-1);
187
+ }
188
+ return;
189
+ }
190
+ });
191
+ const handleSubmit = (value) => {
192
+ // Don't submit if file list is active (Enter should select file, not submit)
193
+ if (isFileListActive) {
194
+ return;
195
+ }
196
+ writeSuccessAndExit(resultFile, value || prompt, exit);
197
+ };
198
+ const shouldAllowCancel = () => {
199
+ // Block cancel (ESC key) if:
200
+ // 1. File list is currently active, OR
201
+ // 2. There's text in the prompt
202
+ // This runs BEFORE my useInput handler, so we check the current state
203
+ debugLog('[shouldAllowCancel]', { isFileListActive, hasPrompt: prompt.length > 0 });
204
+ if (isFileListActive) {
205
+ debugLog('[shouldAllowCancel] Blocking cancel - file list is active');
206
+ return false;
207
+ }
208
+ if (prompt.length > 0) {
209
+ debugLog('[shouldAllowCancel] Blocking cancel - prompt has text');
210
+ return false;
211
+ }
212
+ // Only allow cancel if no file list and no text
213
+ debugLog('[shouldAllowCancel] Allowing cancel');
214
+ return true;
215
+ };
216
+ return (React.createElement(PopupWrapper, { resultFile: resultFile, allowEscapeToCancel: true, shouldAllowCancel: shouldAllowCancel },
217
+ React.createElement(PopupContainer, { footer: PopupFooters.input() },
218
+ React.createElement(Box, { marginBottom: 1 },
219
+ React.createElement(Text, { dimColor: true }, "Enter a prompt for your AI agent.")),
220
+ React.createElement(Box, { width: "100%", borderStyle: POPUP_CONFIG.inputBorderStyle, borderColor: POPUP_CONFIG.inputBorderColor, paddingX: POPUP_CONFIG.inputPadding.x, paddingY: POPUP_CONFIG.inputPadding.y },
221
+ React.createElement(CleanTextInput, { value: prompt, onChange: setPrompt, onSubmit: handleSubmit, placeholder: "e.g., Add user authentication with JWT", maxWidth: 76, maxVisibleLines: 10, cursorPosition: cursorPosition, disableUpDownArrows: isFileListActive, disableEscape: isFileListActive, onCursorChange: setCurrentCursor, ignoreFocus: true })),
222
+ isFileListActive && (React.createElement(FileList, { files: filteredFiles, selectedIndex: selectedFileIndex, maxVisible: 10 })))));
223
+ };
224
+ // Entry point
225
+ function main() {
226
+ const resultFile = process.argv[2];
227
+ if (!resultFile) {
228
+ console.error("Error: Result file path required");
229
+ process.exit(1);
230
+ }
231
+ render(React.createElement(NewPanePopupApp, { resultFile: resultFile }));
232
+ }
233
+ main();
234
+ //# sourceMappingURL=newPanePopup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"newPanePopup.js","sourceRoot":"","sources":["../../src/popups/newPanePopup.tsx"],"names":[],"mappings":";AAEA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAClD,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AACzD,OAAO,EACL,cAAc,EAEd,YAAY,EACZ,mBAAmB,EACnB,QAAQ,GACT,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AACxD,OAAO,cAAc,MAAM,sBAAsB,CAAA;AACjD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAC3E,OAAO,EAAE,MAAM,IAAI,CAAA;AACnB,OAAO,IAAI,MAAM,MAAM,CAAA;AAEvB,wBAAwB;AACxB,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,uBAAuB,CAAC,CAAA;AAC5E,SAAS,QAAQ,CAAC,OAAe,EAAE,IAAU;IAC3C,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAA;IAC1C,MAAM,OAAO,GAAG,IAAI,SAAS,KAAK,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,CAAA;IAC1F,IAAI,CAAC;QACH,EAAE,CAAC,cAAc,CAAC,SAAS,EAAE,OAAO,CAAC,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1,8 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Standalone popup for progress/status messages
4
+ * Runs in a tmux popup modal and writes result to a file
5
+ * This popup auto-closes after a timeout
6
+ */
7
+ export {};
8
+ //# sourceMappingURL=progressPopup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"progressPopup.d.ts","sourceRoot":"","sources":["../../src/popups/progressPopup.tsx"],"names":[],"mappings":";AAEA;;;;GAIG"}