codex-lens 0.1.31 → 0.1.32
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 +2 -14
- package/package.json +1 -1
- package/src/aggregator.js +2 -14
package/dist/aggregator.js
CHANGED
|
@@ -150,26 +150,14 @@ class Aggregator {
|
|
|
150
150
|
return { httpPort: HTTP_PORT, proxyPort };
|
|
151
151
|
}
|
|
152
152
|
setupMainWebSocket() {
|
|
153
|
-
this.wss.on("connection", (ws) => {
|
|
153
|
+
this.wss.on("connection", async (ws) => {
|
|
154
154
|
logger.info("API client connected");
|
|
155
155
|
this.clients.add(ws);
|
|
156
156
|
const fileTree = scanDirectory(this.projectRoot);
|
|
157
157
|
logger.info(`Sending file_tree with ${fileTree.length} top-level items`);
|
|
158
158
|
ws.send(JSON.stringify({ type: "file_tree", data: fileTree }));
|
|
159
159
|
if (this.gitManager?.isGitRepo()) {
|
|
160
|
-
|
|
161
|
-
const status = this.gitManager.currentStatus;
|
|
162
|
-
ws.send(JSON.stringify({
|
|
163
|
-
type: "git_status",
|
|
164
|
-
data: {
|
|
165
|
-
isRepo: true,
|
|
166
|
-
branch,
|
|
167
|
-
status,
|
|
168
|
-
stagedCount: status?.staged?.length || 0,
|
|
169
|
-
unstagedCount: (status?.unstaged?.length || 0) + (status?.untracked?.length || 0),
|
|
170
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
171
|
-
}
|
|
172
|
-
}));
|
|
160
|
+
await this.gitManager.broadcastUpdate();
|
|
173
161
|
}
|
|
174
162
|
ws.on("close", () => {
|
|
175
163
|
logger.info("API client disconnected");
|
package/package.json
CHANGED
package/src/aggregator.js
CHANGED
|
@@ -178,7 +178,7 @@ class Aggregator {
|
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
setupMainWebSocket() {
|
|
181
|
-
this.wss.on('connection', (ws) => {
|
|
181
|
+
this.wss.on('connection', async (ws) => {
|
|
182
182
|
logger.info('API client connected');
|
|
183
183
|
this.clients.add(ws);
|
|
184
184
|
|
|
@@ -188,19 +188,7 @@ class Aggregator {
|
|
|
188
188
|
|
|
189
189
|
// Send initial git status if available
|
|
190
190
|
if (this.gitManager?.isGitRepo()) {
|
|
191
|
-
|
|
192
|
-
const status = this.gitManager.currentStatus;
|
|
193
|
-
ws.send(JSON.stringify({
|
|
194
|
-
type: 'git_status',
|
|
195
|
-
data: {
|
|
196
|
-
isRepo: true,
|
|
197
|
-
branch,
|
|
198
|
-
status,
|
|
199
|
-
stagedCount: status?.staged?.length || 0,
|
|
200
|
-
unstagedCount: (status?.unstaged?.length || 0) + (status?.untracked?.length || 0),
|
|
201
|
-
timestamp: new Date().toISOString()
|
|
202
|
-
}
|
|
203
|
-
}));
|
|
191
|
+
await this.gitManager.broadcastUpdate();
|
|
204
192
|
}
|
|
205
193
|
|
|
206
194
|
ws.on('close', () => {
|