@clagentic/console 1.8.0 → 1.9.0-beta.2
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/bin/cli.js +12 -1
- package/lib/agents.js +13 -3
- package/lib/build-sha.json +2 -2
- package/lib/cli/ipc-subcommands.js +40 -4
- package/lib/daemon.js +25 -1
- package/lib/generated/claude-model-catalog.json +180 -0
- package/lib/model-catalog.js +202 -0
- package/lib/model-families.js +243 -0
- package/lib/project-connection.js +30 -5
- package/lib/project-loop.js +46 -2
- package/lib/project-sessions.js +133 -21
- package/lib/project-user-message.js +70 -3
- package/lib/project.js +11 -1
- package/lib/public/app.js +14 -4
- package/lib/public/css/base.css +14 -0
- package/lib/public/css/home-hub.css +28 -8
- package/lib/public/css/icon-strip.css +17 -0
- package/lib/public/css/menus.css +67 -0
- package/lib/public/css/messages.css +11 -0
- package/lib/public/css/mobile-nav.css +22 -0
- package/lib/public/css/server-settings.css +72 -0
- package/lib/public/css/sidebar.css +15 -0
- package/lib/public/css/title-bar.css +10 -1
- package/lib/public/index.html +4 -0
- package/lib/public/modules/activity-latch.js +159 -0
- package/lib/public/modules/activity-state.js +157 -0
- package/lib/public/modules/app-connection.js +10 -4
- package/lib/public/modules/app-favicon.js +88 -1
- package/lib/public/modules/app-home-hub.js +14 -11
- package/lib/public/modules/app-loop-ui.js +90 -2
- package/lib/public/modules/app-messages.js +117 -28
- package/lib/public/modules/app-panels.js +184 -56
- package/lib/public/modules/app-projects.js +28 -8
- package/lib/public/modules/app-rate-limit.js +14 -2
- package/lib/public/modules/model-families.js +230 -0
- package/lib/public/modules/project-settings.js +1 -0
- package/lib/public/modules/scheduler.js +5 -0
- package/lib/public/modules/server-settings.js +14 -12
- package/lib/public/modules/settings-defaults.js +151 -41
- package/lib/public/modules/sidebar-mobile.js +32 -22
- package/lib/public/modules/sidebar-projects.js +42 -14
- package/lib/public/modules/sidebar-sessions.js +168 -48
- package/lib/public/modules/tools.js +22 -12
- package/lib/sdk-bridge.js +389 -35
- package/lib/sdk-message-processor.js +215 -7
- package/lib/sdk-skill-discovery.js +46 -6
- package/lib/sdk-slash-enrichment.js +5 -2
- package/lib/server-hub-sessions.js +70 -0
- package/lib/server.js +79 -22
- package/lib/session-activity.js +289 -0
- package/lib/sessions.js +104 -3
- package/lib/smtp.js +10 -1
- package/lib/terminal-manager.js +40 -0
- package/lib/utils.js +44 -0
- package/lib/ws-schema.js +17 -0
- package/lib/yoke/adapters/claude-worker.js +6 -2
- package/lib/yoke/adapters/claude.js +384 -88
- package/lib/yoke/adapters/codex.js +239 -31
- package/package.json +2 -2
- package/scripts/check-test-count.js +397 -0
- package/scripts/generate-model-catalog.js +337 -0
- package/scripts/test-file-completion-reporter.js +43 -0
- package/lib/model-context-windows.js +0 -65
- package/lib/public/modules/model-context-windows.js +0 -62
|
@@ -34,6 +34,7 @@ import {
|
|
|
34
34
|
getCachedDmUnread,
|
|
35
35
|
getCachedDmRemovedUsers
|
|
36
36
|
} from './sidebar-users.js';
|
|
37
|
+
import { sessionActivity, rollupActivity, indicatorClass } from './activity-state.js';
|
|
37
38
|
|
|
38
39
|
import { store } from './store.js';
|
|
39
40
|
import { getWs } from './ws-ref.js';
|
|
@@ -182,9 +183,10 @@ function renderSheetProjects(listEl) {
|
|
|
182
183
|
nameSpan.textContent = p.name;
|
|
183
184
|
el.appendChild(nameSpan);
|
|
184
185
|
|
|
185
|
-
|
|
186
|
+
var rowActivityCls = indicatorClass(sessionActivity(p, null, { ignoreUnread: true }));
|
|
187
|
+
if (rowActivityCls) {
|
|
186
188
|
var dot = document.createElement("span");
|
|
187
|
-
dot.className = "mobile-project-processing";
|
|
189
|
+
dot.className = "mobile-project-processing " + rowActivityCls;
|
|
188
190
|
el.appendChild(dot);
|
|
189
191
|
}
|
|
190
192
|
if (p.unread > 0 && p.slug !== currentSlug) {
|
|
@@ -231,13 +233,13 @@ function renderSheetProjects(listEl) {
|
|
|
231
233
|
// Exclude the currently-active project from unread so switching into a
|
|
232
234
|
// project inside a folder clears its contribution to the folder badge.
|
|
233
235
|
var totalUnread = 0;
|
|
234
|
-
var anyProcessing = false;
|
|
235
236
|
for (var fai = 0; fai < folderProjects.length; fai++) {
|
|
236
237
|
if (folderProjects[fai].slug !== currentSlug) {
|
|
237
238
|
totalUnread += (folderProjects[fai].unread || 0);
|
|
238
239
|
}
|
|
239
|
-
if (folderProjects[fai].isProcessing) anyProcessing = true;
|
|
240
240
|
}
|
|
241
|
+
// lr-66c118: replaces the open-coded anyProcessing OR-loop above.
|
|
242
|
+
var folderRowActivityCls = indicatorClass(rollupActivity(folderProjects, null, { ignoreUnread: true }));
|
|
241
243
|
|
|
242
244
|
// Folder header row
|
|
243
245
|
var headerEl = document.createElement("button");
|
|
@@ -264,9 +266,9 @@ function renderSheetProjects(listEl) {
|
|
|
264
266
|
chevron.innerHTML = '<i data-lucide="chevron-right"></i>';
|
|
265
267
|
headerEl.appendChild(chevron);
|
|
266
268
|
|
|
267
|
-
if (
|
|
269
|
+
if (folderRowActivityCls) {
|
|
268
270
|
var fdot = document.createElement("span");
|
|
269
|
-
fdot.className = "mobile-project-processing";
|
|
271
|
+
fdot.className = "mobile-project-processing " + folderRowActivityCls;
|
|
270
272
|
headerEl.appendChild(fdot);
|
|
271
273
|
}
|
|
272
274
|
if (totalUnread > 0) {
|
|
@@ -474,9 +476,12 @@ function createMobileSessionItem(s) {
|
|
|
474
476
|
el.className = "mobile-session-item" + (s.active ? " active" : "");
|
|
475
477
|
|
|
476
478
|
// Processing dot (left side, before title)
|
|
477
|
-
|
|
479
|
+
var msiActivityState = sessionActivity(s, store.get('myUserId'));
|
|
480
|
+
var msiActivityCls = indicatorClass(msiActivityState);
|
|
481
|
+
if (msiActivityCls) {
|
|
478
482
|
var dot = document.createElement("span");
|
|
479
|
-
dot.className = "mobile-session-processing";
|
|
483
|
+
dot.className = "mobile-session-processing " + msiActivityCls;
|
|
484
|
+
dot.title = msiActivityState.label;
|
|
480
485
|
el.appendChild(dot);
|
|
481
486
|
}
|
|
482
487
|
|
|
@@ -525,9 +530,10 @@ function createMobileLoopChild(s) {
|
|
|
525
530
|
var el = document.createElement("button");
|
|
526
531
|
el.className = "mobile-loop-child" + (s.active ? " active" : "");
|
|
527
532
|
|
|
528
|
-
|
|
533
|
+
var mlcActivityCls = indicatorClass(sessionActivity(s, store.get('myUserId')));
|
|
534
|
+
if (mlcActivityCls) {
|
|
529
535
|
var dot = document.createElement("span");
|
|
530
|
-
dot.className = "mobile-session-processing";
|
|
536
|
+
dot.className = "mobile-session-processing " + mlcActivityCls;
|
|
531
537
|
el.appendChild(dot);
|
|
532
538
|
}
|
|
533
539
|
|
|
@@ -567,15 +573,15 @@ function createMobileLoopRun(parentGk, startedAtKey, sessions, isRalph) {
|
|
|
567
573
|
var timeLabel = startedAt ? new Date(startedAt).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) : "Unknown";
|
|
568
574
|
|
|
569
575
|
var hasActive = false;
|
|
570
|
-
var anyProcessing = false;
|
|
571
576
|
var latestSession = sessions[0];
|
|
572
577
|
for (var i = 0; i < sessions.length; i++) {
|
|
573
578
|
if (sessions[i].active) hasActive = true;
|
|
574
|
-
if (sessions[i].isProcessing) anyProcessing = true;
|
|
575
579
|
if ((sessions[i].lastActivity || 0) > (latestSession.lastActivity || 0)) {
|
|
576
580
|
latestSession = sessions[i];
|
|
577
581
|
}
|
|
578
582
|
}
|
|
583
|
+
// lr-66c118: replaces the open-coded anyProcessing OR-loop above.
|
|
584
|
+
var runRowActivityCls = indicatorClass(rollupActivity(sessions, store.get('myUserId')));
|
|
579
585
|
|
|
580
586
|
var wrapper = document.createElement("div");
|
|
581
587
|
wrapper.className = "mobile-loop-run-wrapper";
|
|
@@ -591,8 +597,8 @@ function createMobileLoopRun(parentGk, startedAtKey, sessions, isRalph) {
|
|
|
591
597
|
var label = document.createElement("span");
|
|
592
598
|
label.className = "mobile-loop-run-time";
|
|
593
599
|
var labelHtml = "";
|
|
594
|
-
if (
|
|
595
|
-
labelHtml += '<span class="mobile-session-processing"></span> ';
|
|
600
|
+
if (runRowActivityCls) {
|
|
601
|
+
labelHtml += '<span class="mobile-session-processing ' + runRowActivityCls + '"></span> ';
|
|
596
602
|
}
|
|
597
603
|
labelHtml += escapeHtml(timeLabel);
|
|
598
604
|
label.innerHTML = labelHtml;
|
|
@@ -659,15 +665,15 @@ function createMobileLoopGroup(loopId, children, groupKey) {
|
|
|
659
665
|
|
|
660
666
|
var expanded = expandedMobileLoopGroups.has(gk);
|
|
661
667
|
var hasActive = false;
|
|
662
|
-
var anyProcessing = false;
|
|
663
668
|
var latestSession = children[0];
|
|
664
669
|
for (var ci = 0; ci < children.length; ci++) {
|
|
665
670
|
if (children[ci].active) hasActive = true;
|
|
666
|
-
if (children[ci].isProcessing) anyProcessing = true;
|
|
667
671
|
if ((children[ci].lastActivity || 0) > (latestSession.lastActivity || 0)) {
|
|
668
672
|
latestSession = children[ci];
|
|
669
673
|
}
|
|
670
674
|
}
|
|
675
|
+
// lr-66c118: replaces the open-coded anyProcessing OR-loop above.
|
|
676
|
+
var groupRowActivityCls = indicatorClass(rollupActivity(children, store.get('myUserId')));
|
|
671
677
|
|
|
672
678
|
var loopName = (children[0].loop && children[0].loop.name) || "Loop";
|
|
673
679
|
var isRalph = children[0].loop && children[0].loop.source === "ralph";
|
|
@@ -695,9 +701,9 @@ function createMobileLoopGroup(loopId, children, groupKey) {
|
|
|
695
701
|
iconSpan.innerHTML = iconHtml(groupIcon);
|
|
696
702
|
header.appendChild(iconSpan);
|
|
697
703
|
|
|
698
|
-
if (
|
|
704
|
+
if (groupRowActivityCls) {
|
|
699
705
|
var dot = document.createElement("span");
|
|
700
|
-
dot.className = "mobile-session-processing";
|
|
706
|
+
dot.className = "mobile-session-processing " + groupRowActivityCls;
|
|
701
707
|
header.appendChild(dot);
|
|
702
708
|
}
|
|
703
709
|
|
|
@@ -968,16 +974,20 @@ export function refreshMobileChatSheet() {
|
|
|
968
974
|
// Update processing dot: same class as icon strip
|
|
969
975
|
var statusDot = chip.querySelector(".icon-strip-status");
|
|
970
976
|
if (statusDot) {
|
|
971
|
-
var
|
|
977
|
+
var chipProject = null;
|
|
972
978
|
var allProjects = getCachedProjects() || [];
|
|
973
979
|
var lookupSlug = chip.dataset.type === "mate" ? ("mate-" + chip.dataset.mateId) : chip.dataset.slug;
|
|
974
980
|
for (var pi = 0; pi < allProjects.length; pi++) {
|
|
975
|
-
if (allProjects[pi].slug === lookupSlug
|
|
976
|
-
|
|
981
|
+
if (allProjects[pi].slug === lookupSlug) {
|
|
982
|
+
chipProject = allProjects[pi];
|
|
977
983
|
break;
|
|
978
984
|
}
|
|
979
985
|
}
|
|
980
|
-
|
|
986
|
+
// lr-66c118: chip dot is project-level — isProcessing-only (no alert
|
|
987
|
+
// tone here, matching every other project-level dot in this module).
|
|
988
|
+
statusDot.classList.remove("processing", "alert", "other");
|
|
989
|
+
var chipActivityCls = indicatorClass(sessionActivity(chipProject, null, { ignoreUnread: true }));
|
|
990
|
+
if (chipActivityCls) statusDot.classList.add(chipActivityCls);
|
|
981
991
|
}
|
|
982
992
|
}
|
|
983
993
|
|
|
@@ -16,6 +16,7 @@ import { showIconTooltip, hideIconTooltip, closeUserCtxMenu, getCurrentDmUserId
|
|
|
16
16
|
import { switchProject, openAddProjectModal, getCachedProjects } from './app-projects.js';
|
|
17
17
|
import { openAgentPickerForPreferred } from './agent-picker.js';
|
|
18
18
|
import { showHomeHub } from './app-home-hub.js';
|
|
19
|
+
import { sessionActivity, rollupActivity, indicatorClass } from './activity-state.js';
|
|
19
20
|
|
|
20
21
|
// --- Project state ---
|
|
21
22
|
var cachedProjectList = [];
|
|
@@ -1316,7 +1317,14 @@ function generateFolderName(existingFolderNames) {
|
|
|
1316
1317
|
|
|
1317
1318
|
// --- Icon item creation ---
|
|
1318
1319
|
|
|
1319
|
-
|
|
1320
|
+
// activityOverride (optional): a raw project/rollup-shaped object to derive
|
|
1321
|
+
// the dot from INSTEAD of p itself, without mutating p — see
|
|
1322
|
+
// renderWorktreeGroup, which used to fold worktree processing state directly
|
|
1323
|
+
// onto the shared project object in place (lr-66c118; same disease as the
|
|
1324
|
+
// July phantom-badge bug, engram 7574673: a later read of p could no longer
|
|
1325
|
+
// distinguish "this project is processing" from "some worktree was
|
|
1326
|
+
// processing at last render").
|
|
1327
|
+
function createIconItem(p, currentSlug, activityOverride) {
|
|
1320
1328
|
var currentDmUserId = getCurrentDmUserId ? getCurrentDmUserId() : null;
|
|
1321
1329
|
var el = document.createElement("a");
|
|
1322
1330
|
var isActive = p.slug === currentSlug && !currentDmUserId;
|
|
@@ -1339,7 +1347,12 @@ function createIconItem(p, currentSlug) {
|
|
|
1339
1347
|
|
|
1340
1348
|
var statusDot = document.createElement("span");
|
|
1341
1349
|
statusDot.className = "icon-strip-status";
|
|
1342
|
-
|
|
1350
|
+
// lr-66c118: project-level dot — only ever a processing/idle signal, never
|
|
1351
|
+
// alert (the project unread badge below owns that affordance) — ignoreUnread
|
|
1352
|
+
// so sessionActivity never derives an 'alert' tone here even though p (or
|
|
1353
|
+
// activityOverride) carries .unread for the badge above/below.
|
|
1354
|
+
var pActivityCls = indicatorClass(sessionActivity(activityOverride || p, null, { ignoreUnread: true }));
|
|
1355
|
+
if (pActivityCls) statusDot.classList.add(pActivityCls);
|
|
1343
1356
|
el.appendChild(statusDot);
|
|
1344
1357
|
|
|
1345
1358
|
var projectBadge = document.createElement("span");
|
|
@@ -1616,21 +1629,26 @@ function renderUserFolder(unit, wtByParent, currentSlug, currentDmUserId) {
|
|
|
1616
1629
|
|
|
1617
1630
|
// Aggregate state: unread sum, processing, active
|
|
1618
1631
|
var totalUnread = 0;
|
|
1619
|
-
var
|
|
1632
|
+
var folderActivityItems = [];
|
|
1620
1633
|
var containsActive = false;
|
|
1621
1634
|
for (var fi = 0; fi < folderProjects.length; fi++) {
|
|
1622
1635
|
var fp = folderProjects[fi];
|
|
1623
1636
|
totalUnread += fp.unread || 0;
|
|
1624
|
-
|
|
1637
|
+
folderActivityItems.push(fp);
|
|
1625
1638
|
if (fp.slug === currentSlug) containsActive = true;
|
|
1626
1639
|
// Also check worktrees
|
|
1627
1640
|
var fwt = wtByParent[fp.slug] || [];
|
|
1628
1641
|
for (var fwi = 0; fwi < fwt.length; fwi++) {
|
|
1629
1642
|
totalUnread += fwt[fwi].unread || 0;
|
|
1630
|
-
|
|
1643
|
+
folderActivityItems.push(fwt[fwi]);
|
|
1631
1644
|
if (fwt[fwi].slug === currentSlug) containsActive = true;
|
|
1632
1645
|
}
|
|
1633
1646
|
}
|
|
1647
|
+
// lr-66c118: replaces the open-coded anyProcessing OR-loop above. Project
|
|
1648
|
+
// dots never carry alert tone (see createIconItem) — ignoreUnread so this
|
|
1649
|
+
// stays isProcessing-only, matching, even though the raw items carry
|
|
1650
|
+
// .unread for totalUnread above.
|
|
1651
|
+
var folderActivityCls = indicatorClass(rollupActivity(folderActivityItems, null, { ignoreUnread: true }));
|
|
1634
1652
|
|
|
1635
1653
|
var folderEl = document.createElement("div");
|
|
1636
1654
|
folderEl.className = "icon-strip-folder" + (isCollapsed ? " collapsed" : "") + (containsActive && isCollapsed ? " contains-active" : "");
|
|
@@ -1668,7 +1686,7 @@ function renderUserFolder(unit, wtByParent, currentSlug, currentDmUserId) {
|
|
|
1668
1686
|
// Processing dot
|
|
1669
1687
|
var fStatusDot = document.createElement("span");
|
|
1670
1688
|
fStatusDot.className = "icon-strip-status";
|
|
1671
|
-
if (
|
|
1689
|
+
if (folderActivityCls) fStatusDot.classList.add(folderActivityCls);
|
|
1672
1690
|
headerEl.appendChild(fStatusDot);
|
|
1673
1691
|
|
|
1674
1692
|
// Unread badge
|
|
@@ -1822,13 +1840,21 @@ function renderWorktreeGroup(p, worktrees, currentSlug, currentDmUserId) {
|
|
|
1822
1840
|
folder.dataset.parentSlug = p.slug;
|
|
1823
1841
|
if (wtCollapsed[p.slug]) folder.classList.add("collapsed");
|
|
1824
1842
|
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1843
|
+
// lr-66c118: replaces the prior in-place mutation of the shared project
|
|
1844
|
+
// object's processing flag (see createIconItem's activityOverride doc
|
|
1845
|
+
// comment for why that was wrong). activityOverride carries whichever raw
|
|
1846
|
+
// item (parent or a worktree) is the rollup's own winner, so
|
|
1847
|
+
// createIconItem's own sessionActivity() call still does the real
|
|
1848
|
+
// derivation — no double-derivation, no raw property read here.
|
|
1849
|
+
var worktreeGroupItems = [p].concat(worktrees);
|
|
1850
|
+
var worktreeWinner = worktreeGroupItems[0];
|
|
1851
|
+
for (var wpi = 1; wpi < worktreeGroupItems.length; wpi++) {
|
|
1852
|
+
if (sessionActivity(worktreeGroupItems[wpi], null, { ignoreUnread: true }).active) {
|
|
1853
|
+
worktreeWinner = worktreeGroupItems[wpi];
|
|
1854
|
+
break;
|
|
1828
1855
|
}
|
|
1829
1856
|
}
|
|
1830
|
-
|
|
1831
|
-
var header = createIconItem(p, currentSlug);
|
|
1857
|
+
var header = createIconItem(p, currentSlug, worktreeWinner);
|
|
1832
1858
|
header.classList.add("folder-header");
|
|
1833
1859
|
(function (slug, name, elem) {
|
|
1834
1860
|
elem.addEventListener("contextmenu", function (e) {
|
|
@@ -1884,7 +1910,8 @@ function renderWorktreeGroup(p, worktrees, currentSlug, currentDmUserId) {
|
|
|
1884
1910
|
|
|
1885
1911
|
var wtStatus = document.createElement("span");
|
|
1886
1912
|
wtStatus.className = "icon-strip-status";
|
|
1887
|
-
|
|
1913
|
+
var wtActivityCls = indicatorClass(sessionActivity(wt, null, { ignoreUnread: true }));
|
|
1914
|
+
if (wtActivityCls) wtStatus.classList.add(wtActivityCls);
|
|
1888
1915
|
wtEl.appendChild(wtStatus);
|
|
1889
1916
|
|
|
1890
1917
|
var tooltipText = wt.name;
|
|
@@ -2020,9 +2047,10 @@ function createMobileProjectItem(p, currentSlug, isWorktree) {
|
|
|
2020
2047
|
name.textContent = p.name;
|
|
2021
2048
|
el.appendChild(name);
|
|
2022
2049
|
|
|
2023
|
-
|
|
2050
|
+
var mProjActivityCls = indicatorClass(sessionActivity(p, null, { ignoreUnread: true }));
|
|
2051
|
+
if (mProjActivityCls) {
|
|
2024
2052
|
var dot = document.createElement("span");
|
|
2025
|
-
dot.className = "mobile-project-processing";
|
|
2053
|
+
dot.className = "mobile-project-processing " + mProjActivityCls;
|
|
2026
2054
|
el.appendChild(dot);
|
|
2027
2055
|
}
|
|
2028
2056
|
|