codex-plus-patcher 0.7.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/cli.js +6 -0
- package/src/core/asar.js +6 -4
- package/src/core/dev-mode.js +69 -4
- package/src/core/plugin-audit.js +461 -13
- package/src/patches/26.623.31921-4452.js +45 -0
- package/src/patches/26.623.42026-4514.js +44 -0
- package/src/patches/index.js +4 -0
- package/src/patches/lib/common-patches.js +531 -2
- package/src/patches/lib/project-selector-shortcut-patch.js +130 -2
- package/src/runtime/host/projectSelector.js +7 -2
- package/src/runtime/plugins/projectColors.js +2 -0
- package/src/runtime/plugins/projectSelectorShortcut.js +27 -12
- package/src/runtime/plugins/userBubbleColors.js +4 -0
|
@@ -46,6 +46,7 @@ function buildCodexPlusPatchSet(config) {
|
|
|
46
46
|
const mermaidDiagramShellFile = files.mermaidDiagramShell;
|
|
47
47
|
const electronMenuShortcutsFile = files.electronMenuShortcuts;
|
|
48
48
|
const keyboardShortcutsSearchInputFile = files.keyboardShortcutsSearchInput;
|
|
49
|
+
const keyboardShortcutsTitleFallbackFile = files.keyboardShortcutsTitleFallback || keyboardShortcutsSearchInputFile;
|
|
49
50
|
const statsigStartupFile = files.statsigStartup;
|
|
50
51
|
const srcFile = files.src;
|
|
51
52
|
const sidebarThreadKeysFile = files.sidebarThreadKeys;
|
|
@@ -57,6 +58,22 @@ function patchTitle(text) {
|
|
|
57
58
|
}
|
|
58
59
|
|
|
59
60
|
function patchDevModeStatsigFallback(text) {
|
|
61
|
+
if (text.includes("function q1(e){let t=(0,i0.c)(27),")) {
|
|
62
|
+
return replaceOnce(
|
|
63
|
+
text,
|
|
64
|
+
"function q1(e){let t=(0,i0.c)(27),{auth:n,appVersion:r,currentAccount:i,hostBuildFlavor:a,plan:o,statsigClientKey:s,systemName:c,systemVersion:l,children:u}=e,d=o===void 0?null:o,f=s===void 0?qre:s,p,m,h;if",
|
|
65
|
+
"function q1(e){let t=(0,i0.c)(27),{auth:n,appVersion:r,currentAccount:i,hostBuildFlavor:a,plan:o,statsigClientKey:s,systemName:c,systemVersion:l,children:u}=e,d=o===void 0?null:o,f=s===void 0?qre:s,p,m,h;if(window.__CodexPlusRuntimeConfig?.devModeStatsigFallback)return u;if",
|
|
66
|
+
"dev mode statsig fallback anchor",
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
if (text.includes("function XY(e){let t=(0,sX.c)(27),")) {
|
|
70
|
+
return replaceOnce(
|
|
71
|
+
text,
|
|
72
|
+
"function XY(e){let t=(0,sX.c)(27),{auth:n,appVersion:r,currentAccount:i,hostBuildFlavor:a,plan:o,statsigClientKey:s,systemName:c,systemVersion:l,children:u}=e,d=o===void 0?null:o,f=s===void 0?OY:s,p,m,h;if",
|
|
73
|
+
"function XY(e){let t=(0,sX.c)(27),{auth:n,appVersion:r,currentAccount:i,hostBuildFlavor:a,plan:o,statsigClientKey:s,systemName:c,systemVersion:l,children:u}=e,d=o===void 0?null:o,f=s===void 0?OY:s,p,m,h;if(window.__CodexPlusRuntimeConfig?.devModeStatsigFallback)return u;if",
|
|
74
|
+
"dev mode statsig fallback anchor",
|
|
75
|
+
);
|
|
76
|
+
}
|
|
60
77
|
return replaceOnce(
|
|
61
78
|
text,
|
|
62
79
|
"function Ske(e){let t=(0,J1.c)(27),{auth:n,appVersion:r,currentAccount:i,hostBuildFlavor:a,plan:o,statsigClientKey:s,systemName:c,systemVersion:l,children:u}=e,d=o===void 0?null:o,f=s===void 0?F1:s,p,m,h;if",
|
|
@@ -72,6 +89,58 @@ function patchAboutDialog(text, context = {}) {
|
|
|
72
89
|
sourceAsarSha256: context.sourceAsarSha256 || "unknown",
|
|
73
90
|
appliedPatches: context.appliedPatches || [],
|
|
74
91
|
};
|
|
92
|
+
if (text.includes("function $4({appDisplayName:e,buildInfoLabel:t,buildInfoText:n,iconDataUrl:r,isDark:i,okLabel:a,title:o})")) {
|
|
93
|
+
let patched = replaceOnce(
|
|
94
|
+
text,
|
|
95
|
+
"let i=a.app.getName(),o=a.app.getVersion()",
|
|
96
|
+
`let CPXAbout=${aboutMetadataRequire()}.aboutPayload(${JSON.stringify(aboutContext)}),i=CPXAbout.appDisplayName,o=a.app.getVersion()`,
|
|
97
|
+
"about dialog app name anchor",
|
|
98
|
+
);
|
|
99
|
+
patched = replaceOnce(
|
|
100
|
+
patched,
|
|
101
|
+
"g=d.formatMessage({messageId:L4,defaultMessage:R4}),_=J4(o),v=_.length===0?h:[h,``,..._].join(`\n`),",
|
|
102
|
+
"g=d.formatMessage({messageId:L4,defaultMessage:R4}),_=CPXAbout.buildInfoLines,v=_.length===0?h:[h,``,..._].join(`\n`),",
|
|
103
|
+
"about dialog build information anchor",
|
|
104
|
+
);
|
|
105
|
+
patched = replaceOnce(
|
|
106
|
+
patched,
|
|
107
|
+
"$4({appDisplayName:i,buildInfoLabel:g,buildInfoText:v,iconDataUrl:f.htmlIconDataUrl,isDark:b,okLabel:m,title:p})",
|
|
108
|
+
"$4({appDisplayName:i,buildInfoLabel:g,buildInfoText:v,codexPlusDisclaimerHeading:CPXAbout.disclaimerHeading,codexPlusDisclaimerBody:CPXAbout.disclaimerBody,iconDataUrl:f.htmlIconDataUrl,isDark:b,okLabel:m,title:p})",
|
|
109
|
+
"about dialog renderer call anchor",
|
|
110
|
+
);
|
|
111
|
+
patched = replaceOnce(
|
|
112
|
+
patched,
|
|
113
|
+
"function $4({appDisplayName:e,buildInfoLabel:t,buildInfoText:n,iconDataUrl:r,isDark:i,okLabel:a,title:o}){let s=r==null?``:",
|
|
114
|
+
"function $4({appDisplayName:e,buildInfoLabel:t,buildInfoText:n,codexPlusDisclaimerHeading:D,codexPlusDisclaimerBody:O,iconDataUrl:r,isDark:i,okLabel:a,title:o}){let CPXAboutMetadata=" +
|
|
115
|
+
aboutMetadataRequire() +
|
|
116
|
+
",q=CPXAboutMetadata.disclaimerMarkup({escape:sV.default,heading:D,body:O}),s=r==null?``:",
|
|
117
|
+
"about dialog renderer signature anchor",
|
|
118
|
+
);
|
|
119
|
+
patched = replaceOnce(
|
|
120
|
+
patched,
|
|
121
|
+
" .build-info {\n width: 100%;\n margin: 0;\n line-height: 1.45;",
|
|
122
|
+
"${CPXAboutMetadata.disclaimerStyles()}\n\n .build-info {\n width: 100%;\n margin: 0;\n line-height: 1.45;",
|
|
123
|
+
"about dialog disclaimer styles anchor",
|
|
124
|
+
);
|
|
125
|
+
patched = replaceOnce(
|
|
126
|
+
patched,
|
|
127
|
+
" color: var(--muted-text);\n white-space: pre-wrap;",
|
|
128
|
+
" color: var(--muted-text);\n text-align: left;\n white-space: pre-wrap;",
|
|
129
|
+
"about dialog build info left align anchor",
|
|
130
|
+
);
|
|
131
|
+
patched = replaceOnce(
|
|
132
|
+
patched,
|
|
133
|
+
" .app-name,\n .build-info,\n .copyright {",
|
|
134
|
+
" .app-name,\n .codex-plus-disclaimer,\n .build-info,\n .copyright {",
|
|
135
|
+
"about dialog selectable disclaimer anchor",
|
|
136
|
+
);
|
|
137
|
+
return replaceOnce(
|
|
138
|
+
patched,
|
|
139
|
+
' <div class="app-name" id="app-name">${(0,sV.default)(e)}</div>\n <pre class="build-info" aria-label="${(0,sV.default)(t)}">${(0,sV.default)(n)}</pre>',
|
|
140
|
+
' <div class="app-name" id="app-name">${(0,sV.default)(e)}</div>\n ${q}\n <pre class="build-info" aria-label="${(0,sV.default)(t)}">${(0,sV.default)(n)}</pre>',
|
|
141
|
+
"about dialog disclaimer insertion anchor",
|
|
142
|
+
);
|
|
143
|
+
}
|
|
75
144
|
if (text.includes("function Q4({appDisplayName:e,buildInfoLabel:t,buildInfoText:n,iconDataUrl:r,isDark:i,okLabel:a,title:o})")) {
|
|
76
145
|
let patched = replaceOnce(
|
|
77
146
|
text,
|
|
@@ -230,6 +299,20 @@ function patchWorker(text) {
|
|
|
230
299
|
}
|
|
231
300
|
|
|
232
301
|
function patchThreadSidePanelTabs(text) {
|
|
302
|
+
if (text.includes("function mQe(e){let t=(0,hQe.c)(20),{diffMode:n,setTabState:r,tabState:i}=e")) {
|
|
303
|
+
let patched = replaceOnce(
|
|
304
|
+
text,
|
|
305
|
+
"function mQe(e){let t=(0,hQe.c)(20),{diffMode:n,setTabState:r,tabState:i}=e",
|
|
306
|
+
`${reviewHook("[tR,eR,B,X,Z,jw,Mw,Ow,null,fu,ze,JZe,za,Ia,null,null,null,null,null,null,null]")}function mQe(e){let t=(0,hQe.c)(20),{diffMode:n,setTabState:r,tabState:i}=e`,
|
|
307
|
+
"review host hook insertion anchor",
|
|
308
|
+
);
|
|
309
|
+
return replaceOnce(
|
|
310
|
+
patched,
|
|
311
|
+
"_=(0,tR.jsx)(JZe,{diffMode:n,diffRefs:u,isFileTreeOpen:s,isReviewExpanded:p,setTabState:r,setScrollContainerRef:h,tabState:i}),t[9]=n,t[10]=u,t[11]=s,t[12]=p,t[13]=h,t[14]=r,t[15]=i,t[16]=_):_=t[16];",
|
|
312
|
+
"_=(0,tR.jsx)(CPXRM,{mainReviewContent:(0,tR.jsx)(JZe,{diffMode:n,diffRefs:u,isFileTreeOpen:s,isReviewExpanded:p,setTabState:r,setScrollContainerRef:h,tabState:i}),diffMode:n,setTabState:r,tabState:i}),t[9]=n,t[10]=u,t[11]=s,t[12]=p,t[13]=h,t[14]=r,t[15]=i,t[16]=_):_=t[16];",
|
|
313
|
+
"review body mux anchor",
|
|
314
|
+
);
|
|
315
|
+
}
|
|
233
316
|
if (text.includes("function oDn(e){let t=(0,sDn.c)(14),{expandedActionsPortalTarget:n,setTabState:r,tabState:i}=e")) {
|
|
234
317
|
let patched = replaceOnce(
|
|
235
318
|
text,
|
|
@@ -244,6 +327,20 @@ function patchThreadSidePanelTabs(text) {
|
|
|
244
327
|
"review body mux anchor",
|
|
245
328
|
);
|
|
246
329
|
}
|
|
330
|
+
if (text.includes("function WPe(e){let t=(0,xN.c)(14),{expandedActionsPortalTarget:n,setTabState:r,tabState:i}=e")) {
|
|
331
|
+
let patched = replaceOnce(
|
|
332
|
+
text,
|
|
333
|
+
"function WPe(e){let t=(0,xN.c)(14),{expandedActionsPortalTarget:n,setTabState:r,tabState:i}=e",
|
|
334
|
+
`${reviewHook("[SN,typeof VE!==`undefined`?VE:null,Ie,Y,xn,null,null,null,null,null,ce,xje,null,null,null,null,null,null,null,null,null]")}function WPe(e){let t=(0,xN.c)(14),{expandedActionsPortalTarget:n,setTabState:r,tabState:i}=e`,
|
|
335
|
+
"review host hook insertion anchor",
|
|
336
|
+
);
|
|
337
|
+
return replaceOnce(
|
|
338
|
+
patched,
|
|
339
|
+
"let s;t[1]!==a||t[2]!==r||t[3]!==i?(s=(0,SN.jsx)(xje,{diffMode:a,setTabState:r,tabState:i}),t[1]=a,t[2]=r,t[3]=i,t[4]=s):s=t[4];",
|
|
340
|
+
"let s;t[1]!==a||t[2]!==r||t[3]!==i?(s=(0,SN.jsx)(CPXRM,{mainReviewContent:(0,SN.jsx)(xje,{diffMode:a,setTabState:r,tabState:i}),diffMode:a,setTabState:r,tabState:i}),t[1]=a,t[2]=r,t[3]=i,t[4]=s):s=t[4];",
|
|
341
|
+
"review body mux anchor",
|
|
342
|
+
);
|
|
343
|
+
}
|
|
247
344
|
let patched = replaceOnce(
|
|
248
345
|
text,
|
|
249
346
|
"import{r as vi,t as yi}from\"./dropdown-CTBRoADH.js\";",
|
|
@@ -264,6 +361,40 @@ function patchThreadSidePanelTabs(text) {
|
|
|
264
361
|
);
|
|
265
362
|
}
|
|
266
363
|
function patchAppShell(text) {
|
|
364
|
+
if (text.includes("function Sie(){let e=(0,hj.c)(3),t,n;")) {
|
|
365
|
+
let patched = replaceOnce(
|
|
366
|
+
text,
|
|
367
|
+
"function Sie(){let e=(0,hj.c)(3),t,n;",
|
|
368
|
+
`${diagnosticDetailsHook()}function Sie(){let e=(0,hj.c)(3),t,n;`,
|
|
369
|
+
"app shell error fallback prop anchor",
|
|
370
|
+
);
|
|
371
|
+
return replaceOnce(
|
|
372
|
+
patched,
|
|
373
|
+
"children:[t,n,(0,gj.jsx)(Le,{onClick:Cie,children:(0,gj.jsx)(X,{id:`codex.errorBoundary.goHome`,defaultMessage:`Try again`,description:`Button label to navigate to the home page after an error`})})]",
|
|
374
|
+
"children:[t,n,CPXDiagnosticDetails({jsx:gj.jsx,error:null}),(0,gj.jsx)(Le,{onClick:Cie,children:(0,gj.jsx)(X,{id:`codex.errorBoundary.goHome`,defaultMessage:`Try again`,description:`Button label to navigate to the home page after an error`})})]",
|
|
375
|
+
"app shell error detail insertion anchor",
|
|
376
|
+
);
|
|
377
|
+
}
|
|
378
|
+
if (text.includes("function QUe(e){let t=(0,NP.c)(4),{onRetry:n}=e,")) {
|
|
379
|
+
let patched = replaceOnce(
|
|
380
|
+
text,
|
|
381
|
+
"function QUe(e){let t=(0,NP.c)(4),{onRetry:n}=e,",
|
|
382
|
+
`${diagnosticDetailsHook()}function QUe(e){let t=(0,NP.c)(4),{onRetry:n,error:CPX_error}=e,`,
|
|
383
|
+
"app shell error fallback prop anchor",
|
|
384
|
+
);
|
|
385
|
+
patched = replaceOnce(
|
|
386
|
+
patched,
|
|
387
|
+
"children:[r,(0,FP.jsx)(za,{color:`secondary`,size:`default`,onClick:n,children:i})]",
|
|
388
|
+
"children:[r,CPXDiagnosticDetails({jsx:FP.jsx,error:CPX_error}),(0,FP.jsx)(za,{color:`secondary`,size:`default`,onClick:n,children:i})]",
|
|
389
|
+
"app shell error detail insertion anchor",
|
|
390
|
+
);
|
|
391
|
+
return replaceOnce(
|
|
392
|
+
patched,
|
|
393
|
+
"fallback:e=>(0,FP.jsx)(QUe,{onRetry:()=>{e.resetError()}})",
|
|
394
|
+
"fallback:e=>(0,FP.jsx)(QUe,{error:e.error,onRetry:()=>{e.resetError()}})",
|
|
395
|
+
"app shell boundary error prop anchor",
|
|
396
|
+
);
|
|
397
|
+
}
|
|
267
398
|
if (text.includes("function xdn(e){let t=(0,Cdn.c)(4),{onRetry:n}=e")) {
|
|
268
399
|
let patched = replaceOnce(
|
|
269
400
|
text,
|
|
@@ -300,6 +431,15 @@ function patchAppShell(text) {
|
|
|
300
431
|
}
|
|
301
432
|
|
|
302
433
|
function patchErrorBoundary(text) {
|
|
434
|
+
if (text.includes("function Sie(){let e=(0,hj.c)(3),t,n;") && text.includes("CPXDiagnosticDetails({jsx:gj.jsx,error:null})")) {
|
|
435
|
+
return text;
|
|
436
|
+
}
|
|
437
|
+
if (
|
|
438
|
+
!text.includes("function Xf(e){let t=(0,Vf.c)(9),{resetError:n}=e,r=ee(),i,a;") &&
|
|
439
|
+
text.includes("function QUe(e){let t=(0,NP.c)(4),{onRetry:n,error:CPX_error}=e,")
|
|
440
|
+
) {
|
|
441
|
+
return text;
|
|
442
|
+
}
|
|
303
443
|
if (
|
|
304
444
|
!text.includes("function Xf(e){let t=(0,Vf.c)(9),{resetError:n}=e,r=ee(),i,a;") &&
|
|
305
445
|
text.includes("function xdn(e){let t=(0,Cdn.c)(")
|
|
@@ -327,6 +467,49 @@ function patchErrorBoundary(text) {
|
|
|
327
467
|
}
|
|
328
468
|
|
|
329
469
|
function patchAppMainProjectColors(text) {
|
|
470
|
+
if (text.includes("function SV(e){let t=(0,EV.c)(57),") && text.includes("function nH(e){let t=(0,OH.c)(120),")) {
|
|
471
|
+
let patched = replaceOnce(
|
|
472
|
+
text,
|
|
473
|
+
"function SV(e){let t=(0,EV.c)(57),",
|
|
474
|
+
`${projectColorHook()}function SV(e){let t=(0,EV.c)(57),`,
|
|
475
|
+
"project color app main helper insertion anchor",
|
|
476
|
+
);
|
|
477
|
+
patched = replaceOnce(
|
|
478
|
+
patched,
|
|
479
|
+
"O=yl.sidebarProjectRow({collapsed:a,label:p,projectId:_})",
|
|
480
|
+
"O={...yl.sidebarProjectRow({collapsed:a,label:p,projectId:_}),...CPXPR({projectId:_,label:p})}",
|
|
481
|
+
"project header row color attributes anchor",
|
|
482
|
+
);
|
|
483
|
+
return replaceOnce(
|
|
484
|
+
patched,
|
|
485
|
+
"ne=(0,Z.jsx)(`div`,{...R,children:te})",
|
|
486
|
+
"ne=(0,Z.jsx)(`div`,{...R,...CPXPR(a),children:te})",
|
|
487
|
+
"project group color render anchor",
|
|
488
|
+
);
|
|
489
|
+
}
|
|
490
|
+
if (
|
|
491
|
+
text.includes("function Vm(e){let t=(0,Gm.c)(57),") &&
|
|
492
|
+
text.includes("return t[41]!==Y||t[42]!==H?(ne=(0,$.jsx)(`div`,{...H,children:Y})")
|
|
493
|
+
) {
|
|
494
|
+
let patched = replaceOnce(
|
|
495
|
+
text,
|
|
496
|
+
"function Vm(e){let t=(0,Gm.c)(57),",
|
|
497
|
+
`${projectColorHook()}function Vm(e){let t=(0,Gm.c)(57),`,
|
|
498
|
+
"project color app main helper insertion anchor",
|
|
499
|
+
);
|
|
500
|
+
patched = replaceOnce(
|
|
501
|
+
patched,
|
|
502
|
+
"q=(0,Km.jsxs)(`div`,{...v,...O,ref:n,className:j,role:`button`,",
|
|
503
|
+
"q=(0,Km.jsxs)(`div`,{...v,...O,...CPXPR({projectId:_,label:p}),ref:n,className:j,role:`button`,",
|
|
504
|
+
"project header row color attributes anchor",
|
|
505
|
+
);
|
|
506
|
+
return replaceOnce(
|
|
507
|
+
patched,
|
|
508
|
+
"ne=(0,$.jsx)(`div`,{...H,children:Y})",
|
|
509
|
+
"ne=(0,$.jsx)(`div`,{...H,...CPXPR(a),children:Y})",
|
|
510
|
+
"project group color render anchor",
|
|
511
|
+
);
|
|
512
|
+
}
|
|
330
513
|
if (text.includes("function gg(e){let t=(0,Rg.c)(44),{threadKeys:n,")) {
|
|
331
514
|
let patched = replaceOnce(
|
|
332
515
|
text,
|
|
@@ -375,6 +558,22 @@ function patchAppMainProjectColors(text) {
|
|
|
375
558
|
}
|
|
376
559
|
|
|
377
560
|
function patchAppMainSidebarBlur(text) {
|
|
561
|
+
if (text.includes("function SV(e){let t=(0,EV.c)(57),")) {
|
|
562
|
+
return replaceOnce(
|
|
563
|
+
text,
|
|
564
|
+
"V=(0,DV.jsx)(`span`,{className:`min-w-0 truncate pr-1`,children:p})",
|
|
565
|
+
"V=(0,DV.jsx)(`span`,{\"data-codex-plus-sidebar-name\":``,className:`min-w-0 truncate pr-1`,children:p})",
|
|
566
|
+
"project header sidebar blur label anchor",
|
|
567
|
+
);
|
|
568
|
+
}
|
|
569
|
+
if (text.includes("function vh(e){let t=(0,qh.c)(15),")) {
|
|
570
|
+
return replaceOnce(
|
|
571
|
+
text,
|
|
572
|
+
"c=(0,$.jsx)(`span`,{className:`min-w-0 truncate pr-1`,children:n})",
|
|
573
|
+
"c=(0,$.jsx)(`span`,{\"data-codex-plus-sidebar-name\":``,className:`min-w-0 truncate pr-1`,children:n})",
|
|
574
|
+
"project header sidebar blur label anchor",
|
|
575
|
+
);
|
|
576
|
+
}
|
|
378
577
|
if (!text.includes("openFolder:$y,toggleSidebar:$i,toggleTerminal:Md,")) {
|
|
379
578
|
return replaceOnce(
|
|
380
579
|
text,
|
|
@@ -405,6 +604,52 @@ function patchAppMainSidebarBlur(text) {
|
|
|
405
604
|
}
|
|
406
605
|
|
|
407
606
|
function patchHeader(text) {
|
|
607
|
+
if (
|
|
608
|
+
text.includes("function Jn(e){let t=(0,$n.c)(66),") &&
|
|
609
|
+
text.includes("(0,$.jsx)(L,{color:`ghostActive`,type:`button`,onClick:u,")
|
|
610
|
+
) {
|
|
611
|
+
let patched = replaceOnce(
|
|
612
|
+
text,
|
|
613
|
+
"function Jn(e){let t=(0,$n.c)(66),",
|
|
614
|
+
`${threadHeaderHook()}function Jn(e){let t=(0,$n.c)(66),`,
|
|
615
|
+
"thread header accessory helper insertion anchor",
|
|
616
|
+
);
|
|
617
|
+
patched = replaceOnce(
|
|
618
|
+
patched,
|
|
619
|
+
"let x;t[35]!==c||t[36]!==g||t[37]!==i?",
|
|
620
|
+
"let CPX_headerContext={cwd:null,hostId:null,header:{surface:`header`,titleText:typeof i==`string`?i:null}},CPX_headerAccessories=CPXThreadHeaderAccessories({context:CPX_headerContext,deps:{jsx:$.jsx,jsxs:$.jsxs,Tooltip:re}});let x;t[35]!==c||t[36]!==g||t[37]!==i?",
|
|
621
|
+
"thread header accessory context anchor",
|
|
622
|
+
);
|
|
623
|
+
return replaceOnce(
|
|
624
|
+
patched,
|
|
625
|
+
"children:(0,$.jsx)(`span`,{className:`truncate`,children:i})})]}):",
|
|
626
|
+
"children:(0,$.jsx)(`span`,{className:`truncate`,children:i})}),CPX_headerAccessories]}):",
|
|
627
|
+
"thread header accessory render anchor",
|
|
628
|
+
);
|
|
629
|
+
}
|
|
630
|
+
if (
|
|
631
|
+
text.includes("function Jn(e){let t=(0,$n.c)(66),") &&
|
|
632
|
+
text.includes("(0,$.jsx)(l,{color:`ghostActive`,type:`button`,onClick:p,")
|
|
633
|
+
) {
|
|
634
|
+
let patched = replaceOnce(
|
|
635
|
+
text,
|
|
636
|
+
"function Jn(e){let t=(0,$n.c)(66),",
|
|
637
|
+
`${threadHeaderHook()}function Jn(e){let t=(0,$n.c)(66),`,
|
|
638
|
+
"thread header accessory helper insertion anchor",
|
|
639
|
+
);
|
|
640
|
+
patched = replaceOnce(
|
|
641
|
+
patched,
|
|
642
|
+
"let w;t[35]!==u||t[36]!==y||t[37]!==i?",
|
|
643
|
+
"let CPX_headerContext={cwd:null,hostId:null,header:{surface:`header`,titleText:typeof i==`string`?i:null}},CPX_headerAccessories=CPXThreadHeaderAccessories({context:CPX_headerContext,deps:{jsx:$.jsx,jsxs:$.jsxs}});let w;t[35]!==u||t[36]!==y||t[37]!==i?",
|
|
644
|
+
"thread header accessory context anchor",
|
|
645
|
+
);
|
|
646
|
+
return replaceOnce(
|
|
647
|
+
patched,
|
|
648
|
+
"children:(0,$.jsx)(`span`,{className:`truncate`,children:i})})]}):",
|
|
649
|
+
"children:(0,$.jsx)(`span`,{className:`truncate`,children:i})}),CPX_headerAccessories]}):",
|
|
650
|
+
"thread header accessory render anchor",
|
|
651
|
+
);
|
|
652
|
+
}
|
|
408
653
|
if (text.includes("function Jn(e){let t=(0,$n.c)(66),")) {
|
|
409
654
|
let patched = replaceOnce(
|
|
410
655
|
text,
|
|
@@ -476,7 +721,42 @@ function patchThreadPageHeader(text) {
|
|
|
476
721
|
}
|
|
477
722
|
|
|
478
723
|
function patchLocalConversationPageHeader(text) {
|
|
724
|
+
if (text.includes("function pi(e){let t=(0,W.c)(32),")) {
|
|
725
|
+
let patched = replaceOnce(
|
|
726
|
+
text,
|
|
727
|
+
"function pi(e){let t=(0,W.c)(32),",
|
|
728
|
+
`${threadHeaderHook()}function pi(e){let t=(0,W.c)(32),`,
|
|
729
|
+
"local conversation header helper insertion anchor",
|
|
730
|
+
);
|
|
731
|
+
patched = replaceOnce(
|
|
732
|
+
patched,
|
|
733
|
+
"let k;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(k=null,t[26]=k):k=t[26];",
|
|
734
|
+
"let CPX_headerContext={cwd:p,hostId:null,header:{surface:`local-conversation`,titleText:typeof c==`string`?c:null,projectName:s??null}},k=CPXThreadHeaderAccessories({context:CPX_headerContext,deps:{jsx:G.jsx,jsxs:G.jsxs,Tooltip:ht}});",
|
|
735
|
+
"local conversation header accessory render anchor",
|
|
736
|
+
);
|
|
737
|
+
return patched;
|
|
738
|
+
}
|
|
479
739
|
if (text.includes("function mi(e){let t=(0,U.c)(32),")) {
|
|
740
|
+
if (text.includes("projectIcon:a,projectHoverCardContent:o,projectName:s,title:c,titleSuffix:l,cwd:u,canPin:d,hideForkActions:f")) {
|
|
741
|
+
let patched = replaceOnce(
|
|
742
|
+
text,
|
|
743
|
+
"function mi(e){let t=(0,U.c)(32),",
|
|
744
|
+
`${threadHeaderHook()}function mi(e){let t=(0,U.c)(32),`,
|
|
745
|
+
"local conversation header helper insertion anchor",
|
|
746
|
+
);
|
|
747
|
+
patched = replaceOnce(
|
|
748
|
+
patched,
|
|
749
|
+
"let D;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(D=null,t[26]=D):D=t[26];",
|
|
750
|
+
"let CPX_headerContext={cwd:u,hostId:null,header:{surface:`local-conversation`,titleText:typeof c==`string`?c:null,projectName:s??null}};let D;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(D=null,t[26]=D):D=t[26];",
|
|
751
|
+
"local conversation header accessory context anchor",
|
|
752
|
+
);
|
|
753
|
+
return replaceOnce(
|
|
754
|
+
patched,
|
|
755
|
+
"children:[x,w,T,E,D]",
|
|
756
|
+
"children:[x,w,T,E,CPXThreadHeaderAccessories({context:CPX_headerContext,deps:{jsx:W.jsx,jsxs:W.jsxs,Tooltip:Ge}}),D]",
|
|
757
|
+
"local conversation header accessory mount anchor",
|
|
758
|
+
);
|
|
759
|
+
}
|
|
480
760
|
let patched = replaceOnce(
|
|
481
761
|
text,
|
|
482
762
|
"function mi(e){let t=(0,U.c)(32),",
|
|
@@ -524,7 +804,10 @@ function patchLocalConversationPageHeader(text) {
|
|
|
524
804
|
}
|
|
525
805
|
|
|
526
806
|
function patchGeneralSettingsUserBubbleColors(text) {
|
|
527
|
-
if (
|
|
807
|
+
if (
|
|
808
|
+
text.includes("function Lr({showCodeFont:e,showTranslucentSidebarToggle:t,variant:n}){") &&
|
|
809
|
+
text.includes("children:[T.map(e=>(0,J.jsx)(L,{control:(0,J.jsx)(Hr,{ariaLabel:e.ariaLabel,value:y[e.role],onChange:t=>{k(e.role,t)}}),label:e.label,variant:`nested`},e.role)),E.map")
|
|
810
|
+
) {
|
|
528
811
|
let patched = replaceOnce(
|
|
529
812
|
text,
|
|
530
813
|
"function Lr({showCodeFont:e,showTranslucentSidebarToggle:t,variant:n}){",
|
|
@@ -538,6 +821,37 @@ function patchGeneralSettingsUserBubbleColors(text) {
|
|
|
538
821
|
"user bubble settings row anchor",
|
|
539
822
|
);
|
|
540
823
|
}
|
|
824
|
+
if (
|
|
825
|
+
text.includes("function Lr({showCodeFont:e,showTranslucentSidebarToggle:t,variant:n}){") &&
|
|
826
|
+
text.includes("children:[D.map(e=>(0,J.jsx)(U,{control:(0,J.jsx)(Hr,{ariaLabel:e.ariaLabel,value:x[e.role],onChange:t=>{k(e.role,t)}}),label:e.label,variant:`nested`},e.role)),O.map")
|
|
827
|
+
) {
|
|
828
|
+
let patched = replaceOnce(
|
|
829
|
+
text,
|
|
830
|
+
"function Lr({showCodeFont:e,showTranslucentSidebarToggle:t,variant:n}){",
|
|
831
|
+
`${appearanceSettingsHook("{React:ti,jsx:J.jsx,SettingRow:U,ColorInput:Hr,Switch:I}")}function Lr({showCodeFont:e,showTranslucentSidebarToggle:t,variant:n}){`,
|
|
832
|
+
"user bubble settings helper insertion anchor",
|
|
833
|
+
);
|
|
834
|
+
return replaceOnce(
|
|
835
|
+
patched,
|
|
836
|
+
"children:[D.map(e=>(0,J.jsx)(U,{control:(0,J.jsx)(Hr,{ariaLabel:e.ariaLabel,value:x[e.role],onChange:t=>{k(e.role,t)}}),label:e.label,variant:`nested`},e.role)),O.map",
|
|
837
|
+
"children:[D.map(e=>(0,J.jsx)(U,{control:(0,J.jsx)(Hr,{ariaLabel:e.ariaLabel,value:x[e.role],onChange:t=>{k(e.role,t)}}),label:e.label,variant:`nested`},e.role)),...CPXAppearanceRows(n),O.map",
|
|
838
|
+
"user bubble settings row anchor",
|
|
839
|
+
);
|
|
840
|
+
}
|
|
841
|
+
if (text.includes("function Lr({showCodeFont:e,showTranslucentSidebarToggle:t,variant:n}){")) {
|
|
842
|
+
let patched = replaceOnce(
|
|
843
|
+
text,
|
|
844
|
+
"function Lr({showCodeFont:e,showTranslucentSidebarToggle:t,variant:n}){",
|
|
845
|
+
`${appearanceSettingsHook("{React:ti,jsx:J.jsx,SettingRow:L,ColorInput:Hr,Switch:qt}")}function Lr({showCodeFont:e,showTranslucentSidebarToggle:t,variant:n}){`,
|
|
846
|
+
"user bubble settings helper insertion anchor",
|
|
847
|
+
);
|
|
848
|
+
return replaceOnce(
|
|
849
|
+
patched,
|
|
850
|
+
"children:[E.map(e=>(0,J.jsx)(L,{control:(0,J.jsx)(Hr,{ariaLabel:e.ariaLabel,value:b[e.role],onChange:t=>{O(e.role,t)}}),label:e.label,variant:`nested`},e.role)),D.map",
|
|
851
|
+
"children:[E.map(e=>(0,J.jsx)(L,{control:(0,J.jsx)(Hr,{ariaLabel:e.ariaLabel,value:b[e.role],onChange:t=>{O(e.role,t)}}),label:e.label,variant:`nested`},e.role)),...CPXAppearanceRows(n),D.map",
|
|
852
|
+
"user bubble settings row anchor",
|
|
853
|
+
);
|
|
854
|
+
}
|
|
541
855
|
let patched = replaceOnce(
|
|
542
856
|
text,
|
|
543
857
|
"function tn({showCodeFont:e,showTranslucentSidebarToggle:t,variant:n}){",
|
|
@@ -553,6 +867,46 @@ function patchGeneralSettingsUserBubbleColors(text) {
|
|
|
553
867
|
}
|
|
554
868
|
|
|
555
869
|
function patchUserMessageAttachmentsBubbleColors(text) {
|
|
870
|
+
if (text.includes("function IVe({cwd:e,hostId:t,initialMessage:n,onCancel:r,onDraftChange:i,onSubmit:a}){")) {
|
|
871
|
+
let patched = replaceOnce(
|
|
872
|
+
text,
|
|
873
|
+
"function IVe({cwd:e,hostId:t,initialMessage:n,onCancel:r,onDraftChange:i,onSubmit:a}){",
|
|
874
|
+
`${messageComposerHook()}function IVe({cwd:e,hostId:t,initialMessage:n,onCancel:r,onDraftChange:i,onSubmit:a}){`,
|
|
875
|
+
"user bubble helper insertion anchor",
|
|
876
|
+
);
|
|
877
|
+
patched = replaceOnce(
|
|
878
|
+
patched,
|
|
879
|
+
"return(0,HU.jsx)(`form`,{className:`relative flex w-full flex-col rounded-3xl bg-token-foreground/5`,onSubmit:e=>{e.preventDefault(),v()},children:",
|
|
880
|
+
"return(0,HU.jsx)(`form`,{\"data-codex-plus-user-entry\":!0,className:`relative flex w-full flex-col rounded-3xl bg-token-foreground/5`,onSubmit:e=>{e.preventDefault(),v()},children:",
|
|
881
|
+
"edit user message entry marker anchor",
|
|
882
|
+
);
|
|
883
|
+
return replaceOnce(
|
|
884
|
+
patched,
|
|
885
|
+
"he=V?(0,KU.jsx)(`div`,{className:`w-full p-px`,children:(0,KU.jsx)(IVe,{cwd:x??null,hostId:S,initialMessage:B.trim(),onCancel:()=>{ie(null)},onDraftChange:e=>{ie(e)},onSubmit:oe})}):q?(0,KU.jsx)(`div`,{\"data-user-message-bubble\":!0,role:L?`button`:void 0,",
|
|
886
|
+
"he=V?(0,KU.jsx)(`div`,{className:`w-full p-px`,children:(0,KU.jsx)(IVe,{cwd:x??null,hostId:S,initialMessage:B.trim(),onCancel:()=>{ie(null)},onDraftChange:e=>{ie(e)},onSubmit:oe})}):q?(0,KU.jsx)(`div`,{\"data-user-message-bubble\":!0,...CPXBubbleProps({}),role:L?`button`:void 0,",
|
|
887
|
+
"user bubble marker attribute anchor",
|
|
888
|
+
);
|
|
889
|
+
}
|
|
890
|
+
if (text.includes("function xst({cwd:e,hostId:t,initialMessage:n,onCancel:r,onDraftChange:i,onSubmit:a}){")) {
|
|
891
|
+
let patched = replaceOnce(
|
|
892
|
+
text,
|
|
893
|
+
"function xst({cwd:e,hostId:t,initialMessage:n,onCancel:r,onDraftChange:i,onSubmit:a}){",
|
|
894
|
+
`${messageComposerHook()}function xst({cwd:e,hostId:t,initialMessage:n,onCancel:r,onDraftChange:i,onSubmit:a}){`,
|
|
895
|
+
"user bubble helper insertion anchor",
|
|
896
|
+
);
|
|
897
|
+
patched = replaceOnce(
|
|
898
|
+
patched,
|
|
899
|
+
"return(0,HK.jsx)(`form`,{className:`relative flex w-full flex-col rounded-3xl bg-token-foreground/5`,onSubmit:e=>{e.preventDefault(),v()},children:",
|
|
900
|
+
"return(0,HK.jsx)(`form`,{\"data-codex-plus-user-entry\":!0,className:`relative flex w-full flex-col rounded-3xl bg-token-foreground/5`,onSubmit:e=>{e.preventDefault(),v()},children:",
|
|
901
|
+
"edit user message entry marker anchor",
|
|
902
|
+
);
|
|
903
|
+
return replaceOnce(
|
|
904
|
+
patched,
|
|
905
|
+
"fe=V?(0,KK.jsx)(`div`,{className:`w-full p-px`,children:(0,KK.jsx)(xst,{cwd:x??null,hostId:S,initialMessage:z.trim(),onCancel:()=>{ne(null)},onDraftChange:e=>{ne(e)},onSubmit:ie})}):q?(0,KK.jsx)(`div`,{\"data-user-message-bubble\":!0,role:I?`button`:void 0,",
|
|
906
|
+
"fe=V?(0,KK.jsx)(`div`,{className:`w-full p-px`,children:(0,KK.jsx)(xst,{cwd:x??null,hostId:S,initialMessage:z.trim(),onCancel:()=>{ne(null)},onDraftChange:e=>{ne(e)},onSubmit:ie})}):q?(0,KK.jsx)(`div`,{\"data-user-message-bubble\":!0,...CPXBubbleProps({}),role:I?`button`:void 0,",
|
|
907
|
+
"user bubble marker attribute anchor",
|
|
908
|
+
);
|
|
909
|
+
}
|
|
556
910
|
if (text.includes("function qVn({cwd:e,hostId:t,initialMessage:n,onCancel:r,onDraftChange:i,onSubmit:a}){")) {
|
|
557
911
|
let patched = replaceOnce(
|
|
558
912
|
text,
|
|
@@ -594,6 +948,14 @@ function patchUserMessageAttachmentsBubbleColors(text) {
|
|
|
594
948
|
}
|
|
595
949
|
|
|
596
950
|
function patchUserMessageAttachmentsProjectColors(text) {
|
|
951
|
+
if (text.includes("\"data-user-message-bubble\":!0,...CPXBubbleProps({}),role:L?`button`:void 0,")) {
|
|
952
|
+
return replaceOnce(
|
|
953
|
+
text,
|
|
954
|
+
"\"data-user-message-bubble\":!0,...CPXBubbleProps({}),role:L?`button`:void 0,",
|
|
955
|
+
"\"data-user-message-bubble\":!0,...CPXBubbleProps({project:{cwd:x,hostId:S}}),role:L?`button`:void 0,",
|
|
956
|
+
"user bubble project marker attribute anchor",
|
|
957
|
+
);
|
|
958
|
+
}
|
|
597
959
|
if (text.includes("\"data-user-message-bubble\":!0,...CPXBubbleProps({}),role:I?`button`:void 0,")) {
|
|
598
960
|
return replaceOnce(
|
|
599
961
|
text,
|
|
@@ -623,6 +985,63 @@ function patchUserMessageAttachmentsProjectColors(text) {
|
|
|
623
985
|
}
|
|
624
986
|
|
|
625
987
|
function patchComposerBubbleColors(text) {
|
|
988
|
+
if (text.includes("function II(e){let t=(0,XI.c)(13),")) {
|
|
989
|
+
let patched = replaceOnce(
|
|
990
|
+
text,
|
|
991
|
+
"function II(e){let t=(0,XI.c)(13),",
|
|
992
|
+
`${messageComposerHook()}function II(e){let t=(0,XI.c)(13),`,
|
|
993
|
+
"composer user bubble helper insertion anchor",
|
|
994
|
+
);
|
|
995
|
+
patched = replaceOnce(
|
|
996
|
+
patched,
|
|
997
|
+
"function II(e){let t=(0,XI.c)(13),{children:n,className:r,externalFooterVariant:i,inert:a,isDragActive:o,layout:s,onDragEnter:c,onDragLeave:l,onDragOver:u,onDrop:d}=e,",
|
|
998
|
+
"function II(e){let t=(0,XI.c)(13),{children:n,className:r,externalFooterVariant:i,inert:a,isDragActive:o,layout:s,onDragEnter:c,onDragLeave:l,onDragOver:u,onDrop:d,codexPlusProps:CPX_surfaceProps}=e,CPX_resolvedSurfaceProps=CPX_surfaceProps??CPXSurfaceProps({}),",
|
|
999
|
+
"composer host surface props anchor",
|
|
1000
|
+
);
|
|
1001
|
+
return replaceOnce(
|
|
1002
|
+
patched,
|
|
1003
|
+
"(0,ZI.jsx)(T.div,{inert:a,className:v,",
|
|
1004
|
+
"(0,ZI.jsx)(T.div,{inert:a,...CPX_resolvedSurfaceProps,className:v,",
|
|
1005
|
+
"composer user entry marker render anchor",
|
|
1006
|
+
);
|
|
1007
|
+
}
|
|
1008
|
+
if (text.includes("function FN(e){let t=(0,YN.c)(13),")) {
|
|
1009
|
+
let patched = replaceOnce(
|
|
1010
|
+
text,
|
|
1011
|
+
"function FN(e){let t=(0,YN.c)(13),",
|
|
1012
|
+
`${messageComposerHook()}function FN(e){let t=(0,YN.c)(13),`,
|
|
1013
|
+
"composer user bubble helper insertion anchor",
|
|
1014
|
+
);
|
|
1015
|
+
patched = replaceOnce(
|
|
1016
|
+
patched,
|
|
1017
|
+
"function FN(e){let t=(0,YN.c)(13),{children:n,className:r,externalFooterVariant:i,inert:a,isDragActive:o,layout:s,onDragEnter:c,onDragLeave:l,onDragOver:u,onDrop:d}=e,",
|
|
1018
|
+
"function FN(e){let t=(0,YN.c)(13),{children:n,className:r,externalFooterVariant:i,inert:a,isDragActive:o,layout:s,onDragEnter:c,onDragLeave:l,onDragOver:u,onDrop:d,...CPX_surfaceProps}=e,CPX_resolvedSurfaceProps=Object.keys(CPX_surfaceProps).length===0?CPXSurfaceProps({}):CPX_surfaceProps,",
|
|
1019
|
+
"composer host surface props anchor",
|
|
1020
|
+
);
|
|
1021
|
+
return replaceOnce(
|
|
1022
|
+
patched,
|
|
1023
|
+
"return t[5]!==n||t[6]!==a||t[7]!==c||t[8]!==l||t[9]!==u||t[10]!==d||t[11]!==v?(y=(0,XN.jsx)(Fm.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}",
|
|
1024
|
+
"return t[5]!==n||t[6]!==a||t[7]!==c||t[8]!==l||t[9]!==u||t[10]!==d||t[11]!==v?(y=(0,XN.jsx)(Fm.div,{inert:a,...CPX_resolvedSurfaceProps,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}",
|
|
1025
|
+
"composer user entry marker render anchor",
|
|
1026
|
+
);
|
|
1027
|
+
}
|
|
1028
|
+
if (
|
|
1029
|
+
text.includes("function Ss(e){if(H?.type!==`local`") &&
|
|
1030
|
+
text.includes("(0,iW.jsx)(eW,{className:A,externalFooterVariant:k,hasDropTargetPortal:fc,")
|
|
1031
|
+
) {
|
|
1032
|
+
let patched = replaceOnce(
|
|
1033
|
+
text,
|
|
1034
|
+
"function Ss(e){if(H?.type!==`local`",
|
|
1035
|
+
`${messageComposerHook()}function Ss(e){if(H?.type!==\`local\``,
|
|
1036
|
+
"composer user bubble helper insertion anchor",
|
|
1037
|
+
);
|
|
1038
|
+
return replaceOnce(
|
|
1039
|
+
patched,
|
|
1040
|
+
"(0,iW.jsx)(eW,{className:A,externalFooterVariant:k,hasDropTargetPortal:fc,",
|
|
1041
|
+
"(0,iW.jsx)(eW,{...CPXSurfaceProps({}),className:A,externalFooterVariant:k,hasDropTargetPortal:fc,",
|
|
1042
|
+
"composer user entry marker render anchor",
|
|
1043
|
+
);
|
|
1044
|
+
}
|
|
626
1045
|
if (text.includes("function Wbe(e){let t=(0,gW.c)(13),")) {
|
|
627
1046
|
let patched = replaceOnce(
|
|
628
1047
|
text,
|
|
@@ -665,6 +1084,22 @@ function patchComposerBubbleColors(text) {
|
|
|
665
1084
|
}
|
|
666
1085
|
|
|
667
1086
|
function patchComposerProjectColors(text) {
|
|
1087
|
+
if (text.includes("(0,$q.jsx)(Yq,{className:O,externalFooterVariant:D,hasDropTargetPortal:_c,")) {
|
|
1088
|
+
return replaceOnce(
|
|
1089
|
+
text,
|
|
1090
|
+
"(0,$q.jsx)(Yq,{className:O,externalFooterVariant:D,hasDropTargetPortal:_c,",
|
|
1091
|
+
"(0,$q.jsx)(Yq,{key:CPXSurfaceProps({project:{cwd:Cn,hostId:xr}})?.[`data-codex-plus-project-color`]??``,codexPlusProps:CPXSurfaceProps({project:{cwd:Cn,hostId:xr}}),className:O,externalFooterVariant:D,hasDropTargetPortal:_c,",
|
|
1092
|
+
"composer project accent style caller anchor",
|
|
1093
|
+
);
|
|
1094
|
+
}
|
|
1095
|
+
if (text.includes("(0,iW.jsx)(eW,{className:A,externalFooterVariant:k,hasDropTargetPortal:fc,")) {
|
|
1096
|
+
return replaceOnce(
|
|
1097
|
+
text,
|
|
1098
|
+
"(0,iW.jsx)(eW,{className:A,externalFooterVariant:k,hasDropTargetPortal:fc,",
|
|
1099
|
+
"(0,iW.jsx)(eW,{...CPXSurfaceProps({project:{cwd:fn,hostId:sr}}),className:A,externalFooterVariant:k,hasDropTargetPortal:fc,",
|
|
1100
|
+
"composer project accent style caller anchor",
|
|
1101
|
+
);
|
|
1102
|
+
}
|
|
668
1103
|
if (text.includes("function Wbe(e){let t=(0,gW.c)(13),") && text.includes("CPX_resolvedSurfaceProps=CPX_surfaceProps??CPXSurfaceProps({})")) {
|
|
669
1104
|
let patched = text;
|
|
670
1105
|
patched = replaceOnce(
|
|
@@ -710,6 +1145,22 @@ function patchElectronMenuShortcuts(text) {
|
|
|
710
1145
|
}
|
|
711
1146
|
|
|
712
1147
|
function patchKeyboardShortcutsSearchInput(text) {
|
|
1148
|
+
if (text.includes("function p(e,t){return`titleIntlId`in e?")) {
|
|
1149
|
+
return replaceOnce(
|
|
1150
|
+
text,
|
|
1151
|
+
"function p(e,t){return`titleIntlId`in e?h(g,e.titleIntlId)?t.formatMessage(g[e.titleIntlId]):``:t.formatMessage(_[e.electron.menuTitleIntlId])}",
|
|
1152
|
+
"function p(e,t){return`titleIntlId`in e?h(g,e.titleIntlId)?t.formatMessage(g[e.titleIntlId]):``:e.title??e.electron?.menuTitle??t.formatMessage(_[e.electron.menuTitleIntlId])}",
|
|
1153
|
+
"generic command metadata title fallback anchor",
|
|
1154
|
+
);
|
|
1155
|
+
}
|
|
1156
|
+
if (text.includes("function qX(e,t){return`titleIntlId`in e?")) {
|
|
1157
|
+
return replaceOnce(
|
|
1158
|
+
text,
|
|
1159
|
+
"function qX(e,t){return`titleIntlId`in e?YX(XX,e.titleIntlId)?t.formatMessage(XX[e.titleIntlId]):``:t.formatMessage(ZX[e.electron.menuTitleIntlId])}",
|
|
1160
|
+
"function qX(e,t){return`titleIntlId`in e?YX(XX,e.titleIntlId)?t.formatMessage(XX[e.titleIntlId]):``:e.title??e.electron?.menuTitle??t.formatMessage(ZX[e.electron.menuTitleIntlId])}",
|
|
1161
|
+
"generic command metadata title fallback anchor",
|
|
1162
|
+
);
|
|
1163
|
+
}
|
|
713
1164
|
if (text.includes("function Kke(e,t){return`titleIntlId`in e?")) {
|
|
714
1165
|
return replaceOnce(
|
|
715
1166
|
text,
|
|
@@ -727,6 +1178,14 @@ function patchKeyboardShortcutsSearchInput(text) {
|
|
|
727
1178
|
}
|
|
728
1179
|
|
|
729
1180
|
function patchCommandMenuRuntimeCommands(text) {
|
|
1181
|
+
if (text.includes("let m=ne?N.filter(VZ):N,_;")) {
|
|
1182
|
+
return replaceOnce(
|
|
1183
|
+
text,
|
|
1184
|
+
"let m=ne?N.filter(VZ):N,_;",
|
|
1185
|
+
"let m=[...(ne?N.filter(VZ):N),...(globalThis.CodexPlus?.ui?.commands?.commandMetadata?.()?.filter?.(e=>!N.some(t=>t.id===e.id))??[])],_;",
|
|
1186
|
+
"command menu runtime command metadata anchor",
|
|
1187
|
+
);
|
|
1188
|
+
}
|
|
730
1189
|
return replaceOnce(
|
|
731
1190
|
text,
|
|
732
1191
|
"let M=j,N;t[11]===o?N=t[12]:",
|
|
@@ -736,6 +1195,34 @@ function patchCommandMenuRuntimeCommands(text) {
|
|
|
736
1195
|
}
|
|
737
1196
|
|
|
738
1197
|
function patchLocalTaskRow(text) {
|
|
1198
|
+
if (text.includes("function yr(e){let t=(0,xr.c)(134),")) {
|
|
1199
|
+
let patched = replaceOnce(
|
|
1200
|
+
text,
|
|
1201
|
+
"function yr(e){let t=(0,xr.c)(134),",
|
|
1202
|
+
`${projectColorHook()}function yr(e){let t=(0,xr.c)(134),`,
|
|
1203
|
+
"local task row project color helper insertion anchor",
|
|
1204
|
+
);
|
|
1205
|
+
return replaceOnce(
|
|
1206
|
+
patched,
|
|
1207
|
+
"threadSummary:B,dataAttributes:Le}=e,V=u===void 0?!1:u,",
|
|
1208
|
+
"threadSummary:B,dataAttributes:Le=CPXPR({projectId:Fe,label:Ie,path:a,cwd:a})}=e,V=u===void 0?!1:u,",
|
|
1209
|
+
"local task row project assignment anchor",
|
|
1210
|
+
);
|
|
1211
|
+
}
|
|
1212
|
+
if (text.includes("function Ef(e){let t=(0,Of.c)(134),")) {
|
|
1213
|
+
let patched = replaceOnce(
|
|
1214
|
+
text,
|
|
1215
|
+
"function Ef(e){let t=(0,Of.c)(134),",
|
|
1216
|
+
`${projectColorHook()}function Ef(e){let t=(0,Of.c)(134),`,
|
|
1217
|
+
"local task row project color helper insertion anchor",
|
|
1218
|
+
);
|
|
1219
|
+
return replaceOnce(
|
|
1220
|
+
patched,
|
|
1221
|
+
"threadSummary:le,dataAttributes:ue}=e,de=l===void 0?!1:l,",
|
|
1222
|
+
"threadSummary:le,dataAttributes:ue=CPXPR({projectId:oe,label:se,path:r,cwd:r})}=e,de=l===void 0?!1:l,",
|
|
1223
|
+
"local task row project assignment anchor",
|
|
1224
|
+
);
|
|
1225
|
+
}
|
|
739
1226
|
if (text.includes("function _p(e){let t=(0,yp.c)(134),")) {
|
|
740
1227
|
let patched = replaceOnce(
|
|
741
1228
|
text,
|
|
@@ -767,6 +1254,34 @@ function patchLocalTaskRow(text) {
|
|
|
767
1254
|
}
|
|
768
1255
|
|
|
769
1256
|
function patchMermaidDiagramShell(text) {
|
|
1257
|
+
if (text.includes("function Npe(e){let t=(0,_4.c)(19),")) {
|
|
1258
|
+
let patched = replaceOnce(
|
|
1259
|
+
text,
|
|
1260
|
+
"function Npe(e){let t=(0,_4.c)(19),",
|
|
1261
|
+
`${mermaidDiagramHook()}function Npe(e){let t=(0,_4.c)(19),`,
|
|
1262
|
+
"mermaid diagram shell helper insertion anchor",
|
|
1263
|
+
);
|
|
1264
|
+
return replaceOnce(
|
|
1265
|
+
patched,
|
|
1266
|
+
'D=(0,y4.jsx)(`div`,{ref:d,className:C,"data-wide-markdown-block":T,"data-wide-markdown-block-kind":c,children:E})',
|
|
1267
|
+
'D=(0,y4.jsx)(`div`,{ref:d,...CPXMermaidDiagramProps({code:a}),className:C,"data-wide-markdown-block":T,"data-wide-markdown-block-kind":c,children:E})',
|
|
1268
|
+
"mermaid diagram shell host props anchor",
|
|
1269
|
+
);
|
|
1270
|
+
}
|
|
1271
|
+
if (text.includes("function xbe(e){let t=(0,E2.c)(19),")) {
|
|
1272
|
+
let patched = replaceOnce(
|
|
1273
|
+
text,
|
|
1274
|
+
"function xbe(e){let t=(0,E2.c)(19),",
|
|
1275
|
+
`${mermaidDiagramHook()}function xbe(e){let t=(0,E2.c)(19),`,
|
|
1276
|
+
"mermaid diagram shell helper insertion anchor",
|
|
1277
|
+
);
|
|
1278
|
+
return replaceOnce(
|
|
1279
|
+
patched,
|
|
1280
|
+
"E=(0,O2.jsx)(`div`,{ref:d,className:C,\"data-wide-markdown-block\":w,\"data-wide-markdown-block-kind\":c,children:T})",
|
|
1281
|
+
"E=(0,O2.jsx)(`div`,{ref:d,...CPXMermaidDiagramProps({code:a}),className:C,\"data-wide-markdown-block\":w,\"data-wide-markdown-block-kind\":c,children:T})",
|
|
1282
|
+
"mermaid diagram shell host props anchor",
|
|
1283
|
+
);
|
|
1284
|
+
}
|
|
770
1285
|
if (text.includes("function or({blockRef:e,code:t,isCodeFenceOpen:n,isDark:r,isVisible:i,onError:a,onRendered:o,renderKey:s}){")) {
|
|
771
1286
|
let patched = replaceOnce(
|
|
772
1287
|
text,
|
|
@@ -805,6 +1320,20 @@ function patchPreloadNativeBridge(text) {
|
|
|
805
1320
|
}
|
|
806
1321
|
|
|
807
1322
|
function patchMainNativeBridge(text) {
|
|
1323
|
+
if (text.includes("function b4(e){let{") && text.includes("K2(l,k),H2(k);let A=!1;")) {
|
|
1324
|
+
let patched = replaceOnce(
|
|
1325
|
+
text,
|
|
1326
|
+
"function b4(e){let{",
|
|
1327
|
+
`${nativeMainHook()}function b4(e){let{`,
|
|
1328
|
+
"codex plus native main helper insertion anchor",
|
|
1329
|
+
);
|
|
1330
|
+
return replaceOnce(
|
|
1331
|
+
patched,
|
|
1332
|
+
"K2(l,k),H2(k);let A=!1;",
|
|
1333
|
+
"K2(l,k),H2(k),CPXNative.registerNativeRequest({isTrustedIpcEvent:k});let A=!1;",
|
|
1334
|
+
"codex plus native main registration anchor",
|
|
1335
|
+
);
|
|
1336
|
+
}
|
|
808
1337
|
if (text.includes("function y4(e){let{") && text.includes("G2(l,k),V2(k);let A=!1;")) {
|
|
809
1338
|
let patched = replaceOnce(
|
|
810
1339
|
text,
|
|
@@ -927,7 +1456,7 @@ return makePatchSet({
|
|
|
927
1456
|
fileTransforms: [
|
|
928
1457
|
[appMainFile, patchAppMainSidebarBlur],
|
|
929
1458
|
[electronMenuShortcutsFile, patchElectronMenuShortcuts],
|
|
930
|
-
[
|
|
1459
|
+
[keyboardShortcutsTitleFallbackFile, patchKeyboardShortcutsSearchInput],
|
|
931
1460
|
[keyboardShortcutsSearchInputFile, patchCommandMenuRuntimeCommands],
|
|
932
1461
|
],
|
|
933
1462
|
},
|