agentgui 1.0.122 → 1.0.123
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/package.json
CHANGED
|
@@ -760,16 +760,22 @@ class StreamingRenderer {
|
|
|
760
760
|
}
|
|
761
761
|
}
|
|
762
762
|
|
|
763
|
-
// Check if this looks like `cat -n` output
|
|
763
|
+
// Check if this looks like `cat -n` output or grep with line numbers
|
|
764
764
|
const lines = trimmed.split('\n');
|
|
765
765
|
const isCatNOutput = lines.length > 1 && lines[0].match(/^\s*\d+→/);
|
|
766
|
+
const isGrepOutput = lines.length > 1 && lines[0].match(/^\s*\d+-/);
|
|
766
767
|
|
|
767
|
-
if (isCatNOutput) {
|
|
768
|
-
// Strip line numbers and arrows from
|
|
768
|
+
if (isCatNOutput || isGrepOutput) {
|
|
769
|
+
// Strip line numbers and arrows/hyphens from output
|
|
769
770
|
const cleanedLines = lines.map(line => {
|
|
770
|
-
|
|
771
|
+
// Skip grep context separator lines
|
|
772
|
+
if (line === '--') return null;
|
|
773
|
+
|
|
774
|
+
// Handle both cat -n (→) and grep (-n) formats
|
|
775
|
+
// Also handle grep with colon (:) for matching lines
|
|
776
|
+
const match = line.match(/^\s*\d+[→\-:](.*)/);
|
|
771
777
|
return match ? match[1] : line;
|
|
772
|
-
});
|
|
778
|
+
}).filter(line => line !== null);
|
|
773
779
|
const cleanedContent = cleanedLines.join('\n');
|
|
774
780
|
|
|
775
781
|
// Try to detect and highlight code based on content patterns
|