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 +22 -3
- package/package.json +2 -2
- package/src/patches/26.616.41845-4198.js +419 -11
- package/src/patches/26.616.51431-4212.js +419 -11
- package/src/patches/26.616.71553-4265.js +742 -0
- package/src/patches/index.js +2 -1
|
@@ -5,11 +5,17 @@ const newTitle = "<title>Codex Plus</title>";
|
|
|
5
5
|
const titleFile = "webview/index.html";
|
|
6
6
|
const workerFile = ".vite/build/worker.js";
|
|
7
7
|
const mainFile = ".vite/build/main-B6erVVHq.js";
|
|
8
|
+
const appMainFile = "webview/assets/app-main-C-_HjS2P.js";
|
|
8
9
|
const appShellFile = "webview/assets/app-shell-DCvuE1cb.js";
|
|
10
|
+
const errorBoundaryFile = "webview/assets/error-boundary-DOI-M2iu.js";
|
|
9
11
|
const generalSettingsFile = "webview/assets/general-settings-Bit-KX17.js";
|
|
12
|
+
const sidebarProjectHoverCardSourceRowsFile = "webview/assets/sidebar-project-hover-card-source-rows-CYy4Y4ei.js";
|
|
10
13
|
const threadSidePanelTabsFile = "webview/assets/thread-side-panel-tabs-D0dd27Zf.js";
|
|
11
14
|
const userMessageAttachmentsFile = "webview/assets/user-message-attachments-CgyXEK9U.js";
|
|
12
15
|
const composerFile = "webview/assets/composer-CCuv6v-2.js";
|
|
16
|
+
const localTaskRowFile = "webview/assets/local-task-row-vTrSC6Rc.js";
|
|
17
|
+
const electronMenuShortcutsFile = "webview/assets/electron-menu-shortcuts-j6UKqTX5.js";
|
|
18
|
+
const keyboardShortcutsSearchInputFile = "webview/assets/keyboard-shortcuts-search-input-DjVpifwp.js";
|
|
13
19
|
|
|
14
20
|
function replaceOnce(text, oldText, newText, label) {
|
|
15
21
|
const matches = text.split(oldText).length - 1;
|
|
@@ -220,11 +226,234 @@ function patchAppShell(text) {
|
|
|
220
226
|
);
|
|
221
227
|
}
|
|
222
228
|
|
|
229
|
+
function patchErrorBoundary(text) {
|
|
230
|
+
let patched = replaceOnce(
|
|
231
|
+
text,
|
|
232
|
+
"function Xf(e){let t=(0,Vf.c)(9),{resetError:n}=e,r=ee(),i,a;",
|
|
233
|
+
"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;",
|
|
234
|
+
"webview error boundary fallback prop anchor",
|
|
235
|
+
);
|
|
236
|
+
patched = replaceOnce(
|
|
237
|
+
patched,
|
|
238
|
+
"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})]})]",
|
|
239
|
+
"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})]})]",
|
|
240
|
+
"webview error boundary detail anchor",
|
|
241
|
+
);
|
|
242
|
+
return replaceOnce(
|
|
243
|
+
patched,
|
|
244
|
+
"r=e??(e=>(0,$.jsx)(Xf,{resetError:()=>e.resetError()}));",
|
|
245
|
+
"r=e??(e=>(0,$.jsx)(Xf,{error:e.error,componentStack:e.componentStack,resetError:()=>e.resetError()}));",
|
|
246
|
+
"webview error boundary error prop anchor",
|
|
247
|
+
);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
function patchAppMainProjectColors(text) {
|
|
251
|
+
let patched = replaceOnce(
|
|
252
|
+
text,
|
|
253
|
+
"function Pk(e){let t=(0,Q.c)(45),",
|
|
254
|
+
`${codexPlusProjectColorHelpers}function Pk(e){let t=(0,Q.c)(46),`,
|
|
255
|
+
"project color app main helper insertion anchor",
|
|
256
|
+
);
|
|
257
|
+
patched = replaceOnce(
|
|
258
|
+
patched,
|
|
259
|
+
"H=Ha.sidebarProjectList({projectId:i.projectId,showAll:x})",
|
|
260
|
+
"H=Ha.sidebarProjectList({projectId:i.projectId,showAll:x})",
|
|
261
|
+
"project group color marker anchor",
|
|
262
|
+
);
|
|
263
|
+
patched = replaceOnce(
|
|
264
|
+
patched,
|
|
265
|
+
"q={onActivateGroup:V,onStartNewConversation:a,isGrouped:!0,hideRemoteHostEnvIcon:!0,hideTimestamp:l,locationId:b,floatStatusIconsRight:s,showPinActionOnHover:o}",
|
|
266
|
+
"q={onActivateGroup:V,onStartNewConversation:a,isGrouped:!0,hideRemoteHostEnvIcon:!0,hideTimestamp:l,locationId:b,floatStatusIconsRight:s,showPinActionOnHover:o,dataAttributes:CPX_projectColorDataAttributes(i,!0)}",
|
|
267
|
+
"project thread row color key anchor",
|
|
268
|
+
);
|
|
269
|
+
patched = replaceOnce(
|
|
270
|
+
patched,
|
|
271
|
+
"t[19]!==V||t[20]!==s||t[21]!==l||t[22]!==b||t[23]!==o||t[24]!==a?",
|
|
272
|
+
"t[19]!==V||t[20]!==s||t[21]!==l||t[22]!==b||t[23]!==o||t[24]!==a||t[45]!==i?",
|
|
273
|
+
"project thread row color cache dependency anchor",
|
|
274
|
+
);
|
|
275
|
+
patched = replaceOnce(
|
|
276
|
+
patched,
|
|
277
|
+
"t[19]=V,t[20]=s,t[21]=l,t[22]=b,t[23]=o,t[24]=a,t[25]=q):q=t[25]",
|
|
278
|
+
"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]",
|
|
279
|
+
"project thread row color cache write anchor",
|
|
280
|
+
);
|
|
281
|
+
patched = replaceOnce(
|
|
282
|
+
patched,
|
|
283
|
+
"ie=(0,Z.jsx)(`div`,{...H,children:re})",
|
|
284
|
+
"ie=(0,Z.jsx)(`div`,{...H,children:re})",
|
|
285
|
+
"project group color render anchor",
|
|
286
|
+
);
|
|
287
|
+
patched = replaceOnce(
|
|
288
|
+
patched,
|
|
289
|
+
"O=(0,Z.jsx)(NO,{action:T,actionTooltipContent:h,actionTooltipDisabled:p,indicator:E,isMenuOpen:g,menu:D})",
|
|
290
|
+
"O=(0,Z.jsx)(NO,{action:T,actionTooltipContent:h,actionTooltipDisabled:p,indicator:E,isMenuOpen:g,menu:D})",
|
|
291
|
+
"project header action render anchor",
|
|
292
|
+
);
|
|
293
|
+
patched = replaceOnce(
|
|
294
|
+
patched,
|
|
295
|
+
"Ke=(0,Z.jsx)(Oe,{rowAttributes:ke,className:Ae,collapsed:L,contentClassName:je,",
|
|
296
|
+
"Ke=(0,Z.jsx)(Oe,{rowAttributes:{...ke,...CPX_projectColorDataAttributes(n,!0)},className:Ae,collapsed:L,contentClassName:je,",
|
|
297
|
+
"project header row color attributes anchor",
|
|
298
|
+
);
|
|
299
|
+
return patched;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
function patchAppMainSidebarBlur(text) {
|
|
303
|
+
let patched = replaceOnce(
|
|
304
|
+
text,
|
|
305
|
+
"function Pk(e){let t=(0,Q.c)(46),",
|
|
306
|
+
`${codexPlusSidebarNameBlurHelpers}function Pk(e){let t=(0,Q.c)(46),`,
|
|
307
|
+
"sidebar blur app main helper insertion anchor",
|
|
308
|
+
);
|
|
309
|
+
patched = replaceOnce(
|
|
310
|
+
patched,
|
|
311
|
+
"openFolder:$y,toggleSidebar:$i,toggleTerminal:Md,",
|
|
312
|
+
"openFolder:$y,toggleSidebar:$i,codexPlusToggleSidebarNameBlur:$i,toggleTerminal:Md,",
|
|
313
|
+
"sidebar blur command icon anchor",
|
|
314
|
+
);
|
|
315
|
+
patched = replaceOnce(
|
|
316
|
+
patched,
|
|
317
|
+
"children:n.label}),t[62]=Oe,",
|
|
318
|
+
"children:(0,Z.jsx)(`span`,{\"data-codex-plus-sidebar-name\":``,children:n.label})}),t[62]=Oe,",
|
|
319
|
+
"project header sidebar blur label anchor",
|
|
320
|
+
);
|
|
321
|
+
return replaceOnce(
|
|
322
|
+
patched,
|
|
323
|
+
"children:[l,u,(0,Z.jsx)(H_,{route:a,children:C})]",
|
|
324
|
+
"children:[l,u,(0,Z.jsx)(CPXSidebarNameBlurCommand,{}),(0,Z.jsx)(H_,{route:a,children:C})]",
|
|
325
|
+
"sidebar name blur command mount anchor",
|
|
326
|
+
);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
function patchSidebarProjectHoverCardSourceRows(text) {
|
|
330
|
+
let patched = replaceOnce(
|
|
331
|
+
text,
|
|
332
|
+
"function Ft(e,t,n){",
|
|
333
|
+
"function CPX_mergeDataAttributes(e,t){return t==null?e:{...e,...t,style:{...e?.style,...t?.style}}}function Ft(e,t,n){",
|
|
334
|
+
"sidebar row data attribute merge helper anchor",
|
|
335
|
+
);
|
|
336
|
+
patched = replaceOnce(
|
|
337
|
+
patched,
|
|
338
|
+
"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,",
|
|
339
|
+
"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,",
|
|
340
|
+
"sidebar row component data attributes prop anchor",
|
|
341
|
+
);
|
|
342
|
+
patched = replaceOnce(
|
|
343
|
+
patched,
|
|
344
|
+
"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?",
|
|
345
|
+
"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?",
|
|
346
|
+
"sidebar row component data attributes memo dependency anchor",
|
|
347
|
+
);
|
|
348
|
+
patched = replaceOnce(
|
|
349
|
+
patched,
|
|
350
|
+
"onArchiveStart:L,onArchiveSuccess:z,onArchiveError:B}",
|
|
351
|
+
"onArchiveStart:L,onArchiveSuccess:z,onArchiveError:B,dataAttributes:CPX_rowDataAttributes}",
|
|
352
|
+
"sidebar row component data attributes object anchor",
|
|
353
|
+
);
|
|
354
|
+
patched = replaceOnce(
|
|
355
|
+
patched,
|
|
356
|
+
"t[32]=w,t[33]=V,t[34]=T,t[35]=H):H=t[35]",
|
|
357
|
+
"t[32]=w,t[33]=V,t[34]=T,t[40]=CPX_rowDataAttributes,t[35]=H):H=t[35]",
|
|
358
|
+
"sidebar row component data attributes memo write anchor",
|
|
359
|
+
);
|
|
360
|
+
patched = replaceOnce(
|
|
361
|
+
patched,
|
|
362
|
+
"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,",
|
|
363
|
+
"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,",
|
|
364
|
+
"sidebar row dispatcher data attributes prop anchor",
|
|
365
|
+
);
|
|
366
|
+
patched = replaceOnce(
|
|
367
|
+
patched,
|
|
368
|
+
"dataAttributes:ae.sidebarThreadRow({active:s,hostId:t.hostId,id:n,kind:`pending-worktree`,pinned:r,title:t.label})",
|
|
369
|
+
"dataAttributes:CPX_mergeDataAttributes(ae.sidebarThreadRow({active:s,hostId:t.hostId,id:n,kind:`pending-worktree`,pinned:r,title:t.label}),CPX_rowDataAttributes)",
|
|
370
|
+
"pending worktree sidebar row data attributes merge anchor",
|
|
371
|
+
);
|
|
372
|
+
patched = replaceOnce(
|
|
373
|
+
patched,
|
|
374
|
+
"dataAttributes:ae.sidebarThreadRow({active:s,hostId:null,id:t,kind:`remote`,pinned:r,title:e.task.title??``})",
|
|
375
|
+
"dataAttributes:CPX_mergeDataAttributes(ae.sidebarThreadRow({active:s,hostId:null,id:t,kind:`remote`,pinned:r,title:e.task.title??``}),CPX_rowDataAttributes)",
|
|
376
|
+
"remote sidebar row data attributes merge anchor",
|
|
377
|
+
);
|
|
378
|
+
patched = replaceOnce(
|
|
379
|
+
patched,
|
|
380
|
+
"dataAttributes:ae.sidebarThreadRow({active:s,hostId:f,id:i,kind:`local`,pinned:r,title:x})",
|
|
381
|
+
"dataAttributes:CPX_mergeDataAttributes(ae.sidebarThreadRow({active:s,hostId:f,id:i,kind:`local`,pinned:r,title:x}),CPX_rowDataAttributes)",
|
|
382
|
+
"local sidebar row data attributes merge anchor",
|
|
383
|
+
);
|
|
384
|
+
patched = replaceOnce(
|
|
385
|
+
patched,
|
|
386
|
+
"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]",
|
|
387
|
+
"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]",
|
|
388
|
+
"pending worktree sidebar row data attributes memo write anchor",
|
|
389
|
+
);
|
|
390
|
+
patched = replaceOnce(
|
|
391
|
+
patched,
|
|
392
|
+
"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?",
|
|
393
|
+
"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?",
|
|
394
|
+
"remote sidebar row data attributes memo dependency anchor",
|
|
395
|
+
);
|
|
396
|
+
patched = replaceOnce(
|
|
397
|
+
patched,
|
|
398
|
+
"t[63]=W,t[64]=Xe,t[65]=et,t[66]=H,t[67]=U,t[68]=ht):ht=t[68]",
|
|
399
|
+
"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]",
|
|
400
|
+
"remote sidebar row data attributes memo write anchor",
|
|
401
|
+
);
|
|
402
|
+
patched = replaceOnce(
|
|
403
|
+
patched,
|
|
404
|
+
"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?",
|
|
405
|
+
"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?",
|
|
406
|
+
"local sidebar row data attributes memo dependency anchor",
|
|
407
|
+
);
|
|
408
|
+
patched = replaceOnce(
|
|
409
|
+
patched,
|
|
410
|
+
"t[108]=H,t[109]=be,t[110]=U,t[111]=vt):vt=t[111]",
|
|
411
|
+
"t[108]=H,t[109]=be,t[110]=U,t[123]=CPX_rowDataAttributes,t[111]=vt):vt=t[111]",
|
|
412
|
+
"local sidebar row data attributes memo write anchor",
|
|
413
|
+
);
|
|
414
|
+
patched = replaceOnce(
|
|
415
|
+
patched,
|
|
416
|
+
"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?",
|
|
417
|
+
"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?",
|
|
418
|
+
"thread list row options data attributes memo dependency anchor",
|
|
419
|
+
);
|
|
420
|
+
patched = replaceOnce(
|
|
421
|
+
patched,
|
|
422
|
+
"showPinActionOnHover:l?.showPinActionOnHover,variant:l?.variant,shortcutLabel:b?.get(e)}),",
|
|
423
|
+
"showPinActionOnHover:l?.showPinActionOnHover,variant:l?.variant,shortcutLabel:b?.get(e),dataAttributes:l?.dataAttributes}),",
|
|
424
|
+
"thread list row options data attributes prop anchor",
|
|
425
|
+
);
|
|
426
|
+
patched = replaceOnce(
|
|
427
|
+
patched,
|
|
428
|
+
"t[24]=l?.variant,t[25]=b,t[26]=j):j=t[26]",
|
|
429
|
+
"t[24]=l?.variant,t[25]=b,t[43]=l?.dataAttributes,t[26]=j):j=t[26]",
|
|
430
|
+
"thread list row options data attributes memo write anchor",
|
|
431
|
+
);
|
|
432
|
+
return replaceOnce(
|
|
433
|
+
patched,
|
|
434
|
+
"function Rn(e){let t=(0,zt.c)(43),",
|
|
435
|
+
"function Rn(e){let t=(0,zt.c)(44),",
|
|
436
|
+
"thread list memo cache size anchor",
|
|
437
|
+
);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
const codexPlusProjectColorHelpers = `
|
|
441
|
+
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();
|
|
442
|
+
`;
|
|
443
|
+
|
|
444
|
+
const codexPlusSidebarNameBlurHelpers = `
|
|
445
|
+
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}
|
|
446
|
+
`;
|
|
447
|
+
|
|
223
448
|
const codexPlusUserBubbleSettingsHelpers = `
|
|
224
449
|
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\`})}
|
|
225
450
|
`;
|
|
226
451
|
|
|
227
|
-
|
|
452
|
+
const codexPlusProjectColorSettingsHelpers = `
|
|
453
|
+
${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\`})}
|
|
454
|
+
`;
|
|
455
|
+
|
|
456
|
+
function patchGeneralSettingsUserBubbleColors(text) {
|
|
228
457
|
let patched = replaceOnce(
|
|
229
458
|
text,
|
|
230
459
|
"function tn({showCodeFont:e,showTranslucentSidebarToggle:t,variant:n}){",
|
|
@@ -251,11 +480,38 @@ function patchGeneralSettings(text) {
|
|
|
251
480
|
);
|
|
252
481
|
}
|
|
253
482
|
|
|
483
|
+
function patchGeneralSettingsProjectColors(text) {
|
|
484
|
+
let patched = replaceOnce(
|
|
485
|
+
text,
|
|
486
|
+
"function tn({showCodeFont:e,showTranslucentSidebarToggle:t,variant:n}){",
|
|
487
|
+
`${codexPlusProjectColorSettingsHelpers}function tn({showCodeFont:e,showTranslucentSidebarToggle:t,variant:n}){`,
|
|
488
|
+
"project colors settings helper insertion anchor",
|
|
489
|
+
);
|
|
490
|
+
patched = replaceOnce(
|
|
491
|
+
patched,
|
|
492
|
+
"userBubble:{id:`settings.general.appearance.userMessageBubble.short`,defaultMessage:`User bubble`,description:`Short label for the user message bubble color input`},pointerCursors:",
|
|
493
|
+
"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:",
|
|
494
|
+
"project colors settings message anchor",
|
|
495
|
+
);
|
|
496
|
+
patched = replaceOnce(
|
|
497
|
+
patched,
|
|
498
|
+
"CPX_userBubbleLabel=i.formatMessage(Q.userBubble),u=i.formatMessage(Q.chromeThemeContrast),",
|
|
499
|
+
"CPX_userBubbleLabel=i.formatMessage(Q.userBubble),CPX_projectColorsLabel=i.formatMessage(Q.projectColors),u=i.formatMessage(Q.chromeThemeContrast),",
|
|
500
|
+
"project colors settings label anchor",
|
|
501
|
+
);
|
|
502
|
+
return replaceOnce(
|
|
503
|
+
patched,
|
|
504
|
+
"(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",
|
|
505
|
+
"(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",
|
|
506
|
+
"project colors settings row anchor",
|
|
507
|
+
);
|
|
508
|
+
}
|
|
509
|
+
|
|
254
510
|
const codexPlusUserBubbleHelpers = `
|
|
255
|
-
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
|
|
511
|
+
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();
|
|
256
512
|
`;
|
|
257
513
|
|
|
258
|
-
function
|
|
514
|
+
function patchUserMessageAttachmentsBubbleColors(text) {
|
|
259
515
|
let patched = replaceOnce(
|
|
260
516
|
text,
|
|
261
517
|
"var Z=i(),Q=e(n(),1),$=r();function Ue(e){",
|
|
@@ -276,18 +532,148 @@ function patchUserMessageAttachments(text) {
|
|
|
276
532
|
);
|
|
277
533
|
}
|
|
278
534
|
|
|
279
|
-
function
|
|
535
|
+
function patchUserMessageAttachmentsProjectColors(text) {
|
|
536
|
+
let patched = replaceOnce(
|
|
537
|
+
text,
|
|
538
|
+
'import{Aa as x,Ta as S}from"./src-C7fSIbpz.js";',
|
|
539
|
+
'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";',
|
|
540
|
+
"user bubble project assignment imports anchor",
|
|
541
|
+
);
|
|
542
|
+
patched = replaceOnce(
|
|
543
|
+
patched,
|
|
544
|
+
"const CPX_USER_BUBBLE_COLORS_KEY=`codex-plus:user-message-bubble-colors`,",
|
|
545
|
+
`${codexPlusProjectColorHelpers}const CPX_USER_BUBBLE_COLORS_KEY=\`codex-plus:user-message-bubble-colors\`,`,
|
|
546
|
+
"user bubble project color helper insertion anchor",
|
|
547
|
+
);
|
|
548
|
+
patched = replaceOnce(
|
|
549
|
+
patched,
|
|
550
|
+
"hasExternalAttachments:b,commentCount:ee,onEditMessage:x,threadId:S,turnId:w,cwd:T,hostId:k}=e,M=a===void 0?!1:a,",
|
|
551
|
+
"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,",
|
|
552
|
+
"user bubble project assignment style anchor",
|
|
553
|
+
);
|
|
554
|
+
return replaceOnce(
|
|
555
|
+
patched,
|
|
556
|
+
"\"data-user-message-bubble\":!0,\"data-codex-plus-user-bubble\":!0,role:H?`button`:void 0,",
|
|
557
|
+
"\"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,",
|
|
558
|
+
"user bubble project marker attribute anchor",
|
|
559
|
+
);
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
function patchComposerBubbleColors(text) {
|
|
280
563
|
let patched = replaceOnce(
|
|
281
564
|
text,
|
|
282
565
|
"function oh(e){let t=(0,$.c)(13),",
|
|
283
566
|
`${codexPlusUserBubbleHelpers}function oh(e){let t=(0,$.c)(13),`,
|
|
284
567
|
"composer user bubble helper insertion anchor",
|
|
285
568
|
);
|
|
569
|
+
patched = replaceOnce(
|
|
570
|
+
patched,
|
|
571
|
+
"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}",
|
|
572
|
+
"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}",
|
|
573
|
+
"composer user entry marker render anchor",
|
|
574
|
+
);
|
|
575
|
+
return patched;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
function patchComposerProjectColors(text) {
|
|
579
|
+
let patched = replaceOnce(
|
|
580
|
+
text,
|
|
581
|
+
'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";',
|
|
582
|
+
'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";',
|
|
583
|
+
"composer project assignment imports anchor",
|
|
584
|
+
);
|
|
585
|
+
patched = replaceOnce(
|
|
586
|
+
patched,
|
|
587
|
+
"const CPX_USER_BUBBLE_COLORS_KEY=`codex-plus:user-message-bubble-colors`,",
|
|
588
|
+
`${codexPlusProjectColorHelpers}const CPX_USER_BUBBLE_COLORS_KEY=\`codex-plus:user-message-bubble-colors\`,`,
|
|
589
|
+
"composer project color helper insertion anchor",
|
|
590
|
+
);
|
|
591
|
+
patched = replaceOnce(
|
|
592
|
+
patched,
|
|
593
|
+
"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,",
|
|
594
|
+
"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,",
|
|
595
|
+
"composer surface style prop anchor",
|
|
596
|
+
);
|
|
597
|
+
patched = replaceOnce(
|
|
598
|
+
patched,
|
|
599
|
+
"Il=(0,Q.jsx)(_n,{onOpen:()=>{Bc.prepare(),X.toggleContextSuggestions()}});return",
|
|
600
|
+
"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",
|
|
601
|
+
"composer project style hook-safe caller anchor",
|
|
602
|
+
);
|
|
603
|
+
patched = replaceOnce(
|
|
604
|
+
patched,
|
|
605
|
+
"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}",
|
|
606
|
+
"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}",
|
|
607
|
+
"composer project entry styled render anchor",
|
|
608
|
+
);
|
|
609
|
+
return replaceOnce(
|
|
610
|
+
patched,
|
|
611
|
+
"):(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:",
|
|
612
|
+
"):(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:",
|
|
613
|
+
"composer project accent style caller anchor",
|
|
614
|
+
);
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
function patchElectronMenuShortcuts(text) {
|
|
618
|
+
return replaceOnce(
|
|
619
|
+
text,
|
|
620
|
+
"{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`,",
|
|
621
|
+
"{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`,",
|
|
622
|
+
"sidebar blur command palette metadata anchor",
|
|
623
|
+
);
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
function patchKeyboardShortcutsSearchInput(text) {
|
|
627
|
+
let patched = replaceOnce(
|
|
628
|
+
text,
|
|
629
|
+
"\"codex.command.toggleSidebar\":{id:`codex.command.toggleSidebar`,defaultMessage:`Toggle sidebar`,description:`Command menu item to toggle the sidebar`},\"codex.command.toggleBottomPanel\":",
|
|
630
|
+
"\"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\":",
|
|
631
|
+
"sidebar blur command title intl message anchor",
|
|
632
|
+
);
|
|
633
|
+
patched = replaceOnce(
|
|
634
|
+
patched,
|
|
635
|
+
"\"codex.commandMenuTitle.toggleSidebar\":{id:`codex.commandMenuTitle.toggleSidebar`,defaultMessage:`Toggle Sidebar`,description:`Native menu item to toggle the sidebar`},\"codex.commandMenuTitle.toggleBottomPanel\":",
|
|
636
|
+
"\"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\":",
|
|
637
|
+
"sidebar blur command menu title intl message anchor",
|
|
638
|
+
);
|
|
286
639
|
return replaceOnce(
|
|
287
640
|
patched,
|
|
288
|
-
"
|
|
289
|
-
"
|
|
290
|
-
"
|
|
641
|
+
"\"codex.commandDescription.toggleSidebar\":{id:`codex.commandDescription.toggleSidebar`,defaultMessage:`Show or hide the sidebar`,description:`Description for the Toggle sidebar command`},\"codex.commandDescription.toggleBottomPanel\":",
|
|
642
|
+
"\"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\":",
|
|
643
|
+
"sidebar blur command description intl message anchor",
|
|
644
|
+
);
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
function patchLocalTaskRow(text) {
|
|
648
|
+
let patched = replaceOnce(
|
|
649
|
+
text,
|
|
650
|
+
"function fn(e){let t=(0,K.c)(124),",
|
|
651
|
+
`${codexPlusProjectColorHelpers}function fn(e){let t=(0,K.c)(124),`,
|
|
652
|
+
"local task row project color helper insertion anchor",
|
|
653
|
+
);
|
|
654
|
+
patched = replaceOnce(
|
|
655
|
+
patched,
|
|
656
|
+
"threadSummary:Ne,dataAttributes:Fe}=e,Ie=g===void 0?!1:g,",
|
|
657
|
+
"threadSummary:Ne,dataAttributes:Fe}=e,CPX_rowDataAttributes=Fe??CPX_projectColorDataAttributes(Oe,!0),Ie=g===void 0?!1:g,",
|
|
658
|
+
"local task row project assignment anchor",
|
|
659
|
+
);
|
|
660
|
+
patched = replaceOnce(
|
|
661
|
+
patched,
|
|
662
|
+
"t[87]!==Fe",
|
|
663
|
+
"t[87]!==CPX_rowDataAttributes",
|
|
664
|
+
"local task row memo dependency anchor",
|
|
665
|
+
);
|
|
666
|
+
patched = replaceOnce(
|
|
667
|
+
patched,
|
|
668
|
+
"dataAttributes:Fe,archiveAriaLabel:hn",
|
|
669
|
+
"dataAttributes:CPX_rowDataAttributes,archiveAriaLabel:hn",
|
|
670
|
+
"local task row data attributes anchor",
|
|
671
|
+
);
|
|
672
|
+
return replaceOnce(
|
|
673
|
+
patched,
|
|
674
|
+
"t[87]=Fe",
|
|
675
|
+
"t[87]=CPX_rowDataAttributes",
|
|
676
|
+
"local task row memo assignment anchor",
|
|
291
677
|
);
|
|
292
678
|
}
|
|
293
679
|
|
|
@@ -320,14 +706,36 @@ module.exports = {
|
|
|
320
706
|
},
|
|
321
707
|
{
|
|
322
708
|
id: "diagnostic-error-boundary",
|
|
323
|
-
fileTransforms: [
|
|
709
|
+
fileTransforms: [
|
|
710
|
+
[appShellFile, patchAppShell],
|
|
711
|
+
[errorBoundaryFile, patchErrorBoundary],
|
|
712
|
+
],
|
|
324
713
|
},
|
|
325
714
|
{
|
|
326
715
|
id: "user-message-bubble-colors",
|
|
327
716
|
fileTransforms: [
|
|
328
|
-
[generalSettingsFile,
|
|
329
|
-
[userMessageAttachmentsFile,
|
|
330
|
-
[composerFile,
|
|
717
|
+
[generalSettingsFile, patchGeneralSettingsUserBubbleColors],
|
|
718
|
+
[userMessageAttachmentsFile, patchUserMessageAttachmentsBubbleColors],
|
|
719
|
+
[composerFile, patchComposerBubbleColors],
|
|
720
|
+
],
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
id: "project-colors",
|
|
724
|
+
fileTransforms: [
|
|
725
|
+
[appMainFile, patchAppMainProjectColors],
|
|
726
|
+
[generalSettingsFile, patchGeneralSettingsProjectColors],
|
|
727
|
+
[sidebarProjectHoverCardSourceRowsFile, patchSidebarProjectHoverCardSourceRows],
|
|
728
|
+
[localTaskRowFile, patchLocalTaskRow],
|
|
729
|
+
[userMessageAttachmentsFile, patchUserMessageAttachmentsProjectColors],
|
|
730
|
+
[composerFile, patchComposerProjectColors],
|
|
731
|
+
],
|
|
732
|
+
},
|
|
733
|
+
{
|
|
734
|
+
id: "sidebar-name-blur",
|
|
735
|
+
fileTransforms: [
|
|
736
|
+
[appMainFile, patchAppMainSidebarBlur],
|
|
737
|
+
[electronMenuShortcutsFile, patchElectronMenuShortcuts],
|
|
738
|
+
[keyboardShortcutsSearchInputFile, patchKeyboardShortcutsSearchInput],
|
|
331
739
|
],
|
|
332
740
|
},
|
|
333
741
|
],
|