mattermost-claude-code 0.10.5 → 0.10.6
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/CHANGELOG.md +9 -0
- package/dist/claude/session.js +32 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.10.6] - 2025-12-28
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- **Fixed diff display** - Removed misleading line numbers and noise from diffs
|
|
14
|
+
- No more fake `@@ -1,1 +1,1 @@` headers (we don't have real line numbers)
|
|
15
|
+
- No more `` noise
|
|
16
|
+
- Uses `diffLines()` for proper line-by-line change detection
|
|
17
|
+
- Shows context lines (unchanged parts) naturally
|
|
18
|
+
|
|
10
19
|
## [0.10.5] - 2025-12-28
|
|
11
20
|
|
|
12
21
|
### Changed
|
package/dist/claude/session.js
CHANGED
|
@@ -853,17 +853,40 @@ export class SessionManager {
|
|
|
853
853
|
const filePath = short(input.file_path);
|
|
854
854
|
const oldStr = (input.old_string || '');
|
|
855
855
|
const newStr = (input.new_string || '');
|
|
856
|
-
// Show
|
|
856
|
+
// Show diff if we have old/new strings
|
|
857
857
|
if (oldStr || newStr) {
|
|
858
|
-
//
|
|
859
|
-
const
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
const
|
|
858
|
+
// Use diff library to compute actual line-by-line changes
|
|
859
|
+
const changes = Diff.diffLines(oldStr, newStr);
|
|
860
|
+
const maxLines = 20;
|
|
861
|
+
let lineCount = 0;
|
|
862
|
+
const diffLines = [];
|
|
863
|
+
for (const change of changes) {
|
|
864
|
+
const lines = change.value.replace(/\n$/, '').split('\n');
|
|
865
|
+
for (const line of lines) {
|
|
866
|
+
if (lineCount >= maxLines)
|
|
867
|
+
break;
|
|
868
|
+
if (change.added) {
|
|
869
|
+
diffLines.push(`+ ${line}`);
|
|
870
|
+
lineCount++;
|
|
871
|
+
}
|
|
872
|
+
else if (change.removed) {
|
|
873
|
+
diffLines.push(`- ${line}`);
|
|
874
|
+
lineCount++;
|
|
875
|
+
}
|
|
876
|
+
else {
|
|
877
|
+
// Context line (unchanged)
|
|
878
|
+
diffLines.push(` ${line}`);
|
|
879
|
+
lineCount++;
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
if (lineCount >= maxLines)
|
|
883
|
+
break;
|
|
884
|
+
}
|
|
885
|
+
const totalLines = changes.reduce((sum, c) => sum + c.value.split('\n').length - 1, 0);
|
|
863
886
|
let diff = `✏️ **Edit** \`${filePath}\`\n\`\`\`diff\n`;
|
|
864
|
-
diff +=
|
|
865
|
-
if (
|
|
866
|
-
diff += `\n... (+${
|
|
887
|
+
diff += diffLines.join('\n');
|
|
888
|
+
if (totalLines > maxLines) {
|
|
889
|
+
diff += `\n... (+${totalLines - maxLines} more lines)`;
|
|
867
890
|
}
|
|
868
891
|
diff += '\n```';
|
|
869
892
|
return diff;
|