@clagentic/console 1.5.0 → 1.6.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/README.md +23 -4
- package/bin/cli.js +15 -82
- package/lib/agents-favorites.js +21 -6
- package/lib/config.js +1 -1
- package/lib/daemon.js +153 -22
- package/lib/drain.js +213 -0
- package/lib/lite-detect.js +6 -5
- package/lib/loop-handoff.js +282 -0
- package/lib/mcp-local.js +18 -2
- package/lib/memory-limits.js +436 -0
- package/lib/model-context-windows.js +65 -0
- package/lib/project-loop.js +31 -3
- package/lib/project-sessions.js +26 -0
- package/lib/project-team.js +4 -1
- package/lib/project.js +8 -0
- package/lib/public/app.js +4 -0
- package/lib/public/css/base.css +18 -0
- package/lib/public/css/diagnostics.css +279 -0
- package/lib/public/css/icon-strip.css +201 -0
- package/lib/public/css/menus.css +2 -2
- package/lib/public/css/mobile-nav.css +24 -0
- package/lib/public/css/server-settings.css +100 -0
- package/lib/public/index.html +26 -0
- package/lib/public/modules/app-header.js +4 -7
- package/lib/public/modules/app-home-hub.js +31 -7
- package/lib/public/modules/app-messages.js +13 -0
- package/lib/public/modules/app-notifications.js +5 -1
- package/lib/public/modules/app-panels.js +11 -21
- package/lib/public/modules/app-projects.js +10 -5
- package/lib/public/modules/command-palette.js +16 -5
- package/lib/public/modules/custom-icons-settings.js +399 -0
- package/lib/public/modules/custom-icons.js +114 -0
- package/lib/public/modules/diagnostic-format.js +34 -0
- package/lib/public/modules/diagnostics.js +297 -0
- package/lib/public/modules/emoji-picker.js +253 -6
- package/lib/public/modules/model-context-windows.js +62 -0
- package/lib/public/modules/popover-position.js +192 -0
- package/lib/public/modules/project-icon.js +113 -0
- package/lib/public/modules/project-settings.js +2 -2
- package/lib/public/modules/project-switcher.js +2 -1
- package/lib/public/modules/scheduler-config.js +5 -8
- package/lib/public/modules/scheduler.js +5 -6
- package/lib/public/modules/server-settings.js +6 -0
- package/lib/public/modules/sidebar-mobile.js +4 -6
- package/lib/public/modules/sidebar-projects.js +35 -90
- package/lib/public/modules/sidebar-sessions.js +6 -20
- package/lib/public/modules/sticky-notes.js +4 -4
- package/lib/public/modules/terminal.js +5 -12
- package/lib/public/style.css +1 -0
- package/lib/sdk-bridge.js +75 -10
- package/lib/sdk-message-processor.js +12 -0
- package/lib/sdk-worker.js +4 -1
- package/lib/server-settings.js +221 -1
- package/lib/server.js +30 -1
- package/lib/sessions.js +27 -11
- package/lib/settings-preflight.js +212 -0
- package/lib/ws-schema.js +2 -0
- package/lib/yoke/adapters/claude-worker.js +14 -2
- package/lib/yoke/adapters/claude.js +16 -0
- package/lib/yoke/adapters/diagnostic-patterns.js +120 -0
- package/lib/yoke/index.js +4 -0
- package/lib/yoke/interface.js +99 -0
- package/package.json +2 -1
- package/scripts/postinstall.js +41 -0
- package/lib/certs/fullchain.pem +0 -47
- package/lib/certs/privkey.pem +0 -5
package/lib/public/index.html
CHANGED
|
@@ -84,6 +84,7 @@
|
|
|
84
84
|
<div id="skip-perms-pill" class="top-bar-pill pill-error hidden"><i data-lucide="shield-off"></i> <span>Skip perms</span></div>
|
|
85
85
|
<div id="client-count" class="top-bar-pill pill-accent hidden"><i data-lucide="users"></i> <span id="client-count-text"></span></div>
|
|
86
86
|
<button id="share-pill" title="Share"><i data-lucide="share-2"></i></button>
|
|
87
|
+
<button id="diagnostics-panel-btn" title="Diagnostics" aria-label="Diagnostics" aria-expanded="false"><i data-lucide="activity"></i><span id="diagnostics-panel-badge" class="diagnostics-panel-badge hidden" aria-hidden="true">0</span></button>
|
|
87
88
|
<button id="notif-center-btn" title="Notifications"><i data-lucide="bell"></i><span id="notif-center-badge" class="notif-badge hidden">0</span></button>
|
|
88
89
|
<button id="server-settings-btn" title="Server settings"><i data-lucide="settings"></i></button>
|
|
89
90
|
</div>
|
|
@@ -337,6 +338,18 @@
|
|
|
337
338
|
</div>
|
|
338
339
|
<div id="team-panel-body" class="usage-panel-body team-panel-body"></div>
|
|
339
340
|
</div>
|
|
341
|
+
<!-- Diagnostics panel (lr-8294, epic lr-1a52) -->
|
|
342
|
+
<div id="diagnostics-panel" class="hidden" role="region" aria-label="Diagnostics" aria-expanded="false" tabindex="-1">
|
|
343
|
+
<div class="usage-panel-header">
|
|
344
|
+
<span>Diagnostics</span>
|
|
345
|
+
<button class="diagnostics-panel-close" aria-label="Close diagnostics panel"><i data-lucide="x"></i></button>
|
|
346
|
+
</div>
|
|
347
|
+
<div class="usage-panel-body diagnostics-panel-body">
|
|
348
|
+
<div id="diagnostics-panel-list">
|
|
349
|
+
<div class="diagnostics-empty">No diagnostics this session.</div>
|
|
350
|
+
</div>
|
|
351
|
+
</div>
|
|
352
|
+
</div>
|
|
340
353
|
<div id="context-panel" class="hidden">
|
|
341
354
|
<div class="usage-panel-header">
|
|
342
355
|
<span>Context</span>
|
|
@@ -1040,6 +1053,7 @@
|
|
|
1040
1053
|
<button class="settings-nav-item" data-section="claudemd"><span>Instructions</span></button>
|
|
1041
1054
|
<button class="settings-nav-item" data-section="environment"><span>Environment</span></button>
|
|
1042
1055
|
<button class="settings-nav-item" data-section="storage"><span>Storage</span></button>
|
|
1056
|
+
<button class="settings-nav-item" data-section="custom-icons"><span>Custom Icons</span></button>
|
|
1043
1057
|
<div class="settings-nav-separator settings-admin-only"></div>
|
|
1044
1058
|
<div class="settings-nav-category settings-admin-only">Admin</div>
|
|
1045
1059
|
<button class="settings-nav-item settings-admin-only" data-section="admin-users"><span>Users</span></button>
|
|
@@ -1308,6 +1322,18 @@
|
|
|
1308
1322
|
</label>
|
|
1309
1323
|
</div>
|
|
1310
1324
|
</div>
|
|
1325
|
+
<div class="server-settings-section" data-section="custom-icons">
|
|
1326
|
+
<h2>Custom Icons</h2>
|
|
1327
|
+
<p class="settings-hint" style="margin-bottom: 16px;">Manage uploaded custom icons available to any project or folder across this server. Uploads are stored server-wide, not per-project.</p>
|
|
1328
|
+
<div class="custom-icons-header">
|
|
1329
|
+
<input type="text" id="custom-icons-filter-input" class="settings-btn-sm custom-icons-filter-input" placeholder="Filter by name…" autocomplete="off" spellcheck="false">
|
|
1330
|
+
<button class="settings-btn-sm" id="custom-icons-upload-btn"><i data-lucide="upload"></i> Upload</button>
|
|
1331
|
+
<input type="file" id="custom-icons-file-input" accept="image/png,image/jpeg,image/gif,image/webp" style="display:none">
|
|
1332
|
+
</div>
|
|
1333
|
+
<div id="custom-icons-list">
|
|
1334
|
+
<!-- rows rendered by JS (custom-icons-settings.js) -->
|
|
1335
|
+
</div>
|
|
1336
|
+
</div>
|
|
1311
1337
|
<!-- Clagentic: Lite — always rendered; JS toggles installed vs not-installed sub-states -->
|
|
1312
1338
|
<div class="server-settings-section" data-section="lite" id="settings-clagentic-section">
|
|
1313
1339
|
<h2>Clagentic: Lite</h2>
|
|
@@ -11,6 +11,7 @@ import { processMessage } from './app-messages.js';
|
|
|
11
11
|
import { saveToolState, resetToolState, restoreToolState } from './tools.js';
|
|
12
12
|
import { getSessionUsage, setSessionUsage, getContextData, setContextData, updateContextPanel, updateUsagePanel } from './app-panels.js';
|
|
13
13
|
import { onHistoryPrepended as onSessionSearchHistoryPrepended } from './session-search.js';
|
|
14
|
+
import { positionPopover } from './popover-position.js';
|
|
14
15
|
|
|
15
16
|
// --- Module-owned state ---
|
|
16
17
|
var sessionInfoPopover = null;
|
|
@@ -104,13 +105,9 @@ export function initHeader() {
|
|
|
104
105
|
sessionInfoPopover = pop;
|
|
105
106
|
refreshIcons();
|
|
106
107
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
pop
|
|
110
|
-
var popRect = pop.getBoundingClientRect();
|
|
111
|
-
if (popRect.right > window.innerWidth - 8) {
|
|
112
|
-
pop.style.left = (window.innerWidth - popRect.width - 8) + "px";
|
|
113
|
-
}
|
|
108
|
+
// Four-edge clamp (lr-a10a): the prior right-only clamp could leave
|
|
109
|
+
// the popover's bottom edge off-screen on short viewports.
|
|
110
|
+
positionPopover(pop, headerInfoBtn, { placement: "below" });
|
|
114
111
|
});
|
|
115
112
|
|
|
116
113
|
document.addEventListener("click", function (e) {
|
|
@@ -5,6 +5,7 @@ import { store } from './store.js';
|
|
|
5
5
|
import { getWs } from './ws-ref.js';
|
|
6
6
|
import { escapeHtml } from './utils.js';
|
|
7
7
|
import { switchProject, getCachedProjects, renderProjectList } from './app-projects.js';
|
|
8
|
+
import { renderProjectIcon, projectIconHtml } from './project-icon.js';
|
|
8
9
|
import { openSchedulerToTab } from './scheduler.js';
|
|
9
10
|
// playbook imports removed (Quick Start section removed from hub)
|
|
10
11
|
import { exitDmMode } from './app-dm.js';
|
|
@@ -330,13 +331,33 @@ export function renderHomeHub(projects) {
|
|
|
330
331
|
(function (proj) {
|
|
331
332
|
var item = document.createElement("div");
|
|
332
333
|
item.className = "hub-project-item";
|
|
333
|
-
|
|
334
|
-
var
|
|
334
|
+
|
|
335
|
+
var dot = document.createElement("span");
|
|
336
|
+
dot.className = "hub-project-dot" + (proj.isProcessing ? " processing" : "");
|
|
337
|
+
item.appendChild(dot);
|
|
338
|
+
|
|
339
|
+
if (proj.icon) {
|
|
340
|
+
var iconSpan = document.createElement("span");
|
|
341
|
+
iconSpan.className = "hub-project-icon";
|
|
342
|
+
// renderProjectIcon routes custom (:slug:) to <img> and emoji to text,
|
|
343
|
+
// avoiding the pre-existing XSS gap of raw proj.icon in innerHTML.
|
|
344
|
+
renderProjectIcon(proj.icon, iconSpan, null);
|
|
345
|
+
item.appendChild(iconSpan);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
var nameSpan = document.createElement("span");
|
|
349
|
+
nameSpan.className = "hub-project-name";
|
|
350
|
+
nameSpan.textContent = proj.title || proj.project || proj.slug;
|
|
351
|
+
item.appendChild(nameSpan);
|
|
352
|
+
|
|
335
353
|
var sessionsLabel = typeof proj.sessions === "number" ? proj.sessions : "";
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
354
|
+
if (sessionsLabel !== "") {
|
|
355
|
+
var sessSpan = document.createElement("span");
|
|
356
|
+
sessSpan.className = "hub-project-sessions";
|
|
357
|
+
sessSpan.textContent = String(sessionsLabel);
|
|
358
|
+
item.appendChild(sessSpan);
|
|
359
|
+
}
|
|
360
|
+
|
|
340
361
|
item.addEventListener("click", function () {
|
|
341
362
|
switchProject(proj.slug);
|
|
342
363
|
});
|
|
@@ -428,8 +449,11 @@ export function handleHubRecentSessions(msg) {
|
|
|
428
449
|
sessions.forEach(function (sess) {
|
|
429
450
|
var item = document.createElement("div");
|
|
430
451
|
item.className = "hub-recent-item";
|
|
452
|
+
// projectIconHtml() routes custom (:slug:) icons to a safe <img> tag and
|
|
453
|
+
// emoji to escaped text, replacing the raw escapeHtml(sess.projectIcon)
|
|
454
|
+
// which showed ':slug:' as literal text (lr-a6da).
|
|
431
455
|
var iconHtml = sess.projectIcon
|
|
432
|
-
? '<span class="hub-recent-project-icon">' +
|
|
456
|
+
? '<span class="hub-recent-project-icon">' + projectIconHtml(sess.projectIcon) + '</span>'
|
|
433
457
|
: '<span class="hub-recent-project-icon hub-recent-project-icon--blank"></span>';
|
|
434
458
|
var timeStr = formatRelativeTime(sess.lastActivity);
|
|
435
459
|
var agentBadge = sess.agentName
|
|
@@ -24,6 +24,7 @@ import { handleFsList, handleFsRead, handleFileChanged, handleDirChanged, handle
|
|
|
24
24
|
import { getPendingNavigate, peekPendingNavigate } from './pending-navigate.js';
|
|
25
25
|
import { isProjectSettingsOpen, refreshProjectSettingsModels, handleInstructionsRead, handleInstructionsWrite, handleProjectEnv, handleProjectEnvSaved, handleProjectSharedEnv, handleProjectSharedEnvSaved, handleProjectOwnerChanged, updateLiteVisibility, handleLiteProjectStatus, handleLiteEnrollResult, handleLiteUnenrollResult } from './project-settings.js';
|
|
26
26
|
import { updateSettingsModels, updateSettingsStats, updateDaemonConfig, handleSetPinResult, handleKeepAwakeChanged, handleAutoContinueChanged, handleRefreshAgentsResult, handleRestartResult, handleShutdownResult, handleSharedEnv, handleSharedEnvSaved, handleGlobalClaudeMdRead, handleGlobalClaudeMdWrite, updateSsLiteVisibility } from './server-settings.js';
|
|
27
|
+
import { handleRenameCustomIconResult } from './custom-icons-settings.js';
|
|
27
28
|
import { handleTermList, handleTermCreated, sendTerminalCommand, handleTermOutput, handleTermResized, handleTermExited, handleTermClosed } from './terminal.js';
|
|
28
29
|
import { updateTerminalList, handleContextSourcesState } from './context-sources.js';
|
|
29
30
|
import { handleNotesList, handleNoteCreated, handleNoteUpdated, handleNoteDeleted } from './sticky-notes.js';
|
|
@@ -50,6 +51,7 @@ import { handleSkillInstallWs } from './app-skills-install.js';
|
|
|
50
51
|
import { handleNotificationsState, handleNotificationCreated, handleNotificationDismissed, handleNotificationDismissedAll, showUpdateBanner } from './app-notifications.js';
|
|
51
52
|
import { handleMentionStart, handleMentionActivity, handleMentionStream, handleMentionDone, handleMentionError, renderMentionUser, renderMentionResponse, renderUserMention } from './mention.js';
|
|
52
53
|
import { handleTeamState, handleTeamMemberUpdate, handleTeamTaskUpdate, handleTeamMessage as handleTeamMsg, handleTeamGone } from './team-panel.js';
|
|
54
|
+
import { addDiagnostic } from './diagnostics.js';
|
|
53
55
|
|
|
54
56
|
// --- DOM refs (cached once, stable for page lifetime) ---
|
|
55
57
|
var messagesEl = document.getElementById("messages");
|
|
@@ -1218,6 +1220,10 @@ export function processMessage(msg) {
|
|
|
1218
1220
|
updateProjectList(msg);
|
|
1219
1221
|
break;
|
|
1220
1222
|
|
|
1223
|
+
case "rename_custom_icon_result":
|
|
1224
|
+
handleRenameCustomIconResult(msg);
|
|
1225
|
+
break;
|
|
1226
|
+
|
|
1221
1227
|
case "project_owner_changed":
|
|
1222
1228
|
store.set({ currentProjectOwnerId: msg.ownerId });
|
|
1223
1229
|
handleProjectOwnerChanged(msg);
|
|
@@ -1328,6 +1334,13 @@ export function processMessage(msg) {
|
|
|
1328
1334
|
case "team_message": handleTeamMsg(msg); break;
|
|
1329
1335
|
case "team_gone": handleTeamGone(msg); break;
|
|
1330
1336
|
|
|
1337
|
+
case "diagnostic":
|
|
1338
|
+
// Diagnostic events from CLI stderr (stage 4/5, lr-8294, epic lr-1a52).
|
|
1339
|
+
// Future sources (e.g. settings preflight from stage 5/5 lr-1a26) will
|
|
1340
|
+
// also arrive via this same type — the render path must not assume CLI origin.
|
|
1341
|
+
addDiagnostic(msg);
|
|
1342
|
+
break;
|
|
1343
|
+
|
|
1331
1344
|
case "daemon_config":
|
|
1332
1345
|
if (msg.config && msg.config.headless) store.set({ isHeadlessMode: true });
|
|
1333
1346
|
updateDaemonConfig(msg.config);
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { refreshIcons, iconHtml } from './icons.js';
|
|
6
6
|
import { escapeHtml } from './utils.js';
|
|
7
|
+
import { projectIconHtml } from './project-icon.js';
|
|
7
8
|
import { store } from './store.js';
|
|
8
9
|
import { getWs } from './ws-ref.js';
|
|
9
10
|
import { getCachedProjects } from './app-projects.js';
|
|
@@ -101,7 +102,10 @@ function showBanner(notif, autoDismissMs) {
|
|
|
101
102
|
: isAuthRequired
|
|
102
103
|
? '<img src="/icon-banded-76.png" width="32" height="32" alt="Clagentic:Console" style="border-radius:8px">'
|
|
103
104
|
: projectIcon
|
|
104
|
-
|
|
105
|
+
// projectIconHtml() routes custom (:slug:) icons to a safe <img> tag and
|
|
106
|
+
// emoji to escaped text — the raw `projectIcon` interpolation previously
|
|
107
|
+
// showed ':slug:' as literal text (lr-a6da).
|
|
108
|
+
? '<span class="notif-banner-emoji">' + projectIconHtml(projectIcon) + '</span>'
|
|
105
109
|
: isEmpty
|
|
106
110
|
? '<img src="/icon-banded-76.png" width="32" height="32" alt="Clagentic:Console" style="border-radius:8px">'
|
|
107
111
|
: iconHtml("folder");
|
|
@@ -6,6 +6,7 @@ import { escapeHtml, showToast } from "./utils.js";
|
|
|
6
6
|
import { store } from './store.js';
|
|
7
7
|
import { getWs } from './ws-ref.js';
|
|
8
8
|
import { VENDOR_NAMES } from './app-rendering.js';
|
|
9
|
+
import { KNOWN_CONTEXT_WINDOWS, resolveModelContextWindow as _resolveModelContextWindowCore } from './model-context-windows.js';
|
|
9
10
|
|
|
10
11
|
// --- Module-owned state (not in store) ---
|
|
11
12
|
// sessionUsage.context = last-turn context fill (lastStreamInputTokens) — not cumulative,
|
|
@@ -106,17 +107,7 @@ var CODEX_WEBSEARCH_OPTIONS = [
|
|
|
106
107
|
{ value: "cached", label: "Cached" },
|
|
107
108
|
{ value: "live", label: "Live" },
|
|
108
109
|
];
|
|
109
|
-
|
|
110
|
-
"opus-4-6": 1000000,
|
|
111
|
-
"claude-sonnet-4": 1000000,
|
|
112
|
-
"gpt-5.5": 1048576,
|
|
113
|
-
"gpt-5.4": 1048576,
|
|
114
|
-
"gpt-5.3": 1048576,
|
|
115
|
-
"gpt-5.2": 1048576,
|
|
116
|
-
"gpt-4.1": 1047576,
|
|
117
|
-
"o3": 200000,
|
|
118
|
-
"o4-mini": 200000,
|
|
119
|
-
};
|
|
110
|
+
// KNOWN_CONTEXT_WINDOWS imported from ./model-context-windows.js (lr-336f shared source of truth)
|
|
120
111
|
// Categories to hide from the legend (noise, not actionable)
|
|
121
112
|
var CTX_HIDDEN_CATS = { "Free space": 1, "Autocompact buffer": 1 };
|
|
122
113
|
|
|
@@ -796,17 +787,16 @@ export function toggleStatusPanel() {
|
|
|
796
787
|
// --- Context panel ---
|
|
797
788
|
|
|
798
789
|
export function resolveContextWindow(model, sdkValue) {
|
|
799
|
-
//
|
|
800
|
-
//
|
|
801
|
-
|
|
802
|
-
//
|
|
803
|
-
|
|
804
|
-
var
|
|
805
|
-
if (
|
|
790
|
+
// Build the active betas array from store so we can delegate to the shared
|
|
791
|
+
// core (lr-336f) which is store-agnostic and usable on both backend and frontend.
|
|
792
|
+
var activeBetas = store.get('currentBetas') || [];
|
|
793
|
+
// Delegate to shared core: beta-first, then [1m] suffix, then map lookup.
|
|
794
|
+
// Core returns 0 for unknown models; apply frontend-specific fallbacks here.
|
|
795
|
+
var coreResult = _resolveModelContextWindowCore(model, activeBetas);
|
|
796
|
+
if (coreResult > 0) return coreResult;
|
|
797
|
+
// sdkValue fallback: prefer the SDK-reported window when the model is not in the
|
|
798
|
+
// shared map (new models, vendor-specific entries). Returns 200000 as last resort.
|
|
806
799
|
if (sdkValue) return sdkValue;
|
|
807
|
-
for (var key in KNOWN_CONTEXT_WINDOWS) {
|
|
808
|
-
if (lc.includes(key)) return KNOWN_CONTEXT_WINDOWS[key];
|
|
809
|
-
}
|
|
810
800
|
return 200000;
|
|
811
801
|
}
|
|
812
802
|
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import { escapeHtml, showToast } from './utils.js';
|
|
5
5
|
import { refreshIcons } from './icons.js';
|
|
6
6
|
import { parseEmojis } from './markdown.js';
|
|
7
|
+
import { renderProjectIcon } from './project-icon.js';
|
|
7
8
|
import { store } from './store.js';
|
|
8
9
|
import { getWs, setWs } from './ws-ref.js';
|
|
9
10
|
import { getMessagesEl, getStatusDot } from './dom-refs.js';
|
|
@@ -344,8 +345,7 @@ export function renderProjectList() {
|
|
|
344
345
|
if (tbIcon) {
|
|
345
346
|
var pIcon = cachedProjects[pi].icon || null;
|
|
346
347
|
if (pIcon) {
|
|
347
|
-
tbIcon
|
|
348
|
-
parseEmojis(tbIcon);
|
|
348
|
+
renderProjectIcon(pIcon, tbIcon, parseEmojis);
|
|
349
349
|
tbIcon.classList.add("has-icon");
|
|
350
350
|
try { localStorage.setItem("clagentic-project-icon-" + (st.currentSlug || "default"), pIcon); } catch (e) {}
|
|
351
351
|
} else {
|
|
@@ -360,8 +360,7 @@ export function renderProjectList() {
|
|
|
360
360
|
var indName = cachedProjects[pi].title || cachedProjects[pi].project || "";
|
|
361
361
|
var indIcon = cachedProjects[pi].icon || null;
|
|
362
362
|
if (indIcon) {
|
|
363
|
-
inputIndicator
|
|
364
|
-
parseEmojis(inputIndicator);
|
|
363
|
+
renderProjectIcon(indIcon, inputIndicator, parseEmojis);
|
|
365
364
|
inputIndicator.removeAttribute("data-abbrev");
|
|
366
365
|
} else {
|
|
367
366
|
// Abbreviation fallback — first two initials
|
|
@@ -739,7 +738,13 @@ function renderRemovedProjectsList() {
|
|
|
739
738
|
});
|
|
740
739
|
var iconEl = document.createElement("span");
|
|
741
740
|
iconEl.className = "add-project-removed-icon";
|
|
742
|
-
|
|
741
|
+
if (rp.icon) {
|
|
742
|
+
// renderProjectIcon() routes custom (:slug:) icons to <img>; the prior
|
|
743
|
+
// textContent assignment showed ':slug:' as literal text (lr-a6da).
|
|
744
|
+
renderProjectIcon(rp.icon, iconEl, parseEmojis);
|
|
745
|
+
} else {
|
|
746
|
+
iconEl.textContent = "\uD83D\uDCC1";
|
|
747
|
+
}
|
|
743
748
|
item.appendChild(iconEl);
|
|
744
749
|
var info = document.createElement("div");
|
|
745
750
|
info.className = "add-project-removed-info";
|
|
@@ -3,6 +3,7 @@ import { escapeHtml } from './utils.js';
|
|
|
3
3
|
import { refreshIcons } from './icons.js';
|
|
4
4
|
import { openSearch as openSessionSearch } from './session-search.js';
|
|
5
5
|
import { pushOverlayState, popOverlayState } from './overlay-history.js';
|
|
6
|
+
import { projectIconHtml } from './project-icon.js';
|
|
6
7
|
|
|
7
8
|
function formatRelativeDate(ts) {
|
|
8
9
|
if (!ts) return "";
|
|
@@ -259,8 +260,11 @@ function renderHome(filter) {
|
|
|
259
260
|
for (var r = 0; r < recentSessions.length; r++) {
|
|
260
261
|
var s = recentSessions[r];
|
|
261
262
|
items.push({ type: "session", data: s });
|
|
262
|
-
|
|
263
|
-
|
|
263
|
+
// projectIconHtml() routes custom (:slug:) icons to a safe <img> tag and
|
|
264
|
+
// emoji to escaped text — the prior raw s.projectIcon interpolation
|
|
265
|
+
// showed ':slug:' as literal text (lr-a6da).
|
|
266
|
+
var iconHtml = projectIconHtml(s.projectIcon, '<i data-lucide="message-square"></i>');
|
|
267
|
+
var projLabel = projectIconHtml(s.projectIcon) + " " + escapeHtml(s.projectTitle || s.projectSlug);
|
|
264
268
|
html += renderItem(flatIndex, iconHtml, escapeHtml(s.sessionTitle || "New Session"), projLabel.trim(), null, s.lastActivity);
|
|
265
269
|
flatIndex++;
|
|
266
270
|
}
|
|
@@ -319,7 +323,11 @@ function renderHome(filter) {
|
|
|
319
323
|
items.push({ type: "project", data: proj });
|
|
320
324
|
var pName = escapeHtml(proj.title || proj.project || proj.slug);
|
|
321
325
|
var sessLabel = proj.sessions ? proj.sessions + " sessions" : "";
|
|
322
|
-
|
|
326
|
+
// projectIconHtml() routes custom (:slug:) icons to a safe <img> tag;
|
|
327
|
+
// the prior raw proj.icon interpolation (via refreshIcons(), which only
|
|
328
|
+
// converts <i data-lucide> placeholders) showed ':slug:' as literal
|
|
329
|
+
// text (lr-a6da).
|
|
330
|
+
html += renderItem(flatIndex, projectIconHtml(proj.icon, '<i data-lucide="box"></i>'), pName, sessLabel, null);
|
|
323
331
|
flatIndex++;
|
|
324
332
|
}
|
|
325
333
|
}
|
|
@@ -382,8 +390,11 @@ function appendHomeSearchResults(results, query) {
|
|
|
382
390
|
for (var i = 0; i < newResults.length; i++) {
|
|
383
391
|
var r = newResults[i];
|
|
384
392
|
items.push({ type: "search-result", data: r, query: query });
|
|
385
|
-
|
|
386
|
-
|
|
393
|
+
// projectIconHtml() routes custom (:slug:) icons to a safe <img> tag and
|
|
394
|
+
// emoji to escaped text — the prior raw r.projectIcon interpolation
|
|
395
|
+
// showed ':slug:' as literal text (lr-a6da).
|
|
396
|
+
var srIconHtml = projectIconHtml(r.projectIcon, '<i data-lucide="message-square"></i>');
|
|
397
|
+
var projLabel = projectIconHtml(r.projectIcon) + " " + escapeHtml(r.projectTitle || r.projectSlug);
|
|
387
398
|
var snippet = r.snippet ? escapeHtml(r.snippet) : "";
|
|
388
399
|
html += renderItem(flatIndex, srIconHtml, escapeHtml(r.sessionTitle || "New Session"), projLabel.trim(), snippet, r.lastActivity);
|
|
389
400
|
flatIndex++;
|