@dmsdc-ai/aigentry-telepty 0.1.30 → 0.1.31
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/daemon.js +4 -3
- package/package.json +1 -1
package/daemon.js
CHANGED
|
@@ -426,9 +426,9 @@ function sendViaKitty(sessionId, text) {
|
|
|
426
426
|
if (!socket) return false;
|
|
427
427
|
|
|
428
428
|
try {
|
|
429
|
-
// Match by
|
|
429
|
+
// Match by cmdline containing session ID (works even when CLI overwrites tab title)
|
|
430
430
|
const escaped = text.replace(/\\/g, '\\\\').replace(/'/g, "'\\''");
|
|
431
|
-
execSync(`kitty @ --to unix:${socket} send-text --match
|
|
431
|
+
execSync(`kitty @ --to unix:${socket} send-text --match cmdline:${sessionId} '${escaped}'`, {
|
|
432
432
|
timeout: 3000, stdio: ['pipe', 'pipe', 'pipe']
|
|
433
433
|
});
|
|
434
434
|
console.log(`[KITTY] Sent ${text.length} chars to ${sessionId}`);
|
|
@@ -1045,7 +1045,8 @@ wss.on('connection', (ws, req) => {
|
|
|
1045
1045
|
};
|
|
1046
1046
|
sessions[sessionId] = autoSession;
|
|
1047
1047
|
console.log(`[WS] Auto-registered wrapped session ${sessionId} on reconnect`);
|
|
1048
|
-
//
|
|
1048
|
+
// Trigger CLI redraw via kitty Ctrl+L after short delay
|
|
1049
|
+
setTimeout(() => sendViaKitty(sessionId, '\x0c'), 1000);
|
|
1049
1050
|
} else {
|
|
1050
1051
|
session.clients.add(ws);
|
|
1051
1052
|
}
|