@codexhost/cli-win32-x64 0.31.0 → 0.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/README.md +1 -1
  2. package/app/codexhost-distribution.json +1 -1
  3. package/app/console-server.mjs +8 -0
  4. package/app/console-web.js +162 -23
  5. package/app/desktop-controller.mjs +8 -0
  6. package/app/host-runtime.mjs +2286 -814
  7. package/app/plugins/antigravity/plugin.mjs +10 -22
  8. package/app/plugins/claude-code/plugin.mjs +8 -0
  9. package/app/plugins/codebuddy/plugin.mjs +8 -0
  10. package/app/plugins/codex-usage/plugin.mjs +8 -0
  11. package/app/plugins/copilot/plugin.mjs +8 -0
  12. package/app/plugins/cursor-cli/plugin.mjs +8 -0
  13. package/app/plugins/deepseek-harness/plugin.mjs +8 -0
  14. package/app/plugins/devin/plugin.mjs +8 -0
  15. package/app/plugins/grok/plugin.mjs +8 -0
  16. package/app/plugins/hermes/plugin.mjs +8 -0
  17. package/app/plugins/kimi-code/plugin.mjs +8 -0
  18. package/app/plugins/kiro-cli/plugin.mjs +8 -0
  19. package/app/plugins/omp/plugin.mjs +8 -0
  20. package/app/plugins/opencode/plugin.mjs +8 -0
  21. package/app/plugins/pi/plugin.mjs +8 -0
  22. package/app/plugins/qoder/plugin.mjs +8 -0
  23. package/app/plugins/qoder-cn/plugin.mjs +8 -0
  24. package/app/plugins/qwen-code/plugin.mjs +8 -0
  25. package/app/plugins/workbuddy/plugin.mjs +8 -0
  26. package/app/plugins/zcode/plugin.mjs +8 -0
  27. package/app/renderer-extension.js +300 -125
  28. package/app/web/assets/{abnfDiagram-XWFEHMT6-Bqy7uOSy.js → abnfDiagram-XWFEHMT6-CnJyN70L.js} +1 -1
  29. package/app/web/assets/{architectureDiagram-CSQXQB3N-6aaP1YoM.js → architectureDiagram-CSQXQB3N-DH0ITYVE.js} +1 -1
  30. package/app/web/assets/{blockDiagram-BEDRHYPZ-B4QSFXe0.js → blockDiagram-BEDRHYPZ-WL3ZKoKg.js} +1 -1
  31. package/app/web/assets/{c4Diagram-M2UUVUY5-BYE-C8Gq.js → c4Diagram-M2UUVUY5-XwSPKj5H.js} +1 -1
  32. package/app/web/assets/{chunk-2Q5K7J3B-CiEM-GTd.js → chunk-2Q5K7J3B-CKEzexjg.js} +1 -1
  33. package/app/web/assets/{chunk-3GCGMST5-hzY9BiB1.js → chunk-3GCGMST5-BdEgLpab.js} +1 -1
  34. package/app/web/assets/{chunk-5VM5RSS4-DYXznY0H.js → chunk-5VM5RSS4-DyxL5-Ts.js} +1 -1
  35. package/app/web/assets/{chunk-7U7NFRK5-Bzw5MDPr.js → chunk-7U7NFRK5-FXLb4tYa.js} +1 -1
  36. package/app/web/assets/{chunk-CNRTWJTD-DMbxMfi3.js → chunk-CNRTWJTD-DcdC1OYr.js} +1 -1
  37. package/app/web/assets/{chunk-D5HYT7QG-By0ZVBtD.js → chunk-D5HYT7QG-BOz9vBX9.js} +1 -1
  38. package/app/web/assets/{chunk-EBZ3SEQC-Yyu_sMV7.js → chunk-EBZ3SEQC-Dmc_Z53x.js} +2 -2
  39. package/app/web/assets/{chunk-JWPE2WC7-DDzqxIPT.js → chunk-JWPE2WC7-CrFwSwYi.js} +1 -1
  40. package/app/web/assets/{chunk-KTR4FSNJ-GlKqhtpl.js → chunk-KTR4FSNJ-BY3AzFaI.js} +1 -1
  41. package/app/web/assets/{chunk-XXDRQBXY-DNc-CvYu.js → chunk-XXDRQBXY-CHgNy82n.js} +1 -1
  42. package/app/web/assets/{classDiagram-v2-KXABOMEV-4_PFS2N_.js → classDiagram-v2-KXABOMEV-ClM3-y5Z.js} +1 -1
  43. package/app/web/assets/{cose-bilkent-JH36ORCC-BE3foHUY.js → cose-bilkent-JH36ORCC-I7nd8GgO.js} +1 -1
  44. package/app/web/assets/{cynefin-EF2NZ3EQ-D2PqrYZ3.js → cynefin-EF2NZ3EQ-DzsXmyBH.js} +1 -1
  45. package/app/web/assets/{cynefinDiagram-NJNITYFG-DOObpTbq.js → cynefinDiagram-NJNITYFG-DLHq6igy.js} +1 -1
  46. package/app/web/assets/{dagre-KIHZ2IZ3-Znm2jin9.js → dagre-KIHZ2IZ3-BK991Mno.js} +1 -1
  47. package/app/web/assets/{diagram-7YQZDPLS-ByZMD-uA.js → diagram-7YQZDPLS-C4qiWdQU.js} +1 -1
  48. package/app/web/assets/{diagram-QBROCOUO-BiRShpnN.js → diagram-QBROCOUO-C_ZyBohC.js} +1 -1
  49. package/app/web/assets/{diagram-RJJCUUZO-D9wLVoK2.js → diagram-RJJCUUZO-C5Aezm94.js} +1 -1
  50. package/app/web/assets/{diagram-WERXNKYE-BSbIh-yC.js → diagram-WERXNKYE-Ckc_umlF.js} +1 -1
  51. package/app/web/assets/{diagram-YHHI257C-DMWrHMc8.js → diagram-YHHI257C-BHjReoZZ.js} +1 -1
  52. package/app/web/assets/{diagram-YR4HJLHV-C4sBAFb1.js → diagram-YR4HJLHV-DVTGi_y9.js} +1 -1
  53. package/app/web/assets/{ebnfDiagram-N527522P-BZLloaoQ.js → ebnfDiagram-N527522P-getuz1AR.js} +1 -1
  54. package/app/web/assets/{elk-O5DQBFGD-Da3e5tn5.js → elk-O5DQBFGD-C7mhTIuK.js} +1 -1
  55. package/app/web/assets/{erDiagram-K3K3BIDK-B2lKAIZF.js → erDiagram-K3K3BIDK-sV-HZvUV.js} +1 -1
  56. package/app/web/assets/{flowDiagram-Z6JWZHQI-q2EY_kmB.js → flowDiagram-Z6JWZHQI-D0L4wXUs.js} +1 -1
  57. package/app/web/assets/{ganttDiagram-3PRQTZWP-BGrNZ20b.js → ganttDiagram-3PRQTZWP-BNt9Bjjo.js} +1 -1
  58. package/app/web/assets/{gitGraphDiagram-VXDFKS5L-DIZNXREy.js → gitGraphDiagram-VXDFKS5L-BABZzhHw.js} +1 -1
  59. package/app/web/assets/{grid-E2QIVN74-0cUkPG69.js → grid-E2QIVN74-DLe2FQ_d.js} +1 -1
  60. package/app/web/assets/{index-PN7K-15_.js → index-BLmkBEoq.js} +99 -99
  61. package/app/web/assets/index-Dwdnvinl.css +1 -0
  62. package/app/web/assets/{infoDiagram-EZ3ZOAHP-BHhUTQCn.js → infoDiagram-EZ3ZOAHP-BKDuUqcr.js} +1 -1
  63. package/app/web/assets/{ishikawaDiagram-S3EKX5GW-DPOxtl4c.js → ishikawaDiagram-S3EKX5GW-C75EGghg.js} +1 -1
  64. package/app/web/assets/{journeyDiagram-POQNLL5X-D8RyXckG.js → journeyDiagram-POQNLL5X-q7Obruqa.js} +1 -1
  65. package/app/web/assets/{kanban-definition-BH5XI6FM-COJv3Hyh.js → kanban-definition-BH5XI6FM-CzAqhFED.js} +1 -1
  66. package/app/web/assets/{mermaid.core-DYdcDKIt.js → mermaid.core-Bysx44LR.js} +4 -4
  67. package/app/web/assets/{mindmap-definition-WVAN44T4-DnYIM4ja.js → mindmap-definition-WVAN44T4-Ds5rXTrF.js} +1 -1
  68. package/app/web/assets/{pegDiagram-D4NLKWP3-Ds3GAEJ6.js → pegDiagram-D4NLKWP3-hmdERwtT.js} +1 -1
  69. package/app/web/assets/{pieDiagram-36ENHN4W-BhLUJGEB.js → pieDiagram-36ENHN4W-DfTnyG8D.js} +1 -1
  70. package/app/web/assets/{quadrantDiagram-ZQUDMS73-DwtX-IxK.js → quadrantDiagram-ZQUDMS73-CreQWjZQ.js} +1 -1
  71. package/app/web/assets/{railroadDiagram-JIZHGYPL-D2vmTTnJ.js → railroadDiagram-JIZHGYPL-Bhc_eO9G.js} +1 -1
  72. package/app/web/assets/{render-VIF2ZAQL-DGU1ql-Z.js → render-VIF2ZAQL-BS1Zgk8K.js} +2 -2
  73. package/app/web/assets/{requirementDiagram-AXW2TVFA-u3j1sKkI.js → requirementDiagram-AXW2TVFA-Dlp7d6QT.js} +1 -1
  74. package/app/web/assets/{sankeyDiagram-FBCJTAIF-k-An9VHW.js → sankeyDiagram-FBCJTAIF-DGBchL30.js} +1 -1
  75. package/app/web/assets/{sequenceDiagram-3LA2ROMG-DUjbYb4R.js → sequenceDiagram-3LA2ROMG-DauFg5_R.js} +1 -1
  76. package/app/web/assets/{sizeCapture-2Q2CQKSF-DATTL7FZ.js → sizeCapture-2Q2CQKSF-DR-zy7an.js} +1 -1
  77. package/app/web/assets/{stateDiagram-v2-ATKHQDJO-cCJX5M2u.js → stateDiagram-v2-ATKHQDJO-BSRBSGUi.js} +1 -1
  78. package/app/web/assets/{swimlanes-YQL5WMAO-B7grWEWt.js → swimlanes-YQL5WMAO-BwzOr5Dv.js} +1 -1
  79. package/app/web/assets/swimlanesDiagram-UCCPES4V-CNV63-us.js +8 -0
  80. package/app/web/assets/{timeline-definition-7Z437IG3-BhsLa6l1.js → timeline-definition-7Z437IG3-BoZ-mNKc.js} +1 -1
  81. package/app/web/assets/{usecaseDiagram-RDK6N6HP-CkPQYmQw.js → usecaseDiagram-RDK6N6HP-DikhgH2m.js} +1 -1
  82. package/app/web/assets/{vennDiagram-SHRQU5PJ-CufZSwvw.js → vennDiagram-SHRQU5PJ-DY_oIxwl.js} +1 -1
  83. package/app/web/assets/{wardleyDiagram-F3OXNVQS-CSkfpFOA.js → wardleyDiagram-F3OXNVQS-DrRIiB_M.js} +1 -1
  84. package/app/web/assets/{xychartDiagram-GDYJKCDI-BhZf9scK.js → xychartDiagram-GDYJKCDI-CzSPgHV7.js} +1 -1
  85. package/app/web/codexhost-settings.js +118 -50
  86. package/app/web/index.html +2 -2
  87. package/app/web/plugins/deepseek-ai__dsh-api-gateway/client.js +1 -1
  88. package/app/web/plugins/deepseek-ai__dsh-api-remotes/client.js +1 -1
  89. package/app/web/plugins/deepseek-ai__dsh-api-session-controller/client.js +2 -2
  90. package/app/web/plugins/deepseek-ai__dsh-client-locale/client.js +1 -1
  91. package/app/web/plugins/deepseek-ai__dsh-client-ui-attachment/client.js +1 -1
  92. package/app/web/plugins/deepseek-ai__dsh-client-ui-chat/client.js +71 -71
  93. package/app/web/plugins/deepseek-ai__dsh-client-ui-codexhost/client.js +16 -16
  94. package/app/web/plugins/deepseek-ai__dsh-client-ui-commands/client.js +1 -1
  95. package/app/web/plugins/deepseek-ai__dsh-client-ui-conversation/client.js +5 -5
  96. package/app/web/plugins/deepseek-ai__dsh-client-ui-plan/client.js +1 -1
  97. package/app/web/plugins/deepseek-ai__dsh-client-ui-settings-general/client.js +1 -1
  98. package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar-documentpreview/client.js +7 -7
  99. package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar-right/client.js +2 -2
  100. package/app/web/plugins/deepseek-ai__dsh-client-ui-tool/client.js +2 -2
  101. package/app/web/plugins/deepseek-ai__dsh-client-ui-user-questions/client.js +1 -1
  102. package/app/web/plugins/deepseek-ai__dsh-client-ui-workspace/client.js +69 -69
  103. package/app/web/sw.js +230 -16
  104. package/app/web-modules/node_modules/@deepseek-ai/dsh-client-modules/index.js +7 -7
  105. package/app/web-modules/server.mjs +1101 -179
  106. package/bin/codexhost.exe +0 -0
  107. package/libexec/codexhost-node-repl.exe +0 -0
  108. package/libexec/codexhost-screenshot.exe +0 -0
  109. package/libexec/codexhost-shell.exe +0 -0
  110. package/libexec/codexhost-shim.exe +0 -0
  111. package/libexec/codexhost-updater.exe +0 -0
  112. package/package.json +1 -1
  113. package/app/web/assets/index-BbmB5VLj.css +0 -1
  114. package/app/web/assets/swimlanesDiagram-UCCPES4V-B8Jem9gq.js +0 -8
@@ -21524,6 +21524,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
21524
21524
  "codexhost/harness/preferences/get",
21525
21525
  "codexhost/harness/preferences/patch",
21526
21526
  "experimentalFeature/list",
21527
+ "collaborationMode/list",
21528
+ "codexhost/thread/collaboration-mode/select",
21527
21529
  "thread/list",
21528
21530
  "thread/metadata/update",
21529
21531
  "codexhost/thread/catalog/read",
@@ -21816,6 +21818,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
21816
21818
  nextCursor: external_exports.string().nullable()
21817
21819
  }),
21818
21820
  configuration: external_exports.object({
21821
+ codexCollaborationMode: external_exports.enum(["plan", "default"]).optional(),
21819
21822
  /** Native Codex model names are not external Harness transport refs. */
21820
21823
  native: external_exports.object({
21821
21824
  model: external_exports.string().min(1).max(1024).optional(),
@@ -22590,6 +22593,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
22590
22593
  thinkingOptionId: harnessThinkingOptionIdSchema.optional(),
22591
22594
  permissionModeId: harnessPermissionModeIdSchema.optional()
22592
22595
  }).refine((value) => Boolean(value.model || value.thinkingOptionId || value.permissionModeId), "A default configuration must contain a preference");
22596
+ var projectHarnessSelectionSchema = external_exports.discriminatedUnion("mode", [
22597
+ external_exports.strictObject({ mode: external_exports.literal("global") }),
22598
+ external_exports.strictObject({ mode: external_exports.literal("last") }),
22599
+ external_exports.strictObject({ mode: external_exports.literal("manual"), harnessId: harnessIdSchema })
22600
+ ]);
22593
22601
  var newThreadDefaultsSchema = external_exports.strictObject({
22594
22602
  lastHarness: harnessIdSchema.optional(),
22595
22603
  byHarness: external_exports.record(preferenceHarnessKey, harnessDefaultConfigurationSchema)
@@ -30756,6 +30764,7 @@ ${error62.stderrTail}`] : []
30756
30764
  updating: "Updating\u2026",
30757
30765
  updateToVersion: "Update to v{version}",
30758
30766
  installedBadge: "Installed",
30767
+ installedDisabledBadge: "Installed \xB7 Off",
30759
30768
  uninstall: "Uninstall",
30760
30769
  uninstalling: "Uninstalling\u2026",
30761
30770
  uninstallConfirmPrompt: "Remove this plugin?",
@@ -30768,7 +30777,9 @@ ${error62.stderrTail}`] : []
30768
30777
  marketplaceEmptyDescription: "Refresh to check for newly published plugins, or import one from GitHub, a local .zip package, or a local directory.",
30769
30778
  marketplaceFallbackNotice: "The remote catalog is unreachable. You can still install plugins from GitHub, a ZIP, or a local directory.",
30770
30779
  marketplaceLoadFailed: "Could not load plugin marketplace: {message}",
30771
- installedSuccess: "Installed \u201C{name}\u201D (v{version}). Enable it when ready.",
30780
+ installedSuccess: "Installed and enabled \u201C{name}\u201D (v{version}).",
30781
+ installedSlotConflict: "Installed \u201C{name}\u201D (v{version}), but left it disabled because a Desktop slot conflicts with {other}. Disable {other} first to enable it.",
30782
+ installedDisabled: "Installed \u201C{name}\u201D (v{version}), currently disabled. Review or enable it in Installed.",
30772
30783
  updatedSuccess: "Updated \u201C{name}\u201D to v{version}.",
30773
30784
  uninstalledSuccess: "Uninstalled \u201C{name}\u201D.",
30774
30785
  installFailed: "Could not install plugin: {message}",
@@ -30985,6 +30996,7 @@ ${error62.stderrTail}`] : []
30985
30996
  updating: "\u66F4\u65B0\u4E2D\u2026",
30986
30997
  updateToVersion: "\u66F4\u65B0\u5230 v{version}",
30987
30998
  installedBadge: "\u5DF2\u5B89\u88C5",
30999
+ installedDisabledBadge: "\u5DF2\u5B89\u88C5 \xB7 \u672A\u542F\u7528",
30988
31000
  uninstall: "\u5378\u8F7D",
30989
31001
  uninstalling: "\u5378\u8F7D\u4E2D\u2026",
30990
31002
  uninstallConfirmPrompt: "\u786E\u8BA4\u5378\u8F7D\u6B64\u63D2\u4EF6\uFF1F",
@@ -30997,7 +31009,9 @@ ${error62.stderrTail}`] : []
30997
31009
  marketplaceEmptyDescription: "\u53EF\u70B9\u51FB\u5237\u65B0\u83B7\u53D6\u6700\u65B0\u76EE\u5F55\uFF0C\u6216\u901A\u8FC7 GitHub\u3001\u672C\u5730 .zip \u5305\u6216\u672C\u5730\u76EE\u5F55\u5BFC\u5165\u3002",
30998
31010
  marketplaceFallbackNotice: "\u8FDC\u7AEF\u5E02\u573A\u76EE\u5F55\u6682\u4E0D\u53EF\u8FBE\u3002\u4F60\u4ECD\u53EF\u901A\u8FC7 GitHub\u3001ZIP \u6216\u672C\u5730\u76EE\u5F55\u5B89\u88C5\u63D2\u4EF6\u3002",
30999
31011
  marketplaceLoadFailed: "\u65E0\u6CD5\u52A0\u8F7D\u63D2\u4EF6\u5E02\u573A\uFF1A{message}",
31000
- installedSuccess: "\u5DF2\u5B89\u88C5\u201C{name}\u201D\uFF08v{version}\uFF09\uFF0C\u53EF\u6309\u9700\u5F00\u542F\u3002",
31012
+ installedSuccess: "\u5DF2\u5B89\u88C5\u5E76\u542F\u7528\u201C{name}\u201D\uFF08v{version}\uFF09\u3002",
31013
+ installedSlotConflict: "\u5DF2\u5B89\u88C5\u201C{name}\u201D\uFF08v{version}\uFF09\uFF0C\u4F46\u56E0\u4E0E {other} \u5B58\u5728 Desktop \u69FD\u4F4D\u51B2\u7A81\u6682\u672A\u542F\u7528\uFF0C\u8BF7\u5148\u7981\u7528 {other} \u540E\u518D\u542F\u7528\u3002",
31014
+ installedDisabled: "\u5DF2\u5B89\u88C5\u201C{name}\u201D\uFF08v{version}\uFF09\uFF0C\u5F53\u524D\u672A\u542F\u7528\uFF0C\u53EF\u524D\u5F80\u300C\u5DF2\u5B89\u88C5\u300D\u67E5\u770B\u6216\u624B\u52A8\u542F\u7528\u3002",
31001
31015
  updatedSuccess: "\u5DF2\u5C06\u201C{name}\u201D\u66F4\u65B0\u81F3 v{version}\u3002",
31002
31016
  uninstalledSuccess: "\u5DF2\u5378\u8F7D\u201C{name}\u201D\u3002",
31003
31017
  installFailed: "\u5B89\u88C5\u63D2\u4EF6\u5931\u8D25\uFF1A{message}",
@@ -34770,9 +34784,11 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
34770
34784
  }
34771
34785
 
34772
34786
  // src/renderer-native-model-loading.ts
34773
- function isNativeModelCarrierLoadingButton(button2) {
34774
- if (!button2.disabled || button2.getAttribute("data-composer-navigation-target") !== "reasoning" || button2.getAttribute("aria-busy") !== "true" || button2.hasAttribute("aria-haspopup"))
34775
- return false;
34787
+ var NATIVE_MODEL_LOADING_FIBER_WALK_DEPTH = 120;
34788
+ function isRecord(value) {
34789
+ return typeof value === "object" && value !== null && !Array.isArray(value);
34790
+ }
34791
+ function hasCarrierLabel(button2) {
34776
34792
  for (const label of button2.children) {
34777
34793
  const text2 = label.firstChild;
34778
34794
  if (label.localName !== "span" || text2?.nodeName !== "#text") continue;
@@ -34783,6 +34799,40 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
34783
34799
  }
34784
34800
  return false;
34785
34801
  }
34802
+ function hasSkeletonPlaceholder(button2) {
34803
+ if (!button2.getAttribute("aria-label")?.trim() || button2.children.length !== 1) return false;
34804
+ const placeholder = button2.children[0];
34805
+ return placeholder?.localName === "span" && placeholder.getAttribute("aria-hidden") === "true" && Boolean(placeholder.getAttribute("data-size")?.trim()) && (placeholder.children?.length ?? 0) === 0 && (placeholder.textContent ?? "").trim() === "";
34806
+ }
34807
+ function hasNativeModelPickerLoadingOwner(button2, composer) {
34808
+ const fiberKey = Object.getOwnPropertyNames(button2).find(
34809
+ (key2) => key2.startsWith("__reactFiber$")
34810
+ );
34811
+ if (!fiberKey) return false;
34812
+ const ancestors2 = committedReactAncestors(
34813
+ Object.getOwnPropertyDescriptor(button2, fiberKey)?.value
34814
+ );
34815
+ const host = ancestors2[0];
34816
+ const hostProps = isRecord(host?.memoizedProps) ? host.memoizedProps : void 0;
34817
+ if (host?.stateNode !== button2 || hostProps?.["data-composer-navigation-target"] !== "reasoning" || hostProps?.["aria-busy"] !== true || hostProps?.disabled !== true) {
34818
+ return false;
34819
+ }
34820
+ for (const owner of ancestors2.slice(1, NATIVE_MODEL_LOADING_FIBER_WALK_DEPTH)) {
34821
+ if (owner.stateNode === composer) break;
34822
+ const props = isRecord(owner.memoizedProps) ? owner.memoizedProps : void 0;
34823
+ if (!props) continue;
34824
+ if ("conversationId" in props && "permissionsHostId" in props && "permissionsCwdOverride" in props && ("hasThreadResumeFailed" in props || "serviceTierDefaults" in props || isRecord(props.home))) {
34825
+ return true;
34826
+ }
34827
+ }
34828
+ return false;
34829
+ }
34830
+ function isNativeModelLoadingButton(button2, composer) {
34831
+ if (!button2.disabled || button2.getAttribute("data-composer-navigation-target") !== "reasoning" || button2.getAttribute("aria-busy") !== "true" || button2.hasAttribute("aria-haspopup"))
34832
+ return false;
34833
+ if (hasCarrierLabel(button2)) return true;
34834
+ return hasSkeletonPlaceholder(button2) && hasNativeModelPickerLoadingOwner(button2, composer);
34835
+ }
34786
34836
 
34787
34837
  // src/renderer-native-model-retry.ts
34788
34838
  function record10(value) {
@@ -34922,7 +34972,7 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
34922
34972
  const composer = element.closest(CODEX_COMPOSER_SELECTOR);
34923
34973
  return composer && !hasNativeComposerRequest(composer) && !isOrbitComposer(composer) ? composer : null;
34924
34974
  }
34925
- function isRecord(value) {
34975
+ function isRecord2(value) {
34926
34976
  return typeof value === "object" && value !== null && !Array.isArray(value);
34927
34977
  }
34928
34978
  var NATIVE_CONTROL_FIBER_WALK_DEPTH = 120;
@@ -34939,7 +34989,7 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
34939
34989
  let fiber = fiberName ? Object.getOwnPropertyDescriptor(element, fiberName)?.value : null;
34940
34990
  for (let depth = 0; fiber && depth < NATIVE_CONTROL_FIBER_WALK_DEPTH; depth += 1) {
34941
34991
  const props = fiber.memoizedProps;
34942
- if (isRecord(props) && typeof props.onSelectModel === "function" && "reasoningEffort" in props && (typeof props.onSelectReasoningEffort === "function" && isRecord(props.fallbackPowerSelection) || element.getAttribute("data-composer-navigation-target") === "reasoning" && typeof props.onCommitPower === "function" && Array.isArray(props.powerSelections))) {
34992
+ if (isRecord2(props) && typeof props.onSelectModel === "function" && "reasoningEffort" in props && (typeof props.onSelectReasoningEffort === "function" && isRecord2(props.fallbackPowerSelection) || element.getAttribute("data-composer-navigation-target") === "reasoning" && typeof props.onCommitPower === "function" && Array.isArray(props.powerSelections))) {
34943
34993
  return true;
34944
34994
  }
34945
34995
  const parent = fiber.return;
@@ -34959,7 +35009,7 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
34959
35009
  let ownsComposerPermissionState = false;
34960
35010
  for (let depth = 0; fiber && depth < NATIVE_CONTROL_FIBER_WALK_DEPTH; depth += 1) {
34961
35011
  const props = fiber.memoizedProps;
34962
- if (isRecord(props)) {
35012
+ if (isRecord2(props)) {
34963
35013
  if (props["data-composer-navigation-target"] === "permissions" && props["aria-haspopup"] === "menu") {
34964
35014
  ownsTrigger = true;
34965
35015
  }
@@ -34990,7 +35040,7 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
34990
35040
  'button[aria-haspopup="menu"], button[data-composer-navigation-target="reasoning"]'
34991
35041
  )
34992
35042
  ].filter(
34993
- (button2) => !isOwnedRendererControl(button2) && button2.closest(CODEX_COMPOSER_SELECTOR) === composer && (isNativeModelControlCandidate(button2) || isNativeModelRetryButton(button2, composer) || isNativeModelCarrierLoadingButton(button2))
35043
+ (button2) => !isOwnedRendererControl(button2) && button2.closest(CODEX_COMPOSER_SELECTOR) === composer && (isNativeModelControlCandidate(button2) || isNativeModelRetryButton(button2, composer) || isNativeModelLoadingButton(button2, composer))
34994
35044
  );
34995
35045
  return candidates.length === 1 ? candidates[0] ?? null : null;
34996
35046
  }
@@ -35449,19 +35499,19 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
35449
35499
 
35450
35500
  // src/renderer-codex-usage-banner.ts
35451
35501
  var MAX_FIBERS = 2e4;
35452
- function isRecord2(value) {
35502
+ function isRecord3(value) {
35453
35503
  return typeof value === "object" && value !== null && !Array.isArray(value);
35454
35504
  }
35455
35505
  function isUsageBanner(props) {
35456
- return isRecord2(props) && "banner" in props && "rateLimitStatus" in props && typeof props.sendBlocked === "boolean";
35506
+ return isRecord3(props) && "banner" in props && "rateLimitStatus" in props && typeof props.sendBlocked === "boolean";
35457
35507
  }
35458
35508
  function isElement(value) {
35459
- return isRecord2(value) && typeof value.setAttribute === "function" && isRecord2(value.style);
35509
+ return isRecord3(value) && typeof value.setAttribute === "function" && isRecord3(value.style);
35460
35510
  }
35461
35511
  function hostElements(fiber, budget) {
35462
35512
  const result = [];
35463
35513
  const visit2 = (node2) => {
35464
- for (let current = node2; isRecord2(current); current = current.sibling) {
35514
+ for (let current = node2; isRecord3(current); current = current.sibling) {
35465
35515
  if (budget.remaining-- <= 0) return;
35466
35516
  const { stateNode } = current;
35467
35517
  if (isElement(stateNode)) result.push(stateNode);
@@ -35472,13 +35522,13 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
35472
35522
  return result;
35473
35523
  }
35474
35524
  function findCodexUsageBannerElements(owner) {
35475
- if (!isRecord2(owner)) return [];
35525
+ if (!isRecord3(owner)) return [];
35476
35526
  const budget = { remaining: MAX_FIBERS };
35477
35527
  const found = [];
35478
35528
  const stack = [owner.child];
35479
35529
  while (stack.length > 0 && budget.remaining > 0) {
35480
35530
  const node2 = stack.pop();
35481
- if (!isRecord2(node2)) continue;
35531
+ if (!isRecord3(node2)) continue;
35482
35532
  budget.remaining -= 1;
35483
35533
  const fiber = node2;
35484
35534
  stack.push(fiber.sibling);
@@ -35524,13 +35574,13 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
35524
35574
  var MAX_HOOKS = 4096;
35525
35575
  var MAX_DOM_DEPTH = 12;
35526
35576
  var RETRY_DELAY_MS = 1e3;
35527
- function isRecord3(value) {
35577
+ function isRecord4(value) {
35528
35578
  return typeof value === "object" && value !== null && !Array.isArray(value);
35529
35579
  }
35530
35580
  function hooksOf(fiber) {
35531
35581
  const result = [];
35532
- let hook = isRecord3(fiber) ? fiber.memoizedState : null;
35533
- while (isRecord3(hook) && result.length < MAX_HOOKS) {
35582
+ let hook = isRecord4(fiber) ? fiber.memoizedState : null;
35583
+ while (isRecord4(hook) && result.length < MAX_HOOKS) {
35534
35584
  result.push(hook);
35535
35585
  hook = hook.next;
35536
35586
  }
@@ -35547,7 +35597,7 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
35547
35597
  Object.getOwnPropertyDescriptor(element, key2)?.value
35548
35598
  );
35549
35599
  const consumers = ancestors2.filter(
35550
- ({ memoizedProps: props }) => isRecord3(props) && typeof props.submitDisabledReasons === "string" && typeof props.onSubmitLocal === "function"
35600
+ ({ memoizedProps: props }) => isRecord4(props) && typeof props.submitDisabledReasons === "string" && typeof props.onSubmitLocal === "function"
35551
35601
  );
35552
35602
  if (consumers.length > 0) {
35553
35603
  const consumer = consumers.length === 1 ? consumers[0] : void 0;
@@ -35556,7 +35606,7 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
35556
35606
  }
35557
35607
  const scopes = [];
35558
35608
  ancestors2.forEach(({ memoizedProps: props }, index) => {
35559
- if (isRecord3(props) && "onLocalSubmitStart" in props && typeof props.submitDisabled === "boolean") {
35609
+ if (isRecord4(props) && "onLocalSubmitStart" in props && typeof props.submitDisabled === "boolean") {
35560
35610
  scopes.push({ owner: ancestors2[index], fibers: ancestors2.slice(0, index + 1) });
35561
35611
  }
35562
35612
  });
@@ -35581,11 +35631,11 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
35581
35631
  if (!Array.isArray(memo2) || !Array.isArray(memo2[1])) return null;
35582
35632
  const [subscriber, dependencies] = memo2;
35583
35633
  const signal = dependencies[0];
35584
- const adapted = isRecord3(signal) && typeof signal.get === "function" && typeof signal.subscribe === "function";
35634
+ const adapted = isRecord4(signal) && typeof signal.get === "function" && typeof signal.subscribe === "function";
35585
35635
  const [store, atom] = adapted ? [signal.store, signal.atom] : dependencies;
35586
35636
  const instance = hook.next?.queue;
35587
35637
  const effect = hook.next?.next?.memoizedState;
35588
- if (!isRecord3(subscriber) || typeof subscriber.getSnapshot !== "function" || typeof subscriber.subscribe !== "function" || !isRecord3(store) || typeof store.get !== "function" || typeof store.sub !== "function" || !isRecord3(atom) || typeof atom.read !== "function" || "write" in atom || !isRecord3(instance) || typeof instance.value !== "boolean" && typeof instance.value !== "string" || typeof instance.getSnapshot !== "function" || !isRecord3(effect) || typeof effect.create !== "function" || !Array.isArray(effect.deps) || effect.deps[0] !== subscriber.subscribe) {
35638
+ if (!isRecord4(subscriber) || typeof subscriber.getSnapshot !== "function" || typeof subscriber.subscribe !== "function" || !isRecord4(store) || typeof store.get !== "function" || typeof store.sub !== "function" || !isRecord4(atom) || typeof atom.read !== "function" || "write" in atom || !isRecord4(instance) || typeof instance.value !== "boolean" && typeof instance.value !== "string" || typeof instance.getSnapshot !== "function" || !isRecord4(effect) || typeof effect.create !== "function" || !Array.isArray(effect.deps) || effect.deps[0] !== subscriber.subscribe) {
35589
35639
  return null;
35590
35640
  }
35591
35641
  return {
@@ -35630,10 +35680,10 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
35630
35680
  visiting.delete(dependency);
35631
35681
  }
35632
35682
  }
35633
- if (!isRecord3(value)) return value;
35683
+ if (!isRecord4(value)) return value;
35634
35684
  if (typeof value.hardBlocked === "boolean") return trace(value, "reserve");
35635
35685
  if ("authMethod" in value) return trace(value, "auth");
35636
- if (isRecord3(value.data) && isRecord3(value.data.rate_limit)) {
35686
+ if (isRecord4(value.data) && isRecord4(value.data.rate_limit)) {
35637
35687
  return {
35638
35688
  ...value,
35639
35689
  data: { ...value.data, rate_limit: trace(value.data.rate_limit, "limit") }
@@ -35698,9 +35748,9 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
35698
35748
  const type = consumer.elementType ?? consumer.type;
35699
35749
  if (type == null) return null;
35700
35750
  const producers = ancestors2.slice(ancestors2.indexOf(consumer) + 1).filter(({ updateQueue }) => {
35701
- const cache = isRecord3(updateQueue) ? updateQueue.memoCache : null;
35702
- return isRecord3(cache) && Array.isArray(cache.data) && cache.data.some(
35703
- (row) => Array.isArray(row) && row.some((node2) => isRecord3(node2) && node2.props === props && node2.type === type)
35751
+ const cache = isRecord4(updateQueue) ? updateQueue.memoCache : null;
35752
+ return isRecord4(cache) && Array.isArray(cache.data) && cache.data.some(
35753
+ (row) => Array.isArray(row) && row.some((node2) => isRecord4(node2) && node2.props === props && node2.type === type)
35704
35754
  );
35705
35755
  });
35706
35756
  const producer = producers[0];
@@ -35815,7 +35865,7 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
35815
35865
  }
35816
35866
  function isBound(projections) {
35817
35867
  return [...projections].every(({ fiber, subscriber, instance }) => {
35818
- const alternate = isRecord3(fiber.alternate) ? fiber.alternate : null;
35868
+ const alternate = isRecord4(fiber.alternate) ? fiber.alternate : null;
35819
35869
  return [fiber, alternate].some(
35820
35870
  (candidate) => hooksOf(candidate).some(
35821
35871
  (hook) => Array.isArray(hook.memoizedState) && hook.memoizedState[0] === subscriber && hook.next?.queue === instance
@@ -35900,7 +35950,7 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
35900
35950
 
35901
35951
  // src/renderer-native-provider-usage-banner.ts
35902
35952
  var COMPOSER_SELECTOR = "[data-codex-composer-root]";
35903
- function isRecord4(value) {
35953
+ function isRecord5(value) {
35904
35954
  return typeof value === "object" && value !== null && !Array.isArray(value);
35905
35955
  }
35906
35956
  function isCodexUsageBanner(element, composer) {
@@ -35910,7 +35960,7 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
35910
35960
  for (const { memoizedProps: props } of committedReactAncestors(
35911
35961
  Object.getOwnPropertyDescriptor(element, key2)?.value
35912
35962
  )) {
35913
- if (!isRecord4(props) || !isRecord4(props.banner)) continue;
35963
+ if (!isRecord5(props) || !isRecord5(props.banner)) continue;
35914
35964
  const type = props.banner.banner_type;
35915
35965
  return typeof type === "string" && /^(?:[a-z0-9]+_)*rate_limit_reached$/u.test(type);
35916
35966
  }
@@ -36307,18 +36357,18 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
36307
36357
  }
36308
36358
 
36309
36359
  // src/renderer-native-thread.ts
36310
- function isRecord5(value) {
36360
+ function isRecord6(value) {
36311
36361
  return typeof value === "object" && value !== null && !Array.isArray(value);
36312
36362
  }
36313
36363
  function usesIndependentNativeInference(value, modelProvider) {
36314
- const config2 = isRecord5(value) ? value.config : null;
36315
- if (!isRecord5(config2)) return false;
36364
+ const config2 = isRecord6(value) ? value.config : null;
36365
+ if (!isRecord6(config2)) return false;
36316
36366
  const providerId = modelProvider ?? config2.model_provider;
36317
36367
  if (typeof providerId !== "string") return false;
36318
36368
  if (["openai", "cc-switch-official", "codexhost"].includes(providerId)) return false;
36319
36369
  const providers = config2.model_providers;
36320
- const provider = isRecord5(providers) ? providers[providerId] : null;
36321
- if (!isRecord5(provider) || typeof provider.base_url !== "string") return false;
36370
+ const provider = isRecord6(providers) ? providers[providerId] : null;
36371
+ if (!isRecord6(provider) || typeof provider.base_url !== "string") return false;
36322
36372
  if (!URL.canParse(provider.base_url)) return false;
36323
36373
  const endpoint = new URL(provider.base_url);
36324
36374
  if (!["http:", "https:"].includes(endpoint.protocol)) return false;
@@ -36332,8 +36382,8 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
36332
36382
  }
36333
36383
  async function readNativeCodexThread(sendRequest, threadId) {
36334
36384
  const native = await sendRequest("thread/read", { threadId, includeTurns: false });
36335
- const thread3 = isRecord5(native) ? native.thread : null;
36336
- if (!isRecord5(thread3) || thread3.id !== threadId || typeof thread3.modelProvider !== "string" || !thread3.modelProvider || thread3.modelProvider === "codexhost" || typeof thread3.cliVersion !== "string" || !thread3.cliVersion || thread3.cliVersion === "codexhost") {
36385
+ const thread3 = isRecord6(native) ? native.thread : null;
36386
+ if (!isRecord6(thread3) || thread3.id !== threadId || typeof thread3.modelProvider !== "string" || !thread3.modelProvider || thread3.modelProvider === "codexhost" || typeof thread3.cliVersion !== "string" || !thread3.cliVersion || thread3.cliVersion === "codexhost") {
36337
36387
  throw new Error("Native Thread response cannot establish Codex ownership");
36338
36388
  }
36339
36389
  return {
@@ -36422,15 +36472,15 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
36422
36472
  var CODEX_ACCOUNT_LIST_METHOD = "codexhost/account/list";
36423
36473
  var CODEX_ACCOUNT_REFRESH_METHOD = "codexhost/account/refresh";
36424
36474
  var CODEX_ACCOUNT_CHANGED_METHOD = "codexhost/account/changed";
36425
- function isRecord6(value) {
36475
+ function isRecord7(value) {
36426
36476
  return typeof value === "object" && value !== null && !Array.isArray(value);
36427
36477
  }
36428
36478
  function notifiedThreadId(notification) {
36429
- if (!isRecord6(notification) || !THREAD_USAGE_REFRESH_METHODS.includes(notification.method)) {
36479
+ if (!isRecord7(notification) || !THREAD_USAGE_REFRESH_METHODS.includes(notification.method)) {
36430
36480
  return null;
36431
36481
  }
36432
36482
  const params = notification.params;
36433
- if (!isRecord6(params)) return null;
36483
+ if (!isRecord7(params)) return null;
36434
36484
  const parsed = hostThreadIdSchema.safeParse(params.threadId);
36435
36485
  return parsed.success ? parsed.data : null;
36436
36486
  }
@@ -36510,7 +36560,7 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
36510
36560
  THREAD_TREE_SNAPSHOT_METHOD,
36511
36561
  (message2) => {
36512
36562
  const result = threadTreeWatchResultSchema.safeParse(
36513
- isRecord6(message2) ? message2.params : void 0
36563
+ isRecord7(message2) ? message2.params : void 0
36514
36564
  );
36515
36565
  if (!closed && result.success && subscriptionId2 === result.data.subscriptionId && result.data.snapshot.revision > revision) {
36516
36566
  revision = result.data.snapshot.revision;
@@ -36630,7 +36680,7 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
36630
36680
  watchThreadTree,
36631
36681
  async hasDesktopThread(threadId) {
36632
36682
  const result = await manager.sendRequest("thread/read", { threadId, includeTurns: false });
36633
- return isRecord6(result) && isRecord6(result.thread) && result.thread.id === threadId;
36683
+ return isRecord7(result) && isRecord7(result.thread) && result.thread.id === threadId;
36634
36684
  },
36635
36685
  subscribeHarnessPreferences(listener) {
36636
36686
  return notificationTarget(source)?.addNotificationCallback?.(
@@ -36711,7 +36761,7 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
36711
36761
  },
36712
36762
  subscribeSkillsChanged(listener) {
36713
36763
  return notificationTarget(source)?.addNotificationCallback?.(SKILLS_CHANGED_METHOD, (value) => {
36714
- if (!isRecord6(value) || value.method !== SKILLS_CHANGED_METHOD) return;
36764
+ if (!isRecord7(value) || value.method !== SKILLS_CHANGED_METHOD) return;
36715
36765
  const parsed = skillsChangedParamsSchema.safeParse(value.params);
36716
36766
  if (parsed.success) listener(parsed.data);
36717
36767
  }) ?? (() => {
@@ -37018,7 +37068,7 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
37018
37068
  throw new Error("Renderer Account notification callback is unavailable");
37019
37069
  }
37020
37070
  return notifications.addNotificationCallback(CODEX_ACCOUNT_CHANGED_METHOD, (notification) => {
37021
- if (!isRecord6(notification) || notification.method !== CODEX_ACCOUNT_CHANGED_METHOD) return;
37071
+ if (!isRecord7(notification) || notification.method !== CODEX_ACCOUNT_CHANGED_METHOD) return;
37022
37072
  const state = codexAccountChangedSchema.safeParse(notification.params);
37023
37073
  if (state.success) listener(state.data);
37024
37074
  });
@@ -37030,14 +37080,14 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
37030
37080
  }
37031
37081
 
37032
37082
  // src/renderer-external-queue.ts
37033
- function isRecord7(value) {
37083
+ function isRecord8(value) {
37034
37084
  return value !== null && typeof value === "object" && !Array.isArray(value);
37035
37085
  }
37036
37086
  function installRendererExternalQueue(target2) {
37037
- if (!isRecord7(target2) || typeof target2.getTurnCoordinator !== "function") return null;
37087
+ if (!isRecord8(target2) || typeof target2.getTurnCoordinator !== "function") return null;
37038
37088
  const coordinator = target2.getTurnCoordinator();
37039
- const queue = isRecord7(coordinator) ? coordinator.serverQueue : null;
37040
- if (!isRecord7(queue) || typeof queue.isEnabled !== "function") return null;
37089
+ const queue = isRecord8(coordinator) ? coordinator.serverQueue : null;
37090
+ if (!isRecord8(queue) || typeof queue.isEnabled !== "function") return null;
37041
37091
  return () => void 0;
37042
37092
  }
37043
37093
 
@@ -37066,19 +37116,19 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
37066
37116
  }
37067
37117
 
37068
37118
  // src/renderer-external-steering.ts
37069
- function isRecord8(value) {
37119
+ function isRecord9(value) {
37070
37120
  return value !== null && typeof value === "object" && !Array.isArray(value);
37071
37121
  }
37072
37122
  function isManager(value) {
37073
- return isRecord8(value) && ["sendRequest", "steerTurn", "startTurn", "getTurnCoordinator"].every(
37123
+ return isRecord9(value) && ["sendRequest", "steerTurn", "startTurn", "getTurnCoordinator"].every(
37074
37124
  (key2) => typeof value[key2] === "function"
37075
37125
  );
37076
37126
  }
37077
37127
  function submissionHost(manager) {
37078
37128
  const coordinator = manager.getTurnCoordinator();
37079
- const options = isRecord8(coordinator) ? coordinator.options : null;
37080
- const host = isRecord8(options) ? options.submissionHost : null;
37081
- if (!isRecord8(host) || typeof host.getActiveTurnId !== "function" || typeof host.hasPendingTurnStart !== "function") {
37129
+ const options = isRecord9(coordinator) ? coordinator.options : null;
37130
+ const host = isRecord9(options) ? options.submissionHost : null;
37131
+ if (!isRecord9(host) || typeof host.getActiveTurnId !== "function" || typeof host.hasPendingTurnStart !== "function") {
37082
37132
  throw new Error("Desktop turn submission binding is unavailable");
37083
37133
  }
37084
37134
  return {
@@ -37120,20 +37170,20 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
37120
37170
  var INTERRUPTED_QUEUE_REASON = "Interrupted before the steer was accepted.";
37121
37171
  async function preserveQueuedFollowUps(manager, threadId) {
37122
37172
  const coordinator = manager.getTurnCoordinator();
37123
- if (!isRecord8(coordinator) || typeof coordinator.loadMessages !== "function" || typeof coordinator.readMessages !== "function" || typeof coordinator.mutate !== "function") {
37173
+ if (!isRecord9(coordinator) || typeof coordinator.loadMessages !== "function" || typeof coordinator.readMessages !== "function" || typeof coordinator.mutate !== "function") {
37124
37174
  throw new Error("Desktop follow-up queue binding is unavailable");
37125
37175
  }
37126
37176
  await coordinator.loadMessages.call(coordinator, threadId);
37127
37177
  const messages = coordinator.readMessages.call(coordinator, threadId);
37128
37178
  if (!Array.isArray(messages)) throw new Error("Desktop follow-up queue is unavailable");
37129
37179
  const alreadyPaused = new Set(
37130
- messages.filter((message2) => isRecord8(message2) && message2.pausedReason != null).map((message2) => message2.id)
37180
+ messages.filter((message2) => isRecord9(message2) && message2.pausedReason != null).map((message2) => message2.id)
37131
37181
  );
37132
37182
  return () => {
37133
37183
  coordinator.mutate.call(coordinator, threadId, (current) => {
37134
37184
  if (!Array.isArray(current)) return current;
37135
37185
  return current.map((message2) => {
37136
- if (!isRecord8(message2) || alreadyPaused.has(message2.id) || message2.pausedReason !== INTERRUPTED_QUEUE_REASON)
37186
+ if (!isRecord9(message2) || alreadyPaused.has(message2.id) || message2.pausedReason !== INTERRUPTED_QUEUE_REASON)
37137
37187
  return message2;
37138
37188
  const resumed = { ...message2 };
37139
37189
  delete resumed.pausedReason;
@@ -37152,16 +37202,16 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
37152
37202
  const pending2 = /* @__PURE__ */ new Map();
37153
37203
  let disposed = false;
37154
37204
  const sendPrepared = function(method, params, options) {
37155
- const messageId = isRecord8(params) ? params.clientUserMessageId : null;
37156
- const route = typeof messageId === "string" && isRecord8(params) ? routes.get(`${params.threadId}\0${messageId}`) : void 0;
37157
- if (method !== "turn/start" || !isRecord8(params) || !route || route.threadId !== params.threadId) {
37205
+ const messageId = isRecord9(params) ? params.clientUserMessageId : null;
37206
+ const route = typeof messageId === "string" && isRecord9(params) ? routes.get(`${params.threadId}\0${messageId}`) : void 0;
37207
+ if (method !== "turn/start" || !isRecord9(params) || !route || route.threadId !== params.threadId) {
37158
37208
  if (method === "turn/start" && sendTurnStart) {
37159
37209
  return sendTurnStart(params, (input3) => {
37160
37210
  if (disposed) throw new Error("External submission binding was disposed");
37161
37211
  return originalSend.call(manager, method, input3, options);
37162
37212
  });
37163
37213
  }
37164
- if (method === "turn/steer" && isRecord8(params) && typeof params.threadId === "string" && activeTurnSteers.has(params.threadId)) {
37214
+ if (method === "turn/steer" && isRecord9(params) && typeof params.threadId === "string" && activeTurnSteers.has(params.threadId)) {
37165
37215
  params = { ...params, [THREAD_STEER_DELIVERY_PARAM]: "activeTurn" };
37166
37216
  }
37167
37217
  return originalSend.call(manager, method, params, options);
@@ -37184,7 +37234,7 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
37184
37234
  options
37185
37235
  )
37186
37236
  ).then((response) => {
37187
- if (!isRecord8(response) || typeof response.turnId !== "string" || !response.turnId) {
37237
+ if (!isRecord9(response) || typeof response.turnId !== "string" || !response.turnId) {
37188
37238
  throw new Error("External steering returned no replacement Turn identity");
37189
37239
  }
37190
37240
  return {
@@ -37225,7 +37275,7 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
37225
37275
  ] = args;
37226
37276
  if (typeof threadId !== "string") return originalSteer.apply(manager, args);
37227
37277
  const role = manager.getStreamRole?.(threadId);
37228
- if (isRecord8(role) && role.role === "follower") return originalSteer.apply(manager, args);
37278
+ if (isRecord9(role) && role.role === "follower") return originalSteer.apply(manager, args);
37229
37279
  let host = null;
37230
37280
  let expectedTurnId;
37231
37281
  try {
@@ -37233,7 +37283,7 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
37233
37283
  expectedTurnId = host.getActiveTurnId(threadId);
37234
37284
  } catch {
37235
37285
  }
37236
- const text2 = Array.isArray(input3) ? input3.filter((item) => isRecord8(item) && typeof item.text === "string").map((item) => item.text).join("\n") : void 0;
37286
+ const text2 = Array.isArray(input3) ? input3.filter((item) => isRecord9(item) && typeof item.text === "string").map((item) => item.text).join("\n") : void 0;
37237
37287
  const delivery = await inspectDelivery(threadId, text2);
37238
37288
  if (disposed) throw new Error("External steering binding was disposed");
37239
37289
  if (delivery === "official") return originalSteer.apply(manager, args);
@@ -37249,21 +37299,21 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
37249
37299
  }
37250
37300
  if (!host) throw new Error("Desktop turn submission binding is unavailable");
37251
37301
  const currentRole = manager.getStreamRole?.(threadId);
37252
- if (isRecord8(currentRole) && currentRole.role === "follower")
37302
+ if (isRecord9(currentRole) && currentRole.role === "follower")
37253
37303
  return originalSteer.apply(manager, args);
37254
37304
  if (!Array.isArray(input3) || input3.length === 0 || input3.some((item) => {
37255
- if (!isRecord8(item)) return true;
37305
+ if (!isRecord9(item)) return true;
37256
37306
  if (item.type === "text") return typeof item.text !== "string";
37257
37307
  if (item.type === "localImage") return typeof item.path !== "string" || !item.path;
37258
37308
  if (item.type === "image") return typeof item.url !== "string" || !item.url;
37259
37309
  return true;
37260
37310
  }) || !input3.some(
37261
- (item) => isRecord8(item) && (item.type !== "text" || typeof item.text === "string" && item.text.trim())
37311
+ (item) => isRecord9(item) && (item.type !== "text" || typeof item.text === "string" && item.text.trim())
37262
37312
  )) {
37263
37313
  throw new Error("External steering requires non-empty text or image input");
37264
37314
  }
37265
37315
  if (toolOutput != null) throw new Error("External steering cannot replace a tool response");
37266
- if (!isRecord8(restoreMessage) || !isRecord8(restoreMessage.context)) {
37316
+ if (!isRecord9(restoreMessage) || !isRecord9(restoreMessage.context)) {
37267
37317
  throw new Error("Desktop steering message context is unavailable");
37268
37318
  }
37269
37319
  const messageId = typeof clientUserMessageId === "string" && clientUserMessageId ? clientUserMessageId : typeof restoreMessage.id === "string" && restoreMessage.id ? restoreMessage.id : crypto.randomUUID();
@@ -37313,7 +37363,7 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
37313
37363
  },
37314
37364
  onMessageAdded
37315
37365
  );
37316
- if (!isRecord8(response) || !isRecord8(response.turn) || typeof response.turn.id !== "string") {
37366
+ if (!isRecord9(response) || !isRecord9(response.turn) || typeof response.turn.id !== "string") {
37317
37367
  throw new Error("Desktop returned no replacement Turn identity");
37318
37368
  }
37319
37369
  try {
@@ -37344,7 +37394,7 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
37344
37394
  }
37345
37395
 
37346
37396
  // src/renderer-remote-attachments.ts
37347
- function isRecord9(value) {
37397
+ function isRecord10(value) {
37348
37398
  return value !== null && typeof value === "object" && !Array.isArray(value);
37349
37399
  }
37350
37400
  var MAX_IMAGE_BYTES = 20 * 1024 * 1024;
@@ -37386,14 +37436,14 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
37386
37436
  function createRemoteAttachmentSender(target2, hostId2, isCurrent) {
37387
37437
  const prepared = /* @__PURE__ */ new WeakMap();
37388
37438
  return (params, send) => {
37389
- if (hostId2 === "local" || !isRecord9(target2) || !isRecord9(params) || typeof params.threadId !== "string" || !Array.isArray(params.input) || typeof target2.getConversation !== "function")
37439
+ if (hostId2 === "local" || !isRecord10(target2) || !isRecord10(params) || typeof params.threadId !== "string" || !Array.isArray(params.input) || typeof target2.getConversation !== "function")
37390
37440
  return send(params);
37391
37441
  const images = params.input.filter(
37392
- (item) => isRecord9(item) && (item.type === "image" || item.type === "localImage")
37442
+ (item) => isRecord10(item) && (item.type === "image" || item.type === "localImage")
37393
37443
  );
37394
37444
  if (images.length === 0) return send(params);
37395
37445
  const conversation = target2.getConversation.call(target2, params.threadId);
37396
- if (!isRecord9(conversation) || conversation.id !== params.threadId || conversation.modelProvider !== "codexhost")
37446
+ if (!isRecord10(conversation) || conversation.id !== params.threadId || conversation.modelProvider !== "codexhost")
37397
37447
  return send(params);
37398
37448
  const assertCurrent = () => {
37399
37449
  if (!isCurrent()) throw new Error("Remote attachment connection is no longer available");
@@ -37406,7 +37456,7 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
37406
37456
  const cached2 = prepared.get(params);
37407
37457
  if (cached2) return cached2.then(dispatch);
37408
37458
  const input3 = params.input;
37409
- const text2 = input3.filter((item) => isRecord9(item) && item.type === "text").map((item) => isRecord9(item) && typeof item.text === "string" ? item.text : "").join("\n");
37459
+ const text2 = input3.filter((item) => isRecord10(item) && item.type === "text").map((item) => isRecord10(item) && typeof item.text === "string" ? item.text : "").join("\n");
37410
37460
  const existingPaths = desktopImageAttachmentPaths(text2);
37411
37461
  const prepare = async () => {
37412
37462
  if (existingPaths.length === images.length) return params;
@@ -37438,7 +37488,7 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
37438
37488
  contents: file2.contents,
37439
37489
  label: `image-${index + 1}.${file2.extension}`
37440
37490
  });
37441
- if (!isRecord9(saved) || !filePath2(saved.path) || saved.fsPath !== saved.path) {
37491
+ if (!isRecord10(saved) || !filePath2(saved.path) || saved.fsPath !== saved.path) {
37442
37492
  throw new Error("Desktop returned an invalid remote attachment path");
37443
37493
  }
37444
37494
  created.push(saved.path);
@@ -37642,11 +37692,11 @@ ${text2.includes("## My request:") ? "" : "\n## My request:\n"}`,
37642
37692
  }
37643
37693
 
37644
37694
  // src/renderer-manual-compaction.ts
37645
- function isRecord10(value) {
37695
+ function isRecord11(value) {
37646
37696
  return value !== null && typeof value === "object" && !Array.isArray(value);
37647
37697
  }
37648
37698
  function installRendererManualCompaction(target2, hostId2, messages) {
37649
- if (!messages || typeof messages.addEventListener !== "function" || typeof messages.removeEventListener !== "function" || !isRecord10(target2) || typeof target2.registerPendingManualContextCompaction !== "function" || typeof target2.getConversation !== "function") {
37699
+ if (!messages || typeof messages.addEventListener !== "function" || typeof messages.removeEventListener !== "function" || !isRecord11(target2) || typeof target2.registerPendingManualContextCompaction !== "function" || typeof target2.getConversation !== "function") {
37650
37700
  return null;
37651
37701
  }
37652
37702
  const register2 = target2.registerPendingManualContextCompaction;
@@ -37655,18 +37705,18 @@ ${text2.includes("## My request:") ? "" : "\n## My request:\n"}`,
37655
37705
  const listener = (event) => {
37656
37706
  if (event.source != null && event.source !== messages) return;
37657
37707
  const message2 = event.data;
37658
- if (!isRecord10(message2) || message2.type !== "mcp-notification" || message2.hostId !== hostId2 || message2.method !== THREAD_MANUAL_COMPACTION_STARTED_METHOD) {
37708
+ if (!isRecord11(message2) || message2.type !== "mcp-notification" || message2.hostId !== hostId2 || message2.method !== THREAD_MANUAL_COMPACTION_STARTED_METHOD) {
37659
37709
  return;
37660
37710
  }
37661
37711
  const params = threadManualCompactionStartedSchema.safeParse(message2.params);
37662
37712
  if (!params.success) return;
37663
37713
  const { threadId } = params.data;
37664
37714
  const conversation = getConversation.call(target2, threadId);
37665
- if (!isRecord10(conversation) || conversation.id !== threadId || conversation.modelProvider !== "codexhost") {
37715
+ if (!isRecord11(conversation) || conversation.id !== threadId || conversation.modelProvider !== "codexhost") {
37666
37716
  return;
37667
37717
  }
37668
37718
  const role = getStreamRole?.call(target2, threadId);
37669
- if (isRecord10(role) && role.role === "follower") return;
37719
+ if (isRecord11(role) && role.role === "follower") return;
37670
37720
  register2.call(target2, threadId);
37671
37721
  };
37672
37722
  messages.addEventListener("message", listener);
@@ -37844,7 +37894,7 @@ ${text2.includes("## My request:") ? "" : "\n## My request:\n"}`,
37844
37894
  var SIDEBAR_AGENT_ICON_ATTRIBUTE = "data-codexhost-sidebar-agent-icon";
37845
37895
  var SIDEBAR_AGENT_ICON_ROW_SELECTOR = `${SIDEBAR_THREAD_ROW_SELECTOR}, ${NATIVE_SCHEDULE_SIDEBAR_ROW_SELECTOR}`;
37846
37896
  var OWNERSHIP_RETRY_DELAYS_MS = [100, 300, 800, 1500, 3e3];
37847
- function isRecord11(value) {
37897
+ function isRecord12(value) {
37848
37898
  return typeof value === "object" && value !== null && !Array.isArray(value);
37849
37899
  }
37850
37900
  function sidebarThreadAttributes(element) {
@@ -37871,19 +37921,19 @@ ${text2.includes("## My request:") ? "" : "\n## My request:\n"}`,
37871
37921
  const fiberName = fiberNames[0];
37872
37922
  if (fiberNames.length !== 1 || !fiberName) return null;
37873
37923
  const firstFiber2 = Object.getOwnPropertyDescriptor(element, fiberName)?.value;
37874
- if (!isRecord11(firstFiber2)) return null;
37924
+ if (!isRecord12(firstFiber2)) return null;
37875
37925
  const candidates = /* @__PURE__ */ new Set();
37876
37926
  let fiber = firstFiber2;
37877
37927
  for (let depth = 0; fiber && depth < 12; depth += 1) {
37878
37928
  const props = fiber.memoizedProps;
37879
- if (isRecord11(props) && isRecord11(props.dataAttributes)) {
37929
+ if (isRecord12(props) && isRecord12(props.dataAttributes)) {
37880
37930
  const dataAttributes = props.dataAttributes;
37881
37931
  const threadId = hostThreadIdSchema.safeParse(props.conversationId);
37882
37932
  if (threadId.success && dataAttributes[SIDEBAR_THREAD_ROW_ATTRIBUTE] === rowMarker && dataAttributes[SIDEBAR_THREAD_ID_ATTRIBUTE] === taskKey && dataAttributes[SIDEBAR_THREAD_HOST_ID_ATTRIBUTE] === hostId2) {
37883
37933
  candidates.add(threadId.data);
37884
37934
  }
37885
37935
  }
37886
- fiber = isRecord11(fiber.return) ? fiber.return : null;
37936
+ fiber = isRecord12(fiber.return) ? fiber.return : null;
37887
37937
  }
37888
37938
  return candidates.size === 1 ? candidates.values().next().value ?? null : null;
37889
37939
  }
@@ -38380,7 +38430,7 @@ ${text2.includes("## My request:") ? "" : "\n## My request:\n"}`,
38380
38430
  if (row) finish(row);
38381
38431
  });
38382
38432
  }
38383
- function isRecord12(value) {
38433
+ function isRecord13(value) {
38384
38434
  return typeof value === "object" && value !== null && !Array.isArray(value);
38385
38435
  }
38386
38436
  function firstFiber(element) {
@@ -38390,7 +38440,7 @@ ${text2.includes("## My request:") ? "" : "\n## My request:\n"}`,
38390
38440
  const name = names[0];
38391
38441
  if (names.length !== 1 || !name) return null;
38392
38442
  const value = Object.getOwnPropertyDescriptor(element, name)?.value;
38393
- return isRecord12(value) ? value : null;
38443
+ return isRecord13(value) ? value : null;
38394
38444
  }
38395
38445
  function directForkAncestors(first) {
38396
38446
  const ancestors2 = [];
@@ -38400,7 +38450,7 @@ ${text2.includes("## My request:") ? "" : "\n## My request:\n"}`,
38400
38450
  if (seen.has(fiber)) return [];
38401
38451
  seen.add(fiber);
38402
38452
  ancestors2.push(fiber);
38403
- fiber = isRecord12(fiber.return) ? fiber.return : null;
38453
+ fiber = isRecord13(fiber.return) ? fiber.return : null;
38404
38454
  }
38405
38455
  return ancestors2;
38406
38456
  }
@@ -38418,7 +38468,7 @@ ${text2.includes("## My request:") ? "" : "\n## My request:\n"}`,
38418
38468
  let hasForkCallback = false;
38419
38469
  for (const fiber of ancestors2) {
38420
38470
  const props = fiber.memoizedProps;
38421
- if (!isRecord12(props)) continue;
38471
+ if (!isRecord13(props)) continue;
38422
38472
  if (!hasForkCallback && typeof props.onFork !== "function" && ownsOtherCallback(fiber, props)) {
38423
38473
  return null;
38424
38474
  }
@@ -38450,7 +38500,7 @@ ${text2.includes("## My request:") ? "" : "\n## My request:\n"}`,
38450
38500
  if (!threadId.success || !turnId.success) return null;
38451
38501
  const fiber = firstFiber(button2);
38452
38502
  const buttonProps = fiber?.memoizedProps;
38453
- if (!fiber || !isRecord12(buttonProps) || !Object.hasOwn(buttonProps, "aria-busy")) return null;
38503
+ if (!fiber || !isRecord13(buttonProps) || !Object.hasOwn(buttonProps, "aria-busy")) return null;
38454
38504
  return forkTargetFromAncestors(button2, threadId.data, turnId.data, directForkAncestors(fiber)) ?? forkTargetFromAncestors(button2, threadId.data, turnId.data, committedReactAncestors(fiber));
38455
38505
  }
38456
38506
  var BrowserRendererForkDom = class {
@@ -38516,16 +38566,16 @@ ${text2.includes("## My request:") ? "" : "\n## My request:\n"}`,
38516
38566
  // src/codex-locale-adapter.ts
38517
38567
  var DEFAULT_LOCALE_REQUEST_TIMEOUT_MS = 750;
38518
38568
  function isNativeLocaleServices(value) {
38519
- if (!isRecord13(value) || !Object.hasOwn(value, "appInfo")) return false;
38569
+ if (!isRecord14(value) || !Object.hasOwn(value, "appInfo")) return false;
38520
38570
  const appInfo = value.appInfo;
38521
38571
  return appInfo != null && typeof appInfo.getLocaleInfo === "function";
38522
38572
  }
38523
38573
  function isNativeSettingsServices(value) {
38524
- if (!isRecord13(value) || !Object.hasOwn(value, "settings")) return false;
38574
+ if (!isRecord14(value) || !Object.hasOwn(value, "settings")) return false;
38525
38575
  const settings = value.settings;
38526
38576
  return typeof settings?.read === "function" && typeof settings?.write === "function";
38527
38577
  }
38528
- function isRecord13(value) {
38578
+ function isRecord14(value) {
38529
38579
  return typeof value === "object" && value !== null && !Array.isArray(value);
38530
38580
  }
38531
38581
  function canonicalLocale(value) {
@@ -38547,7 +38597,7 @@ ${text2.includes("## My request:") ? "" : "\n## My request:\n"}`,
38547
38597
  return new DOMException("The operation was aborted", "AbortError");
38548
38598
  }
38549
38599
  function parseLocaleOverride(response) {
38550
- if (!isRecord13(response) || !Object.hasOwn(response, "effective")) {
38600
+ if (!isRecord14(response) || !Object.hasOwn(response, "effective")) {
38551
38601
  throw new Error("Codex native locale override response is malformed");
38552
38602
  }
38553
38603
  if (response.effective === null) return null;
@@ -38562,7 +38612,7 @@ ${text2.includes("## My request:") ? "" : "\n## My request:\n"}`,
38562
38612
  return locale;
38563
38613
  }
38564
38614
  function parseLocaleInfo(value) {
38565
- if (!isRecord13(value)) throw new Error("Codex locale info response is malformed");
38615
+ if (!isRecord14(value)) throw new Error("Codex locale info response is malformed");
38566
38616
  return {
38567
38617
  ideLocale: optionalLocale(value.ideLocale, "IDE locale"),
38568
38618
  systemLocale: optionalLocale(value.systemLocale, "system locale")
@@ -39380,7 +39430,7 @@ ${text2.includes("## My request:") ? "" : "\n## My request:\n"}`,
39380
39430
  }
39381
39431
  var DRAFT_PREWARM_POLICY_WAIT_TIMEOUT_MS = 1e4;
39382
39432
  var DRAFT_PREWARM_POLICY_POLL_INTERVAL_MS = 25;
39383
- function isRecord14(value) {
39433
+ function isRecord15(value) {
39384
39434
  return typeof value === "object" && value !== null && !Array.isArray(value);
39385
39435
  }
39386
39436
  function decodeOpenCodeTransportModelId(value) {
@@ -39545,7 +39595,7 @@ ${text2.includes("## My request:") ? "" : "\n## My request:\n"}`,
39545
39595
  let fiber = findComposerFiber(composer);
39546
39596
  for (let depth = 0; fiber && depth < 120; depth += 1) {
39547
39597
  const props = fiber.memoizedProps;
39548
- if (isRecord14(props) && "conversationId" in props && props.conversationId != null) {
39598
+ if (isRecord15(props) && "conversationId" in props && props.conversationId != null) {
39549
39599
  const candidate = hostThreadIdSchema.safeParse(props.conversationId);
39550
39600
  if (!candidate.success || threadId !== void 0 && threadId !== candidate.data) {
39551
39601
  return null;
@@ -39558,12 +39608,12 @@ ${text2.includes("## My request:") ? "" : "\n## My request:\n"}`,
39558
39608
  return threadId;
39559
39609
  }
39560
39610
  function isLegacySevenSlotDraftWrapper(value) {
39561
- if (!Array.isArray(value) || value.length !== 7 || value[3] !== value[5] || value[3] !== value[6] || !isRecord14(value[3]) || typeof value[3].get !== "function" || typeof value[2] !== "string" && value[2] !== null) {
39611
+ if (!Array.isArray(value) || value.length !== 7 || value[3] !== value[5] || value[3] !== value[6] || !isRecord15(value[3]) || typeof value[3].get !== "function" || typeof value[2] !== "string" && value[2] !== null) {
39562
39612
  return false;
39563
39613
  }
39564
39614
  try {
39565
39615
  const draft = value[3].get();
39566
- return isRecord14(draft) && "modelSettings" in draft && "isManuallyChanged" in draft;
39616
+ return isRecord15(draft) && "modelSettings" in draft && "isManuallyChanged" in draft;
39567
39617
  } catch {
39568
39618
  return false;
39569
39619
  }
@@ -39597,8 +39647,8 @@ ${text2.includes("## My request:") ? "" : "\n## My request:\n"}`,
39597
39647
  let fiber = findComposerFiber(composer);
39598
39648
  for (let depth = 0; fiber && depth < 120; depth += 1) {
39599
39649
  const updateQueue = fiber.updateQueue;
39600
- const memoCache = isRecord14(updateQueue) ? updateQueue.memoCache : null;
39601
- const data = isRecord14(memoCache) && Array.isArray(memoCache.data) ? memoCache.data : [];
39650
+ const memoCache = isRecord15(updateQueue) ? updateQueue.memoCache : null;
39651
+ const data = isRecord15(memoCache) && Array.isArray(memoCache.data) ? memoCache.data : [];
39602
39652
  for (const value of data) {
39603
39653
  const draftId = draftIdFromMemoValue(value);
39604
39654
  if (draftId) draftIds.add(draftId);
@@ -39626,7 +39676,7 @@ ${text2.includes("## My request:") ? "" : "\n## My request:\n"}`,
39626
39676
  return ["default", draftIds.values().next().value];
39627
39677
  }
39628
39678
  function isDraftPrewarmPolicyReady(value) {
39629
- return isRecord14(value) && value.state === "ready" && typeof value.hostId === "string" && value.hostId.length > 0 && typeof value.select === "function" && typeof value.clear === "function";
39679
+ return isRecord15(value) && value.state === "ready" && typeof value.hostId === "string" && value.hostId.length > 0 && typeof value.select === "function" && typeof value.clear === "function";
39630
39680
  }
39631
39681
  async function waitForRendererDraftPrewarmPolicy(target2, composer) {
39632
39682
  const deadline = Date.now() + DRAFT_PREWARM_POLICY_WAIT_TIMEOUT_MS;
@@ -39944,11 +39994,11 @@ ${text2.includes("## My request:") ? "" : "\n## My request:\n"}`,
39944
39994
  return null;
39945
39995
  }
39946
39996
  }
39947
- function isRecord15(value) {
39997
+ function isRecord16(value) {
39948
39998
  return typeof value === "object" && value !== null && !Array.isArray(value);
39949
39999
  }
39950
40000
  function parseExternalConfiguration(value) {
39951
- if (!isRecord15(value)) return void 0;
40001
+ if (!isRecord16(value)) return void 0;
39952
40002
  const model2 = harnessModelRefSchema.safeParse(value.model);
39953
40003
  if (!model2.success) return void 0;
39954
40004
  const thinkingOptionId = harnessThinkingOptionIdSchema.safeParse(value.thinkingOptionId);
@@ -39965,10 +40015,10 @@ ${text2.includes("## My request:") ? "" : "\n## My request:\n"}`,
39965
40015
  const raw = storage.getItem(RENDERER_NEW_THREAD_PREFERENCE_KEY);
39966
40016
  if (!raw) return void 0;
39967
40017
  const parsed = JSON.parse(raw);
39968
- if (!isRecord15(parsed) || parsed.version !== 1) return void 0;
40018
+ if (!isRecord16(parsed) || parsed.version !== 1) return void 0;
39969
40019
  if (parsed.lastAgent !== "codex" && !harnessPluginIdSchema.safeParse(parsed.lastAgent).success)
39970
40020
  return void 0;
39971
- const externalByAgent = isRecord15(parsed.externalByAgent) ? parsed.externalByAgent : {};
40021
+ const externalByAgent = isRecord16(parsed.externalByAgent) ? parsed.externalByAgent : {};
39972
40022
  const parsedExternal = Object.fromEntries(
39973
40023
  Object.keys(externalByAgent).filter((agent) => harnessPluginIdSchema.safeParse(agent).success).flatMap((agent) => {
39974
40024
  const configuration = parseExternalConfiguration(externalByAgent[agent]);
@@ -41521,6 +41571,17 @@ ${text2.includes("## My request:") ? "" : "\n## My request:\n"}`,
41521
41571
  const shared = targetSlots.filter((slot2) => otherSlots.includes(slot2));
41522
41572
  return shared.length > 0 ? shared : targetSlots;
41523
41573
  }
41574
+ function findDesktopSlotConflictForExtension(item, list) {
41575
+ if (item.state !== "valid") return void 0;
41576
+ if (item.desktopConflictWith) return item.desktopConflictWith;
41577
+ if (!item.manifest.desktop || !item.manifest.slots?.length) return void 0;
41578
+ return resolveDesktopExtensionSlots(
41579
+ [...list.configuration.enabled.filter((id2) => id2 !== item.id), item.id],
41580
+ list.extensions.filter(
41581
+ (entry) => entry.state === "valid" && Boolean(entry.manifest.desktop)
41582
+ ).map(({ id: id2, manifest }) => ({ id: id2, slots: manifest.slots ?? [] }))
41583
+ ).conflicts.get(item.id);
41584
+ }
41524
41585
  function isToggleBlocked(item) {
41525
41586
  if (item.enabled) return false;
41526
41587
  return item.state !== "valid";
@@ -47167,6 +47228,8 @@ ${detail}` : ""}`
47167
47228
  downloads,
47168
47229
  trustTier,
47169
47230
  statusState,
47231
+ statusDotOverride,
47232
+ stateBadge,
47170
47233
  update,
47171
47234
  description,
47172
47235
  attention,
@@ -47228,6 +47291,18 @@ ${detail}` : ""}`
47228
47291
  dot.setAttribute("aria-label", copy.states[statusState]);
47229
47292
  dot.title = copy.states[statusState];
47230
47293
  titleGroup.append(dot);
47294
+ } else if (statusDotOverride) {
47295
+ const dot = createEl(document2, "span", "settings-extensions-card__status-dot");
47296
+ dot.dataset.tone = statusDotOverride.tone;
47297
+ dot.setAttribute("role", "img");
47298
+ dot.setAttribute("aria-label", statusDotOverride.label);
47299
+ dot.title = statusDotOverride.label;
47300
+ titleGroup.append(dot);
47301
+ }
47302
+ if (stateBadge) {
47303
+ const badge = createEl(document2, "span", "settings-extensions-state-badge", stateBadge.label);
47304
+ badge.dataset.tone = stateBadge.tone;
47305
+ titleGroup.append(badge);
47231
47306
  }
47232
47307
  const compatLabel = incompatiblePlatformLabel ?? (platformBadge?.kind === "web" ? platformBadge.label : void 0);
47233
47308
  if (compatLabel) {
@@ -49831,7 +49906,7 @@ ${detail}` : ""}`
49831
49906
  const displayName = catalogDisplayName(entry, contentLocale);
49832
49907
  const installed = installedById.get(entry.id);
49833
49908
  const updateAvailable = hasCatalogUpdate(installed, entry);
49834
- const installState = installed ? updateAvailable ? "update" : "installed" : "available";
49909
+ const installState = installed ? updateAvailable ? "update" : installed.enabled ? "installed" : "installed-disabled" : "available";
49835
49910
  const entryAction = pendingMutations.get(entry.id) ?? null;
49836
49911
  const isBusyCard = entryAction !== null;
49837
49912
  const controlsDisabled = isBusyCard || globalBusy;
@@ -49860,6 +49935,15 @@ ${detail}` : ""}`
49860
49935
  );
49861
49936
  actionButton.setAttribute("aria-busy", String(updatingThis));
49862
49937
  actionButton.disabled = controlsDisabled || !canInstall;
49938
+ } else if (installState === "installed-disabled") {
49939
+ actionButton.className = "settings-extensions-btn-installed-disabled";
49940
+ actionButton.dataset.action = "installed-disabled";
49941
+ actionButton.title = copy.installedDisabledBadge;
49942
+ actionButton.setAttribute("aria-label", copy.installedDisabledBadge);
49943
+ const offDot = createEl(document2, "span", "settings-extensions-btn-installed-disabled__dot");
49944
+ offDot.setAttribute("aria-hidden", "true");
49945
+ actionButton.append(offDot, createEl(document2, "span", "", copy.installedDisabledBadge));
49946
+ actionButton.disabled = controlsDisabled;
49863
49947
  } else {
49864
49948
  const isFeaturedLayout = layout === "featured";
49865
49949
  actionButton.className = isFeaturedLayout ? "settings-extensions-btn-installed settings-extensions-btn-installed--featured" : "settings-extensions-btn-installed";
@@ -49905,6 +49989,7 @@ ${detail}` : ""}`
49905
49989
  version: updateAvailable && installed?.state === "valid" ? installed.manifest.version : entry.version,
49906
49990
  downloads: entry.downloads,
49907
49991
  trustTier: entry.trustTier,
49992
+ statusDotOverride: installState === "update" && installed && !installed.enabled ? { tone: "neutral", label: copy.installedDisabledBadge } : void 0,
49908
49993
  update: updateAvailable && installed?.state === "valid" ? {
49909
49994
  version: entry.version,
49910
49995
  label: formatMessage(copy.updateVersionCue, {
@@ -50719,6 +50804,7 @@ ${detail}` : ""}`
50719
50804
  downloads: catalogEntry?.downloads,
50720
50805
  trustTier: catalogEntry?.trustTier,
50721
50806
  statusState,
50807
+ stateBadge: item.state === "valid" && !item.enabled && statusState === "disabled" ? { tone: "neutral", label: copy.states.disabled } : void 0,
50722
50808
  update,
50723
50809
  description: extensionDescription(item, contentLocale),
50724
50810
  attention,
@@ -51099,6 +51185,42 @@ ${detail}` : ""}`
51099
51185
  render();
51100
51186
  }
51101
51187
  };
51188
+ const buildInstallFeedback = (result, isUpdate, fallbackName) => {
51189
+ const displayName = result.manifest.name[messages.locale] || result.manifest.name.en || fallbackName;
51190
+ const version2 = result.manifest.version.replace(/^v/u, "");
51191
+ if (isUpdate) {
51192
+ return {
51193
+ tone: "success",
51194
+ text: formatMessage(copy.updatedSuccess, { name: displayName, version: version2 })
51195
+ };
51196
+ }
51197
+ const refreshedItem = listing?.extensions.find((item) => item.id === result.id);
51198
+ if (refreshedItem && !refreshedItem.enabled) {
51199
+ const conflictId = listing ? findDesktopSlotConflictForExtension(refreshedItem, listing) : void 0;
51200
+ if (conflictId && listing) {
51201
+ const other = describeOtherExtension(conflictId, listing.extensions, messages.locale);
51202
+ return {
51203
+ tone: "warning",
51204
+ text: formatMessage(copy.installedSlotConflict, {
51205
+ name: displayName,
51206
+ version: version2,
51207
+ other
51208
+ })
51209
+ };
51210
+ }
51211
+ return {
51212
+ tone: "warning",
51213
+ text: formatMessage(copy.installedDisabled, { name: displayName, version: version2 })
51214
+ };
51215
+ }
51216
+ return {
51217
+ tone: "success",
51218
+ text: formatMessage(result.replaced ? copy.updatedSuccess : copy.installedSuccess, {
51219
+ name: displayName,
51220
+ version: version2
51221
+ })
51222
+ };
51223
+ };
51102
51224
  const installFromCatalog = async (entry, isUpdate) => {
51103
51225
  if (recovering || pendingMutations.has(entry.id) || disposed || context.signal.aborted)
51104
51226
  return;
@@ -51129,19 +51251,10 @@ ${detail}` : ""}`
51129
51251
  return;
51130
51252
  }
51131
51253
  if (disposed || context.signal.aborted) return;
51132
- const displayName = result.manifest.name[messages.locale] || result.manifest.name.en || fallbackName;
51133
- const modalTargetId = detailModal.extensionId === entry.id ? entry.id : null;
51134
- setFeedback(
51135
- {
51136
- tone: "success",
51137
- text: formatMessage(
51138
- result.replaced || isUpdate ? copy.updatedSuccess : copy.installedSuccess,
51139
- { name: displayName, version: result.manifest.version }
51140
- )
51141
- },
51142
- modalTargetId
51143
- );
51144
51254
  await refreshInstalledAfterMutation();
51255
+ if (disposed || context.signal.aborted) return;
51256
+ const modalTargetId = detailModal.extensionId === entry.id ? entry.id : null;
51257
+ setFeedback(buildInstallFeedback(result, isUpdate, fallbackName), modalTargetId);
51145
51258
  } catch (error62) {
51146
51259
  if (disposed || context.signal.aborted) return;
51147
51260
  const modalTargetId = detailModal.extensionId === entry.id ? entry.id : null;
@@ -51178,15 +51291,9 @@ ${detail}` : ""}`
51178
51291
  searchQuery = "";
51179
51292
  searchInput.value = "";
51180
51293
  clearSearchButton.hidden = true;
51181
- const displayName = result.manifest.name[messages.locale] || result.manifest.name.en || result.id;
51182
- setFeedback({
51183
- tone: "success",
51184
- text: formatMessage(result.replaced ? copy.updatedSuccess : copy.installedSuccess, {
51185
- name: displayName,
51186
- version: result.manifest.version
51187
- })
51188
- });
51189
51294
  await refreshInstalledAfterMutation();
51295
+ if (disposed || context.signal.aborted) return;
51296
+ setFeedback(buildInstallFeedback(result, false, result.id));
51190
51297
  } finally {
51191
51298
  importing = false;
51192
51299
  if (!disposed && !context.signal.aborted) {
@@ -59955,6 +60062,22 @@ ${detail}` : ""}`
59955
60062
  white-space: nowrap;
59956
60063
  }
59957
60064
 
60065
+ .settings-extensions-state-badge {
60066
+ display: inline-flex;
60067
+ align-items: center;
60068
+ flex: none;
60069
+ height: 18px;
60070
+ padding: 0 6px;
60071
+ border-radius: 5px;
60072
+ background: color-mix(in srgb, var(--settings-muted) 11%, transparent);
60073
+ box-shadow: inset 0 0 0 0.5px color-mix(in srgb, var(--settings-muted) 22%, transparent);
60074
+ color: var(--settings-muted);
60075
+ font-size: 10.5px;
60076
+ font-weight: 500;
60077
+ line-height: 1;
60078
+ white-space: nowrap;
60079
+ }
60080
+
59958
60081
  .settings-extensions-card__meta-line {
59959
60082
  display: flex;
59960
60083
  align-items: center;
@@ -60099,11 +60222,58 @@ ${detail}` : ""}`
60099
60222
  }
60100
60223
 
60101
60224
  .settings-extensions-btn-installed--featured:focus-visible,
60225
+ .settings-extensions-btn-installed:focus-visible,
60226
+ .settings-extensions-btn-installed-disabled:focus-visible,
60102
60227
  .settings-extensions-btn-update:focus-visible {
60103
60228
  outline: 2px solid var(--settings-focus);
60104
60229
  outline-offset: 1px;
60105
60230
  }
60106
60231
 
60232
+ .settings-extensions-btn-installed-disabled {
60233
+ display: inline-flex;
60234
+ align-items: center;
60235
+ justify-content: center;
60236
+ gap: 5px;
60237
+ height: 28px;
60238
+ padding: 0 9px;
60239
+ color: var(--settings-muted);
60240
+ font: inherit;
60241
+ font-size: 11.5px;
60242
+ font-weight: 500;
60243
+ line-height: 16px;
60244
+ white-space: nowrap;
60245
+ background: color-mix(in srgb, var(--settings-muted) 9%, transparent);
60246
+ border: 0;
60247
+ border-radius: 6px;
60248
+ box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--settings-muted) 24%, transparent);
60249
+ cursor: pointer;
60250
+ transition:
60251
+ background-color 140ms ease,
60252
+ box-shadow 140ms ease,
60253
+ color 140ms ease;
60254
+ }
60255
+
60256
+ .settings-extensions-btn-installed-disabled:hover:not(:disabled) {
60257
+ color: var(--settings-text);
60258
+ background: color-mix(in srgb, var(--settings-muted) 14%, transparent);
60259
+ box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--settings-muted) 38%, transparent);
60260
+ }
60261
+
60262
+ .settings-extensions-btn-installed-disabled:disabled {
60263
+ opacity: 0.5;
60264
+ cursor: not-allowed;
60265
+ }
60266
+
60267
+ .settings-extensions-btn-installed-disabled__dot {
60268
+ flex: none;
60269
+ width: 6px;
60270
+ height: 6px;
60271
+ box-sizing: border-box;
60272
+ border: 1.5px solid currentColor;
60273
+ border-radius: 50%;
60274
+ opacity: 0.85;
60275
+ }
60276
+
60107
60277
  .settings-extensions-btn-update {
60108
60278
  display: inline-flex;
60109
60279
  align-items: center;
@@ -60347,6 +60517,11 @@ ${detail}` : ""}`
60347
60517
  background: var(--settings-danger);
60348
60518
  }
60349
60519
 
60520
+ .settings-extensions-card__status-dot[data-tone="neutral"] {
60521
+ background: transparent;
60522
+ box-shadow: inset 0 0 0 1.5px var(--settings-subtle);
60523
+ }
60524
+
60350
60525
  .settings-extensions-card__body {
60351
60526
  display: grid;
60352
60527
  gap: 8px;