claude-code-plus-plus 0.3.1 → 0.4.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.
- package/dist/constants.d.ts +6 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +7 -2
- package/dist/constants.js.map +1 -1
- package/dist/diff/diff-handler.d.ts +15 -0
- package/dist/diff/diff-handler.d.ts.map +1 -0
- package/dist/diff/diff-handler.js +235 -0
- package/dist/diff/diff-handler.js.map +1 -0
- package/dist/diff/diff-manager.d.ts +63 -0
- package/dist/diff/diff-manager.d.ts.map +1 -0
- package/dist/diff/diff-manager.js +271 -0
- package/dist/diff/diff-manager.js.map +1 -0
- package/dist/diff/diff-pane-render.d.ts +34 -0
- package/dist/diff/diff-pane-render.d.ts.map +1 -0
- package/dist/diff/diff-pane-render.js +222 -0
- package/dist/diff/diff-pane-render.js.map +1 -0
- package/dist/diff/file-diff-content-handler.d.ts +16 -0
- package/dist/diff/file-diff-content-handler.d.ts.map +1 -0
- package/dist/diff/file-diff-content-handler.js +142 -0
- package/dist/diff/file-diff-content-handler.js.map +1 -0
- package/dist/diff/file-diff-header-handler.d.ts +16 -0
- package/dist/diff/file-diff-header-handler.d.ts.map +1 -0
- package/dist/diff/file-diff-header-handler.js +191 -0
- package/dist/diff/file-diff-header-handler.js.map +1 -0
- package/dist/diff/file-diff-header-render.d.ts +30 -0
- package/dist/diff/file-diff-header-render.d.ts.map +1 -0
- package/dist/diff/file-diff-header-render.js +101 -0
- package/dist/diff/file-diff-header-render.js.map +1 -0
- package/dist/diff/file-diff-render.d.ts +27 -0
- package/dist/diff/file-diff-render.d.ts.map +1 -0
- package/dist/diff/file-diff-render.js +211 -0
- package/dist/diff/file-diff-render.js.map +1 -0
- package/dist/diff/git-diff.d.ts +54 -0
- package/dist/diff/git-diff.d.ts.map +1 -0
- package/dist/diff/git-diff.js +599 -0
- package/dist/diff/git-diff.js.map +1 -0
- package/dist/diff/index.d.ts +8 -0
- package/dist/diff/index.d.ts.map +1 -0
- package/dist/diff/index.js +37 -0
- package/dist/diff/index.js.map +1 -0
- package/dist/sidebar/app.d.ts +69 -0
- package/dist/sidebar/app.d.ts.map +1 -1
- package/dist/sidebar/app.js +508 -10
- package/dist/sidebar/app.js.map +1 -1
- package/dist/sidebar/commands.d.ts +1 -0
- package/dist/sidebar/commands.d.ts.map +1 -1
- package/dist/sidebar/commands.js +11 -0
- package/dist/sidebar/commands.js.map +1 -1
- package/dist/sidebar/pane-orchestrator.d.ts.map +1 -1
- package/dist/sidebar/pane-orchestrator.js +10 -1
- package/dist/sidebar/pane-orchestrator.js.map +1 -1
- package/dist/sidebar/render.d.ts.map +1 -1
- package/dist/sidebar/render.js +2 -1
- package/dist/sidebar/render.js.map +1 -1
- package/dist/tmux/index.d.ts +1 -1
- package/dist/tmux/index.d.ts.map +1 -1
- package/dist/tmux/index.js +2 -1
- package/dist/tmux/index.js.map +1 -1
- package/dist/tmux/pane.d.ts +5 -0
- package/dist/tmux/pane.d.ts.map +1 -1
- package/dist/tmux/pane.js +10 -0
- package/dist/tmux/pane.js.map +1 -1
- package/dist/types.d.ts +10 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,599 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Git Diff Operations
|
|
4
|
+
*
|
|
5
|
+
* Functions for getting git diff summaries and file diffs.
|
|
6
|
+
* Uses simple-git for git operations.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.getDiffSummary = getDiffSummary;
|
|
10
|
+
exports.getFileDiff = getFileDiff;
|
|
11
|
+
exports.getFileWithInlineDiff = getFileWithInlineDiff;
|
|
12
|
+
exports.getFullFileWithInlineDiff = getFullFileWithInlineDiff;
|
|
13
|
+
exports.getDiffsOnlyView = getDiffsOnlyView;
|
|
14
|
+
exports.watchForChanges = watchForChanges;
|
|
15
|
+
const simple_git_1 = require("simple-git");
|
|
16
|
+
const fs_1 = require("fs");
|
|
17
|
+
const promises_1 = require("fs/promises");
|
|
18
|
+
const path_1 = require("path");
|
|
19
|
+
// ============================================================================
|
|
20
|
+
// Git Diff Functions
|
|
21
|
+
// ============================================================================
|
|
22
|
+
/**
|
|
23
|
+
* Get a summary of all changed files in the working directory
|
|
24
|
+
* Includes both staged and unstaged changes compared to HEAD
|
|
25
|
+
*/
|
|
26
|
+
async function getDiffSummary(repoPath) {
|
|
27
|
+
const git = (0, simple_git_1.simpleGit)(repoPath);
|
|
28
|
+
const files = [];
|
|
29
|
+
try {
|
|
30
|
+
// Get status to understand which files have changed
|
|
31
|
+
const status = await git.status();
|
|
32
|
+
// Process all changed files from status
|
|
33
|
+
for (const file of status.modified) {
|
|
34
|
+
const stats = await getFileStats(git, file);
|
|
35
|
+
files.push({
|
|
36
|
+
file,
|
|
37
|
+
changeType: 'M',
|
|
38
|
+
insertions: stats.insertions,
|
|
39
|
+
deletions: stats.deletions,
|
|
40
|
+
binary: stats.binary,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
for (const file of status.created) {
|
|
44
|
+
const stats = await getFileStats(git, file, true);
|
|
45
|
+
files.push({
|
|
46
|
+
file,
|
|
47
|
+
changeType: 'A',
|
|
48
|
+
insertions: stats.insertions,
|
|
49
|
+
deletions: 0,
|
|
50
|
+
binary: stats.binary,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
for (const file of status.deleted) {
|
|
54
|
+
const stats = await getFileStats(git, file);
|
|
55
|
+
files.push({
|
|
56
|
+
file,
|
|
57
|
+
changeType: 'D',
|
|
58
|
+
insertions: 0,
|
|
59
|
+
deletions: stats.deletions,
|
|
60
|
+
binary: stats.binary,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
for (const rename of status.renamed) {
|
|
64
|
+
const stats = await getFileStats(git, rename.to);
|
|
65
|
+
files.push({
|
|
66
|
+
file: rename.to,
|
|
67
|
+
changeType: 'R',
|
|
68
|
+
insertions: stats.insertions,
|
|
69
|
+
deletions: stats.deletions,
|
|
70
|
+
binary: stats.binary,
|
|
71
|
+
oldFile: rename.from,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
// Also include staged files that might not be in the above categories
|
|
75
|
+
for (const file of status.staged) {
|
|
76
|
+
if (!files.some(f => f.file === file)) {
|
|
77
|
+
const stats = await getFileStats(git, file);
|
|
78
|
+
files.push({
|
|
79
|
+
file,
|
|
80
|
+
changeType: 'M',
|
|
81
|
+
insertions: stats.insertions,
|
|
82
|
+
deletions: stats.deletions,
|
|
83
|
+
binary: stats.binary,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
// Include untracked files (show as 'A' added with line count)
|
|
88
|
+
for (const file of status.not_added) {
|
|
89
|
+
const lineCount = await countFileLines(repoPath, file);
|
|
90
|
+
files.push({
|
|
91
|
+
file,
|
|
92
|
+
changeType: 'A', // Show as added instead of '?'
|
|
93
|
+
insertions: lineCount,
|
|
94
|
+
deletions: 0,
|
|
95
|
+
binary: false,
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
return files;
|
|
99
|
+
}
|
|
100
|
+
catch (err) {
|
|
101
|
+
// Not a git repo or error
|
|
102
|
+
return [];
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Count the number of lines in a file (for untracked files)
|
|
107
|
+
*/
|
|
108
|
+
async function countFileLines(repoPath, file) {
|
|
109
|
+
try {
|
|
110
|
+
const content = await (0, promises_1.readFile)((0, path_1.join)(repoPath, file), 'utf-8');
|
|
111
|
+
const lines = content.split('\n');
|
|
112
|
+
// Don't count the last element if it's empty (file ends with newline)
|
|
113
|
+
return lines[lines.length - 1] === '' ? lines.length - 1 : lines.length;
|
|
114
|
+
}
|
|
115
|
+
catch {
|
|
116
|
+
return 0;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Get line stats for a single file
|
|
121
|
+
*/
|
|
122
|
+
async function getFileStats(git, file, isNew = false) {
|
|
123
|
+
try {
|
|
124
|
+
let output;
|
|
125
|
+
if (isNew) {
|
|
126
|
+
// For new files, diff against empty tree
|
|
127
|
+
output = await git.raw(['diff', '--numstat', '--', file]);
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
// For existing files, diff against HEAD
|
|
131
|
+
output = await git.raw(['diff', 'HEAD', '--numstat', '--', file]);
|
|
132
|
+
}
|
|
133
|
+
if (!output.trim()) {
|
|
134
|
+
// Try staged diff
|
|
135
|
+
output = await git.raw(['diff', '--cached', '--numstat', '--', file]);
|
|
136
|
+
}
|
|
137
|
+
if (!output.trim()) {
|
|
138
|
+
return { insertions: 0, deletions: 0, binary: false };
|
|
139
|
+
}
|
|
140
|
+
const line = output.trim().split('\n')[0];
|
|
141
|
+
const parts = line.split('\t');
|
|
142
|
+
if (parts[0] === '-' && parts[1] === '-') {
|
|
143
|
+
// Binary file
|
|
144
|
+
return { insertions: 0, deletions: 0, binary: true };
|
|
145
|
+
}
|
|
146
|
+
return {
|
|
147
|
+
insertions: parseInt(parts[0], 10) || 0,
|
|
148
|
+
deletions: parseInt(parts[1], 10) || 0,
|
|
149
|
+
binary: false,
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
catch {
|
|
153
|
+
return { insertions: 0, deletions: 0, binary: false };
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Get the full diff content for a specific file
|
|
158
|
+
*/
|
|
159
|
+
async function getFileDiff(repoPath, filename) {
|
|
160
|
+
const git = (0, simple_git_1.simpleGit)(repoPath);
|
|
161
|
+
try {
|
|
162
|
+
// Try HEAD diff first (includes both staged and unstaged)
|
|
163
|
+
let diff = await git.diff(['HEAD', '--', filename]);
|
|
164
|
+
if (!diff) {
|
|
165
|
+
// Try staged diff
|
|
166
|
+
diff = await git.diff(['--cached', '--', filename]);
|
|
167
|
+
}
|
|
168
|
+
if (!diff) {
|
|
169
|
+
// For new untracked files, show the entire content as added
|
|
170
|
+
diff = await git.raw(['diff', '--no-index', '/dev/null', filename]).catch(() => '');
|
|
171
|
+
}
|
|
172
|
+
return diff;
|
|
173
|
+
}
|
|
174
|
+
catch {
|
|
175
|
+
return '';
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Get the full file content with inline diff markers colored.
|
|
180
|
+
* Shows the complete file with changed lines highlighted.
|
|
181
|
+
* For new files, shows all lines as added (green).
|
|
182
|
+
* For modified files, shows the full unified diff with colors.
|
|
183
|
+
*/
|
|
184
|
+
async function getFileWithInlineDiff(repoPath, filename) {
|
|
185
|
+
const git = (0, simple_git_1.simpleGit)(repoPath);
|
|
186
|
+
// ANSI color codes (same as ansi.ts but we inline them here to avoid circular deps)
|
|
187
|
+
const ESC = '\x1b';
|
|
188
|
+
const CSI = `${ESC}[`;
|
|
189
|
+
const reset = `${CSI}0m`;
|
|
190
|
+
const bold = `${CSI}1m`;
|
|
191
|
+
const dim = `${CSI}2m`;
|
|
192
|
+
const fgRed = `${CSI}31m`;
|
|
193
|
+
const fgGreen = `${CSI}32m`;
|
|
194
|
+
const fgCyan = `${CSI}36m`;
|
|
195
|
+
const fgWhite = `${CSI}37m`;
|
|
196
|
+
try {
|
|
197
|
+
// Get the status to determine if this is a new file
|
|
198
|
+
const status = await git.status();
|
|
199
|
+
const isUntracked = status.not_added.includes(filename);
|
|
200
|
+
const isNew = status.created.includes(filename) || isUntracked;
|
|
201
|
+
if (isNew || isUntracked) {
|
|
202
|
+
// New/untracked file - show all lines as added (no header - filename in header pane)
|
|
203
|
+
const content = await (0, promises_1.readFile)((0, path_1.join)(repoPath, filename), 'utf-8');
|
|
204
|
+
const lines = content.split('\n');
|
|
205
|
+
let output = '';
|
|
206
|
+
for (let i = 0; i < lines.length; i++) {
|
|
207
|
+
output += `${fgGreen}+${lines[i]}${reset}\n`;
|
|
208
|
+
}
|
|
209
|
+
return output;
|
|
210
|
+
}
|
|
211
|
+
// Get the diff for existing file
|
|
212
|
+
let diff = await git.diff(['HEAD', '--', filename]);
|
|
213
|
+
if (!diff) {
|
|
214
|
+
diff = await git.diff(['--cached', '--', filename]);
|
|
215
|
+
}
|
|
216
|
+
if (!diff) {
|
|
217
|
+
// No diff available - just show the file content
|
|
218
|
+
const content = await (0, promises_1.readFile)((0, path_1.join)(repoPath, filename), 'utf-8');
|
|
219
|
+
return content;
|
|
220
|
+
}
|
|
221
|
+
// Parse and colorize the diff output
|
|
222
|
+
const lines = diff.split('\n');
|
|
223
|
+
let output = '';
|
|
224
|
+
for (const line of lines) {
|
|
225
|
+
if (line.startsWith('diff ') || line.startsWith('index ')) {
|
|
226
|
+
output += `${dim}${line}${reset}\n`;
|
|
227
|
+
}
|
|
228
|
+
else if (line.startsWith('---') || line.startsWith('+++')) {
|
|
229
|
+
output += `${bold}${fgWhite}${line}${reset}\n`;
|
|
230
|
+
}
|
|
231
|
+
else if (line.startsWith('@@')) {
|
|
232
|
+
output += `${fgCyan}${line}${reset}\n`;
|
|
233
|
+
}
|
|
234
|
+
else if (line.startsWith('+')) {
|
|
235
|
+
output += `${fgGreen}${line}${reset}\n`;
|
|
236
|
+
}
|
|
237
|
+
else if (line.startsWith('-')) {
|
|
238
|
+
output += `${fgRed}${line}${reset}\n`;
|
|
239
|
+
}
|
|
240
|
+
else if (line.startsWith('\\')) {
|
|
241
|
+
output += `${dim}${line}${reset}\n`;
|
|
242
|
+
}
|
|
243
|
+
else {
|
|
244
|
+
output += `${line}\n`;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
return output;
|
|
248
|
+
}
|
|
249
|
+
catch (err) {
|
|
250
|
+
// Fallback: try to read the file directly
|
|
251
|
+
try {
|
|
252
|
+
const content = await (0, promises_1.readFile)((0, path_1.join)(repoPath, filename), 'utf-8');
|
|
253
|
+
return content;
|
|
254
|
+
}
|
|
255
|
+
catch {
|
|
256
|
+
return `Error reading file: ${filename}`;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Get the full file content with inline diffs.
|
|
262
|
+
* Shows the COMPLETE current file with changed sections highlighted:
|
|
263
|
+
* - Unchanged lines: normal text
|
|
264
|
+
* - Deleted lines: shown in red at the position they were removed
|
|
265
|
+
* - Added lines: shown in green (these are already in the current file)
|
|
266
|
+
*
|
|
267
|
+
* For new files, shows all lines as added (green).
|
|
268
|
+
*/
|
|
269
|
+
async function getFullFileWithInlineDiff(repoPath, filename) {
|
|
270
|
+
const git = (0, simple_git_1.simpleGit)(repoPath);
|
|
271
|
+
// ANSI color codes
|
|
272
|
+
const ESC = '\x1b';
|
|
273
|
+
const CSI = `${ESC}[`;
|
|
274
|
+
const reset = `${CSI}0m`;
|
|
275
|
+
const dim = `${CSI}2m`;
|
|
276
|
+
const fgRed = `${CSI}31m`;
|
|
277
|
+
const fgGreen = `${CSI}32m`;
|
|
278
|
+
const bgRed = `${CSI}41m`;
|
|
279
|
+
const bgGreen = `${CSI}42m`;
|
|
280
|
+
const fgBlack = `${CSI}30m`;
|
|
281
|
+
try {
|
|
282
|
+
// Get the status to determine if this is a new file
|
|
283
|
+
const status = await git.status();
|
|
284
|
+
const isUntracked = status.not_added.includes(filename);
|
|
285
|
+
const isNew = status.created.includes(filename) || isUntracked;
|
|
286
|
+
// Read the current file content
|
|
287
|
+
let currentContent;
|
|
288
|
+
try {
|
|
289
|
+
currentContent = await (0, promises_1.readFile)((0, path_1.join)(repoPath, filename), 'utf-8');
|
|
290
|
+
}
|
|
291
|
+
catch {
|
|
292
|
+
return `Error: Cannot read file ${filename}`;
|
|
293
|
+
}
|
|
294
|
+
if (isNew || isUntracked) {
|
|
295
|
+
// New/untracked file - show all lines as added
|
|
296
|
+
const lines = currentContent.split('\n');
|
|
297
|
+
let output = '';
|
|
298
|
+
for (let i = 0; i < lines.length; i++) {
|
|
299
|
+
const lineNum = String(i + 1).padStart(4, ' ');
|
|
300
|
+
output += `${dim}${lineNum}${reset} ${fgGreen}+${reset} ${fgGreen}${lines[i]}${reset}\n`;
|
|
301
|
+
}
|
|
302
|
+
return output;
|
|
303
|
+
}
|
|
304
|
+
// Get the diff for modified file
|
|
305
|
+
let diff = await git.diff(['HEAD', '--', filename]);
|
|
306
|
+
if (!diff) {
|
|
307
|
+
diff = await git.diff(['--cached', '--', filename]);
|
|
308
|
+
}
|
|
309
|
+
if (!diff) {
|
|
310
|
+
// No changes - just show the file content with line numbers
|
|
311
|
+
const lines = currentContent.split('\n');
|
|
312
|
+
let output = '';
|
|
313
|
+
for (let i = 0; i < lines.length; i++) {
|
|
314
|
+
const lineNum = String(i + 1).padStart(4, ' ');
|
|
315
|
+
output += `${dim}${lineNum}${reset} ${lines[i]}\n`;
|
|
316
|
+
}
|
|
317
|
+
return output;
|
|
318
|
+
}
|
|
319
|
+
// Parse the diff and build full file view with inline changes
|
|
320
|
+
return buildFullFileWithDiff(currentContent, diff);
|
|
321
|
+
}
|
|
322
|
+
catch (err) {
|
|
323
|
+
// Fallback: just show the file content
|
|
324
|
+
try {
|
|
325
|
+
const content = await (0, promises_1.readFile)((0, path_1.join)(repoPath, filename), 'utf-8');
|
|
326
|
+
const lines = content.split('\n');
|
|
327
|
+
let output = '';
|
|
328
|
+
for (let i = 0; i < lines.length; i++) {
|
|
329
|
+
const lineNum = String(i + 1).padStart(4, ' ');
|
|
330
|
+
output += `${dim}${lineNum}${reset} ${lines[i]}\n`;
|
|
331
|
+
}
|
|
332
|
+
return output;
|
|
333
|
+
}
|
|
334
|
+
catch {
|
|
335
|
+
return `Error reading file: ${filename}`;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* Parse unified diff and build full file view with changes inline
|
|
341
|
+
*/
|
|
342
|
+
function buildFullFileWithDiff(currentContent, diff) {
|
|
343
|
+
// ANSI color codes
|
|
344
|
+
const ESC = '\x1b';
|
|
345
|
+
const CSI = `${ESC}[`;
|
|
346
|
+
const reset = `${CSI}0m`;
|
|
347
|
+
const dim = `${CSI}2m`;
|
|
348
|
+
const fgRed = `${CSI}31m`;
|
|
349
|
+
const fgGreen = `${CSI}32m`;
|
|
350
|
+
const currentLines = currentContent.split('\n');
|
|
351
|
+
const diffLines = diff.split('\n');
|
|
352
|
+
const hunks = [];
|
|
353
|
+
let currentHunk = null;
|
|
354
|
+
for (const line of diffLines) {
|
|
355
|
+
const hunkMatch = line.match(/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/);
|
|
356
|
+
if (hunkMatch) {
|
|
357
|
+
if (currentHunk) {
|
|
358
|
+
hunks.push(currentHunk);
|
|
359
|
+
}
|
|
360
|
+
currentHunk = {
|
|
361
|
+
oldStart: parseInt(hunkMatch[1], 10),
|
|
362
|
+
oldCount: parseInt(hunkMatch[2] || '1', 10),
|
|
363
|
+
newStart: parseInt(hunkMatch[3], 10),
|
|
364
|
+
newCount: parseInt(hunkMatch[4] || '1', 10),
|
|
365
|
+
lines: [],
|
|
366
|
+
};
|
|
367
|
+
}
|
|
368
|
+
else if (currentHunk) {
|
|
369
|
+
if (line.startsWith('+') && !line.startsWith('+++')) {
|
|
370
|
+
currentHunk.lines.push({ type: '+', content: line.slice(1) });
|
|
371
|
+
}
|
|
372
|
+
else if (line.startsWith('-') && !line.startsWith('---')) {
|
|
373
|
+
currentHunk.lines.push({ type: '-', content: line.slice(1) });
|
|
374
|
+
}
|
|
375
|
+
else if (line.startsWith(' ') || line === '') {
|
|
376
|
+
currentHunk.lines.push({ type: ' ', content: line.slice(1) || '' });
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
if (currentHunk) {
|
|
381
|
+
hunks.push(currentHunk);
|
|
382
|
+
}
|
|
383
|
+
// Build output by walking through file and inserting diffs
|
|
384
|
+
let output = '';
|
|
385
|
+
let currentLineNum = 1;
|
|
386
|
+
let hunkIdx = 0;
|
|
387
|
+
while (currentLineNum <= currentLines.length || hunkIdx < hunks.length) {
|
|
388
|
+
// Check if we're at a hunk start
|
|
389
|
+
const hunk = hunks[hunkIdx];
|
|
390
|
+
if (hunk && currentLineNum === hunk.newStart) {
|
|
391
|
+
// Process this hunk
|
|
392
|
+
for (const hunkLine of hunk.lines) {
|
|
393
|
+
if (hunkLine.type === '-') {
|
|
394
|
+
// Deleted line - show in red (not in current file)
|
|
395
|
+
output += `${dim} ${reset} ${fgRed}-${reset} ${fgRed}${hunkLine.content}${reset}\n`;
|
|
396
|
+
}
|
|
397
|
+
else if (hunkLine.type === '+') {
|
|
398
|
+
// Added line - show in green with line number
|
|
399
|
+
const lineNum = String(currentLineNum).padStart(4, ' ');
|
|
400
|
+
output += `${dim}${lineNum}${reset} ${fgGreen}+${reset} ${fgGreen}${hunkLine.content}${reset}\n`;
|
|
401
|
+
currentLineNum++;
|
|
402
|
+
}
|
|
403
|
+
else {
|
|
404
|
+
// Context line - show normally
|
|
405
|
+
const lineNum = String(currentLineNum).padStart(4, ' ');
|
|
406
|
+
output += `${dim}${lineNum}${reset} ${hunkLine.content}\n`;
|
|
407
|
+
currentLineNum++;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
hunkIdx++;
|
|
411
|
+
}
|
|
412
|
+
else if (currentLineNum <= currentLines.length) {
|
|
413
|
+
// Normal line (not in a hunk)
|
|
414
|
+
const lineNum = String(currentLineNum).padStart(4, ' ');
|
|
415
|
+
output += `${dim}${lineNum}${reset} ${currentLines[currentLineNum - 1]}\n`;
|
|
416
|
+
currentLineNum++;
|
|
417
|
+
}
|
|
418
|
+
else {
|
|
419
|
+
break;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
return output;
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* Get a "diffs only" view of a file - shows just the hunks without file headers.
|
|
426
|
+
* This is a compact view showing only the changed sections.
|
|
427
|
+
*
|
|
428
|
+
* For new/untracked files, shows all lines as added with a synthetic hunk header.
|
|
429
|
+
*/
|
|
430
|
+
async function getDiffsOnlyView(repoPath, filename) {
|
|
431
|
+
const git = (0, simple_git_1.simpleGit)(repoPath);
|
|
432
|
+
// ANSI color codes
|
|
433
|
+
const ESC = '\x1b';
|
|
434
|
+
const CSI = `${ESC}[`;
|
|
435
|
+
const reset = `${CSI}0m`;
|
|
436
|
+
const bold = `${CSI}1m`;
|
|
437
|
+
const dim = `${CSI}2m`;
|
|
438
|
+
const fgRed = `${CSI}31m`;
|
|
439
|
+
const fgGreen = `${CSI}32m`;
|
|
440
|
+
const fgYellow = `${CSI}33m`;
|
|
441
|
+
const fgCyan = `${CSI}36m`;
|
|
442
|
+
const bgGreen = `${CSI}42m`;
|
|
443
|
+
const bgRed = `${CSI}41m`;
|
|
444
|
+
const fgBlack = `${CSI}30m`;
|
|
445
|
+
// Helper to format hunk header nicely
|
|
446
|
+
const formatHunkHeader = (line, isFirst) => {
|
|
447
|
+
// Parse @@ -old,count +new,count @@ optional context
|
|
448
|
+
const match = line.match(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(.*)?/);
|
|
449
|
+
if (!match)
|
|
450
|
+
return `${dim}${line}${reset}\n`;
|
|
451
|
+
const oldStart = match[1];
|
|
452
|
+
const oldCount = match[2] || '1';
|
|
453
|
+
const newStart = match[3];
|
|
454
|
+
const newCount = match[4] || '1';
|
|
455
|
+
const context = match[5]?.trim() || '';
|
|
456
|
+
// Build a cleaner header
|
|
457
|
+
let header = '';
|
|
458
|
+
if (!isFirst) {
|
|
459
|
+
header += `${dim}${'─'.repeat(60)}${reset}\n`;
|
|
460
|
+
}
|
|
461
|
+
header += `${fgCyan}${bold}@@ `;
|
|
462
|
+
header += `${fgRed}−${oldStart},${oldCount}${reset}${fgCyan}${bold} `;
|
|
463
|
+
header += `${fgGreen}+${newStart},${newCount}${reset}`;
|
|
464
|
+
if (context) {
|
|
465
|
+
header += ` ${dim}${context}${reset}`;
|
|
466
|
+
}
|
|
467
|
+
header += `${reset}\n`;
|
|
468
|
+
return header;
|
|
469
|
+
};
|
|
470
|
+
try {
|
|
471
|
+
// Get the status to determine if this is a new file
|
|
472
|
+
const status = await git.status();
|
|
473
|
+
const isUntracked = status.not_added.includes(filename);
|
|
474
|
+
const isNew = status.created.includes(filename) || isUntracked;
|
|
475
|
+
if (isNew || isUntracked) {
|
|
476
|
+
// New/untracked file - show all lines as added with synthetic hunk header
|
|
477
|
+
const content = await (0, promises_1.readFile)((0, path_1.join)(repoPath, filename), 'utf-8');
|
|
478
|
+
const lines = content.split('\n');
|
|
479
|
+
// Don't count empty last line
|
|
480
|
+
const lineCount = lines[lines.length - 1] === '' ? lines.length - 1 : lines.length;
|
|
481
|
+
let output = `${fgYellow}${bold}New file${reset} ${dim}(${lineCount} lines)${reset}\n`;
|
|
482
|
+
output += `${dim}${'─'.repeat(60)}${reset}\n`;
|
|
483
|
+
for (let i = 0; i < lines.length; i++) {
|
|
484
|
+
// Skip truly empty trailing line
|
|
485
|
+
if (i === lines.length - 1 && lines[i] === '')
|
|
486
|
+
continue;
|
|
487
|
+
const lineNum = String(i + 1).padStart(4);
|
|
488
|
+
output += `${fgGreen}${lineNum} + ${lines[i]}${reset}\n`;
|
|
489
|
+
}
|
|
490
|
+
return output;
|
|
491
|
+
}
|
|
492
|
+
// Get the diff for existing file
|
|
493
|
+
let diff = await git.diff(['HEAD', '--', filename]);
|
|
494
|
+
if (!diff) {
|
|
495
|
+
diff = await git.diff(['--cached', '--', filename]);
|
|
496
|
+
}
|
|
497
|
+
if (!diff) {
|
|
498
|
+
// No changes
|
|
499
|
+
return `${dim}No changes${reset}`;
|
|
500
|
+
}
|
|
501
|
+
// Parse and colorize the diff output, skipping file headers
|
|
502
|
+
const diffLines = diff.split('\n');
|
|
503
|
+
let output = '';
|
|
504
|
+
let isFirstHunk = true;
|
|
505
|
+
let currentOldLine = 0;
|
|
506
|
+
let currentNewLine = 0;
|
|
507
|
+
for (const line of diffLines) {
|
|
508
|
+
// Skip file header lines
|
|
509
|
+
if (line.startsWith('diff ') || line.startsWith('index '))
|
|
510
|
+
continue;
|
|
511
|
+
if (line.startsWith('---') || line.startsWith('+++'))
|
|
512
|
+
continue;
|
|
513
|
+
// Colorize hunk headers and changes
|
|
514
|
+
if (line.startsWith('@@')) {
|
|
515
|
+
output += formatHunkHeader(line, isFirstHunk);
|
|
516
|
+
isFirstHunk = false;
|
|
517
|
+
// Parse line numbers for display
|
|
518
|
+
const match = line.match(/@@ -(\d+)(?:,\d+)? \+(\d+)/);
|
|
519
|
+
if (match) {
|
|
520
|
+
currentOldLine = parseInt(match[1], 10);
|
|
521
|
+
currentNewLine = parseInt(match[2], 10);
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
else if (line.startsWith('+')) {
|
|
525
|
+
const lineNum = String(currentNewLine).padStart(4);
|
|
526
|
+
output += `${fgGreen}${lineNum} + ${line.slice(1)}${reset}\n`;
|
|
527
|
+
currentNewLine++;
|
|
528
|
+
}
|
|
529
|
+
else if (line.startsWith('-')) {
|
|
530
|
+
const lineNum = String(currentOldLine).padStart(4);
|
|
531
|
+
output += `${fgRed}${lineNum} − ${line.slice(1)}${reset}\n`;
|
|
532
|
+
currentOldLine++;
|
|
533
|
+
}
|
|
534
|
+
else if (line.startsWith('\\')) {
|
|
535
|
+
// "" - show dimmed
|
|
536
|
+
output += `${dim} ${line}${reset}\n`;
|
|
537
|
+
}
|
|
538
|
+
else {
|
|
539
|
+
// Context lines
|
|
540
|
+
const lineNum = String(currentNewLine).padStart(4);
|
|
541
|
+
output += `${dim}${lineNum} ${line.slice(1) || line}${reset}\n`;
|
|
542
|
+
currentOldLine++;
|
|
543
|
+
currentNewLine++;
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
return output || `${dim}No changes${reset}`;
|
|
547
|
+
}
|
|
548
|
+
catch (err) {
|
|
549
|
+
return `${fgRed}Error reading diff: ${filename}${reset}`;
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
/**
|
|
553
|
+
* Watch for file changes in a repository
|
|
554
|
+
* Returns a cleanup function to stop watching
|
|
555
|
+
*/
|
|
556
|
+
function watchForChanges(repoPath, callback) {
|
|
557
|
+
let debounceTimer = null;
|
|
558
|
+
let watcher = null;
|
|
559
|
+
const debouncedCallback = () => {
|
|
560
|
+
if (debounceTimer) {
|
|
561
|
+
clearTimeout(debounceTimer);
|
|
562
|
+
}
|
|
563
|
+
debounceTimer = setTimeout(() => {
|
|
564
|
+
callback();
|
|
565
|
+
}, 500);
|
|
566
|
+
};
|
|
567
|
+
try {
|
|
568
|
+
// Watch the .git directory for index changes
|
|
569
|
+
const gitDir = (0, path_1.join)(repoPath, '.git');
|
|
570
|
+
watcher = (0, fs_1.watch)(gitDir, { recursive: true }, (eventType, filename) => {
|
|
571
|
+
// Trigger on index or HEAD changes
|
|
572
|
+
if (filename && (filename.includes('index') || filename.includes('HEAD'))) {
|
|
573
|
+
debouncedCallback();
|
|
574
|
+
}
|
|
575
|
+
});
|
|
576
|
+
// Also watch the working directory for file changes
|
|
577
|
+
const workdirWatcher = (0, fs_1.watch)(repoPath, { recursive: true }, (eventType, filename) => {
|
|
578
|
+
// Ignore .git directory changes (handled above)
|
|
579
|
+
if (filename && !filename.startsWith('.git')) {
|
|
580
|
+
debouncedCallback();
|
|
581
|
+
}
|
|
582
|
+
});
|
|
583
|
+
// Return cleanup function
|
|
584
|
+
return () => {
|
|
585
|
+
if (debounceTimer) {
|
|
586
|
+
clearTimeout(debounceTimer);
|
|
587
|
+
}
|
|
588
|
+
if (watcher) {
|
|
589
|
+
watcher.close();
|
|
590
|
+
}
|
|
591
|
+
workdirWatcher.close();
|
|
592
|
+
};
|
|
593
|
+
}
|
|
594
|
+
catch {
|
|
595
|
+
// Watching failed, return no-op cleanup
|
|
596
|
+
return () => { };
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
//# sourceMappingURL=git-diff.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-diff.js","sourceRoot":"","sources":["../../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ACJ,CAAC;IAAC,MAAM,CAAC;QACP,wCAAwC;QACxC,OAAO,GAAG,EAAE,GAAE,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Diff Module Exports
|
|
3
|
+
*/
|
|
4
|
+
export { getDiffSummary, getFileDiff, getFileWithInlineDiff, getFullFileWithInlineDiff, getDiffsOnlyView, watchForChanges, type ChangeType, type DiffFileSummary, } from './git-diff';
|
|
5
|
+
export { renderDiffPane, findClickedFile, type FilePosition, } from './diff-pane-render';
|
|
6
|
+
export { renderFileHeader, type ButtonPositions, type FileHeaderRenderResult, } from './file-diff-header-render';
|
|
7
|
+
export { createDiffPane, startDiffHandler, updateDiffPane, closeDiffPane, breakDiffPane, joinDiffPane, createFileDiffContentPane, createFileDiffHeaderPane, startFileDiffHeaderHandler, startFileDiffContentHandler, closeFileDiffHeaderPane, closeFileDiffContentPane, } from './diff-manager';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/diff/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EACL,cAAc,EACd,WAAW,EACX,qBAAqB,EACrB,yBAAyB,EACzB,gBAAgB,EAChB,eAAe,EACf,KAAK,UAAU,EACf,KAAK,eAAe,GACrB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,cAAc,EACd,eAAe,EACf,KAAK,YAAY,GAClB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,gBAAgB,EAChB,KAAK,eAAe,EACpB,KAAK,sBAAsB,GAC5B,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,aAAa,EACb,YAAY,EAEZ,yBAAyB,EACzB,wBAAwB,EACxB,0BAA0B,EAC1B,2BAA2B,EAC3B,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,gBAAgB,CAAC"}
|