codex-plus-patcher 0.1.1 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,14 +2,33 @@
2
2
 
3
3
  `codex-plus-patcher` creates a local `Codex Plus.app` from an installed `Codex.app` by applying version-checked ASAR patch queues. It does not ship `Codex.app` or any OpenAI app binaries.
4
4
 
5
+ ## Screenshots
6
+
7
+ ![Codex Plus main screen with project, worktree, repository, and branch controls](docs/images/codex-plus-main-screen.png)
8
+
9
+ ![Codex Plus Review tab showing nested git subrepositories](docs/images/codex-plus-git-subrepos.png)
10
+
11
+ <details>
12
+ <summary>More screenshots</summary>
13
+
14
+ ![Codex Plus conversation view with adaptive project color accents](docs/images/codex-plus-conversation.png)
15
+
16
+ ![Codex Plus sidebar with adaptive project colors](docs/images/codex-plus-project-colors.png)
17
+
18
+ </details>
19
+
5
20
  ## Purpose
6
21
 
7
22
  Codex Plus is an experimental local demonstrator for changes that can be layered onto an installed Codex desktop app without redistributing the app itself. The patcher is meant for technically curious users who want to inspect, test, or iterate on small binary patch sets against their own local copy.
8
23
 
9
24
  The current built-in patches:
10
25
 
11
- - expose nested git repositories in the Review pane
12
- - add user bubble color controls in Appearance settings
26
+ - rename the copied app and add patch provenance to the About dialog
27
+ - expose nested repositories in the Review pane
28
+ - add diagnostic detail for selected app-shell errors
29
+ - add user-message bubble color controls in Appearance settings
30
+ - add adaptive project colors for sidebar projects, grouped threads, pinned threads, user-message accents, and the composer
31
+ - add the `Toggle sidebar blur` command palette entry to blur sidebar chat and project names for the current session
13
32
 
14
33
  ## How It Works
15
34
 
@@ -117,7 +136,7 @@ Business logic that can be tested outside Codex lives under `src/plus/`. The cur
117
136
  4. Update target chunk filenames and fail-closed anchor strings by inspecting the new ASAR.
118
137
  5. Run `npm test`, `npm run check`, and a dry run.
119
138
  6. Apply the patch to a copied app and verify `codesign --verify --deep --strict`.
120
- 7. Launch manually and validate Review pane nested repository behavior.
139
+ 7. Launch manually and validate Review pane nested repository behavior, Appearance controls, project color matching, and command palette entries.
121
140
 
122
141
  ## Update Hook Direction
123
142
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-plus-patcher",
3
- "version": "0.1.1",
3
+ "version": "0.2.1",
4
4
  "private": false,
5
5
  "description": "Patch queue tool for building a local Codex Plus.app from an installed Codex.app.",
6
6
  "repository": {
@@ -21,7 +21,7 @@
21
21
  ],
22
22
  "scripts": {
23
23
  "test": "node --test",
24
- "check": "node --check src/cli.js && node --check src/core/asar.js && node --check src/core/patch-engine.js && node --check src/core/plist.js && node --check src/core/release.js && node --check src/patches/index.js && node --check src/patches/26.616.41845-4198.js && node --check src/patches/26.616.51431-4212.js && node --check src/plus/repositories.js"
24
+ "check": "node --check src/cli.js && node --check src/core/asar.js && node --check src/core/patch-engine.js && node --check src/core/plist.js && node --check src/core/release.js && node --check src/patches/index.js && node --check src/patches/26.616.41845-4198.js && node --check src/patches/26.616.51431-4212.js && node --check src/patches/26.616.71553-4265.js && node --check src/plus/repositories.js"
25
25
  },
26
26
  "engines": {
27
27
  "node": ">=20"
@@ -4,11 +4,17 @@ const oldTitle = "<title>Codex</title>";
4
4
  const newTitle = "<title>Codex Plus</title>";
5
5
  const titleFile = "webview/index.html";
6
6
  const workerFile = ".vite/build/worker.js";
7
+ const appMainFile = "webview/assets/app-main-C-_HjS2P.js";
7
8
  const appShellFile = "webview/assets/app-shell-DCvuE1cb.js";
9
+ const errorBoundaryFile = "webview/assets/error-boundary-DOI-M2iu.js";
8
10
  const generalSettingsFile = "webview/assets/general-settings-Bit-KX17.js";
11
+ const sidebarProjectHoverCardSourceRowsFile = "webview/assets/sidebar-project-hover-card-source-rows-CYy4Y4ei.js";
9
12
  const threadSidePanelTabsFile = "webview/assets/thread-side-panel-tabs-D0dd27Zf.js";
10
13
  const userMessageAttachmentsFile = "webview/assets/user-message-attachments-CgyXEK9U.js";
11
14
  const composerFile = "webview/assets/composer-CCuv6v-2.js";
15
+ const localTaskRowFile = "webview/assets/local-task-row-vTrSC6Rc.js";
16
+ const electronMenuShortcutsFile = "webview/assets/electron-menu-shortcuts-j6UKqTX5.js";
17
+ const keyboardShortcutsSearchInputFile = "webview/assets/keyboard-shortcuts-search-input-DjVpifwp.js";
12
18
 
13
19
  function replaceOnce(text, oldText, newText, label) {
14
20
  const matches = text.split(oldText).length - 1;
@@ -152,11 +158,234 @@ function patchAppShell(text) {
152
158
  );
153
159
  }
154
160
 
161
+ function patchErrorBoundary(text) {
162
+ let patched = replaceOnce(
163
+ text,
164
+ "function Xf(e){let t=(0,Vf.c)(9),{resetError:n}=e,r=ee(),i,a;",
165
+ "function Xf(e){let t=(0,Vf.c)(9),{resetError:n,error:CPX_error,componentStack:CPX_componentStack}=e,r=ee(),CPX_errorText=CPX_error?.stack??CPX_error?.message??String(CPX_error??``),i,a;",
166
+ "webview error boundary fallback prop anchor",
167
+ );
168
+ patched = replaceOnce(
169
+ patched,
170
+ "children:[i,a,(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center justify-center gap-2`,children:[o,(0,$.jsx)(m,{onClick:s,children:c})]})]",
171
+ "children:[i,a,CPX_errorText?(0,$.jsx)(`pre`,{className:`max-h-80 max-w-full overflow-auto whitespace-pre-wrap rounded-md border border-token-border bg-token-main-surface-secondary p-2 text-left font-vscode-editor text-[11px] leading-4 text-token-text-primary`,children:[CPX_errorText,CPX_componentStack?`\\n\\n${CPX_componentStack}`:``].join(``)}):null,(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center justify-center gap-2`,children:[o,(0,$.jsx)(m,{onClick:s,children:c})]})]",
172
+ "webview error boundary detail anchor",
173
+ );
174
+ return replaceOnce(
175
+ patched,
176
+ "r=e??(e=>(0,$.jsx)(Xf,{resetError:()=>e.resetError()}));",
177
+ "r=e??(e=>(0,$.jsx)(Xf,{error:e.error,componentStack:e.componentStack,resetError:()=>e.resetError()}));",
178
+ "webview error boundary error prop anchor",
179
+ );
180
+ }
181
+
182
+ function patchAppMainProjectColors(text) {
183
+ let patched = replaceOnce(
184
+ text,
185
+ "function Pk(e){let t=(0,Q.c)(45),",
186
+ `${codexPlusProjectColorHelpers}function Pk(e){let t=(0,Q.c)(46),`,
187
+ "project color app main helper insertion anchor",
188
+ );
189
+ patched = replaceOnce(
190
+ patched,
191
+ "H=Ha.sidebarProjectList({projectId:i.projectId,showAll:x})",
192
+ "H=Ha.sidebarProjectList({projectId:i.projectId,showAll:x})",
193
+ "project group color marker anchor",
194
+ );
195
+ patched = replaceOnce(
196
+ patched,
197
+ "q={onActivateGroup:V,onStartNewConversation:a,isGrouped:!0,hideRemoteHostEnvIcon:!0,hideTimestamp:l,locationId:b,floatStatusIconsRight:s,showPinActionOnHover:o}",
198
+ "q={onActivateGroup:V,onStartNewConversation:a,isGrouped:!0,hideRemoteHostEnvIcon:!0,hideTimestamp:l,locationId:b,floatStatusIconsRight:s,showPinActionOnHover:o,dataAttributes:CPX_projectColorDataAttributes(i,!0)}",
199
+ "project thread row color key anchor",
200
+ );
201
+ patched = replaceOnce(
202
+ patched,
203
+ "t[19]!==V||t[20]!==s||t[21]!==l||t[22]!==b||t[23]!==o||t[24]!==a?",
204
+ "t[19]!==V||t[20]!==s||t[21]!==l||t[22]!==b||t[23]!==o||t[24]!==a||t[45]!==i?",
205
+ "project thread row color cache dependency anchor",
206
+ );
207
+ patched = replaceOnce(
208
+ patched,
209
+ "t[19]=V,t[20]=s,t[21]=l,t[22]=b,t[23]=o,t[24]=a,t[25]=q):q=t[25]",
210
+ "t[19]=V,t[20]=s,t[21]=l,t[22]=b,t[23]=o,t[24]=a,t[45]=i,t[25]=q):q=t[25]",
211
+ "project thread row color cache write anchor",
212
+ );
213
+ patched = replaceOnce(
214
+ patched,
215
+ "ie=(0,Z.jsx)(`div`,{...H,children:re})",
216
+ "ie=(0,Z.jsx)(`div`,{...H,children:re})",
217
+ "project group color render anchor",
218
+ );
219
+ patched = replaceOnce(
220
+ patched,
221
+ "O=(0,Z.jsx)(NO,{action:T,actionTooltipContent:h,actionTooltipDisabled:p,indicator:E,isMenuOpen:g,menu:D})",
222
+ "O=(0,Z.jsx)(NO,{action:T,actionTooltipContent:h,actionTooltipDisabled:p,indicator:E,isMenuOpen:g,menu:D})",
223
+ "project header action render anchor",
224
+ );
225
+ patched = replaceOnce(
226
+ patched,
227
+ "Ke=(0,Z.jsx)(Oe,{rowAttributes:ke,className:Ae,collapsed:L,contentClassName:je,",
228
+ "Ke=(0,Z.jsx)(Oe,{rowAttributes:{...ke,...CPX_projectColorDataAttributes(n,!0)},className:Ae,collapsed:L,contentClassName:je,",
229
+ "project header row color attributes anchor",
230
+ );
231
+ return patched;
232
+ }
233
+
234
+ function patchAppMainSidebarBlur(text) {
235
+ let patched = replaceOnce(
236
+ text,
237
+ "function Pk(e){let t=(0,Q.c)(46),",
238
+ `${codexPlusSidebarNameBlurHelpers}function Pk(e){let t=(0,Q.c)(46),`,
239
+ "sidebar blur app main helper insertion anchor",
240
+ );
241
+ patched = replaceOnce(
242
+ patched,
243
+ "openFolder:$y,toggleSidebar:$i,toggleTerminal:Md,",
244
+ "openFolder:$y,toggleSidebar:$i,codexPlusToggleSidebarNameBlur:$i,toggleTerminal:Md,",
245
+ "sidebar blur command icon anchor",
246
+ );
247
+ patched = replaceOnce(
248
+ patched,
249
+ "children:n.label}),t[62]=Oe,",
250
+ "children:(0,Z.jsx)(`span`,{\"data-codex-plus-sidebar-name\":``,children:n.label})}),t[62]=Oe,",
251
+ "project header sidebar blur label anchor",
252
+ );
253
+ return replaceOnce(
254
+ patched,
255
+ "children:[l,u,(0,Z.jsx)(H_,{route:a,children:C})]",
256
+ "children:[l,u,(0,Z.jsx)(CPXSidebarNameBlurCommand,{}),(0,Z.jsx)(H_,{route:a,children:C})]",
257
+ "sidebar name blur command mount anchor",
258
+ );
259
+ }
260
+
261
+ function patchSidebarProjectHoverCardSourceRows(text) {
262
+ let patched = replaceOnce(
263
+ text,
264
+ "function Ft(e,t,n){",
265
+ "function CPX_mergeDataAttributes(e,t){return t==null?e:{...e,...t,style:{...e?.style,...t?.style}}}function Ft(e,t,n){",
266
+ "sidebar row data attribute merge helper anchor",
267
+ );
268
+ patched = replaceOnce(
269
+ patched,
270
+ "var En=(0,Vt.memo)(function(e){let t=(0,zt.c)(40),{threadKey:n,canPin:r,disableHoverCard:a,floatStatusIconsRight:o,isGrouped:s,hideRemoteHostEnvIcon:c,hideTimestamp:l,locationId:u,onActivateGroup:d,onStartNewConversation:f,showPinActionOnHover:p,variant:m,shortcutLabel:h,onArchiveStart:g,onArchiveSuccess:_,onArchiveError:v}=e,",
271
+ "var En=(0,Vt.memo)(function(e){let t=(0,zt.c)(41),{threadKey:n,canPin:r,disableHoverCard:a,floatStatusIconsRight:o,isGrouped:s,hideRemoteHostEnvIcon:c,hideTimestamp:l,locationId:u,onActivateGroup:d,onStartNewConversation:f,showPinActionOnHover:p,variant:m,shortcutLabel:h,onArchiveStart:g,onArchiveSuccess:_,onArchiveError:v,dataAttributes:CPX_rowDataAttributes}=e,",
272
+ "sidebar row component data attributes prop anchor",
273
+ );
274
+ patched = replaceOnce(
275
+ patched,
276
+ "t[12]!==A||t[13]!==y||t[14]!==b||t[15]!==F||t[16]!==x||t[17]!==B||t[18]!==L||t[19]!==z||t[20]!==ee||t[21]!==te||t[22]!==j||t[23]!==M||t[24]!==N||t[25]!==P||t[26]!==k||t[27]!==S||t[28]!==C||t[29]!==d||t[30]!==f||t[31]!==h||t[32]!==w||t[33]!==V||t[34]!==T?",
277
+ "t[12]!==A||t[13]!==y||t[14]!==b||t[15]!==F||t[16]!==x||t[17]!==B||t[18]!==L||t[19]!==z||t[20]!==ee||t[21]!==te||t[22]!==j||t[23]!==M||t[24]!==N||t[25]!==P||t[26]!==k||t[27]!==S||t[28]!==C||t[29]!==d||t[30]!==f||t[31]!==h||t[32]!==w||t[33]!==V||t[34]!==T||t[40]!==CPX_rowDataAttributes?",
278
+ "sidebar row component data attributes memo dependency anchor",
279
+ );
280
+ patched = replaceOnce(
281
+ patched,
282
+ "onArchiveStart:L,onArchiveSuccess:z,onArchiveError:B}",
283
+ "onArchiveStart:L,onArchiveSuccess:z,onArchiveError:B,dataAttributes:CPX_rowDataAttributes}",
284
+ "sidebar row component data attributes object anchor",
285
+ );
286
+ patched = replaceOnce(
287
+ patched,
288
+ "t[32]=w,t[33]=V,t[34]=T,t[35]=H):H=t[35]",
289
+ "t[32]=w,t[33]=V,t[34]=T,t[40]=CPX_rowDataAttributes,t[35]=H):H=t[35]",
290
+ "sidebar row component data attributes memo write anchor",
291
+ );
292
+ patched = replaceOnce(
293
+ patched,
294
+ "function On(e){let t=(0,zt.c)(121),{entry:n,isPinned:r,isAutomationRun:a,automationDisplayName:o,isActive:s,canPin:c,disableHoverCard:u,floatStatusIconsRight:f,isGrouped:p,hideRemoteHostEnvIcon:m,hideTimestamp:h,locationId:g,onActivateGroup:y,onStartNewConversation:b,showPinActionOnHover:te,variant:C,shortcutLabel:T,hoverCardHostConfig:E,hoverCardProjectId:D,hoverCardProjectLabel:A,hoverCardRepositoryLabel:j,displayCwd:M,onArchiveStart:N,onArchiveSuccess:P,onArchiveError:F}=e,",
295
+ "function On(e){let t=(0,zt.c)(124),{entry:n,isPinned:r,isAutomationRun:a,automationDisplayName:o,isActive:s,canPin:c,disableHoverCard:u,floatStatusIconsRight:f,isGrouped:p,hideRemoteHostEnvIcon:m,hideTimestamp:h,locationId:g,onActivateGroup:y,onStartNewConversation:b,showPinActionOnHover:te,variant:C,shortcutLabel:T,hoverCardHostConfig:E,hoverCardProjectId:D,hoverCardProjectLabel:A,hoverCardRepositoryLabel:j,displayCwd:M,onArchiveStart:N,onArchiveSuccess:P,onArchiveError:F,dataAttributes:CPX_rowDataAttributes}=e,",
296
+ "sidebar row dispatcher data attributes prop anchor",
297
+ );
298
+ patched = replaceOnce(
299
+ patched,
300
+ "dataAttributes:ae.sidebarThreadRow({active:s,hostId:t.hostId,id:n,kind:`pending-worktree`,pinned:r,title:t.label})",
301
+ "dataAttributes:CPX_mergeDataAttributes(ae.sidebarThreadRow({active:s,hostId:t.hostId,id:n,kind:`pending-worktree`,pinned:r,title:t.label}),CPX_rowDataAttributes)",
302
+ "pending worktree sidebar row data attributes merge anchor",
303
+ );
304
+ patched = replaceOnce(
305
+ patched,
306
+ "dataAttributes:ae.sidebarThreadRow({active:s,hostId:null,id:t,kind:`remote`,pinned:r,title:e.task.title??``})",
307
+ "dataAttributes:CPX_mergeDataAttributes(ae.sidebarThreadRow({active:s,hostId:null,id:t,kind:`remote`,pinned:r,title:e.task.title??``}),CPX_rowDataAttributes)",
308
+ "remote sidebar row data attributes merge anchor",
309
+ );
310
+ patched = replaceOnce(
311
+ patched,
312
+ "dataAttributes:ae.sidebarThreadRow({active:s,hostId:f,id:i,kind:`local`,pinned:r,title:x})",
313
+ "dataAttributes:CPX_mergeDataAttributes(ae.sidebarThreadRow({active:s,hostId:f,id:i,kind:`local`,pinned:r,title:x}),CPX_rowDataAttributes)",
314
+ "local sidebar row data attributes merge anchor",
315
+ );
316
+ patched = replaceOnce(
317
+ patched,
318
+ "t[22]=c,t[23]=se,t[24]=Ne,t[25]=L,t[26]=Je,t[27]=J,t[28]=oe,t[29]=V,t[30]=G,t[31]=s,t[32]=z,t[33]=r,t[34]=g,t[35]=K,t[36]=y,t[37]=P,t[38]=le,t[39]=W,t[40]=ue,t[41]=et,t[42]=H,t[43]=U,t[44]=st):st=t[44]",
319
+ "t[22]=c,t[23]=se,t[24]=Ne,t[25]=L,t[26]=Je,t[27]=J,t[28]=oe,t[29]=V,t[30]=G,t[31]=s,t[32]=z,t[33]=r,t[34]=g,t[35]=K,t[36]=y,t[37]=P,t[38]=le,t[39]=W,t[40]=ue,t[41]=et,t[42]=H,t[43]=U,t[121]=CPX_rowDataAttributes,t[44]=st):st=t[44]",
320
+ "pending worktree sidebar row data attributes memo write anchor",
321
+ );
322
+ patched = replaceOnce(
323
+ patched,
324
+ "t[45]!==c||t[46]!==Ne||t[47]!==Fe||t[48]!==L||t[49]!==Je||t[50]!==J||t[51]!==oe||t[52]!==V||t[53]!==G||t[54]!==s||t[55]!==z||t[56]!==r||t[57]!==g||t[58]!==F||t[59]!==P||t[60]!==nt||t[61]!==Q||t[62]!==We||t[63]!==W||t[64]!==Xe||t[65]!==et||t[66]!==H||t[67]!==U?",
325
+ "t[45]!==c||t[46]!==Ne||t[47]!==Fe||t[48]!==L||t[49]!==Je||t[50]!==J||t[51]!==oe||t[52]!==V||t[53]!==G||t[54]!==s||t[55]!==z||t[56]!==r||t[57]!==g||t[58]!==F||t[59]!==P||t[60]!==nt||t[61]!==Q||t[62]!==We||t[63]!==W||t[64]!==Xe||t[65]!==et||t[66]!==H||t[67]!==U||t[122]!==CPX_rowDataAttributes?",
326
+ "remote sidebar row data attributes memo dependency anchor",
327
+ );
328
+ patched = replaceOnce(
329
+ patched,
330
+ "t[63]=W,t[64]=Xe,t[65]=et,t[66]=H,t[67]=U,t[68]=ht):ht=t[68]",
331
+ "t[63]=W,t[64]=Xe,t[65]=et,t[66]=H,t[67]=U,t[122]=CPX_rowDataAttributes,t[68]=ht):ht=t[68]",
332
+ "remote sidebar row data attributes memo write anchor",
333
+ );
334
+ patched = replaceOnce(
335
+ patched,
336
+ "t[69]!==o||t[70]!==c||t[71]!==I||t[72]!==ot||t[73]!==M||t[74]!==Pe||t[75]!==Ne||t[76]!==Fe||t[77]!==L||t[78]!==Je||t[79]!==J||t[80]!==ne||t[81]!==oe||t[82]!==V||t[83]!==E||t[84]!==A||t[85]!==G||t[86]!==s||t[87]!==a||t[88]!==z||t[89]!==r||t[90]!==pe||t[91]!==fe||t[92]!==he||t[93]!==Be||t[94]!==De||t[95]!==null||t[96]!==_e||t[97]!==me||t[98]!==ge||t[99]!==g||t[100]!==y||t[101]!==F||t[102]!==P||t[103]!==nt||t[104]!==Q||t[105]!==W||t[106]!==Xe||t[107]!==et||t[108]!==H||t[109]!==be||t[110]!==U?",
337
+ "t[69]!==o||t[70]!==c||t[71]!==I||t[72]!==ot||t[73]!==M||t[74]!==Pe||t[75]!==Ne||t[76]!==Fe||t[77]!==L||t[78]!==Je||t[79]!==J||t[80]!==ne||t[81]!==oe||t[82]!==V||t[83]!==E||t[84]!==A||t[85]!==G||t[86]!==s||t[87]!==a||t[88]!==z||t[89]!==r||t[90]!==pe||t[91]!==fe||t[92]!==he||t[93]!==Be||t[94]!==De||t[95]!==null||t[96]!==_e||t[97]!==me||t[98]!==ge||t[99]!==g||t[100]!==y||t[101]!==F||t[102]!==P||t[103]!==nt||t[104]!==Q||t[105]!==W||t[106]!==Xe||t[107]!==et||t[108]!==H||t[109]!==be||t[110]!==U||t[123]!==CPX_rowDataAttributes?",
338
+ "local sidebar row data attributes memo dependency anchor",
339
+ );
340
+ patched = replaceOnce(
341
+ patched,
342
+ "t[108]=H,t[109]=be,t[110]=U,t[111]=vt):vt=t[111]",
343
+ "t[108]=H,t[109]=be,t[110]=U,t[123]=CPX_rowDataAttributes,t[111]=vt):vt=t[111]",
344
+ "local sidebar row data attributes memo write anchor",
345
+ );
346
+ patched = replaceOnce(
347
+ patched,
348
+ "t[14]!==l?.canPin||t[15]!==l?.disableHoverCard||t[16]!==l?.floatStatusIconsRight||t[17]!==l?.hideRemoteHostEnvIcon||t[18]!==l?.hideTimestamp||t[19]!==l?.isGrouped||t[20]!==l?.locationId||t[21]!==l?.onActivateGroup||t[22]!==l?.onStartNewConversation||t[23]!==l?.showPinActionOnHover||t[24]!==l?.variant||t[25]!==b?",
349
+ "t[14]!==l?.canPin||t[15]!==l?.disableHoverCard||t[16]!==l?.floatStatusIconsRight||t[17]!==l?.hideRemoteHostEnvIcon||t[18]!==l?.hideTimestamp||t[19]!==l?.isGrouped||t[20]!==l?.locationId||t[21]!==l?.onActivateGroup||t[22]!==l?.onStartNewConversation||t[23]!==l?.showPinActionOnHover||t[24]!==l?.variant||t[25]!==b||t[43]!==l?.dataAttributes?",
350
+ "thread list row options data attributes memo dependency anchor",
351
+ );
352
+ patched = replaceOnce(
353
+ patched,
354
+ "showPinActionOnHover:l?.showPinActionOnHover,variant:l?.variant,shortcutLabel:b?.get(e)}),",
355
+ "showPinActionOnHover:l?.showPinActionOnHover,variant:l?.variant,shortcutLabel:b?.get(e),dataAttributes:l?.dataAttributes}),",
356
+ "thread list row options data attributes prop anchor",
357
+ );
358
+ patched = replaceOnce(
359
+ patched,
360
+ "t[24]=l?.variant,t[25]=b,t[26]=j):j=t[26]",
361
+ "t[24]=l?.variant,t[25]=b,t[43]=l?.dataAttributes,t[26]=j):j=t[26]",
362
+ "thread list row options data attributes memo write anchor",
363
+ );
364
+ return replaceOnce(
365
+ patched,
366
+ "function Rn(e){let t=(0,zt.c)(43),",
367
+ "function Rn(e){let t=(0,zt.c)(44),",
368
+ "thread list memo cache size anchor",
369
+ );
370
+ }
371
+
372
+ const codexPlusProjectColorHelpers = `
373
+ const CPX_PROJECT_COLORS_ENABLED_KEY=\`codex-plus:project-colors-enabled\`,CPX_PROJECT_COLOR_EVENT=\`codex-plus:project-colors-change\`,CPX_PROJECT_PALETTE=[[\`#5b8ff9\`,\`#dbeafe\`,\`#1d4ed8\`,\`#f8fbff\`],[\`#61dDAA\`,\`#dcfce7\`,\`#15803d\`,\`#f7fff9\`],[\`#65789b\`,\`#e0e7ff\`,\`#4338ca\`,\`#f8faff\`],[\`#f6bd16\`,\`#fef3c7\`,\`#b45309\`,\`#fffdf5\`],[\`#7262fd\`,\`#ede9fe\`,\`#6d28d9\`,\`#fbf8ff\`],[\`#78d3f8\`,\`#e0f2fe\`,\`#0369a1\`,\`#f5fcff\`],[\`#9661bc\`,\`#f3e8ff\`,\`#7e22ce\`,\`#fdf7ff\`],[\`#f6903d\`,\`#ffedd5\`,\`#c2410c\`,\`#fff9f4\`],[\`#008685\`,\`#ccfbf1\`,\`#0f766e\`,\`#f5fffd\`],[\`#f08bb4\`,\`#fce7f3\`,\`#be185d\`,\`#fff7fb\`],[\`#6dc8ec\`,\`#e0f7ff\`,\`#0e7490\`,\`#f5fdff\`],[\`#8d70f8\`,\`#ede9fe\`,\`#5b21b6\`,\`#faf8ff\`],[\`#c2c8d5\`,\`#e5e7eb\`,\`#4b5563\`,\`#fbfbfc\`],[\`#ff9d4d\`,\`#fee2e2\`,\`#b91c1c\`,\`#fff7f7\`],[\`#269a99\`,\`#d1fae5\`,\`#047857\`,\`#f6fffb\`],[\`#ff99c3\`,\`#fce7f3\`,\`#be123c\`,\`#fff8fb\`],[\`#4c78a8\`,\`#dbeafe\`,\`#1e40af\`,\`#f8fbff\`],[\`#72b7b2\`,\`#ccfbf1\`,\`#0f766e\`,\`#f5fffd\`],[\`#54a24b\`,\`#dcfce7\`,\`#166534\`,\`#f7fff7\`],[\`#eeca3b\`,\`#fef9c3\`,\`#a16207\`,\`#fffdf2\`],[\`#b279a2\`,\`#fce7f3\`,\`#9d174d\`,\`#fff7fb\`],[\`#ff9da6\`,\`#ffe4e6\`,\`#be123c\`,\`#fff7f8\`],[\`#9d755d\`,\`#ffedd5\`,\`#9a3412\`,\`#fff9f4\`],[\`#bab0ac\`,\`#e7e5e4\`,\`#57534e\`,\`#fbfaf9\`],[\`#7f7f7f\`,\`#e5e7eb\`,\`#374151\`,\`#fafafa\`],[\`#bcbd22\`,\`#fef9c3\`,\`#854d0e\`,\`#fffdf2\`],[\`#17becf\`,\`#cffafe\`,\`#0e7490\`,\`#f5feff\`],[\`#1f77b4\`,\`#dbeafe\`,\`#1d4ed8\`,\`#f7fbff\`],[\`#2ca02c\`,\`#dcfce7\`,\`#15803d\`,\`#f7fff7\`],[\`#9467bd\`,\`#f3e8ff\`,\`#7e22ce\`,\`#fcf7ff\`],[\`#8c564b\`,\`#fee2e2\`,\`#991b1b\`,\`#fff7f6\`],[\`#e377c2\`,\`#fce7f3\`,\`#be185d\`,\`#fff8fb\`]];function CPX_readBool(e,t){try{let n=localStorage.getItem(e);return n==null?t:n===\`true\`}catch{return t}}function CPX_writeBool(e,t){try{localStorage.setItem(e,t?\`true\`:\`false\`),window.dispatchEvent(new CustomEvent(CPX_PROJECT_COLOR_EVENT,{detail:{key:e,value:t}}))}catch{}}function CPX_projectColorsEnabled(){return CPX_readBool(CPX_PROJECT_COLORS_ENABLED_KEY,!0)}function CPX_hash(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function CPX_projectColorKey(e){if(e==null)return\`\`;if(typeof e===\`string\`)return e.trim();let t=e.projectId??e.id;if(t!=null&&String(t).trim()!==\`\`)return String(t).trim();let n=e.hostId??e.host??e.remoteHostId??\`local\`,r=e.path??e.cwd??e.projectPath??e.remotePath??e.root??e.workspaceRoot;return r!=null&&String(r).trim()!==\`\`?\`\${n}:\${r}\`:[e.label,e.name].filter(Boolean).join(\`:\`)}function CPX_projectColor(e){let t=CPX_projectColorKey(e);return CPX_PROJECT_PALETTE[CPX_hash(t)%CPX_PROJECT_PALETTE.length]}function CPX_projectColorStyle(e){let a=CPX_projectColorKey(e);if(!CPX_projectColorsEnabled()||a.trim()===\`\`)return void 0;let[t,n,r,i]=CPX_projectColor(a);return{"--codex-plus-project-accent":t,"--codex-plus-project-bg-light":n,"--codex-plus-project-fg-light":r,"--codex-plus-project-soft-light":i,"--codex-plus-project-bg-dark":\`color-mix(in srgb, \${t} 24%, transparent)\`,"--codex-plus-project-fg-dark":\`#f8fafc\`,"--codex-plus-project-border-dark":\`color-mix(in srgb, \${t} 62%, transparent)\`,"--codex-plus-project-separator-light":\`rgba(17,24,39,.24)\`,"--codex-plus-project-separator-dark":\`rgba(255,255,255,.34)\`,borderLeft:\`6px solid \${t}\`}}function CPX_projectColorDataAttributes(e,t){let n=CPX_projectColorStyle(e);return n==null?void 0:{"data-codex-plus-project-color":\`\`,...(t?{"data-codex-plus-project-sidebar-color":\`\`}:{}),style:n}}function CPX_installProjectColorStyles(){if(typeof document===\`undefined\`)return;let e=\`codex-plus-project-colors\`;document.getElementById(e)==null&&document.head?.appendChild(Object.assign(document.createElement(\`style\`),{id:e,textContent:\`:root:not(.dark):not(.electron-dark) [data-codex-plus-project-sidebar-color]{border-radius:0;background-color:var(--codex-plus-project-soft-light);border-left-color:var(--codex-plus-project-accent)}:root.dark [data-codex-plus-project-sidebar-color],:root.electron-dark [data-codex-plus-project-sidebar-color]{border-radius:0;background-color:var(--codex-plus-project-bg-dark);border-left-color:var(--codex-plus-project-border-dark)}:root:not(.dark):not(.electron-dark) [data-codex-plus-project-color]{border-left-color:var(--codex-plus-project-accent)}:root.dark [data-codex-plus-project-color],:root.electron-dark [data-codex-plus-project-color]{border-left-color:var(--codex-plus-project-border-dark)}:root:not(.dark):not(.electron-dark) [data-codex-plus-project-color]:not([data-codex-plus-project-sidebar-color]){background-image:linear-gradient(to right,var(--codex-plus-project-separator-light),var(--codex-plus-project-separator-light));background-repeat:no-repeat;background-size:2px 100%;background-position:left top}:root.dark [data-codex-plus-project-color]:not([data-codex-plus-project-sidebar-color]),:root.electron-dark [data-codex-plus-project-color]:not([data-codex-plus-project-sidebar-color]){background-image:linear-gradient(to right,var(--codex-plus-project-separator-dark),var(--codex-plus-project-separator-dark));background-repeat:no-repeat;background-size:2px 100%;background-position:left top}\`}))}CPX_installProjectColorStyles();
374
+ `;
375
+
376
+ const codexPlusSidebarNameBlurHelpers = `
377
+ function CPX_installSidebarNameBlurStyles(){if(typeof document===\`undefined\`)return;let e=\`codex-plus-sidebar-name-blur\`;document.getElementById(e)==null&&document.head?.appendChild(Object.assign(document.createElement(\`style\`),{id:e,textContent:\`:root[data-codex-plus-sidebar-names-blurred="true"] :is([data-thread-title],[data-codex-plus-sidebar-name]){filter:blur(4px);user-select:none}\`}))}function CPX_toggleSidebarNameBlur(){if(typeof document===\`undefined\`)return;let e=document.documentElement,t=e.getAttribute(\`data-codex-plus-sidebar-names-blurred\`)===\`true\`;t?e.removeAttribute(\`data-codex-plus-sidebar-names-blurred\`):e.setAttribute(\`data-codex-plus-sidebar-names-blurred\`,\`true\`)}function CPXSidebarNameBlurCommand(){CPX_installSidebarNameBlurStyles();Hp(\`codexPlusToggleSidebarNameBlur\`,()=>{CPX_toggleSidebarNameBlur()},{menuItem:{id:\`codexPlusToggleSidebarNameBlur\`,groupKey:\`suggested\`,render:e=>(0,Z.jsx)(Zy,{value:\`Toggle sidebar blur\`,title:\`Toggle sidebar blur\`,description:\`Blur or show sidebar chat and project names\`,onSelect:()=>{CPX_toggleSidebarNameBlur(),e?.()}},\`codex-plus-toggle-sidebar-name-blur\`)}});return null}
378
+ `;
379
+
155
380
  const codexPlusUserBubbleSettingsHelpers = `
156
381
  const CPX_USER_BUBBLE_COLORS_KEY=\`codex-plus:user-message-bubble-colors\`,CPX_USER_BUBBLE_COLORS_EVENT=\`codex-plus:user-message-bubble-colors-change\`;function CPX_isUserBubbleColor(e){return typeof e===\`string\`&&/^#[0-9a-fA-F]{6}$/.test(e)}function CPX_defaultUserBubbleColor(e){return e===\`dark\`?\`#2f2f2f\`:\`#f2f2f2\`}function CPX_isStoredUserBubbleColor(e,t){return CPX_isUserBubbleColor(t)&&t.toLowerCase()!==CPX_defaultUserBubbleColor(e)}function CPX_readUserBubbleColors(){try{let e=JSON.parse(localStorage.getItem(CPX_USER_BUBBLE_COLORS_KEY)??\`{}\`)??{};return{light:CPX_isStoredUserBubbleColor(\`light\`,e.light)?e.light:\`\`,dark:CPX_isStoredUserBubbleColor(\`dark\`,e.dark)?e.dark:\`\`}}catch{return{light:\`\`,dark:\`\`}}}function CPX_writeUserBubbleColor(e,t){let n=CPX_readUserBubbleColors();CPX_isStoredUserBubbleColor(e,t)?n[e]=t:delete n[e],localStorage.setItem(CPX_USER_BUBBLE_COLORS_KEY,JSON.stringify(n)),window.dispatchEvent(new CustomEvent(CPX_USER_BUBBLE_COLORS_EVENT,{detail:n}))}function CPXUserBubbleColorRow({variant:e,label:t,ariaLabel:n}){let[r,i]=(0,X.useState)(()=>CPX_readUserBubbleColors()[e]||CPX_defaultUserBubbleColor(e));return(0,X.useEffect)(()=>{let t=()=>i(CPX_readUserBubbleColors()[e]||CPX_defaultUserBubbleColor(e));return window.addEventListener(CPX_USER_BUBBLE_COLORS_EVENT,t),()=>window.removeEventListener(CPX_USER_BUBBLE_COLORS_EVENT,t)},[e]),(0,Z.jsx)(J,{control:(0,Z.jsx)(sn,{ariaLabel:n,value:r,onChange:t=>{i(t),CPX_writeUserBubbleColor(e,t)}}),label:t,variant:\`nested\`})}
157
382
  `;
158
383
 
159
- function patchGeneralSettings(text) {
384
+ const codexPlusProjectColorSettingsHelpers = `
385
+ ${codexPlusProjectColorHelpers}function CPXProjectColorToggleRow({label:e,ariaLabel:t}){let[n,r]=(0,X.useState)(()=>CPX_projectColorsEnabled());return(0,X.useEffect)(()=>{let e=()=>r(CPX_projectColorsEnabled());return window.addEventListener(CPX_PROJECT_COLOR_EVENT,e),()=>window.removeEventListener(CPX_PROJECT_COLOR_EVENT,e)},[]),(0,Z.jsx)(J,{control:(0,Z.jsx)(q,{checked:n,onChange:e=>{r(e),CPX_writeBool(CPX_PROJECT_COLORS_ENABLED_KEY,e)},ariaLabel:t}),label:e,variant:\`nested\`})}
386
+ `;
387
+
388
+ function patchGeneralSettingsUserBubbleColors(text) {
160
389
  let patched = replaceOnce(
161
390
  text,
162
391
  "function tn({showCodeFont:e,showTranslucentSidebarToggle:t,variant:n}){",
@@ -183,11 +412,38 @@ function patchGeneralSettings(text) {
183
412
  );
184
413
  }
185
414
 
415
+ function patchGeneralSettingsProjectColors(text) {
416
+ let patched = replaceOnce(
417
+ text,
418
+ "function tn({showCodeFont:e,showTranslucentSidebarToggle:t,variant:n}){",
419
+ `${codexPlusProjectColorSettingsHelpers}function tn({showCodeFont:e,showTranslucentSidebarToggle:t,variant:n}){`,
420
+ "project colors settings helper insertion anchor",
421
+ );
422
+ patched = replaceOnce(
423
+ patched,
424
+ "userBubble:{id:`settings.general.appearance.userMessageBubble.short`,defaultMessage:`User bubble`,description:`Short label for the user message bubble color input`},pointerCursors:",
425
+ "userBubble:{id:`settings.general.appearance.userMessageBubble.short`,defaultMessage:`User bubble`,description:`Short label for the user message bubble color input`},projectColors:{id:`settings.general.appearance.projectColors.short`,defaultMessage:`Project colors`,description:`Short label for the project colors toggle`},pointerCursors:",
426
+ "project colors settings message anchor",
427
+ );
428
+ patched = replaceOnce(
429
+ patched,
430
+ "CPX_userBubbleLabel=i.formatMessage(Q.userBubble),u=i.formatMessage(Q.chromeThemeContrast),",
431
+ "CPX_userBubbleLabel=i.formatMessage(Q.userBubble),CPX_projectColorsLabel=i.formatMessage(Q.projectColors),u=i.formatMessage(Q.chromeThemeContrast),",
432
+ "project colors settings label anchor",
433
+ );
434
+ return replaceOnce(
435
+ patched,
436
+ "(0,Z.jsx)(CPXUserBubbleColorRow,{variant:n,label:CPX_userBubbleLabel,ariaLabel:i.formatMessage({id:`settings.general.appearance.userMessageBubble`,defaultMessage:`{variant} user message bubble color`,description:`Aria label for the user message bubble color input in appearance settings`},{variant:S})}),O.map",
437
+ "(0,Z.jsx)(CPXUserBubbleColorRow,{variant:n,label:CPX_userBubbleLabel,ariaLabel:i.formatMessage({id:`settings.general.appearance.userMessageBubble`,defaultMessage:`{variant} user message bubble color`,description:`Aria label for the user message bubble color input in appearance settings`},{variant:S})}),(0,Z.jsx)(CPXProjectColorToggleRow,{label:CPX_projectColorsLabel,ariaLabel:i.formatMessage({id:`settings.general.appearance.projectColors`,defaultMessage:`{variant} project colors`,description:`Aria label for the project colors toggle in appearance settings`},{variant:S})}),O.map",
438
+ "project colors settings row anchor",
439
+ );
440
+ }
441
+
186
442
  const codexPlusUserBubbleHelpers = `
187
- const CPX_USER_BUBBLE_COLORS_KEY=\`codex-plus:user-message-bubble-colors\`,CPX_USER_BUBBLE_COLORS_EVENT=\`codex-plus:user-message-bubble-colors-change\`;function CPX_isUserBubbleColor(e){return typeof e===\`string\`&&/^#[0-9a-fA-F]{6}$/.test(e)}function CPX_defaultUserBubbleColor(e){return e===\`dark\`?\`#2f2f2f\`:\`#f2f2f2\`}function CPX_isStoredUserBubbleColor(e,t){return CPX_isUserBubbleColor(t)&&t.toLowerCase()!==CPX_defaultUserBubbleColor(e)}function CPX_readUserBubbleColors(){try{let e=JSON.parse(localStorage.getItem(CPX_USER_BUBBLE_COLORS_KEY)??\`{}\`)??{};return{light:CPX_isStoredUserBubbleColor(\`light\`,e.light)?e.light:null,dark:CPX_isStoredUserBubbleColor(\`dark\`,e.dark)?e.dark:null}}catch{return{light:null,dark:null}}}function CPX_userBubbleTextColor(e){let t=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),r=parseInt(e.slice(5,7),16),i=e=>{let t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)},a=.2126*i(t)+.7152*i(n)+.0722*i(r);return a>.46?\`#111111\`:\`#ffffff\`}function CPX_setUserBubbleVars(){let e=CPX_readUserBubbleColors(),t=document.documentElement;for(let n of[\`light\`,\`dark\`]){let r=e[n];r==null?(t.style.removeProperty(\`--codex-plus-user-bubble-\${n}-bg\`),t.style.removeProperty(\`--codex-plus-user-bubble-\${n}-fg\`)):(t.style.setProperty(\`--codex-plus-user-bubble-\${n}-bg\`,r),t.style.setProperty(\`--codex-plus-user-bubble-\${n}-fg\`,CPX_userBubbleTextColor(r)))}}function CPX_installUserBubbleColors(){if(typeof document===\`undefined\`)return;let e=\`codex-plus-user-bubble-colors\`;document.getElementById(e)==null&&document.head?.appendChild(Object.assign(document.createElement(\`style\`),{id:e,textContent:\`:root:not(.dark):not(.electron-dark) :is([data-codex-plus-user-bubble],[data-codex-plus-user-entry]){background-color:var(--codex-plus-user-bubble-light-bg);color:var(--codex-plus-user-bubble-light-fg)}:root:not(.dark):not(.electron-dark) [data-codex-plus-user-entry] :is(.ProseMirror,.ProseMirror *,textarea,[contenteditable="true"],[data-placeholder]),:root:not(.dark):not(.electron-dark) [data-codex-plus-user-entry] :is(button:not([class*="bg-token-foreground"]),[role="button"]:not([class*="bg-token-foreground"]),button:not([class*="bg-token-foreground"]) svg,[role="button"]:not([class*="bg-token-foreground"]) svg,[class*="text-token-foreground"],[class*="text-token-description-foreground"],[class*="text-token-input-placeholder-foreground"]){color:var(--codex-plus-user-bubble-light-fg)}:root:not(.dark):not(.electron-dark) [data-codex-plus-user-entry] :is([data-placeholder],[class*="text-token-input-placeholder-foreground"])::before,:root:not(.dark):not(.electron-dark) [data-codex-plus-user-entry] :is([data-placeholder],[class*="text-token-input-placeholder-foreground"])::after,:root:not(.dark):not(.electron-dark) [data-codex-plus-user-entry] :is(input,textarea,[contenteditable="true"],[class*="placeholder:text-token-input-placeholder-foreground"])::placeholder{color:var(--codex-plus-user-bubble-light-fg)}:root.dark :is([data-codex-plus-user-bubble],[data-codex-plus-user-entry]),:root.electron-dark :is([data-codex-plus-user-bubble],[data-codex-plus-user-entry]){background-color:var(--codex-plus-user-bubble-dark-bg);color:var(--codex-plus-user-bubble-dark-fg)}:root.dark [data-codex-plus-user-entry] :is(.ProseMirror,.ProseMirror *,textarea,[contenteditable="true"],[data-placeholder]),:root.electron-dark [data-codex-plus-user-entry] :is(.ProseMirror,.ProseMirror *,textarea,[contenteditable="true"],[data-placeholder]),:root.dark [data-codex-plus-user-entry] :is(button:not([class*="bg-token-foreground"]),[role="button"]:not([class*="bg-token-foreground"]),button:not([class*="bg-token-foreground"]) svg,[role="button"]:not([class*="bg-token-foreground"]) svg,[class*="text-token-foreground"],[class*="text-token-description-foreground"],[class*="text-token-input-placeholder-foreground"]),:root.electron-dark [data-codex-plus-user-entry] :is(button:not([class*="bg-token-foreground"]),[role="button"]:not([class*="bg-token-foreground"]),button:not([class*="bg-token-foreground"]) svg,[role="button"]:not([class*="bg-token-foreground"]) svg,[class*="text-token-foreground"],[class*="text-token-description-foreground"],[class*="text-token-input-placeholder-foreground"]){color:var(--codex-plus-user-bubble-dark-fg)}:root.dark [data-codex-plus-user-entry] :is([data-placeholder],[class*="text-token-input-placeholder-foreground"])::before,:root.dark [data-codex-plus-user-entry] :is([data-placeholder],[class*="text-token-input-placeholder-foreground"])::after,:root.dark [data-codex-plus-user-entry] :is(input,textarea,[contenteditable="true"],[class*="placeholder:text-token-input-placeholder-foreground"])::placeholder,:root.electron-dark [data-codex-plus-user-entry] :is([data-placeholder],[class*="text-token-input-placeholder-foreground"])::before,:root.electron-dark [data-codex-plus-user-entry] :is([data-placeholder],[class*="text-token-input-placeholder-foreground"])::after,:root.electron-dark [data-codex-plus-user-entry] :is(input,textarea,[contenteditable="true"],[class*="placeholder:text-token-input-placeholder-foreground"])::placeholder{color:var(--codex-plus-user-bubble-dark-fg)}\`})),CPX_setUserBubbleVars(),window.addEventListener(CPX_USER_BUBBLE_COLORS_EVENT,CPX_setUserBubbleVars)}CPX_installUserBubbleColors();
443
+ const CPX_USER_BUBBLE_COLORS_KEY=\`codex-plus:user-message-bubble-colors\`,CPX_USER_BUBBLE_COLORS_EVENT=\`codex-plus:user-message-bubble-colors-change\`;function CPX_isUserBubbleColor(e){return typeof e===\`string\`&&/^#[0-9a-fA-F]{6}$/.test(e)}function CPX_defaultUserBubbleColor(e){return e===\`dark\`?\`#2f2f2f\`:\`#f2f2f2\`}function CPX_isStoredUserBubbleColor(e,t){return CPX_isUserBubbleColor(t)&&t.toLowerCase()!==CPX_defaultUserBubbleColor(e)}function CPX_readUserBubbleColors(){try{let e=JSON.parse(localStorage.getItem(CPX_USER_BUBBLE_COLORS_KEY)??\`{}\`)??{};return{light:CPX_isStoredUserBubbleColor(\`light\`,e.light)?e.light:null,dark:CPX_isStoredUserBubbleColor(\`dark\`,e.dark)?e.dark:null}}catch{return{light:null,dark:null}}}function CPX_userBubbleTextColor(e){let t=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),r=parseInt(e.slice(5,7),16),i=e=>{let t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)},a=.2126*i(t)+.7152*i(n)+.0722*i(r),o=(a+.05)/.05,s=(a+.05)/(.0056+.05),l=1.05/(a+.05);return s>=4.5&&s>=l?\`#111111\`:o>=l?\`#000000\`:\`#ffffff\`}function CPX_setUserBubbleVars(){let e=CPX_readUserBubbleColors(),t=document.documentElement;for(let n of[\`light\`,\`dark\`]){let r=e[n];r==null?(t.style.removeProperty(\`--codex-plus-user-bubble-\${n}-bg\`),t.style.removeProperty(\`--codex-plus-user-bubble-\${n}-fg\`)):(t.style.setProperty(\`--codex-plus-user-bubble-\${n}-bg\`,r),t.style.setProperty(\`--codex-plus-user-bubble-\${n}-fg\`,CPX_userBubbleTextColor(r)))}}function CPX_installUserBubbleColors(){if(typeof document===\`undefined\`)return;let e=\`codex-plus-user-bubble-colors\`;document.getElementById(e)==null&&document.head?.appendChild(Object.assign(document.createElement(\`style\`),{id:e,textContent:\`:root:not(.dark):not(.electron-dark) :is([data-codex-plus-user-bubble],[data-codex-plus-user-entry]){background-color:var(--codex-plus-user-bubble-light-bg);color:var(--codex-plus-user-bubble-light-fg)}:root:not(.dark):not(.electron-dark) [data-codex-plus-user-entry] :is(.ProseMirror,.ProseMirror *,textarea,[contenteditable="true"],[data-placeholder]),:root:not(.dark):not(.electron-dark) [data-codex-plus-user-entry] :is(button:not([class*="bg-token-foreground"]),[role="button"]:not([class*="bg-token-foreground"]),button:not([class*="bg-token-foreground"]) svg,[role="button"]:not([class*="bg-token-foreground"]) svg,[class*="text-token-foreground"],[class*="text-token-description-foreground"],[class*="text-token-input-placeholder-foreground"],[class*="text-token-text-link-foreground"],[class*="text-token-editor-warning-foreground"]){color:var(--codex-plus-user-bubble-light-fg)}:root:not(.dark):not(.electron-dark) [data-codex-plus-user-entry] :is([data-placeholder],[class*="text-token-input-placeholder-foreground"])::before,:root:not(.dark):not(.electron-dark) [data-codex-plus-user-entry] :is([data-placeholder],[class*="text-token-input-placeholder-foreground"])::after,:root:not(.dark):not(.electron-dark) [data-codex-plus-user-entry] :is(input,textarea,[contenteditable="true"],[class*="placeholder:text-token-input-placeholder-foreground"])::placeholder{color:var(--codex-plus-user-bubble-light-fg)}:root.dark :is([data-codex-plus-user-bubble],[data-codex-plus-user-entry]),:root.electron-dark :is([data-codex-plus-user-bubble],[data-codex-plus-user-entry]){background-color:var(--codex-plus-user-bubble-dark-bg);color:var(--codex-plus-user-bubble-dark-fg)}:root.dark [data-codex-plus-user-entry] :is(.ProseMirror,.ProseMirror *,textarea,[contenteditable="true"],[data-placeholder]),:root.electron-dark [data-codex-plus-user-entry] :is(.ProseMirror,.ProseMirror *,textarea,[contenteditable="true"],[data-placeholder]),:root.dark [data-codex-plus-user-entry] :is(button:not([class*="bg-token-foreground"]),[role="button"]:not([class*="bg-token-foreground"]),button:not([class*="bg-token-foreground"]) svg,[role="button"]:not([class*="bg-token-foreground"]) svg,[class*="text-token-foreground"],[class*="text-token-description-foreground"],[class*="text-token-input-placeholder-foreground"],[class*="text-token-text-link-foreground"],[class*="text-token-editor-warning-foreground"]),:root.electron-dark [data-codex-plus-user-entry] :is(button:not([class*="bg-token-foreground"]),[role="button"]:not([class*="bg-token-foreground"]),button:not([class*="bg-token-foreground"]) svg,[role="button"]:not([class*="bg-token-foreground"]) svg,[class*="text-token-foreground"],[class*="text-token-description-foreground"],[class*="text-token-input-placeholder-foreground"],[class*="text-token-text-link-foreground"],[class*="text-token-editor-warning-foreground"]){color:var(--codex-plus-user-bubble-dark-fg)}:root.dark [data-codex-plus-user-entry] :is([data-placeholder],[class*="text-token-input-placeholder-foreground"])::before,:root.dark [data-codex-plus-user-entry] :is([data-placeholder],[class*="text-token-input-placeholder-foreground"])::after,:root.dark [data-codex-plus-user-entry] :is(input,textarea,[contenteditable="true"],[class*="placeholder:text-token-input-placeholder-foreground"])::placeholder,:root.electron-dark [data-codex-plus-user-entry] :is([data-placeholder],[class*="text-token-input-placeholder-foreground"])::before,:root.electron-dark [data-codex-plus-user-entry] :is([data-placeholder],[class*="text-token-input-placeholder-foreground"])::after,:root.electron-dark [data-codex-plus-user-entry] :is(input,textarea,[contenteditable="true"],[class*="placeholder:text-token-input-placeholder-foreground"])::placeholder{color:var(--codex-plus-user-bubble-dark-fg)}\`})),CPX_setUserBubbleVars(),window.addEventListener(CPX_USER_BUBBLE_COLORS_EVENT,CPX_setUserBubbleVars)}CPX_installUserBubbleColors();
188
444
  `;
189
445
 
190
- function patchUserMessageAttachments(text) {
446
+ function patchUserMessageAttachmentsBubbleColors(text) {
191
447
  let patched = replaceOnce(
192
448
  text,
193
449
  "var Z=i(),Q=e(n(),1),$=r();function Ue(e){",
@@ -208,18 +464,148 @@ function patchUserMessageAttachments(text) {
208
464
  );
209
465
  }
210
466
 
211
- function patchComposer(text) {
467
+ function patchUserMessageAttachmentsProjectColors(text) {
468
+ let patched = replaceOnce(
469
+ text,
470
+ 'import{Aa as x,Ta as S}from"./src-C7fSIbpz.js";',
471
+ 'import{Aa as x,Ta as S}from"./src-C7fSIbpz.js";import{t as CPX_localThreadKey}from"./sidebar-thread-keys-xpkHnzZL.js";import{s as CPX_threadProjectId}from"./sidebar-thread-row-signals-DVmC0DJ3.js";',
472
+ "user bubble project assignment imports anchor",
473
+ );
474
+ patched = replaceOnce(
475
+ patched,
476
+ "const CPX_USER_BUBBLE_COLORS_KEY=`codex-plus:user-message-bubble-colors`,",
477
+ `${codexPlusProjectColorHelpers}const CPX_USER_BUBBLE_COLORS_KEY=\`codex-plus:user-message-bubble-colors\`,`,
478
+ "user bubble project color helper insertion anchor",
479
+ );
480
+ patched = replaceOnce(
481
+ patched,
482
+ "hasExternalAttachments:b,commentCount:ee,onEditMessage:x,threadId:S,turnId:w,cwd:T,hostId:k}=e,M=a===void 0?!1:a,",
483
+ "hasExternalAttachments:b,commentCount:ee,onEditMessage:x,threadId:S,turnId:w,cwd:T,hostId:k}=e,CPX_userMessageProjectId=o(CPX_threadProjectId,S==null?null:CPX_localThreadKey(S)),CPX_userMessageProjectStyle=CPX_projectColorStyle(CPX_userMessageProjectId),M=a===void 0?!1:a,",
484
+ "user bubble project assignment style anchor",
485
+ );
486
+ return replaceOnce(
487
+ patched,
488
+ "\"data-user-message-bubble\":!0,\"data-codex-plus-user-bubble\":!0,role:H?`button`:void 0,",
489
+ "\"data-user-message-bubble\":!0,\"data-codex-plus-user-bubble\":!0,\"data-codex-plus-project-color\":CPX_userMessageProjectStyle?``:void 0,style:CPX_userMessageProjectStyle,role:H?`button`:void 0,",
490
+ "user bubble project marker attribute anchor",
491
+ );
492
+ }
493
+
494
+ function patchComposerBubbleColors(text) {
212
495
  let patched = replaceOnce(
213
496
  text,
214
497
  "function oh(e){let t=(0,$.c)(13),",
215
498
  `${codexPlusUserBubbleHelpers}function oh(e){let t=(0,$.c)(13),`,
216
499
  "composer user bubble helper insertion anchor",
217
500
  );
501
+ patched = replaceOnce(
502
+ patched,
503
+ "return t[5]!==n||t[6]!==a||t[7]!==c||t[8]!==l||t[9]!==u||t[10]!==d||t[11]!==v?(y=(0,Q.jsx)(Jt.div,{inert:a,className:v,onDragEnter:c,onDragOver:u,onDragLeave:l,onDrop:d,children:n}),t[5]=n,t[6]=a,t[7]=c,t[8]=l,t[9]=u,t[10]=d,t[11]=v,t[12]=y):y=t[12],y}",
504
+ "return t[5]!==n||t[6]!==a||t[7]!==c||t[8]!==l||t[9]!==u||t[10]!==d||t[11]!==v?(y=(0,Q.jsx)(Jt.div,{inert:a,\"data-codex-plus-user-entry\":!0,className:v,onDragEnter:c,onDragOver:u,onDragLeave:l,onDrop:d,children:n}),t[5]=n,t[6]=a,t[7]=c,t[8]=l,t[9]=u,t[10]=d,t[11]=v,t[12]=y):y=t[12],y}",
505
+ "composer user entry marker render anchor",
506
+ );
507
+ return patched;
508
+ }
509
+
510
+ function patchComposerProjectColors(text) {
511
+ let patched = replaceOnce(
512
+ text,
513
+ 'import{$t as q,A as oe,At as se,Ca as ce,D as J,Dt as le,Ea as ue,Fi as de,Ht as fe,Ii as pe,It as me,J as he,Jn as ge,Li as _e,Lt as ve,M as ye,Mi as be,Mt as xe,Pi as Se,Ri as Ce,Sa as we,T as Te,Vt as Ee,Yn as De,Zi as Oe,an as ke,bt as Ae,cn as je,dt as Me,en as Ne,ft as Pe,in as Fe,kt as Ie,ln as Le,m as Re,n as ze,on as Be,ot as Ve,p as He,pa as Ue,ra as We,rn as Ge,sn as Ke,st as qe,tr as Je,vt as Ye,xa as Xe,yt as Ze,z as Qe}from"./thread-context-inputs-CF11za43.js";',
514
+ 'import{$t as q,A as oe,At as se,Ca as ce,D as J,Dt as le,Ea as ue,Fi as de,Ht as fe,Ii as pe,It as me,J as he,Jn as ge,Li as _e,Lt as ve,M as ye,Mi as be,Mt as xe,Pi as Se,Ri as Ce,Sa as we,T as Te,Vt as Ee,Yn as De,Zi as Oe,an as ke,bt as Ae,cn as je,dt as Me,en as Ne,ft as Pe,in as Fe,kt as Ie,ln as Le,m as Re,n as ze,on as Be,ot as Ve,p as He,pa as Ue,ra as We,rn as Ge,sn as Ke,st as qe,tr as Je,vt as Ye,xa as Xe,yt as Ze,z as Qe}from"./thread-context-inputs-CF11za43.js";import{t as CPX_localThreadKey}from"./sidebar-thread-keys-xpkHnzZL.js";import{s as CPX_threadProjectId}from"./sidebar-thread-row-signals-DVmC0DJ3.js";',
515
+ "composer project assignment imports anchor",
516
+ );
517
+ patched = replaceOnce(
518
+ patched,
519
+ "const CPX_USER_BUBBLE_COLORS_KEY=`codex-plus:user-message-bubble-colors`,",
520
+ `${codexPlusProjectColorHelpers}const CPX_USER_BUBBLE_COLORS_KEY=\`codex-plus:user-message-bubble-colors\`,`,
521
+ "composer project color helper insertion anchor",
522
+ );
523
+ patched = replaceOnce(
524
+ patched,
525
+ "function oh(e){let t=(0,$.c)(13),{children:n,className:r,externalFooterVariant:i,inert:a,isDragActive:o,layout:s,onDragEnter:c,onDragLeave:l,onDragOver:u,onDrop:d}=e,",
526
+ "function oh(e){let t=(0,$.c)(14),{children:n,className:r,externalFooterVariant:i,inert:a,isDragActive:o,layout:s,onDragEnter:c,onDragLeave:l,onDragOver:u,onDrop:d,style:CPX_projectColorInlineStyle}=e,",
527
+ "composer surface style prop anchor",
528
+ );
529
+ patched = replaceOnce(
530
+ patched,
531
+ "Il=(0,Q.jsx)(_n,{onOpen:()=>{Bc.prepare(),X.toggleContextSuggestions()}});return",
532
+ "Il=(0,Q.jsx)(_n,{onOpen:()=>{Bc.prepare(),X.toggleContextSuggestions()}}),CPX_composerThreadProjectId=a(CPX_threadProjectId,G==null?null:CPX_localThreadKey(G)),CPX_composerProjectStyle=CPX_projectColorStyle(G==null?On?{hostId:On.hostId,path:On.remotePath,projectId:kn,label:On.label??On.name}:x??void 0:CPX_composerThreadProjectId);return",
533
+ "composer project style hook-safe caller anchor",
534
+ );
535
+ patched = replaceOnce(
536
+ patched,
537
+ "return t[5]!==n||t[6]!==a||t[7]!==c||t[8]!==l||t[9]!==u||t[10]!==d||t[11]!==v?(y=(0,Q.jsx)(Jt.div,{inert:a,\"data-codex-plus-user-entry\":!0,className:v,onDragEnter:c,onDragOver:u,onDragLeave:l,onDrop:d,children:n}),t[5]=n,t[6]=a,t[7]=c,t[8]=l,t[9]=u,t[10]=d,t[11]=v,t[12]=y):y=t[12],y}",
538
+ "return t[5]!==n||t[6]!==a||t[7]!==c||t[8]!==l||t[9]!==u||t[10]!==d||t[11]!==v||t[12]!==CPX_projectColorInlineStyle?(y=(0,Q.jsx)(Jt.div,{inert:a,\"data-codex-plus-user-entry\":!0,\"data-codex-plus-project-color\":CPX_projectColorInlineStyle?``:void 0,style:CPX_projectColorInlineStyle,className:v,onDragEnter:c,onDragOver:u,onDragLeave:l,onDrop:d,children:n}),t[5]=n,t[6]=a,t[7]=c,t[8]=l,t[9]=u,t[10]=d,t[11]=v,t[12]=CPX_projectColorInlineStyle,t[13]=y):y=t[13],y}",
539
+ "composer project entry styled render anchor",
540
+ );
541
+ return replaceOnce(
542
+ patched,
543
+ "):(0,Q.jsxs)(ah,{className:A,externalFooterVariant:k,inert:Y,isDragActive:jo,layout:Nl,onDragEnter:kl?void 0:il,onDragOver:kl?void 0:sl,onDragLeave:kl?void 0:al,onDrop:kl?void 0:ll,children:",
544
+ "):(0,Q.jsxs)(ah,{className:A,externalFooterVariant:k,inert:Y,isDragActive:jo,layout:Nl,style:!Ge&&!Hn?CPX_composerProjectStyle:void 0,onDragEnter:kl?void 0:il,onDragOver:kl?void 0:sl,onDragLeave:kl?void 0:al,onDrop:kl?void 0:ll,children:",
545
+ "composer project accent style caller anchor",
546
+ );
547
+ }
548
+
549
+ function patchElectronMenuShortcuts(text) {
550
+ return replaceOnce(
551
+ text,
552
+ "{id:`toggleSidebar`,titleIntlId:`codex.command.toggleSidebar`,descriptionIntlId:`codex.commandDescription.toggleSidebar`,commandMenuGroupKey:`panels`,commandMenu:!0,electron:{menuTitle:`Toggle Sidebar`,menuTitleIntlId:`codex.commandMenuTitle.toggleSidebar`,defaultKeybindings:[{key:`CmdOrCtrl+B`}]}},{id:`toggleBottomPanel`,",
553
+ "{id:`toggleSidebar`,titleIntlId:`codex.command.toggleSidebar`,descriptionIntlId:`codex.commandDescription.toggleSidebar`,commandMenuGroupKey:`panels`,commandMenu:!0,electron:{menuTitle:`Toggle Sidebar`,menuTitleIntlId:`codex.commandMenuTitle.toggleSidebar`,defaultKeybindings:[{key:`CmdOrCtrl+B`}]}},{id:`codexPlusToggleSidebarNameBlur`,titleIntlId:`codexPlus.command.toggleSidebarNameBlur`,descriptionIntlId:`codexPlus.commandDescription.toggleSidebarNameBlur`,commandMenuGroupKey:`panels`,commandMenu:!0,electron:{menuTitle:`Toggle sidebar blur`,menuTitleIntlId:`codexPlus.commandMenuTitle.toggleSidebarNameBlur`,defaultKeybindings:[]}},{id:`toggleBottomPanel`,",
554
+ "sidebar blur command palette metadata anchor",
555
+ );
556
+ }
557
+
558
+ function patchKeyboardShortcutsSearchInput(text) {
559
+ let patched = replaceOnce(
560
+ text,
561
+ "\"codex.command.toggleSidebar\":{id:`codex.command.toggleSidebar`,defaultMessage:`Toggle sidebar`,description:`Command menu item to toggle the sidebar`},\"codex.command.toggleBottomPanel\":",
562
+ "\"codex.command.toggleSidebar\":{id:`codex.command.toggleSidebar`,defaultMessage:`Toggle sidebar`,description:`Command menu item to toggle the sidebar`},\"codexPlus.command.toggleSidebarNameBlur\":{id:`codexPlus.command.toggleSidebarNameBlur`,defaultMessage:`Toggle sidebar blur`,description:`Command menu item to blur or show sidebar names`},\"codex.command.toggleBottomPanel\":",
563
+ "sidebar blur command title intl message anchor",
564
+ );
565
+ patched = replaceOnce(
566
+ patched,
567
+ "\"codex.commandMenuTitle.toggleSidebar\":{id:`codex.commandMenuTitle.toggleSidebar`,defaultMessage:`Toggle Sidebar`,description:`Native menu item to toggle the sidebar`},\"codex.commandMenuTitle.toggleBottomPanel\":",
568
+ "\"codex.commandMenuTitle.toggleSidebar\":{id:`codex.commandMenuTitle.toggleSidebar`,defaultMessage:`Toggle Sidebar`,description:`Native menu item to toggle the sidebar`},\"codexPlus.commandMenuTitle.toggleSidebarNameBlur\":{id:`codexPlus.commandMenuTitle.toggleSidebarNameBlur`,defaultMessage:`Toggle sidebar blur`,description:`Native menu item to blur or show sidebar names`},\"codex.commandMenuTitle.toggleBottomPanel\":",
569
+ "sidebar blur command menu title intl message anchor",
570
+ );
218
571
  return replaceOnce(
219
572
  patched,
220
- "(0,Q.jsx)(Jt.div,{inert:a,className:v,onDragEnter:c,onDragOver:u,onDragLeave:l,onDrop:d,children:n})",
221
- "(0,Q.jsx)(Jt.div,{inert:a,\"data-codex-plus-user-entry\":!0,className:v,onDragEnter:c,onDragOver:u,onDragLeave:l,onDrop:d,children:n})",
222
- "composer user entry marker anchor",
573
+ "\"codex.commandDescription.toggleSidebar\":{id:`codex.commandDescription.toggleSidebar`,defaultMessage:`Show or hide the sidebar`,description:`Description for the Toggle sidebar command`},\"codex.commandDescription.toggleBottomPanel\":",
574
+ "\"codex.commandDescription.toggleSidebar\":{id:`codex.commandDescription.toggleSidebar`,defaultMessage:`Show or hide the sidebar`,description:`Description for the Toggle sidebar command`},\"codexPlus.commandDescription.toggleSidebarNameBlur\":{id:`codexPlus.commandDescription.toggleSidebarNameBlur`,defaultMessage:`Blur or show sidebar chat and project names`,description:`Description for the Toggle sidebar blur command`},\"codex.commandDescription.toggleBottomPanel\":",
575
+ "sidebar blur command description intl message anchor",
576
+ );
577
+ }
578
+
579
+ function patchLocalTaskRow(text) {
580
+ let patched = replaceOnce(
581
+ text,
582
+ "function fn(e){let t=(0,K.c)(124),",
583
+ `${codexPlusProjectColorHelpers}function fn(e){let t=(0,K.c)(124),`,
584
+ "local task row project color helper insertion anchor",
585
+ );
586
+ patched = replaceOnce(
587
+ patched,
588
+ "threadSummary:Ne,dataAttributes:Fe}=e,Ie=g===void 0?!1:g,",
589
+ "threadSummary:Ne,dataAttributes:Fe}=e,CPX_rowDataAttributes=Fe??CPX_projectColorDataAttributes(Oe,!0),Ie=g===void 0?!1:g,",
590
+ "local task row project assignment anchor",
591
+ );
592
+ patched = replaceOnce(
593
+ patched,
594
+ "t[87]!==Fe",
595
+ "t[87]!==CPX_rowDataAttributes",
596
+ "local task row memo dependency anchor",
597
+ );
598
+ patched = replaceOnce(
599
+ patched,
600
+ "dataAttributes:Fe,archiveAriaLabel:hn",
601
+ "dataAttributes:CPX_rowDataAttributes,archiveAriaLabel:hn",
602
+ "local task row data attributes anchor",
603
+ );
604
+ return replaceOnce(
605
+ patched,
606
+ "t[87]=Fe",
607
+ "t[87]=CPX_rowDataAttributes",
608
+ "local task row memo assignment anchor",
223
609
  );
224
610
  }
225
611
 
@@ -248,14 +634,36 @@ module.exports = {
248
634
  },
249
635
  {
250
636
  id: "diagnostic-error-boundary",
251
- fileTransforms: [[appShellFile, patchAppShell]],
637
+ fileTransforms: [
638
+ [appShellFile, patchAppShell],
639
+ [errorBoundaryFile, patchErrorBoundary],
640
+ ],
252
641
  },
253
642
  {
254
643
  id: "user-message-bubble-colors",
255
644
  fileTransforms: [
256
- [generalSettingsFile, patchGeneralSettings],
257
- [userMessageAttachmentsFile, patchUserMessageAttachments],
258
- [composerFile, patchComposer],
645
+ [generalSettingsFile, patchGeneralSettingsUserBubbleColors],
646
+ [userMessageAttachmentsFile, patchUserMessageAttachmentsBubbleColors],
647
+ [composerFile, patchComposerBubbleColors],
648
+ ],
649
+ },
650
+ {
651
+ id: "project-colors",
652
+ fileTransforms: [
653
+ [appMainFile, patchAppMainProjectColors],
654
+ [generalSettingsFile, patchGeneralSettingsProjectColors],
655
+ [sidebarProjectHoverCardSourceRowsFile, patchSidebarProjectHoverCardSourceRows],
656
+ [localTaskRowFile, patchLocalTaskRow],
657
+ [userMessageAttachmentsFile, patchUserMessageAttachmentsProjectColors],
658
+ [composerFile, patchComposerProjectColors],
659
+ ],
660
+ },
661
+ {
662
+ id: "sidebar-name-blur",
663
+ fileTransforms: [
664
+ [appMainFile, patchAppMainSidebarBlur],
665
+ [electronMenuShortcutsFile, patchElectronMenuShortcuts],
666
+ [keyboardShortcutsSearchInputFile, patchKeyboardShortcutsSearchInput],
259
667
  ],
260
668
  },
261
669
  ],