blits-bridge 0.1.11 → 0.1.12
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/bridge.js +7 -2
- package/package.json +1 -1
package/dist/bridge.js
CHANGED
|
@@ -118,16 +118,21 @@ class BlitsBridge {
|
|
|
118
118
|
}
|
|
119
119
|
args.push('--tools', '');
|
|
120
120
|
return new Promise((resolve, reject) => {
|
|
121
|
-
const
|
|
121
|
+
const isWin = process.platform === 'win32';
|
|
122
|
+
const proc = (0, child_process_1.spawn)(isWin ? 'cmd' : 'claude', isWin ? ['/c', 'claude', ...args] : args, {
|
|
122
123
|
stdio: ['pipe', 'pipe', 'pipe'],
|
|
123
|
-
env: { ...process.env },
|
|
124
|
+
env: { ...process.env, PYTHONUNBUFFERED: '1', NODE_NO_WARNINGS: '1' },
|
|
124
125
|
cwd: process.env.TMPDIR || process.env.TEMP || '/tmp',
|
|
126
|
+
...(isWin ? {} : {}),
|
|
125
127
|
});
|
|
126
128
|
let fullText = '';
|
|
129
|
+
let chunkCount = 0;
|
|
127
130
|
const usageData = { input_tokens: 0, output_tokens: 0 };
|
|
128
131
|
proc.stdout.on('data', (chunk) => {
|
|
129
132
|
const text = chunk.toString();
|
|
130
133
|
fullText += text;
|
|
134
|
+
chunkCount++;
|
|
135
|
+
console.log(` [stdout] chunk#${chunkCount} +${text.length}b total=${fullText.length}b`);
|
|
131
136
|
// Send each stdout chunk as a stream event
|
|
132
137
|
this.send({
|
|
133
138
|
id: requestId,
|
package/package.json
CHANGED