coder-config 0.44.41 → 0.44.43
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/lib/constants.js +1 -1
- package/package.json +1 -1
- package/ui/terminal-server.cjs +24 -6
package/lib/constants.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "coder-config",
|
|
3
|
-
"version": "0.44.
|
|
3
|
+
"version": "0.44.43",
|
|
4
4
|
"description": "Configuration manager for AI coding tools - Claude Code, Gemini CLI, Codex CLI, Antigravity. Manage MCPs, rules, permissions, memory, and workstreams.",
|
|
5
5
|
"author": "regression.io",
|
|
6
6
|
"main": "config-loader.js",
|
package/ui/terminal-server.cjs
CHANGED
|
@@ -83,6 +83,8 @@ class TerminalServer {
|
|
|
83
83
|
|
|
84
84
|
// If initial command provided, execute it after a short delay
|
|
85
85
|
if (cmd) {
|
|
86
|
+
console.log('[Terminal] Initial command:', cmd);
|
|
87
|
+
console.log('[Terminal] Delayed command:', delayedCmd ? `${delayedCmd.substring(0, 50)}...` : 'none');
|
|
86
88
|
setTimeout(() => {
|
|
87
89
|
ptyProcess.write(cmd + '\r');
|
|
88
90
|
|
|
@@ -100,6 +102,7 @@ class TerminalServer {
|
|
|
100
102
|
// First wait for the Claude Code banner to appear
|
|
101
103
|
if (!bannerSeen && outputBuffer.includes('Claude Code')) {
|
|
102
104
|
bannerSeen = true;
|
|
105
|
+
console.log('[Terminal] Banner detected');
|
|
103
106
|
}
|
|
104
107
|
|
|
105
108
|
// After banner, look for the actual input prompt
|
|
@@ -109,15 +112,25 @@ class TerminalServer {
|
|
|
109
112
|
const lines = outputBuffer.split('\n');
|
|
110
113
|
const lastFewLines = lines.slice(-5).join('\n');
|
|
111
114
|
|
|
112
|
-
// Look for prompt indicators
|
|
113
|
-
//
|
|
114
|
-
|
|
115
|
+
// Look for prompt indicators
|
|
116
|
+
// Claude Code prompt can have escape codes between ❯ and text
|
|
117
|
+
// Also look for the "Try" suggestion or input prompt marker
|
|
118
|
+
if (lastFewLines.match(/[>\❯][\s\x1b\[\]0-9;]*[a-zA-T]/m) ||
|
|
115
119
|
lastFewLines.includes('> Try') ||
|
|
116
|
-
lastFewLines.includes('
|
|
120
|
+
lastFewLines.includes(']133;B')) { // Terminal prompt marker
|
|
117
121
|
delayedCmdSent = true;
|
|
122
|
+
console.log('[Terminal] Prompt detected, sending command...');
|
|
123
|
+
console.log('[Terminal] Command length:', delayedCmd?.length || 0);
|
|
118
124
|
// Small delay after detecting ready state
|
|
119
125
|
setTimeout(() => {
|
|
120
|
-
|
|
126
|
+
// Send command first, then Enter separately
|
|
127
|
+
// Claude Code treats large text as paste and waits for Enter confirmation
|
|
128
|
+
ptyProcess.write(delayedCmd);
|
|
129
|
+
console.log('[Terminal] Command sent, sending Enter in 100ms...');
|
|
130
|
+
setTimeout(() => {
|
|
131
|
+
ptyProcess.write('\n');
|
|
132
|
+
console.log('[Terminal] Enter sent');
|
|
133
|
+
}, 500);
|
|
121
134
|
}, 200);
|
|
122
135
|
}
|
|
123
136
|
}
|
|
@@ -129,8 +142,13 @@ class TerminalServer {
|
|
|
129
142
|
// Fallback timeout in case detection fails
|
|
130
143
|
setTimeout(() => {
|
|
131
144
|
if (!delayedCmdSent) {
|
|
145
|
+
console.log('[Terminal] Fallback timeout triggered after', delayedCmdDelay, 'ms');
|
|
132
146
|
delayedCmdSent = true;
|
|
133
|
-
|
|
147
|
+
// Send command first, then Enter separately
|
|
148
|
+
ptyProcess.write(delayedCmd);
|
|
149
|
+
setTimeout(() => {
|
|
150
|
+
ptyProcess.write('\n');
|
|
151
|
+
}, 500);
|
|
134
152
|
}
|
|
135
153
|
}, delayedCmdDelay);
|
|
136
154
|
}
|