@pixelbyte-software/pixcode 1.53.14 → 1.53.15
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/assets/{index-CV_x2mrI.js → index-BgMvphaU.js} +1 -1
- package/dist/index.html +1 -1
- package/dist-server/server/index.js +29 -1
- package/dist-server/server/index.js.map +1 -1
- package/dist-server/server/services/telegram/control-center.js +1 -0
- package/dist-server/server/services/telegram/control-center.js.map +1 -1
- package/package.json +1 -1
- package/server/index.js +28 -1
- package/server/services/telegram/control-center.js +1 -0
package/dist/index.html
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
|
|
36
36
|
<!-- Prevent zoom on iOS -->
|
|
37
37
|
<meta name="format-detection" content="telephone=no" />
|
|
38
|
-
<script type="module" crossorigin src="/assets/index-
|
|
38
|
+
<script type="module" crossorigin src="/assets/index-BgMvphaU.js"></script>
|
|
39
39
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-DB6V5Fl1.js">
|
|
40
40
|
<link rel="modulepreload" crossorigin href="/assets/vendor-codemirror-CIYNS698.js">
|
|
41
41
|
<link rel="modulepreload" crossorigin href="/assets/vendor-xterm-C7tpxJl7.js">
|
|
@@ -1140,6 +1140,9 @@ function readPtySessionBufferedOutput(session, { maxChars = 12000, sinceCursor =
|
|
|
1140
1140
|
function normalizeTerminalStartupInput(input) {
|
|
1141
1141
|
return `\x15${String(input || '').replace(/(?:\r\n|\r|\n)+$/u, '')}\r`;
|
|
1142
1142
|
}
|
|
1143
|
+
function normalizeTerminalBufferedInput(input) {
|
|
1144
|
+
return `\x15${String(input || '').replace(/(?:\r\n|\r|\n)+$/u, '')}`;
|
|
1145
|
+
}
|
|
1143
1146
|
function readSessionOutputForState(session, maxChars = 12000) {
|
|
1144
1147
|
return stripAnsiSequences((session?.buffer || []).join('').slice(-maxChars));
|
|
1145
1148
|
}
|
|
@@ -1522,6 +1525,7 @@ app.post('/api/shell/sessions/provider-input', authenticateToken, requireProject
|
|
|
1522
1525
|
const sessionId = readPtyTarget(req.body?.sessionId);
|
|
1523
1526
|
const input = typeof req.body?.input === 'string' ? req.body.input : '';
|
|
1524
1527
|
const submit = req.body?.submit !== false;
|
|
1528
|
+
const submitMode = req.body?.submitMode === 'deferred-enter' ? 'deferred-enter' : 'inline';
|
|
1525
1529
|
if (!SHELL_CLI_PROVIDERS.has(provider)) {
|
|
1526
1530
|
return res.status(400).json({ error: 'Unsupported provider' });
|
|
1527
1531
|
}
|
|
@@ -1557,10 +1561,33 @@ app.post('/api/shell/sessions/provider-input', authenticateToken, requireProject
|
|
|
1557
1561
|
});
|
|
1558
1562
|
}
|
|
1559
1563
|
const matchedSession = match.session;
|
|
1560
|
-
const data = submit
|
|
1564
|
+
const data = submit
|
|
1565
|
+
? (submitMode === 'deferred-enter' ? normalizeTerminalBufferedInput(input) : normalizeTerminalStartupInput(input))
|
|
1566
|
+
: input;
|
|
1561
1567
|
const outputCursorBefore = matchedSession.totalOutputBytes || matchedSession.bufferBytes || 0;
|
|
1562
1568
|
try {
|
|
1563
1569
|
writeTerminalInputChunks(matchedSession.pty, data);
|
|
1570
|
+
if (submit && submitMode === 'deferred-enter') {
|
|
1571
|
+
setTimeout(() => {
|
|
1572
|
+
const currentSession = findProviderPtySession({
|
|
1573
|
+
provider,
|
|
1574
|
+
projectPath,
|
|
1575
|
+
user: req.user,
|
|
1576
|
+
tabId,
|
|
1577
|
+
sessionId,
|
|
1578
|
+
requireRunning: true,
|
|
1579
|
+
requirePty: true,
|
|
1580
|
+
}).session;
|
|
1581
|
+
try {
|
|
1582
|
+
writeTerminalInputChunks(currentSession?.pty, '\r');
|
|
1583
|
+
if (currentSession)
|
|
1584
|
+
currentSession.updatedAt = Date.now();
|
|
1585
|
+
}
|
|
1586
|
+
catch (error) {
|
|
1587
|
+
console.warn('Deferred terminal submit failed:', error?.message || error);
|
|
1588
|
+
}
|
|
1589
|
+
}, 120);
|
|
1590
|
+
}
|
|
1564
1591
|
matchedSession.updatedAt = Date.now();
|
|
1565
1592
|
res.json({
|
|
1566
1593
|
ok: true,
|
|
@@ -1570,6 +1597,7 @@ app.post('/api/shell/sessions/provider-input', authenticateToken, requireProject
|
|
|
1570
1597
|
tabId: matchedSession.tabId || null,
|
|
1571
1598
|
wrote: true,
|
|
1572
1599
|
submitted: submit,
|
|
1600
|
+
submitMode,
|
|
1573
1601
|
bytes: Buffer.byteLength(data),
|
|
1574
1602
|
matchStatus: match.status,
|
|
1575
1603
|
outputCursorBefore,
|