@codexhost/cli-win32-arm64 0.9.2 → 0.10.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.
@@ -22,7 +22,8 @@
22
22
  "cursor-cli",
23
23
  "hermes",
24
24
  "qoder",
25
- "qoder-cn"
25
+ "qoder-cn",
26
+ "kimi-code"
26
27
  ];
27
28
  var DEFAULT_RENDERER_AGENTS = KNOWN_RENDERER_AGENTS;
28
29
  function defaultIdFactory(sequence) {
@@ -157,6 +158,8 @@
157
158
  else if (agent === "qoder") delete state.qoderModel;
158
159
  if (agent === "qoder-cn" && model) state.qoderCnModel = model;
159
160
  else if (agent === "qoder-cn") delete state.qoderCnModel;
161
+ if (agent === "kimi-code" && model) state.kimiCodeModel = model;
162
+ else if (agent === "kimi-code") delete state.kimiCodeModel;
160
163
  if (agent === "pi" && thinkingOptionId) state.piThinkingOptionId = thinkingOptionId;
161
164
  else if (agent === "pi") delete state.piThinkingOptionId;
162
165
  if (agent === "claude-code" && thinkingOptionId) {
@@ -187,6 +190,9 @@
187
190
  if (agent === "qoder-cn" && thinkingOptionId) {
188
191
  state.qoderCnThinkingOptionId = thinkingOptionId;
189
192
  } else if (agent === "qoder-cn") delete state.qoderCnThinkingOptionId;
193
+ if (agent === "kimi-code" && thinkingOptionId) {
194
+ state.kimiCodeThinkingOptionId = thinkingOptionId;
195
+ } else if (agent === "kimi-code") delete state.kimiCodeThinkingOptionId;
190
196
  if (agent !== "codex") {
191
197
  const permissionModeByAgent = {};
192
198
  for (const candidate of [
@@ -203,7 +209,8 @@
203
209
  "cursor-cli",
204
210
  "hermes",
205
211
  "qoder",
206
- "qoder-cn"
212
+ "qoder-cn",
213
+ "kimi-code"
207
214
  ]) {
208
215
  const current = state.permissionModeByAgent?.[candidate];
209
216
  if (candidate !== agent && current) permissionModeByAgent[candidate] = current;
@@ -233,6 +240,7 @@
233
240
  if (agent === "hermes") return state.hermesModel;
234
241
  if (agent === "qoder") return state.qoderModel;
235
242
  if (agent === "qoder-cn") return state.qoderCnModel;
243
+ if (agent === "kimi-code") return state.kimiCodeModel;
236
244
  return void 0;
237
245
  }
238
246
  thinkingOptionForAgent(composer, agent) {
@@ -248,6 +256,7 @@
248
256
  if (agent === "workbuddy") return state.workBuddyThinkingOptionId;
249
257
  if (agent === "qoder") return state.qoderThinkingOptionId;
250
258
  if (agent === "qoder-cn") return state.qoderCnThinkingOptionId;
259
+ if (agent === "kimi-code") return state.kimiCodeThinkingOptionId;
251
260
  return void 0;
252
261
  }
253
262
  permissionModeForAgent(composer, agent) {
@@ -277,6 +286,7 @@
277
286
  else if (agent === "hermes") state.hermesModel = model;
278
287
  else if (agent === "qoder") state.qoderModel = model;
279
288
  else if (agent === "qoder-cn") state.qoderCnModel = model;
289
+ else if (agent === "kimi-code") state.kimiCodeModel = model;
280
290
  else state.antigravityModel = model;
281
291
  return state;
282
292
  }
@@ -334,6 +344,10 @@
334
344
  state.qoderCnThinkingOptionId = thinkingOptionId;
335
345
  } else if (agent === "qoder-cn") {
336
346
  delete state.qoderCnThinkingOptionId;
347
+ } else if (agent === "kimi-code" && thinkingOptionId) {
348
+ state.kimiCodeThinkingOptionId = thinkingOptionId;
349
+ } else if (agent === "kimi-code") {
350
+ delete state.kimiCodeThinkingOptionId;
337
351
  }
338
352
  return state;
339
353
  }
@@ -15732,10 +15746,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15732
15746
  invocation: commandInvocationSchema,
15733
15747
  label: commandLabelSchema,
15734
15748
  description: commandDescriptionSchema.optional(),
15735
- argumentMode: external_exports.enum(["none", "text"])
15749
+ argumentMode: external_exports.enum(["none", "text"]),
15750
+ /**
15751
+ * Native distinction reported by the Harness. Omitted when the Harness does
15752
+ * not tell skills and commands apart; consumers treat that as "command".
15753
+ */
15754
+ kind: external_exports.enum(["command", "skill"]).optional()
15736
15755
  }).strict();
15737
15756
  var harnessCommandCatalogSchema = external_exports.object({
15738
- commands: external_exports.array(harnessCommandDescriptorSchema)
15757
+ commands: external_exports.array(harnessCommandDescriptorSchema),
15758
+ /**
15759
+ * `live` when the catalog includes what a native Session reports for its
15760
+ * workspace (custom commands, skills); `static` for Adapter built-ins only.
15761
+ * Omitted by Adapters; set by the Host on inspection results.
15762
+ */
15763
+ source: external_exports.enum(["live", "static"]).optional()
15739
15764
  }).strict().superRefine((catalog, context) => {
15740
15765
  const ids = /* @__PURE__ */ new Set();
15741
15766
  for (const [index, command] of catalog.commands.entries()) {
@@ -15749,7 +15774,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15749
15774
  ids.add(command.id);
15750
15775
  }
15751
15776
  });
15752
- var harnessCommandsInspectParamsSchema = external_exports.object({ harnessId: harnessIdSchema }).strict();
15777
+ var harnessCommandsInspectParamsSchema = external_exports.object({
15778
+ harnessId: harnessIdSchema,
15779
+ /** Workspace of a draft without a Thread, for its live catalog when known. */
15780
+ cwd: external_exports.string().min(1).optional()
15781
+ }).strict();
15753
15782
  var threadCommandsInspectParamsSchema = external_exports.object({
15754
15783
  threadId: hostThreadIdSchema
15755
15784
  }).strict();
@@ -15888,6 +15917,30 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15888
15917
  status: updateStatusSchema.nullable()
15889
15918
  });
15890
15919
 
15920
+ // ../shared-contracts/dist/delegation-mention.js
15921
+ var DELEGATION_MENTION_PATH_PREFIX = "subagent://codexhost.";
15922
+ var HARNESS_ID_PATTERN = /^[a-z0-9][a-z0-9-]*$/u;
15923
+ function delegationMentionPath(harnessId) {
15924
+ if (!HARNESS_ID_PATTERN.test(harnessId)) {
15925
+ throw new Error(`Invalid delegation mention Harness id: ${harnessId}`);
15926
+ }
15927
+ return `${DELEGATION_MENTION_PATH_PREFIX}${harnessId}`;
15928
+ }
15929
+ function sanitizeLabel(label) {
15930
+ const cleaned = label.replace(/[[\]()\n\r]+/gu, " ").replace(/\s+/gu, " ").trim();
15931
+ return cleaned.length > 0 ? cleaned : "agent";
15932
+ }
15933
+ function formatDelegationMentionLink(mention) {
15934
+ return `[@${sanitizeLabel(mention.label)}](${delegationMentionPath(mention.harnessId)})`;
15935
+ }
15936
+ var HARNESS_COMMAND_MENTION_PATH_PREFIX = "subagent://codexhost-command.";
15937
+ function harnessCommandMentionPath(invocation) {
15938
+ const name = invocation.trim().replace(/^\//u, "");
15939
+ if (!name || /\s/u.test(name))
15940
+ throw new Error(`Invalid Harness command: ${invocation}`);
15941
+ return `${HARNESS_COMMAND_MENTION_PATH_PREFIX}${encodeURIComponent(name).replace(/[()]/gu, (character) => `%${character.charCodeAt(0).toString(16).toUpperCase()}`)}`;
15942
+ }
15943
+
15891
15944
  // ../shared-contracts/dist/index.js
15892
15945
  var workspaceContractVersionSchema = external_exports.literal(WORKSPACE_CONTRACT_VERSION);
15893
15946
 
@@ -15997,6 +16050,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15997
16050
  return sharedStore;
15998
16051
  }
15999
16052
 
16053
+ // src/assets/kimi-agent.svg
16054
+ var kimi_agent_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40" fill="none">%0A <rect width="40" height="40" rx="10" fill="%23000000"/>%0A <path d="M31.6957 7.11414C32.8305 7.11414 33.7505 8.0341 33.7505 9.16893V9.16893C33.7505 10.3038 32.8305 11.2237 31.6957 11.2237L29.8826 11.2237C29.7491 11.2237 29.6409 11.1155 29.6409 10.982L29.6409 9.16893C29.6409 8.0341 30.5609 7.11414 31.6957 7.11414Z" fill="%231783FF"/>%0A <path d="M20.1757 19.0798L27.9302 11.3864C28.0761 11.2413 27.9939 10.9498 27.8056 10.9498H23.633C23.5877 10.9498 23.5438 10.9683 23.5084 11.0038L15.1533 19.2911C15.023 19.4192 14.8304 19.305 14.8304 19.0998V11.1951C14.8304 11.0593 14.7411 10.9498 14.6321 10.9498H11.7569C11.6478 10.9498 11.5586 11.0593 11.5586 11.1951V28.2387C11.5586 28.3745 11.6478 28.484 11.7569 28.484H14.6321C14.7411 28.484 14.8304 28.3745 14.8304 28.2387V24.7661C14.8304 24.6921 14.8573 24.6211 14.904 24.5748L17.4945 22.0047C17.5568 21.943 17.6432 21.9337 17.7126 21.98L24.6414 27.0786C25.7759 27.8423 27.0436 28.3112 28.331 28.4501C28.4458 28.4624 28.5449 28.3483 28.5449 28.2048V24.9343C28.5449 24.8093 28.4698 24.7075 28.3693 24.6921C27.6115 24.5733 26.8722 24.2802 26.2037 23.8297L20.2054 19.487C20.0808 19.4037 20.0652 19.1893 20.1757 19.0798Z" fill="%23FFFFFF"/>%0A</svg>%0A';
16055
+
16000
16056
  // src/assets/codex-agent.png
16001
16057
  var codex_agent_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGgAAABoCAYAAAAdHLWhAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAAJnFJREFUeAHtfQuYFdWV7tpVdc7pprvpppvuhm4ejQ9AQQFFUEEUfAUVH4k448TRuT4y0UnumGiSm0y8YuZO8jlXRx0fMXGi5rtqfIyj8YWiKCoEQcGAgAEabZAG+km/+/Q5VXvfvXftvWtV9ek3oM7X6/uqq07Vrl1V699rrX+vvasaYFiGZViGZViGZViGZViG5VAKUUs3YYyRPs77byNftYfRoDCxLFu2zHrr/ZEV444Zd9KMU046c0Qia+LY8lETxx41ojDZBJ07d1Y3Upr4/NNNm/+8v7ltbePW97atWnV3faQuCl9j+aoAJO7D4osnfpz3rbumXvY3139/2nEjLystJmNLcgEcruYEL+F2AaRdBhYhEIurE7IAmjoB2rvA27ItvW3NB5UPH9j8zBNPPnlHS7Tur5t8FQCywW/l7Lqb18775lWz758xxZmVx23IdoEdqALYvYeR2gYG7a0WpDhAHi9NuMpj/MxEgkFBPsDYMYSOmwRQOBqsZAKgsh68lSv3/8d/PXH/P61f+asGf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/8zyuYW1tHLFdMCOoP6YA+yqDjmjk6FtCSkjSbtTBmt3W1c8vJFZZzxMGR9wZfnuDw3lc5oZz0dT88cPbYo0vfqlxPYe8uSLd1WDFRgWX3DYKpLML0hGj6L3bnZUNqwmQanzbfoutWrz/3hf+Y+zYcYbeG5csEaKAilXTa0n8rPO/cH7yZrIGTdm6itLbGYu0dYIuevhWZS9CbmHEg8CN+Tja4xWOZddwpnMDE2MZ333hq4brlV7XAlwiOkK8TQELU+9FAl9667cLpk4/7bfN+KNu/E6C+htHWNkKSKU42aNC97yknKGbEikns+XlA84uYJTqgiVGsZuum1dc8//CCN3Qx+BLcWvRev24SUtyV39+0pHzCsXfk5GTPauHssKGGQWsjYZ1JIGIypP6Yhuwo22ICv/xHVCyvAEh+KUBBGTCbuB99uP79O179/aJX1TUO+bDBYOXrCJCWEDucNe/OsqOOn3Hh6DFzLiguGXUSTUGhzSCLCmWLORM+rB4vnWRxVt/U3PnnlprNr1ZVvvPi+8t/VqfqxBN6vxLydQZISzd2KOTkk5eMyCu7ckSnW5/lxDpzWJq4+bkVLU1717atXXtPEpXXZKW/pGVYhij9bXT/HRrnsAzLsAzLsAzLsAzLsHwl5f8DGzhXq3EeY8wAAAAASUVORK5CYII=";
16002
16058
 
@@ -16046,7 +16102,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16046
16102
  "cursor-cli": "Cursor CLI (Experimental)",
16047
16103
  hermes: "Hermes",
16048
16104
  qoder: "Qoder",
16049
- "qoder-cn": "Qoder CN"
16105
+ "qoder-cn": "Qoder CN",
16106
+ "kimi-code": "Kimi Code"
16050
16107
  };
16051
16108
  var PI_PATHS = [
16052
16109
  {
@@ -16122,9 +16179,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16122
16179
  image.style.flex = "none";
16123
16180
  return image;
16124
16181
  }
16125
- if (agent === "antigravity" || agent === "kiro-cli" || agent === "codebuddy" || agent === "workbuddy" || agent === "cursor-cli") {
16182
+ if (agent === "antigravity" || agent === "kiro-cli" || agent === "codebuddy" || agent === "workbuddy" || agent === "cursor-cli" || agent === "kimi-code") {
16126
16183
  const image = ownerDocument.createElement("img");
16127
- image.src = agent === "codebuddy" ? codebuddy_agent_default : agent === "workbuddy" ? workbuddy_agent_default : agent === "cursor-cli" ? cursor_agent_default : agent === "kiro-cli" ? kiro_agent_default : antigravity_agent_default;
16184
+ image.src = agent === "kimi-code" ? kimi_agent_default : agent === "codebuddy" ? codebuddy_agent_default : agent === "workbuddy" ? workbuddy_agent_default : agent === "cursor-cli" ? cursor_agent_default : agent === "kiro-cli" ? kiro_agent_default : antigravity_agent_default;
16128
16185
  image.alt = "";
16129
16186
  image.draggable = false;
16130
16187
  image.style.width = `${size}px`;
@@ -16481,6 +16538,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16481
16538
  "settings",
16482
16539
  "close",
16483
16540
  "star",
16541
+ "github",
16484
16542
  "language",
16485
16543
  "connections",
16486
16544
  "accounts",
@@ -16517,6 +16575,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16517
16575
  settings: Settings,
16518
16576
  close: X,
16519
16577
  star: Star,
16578
+ github: [
16579
+ [
16580
+ "path",
16581
+ {
16582
+ fill: "currentColor",
16583
+ stroke: "none",
16584
+ d: "M12 .297C5.37.297 0 5.67 0 12.297c0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.043-1.61-4.043-1.61-.546-1.387-1.333-1.756-1.333-1.756-1.09-.745.083-.729.083-.729 1.205.084 1.838 1.237 1.838 1.237 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.467-1.334-5.467-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23a11.5 11.5 0 0 1 3-.405c1.02.005 2.045.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"
16585
+ }
16586
+ ]
16587
+ ],
16520
16588
  language: Languages,
16521
16589
  connections: PlugZap,
16522
16590
  accounts: Users,
@@ -16805,6 +16873,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16805
16873
  "irm https://static.qoder.com.cn/qoder-cli-cn/install.ps1 | iex"
16806
16874
  ),
16807
16875
  after: start("qoderclicn")
16876
+ },
16877
+ "kimi-code": {
16878
+ url: "https://moonshotai.github.io/kimi-code/en/guides/getting-started.html",
16879
+ commands: shells(
16880
+ "curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash",
16881
+ "irm https://code.kimi.com/kimi-code/install.ps1 | iex"
16882
+ ),
16883
+ before: ["On Windows, install Git for Windows first.", "Windows \u8BF7\u5148\u5B89\u88C5 Git for Windows\u3002"],
16884
+ after: start("kimi")
16808
16885
  }
16809
16886
  };
16810
16887
  function harnessInstallationGuide(agent, locale) {
@@ -17132,6 +17209,12 @@ ${error51.stderrTail}`] : []
17132
17209
  inspector.replaceChildren(createInspectorHeader(document2, item, messages));
17133
17210
  const body = document2.createElement("div");
17134
17211
  body.className = "settings-connection-inspector__body";
17212
+ if (item.agentSnapshot?.agent === "deepseek-harness") {
17213
+ const compatibility = document2.createElement("p");
17214
+ compatibility.className = "settings-connection-compatibility";
17215
+ compatibility.textContent = messages.connectionDeepSeekTestedVersions;
17216
+ body.append(compatibility);
17217
+ }
17135
17218
  if (item.agentSnapshot?.availability === "notInstalled") {
17136
17219
  const callout = document2.createElement("div");
17137
17220
  callout.className = "settings-connection-install-callout";
@@ -17745,7 +17828,7 @@ ${error51.stderrTail}`] : []
17745
17828
  locale: "en",
17746
17829
  title: "Settings",
17747
17830
  close: "Close settings",
17748
- starOnGitHub: "Give us a Star~",
17831
+ starOnGitHub: "Star to support",
17749
17832
  sectionsLabel: "Settings sections",
17750
17833
  generalSection: "General",
17751
17834
  otherSection: "Other",
@@ -17904,6 +17987,7 @@ ${error51.stderrTail}`] : []
17904
17987
  launchPathSaveError: "Could not save. Enter an existing absolute installation folder on this Host and check configuration permissions.",
17905
17988
  connectionOpenInstallation: "Show installation instructions",
17906
17989
  connectionOpenHarnessWeb: "Open DeepSeek Harness Web",
17990
+ connectionDeepSeekTestedVersions: "Supported DSH versions: 0.1.2-rc.1, 0.1.5-rc.1, 0.1.5-rc.2, 0.1.5-rc.3, 0.1.7-rc.1 and 0.1.7-rc.2. Other versions may connect after native protocol checks, but are not listed as supported.",
17907
17991
  connectionInstall: "Install",
17908
17992
  connectionInstallDescription: "This Harness was not detected.",
17909
17993
  connectionErrorTitle: "Connection check failed",
@@ -17944,7 +18028,8 @@ ${error51.stderrTail}`] : []
17944
18028
  updateWaitingForExit: "Waiting for the application to close...",
17945
18029
  updateInstalling: "Installing update...",
17946
18030
  updateInstallingNpm: "Installing update through npm...",
17947
- updateRequestTimeout: "The update service did not respond. Try again.",
18031
+ updateRequestTimeout: "The update service did not respond. Download the latest version from GitHub Releases below.",
18032
+ updateServiceUnavailable: "Automatic updates are unavailable right now. Download the latest version from GitHub Releases below.",
17948
18033
  updateRestarting: "Restarting to finish the update...",
17949
18034
  updateSucceeded: "Update installed successfully.",
17950
18035
  updateFailed: "Update failed.",
@@ -17959,6 +18044,8 @@ ${error51.stderrTail}`] : []
17959
18044
  updateCopyFailed: "Copy failed",
17960
18045
  updateDownloadFromReleases: "Download from GitHub Releases",
17961
18046
  updateDownloadWindowsInstaller: "Download Windows installer",
18047
+ updateStarCallout: "If CodexHost has helped you, please Star it on GitHub. It means a lot to us \u{1F449}",
18048
+ updateStarLink: "GitHub",
17962
18049
  aboutTagline: "Run Pi and other Harnesses in Codex Desktop",
17963
18050
  aboutParagraphs: Object.freeze([
17964
18051
  "We believe Codex Desktop offers the best desktop development experience available today.",
@@ -17982,7 +18069,7 @@ ${error51.stderrTail}`] : []
17982
18069
  locale: "zh-CN",
17983
18070
  title: "\u8BBE\u7F6E",
17984
18071
  close: "\u5173\u95ED\u8BBE\u7F6E",
17985
- starOnGitHub: "\u70B9\u4E2A Star~",
18072
+ starOnGitHub: "Star \u652F\u6301",
17986
18073
  sectionsLabel: "\u8BBE\u7F6E\u5206\u7C7B",
17987
18074
  generalSection: "\u901A\u7528",
17988
18075
  otherSection: "\u5176\u4ED6",
@@ -18141,6 +18228,7 @@ ${error51.stderrTail}`] : []
18141
18228
  launchPathSaveError: "\u4FDD\u5B58\u5931\u8D25\u3002\u8BF7\u586B\u5199\u6B64 Host \u4E0A\u5B9E\u9645\u5B58\u5728\u7684\u5B89\u88C5\u76EE\u5F55\u7EDD\u5BF9\u8DEF\u5F84\uFF0C\u5E76\u786E\u8BA4\u914D\u7F6E\u76EE\u5F55\u53EF\u5199\u3002",
18142
18229
  connectionOpenInstallation: "\u67E5\u770B\u5B89\u88C5\u6307\u5F15",
18143
18230
  connectionOpenHarnessWeb: "\u6253\u5F00 DeepSeek Harness Web",
18231
+ connectionDeepSeekTestedVersions: "\u652F\u6301 DSH \u7248\u672C\uFF1A0.1.2-rc.1\u30010.1.5-rc.1\u30010.1.5-rc.2\u30010.1.5-rc.3\u30010.1.7-rc.1 \u548C 0.1.7-rc.2\u3002\u5176\u4ED6\u7248\u672C\u53EF\u4EE5\u5728\u901A\u8FC7\u539F\u751F\u534F\u8BAE\u68C0\u67E5\u540E\u5C1D\u8BD5\u8FDE\u63A5\uFF0C\u4F46\u5C1A\u672A\u5217\u5165\u652F\u6301\u5217\u8868\u3002",
18144
18232
  connectionInstall: "\u5B89\u88C5",
18145
18233
  connectionInstallDescription: "\u5C1A\u672A\u68C0\u6D4B\u5230\u8BE5 Harness\u3002",
18146
18234
  connectionErrorTitle: "\u8FDE\u63A5\u68C0\u67E5\u5931\u8D25",
@@ -18181,7 +18269,8 @@ ${error51.stderrTail}`] : []
18181
18269
  updateWaitingForExit: "\u6B63\u5728\u7B49\u5F85\u5E94\u7528\u9000\u51FA...",
18182
18270
  updateInstalling: "\u6B63\u5728\u5B89\u88C5\u66F4\u65B0...",
18183
18271
  updateInstallingNpm: "\u6B63\u5728\u901A\u8FC7 npm \u5B89\u88C5...",
18184
- updateRequestTimeout: "\u66F4\u65B0\u670D\u52A1\u672A\u54CD\u5E94\uFF0C\u8BF7\u91CD\u8BD5\u3002",
18272
+ updateRequestTimeout: "\u66F4\u65B0\u670D\u52A1\u672A\u54CD\u5E94\uFF0C\u8BF7\u901A\u8FC7\u4E0B\u65B9 GitHub Releases \u624B\u52A8\u4E0B\u8F7D\u6700\u65B0\u7248\u672C\u3002",
18273
+ updateServiceUnavailable: "\u6682\u65F6\u65E0\u6CD5\u81EA\u52A8\u66F4\u65B0\uFF0C\u8BF7\u901A\u8FC7\u4E0B\u65B9 GitHub Releases \u624B\u52A8\u4E0B\u8F7D\u6700\u65B0\u7248\u672C\u3002",
18185
18274
  updateRestarting: "\u6B63\u5728\u91CD\u542F\u4EE5\u5B8C\u6210\u66F4\u65B0...",
18186
18275
  updateSucceeded: "\u66F4\u65B0\u5B89\u88C5\u6210\u529F\u3002",
18187
18276
  updateFailed: "\u66F4\u65B0\u5931\u8D25\u3002",
@@ -18196,6 +18285,8 @@ ${error51.stderrTail}`] : []
18196
18285
  updateCopyFailed: "\u590D\u5236\u5931\u8D25",
18197
18286
  updateDownloadFromReleases: "\u524D\u5F80 GitHub Releases \u4E0B\u8F7D",
18198
18287
  updateDownloadWindowsInstaller: "\u4E0B\u8F7D Windows \u5B89\u88C5\u5305",
18288
+ updateStarCallout: "\u5982\u679C CodexHost \u5E2E\u5230\u4E86\u4F60\uFF0C\u8BF7\u5728 GitHub \u70B9\u4E2A Star\uFF0C\u8FD9\u5BF9\u6211\u4EEC\u610F\u4E49\u91CD\u5927 \u{1F449}",
18289
+ updateStarLink: "GitHub",
18199
18290
  aboutTagline: "\u5728 Codex Desktop \u4E2D\u8FD0\u884C Pi \u548C\u5176\u4ED6 Harness",
18200
18291
  aboutParagraphs: Object.freeze([
18201
18292
  "\u6211\u4EEC\u8BA4\u4E3A Codex Desktop \u63D0\u4F9B\u4E86\u76EE\u524D\u6700\u597D\u7684\u684C\u9762\u5F00\u53D1\u4EA4\u4E92\u4F53\u9A8C\u3002",
@@ -18264,7 +18355,8 @@ ${error51.stderrTail}`] : []
18264
18355
  "cursor-cli": "https://cursor.com/docs/cli/installation",
18265
18356
  hermes: "https://hermes-agent.nousresearch.com/docs",
18266
18357
  qoder: "https://docs.qoder.com/",
18267
- "qoder-cn": "https://docs.qoder.cn/"
18358
+ "qoder-cn": "https://docs.qoder.cn/",
18359
+ "kimi-code": "https://moonshotai.github.io/kimi-code/en/guides/getting-started.html"
18268
18360
  };
18269
18361
  var CONTROL_ATTRIBUTE = "data-codexhost-agent-control";
18270
18362
  var AGENT_MENU_WIDTH = 224;
@@ -19687,26 +19779,30 @@ ${error51.stderrTail}`] : []
19687
19779
  harnessCommands: "Harness commands",
19688
19780
  commandsUnavailable: "No Harness commands available yet",
19689
19781
  commandRequiresConversation: "Start a conversation before running this command",
19782
+ commandMenuHint: "Type # for commands, skills and agents",
19690
19783
  textArgument: "Text",
19691
19784
  permissionMode: "Permission mode",
19692
19785
  permissions: "Permissions",
19693
19786
  loadingPermissions: "Loading permissions...",
19694
19787
  selecting: "Selecting...",
19695
19788
  permissionsUnavailable: "Permissions unavailable",
19696
- permissionModeFixedAtCreate: "Grok fixes its Permission Mode when the Session is created. Start a new Thread to change it."
19789
+ permissionModeFixedAtCreate: "Grok fixes its Permission Mode when the Session is created. Start a new Thread to change it.",
19790
+ codexUsageGateUnavailable: "Could not separate this Harness from the Codex usage limit in this Desktop version. Codex usage limits still apply to sending."
19697
19791
  });
19698
19792
  var CHINESE_HARNESS_MESSAGES = Object.freeze({
19699
19793
  commands: "\u547D\u4EE4",
19700
19794
  harnessCommands: "Harness \u547D\u4EE4",
19701
19795
  commandsUnavailable: "\u6682\u65E0\u53EF\u7528\u7684 Harness \u547D\u4EE4",
19702
19796
  commandRequiresConversation: "\u8BF7\u5148\u5F00\u59CB\u5BF9\u8BDD\uFF0C\u518D\u6267\u884C\u6B64\u547D\u4EE4",
19797
+ commandMenuHint: "\u8F93\u5165 # \u6253\u5F00\u547D\u4EE4\u3001\u6280\u80FD\u548C Agent",
19703
19798
  textArgument: "\u6587\u672C",
19704
19799
  permissionMode: "\u6743\u9650\u6A21\u5F0F",
19705
19800
  permissions: "\u6743\u9650",
19706
19801
  loadingPermissions: "\u6B63\u5728\u52A0\u8F7D\u6743\u9650...",
19707
19802
  selecting: "\u6B63\u5728\u9009\u62E9...",
19708
19803
  permissionsUnavailable: "\u6743\u9650\u4E0D\u53EF\u7528",
19709
- permissionModeFixedAtCreate: "Grok \u7684\u6743\u9650\u6A21\u5F0F\u5728\u4F1A\u8BDD\u521B\u5EFA\u65F6\u786E\u5B9A\uFF0C\u5982\u9700\u66F4\u6539\u8BF7\u65B0\u5EFA\u4F1A\u8BDD"
19804
+ permissionModeFixedAtCreate: "Grok \u7684\u6743\u9650\u6A21\u5F0F\u5728\u4F1A\u8BDD\u521B\u5EFA\u65F6\u786E\u5B9A\uFF0C\u5982\u9700\u66F4\u6539\u8BF7\u65B0\u5EFA\u4F1A\u8BDD",
19805
+ codexUsageGateUnavailable: "\u5F53\u524D Desktop \u7248\u672C\u65E0\u6CD5\u5C06\u6B64 Harness \u4E0E Codex \u989D\u5EA6\u9650\u5236\u5206\u79BB\uFF0C\u53D1\u9001\u4ECD\u53D7 Codex \u989D\u5EA6\u9650\u5236"
19710
19806
  });
19711
19807
  var ENGLISH_PERMISSION_MODE_LABELS = /* @__PURE__ */ new Map([
19712
19808
  ["read-only", "Read only"],
@@ -19825,6 +19921,10 @@ ${error51.stderrTail}`] : []
19825
19921
  description: mode.description === void 0 ? void 0 : CHINESE_PERMISSION_MODE_DESCRIPTIONS.get(mode.description) ?? mode.description
19826
19922
  };
19827
19923
  }
19924
+ function rendererLiveCommandsPendingNotice(locale, harnessLabel) {
19925
+ const harness = harnessLabel.replace(/\s*[((][^))]*[))]\s*$/u, "").trim() || harnessLabel;
19926
+ return locale === "zh-CN" ? `\u53D1\u9001\u4E00\u6761\u6D88\u606F\u540E\uFF0C\u4F1A\u52A0\u8F7D ${harness} \u5728\u5F53\u524D\u9879\u76EE\u7684\u5168\u90E8\u547D\u4EE4\u548C\u6280\u80FD` : `Send a message to load all ${harness} commands and skills for this project`;
19927
+ }
19828
19928
 
19829
19929
  // src/renderer-permission-mode-picker.ts
19830
19930
  var MENU_CLASSES2 = "fixed z-50 overflow-hidden rounded-lg bg-token-dropdown-background/95 text-token-foreground shadow-lg ring-[0.5px] ring-token-border backdrop-blur-xl";
@@ -20907,71 +21007,15 @@ ${error51.stderrTail}`] : []
20907
21007
  return true;
20908
21008
  }
20909
21009
 
20910
- // src/renderer-harness-command-claim.ts
20911
- function inputEvent(editor, text) {
20912
- const view = editor.ownerDocument.defaultView;
20913
- return view?.InputEvent ? new view.InputEvent("input", {
20914
- bubbles: true,
20915
- composed: true,
20916
- data: text,
20917
- inputType: "insertText"
20918
- }) : new (view?.Event ?? Event)("input", { bubbles: true, composed: true });
20919
- }
20920
- function prependTextarea(editor, prefix) {
20921
- const view = editor.ownerDocument.defaultView;
20922
- if (!view || !(editor instanceof view.HTMLTextAreaElement)) return false;
20923
- const setter = Object.getOwnPropertyDescriptor(view.HTMLTextAreaElement.prototype, "value")?.set;
20924
- if (!setter) return false;
20925
- const start2 = editor.selectionStart;
20926
- const end = editor.selectionEnd;
20927
- setter.call(editor, prefix + editor.value);
20928
- editor.dispatchEvent(inputEvent(editor, prefix));
20929
- editor.focus({ preventScroll: true });
20930
- if (start2 !== null && end !== null) {
20931
- editor.setSelectionRange(start2 + prefix.length, end + prefix.length);
20932
- }
20933
- return true;
20934
- }
20935
- function prependContentEditable(editor, prefix) {
20936
- if (editor.getAttribute("contenteditable") !== "true") return false;
20937
- const document2 = editor.ownerDocument;
20938
- const selection = document2.getSelection();
20939
- if (!selection || typeof document2.execCommand !== "function") return false;
20940
- const range = document2.createRange();
20941
- range.selectNodeContents(editor);
20942
- range.collapse(true);
20943
- editor.focus({ preventScroll: true });
20944
- selection.removeAllRanges();
20945
- selection.addRange(range);
20946
- return document2.execCommand("insertText", false, prefix);
20947
- }
20948
- function prependEditor(editor, prefix) {
20949
- return prependTextarea(editor, prefix) || prependContentEditable(editor, prefix);
20950
- }
20951
- function rendererHarnessCommandExecutesDirectly(command) {
20952
- return command.invocation === "/compact" || command.argumentMode === "none";
20953
- }
20954
- function routeRendererHarnessCommandSelection(editor, command, execute) {
20955
- if (rendererHarnessCommandExecutesDirectly(command)) {
20956
- execute();
20957
- return true;
20958
- }
20959
- return editor !== null && prependEditor(editor, `${command.invocation} `);
20960
- }
20961
-
20962
21010
  // src/renderer-harness-command-control.ts
20963
21011
  var CONTROL_ATTRIBUTE2 = "data-codexhost-harness-command-control";
20964
- var MENU_ATTRIBUTE = "data-codexhost-harness-command-menu";
20965
- var MENU_WIDTH = 320;
20966
- var VIEWPORT_MARGIN = 8;
20967
- var MENU_GAP2 = 8;
20968
21012
  var SVG_NS2 = "http://www.w3.org/2000/svg";
20969
21013
  var COMMAND_ICON_PATHS = [
20970
21014
  "M409.6 377.6h204.8a32 32 0 0 1 32 32v204.8a32 32 0 0 1-32 32H409.6a32 32 0 0 1-32-32V409.6a32 32 0 0 1 32-32z m172.8 64h-140.8v140.8h140.8z",
20971
21015
  "M332.8 800a108.8 108.8 0 0 1 0-217.6h76.8a32 32 0 0 1 32 32v76.8a108.928 108.928 0 0 1-108.8 108.8z m0-153.6a44.8 44.8 0 1 0 44.8 44.8v-44.8zM409.6 441.6H332.8a108.8 108.8 0 1 1 108.8-108.8v76.8a32 32 0 0 1-32 32z m-76.8-153.6a44.8 44.8 0 0 0 0 89.6h44.8V332.8A44.842667 44.842667 0 0 0 332.8 288zM691.2 441.6h-76.8a32 32 0 0 1-32-32V332.8a108.8 108.8 0 1 1 108.8 108.8z m-44.8-64h44.8a44.8 44.8 0 1 0-44.8-44.8zM691.2 800a108.928 108.928 0 0 1-108.8-108.8v-76.8a32 32 0 0 1 32-32h76.8a108.8 108.8 0 0 1 0 217.6z m-44.8-153.6v44.8a44.8 44.8 0 1 0 44.8-44.8z",
20972
21016
  "M640 970.666667H384c-118.186667 0-198.272-25.002667-251.946667-78.72S53.333333 758.186667 53.333333 640V384c0-118.186667 25.002667-198.272 78.72-251.946667S265.813333 53.333333 384 53.333333h256c118.186667 0 198.272 25.002667 251.946667 78.72S970.666667 265.813333 970.666667 384v256c0 118.186667-25.002667 198.272-78.72 251.946667S758.186667 970.666667 640 970.666667z m-256-853.333334c-100.096 0-165.802667 19.2-206.72 59.946667S117.333333 283.904 117.333333 384v256c0 100.096 19.072 165.802667 59.946667 206.72S283.904 906.666667 384 906.666667h256c100.096 0 165.802667-19.072 206.72-59.946667S906.666667 740.096 906.666667 640V384c0-100.096-19.072-165.802667-59.946667-206.72S740.096 117.333333 640 117.333333z"
20973
21017
  ];
20974
- function commandIcon(ownerDocument) {
21018
+ function createHarnessCommandIcon(ownerDocument) {
20975
21019
  const svg = ownerDocument.createElementNS(SVG_NS2, "svg");
20976
21020
  svg.setAttribute("viewBox", "0 0 1024 1024");
20977
21021
  svg.setAttribute("width", "15");
@@ -20985,85 +21029,25 @@ ${error51.stderrTail}`] : []
20985
21029
  }
20986
21030
  return svg;
20987
21031
  }
20988
- function menuItem(ownerDocument, command, locale, messages, onSelect, disabledReason) {
20989
- const presentation = rendererHarnessCommandPresentation(command, locale);
20990
- const item = ownerDocument.createElement("button");
20991
- item.type = "button";
20992
- if (disabledReason) {
20993
- item.disabled = true;
20994
- item.title = disabledReason;
20995
- item.style.opacity = "0.5";
20996
- }
20997
- item.setAttribute("role", "menuitem");
20998
- item.setAttribute("data-command-id", command.id);
20999
- item.setAttribute("aria-label", `${command.invocation} ${presentation.label}`);
21000
- item.style.display = "flex";
21001
- item.style.alignItems = "center";
21002
- item.style.width = "100%";
21003
- item.style.minHeight = "38px";
21004
- item.style.gap = "8px";
21005
- item.style.padding = "6px 8px";
21006
- item.style.border = "0";
21007
- item.style.borderRadius = "6px";
21008
- item.style.background = "transparent";
21009
- item.style.color = "inherit";
21010
- item.style.textAlign = "left";
21011
- item.style.cursor = "pointer";
21012
- const updateHighlight = (active) => {
21013
- item.style.background = active ? "rgba(127, 127, 127, 0.12)" : "transparent";
21014
- };
21015
- item.addEventListener("pointerenter", () => updateHighlight(true));
21016
- item.addEventListener("pointerleave", () => updateHighlight(false));
21017
- item.addEventListener("focus", () => updateHighlight(true));
21018
- item.addEventListener("blur", () => updateHighlight(false));
21019
- item.addEventListener("click", onSelect);
21020
- const copy = ownerDocument.createElement("span");
21021
- copy.style.display = "flex";
21022
- copy.style.flexDirection = "column";
21023
- copy.style.minWidth = "0";
21024
- copy.style.flex = "1 1 auto";
21025
- const title = ownerDocument.createElement("span");
21026
- title.textContent = command.invocation;
21027
- title.style.font = "600 13px/18px system-ui, sans-serif";
21028
- title.style.whiteSpace = "nowrap";
21029
- const description = ownerDocument.createElement("span");
21030
- description.textContent = disabledReason ?? presentation.description;
21031
- description.style.overflow = "hidden";
21032
- description.style.color = "rgba(127, 127, 127, 0.9)";
21033
- description.style.font = "400 11px/16px system-ui, sans-serif";
21034
- description.style.textOverflow = "ellipsis";
21035
- description.style.whiteSpace = "nowrap";
21036
- const hint = ownerDocument.createElement("span");
21037
- hint.textContent = rendererHarnessCommandExecutesDirectly(command) ? "\u21B5" : messages.textArgument;
21038
- hint.style.flex = "0 0 auto";
21039
- hint.style.color = "rgba(127, 127, 127, 0.75)";
21040
- hint.style.font = "400 11px/16px ui-monospace, SFMono-Regular, Menlo, monospace";
21041
- copy.append(title, description);
21042
- item.append(copy, hint);
21043
- return item;
21044
- }
21045
- function clamp(value, minimum, maximum) {
21046
- return Math.max(minimum, Math.min(value, maximum));
21047
- }
21048
- function setButtonClass(button) {
21049
- button.style.display = "inline-flex";
21050
- button.style.alignItems = "center";
21051
- button.style.justifyContent = "center";
21052
- button.style.gap = "0";
21053
- button.style.width = "28px";
21054
- button.style.height = "28px";
21055
- button.style.padding = "0";
21056
- button.style.border = "0";
21057
- button.style.borderRadius = "8px";
21058
- button.style.background = "transparent";
21059
- button.style.color = "inherit";
21060
- button.style.cursor = "pointer";
21061
- button.style.whiteSpace = "nowrap";
21062
- }
21063
- function mountRendererHarnessCommandControl(parent, insertBefore, onCommandSelected, initialLocale = "en") {
21032
+ function styleButton(button) {
21033
+ Object.assign(button.style, {
21034
+ display: "inline-flex",
21035
+ alignItems: "center",
21036
+ justifyContent: "center",
21037
+ width: "28px",
21038
+ height: "28px",
21039
+ padding: "0",
21040
+ border: "0",
21041
+ borderRadius: "8px",
21042
+ background: "transparent",
21043
+ color: "inherit",
21044
+ cursor: "pointer"
21045
+ });
21046
+ }
21047
+ function mountRendererHarnessCommandControl(parent, insertBefore, onOpenMenu, initialLocale = "en") {
21064
21048
  const ownerDocument = parent.ownerDocument;
21049
+ let messages = rendererHarnessMessages(initialLocale);
21065
21050
  let locale = initialLocale;
21066
- let messages = rendererHarnessMessages(locale);
21067
21051
  const root = ownerDocument.createElement("div");
21068
21052
  root.setAttribute(CONTROL_ATTRIBUTE2, "true");
21069
21053
  root.style.display = "inline-flex";
@@ -21071,190 +21055,39 @@ ${error51.stderrTail}`] : []
21071
21055
  root.style.minWidth = "0";
21072
21056
  const trigger = ownerDocument.createElement("button");
21073
21057
  trigger.type = "button";
21074
- trigger.setAttribute("aria-haspopup", "menu");
21075
- trigger.setAttribute("aria-expanded", "false");
21076
- trigger.setAttribute("aria-label", messages.harnessCommands);
21077
- trigger.title = messages.harnessCommands;
21078
- setButtonClass(trigger);
21079
- trigger.append(commandIcon(ownerDocument));
21058
+ styleButton(trigger);
21059
+ trigger.append(createHarnessCommandIcon(ownerDocument));
21080
21060
  root.append(trigger);
21081
- const menu = ownerDocument.createElement("div");
21082
- menu.setAttribute(MENU_ATTRIBUTE, "true");
21083
- menu.setAttribute("role", "menu");
21084
- menu.setAttribute("aria-label", messages.harnessCommands);
21085
- menu.hidden = true;
21086
- menu.style.position = "fixed";
21087
- menu.style.inset = "auto";
21088
- menu.style.zIndex = "2147483647";
21089
- menu.style.width = `${MENU_WIDTH}px`;
21090
- menu.style.maxWidth = `calc(100vw - ${VIEWPORT_MARGIN * 2}px)`;
21091
- menu.style.maxHeight = "min(360px, calc(100vh - 16px))";
21092
- menu.style.overflowY = "auto";
21093
- menu.style.padding = "4px";
21094
- menu.style.border = "1px solid rgba(127, 127, 127, 0.24)";
21095
- menu.style.borderRadius = "10px";
21096
- menu.style.background = "Canvas";
21097
- menu.style.color = "CanvasText";
21098
- menu.style.boxShadow = "0 12px 32px rgba(0, 0, 0, 0.22)";
21099
- ownerDocument.body.append(menu);
21100
- if (insertBefore?.parentElement === parent) parent.insertBefore(root, insertBefore);
21101
- else parent.append(root);
21102
21061
  let commands = [];
21103
- let items = [];
21104
- let activeIndex = 0;
21105
- let executingCommandId = null;
21106
21062
  let hasSession = true;
21107
- let triggerHovered = false;
21108
- let disposed = false;
21109
- const positionMenu2 = () => {
21110
- const rect = trigger.getBoundingClientRect();
21111
- const menuHeight = menu.getBoundingClientRect().height;
21112
- const opensAbove = rect.top >= menuHeight + MENU_GAP2 + VIEWPORT_MARGIN;
21113
- const left = clamp(
21114
- rect.left,
21115
- VIEWPORT_MARGIN,
21116
- window.innerWidth - MENU_WIDTH - VIEWPORT_MARGIN
21117
- );
21118
- menu.style.left = `${left}px`;
21119
- menu.style.top = opensAbove ? `${Math.max(VIEWPORT_MARGIN, rect.top - menuHeight - MENU_GAP2)}px` : `${Math.min(window.innerHeight - menuHeight - VIEWPORT_MARGIN, rect.bottom + MENU_GAP2)}px`;
21120
- };
21121
- const focusActive = (direction = 1) => {
21122
- if (items.length === 0 || items.every((item2) => item2.disabled)) return;
21123
- while (items[activeIndex]?.disabled) {
21124
- activeIndex = (activeIndex + direction + items.length) % items.length;
21125
- }
21126
- const item = items[activeIndex];
21127
- if (!item) return;
21128
- item.focus();
21129
- item.scrollIntoView({ block: "nearest" });
21130
- };
21131
- const syncTriggerBackground = () => {
21132
- trigger.style.background = !trigger.disabled && (triggerHovered || !menu.hidden) ? "rgba(127, 127, 127, 0.16)" : "transparent";
21133
- };
21134
- const syncTriggerState = () => {
21135
- trigger.disabled = commands.length === 0 || executingCommandId !== null;
21136
- trigger.style.opacity = trigger.disabled ? "0.65" : "1";
21137
- trigger.title = commands.length === 0 ? messages.commandsUnavailable : messages.harnessCommands;
21138
- syncTriggerBackground();
21139
- };
21140
- const close = () => {
21141
- menu.hidden = true;
21142
- trigger.setAttribute("aria-expanded", "false");
21143
- syncTriggerBackground();
21144
- };
21145
- const open = (shouldFocus = true) => {
21146
- if (commands.length === 0 || executingCommandId !== null) return;
21147
- menu.hidden = false;
21148
- positionMenu2();
21149
- trigger.setAttribute("aria-expanded", "true");
21150
- syncTriggerBackground();
21151
- if (shouldFocus) queueMicrotask(focusActive);
21152
- };
21153
- let closeTimer = null;
21154
- const cancelClose = () => {
21155
- if (closeTimer === null) return;
21156
- window.clearTimeout(closeTimer);
21157
- closeTimer = null;
21158
- };
21159
- const scheduleClose = () => {
21160
- cancelClose();
21161
- closeTimer = window.setTimeout(() => {
21162
- closeTimer = null;
21163
- if (!trigger.matches(":hover") && !menu.matches(":hover")) close();
21164
- }, 140);
21165
- };
21166
- const select = (command) => {
21167
- close();
21168
- onCommandSelected(command);
21169
- };
21170
- const renderItems = () => {
21171
- menu.replaceChildren();
21172
- const header = ownerDocument.createElement("div");
21173
- header.textContent = messages.commands;
21174
- header.style.padding = "5px 8px 4px";
21175
- header.style.color = "rgba(127, 127, 127, 0.75)";
21176
- header.style.font = "600 11px/16px system-ui, sans-serif";
21177
- menu.append(header);
21178
- items = commands.map(
21179
- (command) => menuItem(
21180
- ownerDocument,
21181
- command,
21182
- locale,
21183
- messages,
21184
- () => select(command),
21185
- !hasSession && rendererHarnessCommandExecutesDirectly(command) ? messages.commandRequiresConversation : void 0
21186
- )
21187
- );
21188
- menu.append(...items);
21189
- activeIndex = Math.min(activeIndex, Math.max(0, items.length - 1));
21190
- if (executingCommandId !== null) {
21191
- for (const item of items) {
21192
- const isExecuting = item.dataset.commandId === executingCommandId;
21193
- item.disabled = true;
21194
- item.style.opacity = isExecuting ? "1" : "0.5";
21195
- if (isExecuting) item.setAttribute("aria-busy", "true");
21196
- }
21197
- }
21198
- };
21199
- const onTriggerKeyDown = (event) => {
21200
- if (event.key === "ArrowDown" || event.key === "Enter" || event.key === " ") {
21201
- event.preventDefault();
21202
- open();
21203
- }
21204
- };
21205
- const onMenuKeyDown = (event) => {
21206
- if (event.key === "Escape") {
21207
- event.preventDefault();
21208
- close();
21209
- trigger.focus();
21210
- return;
21211
- }
21212
- if (event.key === "ArrowDown" || event.key === "ArrowUp") {
21213
- event.preventDefault();
21214
- const delta = event.key === "ArrowDown" ? 1 : -1;
21215
- activeIndex = (activeIndex + delta + items.length) % items.length;
21216
- focusActive(delta);
21217
- return;
21218
- }
21219
- if (event.key === "Enter") {
21220
- event.preventDefault();
21221
- items[activeIndex]?.click();
21222
- }
21223
- };
21224
- const onDocumentPointerDown = (event) => {
21225
- if (!menu.hidden && !root.contains(event.target) && !menu.contains(event.target)) {
21226
- close();
21227
- }
21228
- };
21229
- const onViewportChange = () => {
21230
- if (!menu.hidden) positionMenu2();
21231
- };
21232
- trigger.addEventListener("click", () => {
21233
- cancelClose();
21234
- open(true);
21235
- });
21236
- trigger.addEventListener("pointerenter", () => {
21237
- triggerHovered = true;
21238
- syncTriggerBackground();
21239
- cancelClose();
21240
- if (menu.hidden) open(false);
21241
- });
21242
- trigger.addEventListener("pointerleave", () => {
21243
- triggerHovered = false;
21244
- syncTriggerBackground();
21245
- scheduleClose();
21246
- });
21247
- trigger.addEventListener("keydown", onTriggerKeyDown);
21248
- menu.addEventListener("pointerenter", cancelClose);
21249
- menu.addEventListener("pointerleave", scheduleClose);
21250
- menu.addEventListener("keydown", onMenuKeyDown);
21251
- ownerDocument.addEventListener("pointerdown", onDocumentPointerDown, true);
21252
- ownerDocument.defaultView?.addEventListener("resize", onViewportChange);
21253
- ownerDocument.defaultView?.addEventListener("scroll", onViewportChange, true);
21254
- const control = {
21063
+ let source;
21064
+ let executingCommandId = null;
21065
+ let hovered = false;
21066
+ const syncTrigger = () => {
21067
+ trigger.setAttribute("aria-label", messages.commandMenuHint);
21068
+ trigger.title = messages.commandMenuHint;
21069
+ trigger.style.background = hovered ? "rgba(127, 127, 127, 0.16)" : "transparent";
21070
+ };
21071
+ const onMouseDown = (event) => event.preventDefault();
21072
+ const onClick = () => onOpenMenu();
21073
+ const onEnter = () => {
21074
+ hovered = true;
21075
+ syncTrigger();
21076
+ };
21077
+ const onLeave = () => {
21078
+ hovered = false;
21079
+ syncTrigger();
21080
+ };
21081
+ trigger.addEventListener("mousedown", onMouseDown);
21082
+ trigger.addEventListener("click", onClick);
21083
+ trigger.addEventListener("pointerenter", onEnter);
21084
+ trigger.addEventListener("pointerleave", onLeave);
21085
+ if (insertBefore?.parentElement === parent) parent.insertBefore(root, insertBefore);
21086
+ else parent.append(root);
21087
+ syncTrigger();
21088
+ return {
21255
21089
  root,
21256
21090
  trigger,
21257
- menu,
21258
21091
  placeBefore(reference) {
21259
21092
  if (!reference?.parentElement) return false;
21260
21093
  if (root.parentElement === reference.parentElement && root.nextElementSibling === reference) {
@@ -21263,46 +21096,31 @@ ${error51.stderrTail}`] : []
21263
21096
  reference.parentElement.insertBefore(root, reference);
21264
21097
  return true;
21265
21098
  },
21266
- setCommands(nextCommands, nextHasSession = true) {
21099
+ setCommands(nextCommands, nextHasSession = true, nextSource) {
21267
21100
  commands = [...nextCommands];
21268
21101
  hasSession = nextHasSession;
21269
- if (commands.length === 0) close();
21270
- renderItems();
21271
- syncTriggerState();
21102
+ source = nextSource;
21103
+ },
21104
+ snapshot() {
21105
+ return { commands, hasSession, executingCommandId, source };
21272
21106
  },
21273
21107
  setExecuting(commandId) {
21274
21108
  executingCommandId = commandId;
21275
- renderItems();
21276
- syncTriggerState();
21277
21109
  },
21278
21110
  setLocale(nextLocale) {
21279
21111
  if (locale === nextLocale) return;
21280
21112
  locale = nextLocale;
21281
21113
  messages = rendererHarnessMessages(locale);
21282
- trigger.setAttribute("aria-label", messages.harnessCommands);
21283
- menu.setAttribute("aria-label", messages.harnessCommands);
21284
- renderItems();
21285
- syncTriggerState();
21114
+ syncTrigger();
21286
21115
  },
21287
- close,
21288
21116
  dispose() {
21289
- if (disposed) return;
21290
- disposed = true;
21291
- cancelClose();
21292
- close();
21293
- ownerDocument.removeEventListener("pointerdown", onDocumentPointerDown, true);
21294
- ownerDocument.defaultView?.removeEventListener("resize", onViewportChange);
21295
- ownerDocument.defaultView?.removeEventListener("scroll", onViewportChange, true);
21296
- trigger.removeEventListener("keydown", onTriggerKeyDown);
21297
- menu.removeEventListener("pointerenter", cancelClose);
21298
- menu.removeEventListener("pointerleave", scheduleClose);
21299
- menu.removeEventListener("keydown", onMenuKeyDown);
21300
- menu.remove();
21117
+ trigger.removeEventListener("mousedown", onMouseDown);
21118
+ trigger.removeEventListener("click", onClick);
21119
+ trigger.removeEventListener("pointerenter", onEnter);
21120
+ trigger.removeEventListener("pointerleave", onLeave);
21301
21121
  root.remove();
21302
21122
  }
21303
21123
  };
21304
- syncTriggerState();
21305
- return control;
21306
21124
  }
21307
21125
 
21308
21126
  // src/renderer-composer-dom.ts
@@ -21515,14 +21333,41 @@ ${error51.stderrTail}`] : []
21515
21333
  const root = control.permissionModePicker?.root;
21516
21334
  return root?.parentElement ? root : null;
21517
21335
  }
21336
+ function lastNativeButtonWithin(composer) {
21337
+ const buttons = [...composer.querySelectorAll("button")];
21338
+ for (let index = buttons.length - 1; index >= 0; index -= 1) {
21339
+ const button = buttons[index];
21340
+ if (button && !isInsideOwnedRendererControl(button, composer)) return button;
21341
+ }
21342
+ return null;
21343
+ }
21344
+ function isInsideOwnedRendererControl(element, composer) {
21345
+ for (let node2 = element; node2 && node2 !== composer; node2 = node2.parentElement) {
21346
+ if (typeof node2.hasAttribute === "function" && isOwnedRendererControl(node2)) return true;
21347
+ }
21348
+ return false;
21349
+ }
21350
+ function refreshSendButton(control) {
21351
+ const current = control.sendButton;
21352
+ if (current?.isConnected && control.composer.contains(current)) return current;
21353
+ const replacement = sendButtonWithin(control.composer) ?? (current && !isComposerSubmitButton(current) ? lastNativeButtonWithin(control.composer) : null);
21354
+ if (!replacement) return null;
21355
+ if (control.sendDisabledBeforeSwitch !== null) {
21356
+ control.sendDisabledBeforeSwitch = replacement.disabled;
21357
+ replacement.disabled = true;
21358
+ }
21359
+ control.sendButton = replacement;
21360
+ return replacement;
21361
+ }
21518
21362
  function refreshTrailingClusterPlacement(control) {
21519
- const sendButton = control.sendButton;
21363
+ const sendButton = refreshSendButton(control);
21520
21364
  const modelRoot = control.modelPicker?.root;
21521
21365
  const agentRoot = control.root ?? control.picker?.root;
21522
21366
  if (!sendButton || !modelRoot || !agentRoot) return;
21523
21367
  const anchor = trailingActionAnchor(sendButton);
21524
21368
  const parent = anchor.parentElement;
21525
21369
  if (!parent || typeof parent.insertBefore !== "function") return;
21370
+ if (!parent.isConnected || !control.composer.contains(parent)) return;
21526
21371
  if (modelRoot.parentElement === parent && agentRoot.parentElement === parent && modelRoot.nextElementSibling === agentRoot && agentRoot.nextElementSibling === anchor) {
21527
21372
  return;
21528
21373
  }
@@ -21592,7 +21437,7 @@ ${error51.stderrTail}`] : []
21592
21437
  setNativeControlHidden(control.nativeContextUsageControl, false);
21593
21438
  setNativeControlHidden(control.nativePermissionModeControl, hidePermissionMode);
21594
21439
  }
21595
- function mountComposerAgentControl(composer, composerId, sendButton, enabledAgents, onSelect, onDownload, onOpenProviderPicker, onSelectModel, onSelectThinking, onSelectPermissionMode, onSelectCommand) {
21440
+ function mountComposerAgentControl(composer, composerId, sendButton, enabledAgents, onSelect, onDownload, onOpenProviderPicker, onSelectModel, onSelectThinking, onSelectPermissionMode, onOpenCommandMenu) {
21596
21441
  if (composer instanceof HTMLElement) composer.style.minWidth = "0";
21597
21442
  const nativeModelControl = captureNativeControl(nativeModelControlForComposer(composer));
21598
21443
  const nativeContextUsageControl = captureNativeControl(
@@ -21618,7 +21463,7 @@ ${error51.stderrTail}`] : []
21618
21463
  const harnessCommands = mountRendererHarnessCommandControl(
21619
21464
  toolbar ?? composer,
21620
21465
  trailingActionAnchor(sendButton),
21621
- onSelectCommand
21466
+ onOpenCommandMenu
21622
21467
  );
21623
21468
  const permissionParent = nativePermissionModeControl?.element.parentElement;
21624
21469
  if (permissionParent && nativePermissionModeControl && nativePermissionModeControlVerified) {
@@ -21649,6 +21494,11 @@ ${error51.stderrTail}`] : []
21649
21494
  refreshCreditsPlacement(control);
21650
21495
  return control;
21651
21496
  }
21497
+ function nativeSendDisabled(button, fallback) {
21498
+ const key = Object.getOwnPropertyNames(button).find((name) => name.startsWith("__reactProps$"));
21499
+ const props = key ? Object.getOwnPropertyDescriptor(button, key)?.value : void 0;
21500
+ return typeof props === "object" && props !== null && "disabled" in props && typeof props.disabled === "boolean" ? props.disabled : fallback;
21501
+ }
21652
21502
  function renderComposerAgentControl(control, state, adapterState, switching, availability = {}, modelView = { status: "idle" }, permissionModeView = { status: "idle" }, usage = null, accountCredits = null, locale = "en", currentCodexAccount = null, ownershipError = false) {
21653
21503
  if (control.usage === null) {
21654
21504
  control.usage = mountRendererUsageControl(control.composerId, locale);
@@ -21667,7 +21517,10 @@ ${error51.stderrTail}`] : []
21667
21517
  control.sendDisabledBeforeSwitch = control.sendButton.disabled;
21668
21518
  control.sendButton.disabled = true;
21669
21519
  } else if (!submissionBlocked && control.sendDisabledBeforeSwitch !== null) {
21670
- control.sendButton.disabled = control.sendDisabledBeforeSwitch;
21520
+ control.sendButton.disabled = nativeSendDisabled(
21521
+ control.sendButton,
21522
+ control.sendDisabledBeforeSwitch
21523
+ );
21671
21524
  control.sendDisabledBeforeSwitch = null;
21672
21525
  }
21673
21526
  const pickerView = renderRendererAgentPicker(
@@ -21704,12 +21557,15 @@ ${error51.stderrTail}`] : []
21704
21557
  control.harnessCommands.setLocale(locale);
21705
21558
  control.harnessCommands.root.hidden = state.agent === "codex";
21706
21559
  control.harnessCommands.root.style.display = state.agent === "codex" ? "none" : "inline-flex";
21707
- if (state.agent === "codex") control.harnessCommands.close();
21708
21560
  renderRendererCreditsControl(control.credits, accountCredits, locale);
21561
+ return state.agent !== "codex" && adapterState === "ready" && !submissionBlocked;
21709
21562
  }
21710
21563
  function disposeComposerAgentControl(control) {
21711
21564
  if (control.sendDisabledBeforeSwitch !== null) {
21712
- control.sendButton.disabled = control.sendDisabledBeforeSwitch;
21565
+ control.sendButton.disabled = nativeSendDisabled(
21566
+ control.sendButton,
21567
+ control.sendDisabledBeforeSwitch
21568
+ );
21713
21569
  }
21714
21570
  restoreNativeControl(control.nativeModelControl);
21715
21571
  restoreNativeControl(control.nativeContextUsageControl);
@@ -21835,6 +21691,270 @@ ${error51.stderrTail}`] : []
21835
21691
  }
21836
21692
  };
21837
21693
 
21694
+ // ../desktop-control/dist/renderer-react-ownership.js
21695
+ function committedReactAncestors(value) {
21696
+ const MAX_VISITED_FIBERS = 2e4;
21697
+ const fiber = (value2) => typeof value2 === "object" && value2 !== null ? value2 : null;
21698
+ const first = fiber(value);
21699
+ if (!first)
21700
+ return [];
21701
+ const previous = [];
21702
+ const seen = /* @__PURE__ */ new Set();
21703
+ for (let node2 = first; node2; node2 = fiber(node2.return)) {
21704
+ if (seen.has(node2) || seen.size >= MAX_VISITED_FIBERS)
21705
+ return [];
21706
+ seen.add(node2);
21707
+ previous.push(node2);
21708
+ }
21709
+ const rootState = fiber(previous.at(-1)?.stateNode);
21710
+ if (!rootState || !("current" in rootState))
21711
+ return previous;
21712
+ const current = fiber(rootState.current);
21713
+ if (!current)
21714
+ return [];
21715
+ const stack = [{ node: current, parent: null }];
21716
+ const alternate = fiber(first.alternate);
21717
+ seen.clear();
21718
+ while (stack.length > 0 && seen.size < MAX_VISITED_FIBERS) {
21719
+ const entry = stack.pop();
21720
+ if (!entry)
21721
+ break;
21722
+ if (seen.has(entry.node))
21723
+ return [];
21724
+ seen.add(entry.node);
21725
+ if (entry.node === first || entry.node === alternate) {
21726
+ const ancestors = [];
21727
+ for (let cursor = entry; cursor; cursor = cursor.parent)
21728
+ ancestors.push(cursor.node);
21729
+ return ancestors;
21730
+ }
21731
+ const sibling = entry.parent && fiber(entry.node.sibling);
21732
+ if (sibling)
21733
+ stack.push({ node: sibling, parent: entry.parent });
21734
+ const child = fiber(entry.node.child);
21735
+ if (child)
21736
+ stack.push({ node: child, parent: entry });
21737
+ }
21738
+ return [];
21739
+ }
21740
+
21741
+ // src/renderer-codex-usage-gate.ts
21742
+ var EDITOR_SELECTOR2 = '[contenteditable="true"][role="textbox"]';
21743
+ var MAX_HOOKS = 4096;
21744
+ var MAX_DOM_DEPTH = 12;
21745
+ var RETRY_DELAY_MS = 1e3;
21746
+ function isRecord2(value) {
21747
+ return typeof value === "object" && value !== null && !Array.isArray(value);
21748
+ }
21749
+ function hooksOf(fiber) {
21750
+ const result = [];
21751
+ let hook = isRecord2(fiber) ? fiber.memoizedState : null;
21752
+ while (isRecord2(hook) && result.length < MAX_HOOKS) {
21753
+ result.push(hook);
21754
+ hook = hook.next;
21755
+ }
21756
+ return hook == null ? result : [];
21757
+ }
21758
+ function submitOwners(composer) {
21759
+ let element = composer.querySelector(EDITOR_SELECTOR2) ?? composer;
21760
+ for (let depth = 0; element && depth < MAX_DOM_DEPTH; depth += 1) {
21761
+ const key = Object.getOwnPropertyNames(element).find(
21762
+ (name) => name.startsWith("__reactFiber$")
21763
+ );
21764
+ if (key) {
21765
+ const owners = committedReactAncestors(
21766
+ Object.getOwnPropertyDescriptor(element, key)?.value
21767
+ ).filter(
21768
+ ({ memoizedProps: props }) => isRecord2(props) && "onLocalSubmitStart" in props && typeof props.submitDisabled === "boolean"
21769
+ );
21770
+ return owners;
21771
+ }
21772
+ element = element.parentElement;
21773
+ }
21774
+ return [];
21775
+ }
21776
+ function findSubmitOwner(composer) {
21777
+ const owners = submitOwners(composer);
21778
+ return owners.length === 1 ? owners[0] ?? null : null;
21779
+ }
21780
+ function subscriptionAt(hook) {
21781
+ const memo = hook.memoizedState;
21782
+ if (!Array.isArray(memo) || !Array.isArray(memo[1])) return null;
21783
+ const [subscriber, [store, atom]] = memo;
21784
+ const instance = hook.next?.queue;
21785
+ const effect = hook.next?.next?.memoizedState;
21786
+ if (!isRecord2(subscriber) || typeof subscriber.getSnapshot !== "function" || typeof subscriber.subscribe !== "function" || typeof subscriber.createRender === "function" && subscriber.createRender() != null || !isRecord2(store) || typeof store.get !== "function" || typeof store.sub !== "function" || !isRecord2(atom) || typeof atom.read !== "function" || "write" in atom || !isRecord2(instance) || typeof instance.value !== "boolean" || instance.getSnapshot !== subscriber.getSnapshot || !isRecord2(effect) || typeof effect.create !== "function" || !Array.isArray(effect.deps) || effect.deps[0] !== subscriber.subscribe) {
21787
+ return null;
21788
+ }
21789
+ return {
21790
+ subscriber,
21791
+ store,
21792
+ atom,
21793
+ instance,
21794
+ subscribeEffect: effect.create
21795
+ };
21796
+ }
21797
+ function gateKind({ store, atom }) {
21798
+ const read = /* @__PURE__ */ new Set();
21799
+ const trace = (value, prefix) => new Proxy(
21800
+ { ...value },
21801
+ {
21802
+ get(target, property, receiver) {
21803
+ if (typeof property === "string") read.add(`${prefix}.${property}`);
21804
+ return Reflect.get(target, property, receiver);
21805
+ }
21806
+ }
21807
+ );
21808
+ try {
21809
+ const native = store.get(atom);
21810
+ const replayed = atom.read((dependency) => {
21811
+ const value = store.get(dependency);
21812
+ if (!isRecord2(value)) return value;
21813
+ if (typeof value.hardBlocked === "boolean") return trace(value, "reserve");
21814
+ if ("authMethod" in value) return trace(value, "auth");
21815
+ if (isRecord2(value.data) && isRecord2(value.data.rate_limit)) {
21816
+ return {
21817
+ ...value,
21818
+ data: { ...value.data, rate_limit: trace(value.data.rate_limit, "limit") }
21819
+ };
21820
+ }
21821
+ return value;
21822
+ });
21823
+ if (typeof native !== "boolean" || replayed !== native) return null;
21824
+ } catch {
21825
+ return null;
21826
+ }
21827
+ if (read.has("reserve.hardBlocked") && !read.has("reserve.active")) return "reserve";
21828
+ if (read.has("auth.authMethod") && read.has("limit.allowed")) return "account";
21829
+ return null;
21830
+ }
21831
+ function gateSubscriptions(owner) {
21832
+ const found = { account: [], reserve: [] };
21833
+ for (const hook of hooksOf(owner)) {
21834
+ const subscription = subscriptionAt(hook);
21835
+ const kind = subscription && gateKind(subscription);
21836
+ if (subscription && kind) found[kind].push(subscription);
21837
+ }
21838
+ return found;
21839
+ }
21840
+ function discoverGates(owner) {
21841
+ const found = /* @__PURE__ */ new Map();
21842
+ for (const [kind, subscriptions] of Object.entries(gateSubscriptions(owner))) {
21843
+ if (subscriptions.length > 1) return null;
21844
+ if (subscriptions[0]) found.set(kind, subscriptions[0]);
21845
+ }
21846
+ return found;
21847
+ }
21848
+ function project({ subscriber, store, atom, instance, subscribeEffect }) {
21849
+ for (const [target, key] of [
21850
+ [store, "sub"],
21851
+ [subscriber, "getSnapshot"],
21852
+ [instance, "getSnapshot"]
21853
+ ]) {
21854
+ if (Object.getOwnPropertyDescriptor(target, key)?.writable !== true) {
21855
+ throw new Error("Codex usage gate is not writable");
21856
+ }
21857
+ }
21858
+ let notify;
21859
+ const originalSub = store.sub;
21860
+ try {
21861
+ store.sub = (candidate, listener) => {
21862
+ if (candidate !== atom || notify) throw new Error("Unexpected Codex usage subscription");
21863
+ notify = listener;
21864
+ return () => void 0;
21865
+ };
21866
+ subscribeEffect();
21867
+ } finally {
21868
+ store.sub = originalSub;
21869
+ }
21870
+ if (!notify) throw new Error("Codex usage gate listener is unavailable");
21871
+ const onChange = notify;
21872
+ const original = subscriber.getSnapshot;
21873
+ const allowed = () => false;
21874
+ subscriber.getSnapshot = allowed;
21875
+ instance.getSnapshot = allowed;
21876
+ if (instance.value !== false) onChange();
21877
+ return {
21878
+ subscriber,
21879
+ instance,
21880
+ restore() {
21881
+ if (subscriber.getSnapshot === allowed) subscriber.getSnapshot = original;
21882
+ if (instance.getSnapshot === allowed) instance.getSnapshot = original;
21883
+ onChange();
21884
+ }
21885
+ };
21886
+ }
21887
+ function isBound(owner, projections) {
21888
+ const alternate = isRecord2(owner.alternate) ? owner.alternate : null;
21889
+ const bound = [...projections];
21890
+ return [owner, alternate].some((fiber) => {
21891
+ const hooks = hooksOf(fiber);
21892
+ return bound.every(
21893
+ ({ subscriber, instance }) => hooks.some(
21894
+ (hook) => Array.isArray(hook.memoizedState) && hook.memoizedState[0] === subscriber && hook.next?.queue === instance
21895
+ )
21896
+ );
21897
+ });
21898
+ }
21899
+ function createRendererCodexUsageGate(composer) {
21900
+ let owner = null;
21901
+ const projections = /* @__PURE__ */ new Map();
21902
+ let retryAt = 0;
21903
+ let allowed = false;
21904
+ const release = () => {
21905
+ const previous = [...projections.values()];
21906
+ owner = null;
21907
+ projections.clear();
21908
+ for (const projection of previous) {
21909
+ try {
21910
+ projection.restore();
21911
+ } catch {
21912
+ }
21913
+ }
21914
+ };
21915
+ const bind = () => {
21916
+ const current = owner ?? findSubmitOwner(composer);
21917
+ const gates = current && discoverGates(current);
21918
+ if (!current || !gates?.has("reserve")) throw new Error("Codex usage gate is unavailable");
21919
+ owner = current;
21920
+ for (const [kind, gate] of gates) {
21921
+ if (!projections.has(kind)) projections.set(kind, project(gate));
21922
+ }
21923
+ return "bypassed";
21924
+ };
21925
+ const apply = () => {
21926
+ if (!allowed || !composer.isConnected) {
21927
+ release();
21928
+ retryAt = 0;
21929
+ return "native";
21930
+ }
21931
+ if (owner && !isBound(owner, projections.values())) {
21932
+ release();
21933
+ retryAt = 0;
21934
+ }
21935
+ if (owner && projections.size === 2) return "bypassed";
21936
+ if (Date.now() < retryAt) return owner ? "bypassed" : "unsupported";
21937
+ retryAt = Date.now() + RETRY_DELAY_MS;
21938
+ try {
21939
+ return bind();
21940
+ } catch {
21941
+ release();
21942
+ return "unsupported";
21943
+ }
21944
+ };
21945
+ return {
21946
+ update(next) {
21947
+ allowed = next;
21948
+ return apply();
21949
+ },
21950
+ refresh: apply,
21951
+ dispose() {
21952
+ allowed = false;
21953
+ release();
21954
+ }
21955
+ };
21956
+ }
21957
+
21838
21958
  // src/renderer-request-sender.ts
21839
21959
  var RendererMethodUnavailableError = class extends Error {
21840
21960
  constructor(method, cause) {
@@ -21941,15 +22061,15 @@ ${error51.stderrTail}`] : []
21941
22061
  var CODEX_ACCOUNT_LIST_METHOD = "codexhost/account/list";
21942
22062
  var CODEX_ACCOUNT_REFRESH_METHOD = "codexhost/account/refresh";
21943
22063
  var CODEX_ACCOUNT_CHANGED_METHOD = "codexhost/account/changed";
21944
- function isRecord2(value) {
22064
+ function isRecord3(value) {
21945
22065
  return typeof value === "object" && value !== null && !Array.isArray(value);
21946
22066
  }
21947
22067
  function notifiedThreadId(notification) {
21948
- if (!isRecord2(notification) || !THREAD_USAGE_REFRESH_METHODS.includes(notification.method)) {
22068
+ if (!isRecord3(notification) || !THREAD_USAGE_REFRESH_METHODS.includes(notification.method)) {
21949
22069
  return null;
21950
22070
  }
21951
22071
  const params = notification.params;
21952
- if (!isRecord2(params)) return null;
22072
+ if (!isRecord3(params)) return null;
21953
22073
  const parsed = hostThreadIdSchema.safeParse(params.threadId);
21954
22074
  return parsed.success ? parsed.data : null;
21955
22075
  }
@@ -22106,8 +22226,8 @@ ${error51.stderrTail}`] : []
22106
22226
  threadId: params.threadId,
22107
22227
  includeTurns: false
22108
22228
  });
22109
- const thread = isRecord2(native) ? native.thread : null;
22110
- if (!isRecord2(thread) || thread.id !== params.threadId || typeof thread.modelProvider !== "string" || !thread.modelProvider || thread.modelProvider === "codexhost" || typeof thread.cliVersion !== "string" || !thread.cliVersion || thread.cliVersion === "codexhost") {
22229
+ const thread = isRecord3(native) ? native.thread : null;
22230
+ if (!isRecord3(thread) || thread.id !== params.threadId || typeof thread.modelProvider !== "string" || !thread.modelProvider || thread.modelProvider === "codexhost" || typeof thread.cliVersion !== "string" || !thread.cliVersion || thread.cliVersion === "codexhost") {
22111
22231
  throw new Error("Native Thread response cannot establish Codex ownership");
22112
22232
  }
22113
22233
  return { owner: "codex", locked: true };
@@ -22227,7 +22347,7 @@ ${error51.stderrTail}`] : []
22227
22347
  throw new Error("Renderer Account notification callback is unavailable");
22228
22348
  }
22229
22349
  return notifications.addNotificationCallback(CODEX_ACCOUNT_CHANGED_METHOD, (notification) => {
22230
- if (!isRecord2(notification) || notification.method !== CODEX_ACCOUNT_CHANGED_METHOD) return;
22350
+ if (!isRecord3(notification) || notification.method !== CODEX_ACCOUNT_CHANGED_METHOD) return;
22231
22351
  const state = codexAccountChangedSchema.safeParse(notification.params);
22232
22352
  if (state.success) listener(state.data);
22233
22353
  });
@@ -22236,16 +22356,16 @@ ${error51.stderrTail}`] : []
22236
22356
  }
22237
22357
 
22238
22358
  // src/renderer-external-queue.ts
22239
- function isRecord3(value) {
22359
+ function isRecord4(value) {
22240
22360
  return value !== null && typeof value === "object" && !Array.isArray(value);
22241
22361
  }
22242
22362
  function installRendererExternalQueue(target) {
22243
- if (!isRecord3(target) || typeof target.getTurnCoordinator !== "function" || typeof target.getConversation !== "function") {
22363
+ if (!isRecord4(target) || typeof target.getTurnCoordinator !== "function" || typeof target.getConversation !== "function") {
22244
22364
  return null;
22245
22365
  }
22246
22366
  const coordinator = target.getTurnCoordinator();
22247
- const queue = isRecord3(coordinator) ? coordinator.serverQueue : null;
22248
- if (!isRecord3(queue) || typeof queue.isEnabled !== "function") return null;
22367
+ const queue = isRecord4(coordinator) ? coordinator.serverQueue : null;
22368
+ if (!isRecord4(queue) || typeof queue.isEnabled !== "function") return null;
22249
22369
  const descriptor = Object.getOwnPropertyDescriptor(queue, "isEnabled");
22250
22370
  if (!descriptor?.writable) return null;
22251
22371
  const original = queue.isEnabled;
@@ -22254,7 +22374,7 @@ ${error51.stderrTail}`] : []
22254
22374
  const threadId = args[0];
22255
22375
  if (typeof threadId === "string") {
22256
22376
  const conversation = getConversation.call(target, threadId);
22257
- if (isRecord3(conversation) && conversation.id === threadId && // Reserved transport marker from externalThreadValue, retained by
22377
+ if (isRecord4(conversation) && conversation.id === threadId && // Reserved transport marker from externalThreadValue, retained by
22258
22378
  // Desktop in both newly created and hydrated conversation metadata.
22259
22379
  conversation.modelProvider === "codexhost") {
22260
22380
  return false;
@@ -22269,19 +22389,19 @@ ${error51.stderrTail}`] : []
22269
22389
  }
22270
22390
 
22271
22391
  // src/renderer-external-steering.ts
22272
- function isRecord4(value) {
22392
+ function isRecord5(value) {
22273
22393
  return value !== null && typeof value === "object" && !Array.isArray(value);
22274
22394
  }
22275
22395
  function isManager(value) {
22276
- return isRecord4(value) && ["sendRequest", "steerTurn", "startTurn", "getTurnCoordinator"].every(
22396
+ return isRecord5(value) && ["sendRequest", "steerTurn", "startTurn", "getTurnCoordinator"].every(
22277
22397
  (key) => typeof value[key] === "function"
22278
22398
  );
22279
22399
  }
22280
22400
  function submissionHost(manager) {
22281
22401
  const coordinator = manager.getTurnCoordinator();
22282
- const options = isRecord4(coordinator) ? coordinator.options : null;
22283
- const host = isRecord4(options) ? options.submissionHost : null;
22284
- if (!isRecord4(host) || typeof host.getActiveTurnId !== "function" || typeof host.hasPendingTurnStart !== "function") {
22402
+ const options = isRecord5(coordinator) ? coordinator.options : null;
22403
+ const host = isRecord5(options) ? options.submissionHost : null;
22404
+ if (!isRecord5(host) || typeof host.getActiveTurnId !== "function" || typeof host.hasPendingTurnStart !== "function") {
22285
22405
  throw new Error("Desktop turn submission binding is unavailable");
22286
22406
  }
22287
22407
  return {
@@ -22323,20 +22443,20 @@ ${error51.stderrTail}`] : []
22323
22443
  var INTERRUPTED_QUEUE_REASON = "Interrupted before the steer was accepted.";
22324
22444
  async function preserveQueuedFollowUps(manager, threadId) {
22325
22445
  const coordinator = manager.getTurnCoordinator();
22326
- if (!isRecord4(coordinator) || typeof coordinator.loadMessages !== "function" || typeof coordinator.readMessages !== "function" || typeof coordinator.mutate !== "function") {
22446
+ if (!isRecord5(coordinator) || typeof coordinator.loadMessages !== "function" || typeof coordinator.readMessages !== "function" || typeof coordinator.mutate !== "function") {
22327
22447
  throw new Error("Desktop follow-up queue binding is unavailable");
22328
22448
  }
22329
22449
  await coordinator.loadMessages.call(coordinator, threadId);
22330
22450
  const messages = coordinator.readMessages.call(coordinator, threadId);
22331
22451
  if (!Array.isArray(messages)) throw new Error("Desktop follow-up queue is unavailable");
22332
22452
  const alreadyPaused = new Set(
22333
- messages.filter((message) => isRecord4(message) && message.pausedReason != null).map((message) => message.id)
22453
+ messages.filter((message) => isRecord5(message) && message.pausedReason != null).map((message) => message.id)
22334
22454
  );
22335
22455
  return () => {
22336
22456
  coordinator.mutate.call(coordinator, threadId, (current) => {
22337
22457
  if (!Array.isArray(current)) return current;
22338
22458
  return current.map((message) => {
22339
- if (!isRecord4(message) || alreadyPaused.has(message.id) || message.pausedReason !== INTERRUPTED_QUEUE_REASON)
22459
+ if (!isRecord5(message) || alreadyPaused.has(message.id) || message.pausedReason !== INTERRUPTED_QUEUE_REASON)
22340
22460
  return message;
22341
22461
  const resumed = { ...message };
22342
22462
  delete resumed.pausedReason;
@@ -22354,9 +22474,9 @@ ${error51.stderrTail}`] : []
22354
22474
  const pending = /* @__PURE__ */ new Map();
22355
22475
  let disposed = false;
22356
22476
  const send = function(method, params, options) {
22357
- const messageId = isRecord4(params) ? params.clientUserMessageId : null;
22358
- const route = typeof messageId === "string" && isRecord4(params) ? routes.get(`${params.threadId}\0${messageId}`) : void 0;
22359
- if (method !== "turn/start" || !isRecord4(params) || !route || route.threadId !== params.threadId) {
22477
+ const messageId = isRecord5(params) ? params.clientUserMessageId : null;
22478
+ const route = typeof messageId === "string" && isRecord5(params) ? routes.get(`${params.threadId}\0${messageId}`) : void 0;
22479
+ if (method !== "turn/start" || !isRecord5(params) || !route || route.threadId !== params.threadId) {
22360
22480
  return originalSend.call(manager, method, params, options);
22361
22481
  }
22362
22482
  if (disposed) return Promise.reject(new Error("External steering binding was disposed"));
@@ -22375,7 +22495,7 @@ ${error51.stderrTail}`] : []
22375
22495
  options
22376
22496
  )
22377
22497
  ).then((response) => {
22378
- if (!isRecord4(response) || typeof response.turnId !== "string" || !response.turnId) {
22498
+ if (!isRecord5(response) || typeof response.turnId !== "string" || !response.turnId) {
22379
22499
  throw new Error("External steering returned no replacement Turn identity");
22380
22500
  }
22381
22501
  return {
@@ -22406,7 +22526,7 @@ ${error51.stderrTail}`] : []
22406
22526
  ] = args;
22407
22527
  if (typeof threadId !== "string") return originalSteer.apply(manager, args);
22408
22528
  const role = manager.getStreamRole?.(threadId);
22409
- if (isRecord4(role) && role.role === "follower") return originalSteer.apply(manager, args);
22529
+ if (isRecord5(role) && role.role === "follower") return originalSteer.apply(manager, args);
22410
22530
  let host = null;
22411
22531
  let expectedTurnId;
22412
22532
  try {
@@ -22425,15 +22545,15 @@ ${error51.stderrTail}`] : []
22425
22545
  if (owner === "codex") return originalSteer.apply(manager, args);
22426
22546
  if (!host) throw new Error("Desktop turn submission binding is unavailable");
22427
22547
  const currentRole = manager.getStreamRole?.(threadId);
22428
- if (isRecord4(currentRole) && currentRole.role === "follower")
22548
+ if (isRecord5(currentRole) && currentRole.role === "follower")
22429
22549
  return originalSteer.apply(manager, args);
22430
22550
  if (!Array.isArray(input) || input.length === 0 || input.some(
22431
- (item) => !isRecord4(item) || item.type !== "text" || typeof item.text !== "string"
22432
- ) || !input.some((item) => isRecord4(item) && typeof item.text === "string" && item.text.trim())) {
22551
+ (item) => !isRecord5(item) || item.type !== "text" || typeof item.text !== "string"
22552
+ ) || !input.some((item) => isRecord5(item) && typeof item.text === "string" && item.text.trim())) {
22433
22553
  throw new Error("External steering requires non-empty text input");
22434
22554
  }
22435
22555
  if (toolOutput != null) throw new Error("External steering cannot replace a tool response");
22436
- if (!isRecord4(restoreMessage) || !isRecord4(restoreMessage.context)) {
22556
+ if (!isRecord5(restoreMessage) || !isRecord5(restoreMessage.context)) {
22437
22557
  throw new Error("Desktop steering message context is unavailable");
22438
22558
  }
22439
22559
  const messageId = typeof clientUserMessageId === "string" && clientUserMessageId ? clientUserMessageId : typeof restoreMessage.id === "string" && restoreMessage.id ? restoreMessage.id : crypto.randomUUID();
@@ -22481,7 +22601,7 @@ ${error51.stderrTail}`] : []
22481
22601
  },
22482
22602
  onMessageAdded
22483
22603
  );
22484
- if (!isRecord4(response) || !isRecord4(response.turn) || typeof response.turn.id !== "string") {
22604
+ if (!isRecord5(response) || !isRecord5(response.turn) || typeof response.turn.id !== "string") {
22485
22605
  throw new Error("Desktop returned no replacement Turn identity");
22486
22606
  }
22487
22607
  try {
@@ -22671,7 +22791,7 @@ ${error51.stderrTail}`] : []
22671
22791
  var SIDEBAR_THREAD_HOST_ID_ATTRIBUTE = "data-app-action-sidebar-thread-host-id";
22672
22792
  var SIDEBAR_AGENT_ICON_ATTRIBUTE = "data-codexhost-sidebar-agent-icon";
22673
22793
  var OWNERSHIP_RETRY_DELAYS_MS = [100, 300, 800, 1500, 3e3];
22674
- function isRecord5(value) {
22794
+ function isRecord6(value) {
22675
22795
  return typeof value === "object" && value !== null && !Array.isArray(value);
22676
22796
  }
22677
22797
  function sidebarThreadAttributes(element) {
@@ -22698,19 +22818,19 @@ ${error51.stderrTail}`] : []
22698
22818
  const fiberName = fiberNames[0];
22699
22819
  if (fiberNames.length !== 1 || !fiberName) return null;
22700
22820
  const firstFiber2 = Object.getOwnPropertyDescriptor(element, fiberName)?.value;
22701
- if (!isRecord5(firstFiber2)) return null;
22821
+ if (!isRecord6(firstFiber2)) return null;
22702
22822
  const candidates = /* @__PURE__ */ new Set();
22703
22823
  let fiber = firstFiber2;
22704
22824
  for (let depth = 0; fiber && depth < 12; depth += 1) {
22705
22825
  const props = fiber.memoizedProps;
22706
- if (isRecord5(props) && isRecord5(props.dataAttributes)) {
22826
+ if (isRecord6(props) && isRecord6(props.dataAttributes)) {
22707
22827
  const dataAttributes = props.dataAttributes;
22708
22828
  const threadId = hostThreadIdSchema.safeParse(props.conversationId);
22709
22829
  if (threadId.success && dataAttributes[SIDEBAR_THREAD_ROW_ATTRIBUTE] === rowMarker && dataAttributes[SIDEBAR_THREAD_ID_ATTRIBUTE] === taskKey && dataAttributes[SIDEBAR_THREAD_HOST_ID_ATTRIBUTE] === hostId) {
22710
22830
  candidates.add(threadId.data);
22711
22831
  }
22712
22832
  }
22713
- fiber = isRecord5(fiber.return) ? fiber.return : null;
22833
+ fiber = isRecord6(fiber.return) ? fiber.return : null;
22714
22834
  }
22715
22835
  return candidates.size === 1 ? candidates.values().next().value ?? null : null;
22716
22836
  }
@@ -22730,8 +22850,19 @@ ${error51.stderrTail}`] : []
22730
22850
  if (ownership.harnessId === "hermes") return "hermes";
22731
22851
  if (ownership.harnessId === "qoder") return "qoder";
22732
22852
  if (ownership.harnessId === "qoder-cn") return "qoder-cn";
22853
+ if (ownership.harnessId === "kimi-code") return "kimi-code";
22733
22854
  return null;
22734
22855
  }
22856
+ function sidebarAgentIconAnchor(titleTrigger, title) {
22857
+ const view = title.ownerDocument.defaultView;
22858
+ let anchor = title;
22859
+ while (anchor.parentElement && anchor.parentElement !== titleTrigger) {
22860
+ const style = view?.getComputedStyle(anchor.parentElement);
22861
+ if (style?.display.includes("flex") && !style.flexDirection.startsWith("column")) break;
22862
+ anchor = anchor.parentElement;
22863
+ }
22864
+ return anchor;
22865
+ }
22735
22866
  var BrowserSidebarAgentIconRow = class {
22736
22867
  constructor(element) {
22737
22868
  this.element = element;
@@ -22756,10 +22887,11 @@ ${error51.stderrTail}`] : []
22756
22887
  this.clear();
22757
22888
  return;
22758
22889
  }
22890
+ const anchor = sidebarAgentIconAnchor(titleTrigger, title);
22759
22891
  const icons = [
22760
22892
  ...this.element.querySelectorAll(`[${SIDEBAR_AGENT_ICON_ATTRIBUTE}]`)
22761
22893
  ];
22762
- if (icons.length === 1 && icons[0]?.parentElement === titleTrigger && icons[0].getAttribute(SIDEBAR_AGENT_ICON_ATTRIBUTE) === agent) {
22894
+ if (icons.length === 1 && icons[0]?.nextElementSibling === anchor && icons[0].getAttribute(SIDEBAR_AGENT_ICON_ATTRIBUTE) === agent) {
22763
22895
  return;
22764
22896
  }
22765
22897
  this.clear();
@@ -22777,7 +22909,7 @@ ${error51.stderrTail}`] : []
22777
22909
  marker.style.flex = "none";
22778
22910
  marker.style.pointerEvents = "none";
22779
22911
  marker.append(createRendererAgentIcon(agent, 14, this.element.ownerDocument));
22780
- titleTrigger.insertBefore(marker, title);
22912
+ anchor.before(marker);
22781
22913
  }
22782
22914
  clear() {
22783
22915
  for (const icon2 of this.element.querySelectorAll(`[${SIDEBAR_AGENT_ICON_ATTRIBUTE}]`)) {
@@ -23056,7 +23188,7 @@ ${error51.stderrTail}`] : []
23056
23188
  if (row) finish(row);
23057
23189
  });
23058
23190
  }
23059
- function isRecord6(value) {
23191
+ function isRecord7(value) {
23060
23192
  return typeof value === "object" && value !== null && !Array.isArray(value);
23061
23193
  }
23062
23194
  function firstFiber(element) {
@@ -23066,7 +23198,7 @@ ${error51.stderrTail}`] : []
23066
23198
  const name = names[0];
23067
23199
  if (names.length !== 1 || !name) return null;
23068
23200
  const value = Object.getOwnPropertyDescriptor(element, name)?.value;
23069
- return isRecord6(value) ? value : null;
23201
+ return isRecord7(value) ? value : null;
23070
23202
  }
23071
23203
  function rendererForkTargetFromButton(button) {
23072
23204
  const annotation = button.closest(`[${RESPONSE_CONVERSATION_ATTRIBUTE}]`);
@@ -23083,10 +23215,10 @@ ${error51.stderrTail}`] : []
23083
23215
  let hasForkCallback = false;
23084
23216
  let fiber = firstFiber(button);
23085
23217
  const buttonProps = fiber?.memoizedProps;
23086
- if (!isRecord6(buttonProps) || !Object.hasOwn(buttonProps, "aria-busy")) return null;
23218
+ if (!isRecord7(buttonProps) || !Object.hasOwn(buttonProps, "aria-busy")) return null;
23087
23219
  for (let depth = 0; fiber && depth < 24; depth += 1) {
23088
23220
  const props = fiber.memoizedProps;
23089
- if (isRecord6(props)) {
23221
+ if (isRecord7(props)) {
23090
23222
  if (typeof props.conversationId === "string") conversationIds.add(props.conversationId);
23091
23223
  if (typeof props.turnId === "string") turnIds.add(props.turnId);
23092
23224
  if (typeof props.hostId === "string") hostIds.add(props.hostId);
@@ -23095,7 +23227,7 @@ ${error51.stderrTail}`] : []
23095
23227
  }
23096
23228
  if (typeof props.onFork === "function") hasForkCallback = true;
23097
23229
  }
23098
- fiber = isRecord6(fiber.return) ? fiber.return : null;
23230
+ fiber = isRecord7(fiber.return) ? fiber.return : null;
23099
23231
  }
23100
23232
  if (!hasForkCallback || conversationIds.size !== 1 || !conversationIds.has(threadId.data) || turnIds.size !== 1 || !turnIds.has(turnId.data) || hostIds.size !== 1 || !hostIds.has("local") || projectlessStates.size !== 1) {
23101
23233
  return null;
@@ -23213,12 +23345,12 @@ ${error51.stderrTail}`] : []
23213
23345
  if (agent === "kiro-cli") return encodeHarnessPluginRoute({ harnessId: KIRO_CLI_HARNESS_ID });
23214
23346
  if (agent === "codebuddy" || agent === "workbuddy" || agent === "cursor-cli")
23215
23347
  return encodeHarnessPluginRoute({ harnessId: harnessIdSchema.parse(agent) });
23216
- if (agent === "qoder" || agent === "qoder-cn") {
23348
+ if (agent === "qoder" || agent === "qoder-cn" || agent === "kimi-code") {
23217
23349
  return encodeHarnessPluginRoute({ harnessId: harnessIdSchema.parse(agent) });
23218
23350
  }
23219
23351
  return null;
23220
23352
  }
23221
- function isRecord7(value) {
23353
+ function isRecord8(value) {
23222
23354
  return typeof value === "object" && value !== null && !Array.isArray(value);
23223
23355
  }
23224
23356
  function piTransportModelId(model, thinkingOptionId) {
@@ -23477,7 +23609,7 @@ ${error51.stderrTail}`] : []
23477
23609
  let fiber = findComposerFiber(composer);
23478
23610
  for (let depth = 0; fiber && depth < 120; depth += 1) {
23479
23611
  const props = fiber.memoizedProps;
23480
- if (isRecord7(props) && "conversationId" in props && props.conversationId != null) {
23612
+ if (isRecord8(props) && "conversationId" in props && props.conversationId != null) {
23481
23613
  const candidate = hostThreadIdSchema.safeParse(props.conversationId);
23482
23614
  if (!candidate.success || threadId !== void 0 && threadId !== candidate.data) {
23483
23615
  return null;
@@ -23490,12 +23622,12 @@ ${error51.stderrTail}`] : []
23490
23622
  return threadId;
23491
23623
  }
23492
23624
  function isLegacySevenSlotDraftWrapper(value) {
23493
- if (!Array.isArray(value) || value.length !== 7 || value[3] !== value[5] || value[3] !== value[6] || !isRecord7(value[3]) || typeof value[3].get !== "function" || typeof value[2] !== "string" && value[2] !== null) {
23625
+ if (!Array.isArray(value) || value.length !== 7 || value[3] !== value[5] || value[3] !== value[6] || !isRecord8(value[3]) || typeof value[3].get !== "function" || typeof value[2] !== "string" && value[2] !== null) {
23494
23626
  return false;
23495
23627
  }
23496
23628
  try {
23497
23629
  const draft = value[3].get();
23498
- return isRecord7(draft) && "modelSettings" in draft && "isManuallyChanged" in draft;
23630
+ return isRecord8(draft) && "modelSettings" in draft && "isManuallyChanged" in draft;
23499
23631
  } catch {
23500
23632
  return false;
23501
23633
  }
@@ -23529,8 +23661,8 @@ ${error51.stderrTail}`] : []
23529
23661
  let fiber = findComposerFiber(composer);
23530
23662
  for (let depth = 0; fiber && depth < 120; depth += 1) {
23531
23663
  const updateQueue = fiber.updateQueue;
23532
- const memoCache = isRecord7(updateQueue) ? updateQueue.memoCache : null;
23533
- const data = isRecord7(memoCache) && Array.isArray(memoCache.data) ? memoCache.data : [];
23664
+ const memoCache = isRecord8(updateQueue) ? updateQueue.memoCache : null;
23665
+ const data = isRecord8(memoCache) && Array.isArray(memoCache.data) ? memoCache.data : [];
23534
23666
  for (const value of data) {
23535
23667
  const draftId = draftIdFromMemoValue(value);
23536
23668
  if (draftId) draftIds.add(draftId);
@@ -23557,7 +23689,7 @@ ${error51.stderrTail}`] : []
23557
23689
  return ["default", draftIds.values().next().value];
23558
23690
  }
23559
23691
  function isDraftPrewarmPolicyReady(value) {
23560
- return isRecord7(value) && value.state === "ready" && typeof value.hostId === "string" && value.hostId.length > 0 && typeof value.select === "function" && typeof value.clear === "function";
23692
+ return isRecord8(value) && value.state === "ready" && typeof value.hostId === "string" && value.hostId.length > 0 && typeof value.select === "function" && typeof value.clear === "function";
23561
23693
  }
23562
23694
  async function waitForRendererDraftPrewarmPolicy(target, composer) {
23563
23695
  const deadline = Date.now() + DRAFT_PREWARM_POLICY_WAIT_TIMEOUT_MS;
@@ -23577,7 +23709,7 @@ ${error51.stderrTail}`] : []
23577
23709
  ...model ? { model } : {},
23578
23710
  ...thinkingOptionId && agent !== "cursor-cli" ? { thinkingOptionId } : {},
23579
23711
  ...permissionModeId ? { permissionModeId } : {}
23580
- }) : agent === "hermes" ? hermesTransportModelId(model, permissionModeId) : agent === "qoder" || agent === "qoder-cn" ? encodeHarnessPluginRoute({
23712
+ }) : agent === "hermes" ? hermesTransportModelId(model, permissionModeId) : agent === "qoder" || agent === "qoder-cn" || agent === "kimi-code" ? encodeHarnessPluginRoute({
23581
23713
  harnessId: harnessIdSchema.parse(agent),
23582
23714
  ...model ? { model } : {},
23583
23715
  ...thinkingOptionId ? { thinkingOptionId } : {},
@@ -23792,11 +23924,11 @@ ${error51.stderrTail}`] : []
23792
23924
  return null;
23793
23925
  }
23794
23926
  }
23795
- function isRecord8(value) {
23927
+ function isRecord9(value) {
23796
23928
  return typeof value === "object" && value !== null && !Array.isArray(value);
23797
23929
  }
23798
23930
  function parseExternalConfiguration(value) {
23799
- if (!isRecord8(value)) return void 0;
23931
+ if (!isRecord9(value)) return void 0;
23800
23932
  const model = harnessModelRefSchema.safeParse(value.model);
23801
23933
  if (!model.success) return void 0;
23802
23934
  const thinkingOptionId = harnessThinkingOptionIdSchema.safeParse(value.thinkingOptionId);
@@ -23813,9 +23945,9 @@ ${error51.stderrTail}`] : []
23813
23945
  const raw = storage.getItem(RENDERER_NEW_THREAD_PREFERENCE_KEY);
23814
23946
  if (!raw) return void 0;
23815
23947
  const parsed = JSON.parse(raw);
23816
- if (!isRecord8(parsed) || parsed.version !== 1) return void 0;
23948
+ if (!isRecord9(parsed) || parsed.version !== 1) return void 0;
23817
23949
  if (!KNOWN_RENDERER_AGENTS.some((agent) => agent === parsed.lastAgent)) return void 0;
23818
- const externalByAgent = isRecord8(parsed.externalByAgent) ? parsed.externalByAgent : {};
23950
+ const externalByAgent = isRecord9(parsed.externalByAgent) ? parsed.externalByAgent : {};
23819
23951
  const parsedExternal = Object.fromEntries(
23820
23952
  KNOWN_RENDERER_AGENTS.filter(
23821
23953
  (agent) => agent !== "codex"
@@ -23887,11 +24019,63 @@ ${error51.stderrTail}`] : []
23887
24019
  );
23888
24020
  }
23889
24021
 
24022
+ // src/renderer-harness-command-claim.ts
24023
+ function inputEvent(editor, text) {
24024
+ const view = editor.ownerDocument.defaultView;
24025
+ return view?.InputEvent ? new view.InputEvent("input", {
24026
+ bubbles: true,
24027
+ composed: true,
24028
+ data: text,
24029
+ inputType: "insertText"
24030
+ }) : new (view?.Event ?? Event)("input", { bubbles: true, composed: true });
24031
+ }
24032
+ function prependTextarea(editor, prefix) {
24033
+ const view = editor.ownerDocument.defaultView;
24034
+ if (!view || !(editor instanceof view.HTMLTextAreaElement)) return false;
24035
+ const setter = Object.getOwnPropertyDescriptor(view.HTMLTextAreaElement.prototype, "value")?.set;
24036
+ if (!setter) return false;
24037
+ const start2 = editor.selectionStart;
24038
+ const end = editor.selectionEnd;
24039
+ setter.call(editor, prefix + editor.value);
24040
+ editor.dispatchEvent(inputEvent(editor, prefix));
24041
+ editor.focus({ preventScroll: true });
24042
+ if (start2 !== null && end !== null) {
24043
+ editor.setSelectionRange(start2 + prefix.length, end + prefix.length);
24044
+ }
24045
+ return true;
24046
+ }
24047
+ function prependContentEditable(editor, prefix) {
24048
+ if (editor.getAttribute("contenteditable") !== "true") return false;
24049
+ const document2 = editor.ownerDocument;
24050
+ const selection = document2.getSelection();
24051
+ if (!selection || typeof document2.execCommand !== "function") return false;
24052
+ const range = document2.createRange();
24053
+ range.selectNodeContents(editor);
24054
+ range.collapse(true);
24055
+ editor.focus({ preventScroll: true });
24056
+ selection.removeAllRanges();
24057
+ selection.addRange(range);
24058
+ return document2.execCommand("insertText", false, prefix);
24059
+ }
24060
+ function prependEditor(editor, prefix) {
24061
+ return prependTextarea(editor, prefix) || prependContentEditable(editor, prefix);
24062
+ }
24063
+ function rendererHarnessCommandExecutesDirectly(command) {
24064
+ return command.invocation === "/compact" || command.argumentMode === "none";
24065
+ }
24066
+ function routeRendererHarnessCommandSelection(editor, command, execute) {
24067
+ if (rendererHarnessCommandExecutesDirectly(command)) {
24068
+ execute();
24069
+ return true;
24070
+ }
24071
+ return editor !== null && prependEditor(editor, `${command.invocation} `);
24072
+ }
24073
+
23890
24074
  // src/codex-locale-adapter.ts
23891
24075
  var GET_LOCALE_OVERRIDE_URL = "vscode://codex/get-setting";
23892
24076
  var GET_LOCALE_INFO_URL = "vscode://codex/locale-info";
23893
24077
  var DEFAULT_LOCALE_REQUEST_TIMEOUT_MS = 750;
23894
- function isRecord9(value) {
24078
+ function isRecord10(value) {
23895
24079
  return typeof value === "object" && value !== null && !Array.isArray(value);
23896
24080
  }
23897
24081
  function canonicalLocale(value) {
@@ -23913,7 +24097,7 @@ ${error51.stderrTail}`] : []
23913
24097
  return new DOMException("The operation was aborted", "AbortError");
23914
24098
  }
23915
24099
  function parseLocaleOverride(value) {
23916
- if (!isRecord9(value) || !("value" in value)) {
24100
+ if (!isRecord10(value) || !("value" in value)) {
23917
24101
  throw new Error("Codex locale override response is malformed");
23918
24102
  }
23919
24103
  if (value.value === null) return { value: null };
@@ -23928,7 +24112,7 @@ ${error51.stderrTail}`] : []
23928
24112
  return locale;
23929
24113
  }
23930
24114
  function parseLocaleInfo(value) {
23931
- if (!isRecord9(value)) throw new Error("Codex locale info response is malformed");
24115
+ if (!isRecord10(value)) throw new Error("Codex locale info response is malformed");
23932
24116
  return {
23933
24117
  ideLocale: optionalLocale(value.ideLocale, "IDE locale"),
23934
24118
  systemLocale: optionalLocale(value.systemLocale, "system locale")
@@ -23957,7 +24141,7 @@ ${error51.stderrTail}`] : []
23957
24141
  const onAbort = () => settle(() => reject(abortError2()));
23958
24142
  const onMessage = (event) => {
23959
24143
  const message2 = event.data;
23960
- if (!isRecord9(message2) || message2.type !== "fetch-response") return;
24144
+ if (!isRecord10(message2) || message2.type !== "fetch-response") return;
23961
24145
  if (message2.requestId !== requestId) return;
23962
24146
  if (message2.responseType !== "success" || typeof message2.status !== "number" || message2.status < 200 || message2.status >= 300 || typeof message2.bodyJsonString !== "string") {
23963
24147
  settle(() => reject(new Error("Codex locale request failed")));
@@ -25047,6 +25231,7 @@ ${error51.stderrTail}`] : []
25047
25231
  var ORDERED_ITEM_PATTERN = /^\d+[.)][ \t]+(.+?)\s*$/u;
25048
25232
  var FENCE_PATTERN = /^```([\w+-]*)\s*$/u;
25049
25233
  var THEMATIC_BREAK_PATTERN = /^(?:---|___|\*\*\*)[ \t]*$/u;
25234
+ var CJK_PATTERN = /[\u3040-\u30ff\u3400-\u9fff\uac00-\ud7af]/u;
25050
25235
  var INLINE_PATTERN = /(`+)((?:(?!\1).)+)\1|\*\*(.+?)\*\*|\[([^\]]+)\]\(([^)\s]+)\)/gu;
25051
25236
  function createReleaseNotesElement(document2, markdown) {
25052
25237
  const root = document2.createElement("div");
@@ -25168,9 +25353,20 @@ ${error51.stderrTail}`] : []
25168
25353
  index += 1;
25169
25354
  }
25170
25355
  const paragraph = document2.createElement("p");
25356
+ const primaryIsCjk = CJK_PATTERN.test(paragraphLines[0] ?? "");
25357
+ let previousWasTranslation = false;
25171
25358
  paragraphLines.forEach((line, lineIndex) => {
25359
+ if (lineIndex > 0 && !primaryIsCjk && CJK_PATTERN.test(line)) {
25360
+ const translation = document2.createElement("span");
25361
+ translation.className = "release-note-translation";
25362
+ appendInline(document2, translation, line);
25363
+ paragraph.append(translation);
25364
+ previousWasTranslation = true;
25365
+ return;
25366
+ }
25367
+ if (lineIndex > 0 && !previousWasTranslation) paragraph.append(document2.createElement("br"));
25368
+ previousWasTranslation = false;
25172
25369
  appendInline(document2, paragraph, line);
25173
- if (lineIndex < paragraphLines.length - 1) paragraph.append(document2.createElement("br"));
25174
25370
  });
25175
25371
  root.append(paragraph);
25176
25372
  return index;
@@ -26757,6 +26953,23 @@ ${error51.stderrTail}`] : []
26757
26953
  }
26758
26954
  });
26759
26955
  }
26956
+ function updateStarBanner(document2, messages) {
26957
+ const banner = document2.createElement("div");
26958
+ banner.className = "settings-update-star";
26959
+ const copy = document2.createElement("p");
26960
+ copy.className = "settings-update-star__copy";
26961
+ copy.textContent = messages.updateStarCallout;
26962
+ const link = document2.createElement("a");
26963
+ link.className = "settings-update-link settings-update-star__link";
26964
+ link.href = CODEXHOST_GITHUB_REPOSITORY_URL;
26965
+ link.target = "_blank";
26966
+ link.rel = "noopener noreferrer";
26967
+ const star = createRendererSettingsIcon("star", 14);
26968
+ star.classList.add("settings-update-star__mark");
26969
+ link.append(createRendererSettingsIcon("github", 15), messages.updateStarLink, star);
26970
+ banner.append(copy, link);
26971
+ return banner;
26972
+ }
26760
26973
  function updatesPage(messages, getClient) {
26761
26974
  return Object.freeze({
26762
26975
  id: "updates",
@@ -26863,8 +27076,10 @@ ${error51.stderrTail}`] : []
26863
27076
  controls.append(manualTitle, manualNpm, manualWindowsInstaller, actions);
26864
27077
  const notes = document2.createElement("div");
26865
27078
  notes.className = "settings-update-notes-section";
26866
- context.content.append(heading, metadata, panel, controls, notes);
27079
+ const starBanner = updateStarBanner(document2, messages);
27080
+ context.content.append(heading, metadata, panel, controls, starBanner, notes);
26867
27081
  const setManualFallback = (fallback) => {
27082
+ controls.className = !fallback && !windows ? "settings-update-controls is-quiet" : "settings-update-controls";
26868
27083
  manualNpmDescription.textContent = windows ? messages.updateWindowsNpmDescription : fallback ? messages.updateManualFallbackDescription : messages.updateManualNpmDescription;
26869
27084
  manualNpmDescription.className = fallback ? "settings-update-manual-description is-fallback" : "settings-update-manual-description";
26870
27085
  };
@@ -26879,6 +27094,7 @@ ${error51.stderrTail}`] : []
26879
27094
  };
26880
27095
  const renderUnavailable = (detail) => {
26881
27096
  panel.dataset.updateState = "unavailable";
27097
+ delete panel.dataset.inline;
26882
27098
  panel.replaceChildren();
26883
27099
  const copy = document2.createElement("p");
26884
27100
  copy.className = "settings-update-summary";
@@ -26887,9 +27103,10 @@ ${error51.stderrTail}`] : []
26887
27103
  notes.replaceChildren();
26888
27104
  };
26889
27105
  const renderRequestFailure = (error51) => {
27106
+ console.error("codexhost update request failed", error51);
26890
27107
  renderPendingStatus(
26891
27108
  null,
26892
- error51 instanceof RendererUpdateRequestTimeoutError ? messages.updateRequestTimeout : error51 instanceof Error ? error51.message : messages.updateFailed,
27109
+ error51 instanceof RendererUpdateRequestTimeoutError ? messages.updateRequestTimeout : messages.updateServiceUnavailable,
26893
27110
  "failed"
26894
27111
  );
26895
27112
  };
@@ -26907,11 +27124,17 @@ ${error51.stderrTail}`] : []
26907
27124
  {
26908
27125
  success(result) {
26909
27126
  const message = statusMessage(result.status, messages);
26910
- if (isPendingStatus(result.status)) scheduleStatusPoll(client);
26911
27127
  if (message) renderPendingStatus(result.status, message);
27128
+ if (result.status === null || isPendingStatus(result.status)) {
27129
+ scheduleStatusPoll(client);
27130
+ }
26912
27131
  },
26913
27132
  failure(error51) {
26914
- renderRequestFailure(error51);
27133
+ if (error51 instanceof RendererUpdateRequestTimeoutError) {
27134
+ scheduleStatusPoll(client);
27135
+ } else {
27136
+ renderRequestFailure(error51);
27137
+ }
26915
27138
  }
26916
27139
  }
26917
27140
  );
@@ -26919,6 +27142,7 @@ ${error51.stderrTail}`] : []
26919
27142
  };
26920
27143
  const renderPendingStatus = (status, message, viewPhase = status?.phase ?? "pending") => {
26921
27144
  panel.dataset.updateState = viewPhase;
27145
+ delete panel.dataset.inline;
26922
27146
  panel.replaceChildren();
26923
27147
  panel.append(createPanelHead(document2, viewPhase, message));
26924
27148
  setManualFallback(viewPhase === "failed");
@@ -26937,14 +27161,6 @@ ${error51.stderrTail}`] : []
26937
27161
  detail.textContent = `${percent}% \xB7 ${formatUpdateBytes(status.downloadedBytes)} / ${formatUpdateBytes(status.totalBytes)}`;
26938
27162
  panel.append(progress, detail);
26939
27163
  }
26940
- if (viewPhase === "failed") {
26941
- const retry = document2.createElement("button");
26942
- retry.type = "button";
26943
- retry.className = "settings-command-button";
26944
- retry.append(createRendererSettingsIcon("refresh", 16), messages.updateRetry);
26945
- retry.addEventListener("click", () => void load());
26946
- panel.append(createPanelActions(document2, retry));
26947
- }
26948
27164
  };
26949
27165
  const start2 = (client) => {
26950
27166
  if (pending) return;
@@ -26963,7 +27179,11 @@ ${error51.stderrTail}`] : []
26963
27179
  },
26964
27180
  failure(error51) {
26965
27181
  pending = false;
26966
- renderRequestFailure(error51);
27182
+ if (error51 instanceof RendererUpdateRequestTimeoutError) {
27183
+ scheduleStatusPoll(client, true);
27184
+ } else {
27185
+ renderRequestFailure(error51);
27186
+ }
26967
27187
  }
26968
27188
  }
26969
27189
  );
@@ -26995,15 +27215,16 @@ ${error51.stderrTail}`] : []
26995
27215
  panel.dataset.updateState = view;
26996
27216
  panel.replaceChildren();
26997
27217
  setManualFallback(Boolean(result.error) || actionableStatus !== null);
26998
- if (result.error || !result.updateAvailable || windows || actionableStatus) {
26999
- panel.append(
27000
- createPanelHead(
27001
- document2,
27002
- view,
27003
- actionableStatus ? statusMessage(actionableStatus, messages) ?? messages.updateFailed : result.error ? messages.updateFailed : result.updateAvailable ? messages.updateWindowsManualRequired : messages.updateUpToDate
27004
- )
27005
- );
27006
- }
27218
+ const inlineUpdate = !result.error && !windows && !actionableStatus && result.updateAvailable;
27219
+ if (inlineUpdate) panel.dataset.inline = "";
27220
+ else delete panel.dataset.inline;
27221
+ panel.append(
27222
+ createPanelHead(
27223
+ document2,
27224
+ view,
27225
+ actionableStatus ? statusMessage(actionableStatus, messages) ?? messages.updateFailed : result.error ? messages.updateFailed : result.updateAvailable ? windows ? messages.updateWindowsManualRequired : messages.updateAvailable : messages.updateUpToDate
27226
+ )
27227
+ );
27007
27228
  if (actionableStatus?.error) {
27008
27229
  const error51 = document2.createElement("p");
27009
27230
  error51.className = "settings-update-error";
@@ -27357,6 +27578,7 @@ ${error51.stderrTail}`] : []
27357
27578
  .settings-nav-star-link {
27358
27579
  margin-top: 0;
27359
27580
  color: var(--settings-text);
27581
+ font-weight: 600;
27360
27582
  text-decoration: none;
27361
27583
  }
27362
27584
 
@@ -28331,11 +28553,13 @@ ${error51.stderrTail}`] : []
28331
28553
  .settings-connection-install-callout p,
28332
28554
  .settings-connection-error-summary p,
28333
28555
  .settings-connection-state-summary p,
28334
- .settings-connection-issue-note {
28556
+ .settings-connection-issue-note,
28557
+ .settings-connection-compatibility {
28335
28558
  margin: 0;
28336
28559
  color: var(--settings-muted);
28337
28560
  font-size: 11px;
28338
28561
  line-height: 16px;
28562
+ overflow-wrap: anywhere;
28339
28563
  }
28340
28564
 
28341
28565
  .settings-connection-install-button {
@@ -28555,12 +28779,10 @@ ${error51.stderrTail}`] : []
28555
28779
  }
28556
28780
 
28557
28781
  .settings-update-metadata {
28558
- display: grid;
28559
- grid-template-columns: repeat(3, minmax(0, 1fr));
28560
- gap: 24px;
28561
- margin-bottom: 24px;
28562
- padding: 0 4px 20px;
28563
- border-bottom: 1px solid var(--settings-divider);
28782
+ display: flex;
28783
+ flex-wrap: wrap;
28784
+ gap: 12px 48px;
28785
+ margin-bottom: 20px;
28564
28786
  }
28565
28787
 
28566
28788
  .settings-update-metadata__item {
@@ -28585,7 +28807,7 @@ ${error51.stderrTail}`] : []
28585
28807
  }
28586
28808
 
28587
28809
  /* The only emphasis on this screen: a latest version newer than the installed one. */
28588
- .settings-update-metadata__value--newer {
28810
+ .settings-update-metadata__item strong.settings-update-metadata__value--newer {
28589
28811
  color: var(--settings-focus);
28590
28812
  }
28591
28813
 
@@ -28599,6 +28821,13 @@ ${error51.stderrTail}`] : []
28599
28821
  border-radius: 8px;
28600
28822
  }
28601
28823
 
28824
+ /* Update available: status on the left, the one action on the right. */
28825
+ .settings-update-panel[data-inline] {
28826
+ grid-template-columns: minmax(0, 1fr) auto;
28827
+ align-items: center;
28828
+ padding: 14px 16px;
28829
+ }
28830
+
28602
28831
  .settings-update-panel__head {
28603
28832
  display: flex;
28604
28833
  align-items: center;
@@ -28610,19 +28839,33 @@ ${error51.stderrTail}`] : []
28610
28839
  color: var(--settings-muted);
28611
28840
  }
28612
28841
 
28613
- .settings-update-panel[data-update-state="available"] .codexhost-settings-icon,
28614
- .settings-update-panel[data-update-state="downloading"] .codexhost-settings-icon,
28615
- .settings-update-panel[data-update-state="installing"] .codexhost-settings-icon,
28616
- .settings-update-panel[data-update-state="restarting"] .codexhost-settings-icon {
28842
+ .settings-update-panel[data-update-state="available"]
28843
+ .settings-update-panel__head
28844
+ .codexhost-settings-icon,
28845
+ .settings-update-panel[data-update-state="downloading"]
28846
+ .settings-update-panel__head
28847
+ .codexhost-settings-icon,
28848
+ .settings-update-panel[data-update-state="installing"]
28849
+ .settings-update-panel__head
28850
+ .codexhost-settings-icon,
28851
+ .settings-update-panel[data-update-state="restarting"]
28852
+ .settings-update-panel__head
28853
+ .codexhost-settings-icon {
28617
28854
  color: var(--settings-focus);
28618
28855
  }
28619
28856
 
28620
- .settings-update-panel[data-update-state="current"] .codexhost-settings-icon {
28857
+ .settings-update-panel[data-update-state="current"]
28858
+ .settings-update-panel__head
28859
+ .codexhost-settings-icon {
28621
28860
  color: var(--settings-success);
28622
28861
  }
28623
28862
 
28624
- .settings-update-panel[data-update-state="failed"] .codexhost-settings-icon,
28625
- .settings-update-panel[data-update-state="error"] .codexhost-settings-icon {
28863
+ .settings-update-panel[data-update-state="failed"]
28864
+ .settings-update-panel__head
28865
+ .codexhost-settings-icon,
28866
+ .settings-update-panel[data-update-state="error"]
28867
+ .settings-update-panel__head
28868
+ .codexhost-settings-icon {
28626
28869
  color: var(--settings-danger);
28627
28870
  }
28628
28871
 
@@ -28679,7 +28922,7 @@ ${error51.stderrTail}`] : []
28679
28922
  display: grid;
28680
28923
  min-width: 0;
28681
28924
  gap: 12px;
28682
- color: var(--settings-muted);
28925
+ color: var(--settings-text);
28683
28926
  font-size: 14px;
28684
28927
  line-height: 22px;
28685
28928
  overflow-wrap: anywhere;
@@ -28705,13 +28948,13 @@ ${error51.stderrTail}`] : []
28705
28948
  }
28706
28949
 
28707
28950
  .settings-update-notes h1 {
28708
- font-size: 18px;
28709
- line-height: 26px;
28951
+ font-size: 16px;
28952
+ line-height: 24px;
28710
28953
  }
28711
28954
 
28712
28955
  .settings-update-notes h2 {
28713
- font-size: 17px;
28714
- line-height: 24px;
28956
+ font-size: 15px;
28957
+ line-height: 22px;
28715
28958
  }
28716
28959
 
28717
28960
  .settings-update-notes h3,
@@ -28745,7 +28988,7 @@ ${error51.stderrTail}`] : []
28745
28988
  }
28746
28989
 
28747
28990
  .settings-update-notes li + li {
28748
- margin-top: 14px;
28991
+ margin-top: 6px;
28749
28992
  }
28750
28993
 
28751
28994
  .settings-update-notes .release-note-translation {
@@ -28819,6 +29062,27 @@ ${error51.stderrTail}`] : []
28819
29062
  margin-top: 24px;
28820
29063
  }
28821
29064
 
29065
+ .settings-update-controls.is-quiet {
29066
+ margin-top: 10px;
29067
+ }
29068
+
29069
+ .settings-update-controls.is-quiet .settings-update-manual-title {
29070
+ display: none;
29071
+ }
29072
+
29073
+ .settings-update-controls.is-quiet .settings-update-link {
29074
+ min-height: 0;
29075
+ padding: 0;
29076
+ color: var(--settings-muted);
29077
+ background: transparent;
29078
+ border: 0;
29079
+ }
29080
+
29081
+ .settings-update-controls.is-quiet .settings-update-link:hover {
29082
+ color: var(--settings-text);
29083
+ background: transparent;
29084
+ }
29085
+
28822
29086
  .settings-update-manual-title {
28823
29087
  color: var(--settings-text);
28824
29088
  font-size: 15px;
@@ -28968,6 +29232,46 @@ ${error51.stderrTail}`] : []
28968
29232
  outline-offset: 2px;
28969
29233
  }
28970
29234
 
29235
+ .settings-update-star {
29236
+ display: flex;
29237
+ align-items: center;
29238
+ justify-content: space-between;
29239
+ flex-wrap: wrap;
29240
+ gap: 12px 16px;
29241
+ margin-top: 16px;
29242
+ padding: 12px 14px;
29243
+ background: var(--settings-panel);
29244
+ border: 1px solid var(--settings-border);
29245
+ border-radius: 12px;
29246
+ }
29247
+
29248
+ .settings-update-star__copy {
29249
+ margin: 0;
29250
+ min-width: min(100%, 16rem);
29251
+ flex: 1;
29252
+ color: var(--settings-focus);
29253
+ font-size: 13px;
29254
+ font-weight: 600;
29255
+ line-height: 20px;
29256
+ }
29257
+
29258
+ .settings-update-star__link {
29259
+ color: var(--settings-focus);
29260
+ background: light-dark(rgb(11 117 209 / 8%), rgb(102 170 249 / 12%));
29261
+ border-color: light-dark(rgb(11 117 209 / 22%), rgb(102 170 249 / 32%));
29262
+ }
29263
+
29264
+ .settings-update-star__link:hover {
29265
+ background: light-dark(rgb(11 117 209 / 14%), rgb(102 170 249 / 18%));
29266
+ border-color: light-dark(rgb(11 117 209 / 32%), rgb(102 170 249 / 42%));
29267
+ }
29268
+
29269
+ .settings-update-star__mark {
29270
+ color: light-dark(#f5b400, #ffd15c);
29271
+ fill: currentColor;
29272
+ stroke: none;
29273
+ }
29274
+
28971
29275
  .codexhost-settings-icon {
28972
29276
  display: block;
28973
29277
  flex: none;
@@ -29880,7 +30184,7 @@ ${error51.stderrTail}`] : []
29880
30184
  `;
29881
30185
 
29882
30186
  // src/settings/tailwind.css
29883
- var tailwind_default = '@layer properties, theme, base, components, utilities;\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-content:"";--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0}}}@layer theme{:root,:host{--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--tracking-tight:-.025em;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1)}}@layer utilities{.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.relative{position:relative}.top-full{top:100%}.left-0{left:0}.z-20{z-index:20}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.m-0{margin:0}.mx-2{margin-inline:calc(var(--spacing) * 2)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-7{margin-top:calc(var(--spacing) * 7)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mt-16{margin-top:calc(var(--spacing) * 16)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-1{margin-left:var(--spacing)}.ml-\\[45px\\]{margin-left:45px}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.table{display:table}.size-1\\.5{width:calc(var(--spacing) * 1.5);height:calc(var(--spacing) * 1.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-8{height:calc(var(--spacing) * 8)}.min-h-6{min-height:calc(var(--spacing) * 6)}.min-h-\\[60px\\]{min-height:60px}.w-9{width:calc(var(--spacing) * 9)}.w-14{width:calc(var(--spacing) * 14)}.w-80{width:calc(var(--spacing) * 80)}.w-full{width:100%}.w-px{width:1px}.max-w-64{max-width:calc(var(--spacing) * 64)}.min-w-0{min-width:0}.flex-shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-help{cursor:help}.cursor-pointer{cursor:pointer}.resize{resize:both}.list-disc{list-style-type:disc}.appearance-none{appearance:none}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.overflow-x-auto{overflow-x:auto}.rounded-\\[10px\\]{border-radius:10px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-settings-border{border-color:var(--settings-border)}.border-settings-divider{border-color:var(--settings-divider)}.bg-settings-panel{background-color:var(--settings-panel)}.bg-settings-subtle{background-color:var(--settings-subtle)}.bg-settings-surface{background-color:var(--settings-surface)}.bg-settings-surface-hover{background-color:var(--settings-surface-hover)}.bg-transparent{background-color:#0000}.p-0{padding:0}.p-4{padding:calc(var(--spacing) * 4)}.\\!px-0{padding-inline:0!important}.px-1{padding-inline:var(--spacing)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pl-4{padding-left:calc(var(--spacing) * 4)}.\\!text-right{text-align:right!important}.text-left{text-align:left}.text-right{text-align:right}.align-top{vertical-align:top}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[11px\\]{font-size:11px}.text-\\[13px\\]{font-size:13px}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-7{--tw-leading:calc(var(--spacing) * 7);line-height:calc(var(--spacing) * 7)}.leading-\\[18px\\]{--tw-leading:18px;line-height:18px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.text-wrap{text-wrap:wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-pre-wrap{white-space:pre-wrap}.text-settings-muted{color:var(--settings-muted)}.text-settings-subtle{color:var(--settings-subtle)}.text-settings-text{color:var(--settings-text)}.lowercase{text-transform:lowercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.opacity-0{opacity:0}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_10px_30px_rgb\\(0_0_0\\/0\\.22\\)\\]{--tw-shadow:0 10px 30px var(--tw-shadow-color,#00000038);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-settings-border{--tw-ring-color:var(--settings-border)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.outline-none{--tw-outline-style:none;outline-style:none}.ring-inset{--tw-ring-inset:inset}.group-focus-within\\:visible:is(:where(.group):focus-within *){visibility:visible}.group-focus-within\\:opacity-100:is(:where(.group):focus-within *){opacity:1}@media (hover:hover){.group-hover\\:visible:is(:where(.group):hover *){visibility:visible}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.group-data-\\[state\\=failed\\]\\/status\\:bg-settings-danger:is(:where(.group\\/status)[data-state=failed] *){background-color:var(--settings-danger)}.group-data-\\[state\\=unavailable\\]\\/status\\:bg-settings-warning:is(:where(.group\\/status)[data-state=unavailable] *){background-color:var(--settings-warning)}.marker\\:text-settings-subtle ::marker{color:var(--settings-subtle)}.marker\\:text-settings-subtle::marker{color:var(--settings-subtle)}.marker\\:text-settings-subtle ::-webkit-details-marker{color:var(--settings-subtle)}.marker\\:text-settings-subtle::-webkit-details-marker{color:var(--settings-subtle)}.before\\:absolute:before{content:var(--tw-content);position:absolute}.before\\:top-0\\.5:before{content:var(--tw-content);top:calc(var(--spacing) * .5)}.before\\:left-0\\.5:before{content:var(--tw-content);left:calc(var(--spacing) * .5)}.before\\:size-4:before{content:var(--tw-content);width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.before\\:rounded-full:before{content:var(--tw-content);border-radius:3.40282e38px}.before\\:bg-white:before{content:var(--tw-content);background-color:#fff}.before\\:shadow-\\[0_1px_2px_rgb\\(0_0_0\\/0\\.3\\)\\]:before{content:var(--tw-content);--tw-shadow:0 1px 2px var(--tw-shadow-color,#0000004d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.before\\:transition-transform:before{content:var(--tw-content);transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.first\\:border-t-0:first-child{border-top-style:var(--tw-border-style);border-top-width:0}.first-of-type\\:mt-0:first-of-type{margin-top:0}.checked\\:bg-settings-focus:checked{background-color:var(--settings-focus)}.checked\\:ring-transparent:checked{--tw-ring-color:transparent}.checked\\:before\\:translate-x-4:checked:before{content:var(--tw-content);--tw-translate-x:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.focus-within\\:border-settings-focus:focus-within{border-color:var(--settings-focus)}@media (hover:hover){.hover\\:text-settings-text:hover{color:var(--settings-text)}}.focus-visible\\:text-settings-text:focus-visible{color:var(--settings-text)}.focus-visible\\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\\:outline-settings-focus:focus-visible{outline-color:var(--settings-focus)}.data-\\[invalid\\=true\\]\\:border-settings-danger[data-invalid=true]{border-color:var(--settings-danger)}.data-\\[invalid\\=true\\]\\:text-settings-danger[data-invalid=true],.data-\\[state\\=failed\\]\\:text-settings-danger[data-state=failed]{color:var(--settings-danger)}.data-\\[state\\=unavailable\\]\\:text-settings-warning[data-state=unavailable]{color:var(--settings-warning)}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@layer properties{\n *, ::before, ::after, ::backdrop{--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-alpha:100%;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-offset-width:0;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-drop-shadow-alpha:100%;--tw-content:"";--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0}}\n';
30187
+ var tailwind_default = '@layer properties, theme, base, components, utilities;\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-content:"";--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0}}}@layer theme{:root,:host{--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--tracking-tight:-.025em;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1)}}@layer utilities{.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.relative{position:relative}.top-full{top:100%}.left-0{left:0}.z-20{z-index:20}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.m-0{margin:0}.mx-2{margin-inline:calc(var(--spacing) * 2)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-7{margin-top:calc(var(--spacing) * 7)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mt-16{margin-top:calc(var(--spacing) * 16)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-1{margin-left:var(--spacing)}.ml-\\[45px\\]{margin-left:45px}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.list-item{display:list-item}.table{display:table}.size-1\\.5{width:calc(var(--spacing) * 1.5);height:calc(var(--spacing) * 1.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-8{height:calc(var(--spacing) * 8)}.min-h-6{min-height:calc(var(--spacing) * 6)}.min-h-\\[60px\\]{min-height:60px}.w-9{width:calc(var(--spacing) * 9)}.w-14{width:calc(var(--spacing) * 14)}.w-80{width:calc(var(--spacing) * 80)}.w-full{width:100%}.w-px{width:1px}.max-w-64{max-width:calc(var(--spacing) * 64)}.min-w-0{min-width:0}.flex-shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-help{cursor:help}.cursor-pointer{cursor:pointer}.resize{resize:both}.list-disc{list-style-type:disc}.appearance-none{appearance:none}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.overflow-x-auto{overflow-x:auto}.rounded-\\[10px\\]{border-radius:10px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-settings-border{border-color:var(--settings-border)}.border-settings-divider{border-color:var(--settings-divider)}.bg-settings-panel{background-color:var(--settings-panel)}.bg-settings-subtle{background-color:var(--settings-subtle)}.bg-settings-surface{background-color:var(--settings-surface)}.bg-settings-surface-hover{background-color:var(--settings-surface-hover)}.bg-transparent{background-color:#0000}.p-0{padding:0}.p-4{padding:calc(var(--spacing) * 4)}.\\!px-0{padding-inline:0!important}.px-1{padding-inline:var(--spacing)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pl-4{padding-left:calc(var(--spacing) * 4)}.\\!text-right{text-align:right!important}.text-left{text-align:left}.text-right{text-align:right}.align-top{vertical-align:top}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[11px\\]{font-size:11px}.text-\\[13px\\]{font-size:13px}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-7{--tw-leading:calc(var(--spacing) * 7);line-height:calc(var(--spacing) * 7)}.leading-\\[18px\\]{--tw-leading:18px;line-height:18px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.text-wrap{text-wrap:wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-pre-wrap{white-space:pre-wrap}.text-settings-muted{color:var(--settings-muted)}.text-settings-subtle{color:var(--settings-subtle)}.text-settings-text{color:var(--settings-text)}.lowercase{text-transform:lowercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.opacity-0{opacity:0}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_10px_30px_rgb\\(0_0_0\\/0\\.22\\)\\]{--tw-shadow:0 10px 30px var(--tw-shadow-color,#00000038);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-settings-border{--tw-ring-color:var(--settings-border)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.outline-none{--tw-outline-style:none;outline-style:none}.ring-inset{--tw-ring-inset:inset}.group-focus-within\\:visible:is(:where(.group):focus-within *){visibility:visible}.group-focus-within\\:opacity-100:is(:where(.group):focus-within *){opacity:1}@media (hover:hover){.group-hover\\:visible:is(:where(.group):hover *){visibility:visible}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.group-data-\\[state\\=failed\\]\\/status\\:bg-settings-danger:is(:where(.group\\/status)[data-state=failed] *){background-color:var(--settings-danger)}.group-data-\\[state\\=unavailable\\]\\/status\\:bg-settings-warning:is(:where(.group\\/status)[data-state=unavailable] *){background-color:var(--settings-warning)}.marker\\:text-settings-subtle ::marker{color:var(--settings-subtle)}.marker\\:text-settings-subtle::marker{color:var(--settings-subtle)}.marker\\:text-settings-subtle ::-webkit-details-marker{color:var(--settings-subtle)}.marker\\:text-settings-subtle::-webkit-details-marker{color:var(--settings-subtle)}.before\\:absolute:before{content:var(--tw-content);position:absolute}.before\\:top-0\\.5:before{content:var(--tw-content);top:calc(var(--spacing) * .5)}.before\\:left-0\\.5:before{content:var(--tw-content);left:calc(var(--spacing) * .5)}.before\\:size-4:before{content:var(--tw-content);width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.before\\:rounded-full:before{content:var(--tw-content);border-radius:3.40282e38px}.before\\:bg-white:before{content:var(--tw-content);background-color:#fff}.before\\:shadow-\\[0_1px_2px_rgb\\(0_0_0\\/0\\.3\\)\\]:before{content:var(--tw-content);--tw-shadow:0 1px 2px var(--tw-shadow-color,#0000004d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.before\\:transition-transform:before{content:var(--tw-content);transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.first\\:border-t-0:first-child{border-top-style:var(--tw-border-style);border-top-width:0}.first-of-type\\:mt-0:first-of-type{margin-top:0}.checked\\:bg-settings-focus:checked{background-color:var(--settings-focus)}.checked\\:ring-transparent:checked{--tw-ring-color:transparent}.checked\\:before\\:translate-x-4:checked:before{content:var(--tw-content);--tw-translate-x:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.focus-within\\:border-settings-focus:focus-within{border-color:var(--settings-focus)}@media (hover:hover){.hover\\:text-settings-text:hover{color:var(--settings-text)}}.focus-visible\\:text-settings-text:focus-visible{color:var(--settings-text)}.focus-visible\\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\\:outline-settings-focus:focus-visible{outline-color:var(--settings-focus)}.data-\\[invalid\\=true\\]\\:border-settings-danger[data-invalid=true]{border-color:var(--settings-danger)}.data-\\[invalid\\=true\\]\\:text-settings-danger[data-invalid=true],.data-\\[state\\=failed\\]\\:text-settings-danger[data-state=failed]{color:var(--settings-danger)}.data-\\[state\\=unavailable\\]\\:text-settings-warning[data-state=unavailable]{color:var(--settings-warning)}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@layer properties{\n *, ::before, ::after, ::backdrop{--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-alpha:100%;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-offset-width:0;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-drop-shadow-alpha:100%;--tw-content:"";--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0}}\n';
29884
30188
 
29885
30189
  // src/settings/shell.ts
29886
30190
  var SETTINGS_SHELL_ATTRIBUTE = "data-codexhost-settings-shell";
@@ -29924,7 +30228,7 @@ ${accounts_default}`;
29924
30228
  brandCopy.className = "settings-brand__copy";
29925
30229
  const brandName = ownerDocument.createElement("span");
29926
30230
  brandName.className = "settings-brand__name";
29927
- brandName.textContent = "Codex Host";
30231
+ brandName.textContent = "CodexHost";
29928
30232
  const brandTitle = ownerDocument.createElement("span");
29929
30233
  brandTitle.className = "settings-brand__title";
29930
30234
  brandTitle.id = "codexhost-settings-dialog-title";
@@ -30036,7 +30340,7 @@ ${accounts_default}`;
30036
30340
  starLink.rel = "noopener noreferrer";
30037
30341
  starLink.setAttribute("aria-label", messages.starOnGitHub);
30038
30342
  starLink.title = messages.starOnGitHub;
30039
- starLink.append(createRendererSettingsIcon("star", 17));
30343
+ starLink.append(createRendererSettingsIcon("github", 17));
30040
30344
  const starLabel = ownerDocument.createElement("span");
30041
30345
  starLabel.textContent = messages.starOnGitHub;
30042
30346
  starLink.append(starLabel);
@@ -30140,6 +30444,7 @@ ${accounts_default}`;
30140
30444
  var SETTINGS_APPLICATION_HEADER_SELECTOR = 'header[data-pip-obstacle="app-shell-header"]';
30141
30445
  var SETTINGS_HEADER_SLOT_SELECTOR = ':scope > [data-test-id="header-shell-slot"]';
30142
30446
  var SETTINGS_HEADER_NATIVE_ACTION_GROUP_SELECTOR = ':scope > [data-app-shell-header-obstacle="true"]';
30447
+ var UPDATE_ACCENT = "#3b82f6";
30143
30448
  function measuredBounds(element) {
30144
30449
  const bounds = element.getBoundingClientRect();
30145
30450
  return {
@@ -30223,26 +30528,18 @@ ${accounts_default}`;
30223
30528
  updateButton.style.display = "none";
30224
30529
  updateButton.style.alignItems = "center";
30225
30530
  updateButton.style.justifyContent = "center";
30531
+ updateButton.style.width = "28px";
30226
30532
  updateButton.style.height = "28px";
30227
- updateButton.style.padding = "0 10px";
30228
- updateButton.style.gap = "6px";
30229
- updateButton.style.border = "1px solid #1d4ed8";
30230
- updateButton.style.borderRadius = "7px";
30231
- updateButton.style.background = "#2563eb";
30232
- updateButton.style.color = "#ffffff";
30533
+ updateButton.style.padding = "0";
30534
+ updateButton.style.border = "0";
30535
+ updateButton.style.borderRadius = "8px";
30536
+ updateButton.style.background = "transparent";
30537
+ updateButton.style.color = UPDATE_ACCENT;
30233
30538
  updateButton.style.cursor = available ? "pointer" : "not-allowed";
30234
30539
  updateButton.style.opacity = available ? "1" : "0.5";
30235
- updateButton.style.boxShadow = "0 1px 2px rgba(15, 23, 42, 0.18)";
30236
30540
  updateButton.style.outlineOffset = "2px";
30237
30541
  updateButton.style.setProperty("-webkit-app-region", "no-drag");
30238
- updateButton.append(createRendererSettingsIcon("updates", 15));
30239
- const updateLabel = ownerDocument.createElement("span");
30240
- updateLabel.textContent = messages.pageLabels.updates;
30241
- updateLabel.style.fontSize = "12px";
30242
- updateLabel.style.fontWeight = "600";
30243
- updateLabel.style.lineHeight = "1";
30244
- updateLabel.style.whiteSpace = "nowrap";
30245
- updateButton.append(updateLabel);
30542
+ updateButton.append(createRendererSettingsIcon("updates", 16));
30246
30543
  const onPointerEnter = () => {
30247
30544
  if (!button.disabled) button.style.background = "rgba(127, 127, 127, 0.16)";
30248
30545
  };
@@ -30254,14 +30551,10 @@ ${accounts_default}`;
30254
30551
  if (!button.disabled) onOpen(button);
30255
30552
  };
30256
30553
  const onUpdatePointerEnter = () => {
30257
- if (!updateButton.disabled) {
30258
- updateButton.style.background = "#1d4ed8";
30259
- updateButton.style.boxShadow = "0 2px 4px rgba(15, 23, 42, 0.22)";
30260
- }
30554
+ if (!updateButton.disabled) updateButton.style.background = "rgba(59, 130, 246, 0.14)";
30261
30555
  };
30262
30556
  const onUpdatePointerLeave = () => {
30263
- updateButton.style.background = "#2563eb";
30264
- updateButton.style.boxShadow = "0 1px 2px rgba(15, 23, 42, 0.18)";
30557
+ updateButton.style.background = "transparent";
30265
30558
  };
30266
30559
  const onUpdateClick = (event) => {
30267
30560
  event.stopPropagation();
@@ -30519,6 +30812,562 @@ ${accounts_default}`;
30519
30812
  };
30520
30813
  }
30521
30814
 
30815
+ // src/renderer-native-composer-controller.ts
30816
+ var MAX_ELEMENT_DEPTH = 4;
30817
+ var MAX_FIBER_DEPTH = 40;
30818
+ function isController(value, editor) {
30819
+ if (typeof value !== "object" || value === null) return false;
30820
+ const candidate = value;
30821
+ return candidate.view?.dom === editor && typeof candidate.view.posAtDOM === "function" && typeof candidate.insertMentionNodeInRange === "function";
30822
+ }
30823
+ function fiberOf(element) {
30824
+ const key = Object.keys(element).find((name) => name.startsWith("__reactFiber$"));
30825
+ return key ? element[key] : null;
30826
+ }
30827
+ function findNativeComposerController(editor) {
30828
+ let element = editor;
30829
+ for (let depth = 0; element && depth < MAX_ELEMENT_DEPTH; depth += 1) {
30830
+ let fiber = fiberOf(element);
30831
+ for (let level = 0; fiber && level < MAX_FIBER_DEPTH; level += 1) {
30832
+ const props = fiber.memoizedProps;
30833
+ if (props && isController(props.composerController, editor)) return props.composerController;
30834
+ fiber = fiber.return;
30835
+ }
30836
+ element = element.parentElement;
30837
+ }
30838
+ return null;
30839
+ }
30840
+ function resolveRange(controller, range) {
30841
+ const from = controller.view.posAtDOM(range.node, range.start);
30842
+ const to = controller.view.posAtDOM(range.node, range.end);
30843
+ return controller.view.state.doc.textBetween(from, to) === range.expected ? { from, to } : null;
30844
+ }
30845
+ function insertNativeTextAtSelection(editor, build) {
30846
+ const controller = findNativeComposerController(editor);
30847
+ if (!controller || typeof controller.view.dispatch !== "function") return false;
30848
+ try {
30849
+ const { from } = controller.view.state.selection;
30850
+ const previous = from > 0 ? controller.view.state.doc.textBetween(from - 1, from) : "";
30851
+ controller.view.dispatch(controller.view.state.tr.insertText(build(previous)));
30852
+ return true;
30853
+ } catch {
30854
+ return false;
30855
+ }
30856
+ }
30857
+ function deleteNativeRange(editor, range) {
30858
+ const controller = findNativeComposerController(editor);
30859
+ if (!controller || typeof controller.view.dispatch !== "function") return false;
30860
+ try {
30861
+ const resolved = resolveRange(controller, range);
30862
+ if (!resolved) return false;
30863
+ controller.view.dispatch(controller.view.state.tr.delete(resolved.from, resolved.to));
30864
+ return true;
30865
+ } catch {
30866
+ return false;
30867
+ }
30868
+ }
30869
+ function insertNativeAgentMention(editor, range, mention) {
30870
+ const controller = findNativeComposerController(editor);
30871
+ const nodeType = controller?.view.state.schema.nodes.agentMention;
30872
+ if (!controller || !nodeType) return false;
30873
+ try {
30874
+ const resolved = resolveRange(controller, range);
30875
+ if (!resolved) return false;
30876
+ const { from, to } = resolved;
30877
+ controller.insertMentionNodeInRange(
30878
+ nodeType,
30879
+ {
30880
+ conversationId: null,
30881
+ displayName: mention.displayName,
30882
+ name: mention.name,
30883
+ path: mention.path
30884
+ },
30885
+ from,
30886
+ to,
30887
+ true
30888
+ );
30889
+ return true;
30890
+ } catch {
30891
+ return false;
30892
+ }
30893
+ }
30894
+
30895
+ // src/renderer-delegation-mention.ts
30896
+ var MENU_ATTRIBUTE = "data-codexhost-delegation-mention-menu";
30897
+ var STYLE_ATTRIBUTE3 = "data-codexhost-delegation-mention-style";
30898
+ var MENU_MAX_HEIGHT = 320;
30899
+ var SOURCE_TAG = "codexhost";
30900
+ var MENU_CLASS = "border-default bg-surface-elevated-secondary flex flex-col overflow-hidden rounded-[var(--radius-suggestion-menu,var(--radius-2xl))] border text-sm backdrop-blur-sm";
30901
+ var LIST_CLASS = "vertical-scroll-fade-mask flex w-full flex-1 flex-col overflow-y-auto";
30902
+ var HEADER_CLASS = "text-codex-description sticky top-0 z-10 px-row-x py-1 text-sm bg-surface-elevated-secondary";
30903
+ var ROW_CLASS = "text-default outline-hidden cursor-interaction flex w-full min-h-[var(--app-menu-item-height,0px)] shrink-0 items-center overflow-hidden rounded-[var(--suggestion-menu-item-radius,var(--radius-xl))] p-[var(--suggestion-menu-item-padding,var(--app-menu-item-padding,var(--padding-row-y)_var(--padding-row-x)))] text-start text-sm";
30904
+ var ROW_CONTENT_CLASS = "flex w-full min-w-0 items-center gap-[var(--spacing-menu-item-content,calc(var(--spacing)*1.5))]";
30905
+ var ROW_HIGHLIGHT_CLASSES = ["bg-primary-ghost-hover", "opacity-100"];
30906
+ var ROW_IDLE_CLASS = "menu-row-opacity";
30907
+ var VIEWPORT_MARGIN = 8;
30908
+ var MENU_GAP2 = 4;
30909
+ var MAX_QUERY_LENGTH = 32;
30910
+ var TRIGGER_PATTERN = /(?:^|\s)#([^\s#]*)$/u;
30911
+ function findDelegationTrigger(textBeforeCaret) {
30912
+ const match = TRIGGER_PATTERN.exec(textBeforeCaret);
30913
+ if (!match) return null;
30914
+ const query = match[1] ?? "";
30915
+ if (query.length > MAX_QUERY_LENGTH || /^\d/u.test(query)) return null;
30916
+ return { query, start: textBeforeCaret.length - query.length - 1 };
30917
+ }
30918
+ function filterDelegationTargets(targets, query) {
30919
+ const needle = query.trim().toLowerCase();
30920
+ if (!needle) return [...targets];
30921
+ const scored = targets.flatMap((target, index) => {
30922
+ const label = target.label.toLowerCase();
30923
+ const id = target.agent.toLowerCase();
30924
+ const score = label.startsWith(needle) || id.startsWith(needle) ? 2 : label.includes(needle) || id.includes(needle) ? 1 : 0;
30925
+ return score > 0 ? [{ target, score, index }] : [];
30926
+ });
30927
+ return scored.sort((left, right) => right.score - left.score || left.index - right.index).map(({ target }) => target);
30928
+ }
30929
+ function filterDelegationCommands(commands, query) {
30930
+ const needle = query.trim().toLowerCase().replace(/^\//u, "");
30931
+ if (!needle) return [...commands];
30932
+ const scored = commands.flatMap((command, index) => {
30933
+ const invocation = command.invocation.toLowerCase().replace(/^\//u, "");
30934
+ const label = command.label.toLowerCase();
30935
+ const display = harnessCommandDisplayName(command.label).toLowerCase();
30936
+ const score = invocation.startsWith(needle) || display.startsWith(needle) ? 2 : invocation.includes(needle) || label.includes(needle) || display.includes(needle) ? 1 : 0;
30937
+ return score > 0 ? [{ command, score, index }] : [];
30938
+ });
30939
+ return scored.sort((left, right) => right.score - left.score || left.index - right.index).map(({ command }) => command);
30940
+ }
30941
+ function harnessCommandDisplayName(label) {
30942
+ const slug = label.trim().replace(/^\//u, "").replace(/^skill:/u, "");
30943
+ if (!slug || /\s/u.test(slug) || /[A-Z]/u.test(slug) || /[^\x00-\x7F]/u.test(slug)) {
30944
+ return slug || label;
30945
+ }
30946
+ const name = slug.split(":").filter(Boolean).at(-1) ?? slug;
30947
+ return name.split(/[-_.]+/u).filter(Boolean).map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
30948
+ }
30949
+ var SVG_NS3 = "http://www.w3.org/2000/svg";
30950
+ function createSkillIcon(ownerDocument) {
30951
+ const svg = ownerDocument.createElementNS(SVG_NS3, "svg");
30952
+ svg.setAttribute("viewBox", "0 0 24 24");
30953
+ svg.setAttribute("fill", "none");
30954
+ svg.setAttribute("stroke", "currentColor");
30955
+ svg.setAttribute("stroke-width", "1.7");
30956
+ svg.setAttribute("stroke-linejoin", "round");
30957
+ svg.setAttribute("aria-hidden", "true");
30958
+ const path = ownerDocument.createElementNS(SVG_NS3, "path");
30959
+ path.setAttribute("d", "M12 3 20 7.5v9L12 21l-8-4.5v-9ZM4 7.5 12 12l8-4.5M12 12v9");
30960
+ svg.append(path);
30961
+ return svg;
30962
+ }
30963
+ function agentsTitle(locale) {
30964
+ return locale === "zh-CN" ? "\u59D4\u6D3E\u7ED9 Agent" : "Delegate to agent";
30965
+ }
30966
+ function commandsTitle(locale) {
30967
+ return locale === "zh-CN" ? "\u547D\u4EE4" : "Commands";
30968
+ }
30969
+ function skillsTitle(locale) {
30970
+ return locale === "zh-CN" ? "\u6280\u80FD" : "Skills";
30971
+ }
30972
+ function iconUrl(agent, ownerDocument) {
30973
+ const icon2 = createRendererAgentIcon(agent, 16, ownerDocument);
30974
+ if (icon2.tagName.toLowerCase() === "img") return icon2.src || null;
30975
+ const view = ownerDocument.defaultView;
30976
+ if (!view?.XMLSerializer) return null;
30977
+ const markup = new view.XMLSerializer().serializeToString(icon2).replaceAll("currentColor", "#808080");
30978
+ return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(markup)}`;
30979
+ }
30980
+ function cssString(value) {
30981
+ return `"${value.replace(/["\\\n]/gu, (character) => `\\${character === "\n" ? "a " : character}`)}"`;
30982
+ }
30983
+ function syncChipStyle(ownerDocument, targets, cache) {
30984
+ let style = ownerDocument.querySelector(`style[${STYLE_ATTRIBUTE3}]`);
30985
+ if (!style) {
30986
+ style = ownerDocument.createElement("style");
30987
+ style.setAttribute(STYLE_ATTRIBUTE3, "true");
30988
+ (ownerDocument.head ?? ownerDocument.documentElement).append(style);
30989
+ }
30990
+ const chip = [DELEGATION_MENTION_PATH_PREFIX, HARNESS_COMMAND_MENTION_PATH_PREFIX].map((prefix) => `[agent-mention-path^=${cssString(prefix)}][agent-mention-display-name]`).join(",");
30991
+ const withPseudo = (pseudo) => chip.split(",").map((selector) => `${selector}${pseudo}`).join(",");
30992
+ const rules = [
30993
+ withPseudo(" > span:last-child") + "{display:none;}",
30994
+ withPseudo("::after") + "{content:attr(agent-mention-display-name);}",
30995
+ ...targets.flatMap(({ agent }) => {
30996
+ if (!cache.has(agent)) cache.set(agent, iconUrl(agent, ownerDocument));
30997
+ const url2 = cache.get(agent);
30998
+ if (!url2) return [];
30999
+ const selector = `[agent-mention-path=${cssString(delegationMentionPath(agent))}]::before`;
31000
+ return [
31001
+ `${selector}{content:"";display:inline-block;width:16px;height:16px;margin-inline-end:3px;vertical-align:-3px;background:url(${cssString(url2)}) center/contain no-repeat;}`
31002
+ ];
31003
+ })
31004
+ ];
31005
+ const text = rules.join("\n");
31006
+ if (style.textContent !== text) style.textContent = text;
31007
+ }
31008
+ function installRendererDelegationMention(ownerDocument, options) {
31009
+ const view = ownerDocument.defaultView;
31010
+ if (!view) {
31011
+ return { refresh: () => void 0, openFor: () => void 0, dispose: () => void 0 };
31012
+ }
31013
+ const iconCache = /* @__PURE__ */ new Map();
31014
+ const menu = ownerDocument.createElement("div");
31015
+ menu.setAttribute(MENU_ATTRIBUTE, "true");
31016
+ menu.className = MENU_CLASS;
31017
+ Object.assign(menu.style, {
31018
+ display: "none",
31019
+ position: "fixed",
31020
+ zIndex: "2147483647",
31021
+ maxHeight: `min(${MENU_MAX_HEIGHT}px, calc(100vh - ${VIEWPORT_MARGIN * 2}px))`,
31022
+ padding: "var(--spacing)"
31023
+ });
31024
+ const list = ownerDocument.createElement("div");
31025
+ list.className = LIST_CLASS;
31026
+ list.setAttribute("role", "listbox");
31027
+ menu.append(list);
31028
+ ownerDocument.body.append(menu);
31029
+ const isMenuOpen = () => menu.style.display !== "none";
31030
+ const setMenuOpen = (open) => {
31031
+ menu.style.display = open ? "flex" : "none";
31032
+ };
31033
+ let active = null;
31034
+ let entries = [];
31035
+ let activeIndex = 0;
31036
+ let composing = false;
31037
+ let inserting = false;
31038
+ let openedFor = null;
31039
+ let rowsRendered = 0;
31040
+ const close = () => {
31041
+ active = null;
31042
+ entries = [];
31043
+ setMenuOpen(false);
31044
+ list.replaceChildren();
31045
+ };
31046
+ const highlight = () => {
31047
+ [...list.querySelectorAll("[role=option]")].forEach((item, index) => {
31048
+ const selected = index === activeIndex;
31049
+ item.setAttribute("aria-selected", String(selected));
31050
+ for (const name of ROW_HIGHLIGHT_CLASSES) item.classList.toggle(name, selected);
31051
+ item.classList.toggle(ROW_IDLE_CLASS, !selected);
31052
+ if (selected) item.scrollIntoView({ block: "nearest" });
31053
+ });
31054
+ };
31055
+ const position = (trigger) => {
31056
+ const anchor = options.anchorForEditor(trigger.editor) ?? trigger.editor;
31057
+ const rect = anchor.getBoundingClientRect();
31058
+ const width = Math.min(rect.width, view.innerWidth - VIEWPORT_MARGIN * 2);
31059
+ const left = Math.max(
31060
+ VIEWPORT_MARGIN,
31061
+ Math.min(rect.left, view.innerWidth - width - VIEWPORT_MARGIN)
31062
+ );
31063
+ menu.style.width = `${width}px`;
31064
+ menu.style.left = `${left}px`;
31065
+ const height = menu.getBoundingClientRect().height;
31066
+ const above = rect.top >= height + MENU_GAP2 + VIEWPORT_MARGIN;
31067
+ menu.style.top = above ? `${rect.top - height - MENU_GAP2}px` : `${Math.min(view.innerHeight - height - VIEWPORT_MARGIN, rect.bottom + MENU_GAP2)}px`;
31068
+ };
31069
+ const sectionHeader = (title) => {
31070
+ const header = ownerDocument.createElement("div");
31071
+ header.className = `${HEADER_CLASS} flex items-center justify-between gap-2`;
31072
+ const label = ownerDocument.createElement("span");
31073
+ label.className = "min-w-0 truncate";
31074
+ label.textContent = title;
31075
+ const source = ownerDocument.createElement("span");
31076
+ source.className = "shrink-0 text-sm text-codex-description";
31077
+ source.setAttribute("data-codexhost-source", "");
31078
+ source.textContent = SOURCE_TAG;
31079
+ header.append(label, source);
31080
+ return header;
31081
+ };
31082
+ const rowContent = (leading, labelText, detailText) => {
31083
+ const content = ownerDocument.createElement("div");
31084
+ content.className = ROW_CONTENT_CLASS;
31085
+ if (leading) {
31086
+ leading.classList.add("icon-xs", "shrink-0");
31087
+ content.append(leading);
31088
+ }
31089
+ const label = ownerDocument.createElement("span");
31090
+ label.className = "min-w-0 shrink truncate";
31091
+ label.textContent = labelText;
31092
+ content.append(label);
31093
+ if (detailText) {
31094
+ const detail = ownerDocument.createElement("span");
31095
+ detail.className = "flex-1 truncate text-codex-description";
31096
+ detail.textContent = detailText;
31097
+ content.append(detail);
31098
+ }
31099
+ return content;
31100
+ };
31101
+ const optionRow = (entry, content) => {
31102
+ const index = entries.length;
31103
+ entries.push(entry);
31104
+ const item = ownerDocument.createElement("div");
31105
+ item.setAttribute("role", "option");
31106
+ item.className = ROW_CLASS;
31107
+ item.append(content);
31108
+ item.addEventListener("pointermove", () => {
31109
+ if (activeIndex === index) return;
31110
+ activeIndex = index;
31111
+ highlight();
31112
+ });
31113
+ item.addEventListener("mousedown", (event) => event.preventDefault());
31114
+ item.addEventListener("click", () => void choose(entry));
31115
+ return item;
31116
+ };
31117
+ const render = (trigger, commands, targets) => {
31118
+ const locale = options.readLocale();
31119
+ const rows = [];
31120
+ entries = [];
31121
+ if (targets.length > 0) {
31122
+ rows.push(sectionHeader(agentsTitle(locale)));
31123
+ for (const target of targets) {
31124
+ rows.push(
31125
+ optionRow(
31126
+ { kind: "agent", target },
31127
+ rowContent(createRendererAgentIcon(target.agent, 16, ownerDocument), target.label, "")
31128
+ )
31129
+ );
31130
+ }
31131
+ }
31132
+ if (commands) {
31133
+ const groups = [
31134
+ [commandsTitle(locale), commands.matches.filter(({ kind }) => kind !== "skill")],
31135
+ [skillsTitle(locale), commands.matches.filter(({ kind }) => kind === "skill")]
31136
+ ];
31137
+ for (const [title, group] of groups) {
31138
+ if (group.length === 0) continue;
31139
+ rows.push(sectionHeader(title));
31140
+ for (const command of group) {
31141
+ const reason = commands.source.disabledReason(command);
31142
+ const presentation = rendererHarnessCommandPresentation(command, locale);
31143
+ const content = rowContent(
31144
+ command.kind === "skill" ? createSkillIcon(ownerDocument) : createHarnessCommandIcon(ownerDocument),
31145
+ harnessCommandDisplayName(presentation.label),
31146
+ reason ?? presentation.description
31147
+ );
31148
+ content.setAttribute("data-command-id", command.id);
31149
+ if (reason === null) {
31150
+ rows.push(optionRow({ kind: "command", command, source: commands.source }, content));
31151
+ } else {
31152
+ const disabled = ownerDocument.createElement("div");
31153
+ disabled.setAttribute("aria-disabled", "true");
31154
+ disabled.className = `${ROW_CLASS} opacity-50`;
31155
+ disabled.append(content);
31156
+ rows.push(disabled);
31157
+ }
31158
+ }
31159
+ }
31160
+ }
31161
+ const notice = commands?.source.pendingNotice;
31162
+ if (notice && (rows.length > 0 || trigger.query === "")) {
31163
+ if (!rows.some((row) => row.querySelector("[data-command-id]"))) {
31164
+ rows.push(sectionHeader(commandsTitle(locale)));
31165
+ }
31166
+ const hint = ownerDocument.createElement("div");
31167
+ hint.setAttribute("data-codexhost-command-notice", "");
31168
+ hint.className = "px-row-x py-1.5 text-sm text-codex-description";
31169
+ hint.textContent = notice;
31170
+ rows.push(hint);
31171
+ }
31172
+ rowsRendered = rows.length;
31173
+ list.replaceChildren(...rows);
31174
+ activeIndex = Math.min(activeIndex, Math.max(0, entries.length - 1));
31175
+ setMenuOpen(true);
31176
+ highlight();
31177
+ position(trigger);
31178
+ };
31179
+ const readTrigger = () => {
31180
+ const selection = ownerDocument.getSelection();
31181
+ if (!selection?.isCollapsed || selection.rangeCount === 0) return null;
31182
+ const node2 = selection.anchorNode;
31183
+ if (!node2 || node2.nodeType !== node2.TEXT_NODE) return null;
31184
+ const editor = node2.parentElement?.closest('[contenteditable="true"]');
31185
+ if (!editor || !options.isComposerEditor(editor)) return null;
31186
+ const text = node2;
31187
+ const found = findDelegationTrigger(text.data.slice(0, selection.anchorOffset));
31188
+ if (!found) return null;
31189
+ return {
31190
+ editor,
31191
+ node: text,
31192
+ start: found.start,
31193
+ end: selection.anchorOffset,
31194
+ query: found.query
31195
+ };
31196
+ };
31197
+ const refresh = () => {
31198
+ if (inserting || composing) return;
31199
+ const trigger = readTrigger();
31200
+ if (!trigger) {
31201
+ openedFor = null;
31202
+ close();
31203
+ return;
31204
+ }
31205
+ if (openedFor?.node !== trigger.node || openedFor.start !== trigger.start) {
31206
+ openedFor = { node: trigger.node, start: trigger.start };
31207
+ options.onOpen?.(trigger.editor);
31208
+ }
31209
+ const allTargets = options.readTargets();
31210
+ syncChipStyle(ownerDocument, allTargets, iconCache);
31211
+ const targets = filterDelegationTargets(allTargets, trigger.query);
31212
+ const source = options.readCommands(trigger.editor);
31213
+ const commandMatches = source ? filterDelegationCommands(source.commands, trigger.query) : [];
31214
+ const showsNotice = Boolean(source?.pendingNotice) && trigger.query === "";
31215
+ if (targets.length === 0 && commandMatches.length === 0 && !showsNotice) {
31216
+ close();
31217
+ return;
31218
+ }
31219
+ const sameQuery = active?.query === trigger.query && active.node === trigger.node;
31220
+ active = trigger;
31221
+ if (!sameQuery) activeIndex = 0;
31222
+ render(trigger, source ? { source, matches: commandMatches } : null, targets);
31223
+ if (rowsRendered === 0) close();
31224
+ };
31225
+ const waitForSelectionSync = () => new Promise((resolve) => view.setTimeout(resolve, 0));
31226
+ const selectTriggerText = async (trigger) => {
31227
+ const selection = ownerDocument.getSelection();
31228
+ if (!selection) return false;
31229
+ const range = ownerDocument.createRange();
31230
+ range.setStart(trigger.node, trigger.start);
31231
+ range.setEnd(trigger.node, trigger.end);
31232
+ trigger.editor.focus({ preventScroll: true });
31233
+ selection.removeAllRanges();
31234
+ selection.addRange(range);
31235
+ await waitForSelectionSync();
31236
+ return true;
31237
+ };
31238
+ const insertAgent = async (trigger, range, target) => {
31239
+ const path = delegationMentionPath(target.agent);
31240
+ if (insertNativeAgentMention(trigger.editor, range, {
31241
+ name: target.label,
31242
+ displayName: target.label,
31243
+ path
31244
+ })) {
31245
+ return;
31246
+ }
31247
+ if (!await selectTriggerText(trigger)) return;
31248
+ const carrier = `${formatDelegationMentionLink({ harnessId: target.agent, label: target.label })} `;
31249
+ const pasted = dispatchPlainTextPaste(trigger.editor, carrier);
31250
+ if (!pasted) ownerDocument.execCommand("insertText", false, carrier);
31251
+ };
31252
+ const runCommand = async (trigger, range, entry) => {
31253
+ const { command, source } = entry;
31254
+ if (!rendererHarnessCommandExecutesDirectly(command)) {
31255
+ let path = null;
31256
+ try {
31257
+ path = harnessCommandMentionPath(command.invocation);
31258
+ } catch {
31259
+ path = null;
31260
+ }
31261
+ if (path && insertNativeAgentMention(trigger.editor, range, {
31262
+ name: command.invocation,
31263
+ displayName: command.invocation,
31264
+ path
31265
+ })) {
31266
+ return;
31267
+ }
31268
+ }
31269
+ if (!deleteNativeRange(trigger.editor, range)) {
31270
+ if (!await selectTriggerText(trigger)) return;
31271
+ ownerDocument.execCommand("delete");
31272
+ }
31273
+ source.select(command);
31274
+ };
31275
+ const choose = async (entry) => {
31276
+ const trigger = active;
31277
+ close();
31278
+ if (!trigger || !trigger.node.isConnected) return;
31279
+ const expected = `#${trigger.query}`;
31280
+ if (trigger.node.data.slice(trigger.start, trigger.end) !== expected) return;
31281
+ const range = { node: trigger.node, start: trigger.start, end: trigger.end, expected };
31282
+ inserting = true;
31283
+ try {
31284
+ if (entry.kind === "agent") await insertAgent(trigger, range, entry.target);
31285
+ else await runCommand(trigger, range, entry);
31286
+ } finally {
31287
+ inserting = false;
31288
+ }
31289
+ };
31290
+ const onKeyDown = (event) => {
31291
+ if (!isMenuOpen() || !active || event.isComposing) return;
31292
+ if (entries.length === 0 && event.key !== "Escape") return;
31293
+ let handled = true;
31294
+ if (event.key === "ArrowDown") activeIndex = (activeIndex + 1) % entries.length;
31295
+ else if (event.key === "ArrowUp") {
31296
+ activeIndex = (activeIndex - 1 + entries.length) % entries.length;
31297
+ } else if (event.key === "Enter" || event.key === "Tab") {
31298
+ const entry = entries[activeIndex];
31299
+ if (entry) void choose(entry);
31300
+ } else if (event.key === "Escape") close();
31301
+ else handled = false;
31302
+ if (!handled) return;
31303
+ event.preventDefault();
31304
+ event.stopImmediatePropagation();
31305
+ if (isMenuOpen()) highlight();
31306
+ };
31307
+ const onCompositionStart = () => {
31308
+ composing = true;
31309
+ };
31310
+ const onCompositionEnd = () => {
31311
+ composing = false;
31312
+ refresh();
31313
+ };
31314
+ const onPointerDown = (event) => {
31315
+ if (isMenuOpen() && !menu.contains(event.target)) close();
31316
+ };
31317
+ const onViewportChange = () => {
31318
+ if (active && isMenuOpen()) position(active);
31319
+ };
31320
+ view.addEventListener("keydown", onKeyDown, true);
31321
+ ownerDocument.addEventListener("input", refresh, true);
31322
+ ownerDocument.addEventListener("selectionchange", refresh);
31323
+ ownerDocument.addEventListener("compositionstart", onCompositionStart, true);
31324
+ ownerDocument.addEventListener("compositionend", onCompositionEnd, true);
31325
+ ownerDocument.addEventListener("pointerdown", onPointerDown, true);
31326
+ view.addEventListener("resize", onViewportChange);
31327
+ view.addEventListener("scroll", onViewportChange, true);
31328
+ const dispose = () => {
31329
+ view.removeEventListener("keydown", onKeyDown, true);
31330
+ ownerDocument.removeEventListener("input", refresh, true);
31331
+ ownerDocument.removeEventListener("selectionchange", refresh);
31332
+ ownerDocument.removeEventListener("compositionstart", onCompositionStart, true);
31333
+ ownerDocument.removeEventListener("compositionend", onCompositionEnd, true);
31334
+ ownerDocument.removeEventListener("pointerdown", onPointerDown, true);
31335
+ view.removeEventListener("resize", onViewportChange);
31336
+ view.removeEventListener("scroll", onViewportChange, true);
31337
+ menu.remove();
31338
+ ownerDocument.querySelector(`style[${STYLE_ATTRIBUTE3}]`)?.remove();
31339
+ };
31340
+ const openFor = (editor) => {
31341
+ editor.focus({ preventScroll: true });
31342
+ const trigger = (previous2) => previous2 && !/\s/u.test(previous2) ? " #" : "#";
31343
+ if (insertNativeTextAtSelection(editor, trigger)) return;
31344
+ const selection = ownerDocument.getSelection();
31345
+ const node2 = selection?.anchorNode;
31346
+ const previous = node2?.nodeType === node2?.TEXT_NODE && selection && selection.anchorOffset > 0 ? node2.data.charAt(selection.anchorOffset - 1) : "";
31347
+ ownerDocument.execCommand("insertText", false, trigger(previous));
31348
+ };
31349
+ return {
31350
+ openFor,
31351
+ refresh: () => {
31352
+ if (openedFor) refresh();
31353
+ },
31354
+ dispose
31355
+ };
31356
+ }
31357
+ function dispatchPlainTextPaste(editor, text) {
31358
+ const view = editor.ownerDocument.defaultView;
31359
+ if (!view?.DataTransfer || !view.ClipboardEvent) return false;
31360
+ const data = new view.DataTransfer();
31361
+ data.setData("text/plain", text);
31362
+ const event = new view.ClipboardEvent("paste", {
31363
+ bubbles: true,
31364
+ cancelable: true,
31365
+ clipboardData: data
31366
+ });
31367
+ editor.dispatchEvent(event);
31368
+ return event.defaultPrevented;
31369
+ }
31370
+
30522
31371
  // src/renderer-binding-probe.ts
30523
31372
  var externalHarnessIds = {
30524
31373
  pi: harnessIdSchema.parse("pi"),
@@ -30534,7 +31383,8 @@ ${accounts_default}`;
30534
31383
  "cursor-cli": harnessIdSchema.parse("cursor-cli"),
30535
31384
  hermes: harnessIdSchema.parse("hermes"),
30536
31385
  qoder: harnessIdSchema.parse("qoder"),
30537
- "qoder-cn": harnessIdSchema.parse("qoder-cn")
31386
+ "qoder-cn": harnessIdSchema.parse("qoder-cn"),
31387
+ "kimi-code": harnessIdSchema.parse("kimi-code")
30538
31388
  };
30539
31389
  var externalAgents = [
30540
31390
  "pi",
@@ -30550,7 +31400,8 @@ ${accounts_default}`;
30550
31400
  "cursor-cli",
30551
31401
  "hermes",
30552
31402
  "qoder",
30553
- "qoder-cn"
31403
+ "qoder-cn",
31404
+ "kimi-code"
30554
31405
  ];
30555
31406
  function isRetryableHarnessAvailability(availability, error51) {
30556
31407
  return availability !== void 0 && availability !== "ready" && availability !== "notInstalled" && error51?.retryable === true;
@@ -30758,6 +31609,21 @@ ${accounts_default}`;
30758
31609
  ...permissionModeId ? { permissionModeId } : {}
30759
31610
  };
30760
31611
  }
31612
+ if (inspection.harnessId === "kimi-code") {
31613
+ const route = decodeHarnessPluginRoute(inspection.transportModelId);
31614
+ if (!route || route.harnessId !== inspection.harnessId) {
31615
+ throw new Error("Kimi Code Thread reported an incompatible transport Model");
31616
+ }
31617
+ const model = inspection.effectiveModel ?? route.model;
31618
+ const thinkingOptionId = inspection.availableThinkingOptions !== void 0 ? selectableThinkingOptionId(inspection) : inspection.effectiveThinkingOptionId ?? route.thinkingOptionId;
31619
+ const permissionModeId = inspection.effectivePermissionModeId ?? route.permissionModeId;
31620
+ return {
31621
+ agent: inspection.harnessId,
31622
+ ...model ? { model } : {},
31623
+ ...thinkingOptionId ? { thinkingOptionId } : {},
31624
+ ...permissionModeId ? { permissionModeId } : {}
31625
+ };
31626
+ }
30761
31627
  throw new Error("Thread owner is not a Renderer Agent");
30762
31628
  }
30763
31629
  function isOwnershipSubmissionBlocked(status) {
@@ -30907,7 +31773,8 @@ ${accounts_default}`;
30907
31773
  "cursor-cli": void 0,
30908
31774
  hermes: void 0,
30909
31775
  qoder: void 0,
30910
- "qoder-cn": void 0
31776
+ "qoder-cn": void 0,
31777
+ "kimi-code": void 0
30911
31778
  },
30912
31779
  webUi: Object.fromEntries(
30913
31780
  externalAgents.map((agent) => [agent, false])
@@ -30984,12 +31851,16 @@ ${accounts_default}`;
30984
31851
  })
30985
31852
  );
30986
31853
  };
31854
+ const showCodexUsageGateStatus = (mounted, status) => {
31855
+ const title = status === "unsupported" ? rendererHarnessMessages(settingsLifecycle.locale).codexUsageGateUnavailable : "";
31856
+ if (mounted.control.root.title !== title) mounted.control.root.title = title;
31857
+ };
30987
31858
  const renderMounted = (mounted) => {
30988
31859
  const accounts = composerCodexAccounts(mounted.composer);
30989
31860
  const currentCodexAccount = accounts?.accounts.find(
30990
31861
  ({ accountId }) => accountId === accounts.readyAccountId
30991
31862
  );
30992
- renderComposerAgentControl(
31863
+ const externalSubmissionReady = renderComposerAgentControl(
30993
31864
  mounted.control,
30994
31865
  controller.get(mounted.composer),
30995
31866
  adapterStatus.state,
@@ -31003,6 +31874,7 @@ ${accounts_default}`;
31003
31874
  currentCodexAccount ?? null,
31004
31875
  mounted.ownershipStatus === "error"
31005
31876
  );
31877
+ showCodexUsageGateStatus(mounted, mounted.codexUsageGate.update(externalSubmissionReady));
31006
31878
  if (mounted.control.usage) {
31007
31879
  mounted.control.usage.onOpen = () => {
31008
31880
  void refreshThreadUsage(
@@ -31012,22 +31884,38 @@ ${accounts_default}`;
31012
31884
  };
31013
31885
  }
31014
31886
  };
31015
- const refreshCommands = async (mounted) => {
31887
+ let delegationMention = null;
31888
+ const draftWorkspaces = /* @__PURE__ */ new Map();
31889
+ {
31890
+ const published = Reflect.get(window, "__codexhostDraftWorkspacesV1");
31891
+ if (typeof published === "object" && published !== null) {
31892
+ for (const [hostId, cwd] of Object.entries(published)) {
31893
+ if (typeof cwd === "string" && cwd.length > 0) draftWorkspaces.set(hostId, cwd);
31894
+ }
31895
+ }
31896
+ }
31897
+ const refreshCommands = async (mounted, { keepCurrent = false } = {}) => {
31016
31898
  const generation = ++mounted.commandRequestGeneration;
31017
31899
  const agent = controller.get(mounted.composer).agent;
31018
- const hostId = threadIdFromComposerModelTarget(mounted.modelTarget) ? mounted.hostId : activeModelHostId();
31900
+ const threadId = threadIdFromComposerModelTarget(mounted.modelTarget);
31901
+ const hostId = threadId ? mounted.hostId : activeModelHostId();
31019
31902
  const requestControl = modelControl;
31020
31903
  const client = modelClientForHostFrom(requestControl, hostId);
31021
- mounted.control.harnessCommands.setCommands([]);
31904
+ if (!keepCurrent || agent === "codex") mounted.control.harnessCommands.setCommands([]);
31022
31905
  if (agent === "codex" || !client) return;
31023
31906
  try {
31024
- const catalog = await client.inspectHarnessCommands({ harnessId: externalHarnessIds[agent] });
31907
+ const catalog = threadId ? await client.inspectThreadCommands({ threadId }) : await client.inspectHarnessCommands({
31908
+ harnessId: externalHarnessIds[agent],
31909
+ ...hostId && draftWorkspaces.has(hostId) ? { cwd: draftWorkspaces.get(hostId) } : {}
31910
+ });
31025
31911
  if (disposed || mountedByComposer.get(mounted.composer) !== mounted || mounted.commandRequestGeneration !== generation || requestControl !== modelControl || (threadIdFromComposerModelTarget(mounted.modelTarget) ? mounted.hostId : activeModelHostId()) !== hostId || controller.get(mounted.composer).agent !== agent)
31026
31912
  return;
31027
31913
  mounted.control.harnessCommands.setCommands(
31028
31914
  catalog.commands,
31029
- threadIdFromComposerModelTarget(mounted.modelTarget) !== null
31915
+ threadIdFromComposerModelTarget(mounted.modelTarget) !== null,
31916
+ catalog.source
31030
31917
  );
31918
+ delegationMention?.refresh();
31031
31919
  } catch {
31032
31920
  }
31033
31921
  };
@@ -32240,15 +33128,16 @@ ${accounts_default}`;
32240
33128
  if (!composer.isConnected || !mounted2) return;
32241
33129
  void selectPermissionMode(mounted2, permissionModeId);
32242
33130
  },
32243
- (command) => {
32244
- const mounted2 = mountedByComposer.get(composer);
32245
- if (mounted2) selectCommand(mounted2, command);
33131
+ () => {
33132
+ const editor2 = composer.querySelector(EDITOR_SELECTOR);
33133
+ if (editor2) delegationMention?.openFor(editor2);
32246
33134
  }
32247
33135
  );
32248
33136
  const mounted = {
32249
33137
  composer,
32250
33138
  composerId: state.composerId,
32251
33139
  control,
33140
+ codexUsageGate: createRendererCodexUsageGate(composer),
32252
33141
  modelTarget,
32253
33142
  modelView: inherited?.modelView ?? { status: "idle" },
32254
33143
  permissionModeView: inherited?.permissionModeView ?? { status: "idle" },
@@ -32308,6 +33197,7 @@ ${accounts_default}`;
32308
33197
  window.clearTimeout(timer);
32309
33198
  usageRefreshTimers.delete(composer);
32310
33199
  }
33200
+ mounted.codexUsageGate.dispose();
32311
33201
  disposeComposerAgentControl(mounted.control);
32312
33202
  mountedByComposer.delete(composer);
32313
33203
  continue;
@@ -32316,6 +33206,7 @@ ${accounts_default}`;
32316
33206
  const hideCodexControls = controller.isSwitching(composer) || state.agent !== "codex";
32317
33207
  reconcileComposerNativeControls(mounted.control, hideCodexControls, hideCodexControls);
32318
33208
  if (refreshTargets) refreshMountedConversationTarget(mounted);
33209
+ showCodexUsageGateStatus(mounted, mounted.codexUsageGate.refresh());
32319
33210
  }
32320
33211
  for (const editor of document.querySelectorAll(EDITOR_SELECTOR)) {
32321
33212
  const composer = composerForEditor(editor);
@@ -32465,7 +33356,7 @@ ${accounts_default}`;
32465
33356
  const candidate = composerForElement(button);
32466
33357
  const composer = candidate && isMountedComposer(candidate) ? candidate : null;
32467
33358
  const mounted = composer ? mountedByComposer.get(composer) : void 0;
32468
- if (!composer || mounted?.control.sendButton !== button) return;
33359
+ if (!composer || !mounted || refreshSendButton(mounted.control) !== button) return;
32469
33360
  if (!prepareComposer(composer)) {
32470
33361
  blockEvent(event);
32471
33362
  return;
@@ -32538,9 +33429,63 @@ ${accounts_default}`;
32538
33429
  void refreshHarnessAvailability(true);
32539
33430
  }
32540
33431
  };
33432
+ const onDraftWorkspace = (event) => {
33433
+ const detail = event.detail;
33434
+ if (typeof detail !== "object" || detail === null) return;
33435
+ const { hostId, cwd } = detail;
33436
+ if (typeof hostId !== "string" || typeof cwd !== "string" || cwd.length === 0) return;
33437
+ draftWorkspaces.set(hostId, cwd);
33438
+ for (const mounted of mountedByComposer.values()) {
33439
+ if (!threadIdFromComposerModelTarget(mounted.modelTarget) && activeModelHostId() === hostId && controller.get(mounted.composer).agent !== "codex") {
33440
+ void refreshCommands(mounted, { keepCurrent: true });
33441
+ }
33442
+ }
33443
+ };
32541
33444
  window.addEventListener("codexhost:draft-prewarm-policy-changed", onHostRouteChange);
33445
+ window.addEventListener("codexhost:draft-workspace", onDraftWorkspace);
32542
33446
  window.addEventListener("codexhost:renderer-adapter-status", onAdapterStatus);
32543
33447
  window.addEventListener("focus", onWindowFocus);
33448
+ delegationMention = installRendererDelegationMention(document, {
33449
+ onOpen: (editor) => {
33450
+ const composer = composerForElement(editor);
33451
+ const mounted = composer ? mountedByComposer.get(composer) : void 0;
33452
+ if (mounted && controller.get(mounted.composer).agent !== "codex") {
33453
+ void refreshCommands(mounted, { keepCurrent: true });
33454
+ }
33455
+ },
33456
+ readTargets: () => {
33457
+ const availability = activeHarnessAvailabilityState().availability;
33458
+ return enabledAgents.filter((agent) => agent === "codex" || availability[agent] === "ready").map((agent) => ({ agent, label: RENDERER_AGENT_LABELS[agent] }));
33459
+ },
33460
+ isComposerEditor: (editor) => {
33461
+ const composer = composerForElement(editor);
33462
+ return composer !== null && mountedByComposer.has(composer);
33463
+ },
33464
+ readLocale: () => settingsLifecycle.locale,
33465
+ // Desktop's own suggestion menu hugs the input card and covers the
33466
+ // top tray (workspace / branch bar), so anchor to the card when present.
33467
+ anchorForEditor: (editor) => editor.closest("[data-composer-body]") ?? composerForElement(editor),
33468
+ readCommands: (editor) => {
33469
+ const composer = composerForElement(editor);
33470
+ const mounted = composer ? mountedByComposer.get(composer) : void 0;
33471
+ if (!mounted || controller.get(mounted.composer).agent === "codex") return null;
33472
+ const { commands, hasSession, executingCommandId, source } = mounted.control.harnessCommands.snapshot();
33473
+ if (executingCommandId !== null) return null;
33474
+ const messages = rendererHarnessMessages(settingsLifecycle.locale);
33475
+ const agent = controller.get(mounted.composer).agent;
33476
+ const pendingNotice = source === "static" ? rendererLiveCommandsPendingNotice(
33477
+ settingsLifecycle.locale,
33478
+ RENDERER_AGENT_LABELS[agent]
33479
+ ) : null;
33480
+ if (commands.length === 0 && pendingNotice === null) return null;
33481
+ return {
33482
+ commands,
33483
+ pendingNotice,
33484
+ disabledReason: (command) => !hasSession && rendererHarnessCommandExecutesDirectly(command) ? messages.commandRequiresConversation : null,
33485
+ select: (command) => selectCommand(mounted, command)
33486
+ };
33487
+ }
33488
+ });
32544
33489
  const connectedComposers = () => [...mountedByComposer.values()].filter(
32545
33490
  (mounted) => mounted.composer.isConnected && mounted.control.root.isConnected
32546
33491
  );
@@ -32644,6 +33589,7 @@ ${accounts_default}`;
32644
33589
  modelControl = null;
32645
33590
  mutationObserver.disconnect();
32646
33591
  disposeReasoningSoftWrap();
33592
+ delegationMention?.dispose();
32647
33593
  sidebarAgentIcons.dispose();
32648
33594
  settingsLifecycle.dispose();
32649
33595
  document.removeEventListener("beforeinput", onBeforeInput, true);
@@ -32651,6 +33597,7 @@ ${accounts_default}`;
32651
33597
  document.removeEventListener("keydown", onKeyDown, true);
32652
33598
  document.removeEventListener("click", onClick, true);
32653
33599
  window.removeEventListener("codexhost:draft-prewarm-policy-changed", onHostRouteChange);
33600
+ window.removeEventListener("codexhost:draft-workspace", onDraftWorkspace);
32654
33601
  window.removeEventListener("codexhost:renderer-adapter-status", onAdapterStatus);
32655
33602
  window.removeEventListener("focus", onWindowFocus);
32656
33603
  for (const state of harnessAvailabilityByHost.values()) {
@@ -32664,6 +33611,7 @@ ${accounts_default}`;
32664
33611
  for (const mounted of mountedByComposer.values()) {
32665
33612
  mounted.usageRequestGeneration += 1;
32666
33613
  usageRefreshAttempts.delete(mounted.composer);
33614
+ mounted.codexUsageGate.dispose();
32667
33615
  disposeComposerAgentControl(mounted.control);
32668
33616
  }
32669
33617
  mountedByComposer.clear();