@codexhost/cli-darwin-arm64 0.2.2 → 0.2.4

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.
@@ -17275,14 +17275,28 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
17275
17275
  var SIDEBAR_THREAD_ID_ATTRIBUTE = "data-app-action-sidebar-thread-id";
17276
17276
  var SIDEBAR_THREAD_HOST_ID_ATTRIBUTE = "data-app-action-sidebar-thread-host-id";
17277
17277
  var SIDEBAR_AGENT_ICON_ATTRIBUTE = "data-codexhost-sidebar-agent-icon";
17278
+ var OWNERSHIP_RETRY_DELAYS_MS = [100, 300, 800, 1500, 3e3];
17278
17279
  function isRecord2(value) {
17279
17280
  return typeof value === "object" && value !== null && !Array.isArray(value);
17280
17281
  }
17281
- function threadIdFromSidebarRowElement(element) {
17282
+ function sidebarThreadAttributes(element) {
17282
17283
  const taskKey = element.getAttribute(SIDEBAR_THREAD_ID_ATTRIBUTE);
17283
17284
  const hostId = element.getAttribute(SIDEBAR_THREAD_HOST_ID_ATTRIBUTE);
17284
17285
  const rowMarker = element.getAttribute(SIDEBAR_THREAD_ROW_ATTRIBUTE);
17285
17286
  if (taskKey === null || hostId === null || rowMarker === null) return null;
17287
+ return { taskKey, hostId, rowMarker };
17288
+ }
17289
+ function draftIdFromSidebarRowElement(element) {
17290
+ const attributes = sidebarThreadAttributes(element);
17291
+ if (!attributes) return null;
17292
+ const hostPrefix = `${attributes.hostId}:`;
17293
+ const taskKey = attributes.taskKey.startsWith(hostPrefix) ? attributes.taskKey.slice(hostPrefix.length) : attributes.taskKey;
17294
+ return taskKey.startsWith("client-new-thread:") ? taskKey : null;
17295
+ }
17296
+ function threadIdFromSidebarRowElement(element) {
17297
+ const attributes = sidebarThreadAttributes(element);
17298
+ if (!attributes) return null;
17299
+ const { taskKey, hostId, rowMarker } = attributes;
17286
17300
  const fiberNames = Object.getOwnPropertyNames(element).filter(
17287
17301
  (name) => name.startsWith("__reactFiber$")
17288
17302
  );
@@ -17324,6 +17338,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
17324
17338
  threadId() {
17325
17339
  return threadIdFromSidebarRowElement(this.element);
17326
17340
  }
17341
+ draftId() {
17342
+ return draftIdFromSidebarRowElement(this.element);
17343
+ }
17327
17344
  render(agent) {
17328
17345
  const titleTrigger = this.element.querySelector("[data-thread-title-trigger]");
17329
17346
  const title = titleTrigger?.querySelector("[data-thread-title]");
@@ -17403,6 +17420,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
17403
17420
  const ownershipByThread = /* @__PURE__ */ new Map();
17404
17421
  const pending = /* @__PURE__ */ new Set();
17405
17422
  const failed = /* @__PURE__ */ new Set();
17423
+ const provisionalCodex = /* @__PURE__ */ new Set();
17424
+ const ownershipRetryAttempts = /* @__PURE__ */ new Map();
17425
+ const ownershipRetryTimers = /* @__PURE__ */ new Map();
17406
17426
  let disposed = false;
17407
17427
  let scanScheduled = false;
17408
17428
  const scheduleScan = () => {
@@ -17410,6 +17430,30 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
17410
17430
  scanScheduled = true;
17411
17431
  queueMicrotask(scan);
17412
17432
  };
17433
+ const clearOwnershipRetry = (threadId) => {
17434
+ const timer = ownershipRetryTimers.get(threadId);
17435
+ if (timer !== void 0) clearTimeout(timer);
17436
+ ownershipRetryTimers.delete(threadId);
17437
+ ownershipRetryAttempts.delete(threadId);
17438
+ provisionalCodex.delete(threadId);
17439
+ };
17440
+ const scheduleOwnershipRetry = (threadId) => {
17441
+ if (disposed || !provisionalCodex.has(threadId) || pending.has(threadId) || ownershipRetryTimers.has(threadId)) {
17442
+ return;
17443
+ }
17444
+ const attempt = ownershipRetryAttempts.get(threadId) ?? 0;
17445
+ const delay = OWNERSHIP_RETRY_DELAYS_MS[attempt];
17446
+ if (delay === void 0) return;
17447
+ ownershipRetryAttempts.set(threadId, attempt + 1);
17448
+ const timer = setTimeout(() => {
17449
+ ownershipRetryTimers.delete(threadId);
17450
+ if (disposed) return;
17451
+ failed.delete(threadId);
17452
+ ownershipByThread.delete(threadId);
17453
+ scheduleScan();
17454
+ }, delay);
17455
+ ownershipRetryTimers.set(threadId, timer);
17456
+ };
17413
17457
  const requestOwnership = (threadIds, client) => {
17414
17458
  for (const threadId of threadIds) pending.add(threadId);
17415
17459
  let succeeded = false;
@@ -17418,6 +17462,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
17418
17462
  for (const ownership of threads) {
17419
17463
  ownershipByThread.set(ownership.threadId, rendererAgentForThreadOwnership(ownership));
17420
17464
  failed.delete(ownership.threadId);
17465
+ if (ownership.owner === "codex") {
17466
+ provisionalCodex.add(ownership.threadId);
17467
+ scheduleOwnershipRetry(ownership.threadId);
17468
+ } else {
17469
+ clearOwnershipRetry(ownership.threadId);
17470
+ }
17421
17471
  }
17422
17472
  succeeded = true;
17423
17473
  }).catch(() => {
@@ -17425,6 +17475,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
17425
17475
  for (const threadId of threadIds) failed.add(threadId);
17426
17476
  }).finally(() => {
17427
17477
  for (const threadId of threadIds) pending.delete(threadId);
17478
+ for (const threadId of threadIds) scheduleOwnershipRetry(threadId);
17428
17479
  if (succeeded) scheduleScan();
17429
17480
  });
17430
17481
  };
@@ -17433,8 +17484,25 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
17433
17484
  if (disposed) return;
17434
17485
  const unresolved = /* @__PURE__ */ new Set();
17435
17486
  for (const row of dom.rows()) {
17487
+ if (!row.isConnected()) {
17488
+ row.clear();
17489
+ continue;
17490
+ }
17436
17491
  const threadId = hostThreadIdSchema.safeParse(row.threadId());
17437
- if (!row.isConnected() || !threadId.success) {
17492
+ const localAgent = options.getLocalAgent?.({
17493
+ threadId: threadId.success ? threadId.data : null,
17494
+ draftId: row.draftId()
17495
+ });
17496
+ if (localAgent !== null && localAgent !== void 0) {
17497
+ if (threadId.success) {
17498
+ ownershipByThread.set(threadId.data, localAgent === "codex" ? null : localAgent);
17499
+ clearOwnershipRetry(threadId.data);
17500
+ }
17501
+ if (localAgent === "codex") row.clear();
17502
+ else row.render(localAgent);
17503
+ continue;
17504
+ }
17505
+ if (!threadId.success) {
17438
17506
  row.clear();
17439
17507
  continue;
17440
17508
  }
@@ -17461,6 +17529,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
17461
17529
  return {
17462
17530
  refresh() {
17463
17531
  failed.clear();
17532
+ for (const threadId of provisionalCodex) {
17533
+ const timer = ownershipRetryTimers.get(threadId);
17534
+ if (timer !== void 0) clearTimeout(timer);
17535
+ ownershipRetryTimers.delete(threadId);
17536
+ ownershipRetryAttempts.delete(threadId);
17537
+ ownershipByThread.delete(threadId);
17538
+ }
17464
17539
  scheduleScan();
17465
17540
  },
17466
17541
  dispose() {
@@ -17471,6 +17546,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
17471
17546
  ownershipByThread.clear();
17472
17547
  pending.clear();
17473
17548
  failed.clear();
17549
+ provisionalCodex.clear();
17550
+ for (const timer of ownershipRetryTimers.values()) clearTimeout(timer);
17551
+ ownershipRetryTimers.clear();
17552
+ ownershipRetryAttempts.clear();
17474
17553
  }
17475
17554
  };
17476
17555
  }
@@ -17916,6 +17995,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
17916
17995
  return source.includes("send-cli-request-for-host") && hasPrewarmMethod(value.requestClient);
17917
17996
  }
17918
17997
  function matchesCurrentPrewarmSignature(target) {
17998
+ const bridge = target.requestClient ?? target;
17999
+ const stableApiShape = bridge.hostId === "local" && typeof bridge.sendRequest === "function" && typeof bridge.prewarmThreadStart === "function" && typeof bridge.enqueueRequest === "function";
18000
+ if (stableApiShape) return true;
17919
18001
  const prewarm = target.prewarmThreadStart ?? target.requestClient?.prewarmThreadStart;
17920
18002
  if (!prewarm) return false;
17921
18003
  const source = Function.prototype.toString.call(prewarm);
@@ -18857,9 +18939,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
18857
18939
 
18858
18940
  // src/settings/release-notes.ts
18859
18941
  var HEADING_PATTERN = /^(#{1,6})[ \t]+(.+?)\s*$/u;
18942
+ var BLOCKQUOTE_PATTERN = /^>[ \t]?(.*?)\s*$/u;
18860
18943
  var UNORDERED_ITEM_PATTERN = /^[-*][ \t]+(.+?)\s*$/u;
18944
+ var CONTINUATION_PATTERN = /^[ \t]+(.+?)\s*$/u;
18861
18945
  var ORDERED_ITEM_PATTERN = /^\d+[.)][ \t]+(.+?)\s*$/u;
18862
18946
  var FENCE_PATTERN = /^```([\w+-]*)\s*$/u;
18947
+ var THEMATIC_BREAK_PATTERN = /^(?:---|___|\*\*\*)[ \t]*$/u;
18863
18948
  var INLINE_PATTERN = /(`+)((?:(?!\1).)+)\1|\*\*(.+?)\*\*|\[([^\]]+)\]\(([^)\s]+)\)/gu;
18864
18949
  function createReleaseNotesElement(document2, markdown) {
18865
18950
  const root = document2.createElement("div");
@@ -18890,6 +18975,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
18890
18975
  index += 1;
18891
18976
  continue;
18892
18977
  }
18978
+ if (BLOCKQUOTE_PATTERN.test(line)) {
18979
+ index = appendBlockquote(document2, root, lines, index);
18980
+ continue;
18981
+ }
18982
+ if (THEMATIC_BREAK_PATTERN.test(line)) {
18983
+ root.append(document2.createElement("hr"));
18984
+ index += 1;
18985
+ continue;
18986
+ }
18893
18987
  if (UNORDERED_ITEM_PATTERN.test(line)) {
18894
18988
  index = appendList(document2, root, lines, index, "ul", UNORDERED_ITEM_PATTERN);
18895
18989
  continue;
@@ -18917,6 +19011,22 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
18917
19011
  root.append(pre);
18918
19012
  return index;
18919
19013
  }
19014
+ function appendBlockquote(document2, root, lines, start) {
19015
+ const blockquote = document2.createElement("blockquote");
19016
+ const content = [];
19017
+ let index = start;
19018
+ while (index < lines.length) {
19019
+ const match = BLOCKQUOTE_PATTERN.exec(lines[index] ?? "");
19020
+ if (!match) break;
19021
+ content.push(match[1] ?? "");
19022
+ index += 1;
19023
+ }
19024
+ const paragraph = document2.createElement("p");
19025
+ appendInline(document2, paragraph, content.join(" ").trim());
19026
+ blockquote.append(paragraph);
19027
+ root.append(blockquote);
19028
+ return index;
19029
+ }
18920
19030
  function appendList(document2, root, lines, start, tag, pattern) {
18921
19031
  const list = document2.createElement(tag);
18922
19032
  let index = start;
@@ -18925,8 +19035,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
18925
19035
  if (!item?.[1]) break;
18926
19036
  const entry = document2.createElement("li");
18927
19037
  appendInline(document2, entry, item[1]);
18928
- list.append(entry);
18929
19038
  index += 1;
19039
+ const continuationLines = [];
19040
+ while (index < lines.length) {
19041
+ const continuation = CONTINUATION_PATTERN.exec(lines[index] ?? "");
19042
+ if (!continuation?.[1]) break;
19043
+ continuationLines.push(continuation[1]);
19044
+ index += 1;
19045
+ }
19046
+ if (continuationLines.length > 0) {
19047
+ const continuation = document2.createElement("span");
19048
+ continuation.className = "release-note-translation";
19049
+ appendInline(document2, continuation, continuationLines.join(" "));
19050
+ entry.append(continuation);
19051
+ }
19052
+ list.append(entry);
18930
19053
  }
18931
19054
  root.append(list);
18932
19055
  return index;
@@ -18936,14 +19059,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
18936
19059
  let index = start;
18937
19060
  while (index < lines.length) {
18938
19061
  const current = lines[index] ?? "";
18939
- if (current.trim().length === 0 || FENCE_PATTERN.test(current) || HEADING_PATTERN.test(current) || UNORDERED_ITEM_PATTERN.test(current) || ORDERED_ITEM_PATTERN.test(current)) {
19062
+ if (current.trim().length === 0 || FENCE_PATTERN.test(current) || HEADING_PATTERN.test(current) || BLOCKQUOTE_PATTERN.test(current) || THEMATIC_BREAK_PATTERN.test(current) || UNORDERED_ITEM_PATTERN.test(current) || ORDERED_ITEM_PATTERN.test(current)) {
18940
19063
  break;
18941
19064
  }
18942
19065
  paragraphLines.push(current.trim());
18943
19066
  index += 1;
18944
19067
  }
18945
19068
  const paragraph = document2.createElement("p");
18946
- appendInline(document2, paragraph, paragraphLines.join(" "));
19069
+ paragraphLines.forEach((line, lineIndex) => {
19070
+ appendInline(document2, paragraph, line);
19071
+ if (lineIndex < paragraphLines.length - 1) paragraph.append(document2.createElement("br"));
19072
+ });
18947
19073
  root.append(paragraph);
18948
19074
  return index;
18949
19075
  }
@@ -18961,17 +19087,30 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
18961
19087
  strong.textContent = match[3];
18962
19088
  parent.append(strong);
18963
19089
  } else {
18964
- const link = document2.createElement("a");
18965
- link.textContent = match[4] ?? "";
18966
- link.setAttribute("href", match[5] ?? "");
18967
- link.setAttribute("target", "_blank");
18968
- link.setAttribute("rel", "noopener noreferrer");
18969
- parent.append(link);
19090
+ const href = match[5] ?? "";
19091
+ if (!isSafeLink(href)) {
19092
+ parent.append(match[4] ?? "");
19093
+ } else {
19094
+ const link = document2.createElement("a");
19095
+ link.textContent = match[4] ?? "";
19096
+ link.setAttribute("href", href);
19097
+ link.setAttribute("target", "_blank");
19098
+ link.setAttribute("rel", "noopener noreferrer");
19099
+ parent.append(link);
19100
+ }
18970
19101
  }
18971
19102
  lastIndex = index + match[0].length;
18972
19103
  }
18973
19104
  if (lastIndex < text.length) parent.append(text.slice(lastIndex));
18974
19105
  }
19106
+ function isSafeLink(href) {
19107
+ try {
19108
+ const url2 = new URL(href, "https://codexhost.invalid");
19109
+ return url2.protocol === "http:" || url2.protocol === "https:";
19110
+ } catch {
19111
+ return false;
19112
+ }
19113
+ }
18975
19114
 
18976
19115
  // src/settings/update-request.ts
18977
19116
  var RENDERER_UPDATE_REQUEST_TIMEOUT_MS = 15e3;
@@ -19336,7 +19475,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
19336
19475
  }
19337
19476
 
19338
19477
  // src/settings/shell.css
19339
- var shell_default = ':host {\n --settings-bg: #181818;\n --settings-sidebar: #1c1c1c;\n --settings-panel: transparent;\n --settings-text: #f5f5f5;\n --settings-muted: #a1a1a1;\n --settings-border: rgb(255 255 255 / 10%);\n --settings-divider: rgb(255 255 255 / 10%);\n --settings-hover: rgb(255 255 255 / 6%);\n --settings-active: rgb(51 156 255 / 12%);\n --settings-focus: #339cff;\n color: var(--settings-text);\n color-scheme: dark;\n font:\n 14px/1.5 system-ui,\n -apple-system,\n BlinkMacSystemFont,\n "Segoe UI",\n sans-serif;\n letter-spacing: 0;\n}\n\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n letter-spacing: 0;\n}\n\nbutton,\ninput,\nselect {\n font: inherit;\n}\n\nbutton {\n color: inherit;\n}\n\n[hidden] {\n display: none !important;\n}\n\n.codexhost-settings-dialog {\n width: min(1120px, calc(100vw - 32px));\n height: min(780px, calc(100vh - 32px));\n max-width: none;\n max-height: none;\n margin: auto;\n padding: 0;\n overflow: hidden;\n color: var(--settings-text);\n background: var(--settings-bg);\n border: 1px solid var(--settings-border);\n border-radius: 12px;\n box-shadow: 0 24px 64px rgb(0 0 0 / 38%);\n}\n\n.codexhost-settings-dialog::backdrop {\n background: rgb(0 0 0 / 52%);\n}\n\n.settings-frame,\n.settings-layout {\n width: 100%;\n height: 100%;\n min-width: 0;\n min-height: 0;\n}\n\n.settings-frame {\n display: flex;\n flex-direction: column;\n}\n\n.settings-layout {\n flex: 1;\n display: grid;\n grid-template-columns: 240px minmax(0, 1fr);\n background: var(--settings-bg);\n}\n\n.settings-sidebar {\n display: flex;\n min-width: 0;\n min-height: 0;\n flex-direction: column;\n overflow: hidden;\n background: var(--settings-sidebar);\n border-right: 1px solid var(--settings-border);\n padding-top: 28px;\n}\n\n.settings-header {\n display: flex;\n align-items: center;\n min-width: 0;\n height: 64px;\n flex: none;\n padding: 0 16px;\n border-bottom: 1px solid var(--settings-border);\n}\n\n.settings-header-actions {\n display: flex;\n align-items: center;\n flex: none;\n gap: 12px;\n margin-left: auto;\n}\n\n.settings-icon-button.settings-star-link {\n width: auto;\n gap: 6px;\n padding-inline: 8px;\n font-size: 12px;\n line-height: 18px;\n text-decoration: none;\n border: 2px dashed #f5c542;\n white-space: nowrap;\n}\n\n.settings-star-link .codexhost-settings-icon {\n color: #f5c542;\n fill: currentColor;\n stroke: currentColor;\n}\n\n.settings-brand {\n display: flex;\n align-items: center;\n min-width: 0;\n gap: 8px;\n}\n\n.settings-brand__mark {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 36px;\n height: 36px;\n flex: none;\n color: var(--settings-text);\n}\n\n.settings-brand__mark .codexhost-settings-icon {\n width: 32px;\n height: 32px;\n object-fit: contain;\n}\n\n.settings-brand__copy {\n display: flex;\n min-width: 0;\n align-items: baseline;\n gap: 0;\n line-height: 20px;\n}\n\n.settings-brand__name {\n overflow: hidden;\n color: var(--settings-text);\n font-size: 14px;\n font-weight: 500;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.settings-brand__title {\n margin-left: 14px;\n padding-left: 14px;\n color: var(--settings-muted);\n font-size: 14px;\n font-weight: 400;\n border-left: 1px solid var(--settings-border);\n}\n\n.settings-nav {\n display: flex;\n min-width: 0;\n min-height: 0;\n flex: 1;\n flex-direction: column;\n gap: 4px;\n padding: 0 12px 16px;\n overflow-y: auto;\n}\n\n.settings-nav-button {\n display: grid;\n grid-template-columns: 16px minmax(0, 1fr);\n align-items: center;\n width: 100%;\n position: relative;\n min-height: 40px;\n flex: none;\n gap: 12px;\n padding: 8px 12px;\n color: var(--settings-text);\n font-size: 14px;\n line-height: 21px;\n text-align: left;\n background: transparent;\n border: 0;\n border-radius: 10px;\n cursor: pointer;\n}\n\n.settings-nav-button .codexhost-settings-icon {\n width: 18px;\n height: 18px;\n opacity: 0.9;\n}\n\n.settings-nav-button:hover {\n background: var(--settings-hover);\n}\n\n.settings-nav-button[aria-current="page"] {\n background: var(--settings-active);\n color: var(--settings-focus);\n}\n\n.settings-nav-button[aria-current="page"]::before {\n position: absolute;\n left: 0;\n width: 3px;\n height: 22px;\n content: "";\n background: var(--settings-focus);\n border-radius: 0 3px 3px 0;\n}\n\n.settings-nav-button span {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.settings-icon-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n flex: none;\n padding: 0;\n color: var(--settings-muted);\n background: transparent;\n border: 0;\n border-radius: 8px;\n cursor: pointer;\n}\n\n.settings-icon-button:hover {\n color: var(--settings-text);\n background: var(--settings-hover);\n}\n\n.settings-icon-button:focus-visible,\n.settings-nav-button:focus-visible {\n outline: 2px solid var(--settings-focus);\n outline-offset: 1px;\n}\n\n.settings-page {\n display: block;\n position: relative;\n min-width: 0;\n min-height: 0;\n overflow-y: auto;\n background: var(--settings-bg);\n scrollbar-gutter: stable;\n}\n\n.settings-page__content {\n width: min(930px, calc(100% - 80px));\n margin-inline: auto;\n}\n\n.settings-page__content {\n min-width: 0;\n padding: 44px 0 56px;\n}\n\n.settings-section-label {\n min-height: auto;\n padding: 0 0 28px;\n color: var(--settings-text);\n font-size: 24px;\n font-weight: 600;\n line-height: 30px;\n}\n\n.settings-status-list,\n.settings-empty {\n overflow: hidden;\n background: var(--settings-panel);\n}\n\n.settings-status-row {\n display: grid;\n grid-template-columns: minmax(170px, 1fr) auto minmax(280px, 1.45fr);\n position: relative;\n align-items: center;\n min-height: 88px;\n gap: 28px;\n padding: 16px 0;\n}\n\n.settings-status-row:not(:last-child)::after {\n content: "";\n position: absolute;\n right: 0;\n bottom: 0;\n left: 0;\n height: 1px;\n background: var(--settings-divider);\n}\n\n.settings-status-row__identity {\n display: inline-flex;\n align-items: center;\n min-width: 0;\n color: var(--settings-text);\n gap: 14px;\n font-size: 15px;\n font-weight: 500;\n line-height: 22px;\n}\n\n.settings-status-row__icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 44px;\n height: 44px;\n flex: none;\n color: var(--settings-muted);\n background: rgb(255 255 255 / 7%);\n border-radius: 50%;\n}\n\n.settings-status-badge {\n flex: none;\n padding: 5px 12px;\n color: var(--settings-muted);\n font-size: 13px;\n font-weight: 500;\n line-height: 18px;\n background: rgb(255 255 255 / 9%);\n border: 1px solid rgb(255 255 255 / 6%);\n border-radius: 6px;\n}\n\n.settings-status-row__detail {\n min-width: 0;\n color: var(--settings-muted);\n font-size: 13px;\n line-height: 20px;\n}\n\n.settings-empty {\n display: flex;\n align-items: center;\n min-height: 72px;\n padding: 12px 16px;\n}\n\n.settings-empty > div {\n display: grid;\n min-width: 0;\n gap: 2px;\n}\n\n.settings-empty strong {\n color: var(--settings-text);\n font-size: 13px;\n font-weight: 500;\n line-height: 19px;\n}\n\n.settings-empty span {\n color: var(--settings-muted);\n font-size: 13px;\n line-height: 19px;\n}\n\n.settings-page-error {\n padding: 16px;\n color: var(--settings-text);\n font-size: 13px;\n background: var(--settings-panel);\n border: 1px solid var(--settings-border);\n border-radius: 20px;\n}\n\n.settings-update-metadata {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 24px;\n margin-bottom: 24px;\n padding: 0 4px 20px;\n border-bottom: 1px solid var(--settings-divider);\n}\n\n.settings-update-metadata__item {\n display: grid;\n min-width: 0;\n gap: 4px;\n}\n\n.settings-update-metadata__item span {\n color: var(--settings-muted);\n font-size: 12px;\n line-height: 18px;\n}\n\n.settings-update-metadata__item strong {\n min-width: 0;\n overflow-wrap: anywhere;\n color: var(--settings-text);\n font-size: 15px;\n font-weight: 500;\n line-height: 22px;\n}\n\n.settings-update-panel {\n display: grid;\n gap: 16px;\n min-height: 128px;\n padding: 20px;\n color: var(--settings-text);\n background: var(--settings-panel);\n border: 1px solid var(--settings-border);\n border-radius: 8px;\n}\n\n.settings-update-panel > strong,\n.settings-update-panel > span,\n.settings-update-summary,\n.settings-update-error {\n margin: 0;\n overflow-wrap: anywhere;\n font-size: 13px;\n line-height: 20px;\n}\n\n.settings-update-panel > span,\n.settings-update-summary {\n color: var(--settings-muted);\n}\n\n.settings-update-error {\n color: #ef4444;\n}\n\n.settings-update-progress {\n width: 100%;\n height: 8px;\n accent-color: #238be8;\n}\n\n.settings-update-progress-detail {\n color: var(--settings-muted);\n font-size: 12px;\n line-height: 18px;\n}\n\n.settings-update-notes {\n display: grid;\n gap: 10px;\n max-height: 320px;\n overflow: auto;\n color: var(--settings-muted);\n font-size: 13px;\n line-height: 20px;\n overflow-wrap: anywhere;\n}\n\n.settings-update-notes > :first-child {\n margin-top: 0;\n}\n\n.settings-update-notes > :last-child {\n margin-bottom: 0;\n}\n\n.settings-update-notes h1,\n.settings-update-notes h2,\n.settings-update-notes h3,\n.settings-update-notes h4,\n.settings-update-notes h5,\n.settings-update-notes h6 {\n margin: 6px 0 0;\n color: var(--settings-text);\n font-weight: 600;\n}\n\n.settings-update-notes h1 {\n font-size: 16px;\n line-height: 24px;\n}\n\n.settings-update-notes h2 {\n font-size: 15px;\n line-height: 22px;\n}\n\n.settings-update-notes h3,\n.settings-update-notes h4,\n.settings-update-notes h5,\n.settings-update-notes h6 {\n font-size: 13px;\n line-height: 20px;\n}\n\n.settings-update-notes p,\n.settings-update-notes ul,\n.settings-update-notes ol,\n.settings-update-notes pre {\n margin: 0;\n}\n\n.settings-update-notes ul,\n.settings-update-notes ol {\n padding-left: 20px;\n}\n\n.settings-update-notes li + li {\n margin-top: 4px;\n}\n\n.settings-update-notes strong {\n color: var(--settings-text);\n font-weight: 600;\n}\n\n.settings-update-notes a {\n color: #7cb8ff;\n text-decoration: none;\n}\n\n.settings-update-notes a:hover {\n text-decoration: underline;\n}\n\n.settings-update-notes code {\n font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;\n font-size: 12px;\n}\n\n.settings-update-notes :not(pre) > code {\n padding: 1px 5px;\n background: rgb(255 255 255 / 8%);\n border-radius: 4px;\n}\n\n.settings-update-notes pre {\n padding: 10px 12px;\n overflow: auto;\n background: rgb(0 0 0 / 28%);\n border-radius: 6px;\n}\n\n.settings-update-notes pre code {\n line-height: 18px;\n white-space: pre-wrap;\n}\n\n.settings-update-version-row {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n align-items: center;\n gap: 20px;\n min-height: 32px;\n color: var(--settings-muted);\n font-size: 13px;\n}\n\n.settings-update-version-row strong {\n color: var(--settings-text);\n font-size: 15px;\n}\n\n.settings-update-manual {\n display: grid;\n min-width: 0;\n gap: 6px;\n margin-top: 14px;\n padding-inline: 4px;\n}\n\n.settings-update-manual[hidden] {\n display: none;\n}\n\n.settings-update-manual span {\n color: var(--settings-muted);\n font-size: 12px;\n line-height: 18px;\n}\n\n.settings-update-manual code {\n overflow-wrap: anywhere;\n color: var(--settings-text);\n font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;\n font-size: 12px;\n line-height: 18px;\n}\n\n.settings-update-actions {\n display: flex;\n min-width: 0;\n margin-top: 16px;\n}\n\n.settings-command-button,\n.settings-update-link {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n min-height: 36px;\n gap: 8px;\n padding: 8px 12px;\n color: white;\n font: inherit;\n font-size: 13px;\n text-decoration: none;\n background: #1677d2;\n border: 1px solid #238be8;\n border-radius: 6px;\n cursor: pointer;\n}\n\n.settings-command-button--secondary,\n.settings-update-link {\n color: var(--settings-text);\n background: transparent;\n border-color: var(--settings-border);\n}\n\n.settings-command-button:hover,\n.settings-update-link:hover {\n filter: brightness(1.08);\n}\n\n.settings-command-button:focus-visible,\n.settings-update-link:focus-visible {\n outline: 2px solid var(--settings-focus);\n outline-offset: 2px;\n}\n\n.codexhost-settings-icon {\n display: block;\n flex: none;\n stroke: currentColor;\n}\n\n@media (max-width: 720px) {\n .codexhost-settings-dialog {\n width: calc(100vw - 16px);\n height: calc(100vh - 16px);\n border-radius: 10px;\n }\n\n .settings-layout {\n grid-template-columns: minmax(0, 1fr);\n grid-template-rows: auto minmax(0, 1fr);\n }\n\n .settings-sidebar {\n border-right: 0;\n border-bottom: 1px solid var(--settings-border);\n }\n\n .settings-header {\n height: 56px;\n padding-inline: 14px;\n }\n\n .settings-icon-button.settings-star-link {\n width: 28px;\n padding: 0;\n }\n\n .settings-star-link span {\n display: none;\n }\n\n .settings-sidebar {\n padding-top: 20px;\n }\n\n .settings-nav {\n flex: none;\n flex-direction: row;\n gap: 4px;\n padding: 7px 8px 8px;\n overflow-x: auto;\n overflow-y: hidden;\n }\n\n .settings-nav-button {\n width: auto;\n min-width: max-content;\n min-height: 34px;\n grid-template-columns: 16px auto;\n border-radius: 10px;\n }\n\n .settings-page__content {\n width: calc(100% - 40px);\n }\n\n .settings-page__content {\n padding-top: 32px;\n padding-bottom: 32px;\n }\n\n .settings-section-label {\n padding-bottom: 20px;\n font-size: 20px;\n line-height: 26px;\n }\n\n .settings-status-row {\n grid-template-columns: minmax(0, 1fr) auto;\n gap: 16px;\n }\n\n .settings-status-row__detail {\n grid-column: 1 / -1;\n margin: -8px 0 0 58px;\n }\n}\n\n@media (forced-colors: active) {\n :host,\n :host([data-theme="dark"]) {\n --settings-bg: Canvas;\n --settings-sidebar: Canvas;\n --settings-panel: Canvas;\n --settings-text: CanvasText;\n --settings-muted: GrayText;\n --settings-border: ButtonBorder;\n --settings-divider: ButtonBorder;\n --settings-hover: Highlight;\n --settings-active: Highlight;\n --settings-focus: Highlight;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n *,\n *::before,\n *::after {\n scroll-behavior: auto !important;\n }\n}\n';
19478
+ var shell_default = ':host {\n --settings-bg: #181818;\n --settings-sidebar: #1c1c1c;\n --settings-panel: transparent;\n --settings-text: #f5f5f5;\n --settings-muted: #a1a1a1;\n --settings-border: rgb(255 255 255 / 10%);\n --settings-divider: rgb(255 255 255 / 10%);\n --settings-hover: rgb(255 255 255 / 6%);\n --settings-active: rgb(51 156 255 / 12%);\n --settings-focus: #339cff;\n color: var(--settings-text);\n color-scheme: dark;\n font:\n 14px/1.5 system-ui,\n -apple-system,\n BlinkMacSystemFont,\n "Segoe UI",\n sans-serif;\n letter-spacing: 0;\n}\n\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n letter-spacing: 0;\n}\n\nbutton,\ninput,\nselect {\n font: inherit;\n}\n\nbutton {\n color: inherit;\n}\n\n[hidden] {\n display: none !important;\n}\n\n.codexhost-settings-dialog {\n width: min(1120px, calc(100vw - 32px));\n height: min(780px, calc(100vh - 32px));\n max-width: none;\n max-height: none;\n margin: auto;\n padding: 0;\n overflow: hidden;\n color: var(--settings-text);\n background: var(--settings-bg);\n border: 1px solid var(--settings-border);\n border-radius: 12px;\n box-shadow: 0 24px 64px rgb(0 0 0 / 38%);\n}\n\n.codexhost-settings-dialog::backdrop {\n background: rgb(0 0 0 / 52%);\n}\n\n.settings-frame,\n.settings-layout {\n width: 100%;\n height: 100%;\n min-width: 0;\n min-height: 0;\n}\n\n.settings-frame {\n display: flex;\n flex-direction: column;\n}\n\n.settings-layout {\n flex: 1;\n display: grid;\n grid-template-columns: 240px minmax(0, 1fr);\n background: var(--settings-bg);\n}\n\n.settings-sidebar {\n display: flex;\n min-width: 0;\n min-height: 0;\n flex-direction: column;\n overflow: hidden;\n background: var(--settings-sidebar);\n border-right: 1px solid var(--settings-border);\n padding-top: 28px;\n}\n\n.settings-header {\n display: flex;\n align-items: center;\n min-width: 0;\n height: 64px;\n flex: none;\n padding: 0 16px;\n border-bottom: 1px solid var(--settings-border);\n}\n\n.settings-header-actions {\n display: flex;\n align-items: center;\n flex: none;\n gap: 12px;\n margin-left: auto;\n}\n\n.settings-icon-button.settings-star-link {\n width: auto;\n gap: 6px;\n padding-inline: 8px;\n font-size: 12px;\n line-height: 18px;\n text-decoration: none;\n border: 2px dashed #f5c542;\n white-space: nowrap;\n}\n\n.settings-star-link .codexhost-settings-icon {\n color: #f5c542;\n fill: currentColor;\n stroke: currentColor;\n}\n\n.settings-brand {\n display: flex;\n align-items: center;\n min-width: 0;\n gap: 8px;\n}\n\n.settings-brand__mark {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 36px;\n height: 36px;\n flex: none;\n color: var(--settings-text);\n}\n\n.settings-brand__mark .codexhost-settings-icon {\n width: 32px;\n height: 32px;\n object-fit: contain;\n}\n\n.settings-brand__copy {\n display: flex;\n min-width: 0;\n align-items: baseline;\n gap: 0;\n line-height: 20px;\n}\n\n.settings-brand__name {\n overflow: hidden;\n color: var(--settings-text);\n font-size: 14px;\n font-weight: 500;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.settings-brand__title {\n margin-left: 14px;\n padding-left: 14px;\n color: var(--settings-muted);\n font-size: 14px;\n font-weight: 400;\n border-left: 1px solid var(--settings-border);\n}\n\n.settings-nav {\n display: flex;\n min-width: 0;\n min-height: 0;\n flex: 1;\n flex-direction: column;\n gap: 4px;\n padding: 0 12px 16px;\n overflow-y: auto;\n}\n\n.settings-nav-button {\n display: grid;\n grid-template-columns: 16px minmax(0, 1fr);\n align-items: center;\n width: 100%;\n position: relative;\n min-height: 40px;\n flex: none;\n gap: 12px;\n padding: 8px 12px;\n color: var(--settings-text);\n font-size: 14px;\n line-height: 21px;\n text-align: left;\n background: transparent;\n border: 0;\n border-radius: 10px;\n cursor: pointer;\n}\n\n.settings-nav-button .codexhost-settings-icon {\n width: 18px;\n height: 18px;\n opacity: 0.9;\n}\n\n.settings-nav-button:hover {\n background: var(--settings-hover);\n}\n\n.settings-nav-button[aria-current="page"] {\n background: var(--settings-active);\n color: var(--settings-focus);\n}\n\n.settings-nav-button[aria-current="page"]::before {\n position: absolute;\n left: 0;\n width: 3px;\n height: 22px;\n content: "";\n background: var(--settings-focus);\n border-radius: 0 3px 3px 0;\n}\n\n.settings-nav-button span {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.settings-icon-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n flex: none;\n padding: 0;\n color: var(--settings-muted);\n background: transparent;\n border: 0;\n border-radius: 8px;\n cursor: pointer;\n}\n\n.settings-icon-button:hover {\n color: var(--settings-text);\n background: var(--settings-hover);\n}\n\n.settings-icon-button:focus-visible,\n.settings-nav-button:focus-visible {\n outline: 2px solid var(--settings-focus);\n outline-offset: 1px;\n}\n\n.settings-page {\n display: block;\n position: relative;\n min-width: 0;\n min-height: 0;\n overflow-y: auto;\n background: var(--settings-bg);\n scrollbar-gutter: stable;\n}\n\n.settings-page__content {\n width: min(930px, calc(100% - 80px));\n margin-inline: auto;\n}\n\n.settings-page__content {\n min-width: 0;\n padding: 44px 0 56px;\n}\n\n.settings-section-label {\n min-height: auto;\n padding: 0 0 28px;\n color: var(--settings-text);\n font-size: 24px;\n font-weight: 600;\n line-height: 30px;\n}\n\n.settings-status-list,\n.settings-empty {\n overflow: hidden;\n background: var(--settings-panel);\n}\n\n.settings-status-row {\n display: grid;\n grid-template-columns: minmax(170px, 1fr) auto minmax(280px, 1.45fr);\n position: relative;\n align-items: center;\n min-height: 88px;\n gap: 28px;\n padding: 16px 0;\n}\n\n.settings-status-row:not(:last-child)::after {\n content: "";\n position: absolute;\n right: 0;\n bottom: 0;\n left: 0;\n height: 1px;\n background: var(--settings-divider);\n}\n\n.settings-status-row__identity {\n display: inline-flex;\n align-items: center;\n min-width: 0;\n color: var(--settings-text);\n gap: 14px;\n font-size: 15px;\n font-weight: 500;\n line-height: 22px;\n}\n\n.settings-status-row__icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 44px;\n height: 44px;\n flex: none;\n color: var(--settings-muted);\n background: rgb(255 255 255 / 7%);\n border-radius: 50%;\n}\n\n.settings-status-badge {\n flex: none;\n padding: 5px 12px;\n color: var(--settings-muted);\n font-size: 13px;\n font-weight: 500;\n line-height: 18px;\n background: rgb(255 255 255 / 9%);\n border: 1px solid rgb(255 255 255 / 6%);\n border-radius: 6px;\n}\n\n.settings-status-row__detail {\n min-width: 0;\n color: var(--settings-muted);\n font-size: 13px;\n line-height: 20px;\n}\n\n.settings-empty {\n display: flex;\n align-items: center;\n min-height: 72px;\n padding: 12px 16px;\n}\n\n.settings-empty > div {\n display: grid;\n min-width: 0;\n gap: 2px;\n}\n\n.settings-empty strong {\n color: var(--settings-text);\n font-size: 13px;\n font-weight: 500;\n line-height: 19px;\n}\n\n.settings-empty span {\n color: var(--settings-muted);\n font-size: 13px;\n line-height: 19px;\n}\n\n.settings-page-error {\n padding: 16px;\n color: var(--settings-text);\n font-size: 13px;\n background: var(--settings-panel);\n border: 1px solid var(--settings-border);\n border-radius: 20px;\n}\n\n.settings-update-metadata {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 24px;\n margin-bottom: 24px;\n padding: 0 4px 20px;\n border-bottom: 1px solid var(--settings-divider);\n}\n\n.settings-update-metadata__item {\n display: grid;\n min-width: 0;\n gap: 4px;\n}\n\n.settings-update-metadata__item span {\n color: var(--settings-muted);\n font-size: 12px;\n line-height: 18px;\n}\n\n.settings-update-metadata__item strong {\n min-width: 0;\n overflow-wrap: anywhere;\n color: var(--settings-text);\n font-size: 15px;\n font-weight: 500;\n line-height: 22px;\n}\n\n.settings-update-panel {\n display: grid;\n gap: 16px;\n min-height: 128px;\n padding: 20px;\n color: var(--settings-text);\n background: var(--settings-panel);\n border: 1px solid var(--settings-border);\n border-radius: 8px;\n}\n\n.settings-update-panel > strong,\n.settings-update-panel > span,\n.settings-update-summary,\n.settings-update-error {\n margin: 0;\n overflow-wrap: anywhere;\n font-size: 13px;\n line-height: 20px;\n}\n\n.settings-update-panel > span,\n.settings-update-summary {\n color: var(--settings-muted);\n}\n\n.settings-update-error {\n color: #ef4444;\n}\n\n.settings-update-progress {\n width: 100%;\n height: 8px;\n accent-color: #238be8;\n}\n\n.settings-update-progress-detail {\n color: var(--settings-muted);\n font-size: 12px;\n line-height: 18px;\n}\n\n.settings-update-notes {\n display: grid;\n min-width: 0;\n gap: 12px;\n color: var(--settings-muted);\n font-size: 14px;\n line-height: 22px;\n overflow-wrap: anywhere;\n}\n\n.settings-update-notes > :first-child {\n margin-top: 0;\n}\n\n.settings-update-notes > :last-child {\n margin-bottom: 0;\n}\n\n.settings-update-notes h1,\n.settings-update-notes h2,\n.settings-update-notes h3,\n.settings-update-notes h4,\n.settings-update-notes h5,\n.settings-update-notes h6 {\n margin: 6px 0 0;\n color: var(--settings-text);\n font-weight: 600;\n}\n\n.settings-update-notes h1 {\n font-size: 18px;\n line-height: 26px;\n}\n\n.settings-update-notes h2 {\n font-size: 17px;\n line-height: 24px;\n}\n\n.settings-update-notes h3,\n.settings-update-notes h4,\n.settings-update-notes h5,\n.settings-update-notes h6 {\n font-size: 14px;\n line-height: 22px;\n}\n\n.settings-update-notes p,\n.settings-update-notes ul,\n.settings-update-notes ol,\n.settings-update-notes pre,\n.settings-update-notes blockquote {\n margin: 0;\n}\n\n.settings-update-notes ul,\n.settings-update-notes ol {\n padding-left: 24px;\n}\n\n.settings-update-notes li {\n padding-left: 4px;\n}\n\n.settings-update-notes li::marker {\n color: var(--settings-muted);\n font-size: 0.85em;\n}\n\n.settings-update-notes li + li {\n margin-top: 14px;\n}\n\n.settings-update-notes .release-note-translation {\n display: block;\n margin-top: 3px;\n color: var(--settings-muted);\n font-size: 13px;\n line-height: 20px;\n}\n\n.settings-update-notes blockquote {\n padding: 8px 12px;\n color: var(--settings-muted);\n border-left: 3px solid var(--settings-focus);\n background: rgb(255 255 255 / 4%);\n}\n\n.settings-update-notes hr {\n width: 100%;\n margin: 2px 0;\n border: 0;\n border-top: 1px solid var(--settings-divider);\n}\n\n.settings-update-notes strong {\n color: var(--settings-text);\n font-weight: 600;\n}\n\n.settings-update-notes a {\n color: #7cb8ff;\n text-decoration: none;\n}\n\n.settings-update-notes a:hover {\n text-decoration: underline;\n}\n\n.settings-update-notes code {\n font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;\n font-size: 12px;\n}\n\n.settings-update-notes :not(pre) > code {\n padding: 1px 5px;\n background: rgb(255 255 255 / 8%);\n border-radius: 4px;\n}\n\n.settings-update-notes pre {\n min-width: 0;\n max-width: 100%;\n padding: 10px 12px;\n overflow-x: auto;\n overflow-y: hidden;\n background: rgb(0 0 0 / 28%);\n border-radius: 6px;\n}\n\n.settings-update-notes pre code {\n line-height: 18px;\n white-space: pre-wrap;\n}\n\n.settings-update-version-row {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n align-items: center;\n gap: 20px;\n min-height: 32px;\n color: var(--settings-muted);\n font-size: 13px;\n}\n\n.settings-update-version-row strong {\n color: var(--settings-text);\n font-size: 15px;\n}\n\n.settings-update-manual {\n display: grid;\n min-width: 0;\n gap: 6px;\n margin-top: 14px;\n padding-inline: 4px;\n}\n\n.settings-update-manual[hidden] {\n display: none;\n}\n\n.settings-update-manual span {\n color: var(--settings-muted);\n font-size: 12px;\n line-height: 18px;\n}\n\n.settings-update-manual code {\n overflow-wrap: anywhere;\n color: var(--settings-text);\n font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;\n font-size: 12px;\n line-height: 18px;\n}\n\n.settings-update-actions {\n display: flex;\n min-width: 0;\n margin-top: 16px;\n}\n\n.settings-command-button,\n.settings-update-link {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n min-height: 36px;\n gap: 8px;\n padding: 8px 12px;\n color: white;\n font: inherit;\n font-size: 13px;\n text-decoration: none;\n background: #1677d2;\n border: 1px solid #238be8;\n border-radius: 6px;\n cursor: pointer;\n}\n\n.settings-command-button--secondary,\n.settings-update-link {\n color: var(--settings-text);\n background: transparent;\n border-color: var(--settings-border);\n}\n\n.settings-command-button:hover,\n.settings-update-link:hover {\n filter: brightness(1.08);\n}\n\n.settings-command-button:focus-visible,\n.settings-update-link:focus-visible {\n outline: 2px solid var(--settings-focus);\n outline-offset: 2px;\n}\n\n.codexhost-settings-icon {\n display: block;\n flex: none;\n stroke: currentColor;\n}\n\n@media (max-width: 720px) {\n .codexhost-settings-dialog {\n width: calc(100vw - 16px);\n height: calc(100vh - 16px);\n border-radius: 10px;\n }\n\n .settings-layout {\n grid-template-columns: minmax(0, 1fr);\n grid-template-rows: auto minmax(0, 1fr);\n }\n\n .settings-sidebar {\n border-right: 0;\n border-bottom: 1px solid var(--settings-border);\n }\n\n .settings-header {\n height: 56px;\n padding-inline: 14px;\n }\n\n .settings-icon-button.settings-star-link {\n width: 28px;\n padding: 0;\n }\n\n .settings-star-link span {\n display: none;\n }\n\n .settings-sidebar {\n padding-top: 20px;\n }\n\n .settings-nav {\n flex: none;\n flex-direction: row;\n gap: 4px;\n padding: 7px 8px 8px;\n overflow-x: auto;\n overflow-y: hidden;\n }\n\n .settings-nav-button {\n width: auto;\n min-width: max-content;\n min-height: 34px;\n grid-template-columns: 16px auto;\n border-radius: 10px;\n }\n\n .settings-page__content {\n width: calc(100% - 40px);\n }\n\n .settings-page__content {\n padding-top: 32px;\n padding-bottom: 32px;\n }\n\n .settings-section-label {\n padding-bottom: 20px;\n font-size: 20px;\n line-height: 26px;\n }\n\n .settings-status-row {\n grid-template-columns: minmax(0, 1fr) auto;\n gap: 16px;\n }\n\n .settings-status-row__detail {\n grid-column: 1 / -1;\n margin: -8px 0 0 58px;\n }\n}\n\n@media (forced-colors: active) {\n :host,\n :host([data-theme="dark"]) {\n --settings-bg: Canvas;\n --settings-sidebar: Canvas;\n --settings-panel: Canvas;\n --settings-text: CanvasText;\n --settings-muted: GrayText;\n --settings-border: ButtonBorder;\n --settings-divider: ButtonBorder;\n --settings-hover: Highlight;\n --settings-active: Highlight;\n --settings-focus: Highlight;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n *,\n *::before,\n *::after {\n scroll-behavior: auto !important;\n }\n}\n';
19340
19479
 
19341
19480
  // src/settings/shell.ts
19342
19481
  var SETTINGS_SHELL_ATTRIBUTE = "data-codexhost-settings-shell";
@@ -20120,8 +20259,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
20120
20259
  let applyAdapterAgent = null;
20121
20260
  let modelControl = null;
20122
20261
  let usageNotificationDispose = null;
20262
+ const localAgentForSidebarThread = (input) => {
20263
+ for (const mounted of mountedByComposer.values()) {
20264
+ const target = mounted.modelTarget;
20265
+ if (target?.[0] === "default" && input.draftId !== null && target[1] === input.draftId) {
20266
+ return controller.get(mounted.composer).agent;
20267
+ }
20268
+ if (target?.[0] === "conversation" && input.threadId !== null && target[1] === input.threadId && mounted.ownershipStatus === "ready") {
20269
+ return controller.get(mounted.composer).agent;
20270
+ }
20271
+ }
20272
+ return null;
20273
+ };
20123
20274
  const sidebarAgentIcons = installRendererSidebarAgentIcons({
20124
- getClient: () => modelControl
20275
+ getClient: () => modelControl,
20276
+ getLocalAgent: localAgentForSidebarThread
20125
20277
  });
20126
20278
  const settingsLifecycle = installRendererSettingsLifecycle(window, {
20127
20279
  getUpdateClient: () => modelControl
@@ -20137,6 +20289,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
20137
20289
  );
20138
20290
  let availabilityRequestGeneration = 0;
20139
20291
  let availabilityRequest = null;
20292
+ let availabilityRetryTimer = null;
20293
+ let availabilityRetryAttempt = 0;
20294
+ const availabilityRetryDelays = [500, 1e3, 2e3, 4e3, 8e3];
20140
20295
  const usageRefreshTimers = /* @__PURE__ */ new Map();
20141
20296
  const usageRefreshAttempts = /* @__PURE__ */ new Map();
20142
20297
  const isMountedComposer = (composer) => composer.isConnected && composer.matches(CODEX_COMPOSER_SELECTOR) && mountedByComposer.has(composer);
@@ -20309,6 +20464,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
20309
20464
  } finally {
20310
20465
  if (isCurrentOwnershipRequest(mounted, generation)) {
20311
20466
  renderMounted(mounted);
20467
+ sidebarAgentIcons.refresh();
20312
20468
  if (mounted.ownershipStatus !== "error" && shouldRetryExternalThreadUsage(
20313
20469
  controller.get(mounted.composer).agent,
20314
20470
  mounted.usage,
@@ -20354,6 +20510,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
20354
20510
  if (previousTarget?.[0] === "conversation") renderMounted(mounted);
20355
20511
  void loadThreadOwnership(mounted);
20356
20512
  }
20513
+ sidebarAgentIcons.refresh();
20357
20514
  return true;
20358
20515
  };
20359
20516
  const loadExternalCatalog = async (mounted) => {
@@ -20864,6 +21021,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
20864
21021
  mounted.modelView = { status: "idle" };
20865
21022
  mounted.permissionModeView = { status: "idle" };
20866
21023
  }
21024
+ sidebarAgentIcons.refresh();
20867
21025
  return switched;
20868
21026
  } catch {
20869
21027
  adapterStatus = {
@@ -20883,7 +21041,26 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
20883
21041
  const url2 = RENDERER_AGENT_INSTALL_URLS[agent];
20884
21042
  window.open(url2, "_blank", "noopener,noreferrer");
20885
21043
  };
20886
- const refreshHarnessAvailability = (refresh = false) => {
21044
+ const resetHarnessAvailabilityRetry = () => {
21045
+ if (availabilityRetryTimer !== null) {
21046
+ window.clearTimeout(availabilityRetryTimer);
21047
+ availabilityRetryTimer = null;
21048
+ }
21049
+ availabilityRetryAttempt = 0;
21050
+ };
21051
+ const scheduleHarnessAvailabilityRetry = () => {
21052
+ if (disposed || availabilityRetryTimer !== null || availabilityRetryAttempt >= availabilityRetryDelays.length) {
21053
+ return;
21054
+ }
21055
+ const delay = availabilityRetryDelays[availabilityRetryAttempt];
21056
+ availabilityRetryAttempt += 1;
21057
+ availabilityRetryTimer = window.setTimeout(() => {
21058
+ availabilityRetryTimer = null;
21059
+ void refreshHarnessAvailability(true, true);
21060
+ }, delay);
21061
+ };
21062
+ const refreshHarnessAvailability = (refresh = false, retry = false) => {
21063
+ if (!retry) resetHarnessAvailabilityRetry();
20887
21064
  if (!modelControl) return Promise.resolve();
20888
21065
  const client = modelControl;
20889
21066
  if (availabilityRequest?.client === client) return availabilityRequest.promise;
@@ -20925,6 +21102,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
20925
21102
  }
20926
21103
  })
20927
21104
  );
21105
+ if (externalAgents.every((agent) => harnessAvailability[agent] === "ready")) {
21106
+ resetHarnessAvailabilityRetry();
21107
+ } else {
21108
+ scheduleHarnessAvailabilityRetry();
21109
+ }
20928
21110
  })();
20929
21111
  const request = { client, promise: promise2 };
20930
21112
  availabilityRequest = request;
@@ -21003,6 +21185,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
21003
21185
  );
21004
21186
  }
21005
21187
  renderMounted(mounted);
21188
+ sidebarAgentIcons.refresh();
21006
21189
  if (threadIdFromComposerModelTarget(modelTarget) && !inherited) {
21007
21190
  void loadThreadOwnership(mounted);
21008
21191
  } else if (threadIdFromComposerModelTarget(modelTarget) && inherited && shouldRetryExternalThreadUsage(state.agent, mounted.usage, mounted.accountCredits)) {
@@ -21327,6 +21510,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
21327
21510
  document.removeEventListener("click", onClick, true);
21328
21511
  window.removeEventListener("codexhost:renderer-adapter-status", onAdapterStatus);
21329
21512
  window.removeEventListener("focus", onWindowFocus);
21513
+ resetHarnessAvailabilityRetry();
21330
21514
  for (const timer of usageRefreshTimers.values()) window.clearTimeout(timer);
21331
21515
  usageRefreshTimers.clear();
21332
21516
  for (const mounted of mountedByComposer.values()) {
package/bin/codexhost CHANGED
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codexhost/cli-darwin-arm64",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "Run Pi and Claude Code as first-class external harnesses inside Codex Desktop.",
5
5
  "type": "module",
6
6
  "files": [