codex-lens 0.1.3 → 0.1.6
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/aggregator.js +5 -1
- package/dist/cli.js +4 -1
- package/package.json +1 -1
- package/src/aggregator.js +6 -1
- package/src/cli.js +6 -1
package/dist/aggregator.js
CHANGED
|
@@ -6,7 +6,7 @@ import express from "express";
|
|
|
6
6
|
import { createProxyServer } from "./proxy.js";
|
|
7
7
|
import { FileWatcher, scanDirectory } from "./watcher.js";
|
|
8
8
|
import { createLogger } from "./lib/logger.js";
|
|
9
|
-
import { spawnCodex, writeToPty, resizePty, killPty, onPtyData, onPtyExit, getPtyState } from "./pty-manager.js";
|
|
9
|
+
import { spawnCodex, writeToPty, resizePty, killPty, onPtyData, onPtyExit, getPtyState, getOutputBuffer } from "./pty-manager.js";
|
|
10
10
|
import { SnapshotManager } from "./snapshot-manager.js";
|
|
11
11
|
import path from "path";
|
|
12
12
|
import { fileURLToPath } from "url";
|
|
@@ -164,6 +164,10 @@ class Aggregator {
|
|
|
164
164
|
});
|
|
165
165
|
const state = getPtyState();
|
|
166
166
|
ws.send(JSON.stringify({ type: "state", ...state }));
|
|
167
|
+
const bufferedOutput = getOutputBuffer();
|
|
168
|
+
if (bufferedOutput) {
|
|
169
|
+
ws.send(JSON.stringify({ type: "data", data: bufferedOutput }));
|
|
170
|
+
}
|
|
167
171
|
}
|
|
168
172
|
broadcastToTerminal(event) {
|
|
169
173
|
const message = JSON.stringify(event);
|
package/dist/cli.js
CHANGED
|
@@ -54,7 +54,10 @@ async function main() {
|
|
|
54
54
|
const aggregator = createAggregator(codexBinary, projectRoot);
|
|
55
55
|
await aggregator.start(PROXY_PORT);
|
|
56
56
|
logger.info("All services started");
|
|
57
|
-
|
|
57
|
+
spawn("cmd", ["/c", "start", "http://localhost:5174"], {
|
|
58
|
+
detached: true,
|
|
59
|
+
stdio: "ignore"
|
|
60
|
+
});
|
|
58
61
|
logger.info("Press Ctrl+C to stop");
|
|
59
62
|
process.on("SIGINT", () => {
|
|
60
63
|
logger.info("Received SIGINT, shutting down...");
|
package/package.json
CHANGED
package/src/aggregator.js
CHANGED
|
@@ -5,7 +5,7 @@ import express from 'express';
|
|
|
5
5
|
import { createProxyServer } from './proxy.js';
|
|
6
6
|
import { FileWatcher, scanDirectory } from './watcher.js';
|
|
7
7
|
import { createLogger } from './lib/logger.js';
|
|
8
|
-
import { spawnCodex, writeToPty, resizePty, killPty, onPtyData, onPtyExit, getPtyState } from './pty-manager.js';
|
|
8
|
+
import { spawnCodex, writeToPty, resizePty, killPty, onPtyData, onPtyExit, getPtyState, getOutputBuffer } from './pty-manager.js';
|
|
9
9
|
import { SnapshotManager } from './snapshot-manager.js';
|
|
10
10
|
import path from 'path';
|
|
11
11
|
import { fileURLToPath } from 'url';
|
|
@@ -193,6 +193,11 @@ class Aggregator {
|
|
|
193
193
|
|
|
194
194
|
const state = getPtyState();
|
|
195
195
|
ws.send(JSON.stringify({ type: 'state', ...state }));
|
|
196
|
+
|
|
197
|
+
const bufferedOutput = getOutputBuffer();
|
|
198
|
+
if (bufferedOutput) {
|
|
199
|
+
ws.send(JSON.stringify({ type: 'data', data: bufferedOutput }));
|
|
200
|
+
}
|
|
196
201
|
}
|
|
197
202
|
|
|
198
203
|
broadcastToTerminal(event) {
|
package/src/cli.js
CHANGED
|
@@ -70,7 +70,12 @@ async function main() {
|
|
|
70
70
|
await aggregator.start(PROXY_PORT);
|
|
71
71
|
|
|
72
72
|
logger.info('All services started');
|
|
73
|
-
|
|
73
|
+
|
|
74
|
+
spawn('cmd', ['/c', 'start', 'http://localhost:5174'], {
|
|
75
|
+
detached: true,
|
|
76
|
+
stdio: 'ignore',
|
|
77
|
+
});
|
|
78
|
+
|
|
74
79
|
logger.info('Press Ctrl+C to stop');
|
|
75
80
|
|
|
76
81
|
process.on('SIGINT', () => {
|