@surething/cockpit 1.0.239 → 1.0.240
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/.next-prod/BUILD_ID +1 -1
- package/.next-prod/app-path-routes-manifest.json +4 -4
- package/.next-prod/build-manifest.json +2 -2
- package/.next-prod/prerender-manifest.json +3 -3
- package/.next-prod/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/_global-error.html +1 -1
- package/.next-prod/server/app/_global-error.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/_not-found.html +2 -2
- package/.next-prod/server/app/_not-found.rsc +2 -2
- package/.next-prod/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next-prod/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next-prod/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next-prod/server/app/api/session-by-path/route.js +1 -1
- package/.next-prod/server/app/api/sessions/projects/[encodedPath]/route.js +1 -1
- package/.next-prod/server/app/api/sessions/route.js +1 -1
- package/.next-prod/server/app/m/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/project/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/review/[id]/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app-paths-manifest.json +4 -4
- package/.next-prod/server/chunks/9658.js +5 -5
- package/.next-prod/server/chunks/9830.js +1 -1
- package/.next-prod/server/middleware-build-manifest.js +1 -1
- package/.next-prod/server/pages/404.html +2 -2
- package/.next-prod/server/pages/500.html +1 -1
- package/.next-prod/server/server-reference-manifest.json +1 -1
- package/.next-prod/static/chunks/{5408-f7b9470b57c6690e.js → 5408-b31a0bb83ee220ad.js} +3 -3
- package/.next-prod/static/chunks/9530-aac4bba2518aa113.js +15 -0
- package/.next-prod/static/chunks/app/{layout-b8d5256d3bf96b1e.js → layout-95cb81ab4128b70e.js} +1 -1
- package/.next-prod/static/chunks/app/m/{page-149145e4714873de.js → page-54053828af79704f.js} +1 -1
- package/.next-prod/static/chunks/app/{page-497c9c5c75bf40f2.js → page-5969e7f2f5788be2.js} +1 -1
- package/.next-prod/static/chunks/app/project/{page-497c9c5c75bf40f2.js → page-5969e7f2f5788be2.js} +1 -1
- package/.next-prod/trace +13 -13
- package/.next-prod/trace-build +1 -1
- package/dist/{chunk-MNMFPTV4.mjs → chunk-JDX7Z54G.mjs} +58 -30
- package/dist/scheduledTasks.mjs +1 -1
- package/dist/wsServer.mjs +1 -1
- package/package.json +1 -1
- package/.next-prod/static/chunks/543-9c1455693df33cd1.js +0 -15
- /package/.next-prod/static/{c1JrZ4eVs2JR2ujEC_UrJ → ArsrRKOrvluh7oFS0G-Fg}/_buildManifest.js +0 -0
- /package/.next-prod/static/{c1JrZ4eVs2JR2ujEC_UrJ → ArsrRKOrvluh7oFS0G-Fg}/_ssgManifest.js +0 -0
package/.next-prod/trace-build
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"name":"run-webpack","duration":
|
|
1
|
+
[{"name":"run-webpack","duration":19805131,"timestamp":147055665,"id":14,"parentId":1,"tags":{},"startTime":1783606754071,"traceId":"ce5c44a5e03e6b79"},{"name":"run-typescript","duration":18284716,"timestamp":166864451,"id":1630,"parentId":1,"tags":{},"startTime":1783606773880,"traceId":"ce5c44a5e03e6b79"},{"name":"static-check","duration":1188376,"timestamp":185192582,"id":1633,"parentId":1,"tags":{},"startTime":1783606792208,"traceId":"ce5c44a5e03e6b79"},{"name":"static-generation","duration":6494351,"timestamp":186521942,"id":1911,"parentId":1,"tags":{},"startTime":1783606793537,"traceId":"ce5c44a5e03e6b79"},{"name":"collect-build-traces","duration":20271788,"timestamp":186383968,"id":1908,"parentId":1,"tags":{},"startTime":1783606793399,"traceId":"ce5c44a5e03e6b79"},{"name":"telemetry-flush","duration":62,"timestamp":206659722,"id":1920,"parentId":1,"tags":{},"startTime":1783606813675,"traceId":"ce5c44a5e03e6b79"},{"name":"next-build","duration":59783832,"timestamp":146875970,"id":1,"tags":{"buildMode":"default","version":"16.2.6","bundler":"webpack","has-custom-webpack-config":"true","use-build-worker":"false"},"startTime":1783606753891,"traceId":"ce5c44a5e03e6b79"}]
|
|
@@ -101,6 +101,43 @@ async function sendPushNotification(payload) {
|
|
|
101
101
|
return { sent, pruned: dead.length };
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
// packages/feature/agent/src/server/sessionTitle.ts
|
|
105
|
+
function filterCommandTags(text) {
|
|
106
|
+
const argsMatch = text.match(/<command-args>([^<]*)<\/command-args>/);
|
|
107
|
+
if (argsMatch && argsMatch[1].trim()) {
|
|
108
|
+
return argsMatch[1].trim();
|
|
109
|
+
}
|
|
110
|
+
const nameMatch = text.match(/<command-name>([^<]*)<\/command-name>/);
|
|
111
|
+
if (nameMatch && nameMatch[1].trim()) {
|
|
112
|
+
return nameMatch[1].trim();
|
|
113
|
+
}
|
|
114
|
+
let filtered = text.replace(/<command-message>[^<]*<\/command-message>/g, "");
|
|
115
|
+
filtered = filtered.replace(/<command-name>[^<]*<\/command-name>/g, "");
|
|
116
|
+
filtered = filtered.replace(/<command-args>[^<]*<\/command-args>/g, "");
|
|
117
|
+
filtered = filtered.replace(/<local-command-stdout>[\s\S]*?<\/local-command-stdout>/g, "");
|
|
118
|
+
filtered = filtered.replace(/<local-command-caveat>[\s\S]*?<\/local-command-caveat>/g, "");
|
|
119
|
+
return filtered.trim();
|
|
120
|
+
}
|
|
121
|
+
function generateTitle(aiTitle, summary, userMessages) {
|
|
122
|
+
if (aiTitle) return aiTitle;
|
|
123
|
+
if (summary) return summary;
|
|
124
|
+
let commandName = "";
|
|
125
|
+
for (const msg of userMessages) {
|
|
126
|
+
const filtered = filterCommandTags(msg);
|
|
127
|
+
if (!filtered) continue;
|
|
128
|
+
if (filtered.startsWith("/") && !commandName) {
|
|
129
|
+
commandName = filtered;
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
if (commandName) {
|
|
133
|
+
return `${commandName} ${filtered}`;
|
|
134
|
+
}
|
|
135
|
+
return filtered;
|
|
136
|
+
}
|
|
137
|
+
if (commandName) return commandName;
|
|
138
|
+
return "Untitled Session";
|
|
139
|
+
}
|
|
140
|
+
|
|
104
141
|
// packages/feature/agent/src/server/state/globalState.ts
|
|
105
142
|
var MAX_SESSIONS = 100;
|
|
106
143
|
var MIN_SESSIONS = 15;
|
|
@@ -226,17 +263,17 @@ async function getSessionContent(cwd, sessionId) {
|
|
|
226
263
|
if (existsSync(ollamaPath)) return getClaudeStyleContent(ollamaPath);
|
|
227
264
|
const codexPath = findCodexSessionPath(sessionId);
|
|
228
265
|
if (codexPath && existsSync(codexPath)) {
|
|
229
|
-
return { summary: "", messages: await getCodexUserMessages(codexPath) };
|
|
266
|
+
return { aiTitle: "", summary: "", messages: await getCodexUserMessages(codexPath) };
|
|
230
267
|
}
|
|
231
268
|
const kimiPath = findKimiSessionPath(sessionId);
|
|
232
269
|
if (kimiPath && existsSync(kimiPath)) {
|
|
233
|
-
return { summary: "", messages: await getKimiUserMessages(kimiPath) };
|
|
270
|
+
return { aiTitle: "", summary: "", messages: await getKimiUserMessages(kimiPath) };
|
|
234
271
|
}
|
|
235
|
-
return { summary: "", messages: [] };
|
|
272
|
+
return { aiTitle: "", summary: "", messages: [] };
|
|
236
273
|
}
|
|
237
274
|
async function getSessionPreview(cwd, sessionId) {
|
|
238
|
-
const { summary, messages } = await getSessionContent(cwd, sessionId);
|
|
239
|
-
const title = generateTitle(summary, messages);
|
|
275
|
+
const { aiTitle, summary, messages } = await getSessionContent(cwd, sessionId);
|
|
276
|
+
const title = generateTitle(aiTitle, summary, messages);
|
|
240
277
|
const lastUserMessage = messages[messages.length - 1];
|
|
241
278
|
const searchText = [summary, ...messages].join("\n").toLowerCase();
|
|
242
279
|
if (messages.length <= SUMMARY_THRESHOLD) {
|
|
@@ -277,7 +314,7 @@ async function getGlobalSessionsSnapshot(limit = 15) {
|
|
|
277
314
|
})
|
|
278
315
|
);
|
|
279
316
|
}
|
|
280
|
-
function
|
|
317
|
+
function filterCommandTags2(text) {
|
|
281
318
|
let filtered = text.replace(/<command-[^>]*>[\s\S]*?<\/command-[^>]*>/g, "");
|
|
282
319
|
filtered = filtered.replace(/<local-command-[^>]*>[\s\S]*?<\/local-command-[^>]*>/g, "");
|
|
283
320
|
filtered = filtered.trim();
|
|
@@ -293,12 +330,16 @@ async function getClaudeStyleTitle(filePath) {
|
|
|
293
330
|
try {
|
|
294
331
|
const fileStream = createReadStream(filePath);
|
|
295
332
|
const rl = createInterface({ input: fileStream, crlfDelay: Infinity });
|
|
333
|
+
let aiTitle = "";
|
|
296
334
|
let summary = "";
|
|
297
335
|
const userMessages = [];
|
|
298
336
|
for await (const line of rl) {
|
|
299
337
|
if (!line.trim()) continue;
|
|
300
338
|
try {
|
|
301
339
|
const entry = JSON.parse(line);
|
|
340
|
+
if (entry.type === "ai-title" && entry.aiTitle) {
|
|
341
|
+
aiTitle = entry.aiTitle;
|
|
342
|
+
}
|
|
302
343
|
if (entry.type === "summary" && entry.summary) {
|
|
303
344
|
summary = entry.summary;
|
|
304
345
|
}
|
|
@@ -316,7 +357,7 @@ async function getClaudeStyleTitle(filePath) {
|
|
|
316
357
|
} catch {
|
|
317
358
|
}
|
|
318
359
|
}
|
|
319
|
-
return generateTitle(summary, userMessages);
|
|
360
|
+
return generateTitle(aiTitle, summary, userMessages);
|
|
320
361
|
} catch {
|
|
321
362
|
return "Untitled Session";
|
|
322
363
|
}
|
|
@@ -345,7 +386,7 @@ async function getClaudeStyleUserMessages(filePath) {
|
|
|
345
386
|
}
|
|
346
387
|
}
|
|
347
388
|
if (!text) continue;
|
|
348
|
-
const filtered =
|
|
389
|
+
const filtered = filterCommandTags2(text);
|
|
349
390
|
if (filtered && isValidUserMessage(filtered)) {
|
|
350
391
|
messages.push(filtered);
|
|
351
392
|
}
|
|
@@ -357,6 +398,7 @@ async function getClaudeStyleUserMessages(filePath) {
|
|
|
357
398
|
return messages;
|
|
358
399
|
}
|
|
359
400
|
async function getClaudeStyleContent(filePath) {
|
|
401
|
+
let aiTitle = "";
|
|
360
402
|
let summary = "";
|
|
361
403
|
const messages = [];
|
|
362
404
|
try {
|
|
@@ -366,6 +408,10 @@ async function getClaudeStyleContent(filePath) {
|
|
|
366
408
|
if (!line.trim()) continue;
|
|
367
409
|
try {
|
|
368
410
|
const entry = JSON.parse(line);
|
|
411
|
+
if (entry.type === "ai-title" && entry.aiTitle) {
|
|
412
|
+
aiTitle = entry.aiTitle;
|
|
413
|
+
continue;
|
|
414
|
+
}
|
|
369
415
|
if (entry.type === "summary" && entry.summary) {
|
|
370
416
|
summary = entry.summary;
|
|
371
417
|
continue;
|
|
@@ -385,7 +431,7 @@ async function getClaudeStyleContent(filePath) {
|
|
|
385
431
|
}
|
|
386
432
|
}
|
|
387
433
|
if (!text) continue;
|
|
388
|
-
const filtered =
|
|
434
|
+
const filtered = filterCommandTags2(text);
|
|
389
435
|
if (filtered && isValidUserMessage(filtered)) {
|
|
390
436
|
messages.push(filtered);
|
|
391
437
|
}
|
|
@@ -394,7 +440,7 @@ async function getClaudeStyleContent(filePath) {
|
|
|
394
440
|
}
|
|
395
441
|
} catch {
|
|
396
442
|
}
|
|
397
|
-
return { summary, messages };
|
|
443
|
+
return { aiTitle, summary, messages };
|
|
398
444
|
}
|
|
399
445
|
async function getCodexUserMessages(filePath) {
|
|
400
446
|
const messages = [];
|
|
@@ -414,7 +460,7 @@ async function getCodexUserMessages(filePath) {
|
|
|
414
460
|
if (!payload || payload.type !== "message" || payload.role !== "user") continue;
|
|
415
461
|
const text = payload.content?.filter((c) => c.type === "input_text" && c.text).map((c) => c.text).join("") || "";
|
|
416
462
|
if (!text || text.startsWith("<") || text.startsWith("#")) continue;
|
|
417
|
-
const filtered =
|
|
463
|
+
const filtered = filterCommandTags2(text);
|
|
418
464
|
if (filtered && isValidUserMessage(filtered)) {
|
|
419
465
|
messages.push(filtered);
|
|
420
466
|
}
|
|
@@ -465,7 +511,7 @@ async function getKimiUserMessages(filePath) {
|
|
|
465
511
|
if (!text || text.startsWith("<system") || text.startsWith("<environment") || text.startsWith("# AGENTS.md") || text.startsWith("<permissions")) {
|
|
466
512
|
continue;
|
|
467
513
|
}
|
|
468
|
-
const filtered =
|
|
514
|
+
const filtered = filterCommandTags2(text);
|
|
469
515
|
if (filtered && isValidUserMessage(filtered)) {
|
|
470
516
|
messages.push(filtered);
|
|
471
517
|
}
|
|
@@ -498,24 +544,6 @@ async function getKimiTitle(filePath) {
|
|
|
498
544
|
return void 0;
|
|
499
545
|
}
|
|
500
546
|
}
|
|
501
|
-
function generateTitle(summary, userMessages) {
|
|
502
|
-
if (summary) return summary;
|
|
503
|
-
let commandName = "";
|
|
504
|
-
for (const msg of userMessages) {
|
|
505
|
-
const filtered = filterCommandTags(msg);
|
|
506
|
-
if (!filtered) continue;
|
|
507
|
-
if (filtered.startsWith("/") && !commandName) {
|
|
508
|
-
commandName = filtered;
|
|
509
|
-
continue;
|
|
510
|
-
}
|
|
511
|
-
if (commandName) {
|
|
512
|
-
return `${commandName} ${filtered}`;
|
|
513
|
-
}
|
|
514
|
-
return filtered;
|
|
515
|
-
}
|
|
516
|
-
if (commandName) return commandName;
|
|
517
|
-
return "Untitled Session";
|
|
518
|
-
}
|
|
519
547
|
|
|
520
548
|
// packages/feature/agent/src/server/sessionRunHub.ts
|
|
521
549
|
var GRACE_MS = 6e4;
|
package/dist/scheduledTasks.mjs
CHANGED
package/dist/wsServer.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@surething/cockpit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.240",
|
|
4
4
|
"description": "The open-source Claude Code GUI — an IDE-like workbench for parallel AI coding. Drive Claude (default), Codex, DeepSeek, Kimi, or local Ollama in tabs. Terminal, browser & DB bubbles, code review. Self-host on a shared dev box — a seat for every teammate. Local-first, MIT.",
|
|
5
5
|
"author": "Robert",
|
|
6
6
|
"license": "MIT",
|