@orbit-build/cli 3.2.0 → 3.2.1

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.
Files changed (2) hide show
  1. package/dist/index.js +242 -441
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -303934,13 +303934,15 @@ var DISABLE_ALT_SCREEN = "\x1B[?1049l";
303934
303934
  var ENABLE_MOUSE = "\x1B[?1000h\x1B[?1006h";
303935
303935
  var DISABLE_MOUSE = "\x1B[?1006l\x1B[?1000l";
303936
303936
  var HIDE_CURSOR = "\x1B[?25l";
303937
+ var STEADY_BAR_CURSOR = "\x1B[6 q";
303938
+ var DEFAULT_CURSOR = "\x1B[0 q";
303937
303939
  var RESET_AND_SHOW_CURSOR = "\x1B[0m\x1B[?25h";
303938
303940
  function enterFullscreenTerminal(mouseEnabled, stdout2 = process.stdout) {
303939
303941
  const mouseMode = mouseEnabled ? ENABLE_MOUSE : "";
303940
- stdout2.write(`${ENABLE_ALT_SCREEN}${mouseMode}${HIDE_CURSOR}`);
303942
+ stdout2.write(`${ENABLE_ALT_SCREEN}${STEADY_BAR_CURSOR}${mouseMode}${HIDE_CURSOR}`);
303941
303943
  }
303942
303944
  function leaveFullscreenTerminal(stdin2 = process.stdin, stdout2 = process.stdout) {
303943
- stdout2.write(`${DISABLE_MOUSE}${DISABLE_ALT_SCREEN}${RESET_AND_SHOW_CURSOR}`);
303945
+ stdout2.write(`${DISABLE_MOUSE}${DEFAULT_CURSOR}${DISABLE_ALT_SCREEN}${RESET_AND_SHOW_CURSOR}`);
303944
303946
  if (stdin2.setRawMode) stdin2.setRawMode(false);
303945
303947
  }
303946
303948
 
@@ -306582,6 +306584,26 @@ async function getAutocompleteCandidates(cwd, config, mcpPromptCommands = []) {
306582
306584
  function projectPathKey(path10) {
306583
306585
  return /^(?:[A-Za-z]:|\\\\)/.test(path10) ? path10.replace(/\\/g, "/").toLowerCase() : path10;
306584
306586
  }
306587
+ function projectFolderHints(projects) {
306588
+ const hints = /* @__PURE__ */ new Map();
306589
+ const parents = projects.map(({ path: path10 }) => {
306590
+ const windows = /^(?:[A-Za-z]:|\\\\)/.test(path10);
306591
+ const separator = windows && path10.includes("\\") ? "\\" : "/";
306592
+ const parts = (windows ? path10.replace(/\\/g, "/") : path10).split("/").filter(Boolean);
306593
+ return { parts: parts.slice(0, -1), separator };
306594
+ });
306595
+ for (const [index, project] of projects.entries()) {
306596
+ const others = parents.filter((_, i2) => i2 !== index && projects[i2].name === project.name);
306597
+ if (!others.length) continue;
306598
+ const { parts, separator } = parents[index];
306599
+ let count = 1;
306600
+ while (count < parts.length && others.some(
306601
+ (parent) => parent.parts.slice(-count).join("/") === parts.slice(-count).join("/")
306602
+ )) count++;
306603
+ hints.set(project.path, parts.slice(-count).join(separator) || separator);
306604
+ }
306605
+ return hints;
306606
+ }
306585
306607
  function createNavigationRows() {
306586
306608
  const signatures = /* @__PURE__ */ new WeakMap();
306587
306609
  return function reconcile(container, items, id, content, render) {
@@ -307438,6 +307460,9 @@ var WEB_UI_CLIENT_BINDINGS_SCRIPT = String.raw` elements.composer.addEventListe
307438
307460
  const expanded = elements.archiveToggle.getAttribute('aria-expanded') === 'true';
307439
307461
  elements.archiveToggle.setAttribute('aria-expanded', expanded ? 'false' : 'true');
307440
307462
  elements.archivedPanel.hidden = expanded;
307463
+ if (expanded && !elements.archivedSessions.childElementCount) {
307464
+ elements.archiveToggle.hidden = true; elements.projectToggle.focus();
307465
+ }
307441
307466
  });
307442
307467
  elements.sessionDeleteBackdrop.addEventListener('click', () => closeSessionDeleteDialog());
307443
307468
  elements.sessionDeleteCancel.addEventListener('click', () => closeSessionDeleteDialog());
@@ -312527,6 +312552,35 @@ var WEB_UI_CLIENT_SELECT_SCRIPT = String.raw` const selectControls = new Map();
312527
312552
 
312528
312553
  `;
312529
312554
 
312555
+ // src/runtime/webui/WebUiIcon.ts
312556
+ function renderUiIcon(name) {
312557
+ const paths = {
312558
+ add: '<path d="M12 5v14M5 12h14" />',
312559
+ tasks: '<rect x="5" y="4.5" width="14" height="15" rx="2" /><path d="m8 9 1.5 1.5L12 8M13.5 10h2.5M8 14h8M8 17h5" />',
312560
+ diagnostics: '<path d="M4.5 12h3l1.7-4 3.1 8 1.7-4h5.5" /><path d="M6 5.5h12v13H6z" />',
312561
+ changes: '<path d="M5 7h14M5 12h14M5 17h14" /><path d="M8 5v4M15 10v4M11 15v4" />',
312562
+ context: '<path d="M7 4.5h7l3 3v12H7z" /><path d="M14 4.5v3h3M9.5 12h5M12 9.5v5" />',
312563
+ image: '<rect x="4.5" y="5" width="15" height="14" rx="2" /><circle cx="9" cy="9.5" r="1.5" /><path d="m6.5 17 4-4 2.5 2 2.5-3 2.5 5" />',
312564
+ commands: '<rect x="4.5" y="5.5" width="15" height="13" rx="2" /><path d="m8 10 2 2-2 2M12.5 14h3.5" />',
312565
+ menu: '<path d="M5 7h14M5 12h14M5 17h14" />',
312566
+ panel: '<rect x="4.5" y="5" width="15" height="14" rx="2" /><path d="M14 5v14" />',
312567
+ close: '<path d="m7 7 10 10M17 7 7 17" />',
312568
+ back: '<path d="m10 6-6 6 6 6M4 12h16" />',
312569
+ up: '<path d="m7 14 5-5 5 5" />',
312570
+ down: '<path d="m7 10 5 5 5-5" />',
312571
+ archive: '<path d="M5.5 8.5h13v10h-13zM4.5 5h15v3.5h-15zM9.5 12h5" />',
312572
+ restore: '<path d="M8 8H4V4M4.5 8a8 8 0 1 1-.2 7" />',
312573
+ delete: '<path d="M8 7v11M12 7v11M16 7v11M5 5h14M9 5V3h6v2M6.5 5l1 16h9l1-16" />',
312574
+ search: '<circle cx="10.5" cy="10.5" r="5.5" /><path d="m14.7 14.7 4.3 4.3" />',
312575
+ folder: '<path d="M3.5 7V6a1 1 0 0 1 1-1H10l2 2h7.5a1 1 0 0 1 1 1v9a1.5 1.5 0 0 1-1.5 1.5H5A1.5 1.5 0 0 1 3.5 17V7z" />',
312576
+ review: '<circle cx="10.5" cy="10.5" r="5.5" /><path d="m14.7 14.7 4.3 4.3M10.5 8v5M8 10.5h5" />',
312577
+ fix: '<path d="M14.5 5.5a4 4 0 0 0-4.8 5.2L5 15.4 8.6 19l4.7-4.7a4 4 0 0 0 5.2-4.8l-2.7 2.7-3-3z" />',
312578
+ explain: '<path d="m9 7-5 5 5 5M15 7l5 5-5 5M13 5l-2 14" />',
312579
+ improve: '<path d="M12 4l1.2 4.1L17 10l-3.8 1.9L12 16l-1.2-4.1L7 10l3.8-1.9zM18 16v4M16 18h4M5 4v3M3.5 5.5h3" />'
312580
+ };
312581
+ return `<svg class="ui-icon" viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false">${paths[name]}</svg>`;
312582
+ }
312583
+
312530
312584
  // src/runtime/webui/WebUiClientReview.ts
312531
312585
  function verificationSummary(checks, t2) {
312532
312586
  const failures = checks.filter((check) => check.success === false).length;
@@ -312958,23 +313012,6 @@ var WEB_UI_CLIENT_SESSION_SCRIPT = String.raw` const controlCommands = ${WEB_UI
312958
313012
  return language !== 'en' ? days + ' 天' : days + 'd';
312959
313013
  }
312960
313014
 
312961
- function appendSessionActionIcon(button, action) {
312962
- const namespace = 'http://www.w3.org/2000/svg';
312963
- const svg = document.createElementNS(namespace, 'svg');
312964
- svg.setAttribute('class', 'ui-icon');
312965
- svg.setAttribute('viewBox', '0 0 24 24');
312966
- svg.setAttribute('fill', 'none');
312967
- svg.setAttribute('aria-hidden', 'true');
312968
- const path = document.createElementNS(namespace, 'path');
312969
- path.setAttribute('d', {
312970
- archive: 'M5.5 8.5h13v10h-13zM4.5 5h15v3.5h-15zM9.5 12h5',
312971
- restore: 'M8 8H4V4M4.5 8a8 8 0 1 1-.2 7',
312972
- delete: 'M8 7v11M12 7v11M16 7v11M5 5h14M9 5V3h6v2M6.5 5l1 16h9l1-16',
312973
- }[action] || 'M6 12h12');
312974
- svg.append(path);
312975
- button.append(svg);
312976
- }
312977
-
312978
313015
  function renderSessionNavigation(sessionData) {
312979
313016
  state.sessionData = sessionData || {};
312980
313017
  const sessions = Array.isArray(sessionData && sessionData.recent)
@@ -313015,7 +313052,9 @@ var WEB_UI_CLIENT_SESSION_SCRIPT = String.raw` const controlCommands = ${WEB_UI
313015
313052
  button.title = title.textContent;
313016
313053
  const meta = document.createElement('span');
313017
313054
  meta.className = 'recent-session-meta';
313018
- meta.textContent = [relativeSessionTime(session.updatedAt), session.model].filter(Boolean).join(' · ');
313055
+ meta.textContent = relativeSessionTime(session.updatedAt);
313056
+ meta.title = [meta.textContent, session.model].filter(Boolean).join(' · ');
313057
+ button.setAttribute('aria-description', [meta.textContent, session.model].filter(Boolean).join(' · '));
313019
313058
  button.append(title, meta);
313020
313059
  row.append(button);
313021
313060
  if (!isActive) {
@@ -313026,7 +313065,7 @@ var WEB_UI_CLIENT_SESSION_SCRIPT = String.raw` const controlCommands = ${WEB_UI
313026
313065
  secondaryAction.className = 'session-action';
313027
313066
  secondaryAction.dataset.sessionAction = archived ? 'restore' : 'archive';
313028
313067
  secondaryAction.dataset.sessionId = session.id;
313029
- appendSessionActionIcon(secondaryAction, archived ? 'restore' : 'archive');
313068
+ secondaryAction.innerHTML = archived ? '${renderUiIcon("restore")}' : '${renderUiIcon("archive")}';
313030
313069
  secondaryAction.title = archived ? copy.restoreSession : copy.archiveSession;
313031
313070
  secondaryAction.setAttribute('aria-label', secondaryAction.title);
313032
313071
  const deleteAction = document.createElement('button');
@@ -313034,7 +313073,7 @@ var WEB_UI_CLIENT_SESSION_SCRIPT = String.raw` const controlCommands = ${WEB_UI
313034
313073
  deleteAction.className = 'session-action is-danger';
313035
313074
  deleteAction.dataset.sessionAction = 'delete';
313036
313075
  deleteAction.dataset.sessionId = session.id;
313037
- appendSessionActionIcon(deleteAction, 'delete');
313076
+ deleteAction.innerHTML = '${renderUiIcon("delete")}';
313038
313077
  deleteAction.title = copy.deleteSession;
313039
313078
  deleteAction.setAttribute('aria-label', copy.deleteSession);
313040
313079
  actions.append(secondaryAction, deleteAction);
@@ -313051,7 +313090,7 @@ var WEB_UI_CLIENT_SESSION_SCRIPT = String.raw` const controlCommands = ${WEB_UI
313051
313090
  elements.recentEmpty.hidden = matchingSessions.length > 0;
313052
313091
  elements.archivedEmpty.hidden = elements.archivedSessions.childElementCount > 0;
313053
313092
  elements.archiveCount.textContent = String(archivedSessions.length);
313054
- elements.archiveToggle.classList.toggle('has-items', archivedSessions.length > 0);
313093
+ elements.archiveToggle.hidden = archivedSessions.length === 0 && elements.archivedPanel.hidden;
313055
313094
  const sessionCount = Number(sessionData && sessionData.count || sessions.length + archivedSessions.length);
313056
313095
  elements.projectChatCount.textContent = String(sessionCount);
313057
313096
  elements.projectChatCount.setAttribute('aria-label', String(sessionCount));
@@ -313063,8 +313102,12 @@ var WEB_UI_CLIENT_SESSION_SCRIPT = String.raw` const controlCommands = ${WEB_UI
313063
313102
  const recentProjects = (Array.isArray(projects) ? projects : [])
313064
313103
  .filter((item) => item.available === true && projectPathKey(item.path || '') !== current)
313065
313104
  .slice(0, 6);
313105
+ const hints = projectFolderHints([
313106
+ { name: workspaceName(currentWorkspace), path: currentWorkspace || '' },
313107
+ ...recentProjects.map(p => ({name: p.name || workspaceName(p.path), path: p.path})),
313108
+ ]);
313066
313109
  reconcileNavigation(elements.projectList, recentProjects, project => project.id || project.path,
313067
- project => [project.name, project.path], project => {
313110
+ project => [project.name, project.path, hints.get(project.path)], project => {
313068
313111
  const row = document.createElement('div');
313069
313112
  row.className = 'registered-project';
313070
313113
  const button = document.createElement('button');
@@ -313074,14 +313117,18 @@ var WEB_UI_CLIENT_SESSION_SCRIPT = String.raw` const controlCommands = ${WEB_UI
313074
313117
  button.setAttribute('aria-label', (language !== 'en' ? chinese('打开项目:', '開啟專案:') : 'Open project: ') + (project.name || 'Orbit'));
313075
313118
  const icon = document.createElement('span');
313076
313119
  icon.className = 'registered-project-icon project-folder-icon';
313077
- icon.innerHTML = '<svg class="ui-icon" viewBox="0 0 24 24" fill="none" aria-hidden="true"><path d="M3.5 6.5h6l2 2h9v10h-17z"/></svg>';
313120
+ icon.innerHTML = '${renderUiIcon("folder")}';
313078
313121
  const copyNode = document.createElement('span');
313079
313122
  copyNode.className = 'project-copy';
313080
313123
  const name = document.createElement('strong');
313081
- name.textContent = project.name || workspaceName(project.path); name.title = name.textContent;
313082
- const path = document.createElement('small');
313083
- path.textContent = project.path || ''; path.title = path.textContent;
313084
- copyNode.append(name, path);
313124
+ name.textContent = project.name || workspaceName(project.path);
313125
+ button.title = project.path || ''; button.setAttribute('aria-description', button.title);
313126
+ copyNode.append(name);
313127
+ if (hints.has(project.path)) {
313128
+ const path = document.createElement('small');
313129
+ path.textContent = hints.get(project.path);
313130
+ copyNode.append(path);
313131
+ }
313085
313132
  button.append(icon, copyNode);
313086
313133
  const remove = document.createElement('button');
313087
313134
  remove.type = 'button';
@@ -313182,8 +313229,7 @@ var WEB_UI_CLIENT_SESSION_SCRIPT = String.raw` const controlCommands = ${WEB_UI
313182
313229
  byId('workspaceFolder').textContent = data.workspace || '';
313183
313230
  byId('sidebarWorkspace').textContent = name;
313184
313231
  byId('sidebarWorkspace').title = data.workspace || '';
313185
- byId('sidebarSession').textContent = data.workspace || 'local';
313186
- byId('sidebarSession').title = data.workspace || '';
313232
+ elements.projectToggle.title = data.workspace || '';
313187
313233
  renderProjectNavigation(data.projects || [], data.workspace);
313188
313234
  renderSessionNavigation(data.session || {});
313189
313235
  elements.runtimeUpdated.textContent = formatTime(data.updatedAt);
@@ -314289,6 +314335,7 @@ var WEB_UI_CLIENT_SCRIPT = [
314289
314335
  WEB_UI_CLIENT_MISSION_CONTROL_SCRIPT,
314290
314336
  WEB_UI_CLIENT_EVENT_ROUTING_SCRIPT,
314291
314337
  WEB_UI_CLIENT_STREAM_PARSER_SCRIPT,
314338
+ `const projectFolderHints = ${projectFolderHints.toString()};`,
314292
314339
  `const projectPathKey = ${projectPathKey.toString()};`,
314293
314340
  `const reconcileNavigation = (${createNavigationRows.toString()})();`,
314294
314341
  WEB_UI_CLIENT_SESSION_SCRIPT,
@@ -314324,6 +314371,41 @@ var WEB_UI_FAVICON_SVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4
314324
314371
  // src/runtime/webui/WebUiData.ts
314325
314372
  import { relative as relative9 } from "path";
314326
314373
 
314374
+ // src/runtime/SessionTitles.ts
314375
+ var MAX_TITLE_CHARACTERS = 64;
314376
+ var MAX_LATIN_WORDS = 8;
314377
+ function isDefaultSessionTitle(title) {
314378
+ const name = title.trim();
314379
+ return !name || name === "New Orbit Session";
314380
+ }
314381
+ function deriveSessionTitle(prompt) {
314382
+ const firstMeaningfulLine = prompt.split(/\r?\n/).map((line) => line.trim()).find(Boolean);
314383
+ if (!firstMeaningfulLine) return "Untitled task";
314384
+ const safe = redactSecrets(firstMeaningfulLine).replace(/^#{1,6}\s*/, "").replace(/^[-*+>]\s*/, "").replace(/[\u0000-\u001f\u007f]/g, " ").replace(/\s+/g, " ").trim();
314385
+ if (!safe) return "Untitled task";
314386
+ const clause = safe.split(/[。!?!?;;]|\s+[—–-]\s+/u, 1)[0]?.trim() || safe;
314387
+ const hasCjk = /[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u.test(
314388
+ clause
314389
+ );
314390
+ const compact2 = hasCjk ? Array.from(clause).slice(0, 30).join("") : clause.split(/\s+/).slice(0, MAX_LATIN_WORDS).join(" ");
314391
+ const bounded = Array.from(compact2).slice(0, MAX_TITLE_CHARACTERS).join("").replace(/[\s,.:;!?,。!?;:]+$/u, "").trim();
314392
+ return bounded || "Untitled task";
314393
+ }
314394
+ function ensureSessionTitle(loop, prompt) {
314395
+ try {
314396
+ const activeSession = loop.sessionManager?.getActiveSession();
314397
+ if (!activeSession || !isDefaultSessionTitle(activeSession.title)) {
314398
+ return void 0;
314399
+ }
314400
+ const title = deriveSessionTitle(prompt);
314401
+ activeSession.title = title;
314402
+ loop.sessionManager.getSessionStore().updateSession(activeSession);
314403
+ return title;
314404
+ } catch {
314405
+ return void 0;
314406
+ }
314407
+ }
314408
+
314327
314409
  // src/runtime/webui/WebUiSecurity.ts
314328
314410
  import { timingSafeEqual } from "crypto";
314329
314411
  import { z as z68 } from "zod";
@@ -314934,7 +315016,7 @@ function collectWebUiStatus(options, activeTurn) {
314934
315016
  safeCall(() => options.getPendingApproval?.())
314935
315017
  );
314936
315018
  const contextFiles = summarizeWebUiContextFiles(relevantFiles);
314937
- const normalizedSessions = normalizeSessions(sessions, sessionId);
315019
+ const normalizedSessions = normalizeSessions(sessions, sessionId, config.language);
314938
315020
  const recentSessions = normalizedSessions.filter(
314939
315021
  (session) => session.active || !session.archived
314940
315022
  );
@@ -315239,17 +315321,41 @@ function safeApprovalText(value, maxLength, preserveLines) {
315239
315321
  );
315240
315322
  return (preserveLines ? safe : safe.replace(/\s+/g, " ")).trim().slice(0, maxLength);
315241
315323
  }
315242
- function normalizeSessions(sessions, activeId) {
315324
+ function normalizeSessions(sessions, activeId, language) {
315243
315325
  if (!Array.isArray(sessions)) return [];
315244
- return sessions.filter(isRecord9).map((session) => ({
315245
- id: typeof session.id === "string" ? session.id : "",
315246
- title: typeof session.title === "string" && session.title.trim() ? redactSecrets(session.title.trim()).slice(0, 160) : "Untitled task",
315326
+ const records = sessions.filter(isRecord9).filter((s) => typeof s.id === "string" && s.id);
315327
+ const labels = /* @__PURE__ */ new Map();
315328
+ const unnamed = records.filter((session) => {
315329
+ const title = typeof session.title === "string" ? session.title.trim() : "";
315330
+ if (isDefaultSessionTitle(title)) return true;
315331
+ labels.set(session.id, redactSecrets(title).slice(0, 160));
315332
+ return false;
315333
+ });
315334
+ const creationTime = (session) => typeof session.createdAt === "string" ? Date.parse(session.createdAt) || 0 : 0;
315335
+ unnamed.sort(
315336
+ (a2, b) => creationTime(a2) - creationTime(b) || String(a2.id).localeCompare(String(b.id))
315337
+ );
315338
+ const base = { en: "Untitled chat", zh: "\u672A\u547D\u540D\u5BF9\u8BDD", "zh-TW": "\u672A\u547D\u540D\u5C0D\u8A71" }[language];
315339
+ const taken = new Set(labels.values());
315340
+ let ordinal = 0;
315341
+ for (const session of unnamed) {
315342
+ let label = base;
315343
+ if (unnamed.length > 1 || taken.has(base)) {
315344
+ do {
315345
+ label = base + " " + ++ordinal;
315346
+ } while (taken.has(label));
315347
+ }
315348
+ labels.set(session.id, label);
315349
+ }
315350
+ return records.map((session) => ({
315351
+ id: String(session.id),
315352
+ title: labels.get(session.id),
315247
315353
  model: typeof session.model === "string" ? session.model : "",
315248
315354
  updatedAt: typeof session.updatedAt === "string" ? session.updatedAt : typeof session.createdAt === "string" ? session.createdAt : "",
315249
315355
  active: session.id === activeId,
315250
315356
  archived: typeof session.archivedAt === "string",
315251
315357
  archivedAt: typeof session.archivedAt === "string" ? session.archivedAt : ""
315252
- })).filter((session) => session.id).sort((left, right) => {
315358
+ })).sort((left, right) => {
315253
315359
  if (left.active !== right.active) return left.active ? -1 : 1;
315254
315360
  return Date.parse(right.updatedAt) - Date.parse(left.updatedAt);
315255
315361
  });
@@ -315843,33 +315949,6 @@ data: ${JSON.stringify(entry.event)}
315843
315949
  `;
315844
315950
  }
315845
315951
 
315846
- // src/runtime/webui/WebUiIcon.ts
315847
- function renderUiIcon(name) {
315848
- const paths = {
315849
- add: '<path d="M12 5v14M5 12h14" />',
315850
- tasks: '<rect x="5" y="4.5" width="14" height="15" rx="2" /><path d="m8 9 1.5 1.5L12 8M13.5 10h2.5M8 14h8M8 17h5" />',
315851
- diagnostics: '<path d="M4.5 12h3l1.7-4 3.1 8 1.7-4h5.5" /><path d="M6 5.5h12v13H6z" />',
315852
- changes: '<path d="M5 7h14M5 12h14M5 17h14" /><path d="M8 5v4M15 10v4M11 15v4" />',
315853
- context: '<path d="M7 4.5h7l3 3v12H7z" /><path d="M14 4.5v3h3M9.5 12h5M12 9.5v5" />',
315854
- image: '<rect x="4.5" y="5" width="15" height="14" rx="2" /><circle cx="9" cy="9.5" r="1.5" /><path d="m6.5 17 4-4 2.5 2 2.5-3 2.5 5" />',
315855
- commands: '<rect x="4.5" y="5.5" width="15" height="13" rx="2" /><path d="m8 10 2 2-2 2M12.5 14h3.5" />',
315856
- menu: '<path d="M5 7h14M5 12h14M5 17h14" />',
315857
- panel: '<rect x="4.5" y="5" width="15" height="14" rx="2" /><path d="M14 5v14" />',
315858
- close: '<path d="m7 7 10 10M17 7 7 17" />',
315859
- back: '<path d="m10 6-6 6 6 6M4 12h16" />',
315860
- up: '<path d="m7 14 5-5 5 5" />',
315861
- down: '<path d="m7 10 5 5 5-5" />',
315862
- archive: '<path d="M5.5 8.5h13v10h-13zM4.5 5h15v3.5h-15zM9.5 12h5" />',
315863
- search: '<circle cx="10.5" cy="10.5" r="5.5" /><path d="m14.7 14.7 4.3 4.3" />',
315864
- folder: '<path d="M4.5 7h5.3l2-2h7.7v14h-15z" /><path d="M4.5 9h15" />',
315865
- review: '<circle cx="10.5" cy="10.5" r="5.5" /><path d="m14.7 14.7 4.3 4.3M10.5 8v5M8 10.5h5" />',
315866
- fix: '<path d="M14.5 5.5a4 4 0 0 0-4.8 5.2L5 15.4 8.6 19l4.7-4.7a4 4 0 0 0 5.2-4.8l-2.7 2.7-3-3z" />',
315867
- explain: '<path d="m9 7-5 5 5 5M15 7l5 5-5 5M13 5l-2 14" />',
315868
- improve: '<path d="M12 4l1.2 4.1L17 10l-3.8 1.9L12 16l-1.2-4.1L7 10l3.8-1.9zM18 16v4M16 18h4M5 4v3M3.5 5.5h3" />'
315869
- };
315870
- return `<svg class="ui-icon" viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false">${paths[name]}</svg>`;
315871
- }
315872
-
315873
315952
  // src/runtime/webui/WebUiWorkflowForm.ts
315874
315953
  var STAGE_COPY = {
315875
315954
  en: {
@@ -316611,8 +316690,8 @@ function renderWebUiPage(language) {
316611
316690
  <kbd data-control-key="N">Ctrl N</kbd>
316612
316691
  </button>
316613
316692
 
316614
- <div class="nav-section-heading project-heading">
316615
- <span>${copy.projects}</span><i></i>
316693
+ <div class="project-heading">
316694
+ <span>${copy.projects}</span>
316616
316695
  <button class="new-project-button" id="newProjectButton" type="button" aria-label="${copy.newProject}" aria-haspopup="dialog" aria-controls="projectDialog">${renderUiIcon("add")}</button>
316617
316696
  </div>
316618
316697
  <section class="project-section" id="projectSection" data-testid="active-project" aria-label="${copy.projects}">
@@ -316620,19 +316699,12 @@ function renderWebUiPage(language) {
316620
316699
  <span class="project-folder-icon">${renderUiIcon("folder")}</span>
316621
316700
  <span class="project-copy">
316622
316701
  <strong id="sidebarWorkspace">\u2014</strong>
316623
- <small id="sidebarSession">${copy.localOnly}</small>
316624
316702
  </span>
316625
316703
  <span class="project-chat-count" id="projectChatCount" aria-label="0">0</span>
316626
316704
  <span class="project-toggle-chevron">${renderUiIcon("down")}</span>
316627
316705
  </button>
316628
316706
  <div class="project-chat-body" id="projectChatBody" role="region" aria-label="${copy.recentTasks}" tabindex="0">
316629
- <section class="recent-section" id="recentSection" aria-labelledby="recentHeading">
316630
- <div class="nav-section-heading session-section-heading" id="recentHeading">
316631
- <span>${copy.recentTasks}</span><i></i>
316632
- <button class="archive-toggle" id="archiveToggle" type="button" aria-label="${copy.archivedTasks}" aria-controls="archivedPanel" aria-expanded="false">
316633
- ${renderUiIcon("archive")}<b id="archiveCount">0</b>
316634
- </button>
316635
- </div>
316707
+ <section class="recent-section" id="recentSection" aria-label="${copy.recentTasks}">
316636
316708
  <label class="session-search" id="sessionSearchField" hidden>
316637
316709
  <span class="sr-only">${copy.searchChats}</span>
316638
316710
  ${renderUiIcon("search")}
@@ -316641,8 +316713,10 @@ function renderWebUiPage(language) {
316641
316713
  <div class="recent-sessions" id="recentSessions" data-testid="chat-list" aria-label="${copy.recentTasks}"></div>
316642
316714
  <p class="session-list-empty" id="recentEmpty">${copy.noRecentTasks}</p>
316643
316715
  <button class="session-show-more" id="sessionShowMore" type="button" hidden>${copy.showMoreChats}</button>
316716
+ <button class="archive-toggle" id="archiveToggle" type="button" aria-controls="archivedPanel" aria-expanded="false" hidden>
316717
+ ${renderUiIcon("archive")}<span>${copy.archivedTasks}</span><b id="archiveCount">0</b>
316718
+ </button>
316644
316719
  <section class="archived-panel" id="archivedPanel" aria-label="${copy.archivedTasks}" hidden>
316645
- <div class="archived-panel-title">${copy.archivedTasks}</div>
316646
316720
  <div class="archived-sessions" id="archivedSessions"></div>
316647
316721
  <p class="session-list-empty" id="archivedEmpty">${copy.noArchivedTasks}</p>
316648
316722
  </section>
@@ -316651,7 +316725,6 @@ function renderWebUiPage(language) {
316651
316725
  </section>
316652
316726
 
316653
316727
  <section class="recent-projects-shell" id="recentProjectsShell" aria-label="${copy.recentProjects}" hidden>
316654
- <div class="project-list-label">${copy.recentProjects}</div>
316655
316728
  <div class="project-list" id="projectList" role="region" aria-label="${copy.recentProjects}" tabindex="0"></div>
316656
316729
  </section>
316657
316730
 
@@ -322098,9 +322171,10 @@ var WEB_UI_RESPONSIVE_STYLES = String.raw`
322098
322171
  pointer-events: auto;
322099
322172
  }
322100
322173
 
322101
- .recent-session {
322102
- min-height: 64px;
322103
- }
322174
+ .session-actions { flex-basis: auto; width: auto; }
322175
+ .recent-session, .registered-project-open, .project-toggle { min-height: 44px; }
322176
+ .registered-project-remove { width: 32px; height: 32px; right: 2px; }
322177
+
322104
322178
 
322105
322179
  .session-action {
322106
322180
  width: 32px;
@@ -322108,7 +322182,7 @@ var WEB_UI_RESPONSIVE_STYLES = String.raw`
322108
322182
  }
322109
322183
 
322110
322184
  .session-row:has(.session-actions) .recent-session-meta {
322111
- padding-right: 72px;
322185
+ display: none;
322112
322186
  }
322113
322187
 
322114
322188
  .icon-button,
@@ -322378,6 +322452,8 @@ var WEB_UI_RESPONSIVE_STYLES = String.raw`
322378
322452
  scrollbar-gutter: auto;
322379
322453
  }
322380
322454
 
322455
+ .project-chat-body { padding-inline-end: 10px; }
322456
+
322381
322457
  .message-scroll {
322382
322458
  scrollbar-width: none;
322383
322459
  }
@@ -322997,7 +323073,7 @@ var WEB_UI_SHELL_STYLES = String.raw`
322997
323073
  gap: 8px;
322998
323074
  padding: 8px 8px 8px 0;
322999
323075
  background:
323000
- radial-gradient(circle at 5% 0%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 25%),
323076
+ radial-gradient(circle at 5% 0%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 32%),
323001
323077
  linear-gradient(145deg, color-mix(in srgb, var(--canvas-deep) 94%, white), var(--canvas-deep)),
323002
323078
  var(--canvas-deep);
323003
323079
  transition: grid-template-columns 210ms cubic-bezier(0.2, 0.75, 0.3, 1), gap 210ms ease, padding 210ms ease;
@@ -323091,14 +323167,9 @@ var WEB_UI_SHELL_STYLES = String.raw`
323091
323167
 
323092
323168
  .brand-version {
323093
323169
  margin-left: auto;
323094
- padding: 3px 6px;
323095
323170
  color: var(--sidebar-muted);
323096
- background: var(--sidebar-surface);
323097
- border: 1px solid var(--sidebar-border);
323098
- border-radius: 5px;
323099
- font-family: var(--font-mono);
323100
- font-size: 9px;
323101
- letter-spacing: 0.04em;
323171
+ font: 11px var(--font-sans);
323172
+ font-variant-numeric: tabular-nums;
323102
323173
  }
323103
323174
 
323104
323175
  .sidebar-collapse-button {
@@ -323125,74 +323196,35 @@ var WEB_UI_SHELL_STYLES = String.raw`
323125
323196
  }
323126
323197
 
323127
323198
  .new-task-button {
323128
- height: 45px;
323199
+ min-height: 37px;
323129
323200
  display: flex;
323130
323201
  align-items: center;
323131
- gap: 9px;
323132
- width: 100%;
323133
- padding: 0 12px;
323202
+ gap: 8px;
323203
+ padding: 0 10px;
323134
323204
  color: var(--sidebar-ink);
323135
- background: color-mix(in srgb, var(--sidebar-active) 86%, var(--accent) 14%);
323136
- border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--sidebar-border));
323137
- border-radius: 12px;
323138
- box-shadow: var(--shadow-sm);
323139
- font-weight: 620;
323205
+ background: var(--sidebar-surface);
323206
+ border: 1px solid var(--sidebar-border);
323207
+ border-radius: 8px;
323208
+ font: 600 13px var(--font-sans);
323140
323209
  text-align: left;
323141
- transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
323142
323210
  }
323143
-
323144
- .new-task-button:hover {
323145
- background: color-mix(in srgb, var(--sidebar-active) 88%, var(--accent) 12%);
323146
- border-color: color-mix(in srgb, var(--accent) 46%, var(--sidebar-border));
323147
- box-shadow: 0 10px 26px rgba(3, 13, 10, 0.22);
323148
- transform: translateY(-1px);
323149
- }
323150
-
323211
+ .new-task-button:hover { background: var(--sidebar-active); }
323151
323212
  .new-task-button kbd {
323152
323213
  margin-left: auto;
323153
- padding: 2px 5px;
323154
- color: var(--sidebar-faint);
323155
- background: var(--sidebar-surface);
323156
- border: 1px solid var(--sidebar-border);
323157
- border-radius: 5px;
323158
- font: 9px/1.3 var(--font-mono);
323159
- }
323160
-
323161
- .new-task-icon {
323162
- width: 20px;
323163
- height: 20px;
323164
- display: grid;
323165
- place-items: center;
323166
- color: #f6fbf9;
323167
- background: color-mix(in srgb, var(--accent) 86%, white);
323168
- border-radius: 6px;
323169
- }
323170
-
323171
- .new-task-icon .ui-icon {
323172
- width: 14px;
323173
- height: 14px;
323214
+ color: var(--sidebar-muted);
323215
+ font: 11px var(--font-sans);
323174
323216
  }
323217
+ .new-task-icon { display: grid; place-items: center; color: var(--accent-strong); }
323218
+ .new-task-icon .ui-icon { width: 17px; height: 17px; }
323175
323219
 
323176
- .nav-section-heading {
323177
- height: 25px;
323220
+ .project-heading {
323178
323221
  display: flex;
323179
323222
  align-items: center;
323180
- gap: 9px;
323181
- padding: 9px 10px 2px;
323182
- color: var(--sidebar-faint);
323183
- font: 700 10.5px/1 var(--font-mono);
323184
- letter-spacing: 0.11em;
323185
- text-transform: uppercase;
323186
- }
323187
-
323188
- .nav-section-heading i {
323189
- height: 1px;
323190
- flex: 1;
323191
- background: var(--sidebar-border);
323192
- }
323193
-
323194
- .project-heading {
323195
- padding-right: 3px;
323223
+ justify-content: space-between;
323224
+ margin-top: 10px;
323225
+ padding: 0 6px 0 9px;
323226
+ color: var(--sidebar-muted);
323227
+ font: 600 12px/1.4 var(--font-sans);
323196
323228
  }
323197
323229
 
323198
323230
  .new-project-button {
@@ -323277,53 +323309,25 @@ var WEB_UI_SHELL_STYLES = String.raw`
323277
323309
 
323278
323310
  .project-section {
323279
323311
  min-width: 0;
323280
- min-height: 148px;
323312
+ min-height: 0;
323281
323313
  display: grid;
323282
323314
  grid-template-rows: auto minmax(0, 1fr);
323283
- flex: 1 1 280px;
323315
+ flex: 0 1 auto;
323284
323316
  overflow: hidden;
323285
- background: transparent;
323286
- border: 1px solid transparent;
323287
- border-radius: 8px;
323288
323317
  }
323289
-
323290
323318
  .project-section:has(.project-toggle[aria-expanded="false"]) {
323291
- min-height: 0;
323292
323319
  flex: 0 0 auto;
323293
323320
  grid-template-rows: auto;
323294
323321
  }
323295
-
323296
- .recent-projects-shell {
323297
- min-width: 0;
323298
- min-height: 0;
323299
- max-height: min(196px, 26dvh);
323300
- display: grid;
323301
- grid-template-rows: auto minmax(0, 1fr);
323302
- flex: 0 1 auto;
323303
- gap: 3px;
323304
- margin: 12px 4px 0;
323305
- padding-top: 10px;
323306
- border-top: 1px solid var(--sidebar-border);
323307
- }
323308
-
323309
- .recent-projects-shell[hidden] {
323310
- display: none;
323311
- }
323312
-
323313
- .project-list-label {
323314
- padding: 0 6px 3px;
323315
- color: var(--sidebar-faint);
323316
- font: 700 9.5px/1.4 var(--font-mono);
323317
- letter-spacing: 0.11em;
323318
- text-transform: uppercase;
323319
- }
323322
+ .recent-projects-shell { min-width: 0; min-height: 0; max-height: min(170px, 24dvh); display: grid; flex: 0 1 auto; }
323323
+ .recent-projects-shell[hidden] { display: none; }
323320
323324
 
323321
323325
  .project-list {
323322
323326
  min-width: 0;
323323
323327
  min-height: 0;
323324
323328
  display: grid;
323325
323329
  align-content: start;
323326
- gap: 6px;
323330
+ gap: 1px;
323327
323331
  overflow-x: hidden;
323328
323332
  overflow-y: auto;
323329
323333
  overscroll-behavior: contain;
@@ -323333,57 +323337,25 @@ var WEB_UI_SHELL_STYLES = String.raw`
323333
323337
  .registered-project {
323334
323338
  position: relative;
323335
323339
  min-width: 0;
323336
- width: 100%;
323337
- min-height: 52px;
323338
- display: block;
323339
- padding: 0;
323340
323340
  color: var(--sidebar-muted);
323341
- background: color-mix(in srgb, var(--sidebar-surface) 44%, transparent);
323342
- border: 1px solid var(--sidebar-border);
323343
- border-radius: 12px;
323344
- text-align: left;
323345
- transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
323346
- }
323347
-
323348
- .registered-project:focus-within,
323349
- .registered-project:hover {
323350
- color: var(--sidebar-ink);
323351
- background: color-mix(in srgb, var(--sidebar-active) 72%, var(--sidebar-surface));
323352
- border-color: color-mix(in srgb, var(--accent) 24%, var(--sidebar-border));
323341
+ border-radius: 7px;
323353
323342
  }
323354
323343
 
323355
- .registered-project:focus-within {
323356
- box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 34%, transparent);
323357
- }
323344
+ .registered-project:hover, .registered-project:focus-within { background: var(--sidebar-surface); color: var(--sidebar-ink); }
323358
323345
 
323359
323346
  .registered-project-open {
323360
- min-width: 0;
323361
- width: 100%;
323362
- min-height: 52px;
323363
- display: grid;
323364
- grid-template-columns: 30px minmax(0, 1fr);
323365
- align-items: center;
323366
- gap: 9px;
323367
- padding: 7px 38px 7px 9px;
323368
- color: inherit;
323369
- background: transparent;
323370
- border: 0;
323371
- border-radius: inherit;
323372
- text-align: left;
323373
- }
323374
-
323375
- .registered-project-open:focus-visible {
323376
- outline: none;
323347
+ width: 100%; min-height: 34px;
323348
+ display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 8px;
323349
+ padding: 4px 34px 4px 9px;
323350
+ color: inherit; background: transparent; border: 0; border-radius: inherit; text-align: left;
323377
323351
  }
323352
+ .registered-project-open:focus-visible { outline-offset: -2px; }
323378
323353
 
323379
323354
  .registered-project-open.is-switching {
323380
323355
  cursor: progress;
323381
323356
  opacity: 0.58;
323382
323357
  }
323383
323358
 
323384
- .registered-project-icon.project-folder-icon { width: 30px; height: 30px; }
323385
- .registered-project-icon .ui-icon { width: 16px; height: 16px; }
323386
-
323387
323359
  .registered-project-remove {
323388
323360
  position: absolute;
323389
323361
  top: 50%;
@@ -323418,40 +323390,16 @@ var WEB_UI_SHELL_STYLES = String.raw`
323418
323390
  }
323419
323391
 
323420
323392
  .project-toggle {
323421
- min-width: 0;
323422
- width: 100%;
323423
- min-height: 48px;
323424
- display: grid;
323425
- grid-template-columns: auto minmax(0, 1fr) auto auto;
323426
- align-items: center;
323427
- gap: 9px;
323428
- padding: 7px 9px;
323429
- color: var(--sidebar-ink);
323430
- background: transparent;
323431
- border: 0;
323432
- text-align: left;
323433
- transition: background 140ms ease;
323434
- }
323435
-
323436
- .project-toggle:hover {
323437
- background: color-mix(in srgb, var(--sidebar-active) 76%, transparent);
323438
- }
323439
-
323440
- .project-folder-icon {
323441
- width: 30px;
323442
- height: 30px;
323443
- display: grid;
323444
- place-items: center;
323445
- color: var(--accent-strong);
323446
- background: color-mix(in srgb, var(--accent-soft) 62%, var(--sidebar-surface));
323447
- border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--sidebar-border));
323448
- border-radius: 8px;
323449
- }
323450
-
323451
- .project-folder-icon .ui-icon {
323452
- width: 16px;
323453
- height: 16px;
323393
+ width: 100%; min-width: 0; min-height: 34px;
323394
+ display: grid; grid-template-columns: 18px minmax(0, 1fr) auto 14px; gap: 8px; align-items: center;
323395
+ padding: 4px 8px 4px 9px; color: var(--sidebar-ink);
323396
+ background: transparent; border: 0; border-radius: 7px; text-align: left;
323454
323397
  }
323398
+ .project-toggle:hover { background: var(--sidebar-surface); }
323399
+ .project-toggle:focus-visible { outline-offset: -2px; }
323400
+ .project-folder-icon { display: grid; place-items: center; color: var(--sidebar-muted); }
323401
+ .project-toggle .project-folder-icon { color: var(--accent-strong); }
323402
+ .project-folder-icon .ui-icon { width: 17px; height: 17px; }
323455
323403
 
323456
323404
  .project-copy {
323457
323405
  min-width: 0;
@@ -323478,16 +323426,9 @@ var WEB_UI_SHELL_STYLES = String.raw`
323478
323426
  }
323479
323427
 
323480
323428
  .project-chat-count {
323481
- min-width: 20px;
323482
- height: 19px;
323483
- display: grid;
323484
- place-items: center;
323485
- padding: 0 5px;
323486
- color: var(--sidebar-faint);
323487
- background: var(--sidebar-surface);
323488
- border: 1px solid var(--sidebar-border);
323489
- border-radius: 7px;
323490
- font: 600 10px/1 var(--font-mono);
323429
+ color: var(--sidebar-muted);
323430
+ font: 11px var(--font-sans);
323431
+ font-variant-numeric: tabular-nums;
323491
323432
  }
323492
323433
 
323493
323434
  .project-toggle-chevron {
@@ -323511,12 +323452,13 @@ var WEB_UI_SHELL_STYLES = String.raw`
323511
323452
  .project-chat-body {
323512
323453
  min-width: 0;
323513
323454
  min-height: 0;
323514
- padding: 0 5px 5px;
323455
+ margin-inline-start: 17px;
323456
+ padding: 0 1px 0 8px;
323515
323457
  overflow-x: hidden;
323516
323458
  overflow-y: auto;
323517
323459
  overscroll-behavior: contain;
323518
323460
  scrollbar-gutter: stable;
323519
- border-top: 1px solid color-mix(in srgb, var(--sidebar-border) 70%, transparent);
323461
+ border-inline-start: 1px solid var(--sidebar-border);
323520
323462
  }
323521
323463
 
323522
323464
  .project-chat-body,
@@ -323564,7 +323506,7 @@ var WEB_UI_SHELL_STYLES = String.raw`
323564
323506
  display: none;
323565
323507
  }
323566
323508
 
323567
- /* Keep long navigation surfaces legible even when the scrollbar is subtle. */
323509
+ /* Indicate when more navigation items are outside the viewport. */
323568
323510
  .project-list.has-scroll-before,
323569
323511
  .project-chat-body.has-scroll-before {
323570
323512
  box-shadow: inset 0 9px 13px -13px color-mix(in srgb, var(--accent) 76%, var(--sidebar-ink));
@@ -323585,7 +323527,7 @@ var WEB_UI_SHELL_STYLES = String.raw`
323585
323527
  .recent-section {
323586
323528
  min-height: 0;
323587
323529
  display: grid;
323588
- grid-template-rows: auto auto minmax(0, auto) auto auto auto;
323530
+ grid-auto-rows: max-content;
323589
323531
  align-content: start;
323590
323532
  margin-top: 2px;
323591
323533
  }
@@ -323657,144 +323599,47 @@ var WEB_UI_SHELL_STYLES = String.raw`
323657
323599
  display: none;
323658
323600
  }
323659
323601
 
323660
- .session-section-heading {
323661
- padding-right: 2px;
323662
- }
323663
-
323664
323602
  .archive-toggle {
323665
- min-width: 30px;
323666
- height: 22px;
323667
- display: flex;
323668
- align-items: center;
323669
- justify-content: center;
323670
- gap: 3px;
323671
- padding: 0 5px;
323672
- color: var(--sidebar-faint);
323673
- background: transparent;
323674
- border: 1px solid transparent;
323675
- border-radius: 7px;
323676
- font: 600 10px/1 var(--font-mono);
323677
- }
323678
-
323679
- .archive-toggle:hover,
323680
- .archive-toggle[aria-expanded="true"] {
323681
- color: var(--sidebar-ink);
323682
- background: var(--sidebar-surface);
323683
- border-color: var(--sidebar-border);
323684
- }
323685
-
323686
- .archive-toggle b {
323687
- min-width: 8px;
323688
- font: inherit;
323689
- }
323690
-
323691
- .archive-toggle .ui-icon {
323692
- width: 13px;
323693
- height: 13px;
323694
- }
323695
-
323696
- .archive-toggle:not(.has-items) b {
323697
- color: var(--sidebar-faint);
323698
- }
323699
-
323700
- .recent-sessions,
323701
- .archived-sessions {
323702
- min-height: 0;
323703
- display: grid;
323704
- gap: 2px;
323705
- overflow: visible;
323706
- padding: 2px;
323707
- }
323708
-
323603
+ justify-self: start;
323604
+ display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 2px 7px;
323605
+ color: var(--sidebar-muted); background: transparent; border: 0; border-radius: 5px;
323606
+ font: 11px var(--font-sans);
323607
+ }
323608
+ .archive-toggle b { font-weight: 500; font-variant-numeric: tabular-nums; }
323609
+ .archive-toggle .ui-icon { width: 13px; height: 13px; }
323610
+ .archive-toggle:hover, .archive-toggle[aria-expanded="true"] { color: var(--sidebar-ink); background: var(--sidebar-surface); }
323611
+ .archive-toggle[hidden] { display: none; }
323612
+ .recent-sessions, .archived-sessions { min-width: 0; display: grid; gap: 2px; padding: 2px 0; }
323709
323613
  .session-row {
323710
- position: relative;
323711
323614
  min-width: 0;
323712
- display: grid;
323713
- grid-template-columns: minmax(0, 1fr);
323714
- align-items: center;
323715
- border: 1px solid transparent;
323716
- border-radius: 9px;
323717
- transition: background 140ms ease, border-color 140ms ease;
323718
- }
323719
-
323720
- .session-row:hover,
323721
- .session-row:focus-within {
323722
- background: color-mix(in srgb, var(--sidebar-surface) 78%, transparent);
323723
- border-color: var(--sidebar-border);
323724
- }
323725
-
323726
- .session-row.is-active {
323727
- background: color-mix(in srgb, var(--accent) 24%, transparent);
323728
- border-color: color-mix(in srgb, var(--accent) 44%, var(--sidebar-border));
323729
- }
323730
-
323731
- .session-row.is-active .recent-session {
323732
- color: var(--sidebar-ink);
323733
- cursor: default;
323615
+ position: relative; display: flex; align-items: center;
323616
+ border-radius: 6px;
323734
323617
  }
323735
-
323736
- .session-row.is-active .recent-session::before {
323737
- width: 6px;
323738
- height: 6px;
323739
- background: color-mix(in srgb, var(--accent) 72%, white);
323740
- box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
323618
+ .session-row:hover, .session-row:focus-within { background: var(--sidebar-surface); }
323619
+ .session-row.is-active { color: var(--accent-strong); background: var(--accent-soft); }
323620
+ .session-row.is-active::before {
323621
+ content: ""; position: absolute; inset-inline-start: 0; width: 2px; height: 13px;
323622
+ border-radius: 2px; background: var(--accent); pointer-events: none;
323741
323623
  }
323742
-
323624
+ .session-row.is-active .recent-session { color: inherit; font-weight: 620; cursor: default; }
323743
323625
  .recent-session {
323744
- position: relative;
323745
- min-width: 0;
323746
- min-height: 58px;
323747
- display: grid;
323748
- gap: 6px;
323749
- padding: 9px 12px 9px 18px;
323750
- color: var(--sidebar-muted);
323751
- background: transparent;
323752
- border: 0;
323753
- border-radius: 9px;
323754
- text-align: left;
323755
- transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
323756
- }
323757
-
323758
- .recent-session::before {
323759
- content: "";
323760
- position: absolute;
323761
- width: 5px;
323762
- height: 5px;
323763
- top: 16px;
323764
- left: 7px;
323765
- background: var(--sidebar-faint);
323766
- border-radius: 50%;
323767
- }
323768
-
323769
- .recent-session:hover {
323770
- color: var(--sidebar-ink);
323626
+ min-width: 0; flex: 1; min-height: 33px;
323627
+ display: flex; align-items: center; gap: 6px; padding: 4px 7px 4px 10px;
323628
+ color: var(--sidebar-ink); background: transparent; border: 0; border-radius: inherit;
323629
+ text-align: left; font: 400 13px/1.35 var(--font-sans);
323771
323630
  }
323772
-
323631
+ .recent-session:focus-visible { outline-offset: -2px; }
323773
323632
  .session-actions {
323774
- position: absolute;
323775
- right: 4px;
323776
- bottom: 4px;
323777
- display: flex;
323778
- align-items: center;
323779
- gap: 1px;
323780
- opacity: 0;
323781
- pointer-events: none;
323782
- transition: opacity 120ms ease;
323783
- }
323784
-
323785
- .session-row:hover .session-actions,
323786
- .session-row:focus-within .session-actions {
323787
- opacity: 1;
323788
- pointer-events: auto;
323789
- }
323790
-
323791
- .session-row:has(.session-actions) .recent-session-meta {
323792
- padding-right: 58px;
323633
+ flex: 0 0 0; width: 0; overflow: hidden;
323634
+ display: flex; align-items: center; gap: 1px; opacity: 0; pointer-events: none;
323793
323635
  }
323636
+ .session-row:is(:hover, :focus-within) .session-actions { width: auto; flex-basis: auto; opacity: 1; pointer-events: auto; }
323637
+ .session-row:has(.session-actions):is(:hover, :focus-within) .recent-session-meta { display: none; }
323794
323638
 
323795
323639
  .session-action {
323796
- width: 25px;
323797
- height: 25px;
323640
+ width: 26px;
323641
+ height: 28px;
323642
+ flex-shrink: 0;
323798
323643
  display: grid;
323799
323644
  place-items: center;
323800
323645
  padding: 0;
@@ -323838,17 +323683,8 @@ var WEB_UI_SHELL_STYLES = String.raw`
323838
323683
  display: none;
323839
323684
  }
323840
323685
 
323841
- .archived-panel-title {
323842
- padding: 0 8px 2px;
323843
- color: var(--sidebar-faint);
323844
- font: 700 10px/1.2 var(--font-mono);
323845
- letter-spacing: 0.11em;
323846
- text-transform: uppercase;
323847
- }
323848
323686
 
323849
- .archived-sessions {
323850
- overflow: visible;
323851
- }
323687
+
323852
323688
 
323853
323689
  .session-list-empty {
323854
323690
  margin: 0;
@@ -323868,15 +323704,12 @@ var WEB_UI_SHELL_STYLES = String.raw`
323868
323704
  white-space: nowrap;
323869
323705
  }
323870
323706
 
323871
- .recent-session-title {
323872
- color: inherit;
323873
- font-size: 12px;
323874
- font-weight: 590;
323875
- }
323876
-
323707
+ .recent-session-title { flex: 1; min-width: 0; }
323877
323708
  .recent-session-meta {
323709
+ flex: none;
323878
323710
  color: var(--sidebar-muted);
323879
- font: 10.5px/1.35 var(--font-mono);
323711
+ font: 11px/1.35 var(--font-sans);
323712
+ font-variant-numeric: tabular-nums;
323880
323713
  }
323881
323714
 
323882
323715
  .recent-session:disabled,
@@ -323897,7 +323730,7 @@ var WEB_UI_SHELL_STYLES = String.raw`
323897
323730
 
323898
323731
  .sidebar-spacer {
323899
323732
  min-height: 4px;
323900
- flex: 0 0 4px;
323733
+ flex: 1 0 4px;
323901
323734
  }
323902
323735
 
323903
323736
  .sidebar-footer { flex-shrink: 0; display: grid; gap: 2px; padding-top: 8px; border-top: 1px solid var(--sidebar-border); }
@@ -327164,38 +326997,6 @@ async function handleSessionCommand(subcommand, argument, dependencies) {
327164
326997
  }
327165
326998
  }
327166
326999
 
327167
- // src/runtime/SessionTitles.ts
327168
- var DEFAULT_SESSION_TITLES = /* @__PURE__ */ new Set(["", "New Orbit Session"]);
327169
- var MAX_TITLE_CHARACTERS = 64;
327170
- var MAX_LATIN_WORDS = 8;
327171
- function deriveSessionTitle(prompt) {
327172
- const firstMeaningfulLine = prompt.split(/\r?\n/).map((line) => line.trim()).find(Boolean);
327173
- if (!firstMeaningfulLine) return "Untitled task";
327174
- const safe = redactSecrets(firstMeaningfulLine).replace(/^#{1,6}\s*/, "").replace(/^[-*+>]\s*/, "").replace(/[\u0000-\u001f\u007f]/g, " ").replace(/\s+/g, " ").trim();
327175
- if (!safe) return "Untitled task";
327176
- const clause = safe.split(/[。!?!?;;]|\s+[—–-]\s+/u, 1)[0]?.trim() || safe;
327177
- const hasCjk = /[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u.test(
327178
- clause
327179
- );
327180
- const compact2 = hasCjk ? Array.from(clause).slice(0, 30).join("") : clause.split(/\s+/).slice(0, MAX_LATIN_WORDS).join(" ");
327181
- const bounded = Array.from(compact2).slice(0, MAX_TITLE_CHARACTERS).join("").replace(/[\s,.:;!?,。!?;:]+$/u, "").trim();
327182
- return bounded || "Untitled task";
327183
- }
327184
- function ensureSessionTitle(loop, prompt) {
327185
- try {
327186
- const activeSession = loop.sessionManager?.getActiveSession();
327187
- if (!activeSession || !DEFAULT_SESSION_TITLES.has(activeSession.title.trim())) {
327188
- return void 0;
327189
- }
327190
- const title = deriveSessionTitle(prompt);
327191
- activeSession.title = title;
327192
- loop.sessionManager.getSessionStore().updateSession(activeSession);
327193
- return title;
327194
- } catch {
327195
- return void 0;
327196
- }
327197
- }
327198
-
327199
327000
  // src/runtime/ModelDiscovery.ts
327200
327001
  import { z as z75 } from "zod";
327201
327002
  var ModelEntrySchema = z75.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orbit-build/cli",
3
- "version": "3.2.0",
3
+ "version": "3.2.1",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Local-first AI coding agent CLI, TUI, Web UI, diagnostics, and LSP runtime",
6
6
  "keywords": [