s9n-devops-agent 2.0.18-dev.12 → 2.0.18-dev.13
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 +1 -1
- package/src/cs-devops-agent-worker.js +39 -31
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "s9n-devops-agent",
|
|
3
|
-
"version": "2.0.18-dev.
|
|
3
|
+
"version": "2.0.18-dev.13",
|
|
4
4
|
"description": "CS_DevOpsAgent - Intelligent Git Automation System with multi-agent support and session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/cs-devops-agent-worker.js",
|
|
@@ -1547,7 +1547,7 @@ function saveProjectSettings(settings, settingsPath) {
|
|
|
1547
1547
|
// Display copyright and license information immediately
|
|
1548
1548
|
console.log("\n" + "=".repeat(70));
|
|
1549
1549
|
console.log(" CS_DevOpsAgent - Intelligent Git Automation System");
|
|
1550
|
-
console.log(" Version 2.0.18-dev.
|
|
1550
|
+
console.log(" Version 2.0.18-dev.13 | Build 20260107");
|
|
1551
1551
|
console.log(" Copyright (c) 2026 SeKondBrain AI Labs Limited");
|
|
1552
1552
|
console.log(" Author: Sachin Dev Duggal");
|
|
1553
1553
|
console.log(" \n Licensed under the MIT License");
|
|
@@ -1952,7 +1952,7 @@ console.log();
|
|
|
1952
1952
|
|
|
1953
1953
|
// Split: Left (Interactive) 40%, Right (Logs) 60%
|
|
1954
1954
|
// Ensure minimum widths
|
|
1955
|
-
const leftPercent = 0.
|
|
1955
|
+
const leftPercent = 0.3; // Reduce left panel to 30% to give more room for logs
|
|
1956
1956
|
const leftWidth = Math.floor(width * leftPercent) - 2;
|
|
1957
1957
|
const rightWidth = width - leftWidth - 3; // -3 for separator " | "
|
|
1958
1958
|
|
|
@@ -1961,13 +1961,40 @@ console.log();
|
|
|
1961
1961
|
// Or simple stacked? Let's just proceed, it will look messy but functional.
|
|
1962
1962
|
}
|
|
1963
1963
|
|
|
1964
|
+
// Helper to prepare view buffers with text wrapping
|
|
1965
|
+
function getView(buffer, width, height) {
|
|
1966
|
+
const view = [];
|
|
1967
|
+
for (let i = buffer.length - 1; i >= 0; i--) {
|
|
1968
|
+
if (view.length >= height) break;
|
|
1969
|
+
|
|
1970
|
+
const line = buffer[i];
|
|
1971
|
+
const plain = stripAnsi(line);
|
|
1972
|
+
|
|
1973
|
+
if (plain.length <= width) {
|
|
1974
|
+
view.unshift(line);
|
|
1975
|
+
} else {
|
|
1976
|
+
// Wrap long lines (using plain text to avoid ANSI artifacting)
|
|
1977
|
+
const chunks = [];
|
|
1978
|
+
for (let j = 0; j < plain.length; j += width) {
|
|
1979
|
+
chunks.push(plain.substring(j, j + width));
|
|
1980
|
+
}
|
|
1981
|
+
// Add chunks in reverse order so they appear correctly
|
|
1982
|
+
for (let k = chunks.length - 1; k >= 0; k--) {
|
|
1983
|
+
if (view.length >= height) break;
|
|
1984
|
+
view.unshift(chunks[k]);
|
|
1985
|
+
}
|
|
1986
|
+
}
|
|
1987
|
+
}
|
|
1988
|
+
return view;
|
|
1989
|
+
}
|
|
1990
|
+
|
|
1964
1991
|
// Prepare views (Bottom-Anchored)
|
|
1965
|
-
const leftView = TUI.leftLogs
|
|
1966
|
-
const rightView = TUI.rightLogs
|
|
1992
|
+
const leftView = getView(TUI.leftLogs, leftWidth, contentHeight);
|
|
1993
|
+
const rightView = getView(TUI.rightLogs, rightWidth, contentHeight);
|
|
1967
1994
|
|
|
1968
1995
|
const leftEmpty = contentHeight - leftView.length;
|
|
1969
1996
|
const rightEmpty = contentHeight - rightView.length;
|
|
1970
|
-
|
|
1997
|
+
|
|
1971
1998
|
// Draw Frame
|
|
1972
1999
|
process.stdout.write('\x1b[2J'); // Clear
|
|
1973
2000
|
process.stdout.write('\x1b[H'); // Home (standard ANSI)
|
|
@@ -1979,34 +2006,15 @@ console.log();
|
|
|
1979
2006
|
|
|
1980
2007
|
// 2. Columns
|
|
1981
2008
|
for (let i = 0; i < contentHeight; i++) {
|
|
1982
|
-
let
|
|
1983
|
-
let
|
|
1984
|
-
|
|
1985
|
-
// Removing ANSI for length calculation is essential for alignment
|
|
1986
|
-
const lPlain = stripAnsi(lLine);
|
|
1987
|
-
const rPlain = stripAnsi(rLine);
|
|
1988
|
-
|
|
1989
|
-
// Truncate to prevent wrapping and breaking layout
|
|
1990
|
-
let lDisp = lLine;
|
|
1991
|
-
let rDisp = rLine;
|
|
1992
|
-
|
|
1993
|
-
if (lPlain.length > leftWidth) {
|
|
1994
|
-
// Simple truncation (note: might cut ansi codes, but prevents layout break)
|
|
1995
|
-
// We use the plain length to determine cut point
|
|
1996
|
-
// For safety, we just display the plain truncated text to avoid hanging colors
|
|
1997
|
-
lDisp = lPlain.substring(0, leftWidth - 3) + '...';
|
|
1998
|
-
}
|
|
1999
|
-
|
|
2000
|
-
if (rPlain.length > rightWidth) {
|
|
2001
|
-
rDisp = rPlain.substring(0, rightWidth - 3) + '...';
|
|
2002
|
-
}
|
|
2009
|
+
let lDisp = (i >= leftEmpty) ? leftView[i - leftEmpty] : '';
|
|
2010
|
+
let rDisp = (i >= rightEmpty) ? rightView[i - rightEmpty] : '';
|
|
2003
2011
|
|
|
2004
|
-
// Pad
|
|
2005
|
-
const
|
|
2006
|
-
const
|
|
2012
|
+
// Pad to fill width
|
|
2013
|
+
const lPlain = stripAnsi(lDisp);
|
|
2014
|
+
const rPlain = stripAnsi(rDisp);
|
|
2007
2015
|
|
|
2008
|
-
const lPad = Math.max(0, leftWidth -
|
|
2009
|
-
const rPad = Math.max(0, rightWidth -
|
|
2016
|
+
const lPad = Math.max(0, leftWidth - lPlain.length);
|
|
2017
|
+
const rPad = Math.max(0, rightWidth - rPlain.length);
|
|
2010
2018
|
|
|
2011
2019
|
process.stdout.write(lDisp + ' '.repeat(lPad));
|
|
2012
2020
|
process.stdout.write('\x1b[90m │ \x1b[0m');
|