codex-plus-patcher 0.7.0 → 0.7.2
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 +2 -1
- package/package.json +2 -2
- package/src/cli.js +94 -0
- package/src/core/asar.js +6 -4
- package/src/core/dev-mode.js +339 -0
- package/src/core/plugin-audit.js +1605 -0
- package/src/patches/26.623.41415-4505.js +44 -0
- package/src/patches/26.623.42026-4514.js +44 -0
- package/src/patches/index.js +10 -1
- package/src/patches/lib/common-patches.js +621 -195
- package/src/patches/lib/hooks/message-composer.js +1 -1
- package/src/patches/lib/hooks/project-selector.js +2 -2
- package/src/patches/lib/hooks/review.js +4 -2
- package/src/patches/lib/hooks/settings-commands.js +3 -2
- package/src/patches/lib/hooks/sidebar.js +1 -6
- package/src/patches/lib/project-selector-shortcut-patch.js +141 -2
- package/src/runtime/api/index.js +3 -0
- package/src/runtime/assets.js +4 -4
- package/src/runtime/host/projectSelector.js +5 -1
- package/src/runtime/plugins/mermaidFullscreen.js +19 -6
- package/src/runtime/plugins/nestedRepositories.js +72 -11
- package/src/runtime/plugins/projectColors.js +96 -7
- package/src/runtime/plugins/projectSelectorShortcut.js +67 -12
- package/src/runtime/plugins/sidebarNameBlur.js +1 -1
- package/src/runtime/plugins/userBubbleColors.js +4 -0
|
@@ -7,11 +7,12 @@ const { mermaidDiagramHook } = require("./hooks/mermaid");
|
|
|
7
7
|
const { messageComposerHook } = require("./hooks/message-composer");
|
|
8
8
|
const { nativeMainHook } = require("./hooks/native-main");
|
|
9
9
|
const { reviewHook } = require("./hooks/review");
|
|
10
|
-
const { projectColorHook
|
|
10
|
+
const { projectColorHook } = require("./hooks/sidebar");
|
|
11
11
|
const { appearanceSettingsHook, commandMenuItemsExpression } = require("./hooks/settings-commands");
|
|
12
12
|
const { threadHeaderHook } = require("./hooks/thread-header");
|
|
13
13
|
const { workerHook } = require("./hooks/worker");
|
|
14
14
|
const {
|
|
15
|
+
patchHomeProjectDropdownProjectSelectorShortcut,
|
|
15
16
|
patchLocalActiveWorkspaceRootDropdownProjectSelectorShortcut,
|
|
16
17
|
patchRunCommandProjectSelectorShortcut,
|
|
17
18
|
} = require("./project-selector-shortcut-patch");
|
|
@@ -30,7 +31,6 @@ function buildCodexPlusPatchSet(config) {
|
|
|
30
31
|
const appShellFile = files.appShell;
|
|
31
32
|
const errorBoundaryFile = files.errorBoundary;
|
|
32
33
|
const generalSettingsFile = files.generalSettings;
|
|
33
|
-
const sidebarProjectHoverCardSourceRowsFile = files.sidebarProjectHoverCardSourceRows;
|
|
34
34
|
const headerFile = files.header;
|
|
35
35
|
const threadPageHeaderFile = files.threadPageHeader;
|
|
36
36
|
const localConversationPageFile = files.localConversationPage;
|
|
@@ -40,11 +40,13 @@ function buildCodexPlusPatchSet(config) {
|
|
|
40
40
|
const userMessageAttachmentsFile = files.userMessageAttachments;
|
|
41
41
|
const composerFile = files.composer;
|
|
42
42
|
const localActiveWorkspaceRootDropdownFile = files.localActiveWorkspaceRootDropdown;
|
|
43
|
+
const homeProjectDropdownFile = files.homeProjectDropdown;
|
|
43
44
|
const runCommandFile = files.runCommand;
|
|
44
45
|
const localTaskRowFile = files.localTaskRow;
|
|
45
46
|
const mermaidDiagramShellFile = files.mermaidDiagramShell;
|
|
46
47
|
const electronMenuShortcutsFile = files.electronMenuShortcuts;
|
|
47
48
|
const keyboardShortcutsSearchInputFile = files.keyboardShortcutsSearchInput;
|
|
49
|
+
const statsigStartupFile = files.statsigStartup;
|
|
48
50
|
const srcFile = files.src;
|
|
49
51
|
const sidebarThreadKeysFile = files.sidebarThreadKeys;
|
|
50
52
|
const sidebarThreadRowSignalsFile = files.sidebarThreadRowSignals;
|
|
@@ -54,6 +56,23 @@ function patchTitle(text) {
|
|
|
54
56
|
return replaceOnce(text, oldTitle, newTitle, `${oldTitle} in ${titleFile}`);
|
|
55
57
|
}
|
|
56
58
|
|
|
59
|
+
function patchDevModeStatsigFallback(text) {
|
|
60
|
+
if (text.includes("function XY(e){let t=(0,sX.c)(27),")) {
|
|
61
|
+
return replaceOnce(
|
|
62
|
+
text,
|
|
63
|
+
"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",
|
|
64
|
+
"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",
|
|
65
|
+
"dev mode statsig fallback anchor",
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
return replaceOnce(
|
|
69
|
+
text,
|
|
70
|
+
"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",
|
|
71
|
+
"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(window.__CodexPlusRuntimeConfig?.devModeStatsigFallback)return u;if",
|
|
72
|
+
"dev mode statsig fallback anchor",
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
|
|
57
76
|
function patchAboutDialog(text, context = {}) {
|
|
58
77
|
const aboutContext = {
|
|
59
78
|
patcherRepoUrl: context.patcherRepoUrl || "https://github.com/michaelw/codex-plus-patcher",
|
|
@@ -61,6 +80,58 @@ function patchAboutDialog(text, context = {}) {
|
|
|
61
80
|
sourceAsarSha256: context.sourceAsarSha256 || "unknown",
|
|
62
81
|
appliedPatches: context.appliedPatches || [],
|
|
63
82
|
};
|
|
83
|
+
if (text.includes("function Q4({appDisplayName:e,buildInfoLabel:t,buildInfoText:n,iconDataUrl:r,isDark:i,okLabel:a,title:o})")) {
|
|
84
|
+
let patched = replaceOnce(
|
|
85
|
+
text,
|
|
86
|
+
"let i=a.app.getName(),o=a.app.getVersion()",
|
|
87
|
+
`let CPXAbout=${aboutMetadataRequire()}.aboutPayload(${JSON.stringify(aboutContext)}),i=CPXAbout.appDisplayName,o=a.app.getVersion()`,
|
|
88
|
+
"about dialog app name anchor",
|
|
89
|
+
);
|
|
90
|
+
patched = replaceOnce(
|
|
91
|
+
patched,
|
|
92
|
+
"g=d.formatMessage({messageId:I4,defaultMessage:L4}),_=q4(o),v=_.length===0?h:[h,``,..._].join(`\n`),",
|
|
93
|
+
"g=d.formatMessage({messageId:I4,defaultMessage:L4}),_=CPXAbout.buildInfoLines,v=_.length===0?h:[h,``,..._].join(`\n`),",
|
|
94
|
+
"about dialog build information anchor",
|
|
95
|
+
);
|
|
96
|
+
patched = replaceOnce(
|
|
97
|
+
patched,
|
|
98
|
+
"Q4({appDisplayName:i,buildInfoLabel:g,buildInfoText:v,iconDataUrl:f.htmlIconDataUrl,isDark:b,okLabel:m,title:p})",
|
|
99
|
+
"Q4({appDisplayName:i,buildInfoLabel:g,buildInfoText:v,codexPlusDisclaimerHeading:CPXAbout.disclaimerHeading,codexPlusDisclaimerBody:CPXAbout.disclaimerBody,iconDataUrl:f.htmlIconDataUrl,isDark:b,okLabel:m,title:p})",
|
|
100
|
+
"about dialog renderer call anchor",
|
|
101
|
+
);
|
|
102
|
+
patched = replaceOnce(
|
|
103
|
+
patched,
|
|
104
|
+
"function Q4({appDisplayName:e,buildInfoLabel:t,buildInfoText:n,iconDataUrl:r,isDark:i,okLabel:a,title:o}){let s=r==null?``:",
|
|
105
|
+
"function Q4({appDisplayName:e,buildInfoLabel:t,buildInfoText:n,codexPlusDisclaimerHeading:D,codexPlusDisclaimerBody:O,iconDataUrl:r,isDark:i,okLabel:a,title:o}){let CPXAboutMetadata=" +
|
|
106
|
+
aboutMetadataRequire() +
|
|
107
|
+
",q=CPXAboutMetadata.disclaimerMarkup({escape:sV.default,heading:D,body:O}),s=r==null?``:",
|
|
108
|
+
"about dialog renderer signature anchor",
|
|
109
|
+
);
|
|
110
|
+
patched = replaceOnce(
|
|
111
|
+
patched,
|
|
112
|
+
" .build-info {\n width: 100%;\n margin: 0;\n line-height: 1.45;",
|
|
113
|
+
"${CPXAboutMetadata.disclaimerStyles()}\n\n .build-info {\n width: 100%;\n margin: 0;\n line-height: 1.45;",
|
|
114
|
+
"about dialog disclaimer styles anchor",
|
|
115
|
+
);
|
|
116
|
+
patched = replaceOnce(
|
|
117
|
+
patched,
|
|
118
|
+
" color: var(--muted-text);\n white-space: pre-wrap;",
|
|
119
|
+
" color: var(--muted-text);\n text-align: left;\n white-space: pre-wrap;",
|
|
120
|
+
"about dialog build info left align anchor",
|
|
121
|
+
);
|
|
122
|
+
patched = replaceOnce(
|
|
123
|
+
patched,
|
|
124
|
+
" .app-name,\n .build-info,\n .copyright {",
|
|
125
|
+
" .app-name,\n .codex-plus-disclaimer,\n .build-info,\n .copyright {",
|
|
126
|
+
"about dialog selectable disclaimer anchor",
|
|
127
|
+
);
|
|
128
|
+
return replaceOnce(
|
|
129
|
+
patched,
|
|
130
|
+
' <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>',
|
|
131
|
+
' <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>',
|
|
132
|
+
"about dialog disclaimer insertion anchor",
|
|
133
|
+
);
|
|
134
|
+
}
|
|
64
135
|
let patched = replaceOnce(
|
|
65
136
|
text,
|
|
66
137
|
"let i=a.app.getName(),o=a.app.getVersion()",
|
|
@@ -114,6 +185,32 @@ function patchAboutDialog(text, context = {}) {
|
|
|
114
185
|
}
|
|
115
186
|
|
|
116
187
|
function patchWorker(text) {
|
|
188
|
+
if (text.includes("function yae(e,t){return e.queryClient.fetchQuery")) {
|
|
189
|
+
let patched = replaceOnce(
|
|
190
|
+
text,
|
|
191
|
+
"var d2=gG(`git`),",
|
|
192
|
+
'const CPXW=require("./codex-plus-worker.js"),CPXT=e=>CPXW.traceRequest(e),CPXR=(e,t,n,r)=>CPXW.repositoryTargetsFromHost(e,t,n,r,yae),CPXB=e=>CPXW.isReadOnlyBranchRequest(e?.requestKind,e?.source);var d2=gG(`git`),',
|
|
193
|
+
"worker helper insertion anchor",
|
|
194
|
+
);
|
|
195
|
+
patched = replaceOnce(
|
|
196
|
+
patched,
|
|
197
|
+
"if(!Z0(y)&&!t2(n))return",
|
|
198
|
+
"if(!Z0(y)&&!CPXB(y)&&!t2(n))return",
|
|
199
|
+
"codex plus branch picker git allowlist anchor",
|
|
200
|
+
);
|
|
201
|
+
patched = replaceOnce(
|
|
202
|
+
patched,
|
|
203
|
+
"case`commit-message-diff`:a=X(await o7(nae(e.params.cwd,e.params.includeUnstaged,this.gitManager,r),t.signal));break;case`submodule-paths`:a=X({paths:await yae(this.gitManager.getWorktreeRepositoryForRoot(e.params.root,r),t.signal)});break;",
|
|
204
|
+
"case`commit-message-diff`:a=X(await o7(nae(e.params.cwd,e.params.includeUnstaged,this.gitManager,r),t.signal));break;case`codex-plus-trace`:a=X(CPXT(e.params));break;case`repository-targets`:a=X(await CPXR(this.gitManager,e.params,r,t.signal));break;case`submodule-paths`:a=X({paths:await yae(this.gitManager.getWorktreeRepositoryForRoot(e.params.root,r),t.signal)});break;",
|
|
205
|
+
"repository-targets worker switch anchor",
|
|
206
|
+
);
|
|
207
|
+
return replaceOnce(
|
|
208
|
+
patched,
|
|
209
|
+
"case`review-patch`:case`commit-message-diff`:case`submodule-paths`:case`cat-file`:",
|
|
210
|
+
"case`review-patch`:case`commit-message-diff`:case`codex-plus-trace`:case`repository-targets`:case`submodule-paths`:case`cat-file`:",
|
|
211
|
+
"repository-targets worker readonly method anchor",
|
|
212
|
+
);
|
|
213
|
+
}
|
|
117
214
|
let patched = replaceOnce(
|
|
118
215
|
text,
|
|
119
216
|
"function pae(e,t){return e.queryClient.fetchQuery",
|
|
@@ -141,6 +238,34 @@ function patchWorker(text) {
|
|
|
141
238
|
}
|
|
142
239
|
|
|
143
240
|
function patchThreadSidePanelTabs(text) {
|
|
241
|
+
if (text.includes("function mQe(e){let t=(0,hQe.c)(20),{diffMode:n,setTabState:r,tabState:i}=e")) {
|
|
242
|
+
let patched = replaceOnce(
|
|
243
|
+
text,
|
|
244
|
+
"function mQe(e){let t=(0,hQe.c)(20),{diffMode:n,setTabState:r,tabState:i}=e",
|
|
245
|
+
`${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`,
|
|
246
|
+
"review host hook insertion anchor",
|
|
247
|
+
);
|
|
248
|
+
return replaceOnce(
|
|
249
|
+
patched,
|
|
250
|
+
"_=(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];",
|
|
251
|
+
"_=(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];",
|
|
252
|
+
"review body mux anchor",
|
|
253
|
+
);
|
|
254
|
+
}
|
|
255
|
+
if (text.includes("function oDn(e){let t=(0,sDn.c)(14),{expandedActionsPortalTarget:n,setTabState:r,tabState:i}=e")) {
|
|
256
|
+
let patched = replaceOnce(
|
|
257
|
+
text,
|
|
258
|
+
"function oDn(e){let t=(0,sDn.c)(14),{expandedActionsPortalTarget:n,setTabState:r,tabState:i}=e",
|
|
259
|
+
`${reviewHook("[JX,typeof PJ!==`undefined`?PJ:null,Kn,Nn,Xd,SA,CA,wA,null,Fe,Ue,cxn,null,null,null,null,null,null,null,typeof yA!==`undefined`?yA:null,typeof Gcn!==`undefined`?Gcn:null]")}function oDn(e){let t=(0,sDn.c)(14),{expandedActionsPortalTarget:n,setTabState:r,tabState:i}=e`,
|
|
260
|
+
"review host hook insertion anchor",
|
|
261
|
+
);
|
|
262
|
+
return replaceOnce(
|
|
263
|
+
patched,
|
|
264
|
+
"let s;t[1]!==a||t[2]!==r||t[3]!==i?(s=(0,JX.jsx)(cxn,{diffMode:a,setTabState:r,tabState:i}),t[1]=a,t[2]=r,t[3]=i,t[4]=s):s=t[4];let c;",
|
|
265
|
+
"let s;t[1]!==a||t[2]!==r||t[3]!==i?(s=(0,JX.jsx)(CPXRM,{mainReviewContent:(0,JX.jsx)(cxn,{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];let c;",
|
|
266
|
+
"review body mux anchor",
|
|
267
|
+
);
|
|
268
|
+
}
|
|
144
269
|
let patched = replaceOnce(
|
|
145
270
|
text,
|
|
146
271
|
"import{r as vi,t as yi}from\"./dropdown-CTBRoADH.js\";",
|
|
@@ -161,6 +286,46 @@ function patchThreadSidePanelTabs(text) {
|
|
|
161
286
|
);
|
|
162
287
|
}
|
|
163
288
|
function patchAppShell(text) {
|
|
289
|
+
if (text.includes("function QUe(e){let t=(0,NP.c)(4),{onRetry:n}=e,")) {
|
|
290
|
+
let patched = replaceOnce(
|
|
291
|
+
text,
|
|
292
|
+
"function QUe(e){let t=(0,NP.c)(4),{onRetry:n}=e,",
|
|
293
|
+
`${diagnosticDetailsHook()}function QUe(e){let t=(0,NP.c)(4),{onRetry:n,error:CPX_error}=e,`,
|
|
294
|
+
"app shell error fallback prop anchor",
|
|
295
|
+
);
|
|
296
|
+
patched = replaceOnce(
|
|
297
|
+
patched,
|
|
298
|
+
"children:[r,(0,FP.jsx)(za,{color:`secondary`,size:`default`,onClick:n,children:i})]",
|
|
299
|
+
"children:[r,CPXDiagnosticDetails({jsx:FP.jsx,error:CPX_error}),(0,FP.jsx)(za,{color:`secondary`,size:`default`,onClick:n,children:i})]",
|
|
300
|
+
"app shell error detail insertion anchor",
|
|
301
|
+
);
|
|
302
|
+
return replaceOnce(
|
|
303
|
+
patched,
|
|
304
|
+
"fallback:e=>(0,FP.jsx)(QUe,{onRetry:()=>{e.resetError()}})",
|
|
305
|
+
"fallback:e=>(0,FP.jsx)(QUe,{error:e.error,onRetry:()=>{e.resetError()}})",
|
|
306
|
+
"app shell boundary error prop anchor",
|
|
307
|
+
);
|
|
308
|
+
}
|
|
309
|
+
if (text.includes("function xdn(e){let t=(0,Cdn.c)(4),{onRetry:n}=e")) {
|
|
310
|
+
let patched = replaceOnce(
|
|
311
|
+
text,
|
|
312
|
+
"function xdn(e){let t=(0,Cdn.c)(4),{onRetry:n}=e",
|
|
313
|
+
`${diagnosticDetailsHook()}function xdn(e){let t=(0,Cdn.c)(4),{onRetry:n,error:CPX_error}=e`,
|
|
314
|
+
"app shell error fallback prop anchor",
|
|
315
|
+
);
|
|
316
|
+
patched = replaceOnce(
|
|
317
|
+
patched,
|
|
318
|
+
"children:[r,(0,NK.jsx)(Ud,{color:`secondary`,size:`default`,onClick:n,children:i})]",
|
|
319
|
+
"children:[r,CPXDiagnosticDetails({jsx:NK.jsx,error:CPX_error}),(0,NK.jsx)(Ud,{color:`secondary`,size:`default`,onClick:n,children:i})]",
|
|
320
|
+
"app shell error detail insertion anchor",
|
|
321
|
+
);
|
|
322
|
+
return replaceOnce(
|
|
323
|
+
patched,
|
|
324
|
+
"fallback:e=>(0,NK.jsx)(xdn,{onRetry:()=>{e.resetError()}})",
|
|
325
|
+
"fallback:e=>(0,NK.jsx)(xdn,{error:e.error,onRetry:()=>{e.resetError()}})",
|
|
326
|
+
"app shell boundary error prop anchor",
|
|
327
|
+
);
|
|
328
|
+
}
|
|
164
329
|
let patched = replaceOnce(
|
|
165
330
|
text,
|
|
166
331
|
"function En(e){return(0,Q.jsx)(wn,{onRetry:()=>{e.resetError()}})}",
|
|
@@ -173,21 +338,22 @@ function patchAppShell(text) {
|
|
|
173
338
|
"children:[r,CPXDiagnosticDetails({jsx:Q.jsx,error:e.error}),(0,Q.jsx)(Le,{color:`secondary`,size:`default`,onClick:n,children:i})]",
|
|
174
339
|
"app shell error detail insertion anchor",
|
|
175
340
|
);
|
|
176
|
-
patched
|
|
177
|
-
patched,
|
|
178
|
-
"return t[2]===n?a=t[3]:(a=(0,Q.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col items-center justify-center gap-3 p-4 text-center text-sm text-token-text-secondary`,children:",
|
|
179
|
-
"return t[2]===n&&t[3]===e.error?a=t[4]:(a=(0,Q.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col items-center justify-center gap-3 p-4 text-center text-sm text-token-text-secondary`,children:",
|
|
180
|
-
"app shell error cache condition anchor",
|
|
181
|
-
);
|
|
182
|
-
return replaceOnce(
|
|
183
|
-
patched,
|
|
184
|
-
"}),t[2]=n,t[3]=a),a}function Tn(e){return e.composedPath().some",
|
|
185
|
-
"}),t[2]=n,t[3]=e.error,t[4]=a),a}function Tn(e){return e.composedPath().some",
|
|
186
|
-
"app shell error cache assignment anchor",
|
|
187
|
-
);
|
|
341
|
+
return patched;
|
|
188
342
|
}
|
|
189
343
|
|
|
190
344
|
function patchErrorBoundary(text) {
|
|
345
|
+
if (
|
|
346
|
+
!text.includes("function Xf(e){let t=(0,Vf.c)(9),{resetError:n}=e,r=ee(),i,a;") &&
|
|
347
|
+
text.includes("function QUe(e){let t=(0,NP.c)(4),{onRetry:n,error:CPX_error}=e,")
|
|
348
|
+
) {
|
|
349
|
+
return text;
|
|
350
|
+
}
|
|
351
|
+
if (
|
|
352
|
+
!text.includes("function Xf(e){let t=(0,Vf.c)(9),{resetError:n}=e,r=ee(),i,a;") &&
|
|
353
|
+
text.includes("function xdn(e){let t=(0,Cdn.c)(")
|
|
354
|
+
) {
|
|
355
|
+
return text;
|
|
356
|
+
}
|
|
191
357
|
let patched = replaceOnce(
|
|
192
358
|
text,
|
|
193
359
|
"function Xf(e){let t=(0,Vf.c)(9),{resetError:n}=e,r=ee(),i,a;",
|
|
@@ -209,58 +375,93 @@ function patchErrorBoundary(text) {
|
|
|
209
375
|
}
|
|
210
376
|
|
|
211
377
|
function patchAppMainProjectColors(text) {
|
|
378
|
+
if (
|
|
379
|
+
text.includes("function Vm(e){let t=(0,Gm.c)(57),") &&
|
|
380
|
+
text.includes("return t[41]!==Y||t[42]!==H?(ne=(0,$.jsx)(`div`,{...H,children:Y})")
|
|
381
|
+
) {
|
|
382
|
+
let patched = replaceOnce(
|
|
383
|
+
text,
|
|
384
|
+
"function Vm(e){let t=(0,Gm.c)(57),",
|
|
385
|
+
`${projectColorHook()}function Vm(e){let t=(0,Gm.c)(57),`,
|
|
386
|
+
"project color app main helper insertion anchor",
|
|
387
|
+
);
|
|
388
|
+
patched = replaceOnce(
|
|
389
|
+
patched,
|
|
390
|
+
"q=(0,Km.jsxs)(`div`,{...v,...O,ref:n,className:j,role:`button`,",
|
|
391
|
+
"q=(0,Km.jsxs)(`div`,{...v,...O,...CPXPR({projectId:_,label:p}),ref:n,className:j,role:`button`,",
|
|
392
|
+
"project header row color attributes anchor",
|
|
393
|
+
);
|
|
394
|
+
return replaceOnce(
|
|
395
|
+
patched,
|
|
396
|
+
"ne=(0,$.jsx)(`div`,{...H,children:Y})",
|
|
397
|
+
"ne=(0,$.jsx)(`div`,{...H,...CPXPR(a),children:Y})",
|
|
398
|
+
"project group color render anchor",
|
|
399
|
+
);
|
|
400
|
+
}
|
|
401
|
+
if (text.includes("function gg(e){let t=(0,Rg.c)(44),{threadKeys:n,")) {
|
|
402
|
+
let patched = replaceOnce(
|
|
403
|
+
text,
|
|
404
|
+
"function gg(e){let t=(0,Rg.c)(44),",
|
|
405
|
+
`${projectColorHook()}function gg(e){let t=(0,Rg.c)(44),`,
|
|
406
|
+
"project color app main helper insertion anchor",
|
|
407
|
+
);
|
|
408
|
+
patched = replaceOnce(
|
|
409
|
+
patched,
|
|
410
|
+
"X=(0,$.jsx)(`div`,{...H,children:ne})",
|
|
411
|
+
"X=(0,$.jsx)(`div`,{...H,...CPXPR(a),children:ne})",
|
|
412
|
+
"project group color render anchor",
|
|
413
|
+
);
|
|
414
|
+
return replaceOnce(
|
|
415
|
+
patched,
|
|
416
|
+
"(te=(0,Fh.jsxs)(`div`,{...v,...O,ref:n,className:j,role:`button`,tabIndex:M,",
|
|
417
|
+
"(te=(0,Fh.jsxs)(`div`,{...v,...O,...CPXPR({projectId:_,label:p}),ref:n,className:j,role:`button`,tabIndex:M,",
|
|
418
|
+
"current project header row color attributes anchor",
|
|
419
|
+
);
|
|
420
|
+
}
|
|
212
421
|
let patched = replaceOnce(
|
|
213
422
|
text,
|
|
214
423
|
"function Pk(e){let t=(0,Q.c)(45),",
|
|
215
|
-
`${projectColorHook()}function Pk(e){let t=(0,Q.c)(
|
|
424
|
+
`${projectColorHook()}function Pk(e){let t=(0,Q.c)(45),`,
|
|
216
425
|
"project color app main helper insertion anchor",
|
|
217
426
|
);
|
|
218
427
|
patched = replaceOnce(
|
|
219
428
|
patched,
|
|
220
|
-
"H=Ha.sidebarProjectList({projectId:i.projectId,showAll:x})",
|
|
221
|
-
"H=Ha.sidebarProjectList({projectId:i.projectId,showAll:x})",
|
|
222
|
-
"project group color marker anchor",
|
|
223
|
-
);
|
|
224
|
-
patched = replaceOnce(
|
|
225
|
-
patched,
|
|
226
|
-
"q={onActivateGroup:V,onStartNewConversation:a,isGrouped:!0,hideRemoteHostEnvIcon:!0,hideTimestamp:l,locationId:b,floatStatusIconsRight:s,showPinActionOnHover:o}",
|
|
227
|
-
"q={onActivateGroup:V,onStartNewConversation:a,isGrouped:!0,hideRemoteHostEnvIcon:!0,hideTimestamp:l,locationId:b,floatStatusIconsRight:s,showPinActionOnHover:o,dataAttributes:CPXTR(i)}",
|
|
228
|
-
"project thread row color key anchor",
|
|
229
|
-
);
|
|
230
|
-
patched = replaceOnce(
|
|
231
|
-
patched,
|
|
232
|
-
"t[19]!==V||t[20]!==s||t[21]!==l||t[22]!==b||t[23]!==o||t[24]!==a?",
|
|
233
|
-
"t[19]!==V||t[20]!==s||t[21]!==l||t[22]!==b||t[23]!==o||t[24]!==a||t[45]!==i?",
|
|
234
|
-
"project thread row color cache dependency anchor",
|
|
235
|
-
);
|
|
236
|
-
patched = replaceOnce(
|
|
237
|
-
patched,
|
|
238
|
-
"t[19]=V,t[20]=s,t[21]=l,t[22]=b,t[23]=o,t[24]=a,t[25]=q):q=t[25]",
|
|
239
|
-
"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]",
|
|
240
|
-
"project thread row color cache write anchor",
|
|
241
|
-
);
|
|
242
|
-
patched = replaceOnce(
|
|
243
|
-
patched,
|
|
244
|
-
"ie=(0,Z.jsx)(`div`,{...H,children:re})",
|
|
245
429
|
"ie=(0,Z.jsx)(`div`,{...H,children:re})",
|
|
430
|
+
"ie=(0,Z.jsx)(`div`,{...H,...CPXPR(i),children:re})",
|
|
246
431
|
"project group color render anchor",
|
|
247
432
|
);
|
|
248
|
-
patched = replaceOnce(
|
|
249
|
-
patched,
|
|
250
|
-
"O=(0,Z.jsx)(NO,{action:T,actionTooltipContent:h,actionTooltipDisabled:p,indicator:E,isMenuOpen:g,menu:D})",
|
|
251
|
-
"O=(0,Z.jsx)(NO,{action:T,actionTooltipContent:h,actionTooltipDisabled:p,indicator:E,isMenuOpen:g,menu:D})",
|
|
252
|
-
"project header action render anchor",
|
|
253
|
-
);
|
|
254
433
|
patched = replaceOnce(
|
|
255
434
|
patched,
|
|
256
435
|
"Ke=(0,Z.jsx)(Oe,{rowAttributes:ke,className:Ae,collapsed:L,contentClassName:je,",
|
|
257
436
|
"Ke=(0,Z.jsx)(Oe,{rowAttributes:{...ke,...CPXPR(n)},className:Ae,collapsed:L,contentClassName:je,",
|
|
258
437
|
"project header row color attributes anchor",
|
|
259
438
|
);
|
|
439
|
+
patched = replaceOnce(
|
|
440
|
+
patched,
|
|
441
|
+
"(te=(0,Fh.jsxs)(`div`,{...v,...O,ref:n,className:j,role:`button`,tabIndex:M,",
|
|
442
|
+
"(te=(0,Fh.jsxs)(`div`,{...v,...O,...CPXPR({projectId:_,label:p}),ref:n,className:j,role:`button`,tabIndex:M,",
|
|
443
|
+
"current project header row color attributes anchor",
|
|
444
|
+
);
|
|
260
445
|
return patched;
|
|
261
446
|
}
|
|
262
447
|
|
|
263
448
|
function patchAppMainSidebarBlur(text) {
|
|
449
|
+
if (text.includes("function vh(e){let t=(0,qh.c)(15),")) {
|
|
450
|
+
return replaceOnce(
|
|
451
|
+
text,
|
|
452
|
+
"c=(0,$.jsx)(`span`,{className:`min-w-0 truncate pr-1`,children:n})",
|
|
453
|
+
"c=(0,$.jsx)(`span`,{\"data-codex-plus-sidebar-name\":``,className:`min-w-0 truncate pr-1`,children:n})",
|
|
454
|
+
"project header sidebar blur label anchor",
|
|
455
|
+
);
|
|
456
|
+
}
|
|
457
|
+
if (!text.includes("openFolder:$y,toggleSidebar:$i,toggleTerminal:Md,")) {
|
|
458
|
+
return replaceOnce(
|
|
459
|
+
text,
|
|
460
|
+
"se=(0,$.jsx)(`span`,{className:`flex min-w-0 flex-1 items-center gap-2 whitespace-nowrap`,children:(0,$.jsx)(lg,{label:O,labelEnd:ae,labelTooltipContent:oe})})",
|
|
461
|
+
"se=(0,$.jsx)(`span`,{\"data-codex-plus-sidebar-name\":``,className:`flex min-w-0 flex-1 items-center gap-2 whitespace-nowrap`,children:(0,$.jsx)(lg,{label:O,labelEnd:ae,labelTooltipContent:oe})})",
|
|
462
|
+
"project header sidebar blur label anchor",
|
|
463
|
+
);
|
|
464
|
+
}
|
|
264
465
|
let patched = text;
|
|
265
466
|
patched = replaceOnce(
|
|
266
467
|
patched,
|
|
@@ -282,113 +483,44 @@ function patchAppMainSidebarBlur(text) {
|
|
|
282
483
|
);
|
|
283
484
|
}
|
|
284
485
|
|
|
285
|
-
function patchSidebarProjectHoverCardSourceRows(text) {
|
|
286
|
-
let patched = text;
|
|
287
|
-
patched = replaceOnce(
|
|
288
|
-
patched,
|
|
289
|
-
"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,",
|
|
290
|
-
"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,",
|
|
291
|
-
"sidebar row component data attributes prop anchor",
|
|
292
|
-
);
|
|
293
|
-
patched = replaceOnce(
|
|
294
|
-
patched,
|
|
295
|
-
"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?",
|
|
296
|
-
"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?",
|
|
297
|
-
"sidebar row component data attributes memo dependency anchor",
|
|
298
|
-
);
|
|
299
|
-
patched = replaceOnce(
|
|
300
|
-
patched,
|
|
301
|
-
"onArchiveStart:L,onArchiveSuccess:z,onArchiveError:B}",
|
|
302
|
-
"onArchiveStart:L,onArchiveSuccess:z,onArchiveError:B,dataAttributes:CPX_rowDataAttributes}",
|
|
303
|
-
"sidebar row component data attributes object anchor",
|
|
304
|
-
);
|
|
305
|
-
patched = replaceOnce(
|
|
306
|
-
patched,
|
|
307
|
-
"t[32]=w,t[33]=V,t[34]=T,t[35]=H):H=t[35]",
|
|
308
|
-
"t[32]=w,t[33]=V,t[34]=T,t[40]=CPX_rowDataAttributes,t[35]=H):H=t[35]",
|
|
309
|
-
"sidebar row component data attributes memo write anchor",
|
|
310
|
-
);
|
|
311
|
-
patched = replaceOnce(
|
|
312
|
-
patched,
|
|
313
|
-
"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,",
|
|
314
|
-
"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,",
|
|
315
|
-
"sidebar row dispatcher data attributes prop anchor",
|
|
316
|
-
);
|
|
317
|
-
patched = replaceOnce(
|
|
318
|
-
patched,
|
|
319
|
-
"dataAttributes:ae.sidebarThreadRow({active:s,hostId:t.hostId,id:n,kind:`pending-worktree`,pinned:r,title:t.label})",
|
|
320
|
-
`dataAttributes:${sidebarMergeDataAttributes("ae.sidebarThreadRow({active:s,hostId:t.hostId,id:n,kind:`pending-worktree`,pinned:r,title:t.label})", "CPX_rowDataAttributes")}`,
|
|
321
|
-
"pending worktree sidebar row data attributes merge anchor",
|
|
322
|
-
);
|
|
323
|
-
patched = replaceOnce(
|
|
324
|
-
patched,
|
|
325
|
-
"dataAttributes:ae.sidebarThreadRow({active:s,hostId:null,id:t,kind:`remote`,pinned:r,title:e.task.title??``})",
|
|
326
|
-
`dataAttributes:${sidebarMergeDataAttributes("ae.sidebarThreadRow({active:s,hostId:null,id:t,kind:`remote`,pinned:r,title:e.task.title??``})", "CPX_rowDataAttributes")}`,
|
|
327
|
-
"remote sidebar row data attributes merge anchor",
|
|
328
|
-
);
|
|
329
|
-
patched = replaceOnce(
|
|
330
|
-
patched,
|
|
331
|
-
"dataAttributes:ae.sidebarThreadRow({active:s,hostId:f,id:i,kind:`local`,pinned:r,title:x})",
|
|
332
|
-
`dataAttributes:${sidebarMergeDataAttributes("ae.sidebarThreadRow({active:s,hostId:f,id:i,kind:`local`,pinned:r,title:x})", "CPX_rowDataAttributes")}`,
|
|
333
|
-
"local sidebar row data attributes merge anchor",
|
|
334
|
-
);
|
|
335
|
-
patched = replaceOnce(
|
|
336
|
-
patched,
|
|
337
|
-
"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]",
|
|
338
|
-
"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]",
|
|
339
|
-
"pending worktree sidebar row data attributes memo write anchor",
|
|
340
|
-
);
|
|
341
|
-
patched = replaceOnce(
|
|
342
|
-
patched,
|
|
343
|
-
"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?",
|
|
344
|
-
"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?",
|
|
345
|
-
"remote sidebar row data attributes memo dependency anchor",
|
|
346
|
-
);
|
|
347
|
-
patched = replaceOnce(
|
|
348
|
-
patched,
|
|
349
|
-
"t[63]=W,t[64]=Xe,t[65]=et,t[66]=H,t[67]=U,t[68]=ht):ht=t[68]",
|
|
350
|
-
"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]",
|
|
351
|
-
"remote sidebar row data attributes memo write anchor",
|
|
352
|
-
);
|
|
353
|
-
patched = replaceOnce(
|
|
354
|
-
patched,
|
|
355
|
-
"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?",
|
|
356
|
-
"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?",
|
|
357
|
-
"local sidebar row data attributes memo dependency anchor",
|
|
358
|
-
);
|
|
359
|
-
patched = replaceOnce(
|
|
360
|
-
patched,
|
|
361
|
-
"t[108]=H,t[109]=be,t[110]=U,t[111]=vt):vt=t[111]",
|
|
362
|
-
"t[108]=H,t[109]=be,t[110]=U,t[123]=CPX_rowDataAttributes,t[111]=vt):vt=t[111]",
|
|
363
|
-
"local sidebar row data attributes memo write anchor",
|
|
364
|
-
);
|
|
365
|
-
patched = replaceOnce(
|
|
366
|
-
patched,
|
|
367
|
-
"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?",
|
|
368
|
-
"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?",
|
|
369
|
-
"thread list row options data attributes memo dependency anchor",
|
|
370
|
-
);
|
|
371
|
-
patched = replaceOnce(
|
|
372
|
-
patched,
|
|
373
|
-
"showPinActionOnHover:l?.showPinActionOnHover,variant:l?.variant,shortcutLabel:b?.get(e)}),",
|
|
374
|
-
"showPinActionOnHover:l?.showPinActionOnHover,variant:l?.variant,shortcutLabel:b?.get(e),dataAttributes:l?.dataAttributes}),",
|
|
375
|
-
"thread list row options data attributes prop anchor",
|
|
376
|
-
);
|
|
377
|
-
patched = replaceOnce(
|
|
378
|
-
patched,
|
|
379
|
-
"t[24]=l?.variant,t[25]=b,t[26]=j):j=t[26]",
|
|
380
|
-
"t[24]=l?.variant,t[25]=b,t[43]=l?.dataAttributes,t[26]=j):j=t[26]",
|
|
381
|
-
"thread list row options data attributes memo write anchor",
|
|
382
|
-
);
|
|
383
|
-
return replaceOnce(
|
|
384
|
-
patched,
|
|
385
|
-
"function Rn(e){let t=(0,zt.c)(43),",
|
|
386
|
-
"function Rn(e){let t=(0,zt.c)(44),",
|
|
387
|
-
"thread list memo cache size anchor",
|
|
388
|
-
);
|
|
389
|
-
}
|
|
390
|
-
|
|
391
486
|
function patchHeader(text) {
|
|
487
|
+
if (
|
|
488
|
+
text.includes("function Jn(e){let t=(0,$n.c)(66),") &&
|
|
489
|
+
text.includes("(0,$.jsx)(L,{color:`ghostActive`,type:`button`,onClick:u,")
|
|
490
|
+
) {
|
|
491
|
+
let patched = replaceOnce(
|
|
492
|
+
text,
|
|
493
|
+
"function Jn(e){let t=(0,$n.c)(66),",
|
|
494
|
+
`${threadHeaderHook()}function Jn(e){let t=(0,$n.c)(66),`,
|
|
495
|
+
"thread header accessory helper insertion anchor",
|
|
496
|
+
);
|
|
497
|
+
patched = replaceOnce(
|
|
498
|
+
patched,
|
|
499
|
+
"let x;t[35]!==c||t[36]!==g||t[37]!==i?",
|
|
500
|
+
"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?",
|
|
501
|
+
"thread header accessory context anchor",
|
|
502
|
+
);
|
|
503
|
+
return replaceOnce(
|
|
504
|
+
patched,
|
|
505
|
+
"children:(0,$.jsx)(`span`,{className:`truncate`,children:i})})]}):",
|
|
506
|
+
"children:(0,$.jsx)(`span`,{className:`truncate`,children:i})}),CPX_headerAccessories]}):",
|
|
507
|
+
"thread header accessory render anchor",
|
|
508
|
+
);
|
|
509
|
+
}
|
|
510
|
+
if (text.includes("function Jn(e){let t=(0,$n.c)(66),")) {
|
|
511
|
+
let patched = replaceOnce(
|
|
512
|
+
text,
|
|
513
|
+
"function Jn(e){let t=(0,$n.c)(66),",
|
|
514
|
+
`${threadHeaderHook()}function Jn(e){let t=(0,$n.c)(66),`,
|
|
515
|
+
"thread header accessory helper insertion anchor",
|
|
516
|
+
);
|
|
517
|
+
return replaceOnce(
|
|
518
|
+
patched,
|
|
519
|
+
"let x;t[35]!==c||t[36]!==g||t[37]!==i?(x=(0,$.jsx)(`div`,{className:`mr-3 line-clamp-1 flex min-w-0 flex-1 items-center gap-1 truncate`,style:{viewTransitionName:`header-title`},children:i?(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-1`,children:[(0,$.jsx)(Qn,{onClick:c}),(0,$.jsx)(q,{color:`ghostActive`,type:`button`,onClick:u,className:`min-w-0 flex-1 truncate !px-0 !py-0 text-left text-sm text-token-foreground hover:!bg-transparent hover:opacity-80 electron:font-medium`,children:(0,$.jsx)(`span`,{className:`truncate`,children:i})})]}):(0,$.jsx)(`span`,{className:`text-token-description-foreground`,children:(0,$.jsx)(Zn,{mergedTasks:g,onBack:c,showBackButton:!0})})}),t[35]=c,t[36]=g,t[37]=i,t[38]=x):x=t[38];",
|
|
520
|
+
"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:me}});let x;t[35]!==c||t[36]!==g||t[37]!==i?(x=(0,$.jsx)(`div`,{className:`mr-3 line-clamp-1 flex min-w-0 flex-1 items-center gap-1 truncate`,style:{viewTransitionName:`header-title`},children:i?(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-1`,children:[(0,$.jsx)(Qn,{onClick:c}),(0,$.jsx)(q,{color:`ghostActive`,type:`button`,onClick:u,className:`min-w-0 flex-1 truncate !px-0 !py-0 text-left text-sm text-token-foreground hover:!bg-transparent hover:opacity-80 electron:font-medium`,children:(0,$.jsx)(`span`,{className:`truncate`,children:i})}),CPX_headerAccessories]}):(0,$.jsx)(`span`,{className:`text-token-description-foreground`,children:(0,$.jsx)(Zn,{mergedTasks:g,onBack:c,showBackButton:!0})})}),t[35]=c,t[36]=g,t[37]=i,t[38]=x):x=t[38];",
|
|
521
|
+
"thread header accessory render anchor",
|
|
522
|
+
);
|
|
523
|
+
}
|
|
392
524
|
let patched = replaceOnce(
|
|
393
525
|
text,
|
|
394
526
|
`import{Z as r,a as i,s as a}from"./app-scope-CWE-zIhQ.js";`,
|
|
@@ -410,21 +542,15 @@ function patchHeader(text) {
|
|
|
410
542
|
patched = replaceOnce(
|
|
411
543
|
patched,
|
|
412
544
|
"function lt(e){let t=(0,Z.c)(68),",
|
|
413
|
-
`${threadHeaderHook()}function lt(e){let t=(0,Z.c)(
|
|
545
|
+
`${threadHeaderHook()}function lt(e){let t=(0,Z.c)(68),`,
|
|
414
546
|
"thread header accessory helper insertion anchor",
|
|
415
547
|
);
|
|
416
548
|
patched = replaceOnce(
|
|
417
549
|
patched,
|
|
418
550
|
"let C;t[36]!==c||t[37]!==g||t[38]!==i?(C=(0,Q.jsx)(`div`,{className:`mr-3 line-clamp-1 flex min-w-0 flex-1 items-center gap-1 truncate`,style:{viewTransitionName:`header-title`},children:i?(0,Q.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-1`,children:[(0,Q.jsx)(mt,{onClick:c}),(0,Q.jsx)(x,{color:`ghostActive`,type:`button`,onClick:u,className:`min-w-0 flex-1 truncate !px-0 !py-0 text-left text-sm text-token-foreground hover:!bg-transparent hover:opacity-80 electron:font-medium`,children:(0,Q.jsx)(`span`,{className:`truncate`,children:i})})]}):(0,Q.jsx)(`span`,{className:`text-token-description-foreground`,children:(0,Q.jsx)(pt,{mergedTasks:g,onBack:c,showBackButton:!0})})}),t[36]=c,t[37]=g,t[38]=i,t[39]=C):C=t[39];",
|
|
419
|
-
"let CPX_headerContext={cwd:CPX_readAtom(CPX_headerCwd),hostId:CPX_readAtom(CPX_headerHostId)},CPX_headerAccessories=CPXThreadHeaderAccessories({context:CPX_headerContext,deps:{jsx:Q.jsx,jsxs:Q.jsxs,Tooltip:CPX_Tooltip}});let C;t[36]!==c||t[37]!==g||t[38]!==i
|
|
551
|
+
"let CPX_headerContext={cwd:CPX_readAtom(CPX_headerCwd),hostId:CPX_readAtom(CPX_headerHostId)},CPX_headerAccessories=CPXThreadHeaderAccessories({context:CPX_headerContext,deps:{jsx:Q.jsx,jsxs:Q.jsxs,Tooltip:CPX_Tooltip}});let C;t[36]!==c||t[37]!==g||t[38]!==i?(C=(0,Q.jsx)(`div`,{className:`mr-3 line-clamp-1 flex min-w-0 flex-1 items-center gap-1 truncate`,style:{viewTransitionName:`header-title`},children:i?(0,Q.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-1`,children:[(0,Q.jsx)(mt,{onClick:c}),(0,Q.jsx)(x,{color:`ghostActive`,type:`button`,onClick:u,className:`min-w-0 flex-1 truncate !px-0 !py-0 text-left text-sm text-token-foreground hover:!bg-transparent hover:opacity-80 electron:font-medium`,children:(0,Q.jsx)(`span`,{className:`truncate`,children:i})}),CPX_headerAccessories]}):(0,Q.jsx)(`span`,{className:`text-token-description-foreground`,children:(0,Q.jsx)(pt,{mergedTasks:g,onBack:c,showBackButton:!0})})}),t[36]=c,t[37]=g,t[38]=i,t[39]=C):C=t[39];",
|
|
420
552
|
"thread header accessory render anchor",
|
|
421
553
|
);
|
|
422
|
-
patched = replaceOnce(
|
|
423
|
-
patched,
|
|
424
|
-
"t[53]!==A||t[54]!==b||t[55]!==S||t[56]!==C?(M=(0,Q.jsxs)(`div`,{className:b,children:[S,C,A]}),t[53]=A,t[54]=b,t[55]=S,t[56]=C,t[57]=M):M=t[57]",
|
|
425
|
-
"t[53]!==A||t[54]!==b||t[55]!==S||t[56]!==C?(M=(0,Q.jsxs)(`div`,{className:b,children:[S,C,A]}),t[53]=A,t[54]=b,t[55]=S,t[56]=C,t[57]=M):M=t[57]",
|
|
426
|
-
"thread header accessory mount anchor",
|
|
427
|
-
);
|
|
428
554
|
return patched;
|
|
429
555
|
}
|
|
430
556
|
|
|
@@ -433,47 +559,119 @@ function patchThreadPageHeader(text) {
|
|
|
433
559
|
patched = replaceOnce(
|
|
434
560
|
patched,
|
|
435
561
|
"function c(e){let t=(0,o.c)(21),",
|
|
436
|
-
`${threadHeaderHook()}function c(e){let t=(0,o.c)(
|
|
562
|
+
`${threadHeaderHook()}function c(e){let t=(0,o.c)(21),`,
|
|
437
563
|
"thread page header helper insertion anchor",
|
|
438
564
|
);
|
|
439
565
|
patched = replaceOnce(
|
|
440
566
|
patched,
|
|
441
|
-
"let t=(0,o.c)(
|
|
442
|
-
"let t=(0,o.c)(
|
|
567
|
+
"let t=(0,o.c)(21),{start:c,startActions:l,env:u,secondary:d,trailing:f,hostConfig:p}=e,m;",
|
|
568
|
+
"let t=(0,o.c)(21),{start:c,startActions:l,env:u,secondary:d,trailing:f,hostConfig:p,cwd:CPX_headerCwd}=e,CPX_headerContext={cwd:CPX_headerCwd,hostId:p?.id??null,header:{env:u,hostDisplayName:p?.display_name??null,startText:typeof c==`string`?c:null,secondaryText:typeof d==`string`?d:null,hasTrailing:f!=null}},CPX_headerAccessories=CPXThreadHeaderAccessories({context:CPX_headerContext,deps:{jsx:s.jsx,jsxs:s.jsxs}}),m;",
|
|
443
569
|
"thread page header accessory render anchor",
|
|
444
570
|
);
|
|
445
571
|
patched = replaceOnce(
|
|
446
572
|
patched,
|
|
447
573
|
"t[8]!==l||t[9]!==v||t[10]!==y||t[11]!==b?(x=(0,s.jsxs)(`div`,{className:`text-md flex min-w-0 items-center gap-2 truncate text-base electron:font-medium`,children:[v,y,b,l]}),t[8]=l,t[9]=v,t[10]=y,t[11]=b,t[12]=x):x=t[12]",
|
|
448
|
-
"t[8]!==l||t[9]!==v||t[10]!==y||t[11]!==b
|
|
574
|
+
"t[8]!==l||t[9]!==v||t[10]!==y||t[11]!==b?(x=(0,s.jsxs)(`div`,{className:`text-md flex min-w-0 items-center gap-2 truncate text-base electron:font-medium`,children:[v,y,b,CPX_headerAccessories,l]}),t[8]=l,t[9]=v,t[10]=y,t[11]=b,t[12]=x):x=t[12]",
|
|
449
575
|
"thread page header accessory mount anchor",
|
|
450
576
|
);
|
|
451
577
|
return patched;
|
|
452
578
|
}
|
|
453
579
|
|
|
454
580
|
function patchLocalConversationPageHeader(text) {
|
|
581
|
+
if (text.includes("function pi(e){let t=(0,W.c)(32),")) {
|
|
582
|
+
let patched = replaceOnce(
|
|
583
|
+
text,
|
|
584
|
+
"function pi(e){let t=(0,W.c)(32),",
|
|
585
|
+
`${threadHeaderHook()}function pi(e){let t=(0,W.c)(32),`,
|
|
586
|
+
"local conversation header helper insertion anchor",
|
|
587
|
+
);
|
|
588
|
+
patched = replaceOnce(
|
|
589
|
+
patched,
|
|
590
|
+
"let k;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(k=null,t[26]=k):k=t[26];",
|
|
591
|
+
"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}});",
|
|
592
|
+
"local conversation header accessory render anchor",
|
|
593
|
+
);
|
|
594
|
+
return patched;
|
|
595
|
+
}
|
|
596
|
+
if (text.includes("function mi(e){let t=(0,U.c)(32),")) {
|
|
597
|
+
let patched = replaceOnce(
|
|
598
|
+
text,
|
|
599
|
+
"function mi(e){let t=(0,U.c)(32),",
|
|
600
|
+
`${threadHeaderHook()}function mi(e){let t=(0,U.c)(32),`,
|
|
601
|
+
"local conversation header helper insertion anchor",
|
|
602
|
+
);
|
|
603
|
+
patched = replaceOnce(
|
|
604
|
+
patched,
|
|
605
|
+
"let t=(0,U.c)(32),{conversationId:n,getConversationMarkdown:r,markdownParentConversationId:i,projectIcon:a,projectHoverCardContent:s,projectName:c,title:l,titleSuffix:u,cwd:d,canPin:f,hideForkActions:p}=e,g=f===void 0?!0:f,_=N(),v=h(),y;",
|
|
606
|
+
"let t=(0,U.c)(32),{conversationId:n,getConversationMarkdown:r,markdownParentConversationId:i,projectIcon:a,projectHoverCardContent:s,projectName:c,title:l,titleSuffix:u,cwd:d,canPin:f,hideForkActions:p}=e,CPX_headerContext={cwd:d,hostId:null,header:{surface:`local-conversation`,titleText:typeof l==`string`?l:null,projectName:c??null}},CPX_headerAccessories=CPXThreadHeaderAccessories({context:CPX_headerContext,deps:{jsx:W.jsx,jsxs:W.jsxs,Tooltip:wt}}),g=f===void 0?!0:f,_=N(),v=h(),y;",
|
|
607
|
+
"local conversation header accessory render anchor",
|
|
608
|
+
);
|
|
609
|
+
patched = replaceOnce(
|
|
610
|
+
patched,
|
|
611
|
+
"let O;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(O=null,t[26]=O):O=t[26];",
|
|
612
|
+
"let O=CPX_headerAccessories;",
|
|
613
|
+
"local conversation header accessory slot anchor",
|
|
614
|
+
);
|
|
615
|
+
return replaceOnce(
|
|
616
|
+
patched,
|
|
617
|
+
"let k;return t[27]!==C||t[28]!==T||t[29]!==E||t[30]!==D?(k=(0,W.jsx)(`div`,{className:`draggable grid w-full min-w-0 grid-cols-[minmax(0,1fr)] items-center gap-x-4 electron:h-toolbar extension:py-row-y`,children:(0,W.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 truncate text-base electron:font-medium`,children:[C,T,E,D,O]})}),t[27]=C,t[28]=T,t[29]=E,t[30]=D,t[31]=k):k=t[31],k}",
|
|
618
|
+
"let k;return t[27]!==C||t[28]!==T||t[29]!==E||t[30]!==D?(k=(0,W.jsx)(`div`,{className:`draggable grid w-full min-w-0 grid-cols-[minmax(0,1fr)] items-center gap-x-4 electron:h-toolbar extension:py-row-y`,children:(0,W.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 truncate text-base electron:font-medium`,children:[C,T,E,D,O]})}),t[27]=C,t[28]=T,t[29]=E,t[30]=D,t[31]=k):k=t[31],k}",
|
|
619
|
+
"local conversation header accessory mount anchor",
|
|
620
|
+
);
|
|
621
|
+
}
|
|
455
622
|
let patched = replaceOnce(
|
|
456
623
|
text,
|
|
457
624
|
"function Tt(e){let t=(0,Y.c)(42),",
|
|
458
|
-
`${threadHeaderHook()}function Tt(e){let t=(0,Y.c)(
|
|
625
|
+
`${threadHeaderHook()}function Tt(e){let t=(0,Y.c)(42),`,
|
|
459
626
|
"local conversation header helper insertion anchor",
|
|
460
627
|
);
|
|
461
628
|
patched = replaceOnce(
|
|
462
629
|
patched,
|
|
463
|
-
"let t=(0,Y.c)(
|
|
464
|
-
"let t=(0,Y.c)(
|
|
630
|
+
"let t=(0,Y.c)(42),{conversationId:n,getConversationMarkdown:r,markdownParentConversationId:a,title:o,titleSuffix:s,cwd:c,canPin:l,hideProjectMetadata:d,hideForkActions:f}=e,p=l===void 0?!0:l,m=d===void 0?!1:d,h=A(),g;",
|
|
631
|
+
"let t=(0,Y.c)(42),{conversationId:n,getConversationMarkdown:r,markdownParentConversationId:a,title:o,titleSuffix:s,cwd:c,canPin:l,hideProjectMetadata:d,hideForkActions:f}=e,CPX_headerContext={cwd:c,hostId:u(i(O,n)).id,header:{surface:`local-conversation`,titleText:typeof o==`string`?o:null}},CPX_headerAccessories=CPXThreadHeaderAccessories({context:CPX_headerContext,deps:{jsx:Z.jsx,jsxs:Z.jsxs}}),p=l===void 0?!0:l,m=d===void 0?!1:d,h=A(),g;",
|
|
465
632
|
"local conversation header accessory render anchor",
|
|
466
633
|
);
|
|
467
634
|
patched = replaceOnce(
|
|
468
635
|
patched,
|
|
469
636
|
"t[38]!==F||t[39]!==I||t[40]!==L?(z=(0,Z.jsx)(`div`,{className:`draggable grid w-full min-w-0 grid-cols-[minmax(0,1fr)] items-center gap-x-4 electron:h-toolbar extension:py-row-y`,children:(0,Z.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 truncate text-base electron:font-medium`,children:[F,I,L,R]})}),t[38]=F,t[39]=I,t[40]=L,t[41]=z):z=t[41]",
|
|
470
|
-
"t[38]!==F||t[39]!==I||t[40]!==L
|
|
637
|
+
"t[38]!==F||t[39]!==I||t[40]!==L?(z=(0,Z.jsx)(`div`,{className:`draggable grid w-full min-w-0 grid-cols-[minmax(0,1fr)] items-center gap-x-4 electron:h-toolbar extension:py-row-y`,children:(0,Z.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 truncate text-base electron:font-medium`,children:[F,I,L,CPX_headerAccessories,R]})}),t[38]=F,t[39]=I,t[40]=L,t[41]=z):z=t[41]",
|
|
471
638
|
"local conversation header accessory mount anchor",
|
|
472
639
|
);
|
|
473
640
|
return patched;
|
|
474
641
|
}
|
|
475
642
|
|
|
476
643
|
function patchGeneralSettingsUserBubbleColors(text) {
|
|
644
|
+
if (
|
|
645
|
+
text.includes("function Lr({showCodeFont:e,showTranslucentSidebarToggle:t,variant:n}){") &&
|
|
646
|
+
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")
|
|
647
|
+
) {
|
|
648
|
+
let patched = replaceOnce(
|
|
649
|
+
text,
|
|
650
|
+
"function Lr({showCodeFont:e,showTranslucentSidebarToggle:t,variant:n}){",
|
|
651
|
+
`${appearanceSettingsHook("{React:ti,jsx:J.jsx,SettingRow:L,ColorInput:Hr,Switch:Ze}")}function Lr({showCodeFont:e,showTranslucentSidebarToggle:t,variant:n}){`,
|
|
652
|
+
"user bubble settings helper insertion anchor",
|
|
653
|
+
);
|
|
654
|
+
return replaceOnce(
|
|
655
|
+
patched,
|
|
656
|
+
"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",
|
|
657
|
+
"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)),...CPXAppearanceRows(n),E.map",
|
|
658
|
+
"user bubble settings row anchor",
|
|
659
|
+
);
|
|
660
|
+
}
|
|
661
|
+
if (text.includes("function Lr({showCodeFont:e,showTranslucentSidebarToggle:t,variant:n}){")) {
|
|
662
|
+
let patched = replaceOnce(
|
|
663
|
+
text,
|
|
664
|
+
"function Lr({showCodeFont:e,showTranslucentSidebarToggle:t,variant:n}){",
|
|
665
|
+
`${appearanceSettingsHook("{React:ti,jsx:J.jsx,SettingRow:L,ColorInput:Hr,Switch:qt}")}function Lr({showCodeFont:e,showTranslucentSidebarToggle:t,variant:n}){`,
|
|
666
|
+
"user bubble settings helper insertion anchor",
|
|
667
|
+
);
|
|
668
|
+
return replaceOnce(
|
|
669
|
+
patched,
|
|
670
|
+
"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",
|
|
671
|
+
"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",
|
|
672
|
+
"user bubble settings row anchor",
|
|
673
|
+
);
|
|
674
|
+
}
|
|
477
675
|
let patched = replaceOnce(
|
|
478
676
|
text,
|
|
479
677
|
"function tn({showCodeFont:e,showTranslucentSidebarToggle:t,variant:n}){",
|
|
@@ -489,6 +687,46 @@ function patchGeneralSettingsUserBubbleColors(text) {
|
|
|
489
687
|
}
|
|
490
688
|
|
|
491
689
|
function patchUserMessageAttachmentsBubbleColors(text) {
|
|
690
|
+
if (text.includes("function xst({cwd:e,hostId:t,initialMessage:n,onCancel:r,onDraftChange:i,onSubmit:a}){")) {
|
|
691
|
+
let patched = replaceOnce(
|
|
692
|
+
text,
|
|
693
|
+
"function xst({cwd:e,hostId:t,initialMessage:n,onCancel:r,onDraftChange:i,onSubmit:a}){",
|
|
694
|
+
`${messageComposerHook()}function xst({cwd:e,hostId:t,initialMessage:n,onCancel:r,onDraftChange:i,onSubmit:a}){`,
|
|
695
|
+
"user bubble helper insertion anchor",
|
|
696
|
+
);
|
|
697
|
+
patched = replaceOnce(
|
|
698
|
+
patched,
|
|
699
|
+
"return(0,HK.jsx)(`form`,{className:`relative flex w-full flex-col rounded-3xl bg-token-foreground/5`,onSubmit:e=>{e.preventDefault(),v()},children:",
|
|
700
|
+
"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:",
|
|
701
|
+
"edit user message entry marker anchor",
|
|
702
|
+
);
|
|
703
|
+
return replaceOnce(
|
|
704
|
+
patched,
|
|
705
|
+
"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,",
|
|
706
|
+
"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,",
|
|
707
|
+
"user bubble marker attribute anchor",
|
|
708
|
+
);
|
|
709
|
+
}
|
|
710
|
+
if (text.includes("function qVn({cwd:e,hostId:t,initialMessage:n,onCancel:r,onDraftChange:i,onSubmit:a}){")) {
|
|
711
|
+
let patched = replaceOnce(
|
|
712
|
+
text,
|
|
713
|
+
"function qVn({cwd:e,hostId:t,initialMessage:n,onCancel:r,onDraftChange:i,onSubmit:a}){",
|
|
714
|
+
`${messageComposerHook()}function qVn({cwd:e,hostId:t,initialMessage:n,onCancel:r,onDraftChange:i,onSubmit:a}){`,
|
|
715
|
+
"user bubble helper insertion anchor",
|
|
716
|
+
);
|
|
717
|
+
patched = replaceOnce(
|
|
718
|
+
patched,
|
|
719
|
+
"return(0,b1.jsx)(`form`,{className:`relative flex w-full flex-col rounded-3xl bg-token-foreground/5`,onSubmit:e=>{e.preventDefault(),v()},children:",
|
|
720
|
+
"return(0,b1.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:",
|
|
721
|
+
"edit user message entry marker anchor",
|
|
722
|
+
);
|
|
723
|
+
return replaceOnce(
|
|
724
|
+
patched,
|
|
725
|
+
"me=B?(0,S1.jsx)(`div`,{className:`w-full p-px`,children:(0,S1.jsx)(qVn,{cwd:x??null,hostId:S,initialMessage:z.trim(),onCancel:()=>{ie(null)},onDraftChange:e=>{ie(e)},onSubmit:oe})}):G?(0,S1.jsx)(`div`,{\"data-user-message-bubble\":!0,role:I?`button`:void 0,tabIndex:0,className:Y(e,`text-left focus-visible:ring-2 focus-visible:ring-token-focus-border focus-visible:outline-none`,I&&`cursor-interaction`),",
|
|
726
|
+
"me=B?(0,S1.jsx)(`div`,{className:`w-full p-px`,children:(0,S1.jsx)(qVn,{cwd:x??null,hostId:S,initialMessage:z.trim(),onCancel:()=>{ie(null)},onDraftChange:e=>{ie(e)},onSubmit:oe})}):G?(0,S1.jsx)(`div`,{\"data-user-message-bubble\":!0,...CPXBubbleProps({}),role:I?`button`:void 0,tabIndex:0,className:Y(e,`text-left focus-visible:ring-2 focus-visible:ring-token-focus-border focus-visible:outline-none`,I&&`cursor-interaction`),",
|
|
727
|
+
"user bubble marker attribute anchor",
|
|
728
|
+
);
|
|
729
|
+
}
|
|
492
730
|
let patched = replaceOnce(
|
|
493
731
|
text,
|
|
494
732
|
"var Z=i(),Q=e(n(),1),$=r();function Ue(e){",
|
|
@@ -510,6 +748,14 @@ function patchUserMessageAttachmentsBubbleColors(text) {
|
|
|
510
748
|
}
|
|
511
749
|
|
|
512
750
|
function patchUserMessageAttachmentsProjectColors(text) {
|
|
751
|
+
if (text.includes("\"data-user-message-bubble\":!0,...CPXBubbleProps({}),role:I?`button`:void 0,")) {
|
|
752
|
+
return replaceOnce(
|
|
753
|
+
text,
|
|
754
|
+
"\"data-user-message-bubble\":!0,...CPXBubbleProps({}),role:I?`button`:void 0,",
|
|
755
|
+
"\"data-user-message-bubble\":!0,...CPXBubbleProps({project:{cwd:x,hostId:S}}),role:I?`button`:void 0,",
|
|
756
|
+
"user bubble project marker attribute anchor",
|
|
757
|
+
);
|
|
758
|
+
}
|
|
513
759
|
let patched = replaceOnce(
|
|
514
760
|
text,
|
|
515
761
|
`import{Aa as x,Ta as S}from"./${srcFile}";`,
|
|
@@ -531,28 +777,108 @@ function patchUserMessageAttachmentsProjectColors(text) {
|
|
|
531
777
|
}
|
|
532
778
|
|
|
533
779
|
function patchComposerBubbleColors(text) {
|
|
780
|
+
if (text.includes("function FN(e){let t=(0,YN.c)(13),")) {
|
|
781
|
+
let patched = replaceOnce(
|
|
782
|
+
text,
|
|
783
|
+
"function FN(e){let t=(0,YN.c)(13),",
|
|
784
|
+
`${messageComposerHook()}function FN(e){let t=(0,YN.c)(13),`,
|
|
785
|
+
"composer user bubble helper insertion anchor",
|
|
786
|
+
);
|
|
787
|
+
patched = replaceOnce(
|
|
788
|
+
patched,
|
|
789
|
+
"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,",
|
|
790
|
+
"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,",
|
|
791
|
+
"composer host surface props anchor",
|
|
792
|
+
);
|
|
793
|
+
return replaceOnce(
|
|
794
|
+
patched,
|
|
795
|
+
"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}",
|
|
796
|
+
"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}",
|
|
797
|
+
"composer user entry marker render anchor",
|
|
798
|
+
);
|
|
799
|
+
}
|
|
800
|
+
if (
|
|
801
|
+
text.includes("function Ss(e){if(H?.type!==`local`") &&
|
|
802
|
+
text.includes("(0,iW.jsx)(eW,{className:A,externalFooterVariant:k,hasDropTargetPortal:fc,")
|
|
803
|
+
) {
|
|
804
|
+
let patched = replaceOnce(
|
|
805
|
+
text,
|
|
806
|
+
"function Ss(e){if(H?.type!==`local`",
|
|
807
|
+
`${messageComposerHook()}function Ss(e){if(H?.type!==\`local\``,
|
|
808
|
+
"composer user bubble helper insertion anchor",
|
|
809
|
+
);
|
|
810
|
+
return replaceOnce(
|
|
811
|
+
patched,
|
|
812
|
+
"(0,iW.jsx)(eW,{className:A,externalFooterVariant:k,hasDropTargetPortal:fc,",
|
|
813
|
+
"(0,iW.jsx)(eW,{...CPXSurfaceProps({}),className:A,externalFooterVariant:k,hasDropTargetPortal:fc,",
|
|
814
|
+
"composer user entry marker render anchor",
|
|
815
|
+
);
|
|
816
|
+
}
|
|
817
|
+
if (text.includes("function Wbe(e){let t=(0,gW.c)(13),")) {
|
|
818
|
+
let patched = replaceOnce(
|
|
819
|
+
text,
|
|
820
|
+
"function Wbe(e){let t=(0,gW.c)(13),",
|
|
821
|
+
`${messageComposerHook()}function Wbe(e){let t=(0,gW.c)(13),`,
|
|
822
|
+
"composer user bubble helper insertion anchor",
|
|
823
|
+
);
|
|
824
|
+
patched = replaceOnce(
|
|
825
|
+
patched,
|
|
826
|
+
"function Wbe(e){let t=(0,gW.c)(13),{children:n,className:r,externalFooterVariant:i,inert:a,isDragActive:o,layout:s,onDragEnter:c,onDragLeave:l,onDragOver:u,onDrop:d}=e,",
|
|
827
|
+
"function Wbe(e){let t=(0,gW.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({}),",
|
|
828
|
+
"composer host surface props anchor",
|
|
829
|
+
);
|
|
830
|
+
return replaceOnce(
|
|
831
|
+
patched,
|
|
832
|
+
"return t[5]!==n||t[6]!==a||t[7]!==c||t[8]!==l||t[9]!==u||t[10]!==d||t[11]!==v?(y=(0,_W.jsx)(Su.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}",
|
|
833
|
+
"return t[5]!==n||t[6]!==a||t[7]!==c||t[8]!==l||t[9]!==u||t[10]!==d||t[11]!==v?(y=(0,_W.jsx)(Su.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}",
|
|
834
|
+
"composer user entry marker render anchor",
|
|
835
|
+
);
|
|
836
|
+
}
|
|
534
837
|
let patched = replaceOnce(
|
|
535
838
|
text,
|
|
536
839
|
"function oh(e){let t=(0,$.c)(13),",
|
|
537
|
-
`${messageComposerHook()}function oh(e){let t=(0,$.c)(
|
|
840
|
+
`${messageComposerHook()}function oh(e){let t=(0,$.c)(13),`,
|
|
538
841
|
"composer user bubble helper insertion anchor",
|
|
539
842
|
);
|
|
540
843
|
patched = replaceOnce(
|
|
541
844
|
patched,
|
|
542
|
-
"function oh(e){let t=(0,$.c)(
|
|
543
|
-
"function oh(e){let t=(0,$.c)(
|
|
845
|
+
"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,",
|
|
846
|
+
"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,codexPlusProps:CPX_surfaceProps}=e,CPX_resolvedSurfaceProps=CPX_surfaceProps??CPXSurfaceProps({}),",
|
|
544
847
|
"composer host surface props anchor",
|
|
545
848
|
);
|
|
546
849
|
patched = replaceOnce(
|
|
547
850
|
patched,
|
|
548
851
|
"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}",
|
|
549
|
-
"return t[5]!==n||t[6]!==a||t[7]!==c||t[8]!==l||t[9]!==u||t[10]!==d||t[11]!==v
|
|
852
|
+
"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,...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}",
|
|
550
853
|
"composer user entry marker render anchor",
|
|
551
854
|
);
|
|
552
855
|
return patched;
|
|
553
856
|
}
|
|
554
857
|
|
|
555
858
|
function patchComposerProjectColors(text) {
|
|
859
|
+
if (text.includes("(0,iW.jsx)(eW,{className:A,externalFooterVariant:k,hasDropTargetPortal:fc,")) {
|
|
860
|
+
return replaceOnce(
|
|
861
|
+
text,
|
|
862
|
+
"(0,iW.jsx)(eW,{className:A,externalFooterVariant:k,hasDropTargetPortal:fc,",
|
|
863
|
+
"(0,iW.jsx)(eW,{...CPXSurfaceProps({project:{cwd:fn,hostId:sr}}),className:A,externalFooterVariant:k,hasDropTargetPortal:fc,",
|
|
864
|
+
"composer project accent style caller anchor",
|
|
865
|
+
);
|
|
866
|
+
}
|
|
867
|
+
if (text.includes("function Wbe(e){let t=(0,gW.c)(13),") && text.includes("CPX_resolvedSurfaceProps=CPX_surfaceProps??CPXSurfaceProps({})")) {
|
|
868
|
+
let patched = text;
|
|
869
|
+
patched = replaceOnce(
|
|
870
|
+
patched,
|
|
871
|
+
anchors.composerProjectStyleCaller,
|
|
872
|
+
anchors.composerProjectStyleCaller.replace(";return", ",CPX_composerSurfaceProps=CPXSurfaceProps({project:{cwd:ln??an,hostId:$n}});return"),
|
|
873
|
+
"composer project style hook-safe caller anchor",
|
|
874
|
+
);
|
|
875
|
+
return replaceOnce(
|
|
876
|
+
patched,
|
|
877
|
+
"(0,PY.jsx)(sEe,{className:w,externalFooterVariant:C,hasDropTargetPortal:As,",
|
|
878
|
+
"(0,PY.jsx)(sEe,{key:CPX_composerSurfaceProps?.[`data-codex-plus-project-color`]??``,className:w,externalFooterVariant:C,codexPlusProps:CPX_composerSurfaceProps,hasDropTargetPortal:As,",
|
|
879
|
+
"composer project accent style caller anchor",
|
|
880
|
+
);
|
|
881
|
+
}
|
|
556
882
|
let patched = replaceOnce(
|
|
557
883
|
text,
|
|
558
884
|
anchors.composerProjectImports,
|
|
@@ -568,7 +894,7 @@ function patchComposerProjectColors(text) {
|
|
|
568
894
|
return replaceOnce(
|
|
569
895
|
patched,
|
|
570
896
|
anchors.composerProjectAccentCaller,
|
|
571
|
-
anchors.composerProjectAccentCaller.replace(",onDragEnter:", ",codexPlusProps:!Ge&&!Hn?CPX_composerSurfaceProps:void 0,onDragEnter:"),
|
|
897
|
+
anchors.composerProjectAccentCaller.replace(",onDragEnter:", ",key:CPX_composerSurfaceProps?.[`data-codex-plus-project-color`]??``,codexPlusProps:!Ge&&!Hn?CPX_composerSurfaceProps:void 0,onDragEnter:"),
|
|
572
898
|
"composer project accent style caller anchor",
|
|
573
899
|
);
|
|
574
900
|
}
|
|
@@ -577,12 +903,28 @@ function patchElectronMenuShortcuts(text) {
|
|
|
577
903
|
return replaceOnce(
|
|
578
904
|
text,
|
|
579
905
|
"{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`,",
|
|
580
|
-
"{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:`codexPlus.focusProjectSelector`,title:`Focus project selector`,description:`Focus or open the new chat project selector`,commandMenuGroupKey:`workspace`,commandMenu:!0,electron:{menuTitle:`Focus project selector`,defaultKeybindings:[{key:`CmdOrCtrl+.`}]}},...(
|
|
906
|
+
"{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:`codexPlus.focusProjectSelector`,title:`Focus project selector`,description:`Focus or open the new chat project selector`,commandMenuGroupKey:`workspace`,commandMenu:!0,electron:{menuTitle:`Focus project selector`,defaultKeybindings:[{key:`CmdOrCtrl+.`}]}},{id:`codexPlusToggleSidebarNameBlur`,title:`Toggle sidebar blur`,description:`Blur or show sidebar chat and project names`,commandMenuGroupKey:`panels`,commandMenu:!0,electron:{menuTitle:`Toggle sidebar blur`,defaultKeybindings:[]}},...(globalThis.CodexPlus?.ui?.commands?.commandMetadata?.()?.filter?.(e=>e.id!==`codexPlus.focusProjectSelector`&&e.id!==`codexPlusToggleSidebarNameBlur`)??[]),{id:`toggleBottomPanel`,",
|
|
581
907
|
"sidebar blur command palette metadata anchor",
|
|
582
908
|
);
|
|
583
909
|
}
|
|
584
910
|
|
|
585
911
|
function patchKeyboardShortcutsSearchInput(text) {
|
|
912
|
+
if (text.includes("function qX(e,t){return`titleIntlId`in e?")) {
|
|
913
|
+
return replaceOnce(
|
|
914
|
+
text,
|
|
915
|
+
"function qX(e,t){return`titleIntlId`in e?YX(XX,e.titleIntlId)?t.formatMessage(XX[e.titleIntlId]):``:t.formatMessage(ZX[e.electron.menuTitleIntlId])}",
|
|
916
|
+
"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])}",
|
|
917
|
+
"generic command metadata title fallback anchor",
|
|
918
|
+
);
|
|
919
|
+
}
|
|
920
|
+
if (text.includes("function Kke(e,t){return`titleIntlId`in e?")) {
|
|
921
|
+
return replaceOnce(
|
|
922
|
+
text,
|
|
923
|
+
"function Kke(e,t){return`titleIntlId`in e?S0(C0,e.titleIntlId)?t.formatMessage(C0[e.titleIntlId]):``:t.formatMessage(w0[e.electron.menuTitleIntlId])}",
|
|
924
|
+
"function Kke(e,t){return`titleIntlId`in e?S0(C0,e.titleIntlId)?t.formatMessage(C0[e.titleIntlId]):``:e.title??e.electron?.menuTitle??t.formatMessage(w0[e.electron.menuTitleIntlId])}",
|
|
925
|
+
"generic command metadata title fallback anchor",
|
|
926
|
+
);
|
|
927
|
+
}
|
|
586
928
|
return replaceOnce(
|
|
587
929
|
text,
|
|
588
930
|
"function d(e,t){return`titleIntlId`in e?t.formatMessage(c[e.titleIntlId]):t.formatMessage(l[e.electron.menuTitleIntlId])}",
|
|
@@ -591,7 +933,53 @@ function patchKeyboardShortcutsSearchInput(text) {
|
|
|
591
933
|
);
|
|
592
934
|
}
|
|
593
935
|
|
|
936
|
+
function patchCommandMenuRuntimeCommands(text) {
|
|
937
|
+
if (text.includes("let m=ne?N.filter(VZ):N,_;")) {
|
|
938
|
+
return replaceOnce(
|
|
939
|
+
text,
|
|
940
|
+
"let m=ne?N.filter(VZ):N,_;",
|
|
941
|
+
"let m=[...(ne?N.filter(VZ):N),...(globalThis.CodexPlus?.ui?.commands?.commandMetadata?.()?.filter?.(e=>!N.some(t=>t.id===e.id))??[])],_;",
|
|
942
|
+
"command menu runtime command metadata anchor",
|
|
943
|
+
);
|
|
944
|
+
}
|
|
945
|
+
return replaceOnce(
|
|
946
|
+
text,
|
|
947
|
+
"let M=j,N;t[11]===o?N=t[12]:",
|
|
948
|
+
"let M=[...j,...(globalThis.CodexPlus?.ui?.commands?.commandMetadata?.()?.filter?.(e=>!j.some(t=>t.id===e.id))??[])],N;t[11]===o?N=t[12]:",
|
|
949
|
+
"command menu runtime command metadata anchor",
|
|
950
|
+
);
|
|
951
|
+
}
|
|
952
|
+
|
|
594
953
|
function patchLocalTaskRow(text) {
|
|
954
|
+
if (text.includes("function Ef(e){let t=(0,Of.c)(134),")) {
|
|
955
|
+
let patched = replaceOnce(
|
|
956
|
+
text,
|
|
957
|
+
"function Ef(e){let t=(0,Of.c)(134),",
|
|
958
|
+
`${projectColorHook()}function Ef(e){let t=(0,Of.c)(134),`,
|
|
959
|
+
"local task row project color helper insertion anchor",
|
|
960
|
+
);
|
|
961
|
+
return replaceOnce(
|
|
962
|
+
patched,
|
|
963
|
+
"threadSummary:le,dataAttributes:ue}=e,de=l===void 0?!1:l,",
|
|
964
|
+
"threadSummary:le,dataAttributes:ue=CPXPR({projectId:oe,label:se,path:r,cwd:r})}=e,de=l===void 0?!1:l,",
|
|
965
|
+
"local task row project assignment anchor",
|
|
966
|
+
);
|
|
967
|
+
}
|
|
968
|
+
if (text.includes("function _p(e){let t=(0,yp.c)(134),")) {
|
|
969
|
+
let patched = replaceOnce(
|
|
970
|
+
text,
|
|
971
|
+
"function _p(e){let t=(0,yp.c)(134),",
|
|
972
|
+
`${projectColorHook()}function _p(e){let t=(0,yp.c)(134),`,
|
|
973
|
+
"local task row project color helper insertion anchor",
|
|
974
|
+
);
|
|
975
|
+
patched = replaceOnce(
|
|
976
|
+
patched,
|
|
977
|
+
"threadSummary:le,dataAttributes:ue}=e,de=c===void 0?!1:c,",
|
|
978
|
+
"threadSummary:le,dataAttributes:ue=CPXPR({projectId:oe,label:se,path:r,cwd:r,hostId:R?.id})}=e,de=c===void 0?!1:c,",
|
|
979
|
+
"local task row project assignment anchor",
|
|
980
|
+
);
|
|
981
|
+
return patched;
|
|
982
|
+
}
|
|
595
983
|
let patched = replaceOnce(
|
|
596
984
|
text,
|
|
597
985
|
"function fn(e){let t=(0,K.c)(124),",
|
|
@@ -601,30 +989,41 @@ function patchLocalTaskRow(text) {
|
|
|
601
989
|
patched = replaceOnce(
|
|
602
990
|
patched,
|
|
603
991
|
"threadSummary:Ne,dataAttributes:Fe}=e,Ie=g===void 0?!1:g,",
|
|
604
|
-
"threadSummary:Ne,dataAttributes:Fe
|
|
992
|
+
"threadSummary:Ne,dataAttributes:Fe=CPXPR(Oe)}=e,Ie=g===void 0?!1:g,",
|
|
605
993
|
"local task row project assignment anchor",
|
|
606
994
|
);
|
|
607
|
-
patched
|
|
608
|
-
patched,
|
|
609
|
-
"t[87]!==Fe",
|
|
610
|
-
"t[87]!==CPX_rowDataAttributes",
|
|
611
|
-
"local task row memo dependency anchor",
|
|
612
|
-
);
|
|
613
|
-
patched = replaceOnce(
|
|
614
|
-
patched,
|
|
615
|
-
"dataAttributes:Fe,archiveAriaLabel:hn",
|
|
616
|
-
"dataAttributes:CPX_rowDataAttributes,archiveAriaLabel:hn",
|
|
617
|
-
"local task row data attributes anchor",
|
|
618
|
-
);
|
|
619
|
-
return replaceOnce(
|
|
620
|
-
patched,
|
|
621
|
-
"t[87]=Fe",
|
|
622
|
-
"t[87]=CPX_rowDataAttributes",
|
|
623
|
-
"local task row memo assignment anchor",
|
|
624
|
-
);
|
|
995
|
+
return patched;
|
|
625
996
|
}
|
|
626
997
|
|
|
627
998
|
function patchMermaidDiagramShell(text) {
|
|
999
|
+
if (text.includes("function xbe(e){let t=(0,E2.c)(19),")) {
|
|
1000
|
+
let patched = replaceOnce(
|
|
1001
|
+
text,
|
|
1002
|
+
"function xbe(e){let t=(0,E2.c)(19),",
|
|
1003
|
+
`${mermaidDiagramHook()}function xbe(e){let t=(0,E2.c)(19),`,
|
|
1004
|
+
"mermaid diagram shell helper insertion anchor",
|
|
1005
|
+
);
|
|
1006
|
+
return replaceOnce(
|
|
1007
|
+
patched,
|
|
1008
|
+
"E=(0,O2.jsx)(`div`,{ref:d,className:C,\"data-wide-markdown-block\":w,\"data-wide-markdown-block-kind\":c,children:T})",
|
|
1009
|
+
"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})",
|
|
1010
|
+
"mermaid diagram shell host props anchor",
|
|
1011
|
+
);
|
|
1012
|
+
}
|
|
1013
|
+
if (text.includes("function or({blockRef:e,code:t,isCodeFenceOpen:n,isDark:r,isVisible:i,onError:a,onRendered:o,renderKey:s}){")) {
|
|
1014
|
+
let patched = replaceOnce(
|
|
1015
|
+
text,
|
|
1016
|
+
"function or({blockRef:e,code:t,isCodeFenceOpen:n,isDark:r,isVisible:i,onError:a,onRendered:o,renderKey:s}){",
|
|
1017
|
+
`${mermaidDiagramHook()}function or({blockRef:e,code:t,isCodeFenceOpen:n,isDark:r,isVisible:i,onError:a,onRendered:o,renderKey:s}){`,
|
|
1018
|
+
"mermaid diagram shell helper insertion anchor",
|
|
1019
|
+
);
|
|
1020
|
+
return replaceOnce(
|
|
1021
|
+
patched,
|
|
1022
|
+
"(0,X.jsx)(`div`,{ref:u,className:re(vr,!i&&`invisible`,m?`max-h-[var(--markdown-wide-block-max-height)] overflow-auto`:`overflow-x-auto`),\"aria-hidden\":!i||void 0,",
|
|
1023
|
+
"(0,X.jsx)(`div`,{ref:u,...CPXMermaidDiagramProps({code:t}),className:re(vr,!i&&`invisible`,m?`max-h-[var(--markdown-wide-block-max-height)] overflow-auto`:`overflow-x-auto`),\"aria-hidden\":!i||void 0,",
|
|
1024
|
+
"mermaid diagram shell host props anchor",
|
|
1025
|
+
);
|
|
1026
|
+
}
|
|
628
1027
|
let patched = replaceOnce(
|
|
629
1028
|
text,
|
|
630
1029
|
"function d(e){let t=(0,s.c)(18),{Renderer:n,className:r,code:i,fallback:d,isCodeFenceOpen:f,wideBlockKind:p}=e,",
|
|
@@ -649,6 +1048,20 @@ function patchPreloadNativeBridge(text) {
|
|
|
649
1048
|
}
|
|
650
1049
|
|
|
651
1050
|
function patchMainNativeBridge(text) {
|
|
1051
|
+
if (text.includes("function y4(e){let{") && text.includes("G2(l,k),V2(k);let A=!1;")) {
|
|
1052
|
+
let patched = replaceOnce(
|
|
1053
|
+
text,
|
|
1054
|
+
"function y4(e){let{",
|
|
1055
|
+
`${nativeMainHook()}function y4(e){let{`,
|
|
1056
|
+
"codex plus native main helper insertion anchor",
|
|
1057
|
+
);
|
|
1058
|
+
return replaceOnce(
|
|
1059
|
+
patched,
|
|
1060
|
+
"G2(l,k),V2(k);let A=!1;",
|
|
1061
|
+
"G2(l,k),V2(k),CPXNative.registerNativeRequest({isTrustedIpcEvent:k});let A=!1;",
|
|
1062
|
+
"codex plus native main registration anchor",
|
|
1063
|
+
);
|
|
1064
|
+
}
|
|
652
1065
|
let patched = replaceOnce(
|
|
653
1066
|
text,
|
|
654
1067
|
"function z1(e){return a.ipcMain.handle(Tl,async(t,n)=>{",
|
|
@@ -676,6 +1089,14 @@ function patchMainMenuDiagnostics(text) {
|
|
|
676
1089
|
"He,We,...CPXNative.templateItems(`view-menu`),{type:`separator`}",
|
|
677
1090
|
"codex plus view menu template items anchor",
|
|
678
1091
|
);
|
|
1092
|
+
if (patched.includes("fe.refreshApplicationMenu(),w(`application menu refreshed`,A),")) {
|
|
1093
|
+
return replaceOnce(
|
|
1094
|
+
patched,
|
|
1095
|
+
"fe.refreshApplicationMenu(),w(`application menu refreshed`,A),",
|
|
1096
|
+
"CPXNative.setRefreshApplicationMenu(()=>fe.refreshApplicationMenu()),fe.refreshApplicationMenu(),CPXNative.logMenuDiagnostics(),w(`application menu refreshed`,A),",
|
|
1097
|
+
"codex plus menu diagnostics refresh anchor",
|
|
1098
|
+
);
|
|
1099
|
+
}
|
|
679
1100
|
return replaceOnce(
|
|
680
1101
|
patched,
|
|
681
1102
|
"me.refreshApplicationMenu(),w(`application menu refreshed`,A),",
|
|
@@ -689,7 +1110,7 @@ return makePatchSet({
|
|
|
689
1110
|
codexVersion: config.codexVersion,
|
|
690
1111
|
bundleVersion: config.bundleVersion,
|
|
691
1112
|
asarSha256: config.asarSha256,
|
|
692
|
-
assetFiles: codexPlusRuntimeAssets(),
|
|
1113
|
+
assetFiles: codexPlusRuntimeAssets(config.runtimeConfig),
|
|
693
1114
|
patches: [
|
|
694
1115
|
{
|
|
695
1116
|
id: "bundle-identity",
|
|
@@ -731,7 +1152,6 @@ return makePatchSet({
|
|
|
731
1152
|
id: "project-colors",
|
|
732
1153
|
fileTransforms: [
|
|
733
1154
|
[appMainFile, patchAppMainProjectColors],
|
|
734
|
-
[sidebarProjectHoverCardSourceRowsFile, patchSidebarProjectHoverCardSourceRows],
|
|
735
1155
|
[localTaskRowFile, patchLocalTaskRow],
|
|
736
1156
|
[userMessageAttachmentsFile, patchUserMessageAttachmentsProjectColors],
|
|
737
1157
|
[composerFile, patchComposerProjectColors],
|
|
@@ -751,15 +1171,21 @@ return makePatchSet({
|
|
|
751
1171
|
[appMainFile, patchAppMainSidebarBlur],
|
|
752
1172
|
[electronMenuShortcutsFile, patchElectronMenuShortcuts],
|
|
753
1173
|
[keyboardShortcutsSearchInputFile, patchKeyboardShortcutsSearchInput],
|
|
1174
|
+
[keyboardShortcutsSearchInputFile, patchCommandMenuRuntimeCommands],
|
|
754
1175
|
],
|
|
755
1176
|
},
|
|
756
1177
|
{
|
|
757
1178
|
id: "project-selector-shortcut",
|
|
758
1179
|
fileTransforms: [
|
|
759
1180
|
[localActiveWorkspaceRootDropdownFile, patchLocalActiveWorkspaceRootDropdownProjectSelectorShortcut],
|
|
1181
|
+
...(homeProjectDropdownFile ? [[homeProjectDropdownFile, patchHomeProjectDropdownProjectSelectorShortcut]] : []),
|
|
760
1182
|
[runCommandFile, patchRunCommandProjectSelectorShortcut],
|
|
761
1183
|
],
|
|
762
1184
|
},
|
|
1185
|
+
...(statsigStartupFile ? [{
|
|
1186
|
+
id: "dev-mode-statsig-fallback",
|
|
1187
|
+
fileTransforms: [[statsigStartupFile, patchDevModeStatsigFallback]],
|
|
1188
|
+
}] : []),
|
|
763
1189
|
...(mainFile ? [{
|
|
764
1190
|
id: "codex-plus-native-bridge",
|
|
765
1191
|
fileTransforms: [
|