@liberseek/boft-cli-win32-arm64 0.6.8 → 0.6.9
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 +1 -1
- package/THIRD_PARTY_NOTICES.txt +4 -0
- package/app/codexhost-distribution.json +1 -1
- package/app/desktop-controller.mjs +119 -22
- package/app/host-runtime.mjs +3759 -3614
- package/app/plugins/antigravity/plugin.mjs +26 -46
- package/app/plugins/claude-code/plugin.mjs +26 -46
- package/app/plugins/codebuddy/plugin.mjs +26 -46
- package/app/plugins/cursor-cli/plugin.mjs +26 -46
- package/app/plugins/deepseek-harness/plugin.mjs +26 -46
- package/app/plugins/grok/plugin.mjs +26 -46
- package/app/plugins/hermes/plugin.mjs +268 -92
- package/app/plugins/kiro-cli/plugin.mjs +26 -46
- package/app/plugins/muse/plugin.mjs +26 -46
- package/app/plugins/omp/plugin.mjs +26 -46
- package/app/plugins/opencode/plugin.mjs +26 -46
- package/app/plugins/pi/plugin.mjs +26 -46
- package/app/renderer-extension.js +604 -1057
- package/bin/boft.exe +0 -0
- package/libexec/boft-node-repl.exe +0 -0
- package/libexec/boft-shim.exe +0 -0
- package/libexec/boft-updater.exe +0 -0
- package/licenses/opencodex-LICENSE.txt +21 -0
- package/package.json +1 -1
|
@@ -121,14 +121,12 @@
|
|
|
121
121
|
this.#ownershipRequestGenerations.set(state, ++this.#ownershipRequestSequence);
|
|
122
122
|
return state;
|
|
123
123
|
}
|
|
124
|
-
restore(composer, agent, model, thinkingOptionId, permissionModeId
|
|
124
|
+
restore(composer, agent, model, thinkingOptionId, permissionModeId) {
|
|
125
125
|
if (!this.#enabledAgents.has(agent)) return null;
|
|
126
126
|
const state = this.#state(composer);
|
|
127
127
|
this.#pendingSubmissions.delete(state);
|
|
128
128
|
state.agent = agent;
|
|
129
129
|
state.phase = "locked";
|
|
130
|
-
if (agent === "codex" && codexAccountId) state.codexAccountId = codexAccountId;
|
|
131
|
-
else delete state.codexAccountId;
|
|
132
130
|
if (agent === "pi" && model) state.piModel = model;
|
|
133
131
|
else if (agent === "pi") delete state.piModel;
|
|
134
132
|
if (agent === "claude-code" && model) state.claudeModel = model;
|
|
@@ -259,6 +257,7 @@
|
|
|
259
257
|
else if (agent === "kiro-cli") state.kiroCliModel = model;
|
|
260
258
|
else if (agent === "codebuddy") state.codeBuddyModel = model;
|
|
261
259
|
else if (agent === "cursor-cli") state.cursorCliModel = model;
|
|
260
|
+
else state.antigravityModel = model;
|
|
262
261
|
return state;
|
|
263
262
|
}
|
|
264
263
|
setPiConfiguration(composer, model, thinkingOptionId) {
|
|
@@ -330,13 +329,9 @@
|
|
|
330
329
|
clearPendingSubmission(composer) {
|
|
331
330
|
const state = this.#state(composer);
|
|
332
331
|
this.#pendingSubmissions.delete(state);
|
|
333
|
-
if (state.phase === "draft") delete state.codexAccountId;
|
|
334
332
|
}
|
|
335
|
-
recordSubmission(composer
|
|
333
|
+
recordSubmission(composer) {
|
|
336
334
|
const state = this.#state(composer);
|
|
337
|
-
if (state.agent === "codex" && state.phase === "draft" && !state.codexAccountId && codexAccountId) {
|
|
338
|
-
state.codexAccountId = codexAccountId;
|
|
339
|
-
}
|
|
340
335
|
this.#lastSubmittedAgent = state.agent;
|
|
341
336
|
return state;
|
|
342
337
|
}
|
|
@@ -15036,12 +15031,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15036
15031
|
plan: external_exports.string().trim().min(1).max(128).optional(),
|
|
15037
15032
|
credits: accountCreditsSnapshotSchema
|
|
15038
15033
|
}).strict();
|
|
15039
|
-
var
|
|
15034
|
+
var harnessAccountIdentityShape = {
|
|
15035
|
+
harnessId: harnessIdSchema,
|
|
15036
|
+
harnessName: external_exports.string().trim().min(1).max(128)
|
|
15037
|
+
};
|
|
15038
|
+
var harnessAccountSourceSchema = external_exports.object(harnessAccountIdentityShape).strict();
|
|
15039
|
+
var harnessAccountSourceListParamsSchema = external_exports.object({}).strict();
|
|
15040
|
+
var harnessAccountSourceListResultSchema = external_exports.object({ sources: external_exports.array(harnessAccountSourceSchema).max(128) }).strict();
|
|
15041
|
+
var harnessAccountInspectParamsSchema = external_exports.object({ harnessId: harnessIdSchema, refresh: external_exports.boolean().optional() }).strict();
|
|
15042
|
+
var harnessAccountInspectResultSchema = external_exports.object({
|
|
15043
|
+
...harnessAccountIdentityShape,
|
|
15044
|
+
account: harnessAccountSnapshotSchema.nullable()
|
|
15045
|
+
}).strict();
|
|
15046
|
+
var harnessAccountListParamsSchema = external_exports.object({ refresh: external_exports.boolean().optional() }).strict();
|
|
15040
15047
|
var harnessAccountListResultSchema = external_exports.object({
|
|
15041
|
-
accounts: external_exports.array(harnessAccountSnapshotSchema.extend(
|
|
15042
|
-
harnessId: harnessIdSchema,
|
|
15043
|
-
harnessName: external_exports.string().min(1)
|
|
15044
|
-
})).max(128)
|
|
15048
|
+
accounts: external_exports.array(harnessAccountSnapshotSchema.extend(harnessAccountIdentityShape)).max(128)
|
|
15045
15049
|
}).strict();
|
|
15046
15050
|
|
|
15047
15051
|
// ../shared-contracts/dist/json-value.js
|
|
@@ -15341,7 +15345,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15341
15345
|
}).strict();
|
|
15342
15346
|
var codexThreadInspectionSchema = external_exports.object({
|
|
15343
15347
|
owner: external_exports.literal("codex"),
|
|
15344
|
-
accountId: nonBlankTextSchema2.optional(),
|
|
15345
15348
|
locked: external_exports.literal(true)
|
|
15346
15349
|
}).strict();
|
|
15347
15350
|
var externalThreadInspectionSchema = external_exports.object({
|
|
@@ -15507,53 +15510,26 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15507
15510
|
label: nonBlankTextSchema3.max(256),
|
|
15508
15511
|
email: external_exports.string().email().max(320).optional(),
|
|
15509
15512
|
planType: codexAccountPlanTypeSchema.optional(),
|
|
15510
|
-
codexHome: nonBlankTextSchema3.max(16384),
|
|
15511
|
-
active: external_exports.boolean(),
|
|
15512
|
-
isDefault: external_exports.boolean(),
|
|
15513
15513
|
authKind: codexAccountAuthKindSchema.optional(),
|
|
15514
15514
|
authIdentity: nonBlankTextSchema3.max(256).optional()
|
|
15515
15515
|
}).strict();
|
|
15516
|
-
var
|
|
15517
|
-
var
|
|
15518
|
-
|
|
15519
|
-
|
|
15520
|
-
|
|
15521
|
-
|
|
15522
|
-
|
|
15523
|
-
|
|
15524
|
-
accountId: accountIdSchema,
|
|
15525
|
-
loginId: nonBlankTextSchema3.max(1024),
|
|
15526
|
-
verificationUrl: external_exports.string().url().max(16384),
|
|
15527
|
-
userCode: nonBlankTextSchema3.max(1024)
|
|
15528
|
-
}).strict();
|
|
15529
|
-
var codexAccountLoginCancelParamsSchema = external_exports.object({ accountId: accountIdSchema.optional(), loginId: nonBlankTextSchema3.max(1024) }).strict();
|
|
15530
|
-
var codexAccountLoginCancelResultSchema = external_exports.object({ cancelled: external_exports.boolean() }).strict();
|
|
15531
|
-
var codexAccountLoginCompletedSchema = external_exports.object({
|
|
15532
|
-
accountId: accountIdSchema,
|
|
15533
|
-
loginId: nonBlankTextSchema3.max(1024),
|
|
15534
|
-
success: external_exports.boolean(),
|
|
15535
|
-
error: external_exports.string().max(4096).nullable()
|
|
15516
|
+
var codexAccountPhaseSchema = external_exports.enum(["ready", "unavailable"]);
|
|
15517
|
+
var codexAccountListResultSchema = external_exports.object({
|
|
15518
|
+
version: external_exports.literal(2),
|
|
15519
|
+
currentAccountId: accountIdSchema.nullable(),
|
|
15520
|
+
phase: codexAccountPhaseSchema,
|
|
15521
|
+
revision: external_exports.number().int().nonnegative(),
|
|
15522
|
+
instanceId: nonBlankTextSchema3.max(1024).optional(),
|
|
15523
|
+
accounts: external_exports.array(codexAccountSchema).max(1)
|
|
15536
15524
|
}).strict();
|
|
15537
|
-
var
|
|
15525
|
+
var codexAccountChangedSchema = codexAccountListResultSchema;
|
|
15526
|
+
var codexAccountUsageParamsSchema = external_exports.object({ accountId: accountIdSchema, refresh: external_exports.boolean().optional() }).strict();
|
|
15538
15527
|
var codexAccountUsageResultSchema = external_exports.object({
|
|
15539
15528
|
accountId: accountIdSchema,
|
|
15540
15529
|
usage: threadUsageSnapshotSchema.nullable(),
|
|
15541
|
-
accountCredits: accountCreditsSnapshotSchema.optional()
|
|
15542
|
-
|
|
15543
|
-
|
|
15544
|
-
accountId: accountIdSchema,
|
|
15545
|
-
idempotencyKey: external_exports.string().uuid().optional()
|
|
15546
|
-
}).strict();
|
|
15547
|
-
var codexAccountResetCreditConsumeOutcomeSchema = external_exports.enum([
|
|
15548
|
-
"reset",
|
|
15549
|
-
"nothingToReset",
|
|
15550
|
-
"noCredit",
|
|
15551
|
-
"alreadyRedeemed"
|
|
15552
|
-
]);
|
|
15553
|
-
var codexAccountResetCreditConsumeResultSchema = external_exports.object({
|
|
15554
|
-
accountId: accountIdSchema,
|
|
15555
|
-
outcome: codexAccountResetCreditConsumeOutcomeSchema,
|
|
15556
|
-
accountCredits: accountCreditsSnapshotSchema.optional()
|
|
15530
|
+
accountCredits: accountCreditsSnapshotSchema.optional(),
|
|
15531
|
+
freshness: external_exports.enum(["live", "cached"]),
|
|
15532
|
+
observedAt: external_exports.string().datetime().nullable()
|
|
15557
15533
|
}).strict();
|
|
15558
15534
|
|
|
15559
15535
|
// ../shared-contracts/dist/reasoning-transcript.js
|
|
@@ -15938,12 +15914,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15938
15914
|
// src/assets/grok-agent.png
|
|
15939
15915
|
var grok_agent_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAEk9JREFUeNrtnQdsHEUXx5fee40xnQiQ6b23IAiJAWHACV10AQHRRG8GDJgSOggEGAEBg6gGhAIBQknoppjeezGE3kybb3+je6f1fVdm93Z2Zy870iPmfN67mffmzSv/98bzLIxZZpml2ad2n7p86vWp36cBnwZ9UjlVp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jjj6sddtihqJmizI3znZ0uzJfdP3nyZB3xi9kQHfSypu6XW245dd1116k///wzkd0eVivw75133lmM0JkyDOaTzbv//vuHMF/O/ra2Niv2hpeVXY/Vu9dee6lPP/001R1vKgjfffedOvLII7U7WUsImB/vu+OOO4YwX3b/q6++quadd14rnoeXhbN+0UUX1btehouMr2QjkKmr5rLxO5h/6623ltVojGOPPdaet+E68wnW4Lu7pO5rMZ6fJ06cqHbaaSc1//zzV9QAMH/22WdXN910U1nBRst9//33asUVV9RaYroSAJjf2tqqvvjiC2u7PhgDEIqD8dttt11xDpWYL+HmK664oqJwM/AwbIalPVeNPaJ3xLzjYn65AI/YEYAqoKDqDo5KgiHPxCC955571MiRI4vfvxrD+B07+txzz636fMYxxxxjTf07KQBM9sADD1R//PFH3cwPDnLnzz//vOru7lYnn3yy2mOPPbQrufbaa+swL3mAjTbaSLtxhx12mLrkkkv0biYsHBSeIOMJH99yyy06S2caDGI3896Ojo6qzOd1BItA03QjAEx0l1120cGVepgv46uvvtKW9Z577qmGDx+uo2jlMoCVCGbhlxNsIur31ltvFcPCnNvCHFN3T7TDGWecUdOmkbg/NoTNvIPnEvM5O0nGRGW+DGL2Rx11lM74BTOBYc9R3h9MGxP/x7BDa4TNAwjzsegl51BrLsQEbO5+ZwSASRI4ER8/KuPxl/fZZx81zzzzFJluK9MYxa454IAD1ODgoFEMI+a0r7sCwA5bYIEF1JQpUyIzn6DLiSeeqCNpSaVqwwo4Ngc2g+kcGQcddFBjC4BYw+IKRXG9Hn30UbXGGmvohYopRx4784lghrFrJPxrIfnjlgCI0ScuWFiVf/HFF+somu1Fqmd+2AyCSQgj3BwVm266aeMKALt18cUX1/n7MIsj7heumuQIXGU+biaRvLDajd2PxgAH2LACwMTGjx8fmvnk/YFopYXRC4Pg/frrryPZNQgAWoP4REMKAJMChEmkz1T1sygERnbbbTdnVb7MbeONNy7Ct6NGLRtaAFDbd999dyijiHH88cc7v/MJDtWbv2C+HAFrrbVW4wkAE8K4YTeb7n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Hhde08PQyKU2BIYlmAVKEmjX+CIESN0Ozly/sF8QUZ3ezlq9hj+D31xNF1kl6Ei0QIu7Y5y2b0goTGq/a6BGB6kPk+G/z8d9bZeA9ZERk86b2VpMRqUwbWoIygALVGZD0ybFiw0eZROm9PhYmaRWrzg8F+YGKUHDxYxzZbJs+fMzwxN9EqH/2Jb2EAPxhM9/ocPH54zP1vU5pUb/i+mmgZ6iOwBu3KxG0dOVWmqV2n4v2w1Ofe5S++xxx7TRYw58zNHrV614b9hQq0uV7Rxc6X1Wk6haIJXa/hvavJpWjnmE0ghskaa0+UyrZzKEjxt8kyG/8axpec+WDZQtTnzM0tjvTDD/4POoABw3tvsWZuTVer0ogz/D7tLiybyxcwcdXv1DP8BPfkiZpZ6vDhGUBPkNJ3s/Go2QU4NeuYbegfT8gV22tUb69kchTjBhHyx3QvyGPv5MQlCq0nuICf7sf2a4V3LgtAWNpWcUzwp3YpZvZQEoaWALOrLmWMPxlVY4xbP5VEAmrYXIOe9heKTAZtlaA1Eg4W16i+sXVdhLZtt8Op/gHVBgdi+KqkAAAAASUVORK5CYII=";
|
|
15940
15916
|
|
|
15941
|
-
// src/assets/antigravity-agent.svg
|
|
15942
|
-
var antigravity_agent_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="-2 -1 28 28"><path d="M21.751 22.607c1.34 1.005 3.35.335 1.508-1.508C17.73 15.74 18.904 1 12.037 1 5.17 1 6.342 15.74.815 21.1c-2.01 2.009.167 2.511 1.507 1.506 5.192-3.517 4.857-9.714 9.715-9.714 4.857 0 4.522 6.197 9.714 9.715z" fill="url(%23ag)"/><defs><linearGradient id="ag" x1="2" y1="12" x2="22" y2="12" gradientUnits="userSpaceOnUse"><stop stop-color="%234285F4"/><stop offset=".33" stop-color="%23EA4335"/><stop offset=".66" stop-color="%23FBBC04"/><stop offset="1" stop-color="%2334A853"/></linearGradient></defs></svg>%0A';
|
|
15943
|
-
|
|
15944
15917
|
// src/assets/hermes-agent.png
|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26iKljqDdJXAjXAEuW2aiTGPhUXLVpheHXumxR4GbrmJoFpWYEtvApWBkuJn7C5gug8NwWk1NuTobjgFTuuu/y4Apvzu4yboJdCrrrG1NoEHbHwQ6gM7svmWXlCl+MMyEYJB8jhW8p0E0kpHu2vdfcAJovE3wBPSDbNLoXwaNegmENdNJvh+sx41dN6hL9aLxSWAWcnzDoS6ClWYLlx3WIM9DPsa2rN5+H5wMDv4K8N4dcBK8BUal66KOlU1NeHge6HwPget30Imc6AyTwaWjrmWgjIX+cAi0gF1KrpF2/BVIanQj2g3WnfBJcOftzlrn+Tu8DT+A18E6p8KRkE3umE3v08Gs8SMw+pWO+TVYBn+CHvCxVVE2Cglmxwk/HFxPXXdttyWYYo1UPVvn2AZGsrvZhaAxjUzlRkzj6PXH84//b+a4kX9QSGNrrHFgWsymLjzU8ENgMjwM74CybrPJSHgZrG8L7NbuGfj4zMD/A1DD7XafOaXCAAAAAElFTkSuQmCC";
|
|
15946
15919
|
|
|
15920
|
+
// src/assets/antigravity-agent.svg
|
|
15921
|
+
var antigravity_agent_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="-2 -1 28 28"><path d="M21.751 22.607c1.34 1.005 3.35.335 1.508-1.508C17.73 15.74 18.904 1 12.037 1 5.17 1 6.342 15.74.815 21.1c-2.01 2.009.167 2.511 1.507 1.506 5.192-3.517 4.857-9.714 9.715-9.714 4.857 0 4.522 6.197 9.714 9.715z" fill="url(%23ag)"/><defs><linearGradient id="ag" x1="2" y1="12" x2="22" y2="12" gradientUnits="userSpaceOnUse"><stop stop-color="%234285F4"/><stop offset=".33" stop-color="%23EA4335"/><stop offset=".66" stop-color="%23FBBC04"/><stop offset="1" stop-color="%2334A853"/></linearGradient></defs></svg>%0A';
|
|
15922
|
+
|
|
15947
15923
|
// src/assets/kiro-agent.svg
|
|
15948
15924
|
var kiro_agent_default = 'data:image/svg+xml,<svg width="1200" height="1200" viewBox="0 0 1200 1200" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<rect width="1200" height="1200" rx="260" fill="%239046FF"/>%0A<mask id="mask0_1106_4856" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="272" y="202" width="655" height="796">%0A<path d="M926.578 202.793H272.637V997.857H926.578V202.793Z" fill="white"/>%0A</mask>%0A<g mask="url(%23mask0_1106_4856)">%0A<path d="M398.554 818.914C316.315 1001.03 491.477 1046.74 620.672 940.156C658.687 1059.66 801.052 970.473 852.234 877.795C964.787 673.567 919.318 465.357 907.64 422.374C827.637 129.443 427.623 128.946 358.8 423.865C342.651 475.544 342.402 534.18 333.458 595.051C328.986 625.86 325.507 645.488 313.83 677.785C306.873 696.424 297.68 712.819 282.773 740.645C259.915 783.881 269.604 867.113 387.87 823.883L399.051 818.914H398.554Z" fill="white"/>%0A<path d="M636.123 549.353C603.328 549.353 598.359 510.097 598.359 486.742C598.359 465.623 602.086 448.977 609.293 438.293C615.504 428.852 624.697 424.131 636.123 424.131C647.555 424.131 657.492 428.852 664.447 438.541C672.398 449.474 676.623 466.12 676.623 486.742C676.623 525.998 661.471 549.353 636.375 549.353H636.123Z" fill="black"/>%0A<path d="M771.24 549.353C738.445 549.353 733.477 510.097 733.477 486.742C733.477 465.623 737.203 448.977 744.41 438.293C750.621 428.852 759.814 424.131 771.24 424.131C782.672 424.131 792.609 428.852 799.564 438.541C807.516 449.474 811.74 466.12 811.74 486.742C811.74 525.998 796.588 549.353 771.492 549.353H771.24Z" fill="black"/>%0A</g>%0A</svg>%0A';
|
|
15949
15925
|
|
|
@@ -16067,6 +16043,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16067
16043
|
image.style.width = `${size}px`;
|
|
16068
16044
|
image.style.height = `${size}px`;
|
|
16069
16045
|
image.style.objectFit = "contain";
|
|
16046
|
+
image.style.boxSizing = "border-box";
|
|
16047
|
+
image.style.padding = `${Math.max(1, Math.round(size / 16))}px`;
|
|
16048
|
+
image.style.borderRadius = "22.37%";
|
|
16049
|
+
image.style.background = "#d8d8e8";
|
|
16070
16050
|
image.style.flex = "none";
|
|
16071
16051
|
return image;
|
|
16072
16052
|
}
|
|
@@ -16094,6 +16074,51 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16094
16074
|
return mark;
|
|
16095
16075
|
}
|
|
16096
16076
|
|
|
16077
|
+
// src/renderer-picker-popover-style.ts
|
|
16078
|
+
var STYLE_ATTRIBUTE = "data-codexhost-picker-popover-style";
|
|
16079
|
+
var PICKER_POPOVER_CLASS = "codexhost-picker-popover";
|
|
16080
|
+
var PICKER_POPOVER_BORDER_LIGHT = "#EFEFEF";
|
|
16081
|
+
var PICKER_POPOVER_BORDER_DARK = "#424242";
|
|
16082
|
+
var PICKER_POPOVER_BACKGROUND_DARK = "#2D2D2D";
|
|
16083
|
+
var PICKER_POPOVER_BACKGROUND = `light-dark(Canvas, ${PICKER_POPOVER_BACKGROUND_DARK})`;
|
|
16084
|
+
var PICKER_POPOVER_BORDER = `light-dark(${PICKER_POPOVER_BORDER_LIGHT}, ${PICKER_POPOVER_BORDER_DARK})`;
|
|
16085
|
+
var PICKER_POPOVER_RADIUS = "24px";
|
|
16086
|
+
function ensureRendererPickerPopoverStyle(ownerDocument) {
|
|
16087
|
+
if (ownerDocument.querySelector(`style[${STYLE_ATTRIBUTE}]`)) return;
|
|
16088
|
+
const style = ownerDocument.createElement("style");
|
|
16089
|
+
style.setAttribute(STYLE_ATTRIBUTE, "true");
|
|
16090
|
+
style.textContent = `
|
|
16091
|
+
.${PICKER_POPOVER_CLASS} {
|
|
16092
|
+
box-sizing: border-box;
|
|
16093
|
+
border: 1px solid ${PICKER_POPOVER_BORDER};
|
|
16094
|
+
border-radius: ${PICKER_POPOVER_RADIUS};
|
|
16095
|
+
background: ${PICKER_POPOVER_BACKGROUND};
|
|
16096
|
+
color: CanvasText;
|
|
16097
|
+
box-shadow: none;
|
|
16098
|
+
backdrop-filter: none;
|
|
16099
|
+
-webkit-backdrop-filter: none;
|
|
16100
|
+
}
|
|
16101
|
+
.${PICKER_POPOVER_CLASS} :is(input, textarea) {
|
|
16102
|
+
border: 1px solid ${PICKER_POPOVER_BORDER};
|
|
16103
|
+
background: ${PICKER_POPOVER_BACKGROUND};
|
|
16104
|
+
color: inherit;
|
|
16105
|
+
box-shadow: none;
|
|
16106
|
+
}
|
|
16107
|
+
`;
|
|
16108
|
+
(ownerDocument.head ?? ownerDocument.documentElement).append(style);
|
|
16109
|
+
}
|
|
16110
|
+
function applyRendererPickerPopoverSurface(element) {
|
|
16111
|
+
ensureRendererPickerPopoverStyle(element.ownerDocument);
|
|
16112
|
+
element.classList.add(PICKER_POPOVER_CLASS);
|
|
16113
|
+
element.style.border = `1px solid ${PICKER_POPOVER_BORDER}`;
|
|
16114
|
+
element.style.borderRadius = PICKER_POPOVER_RADIUS;
|
|
16115
|
+
element.style.background = PICKER_POPOVER_BACKGROUND;
|
|
16116
|
+
element.style.color = "CanvasText";
|
|
16117
|
+
element.style.boxShadow = "none";
|
|
16118
|
+
element.style.backdropFilter = "none";
|
|
16119
|
+
element.style.setProperty("-webkit-backdrop-filter", "none");
|
|
16120
|
+
}
|
|
16121
|
+
|
|
16097
16122
|
// ../../node_modules/lucide/dist/esm/defaultAttributes.mjs
|
|
16098
16123
|
var defaultAttributes = {
|
|
16099
16124
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -16567,279 +16592,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16567
16592
|
return icon2;
|
|
16568
16593
|
}
|
|
16569
16594
|
|
|
16570
|
-
// src/renderer-codex-account-options.ts
|
|
16571
|
-
var ACCOUNT_COLORS = ["#5b38c9", "#239b88", "#ce6724", "#2878c7", "#b34778", "#65752a"];
|
|
16572
|
-
function shouldExpandCodexAccountOptions(accountCount) {
|
|
16573
|
-
return accountCount > 1;
|
|
16574
|
-
}
|
|
16575
|
-
function codexAccountAuthKind(account) {
|
|
16576
|
-
if (account.authKind === "api" || account.authKind === "chatgpt") return account.authKind;
|
|
16577
|
-
return account.email ? "chatgpt" : "api";
|
|
16578
|
-
}
|
|
16579
|
-
function formatCodexAccountAuthLabel(account, messages) {
|
|
16580
|
-
if (codexAccountAuthKind(account) === "api") {
|
|
16581
|
-
const identity2 = account.authIdentity?.trim() || messages.accountAuthApiIdentityFallback;
|
|
16582
|
-
return `${messages.accountAuthApiPrefix} - ${identity2}`;
|
|
16583
|
-
}
|
|
16584
|
-
const identity = account.email ?? account.authIdentity;
|
|
16585
|
-
if (!identity) return `${messages.accountAuthChatPrefix} - ${account.label}`;
|
|
16586
|
-
return `${messages.accountAuthChatPrefix} - ${identity}`;
|
|
16587
|
-
}
|
|
16588
|
-
function codexAccountDisplayName(account) {
|
|
16589
|
-
const full = account.email ?? account.label;
|
|
16590
|
-
const separator = account.email?.lastIndexOf("@") ?? -1;
|
|
16591
|
-
if (!account.email || separator <= 0 || separator === account.email.length - 1) {
|
|
16592
|
-
return { local: full, domain: null, full };
|
|
16593
|
-
}
|
|
16594
|
-
return {
|
|
16595
|
-
local: account.email.slice(0, separator),
|
|
16596
|
-
domain: account.email.slice(separator + 1),
|
|
16597
|
-
full
|
|
16598
|
-
};
|
|
16599
|
-
}
|
|
16600
|
-
function codexAccountPresentationSignature(accounts) {
|
|
16601
|
-
return accounts.map(
|
|
16602
|
-
({ accountId, label, email: email3, authKind, authIdentity }) => `${accountId}\0${label}\0${email3 ?? ""}\0${authKind ?? ""}\0${authIdentity ?? ""}`
|
|
16603
|
-
).join("");
|
|
16604
|
-
}
|
|
16605
|
-
function accountColor(accountId) {
|
|
16606
|
-
let hash2 = 0;
|
|
16607
|
-
for (const character of accountId) hash2 = hash2 * 31 + character.charCodeAt(0) >>> 0;
|
|
16608
|
-
return ACCOUNT_COLORS[hash2 % ACCOUNT_COLORS.length] ?? ACCOUNT_COLORS[0];
|
|
16609
|
-
}
|
|
16610
|
-
function accountInitial(account) {
|
|
16611
|
-
const display = codexAccountDisplayName(account).local.trim();
|
|
16612
|
-
return display.match(/[\p{L}\p{N}]/u)?.[0]?.toUpperCase() ?? "?";
|
|
16613
|
-
}
|
|
16614
|
-
function setInteractiveHighlight(button) {
|
|
16615
|
-
const update = (hovered) => {
|
|
16616
|
-
const selected = button.getAttribute("aria-checked") === "true";
|
|
16617
|
-
button.style.background = selected || hovered && !button.disabled ? `rgba(127, 127, 127, ${selected ? "0.16" : "0.1"})` : "transparent";
|
|
16618
|
-
};
|
|
16619
|
-
button.addEventListener("pointerenter", () => update(true));
|
|
16620
|
-
button.addEventListener("pointerleave", () => update(false));
|
|
16621
|
-
button.addEventListener("focus", () => update(true));
|
|
16622
|
-
button.addEventListener("blur", () => update(false));
|
|
16623
|
-
}
|
|
16624
|
-
function createRendererCodexAccountGroup(input) {
|
|
16625
|
-
const { ownerDocument: document2 } = input;
|
|
16626
|
-
const root = document2.createElement("div");
|
|
16627
|
-
root.dataset.codexAccountOptions = "true";
|
|
16628
|
-
root.hidden = true;
|
|
16629
|
-
const accountSection = document2.createElement("div");
|
|
16630
|
-
accountSection.setAttribute("role", "group");
|
|
16631
|
-
accountSection.setAttribute("aria-label", input.accountsLabel);
|
|
16632
|
-
accountSection.style.position = "relative";
|
|
16633
|
-
const header = document2.createElement("div");
|
|
16634
|
-
header.style.position = "relative";
|
|
16635
|
-
header.style.display = "flex";
|
|
16636
|
-
header.style.alignItems = "center";
|
|
16637
|
-
header.style.gap = "8px";
|
|
16638
|
-
header.style.height = "36px";
|
|
16639
|
-
header.style.padding = PICKER_ROW_PADDING;
|
|
16640
|
-
header.style.color = "inherit";
|
|
16641
|
-
header.style.font = "600 12px/1 system-ui, sans-serif";
|
|
16642
|
-
header.style.opacity = "0.72";
|
|
16643
|
-
const headerIcon = document2.createElement("span");
|
|
16644
|
-
headerIcon.setAttribute("aria-hidden", "true");
|
|
16645
|
-
headerIcon.style.display = "inline-flex";
|
|
16646
|
-
headerIcon.style.alignItems = "center";
|
|
16647
|
-
headerIcon.style.justifyContent = "center";
|
|
16648
|
-
headerIcon.style.width = "24px";
|
|
16649
|
-
headerIcon.style.height = "24px";
|
|
16650
|
-
headerIcon.style.flex = "none";
|
|
16651
|
-
headerIcon.append(createRendererAgentIcon("codex", 16, document2));
|
|
16652
|
-
header.append(headerIcon, input.accountsLabel);
|
|
16653
|
-
const list = document2.createElement("div");
|
|
16654
|
-
list.style.display = "flex";
|
|
16655
|
-
list.style.flexDirection = "column";
|
|
16656
|
-
list.style.gap = "2px";
|
|
16657
|
-
list.style.maxHeight = "132px";
|
|
16658
|
-
list.style.marginBottom = "4px";
|
|
16659
|
-
list.style.paddingLeft = "14px";
|
|
16660
|
-
list.style.overflowY = "auto";
|
|
16661
|
-
list.style.scrollbarWidth = "thin";
|
|
16662
|
-
const manage = document2.createElement("button");
|
|
16663
|
-
manage.type = "button";
|
|
16664
|
-
manage.dataset.codexAccountManage = "true";
|
|
16665
|
-
manage.setAttribute("role", "menuitem");
|
|
16666
|
-
manage.setAttribute("aria-label", input.manageAccountsLabel);
|
|
16667
|
-
manage.title = input.manageAccountsLabel;
|
|
16668
|
-
applyPickerTrailingSlot(manage);
|
|
16669
|
-
manage.style.border = "0";
|
|
16670
|
-
manage.style.borderRadius = "4px";
|
|
16671
|
-
manage.style.background = "transparent";
|
|
16672
|
-
manage.style.color = "inherit";
|
|
16673
|
-
manage.style.opacity = "0.72";
|
|
16674
|
-
manage.style.cursor = "pointer";
|
|
16675
|
-
manage.append(createPickerChromeIcon("ellipsis"));
|
|
16676
|
-
manage.addEventListener("pointerenter", () => {
|
|
16677
|
-
manage.style.background = "rgba(127, 127, 127, 0.1)";
|
|
16678
|
-
manage.style.opacity = "1";
|
|
16679
|
-
});
|
|
16680
|
-
manage.addEventListener("pointerleave", () => {
|
|
16681
|
-
manage.style.background = "transparent";
|
|
16682
|
-
manage.style.opacity = "0.72";
|
|
16683
|
-
});
|
|
16684
|
-
manage.addEventListener("click", input.onManage);
|
|
16685
|
-
header.append(manage);
|
|
16686
|
-
accountSection.append(header, list);
|
|
16687
|
-
root.append(accountSection);
|
|
16688
|
-
const badge = document2.createElement("span");
|
|
16689
|
-
badge.setAttribute("aria-hidden", "true");
|
|
16690
|
-
badge.style.display = "none";
|
|
16691
|
-
badge.style.position = "absolute";
|
|
16692
|
-
badge.style.right = "1px";
|
|
16693
|
-
badge.style.bottom = "0";
|
|
16694
|
-
badge.style.width = "9px";
|
|
16695
|
-
badge.style.height = "9px";
|
|
16696
|
-
badge.style.border = "1.5px solid Canvas";
|
|
16697
|
-
badge.style.borderRadius = "50%";
|
|
16698
|
-
badge.style.pointerEvents = "none";
|
|
16699
|
-
const options = /* @__PURE__ */ new Map();
|
|
16700
|
-
let accounts = [];
|
|
16701
|
-
let presentationSignature = "";
|
|
16702
|
-
const rebuild = (nextAccounts) => {
|
|
16703
|
-
list.replaceChildren();
|
|
16704
|
-
options.clear();
|
|
16705
|
-
for (const account of nextAccounts) {
|
|
16706
|
-
const row = document2.createElement("div");
|
|
16707
|
-
const button = document2.createElement("button");
|
|
16708
|
-
button.type = "button";
|
|
16709
|
-
button.dataset.codexAccountId = account.accountId;
|
|
16710
|
-
button.setAttribute("role", "menuitemradio");
|
|
16711
|
-
button.style.display = "flex";
|
|
16712
|
-
button.style.alignItems = "center";
|
|
16713
|
-
button.style.gap = "8px";
|
|
16714
|
-
button.style.width = "100%";
|
|
16715
|
-
button.style.height = "36px";
|
|
16716
|
-
button.style.padding = PICKER_ROW_PADDING;
|
|
16717
|
-
button.style.color = "inherit";
|
|
16718
|
-
button.style.background = "transparent";
|
|
16719
|
-
button.style.border = "0";
|
|
16720
|
-
button.style.borderRadius = "5px";
|
|
16721
|
-
button.style.textAlign = "left";
|
|
16722
|
-
button.style.cursor = "pointer";
|
|
16723
|
-
setInteractiveHighlight(button);
|
|
16724
|
-
const avatar = document2.createElement("span");
|
|
16725
|
-
avatar.textContent = accountInitial(account);
|
|
16726
|
-
avatar.style.display = "inline-flex";
|
|
16727
|
-
avatar.style.alignItems = "center";
|
|
16728
|
-
avatar.style.justifyContent = "center";
|
|
16729
|
-
avatar.style.width = "20px";
|
|
16730
|
-
avatar.style.height = "20px";
|
|
16731
|
-
avatar.style.color = "#fff";
|
|
16732
|
-
avatar.style.background = accountColor(account.accountId);
|
|
16733
|
-
avatar.style.borderRadius = "50%";
|
|
16734
|
-
avatar.style.font = "700 10px/1 system-ui, sans-serif";
|
|
16735
|
-
const authLabel = formatCodexAccountAuthLabel(account, input.messages);
|
|
16736
|
-
const name = document2.createElement("span");
|
|
16737
|
-
name.style.display = "flex";
|
|
16738
|
-
name.style.alignItems = "baseline";
|
|
16739
|
-
name.style.minWidth = "0";
|
|
16740
|
-
name.style.gap = "4px";
|
|
16741
|
-
const local = document2.createElement("strong");
|
|
16742
|
-
local.textContent = authLabel;
|
|
16743
|
-
local.style.minWidth = "0";
|
|
16744
|
-
local.style.overflow = "hidden";
|
|
16745
|
-
local.style.font = "600 13px/1 system-ui, sans-serif";
|
|
16746
|
-
local.style.textOverflow = "ellipsis";
|
|
16747
|
-
local.style.whiteSpace = "nowrap";
|
|
16748
|
-
name.append(local);
|
|
16749
|
-
const check2 = document2.createElement("span");
|
|
16750
|
-
check2.dataset.codexhostAgentTrailing = "check";
|
|
16751
|
-
check2.setAttribute("aria-hidden", "true");
|
|
16752
|
-
applyPickerTrailingSlot(check2);
|
|
16753
|
-
check2.style.visibility = "hidden";
|
|
16754
|
-
check2.style.pointerEvents = "none";
|
|
16755
|
-
check2.append(createPickerChromeIcon("tick"));
|
|
16756
|
-
button.title = authLabel;
|
|
16757
|
-
button.setAttribute("aria-label", `${input.accountsLabel}: ${authLabel}`);
|
|
16758
|
-
button.append(avatar, name);
|
|
16759
|
-
button.addEventListener("click", () => input.onSelect(account.accountId));
|
|
16760
|
-
row.style.position = "relative";
|
|
16761
|
-
row.append(button, check2);
|
|
16762
|
-
list.append(row);
|
|
16763
|
-
options.set(account.accountId, { row, button, check: check2, action: null });
|
|
16764
|
-
}
|
|
16765
|
-
presentationSignature = codexAccountPresentationSignature(nextAccounts);
|
|
16766
|
-
};
|
|
16767
|
-
const control = {
|
|
16768
|
-
root,
|
|
16769
|
-
badge,
|
|
16770
|
-
options,
|
|
16771
|
-
accounts,
|
|
16772
|
-
render({ accounts: nextAccounts, selectedAccountId, disabled, showBadge }) {
|
|
16773
|
-
const nextSignature = codexAccountPresentationSignature(nextAccounts);
|
|
16774
|
-
if (nextSignature !== presentationSignature) rebuild(nextAccounts);
|
|
16775
|
-
accounts = [...nextAccounts];
|
|
16776
|
-
control.accounts = accounts;
|
|
16777
|
-
root.hidden = accounts.length === 0;
|
|
16778
|
-
const selectedAccount = accounts.find(({ accountId }) => accountId === selectedAccountId);
|
|
16779
|
-
badge.style.display = showBadge && selectedAccount ? "block" : "none";
|
|
16780
|
-
if (selectedAccount) badge.style.background = accountColor(selectedAccount.accountId);
|
|
16781
|
-
for (const account of accounts) {
|
|
16782
|
-
const option = options.get(account.accountId);
|
|
16783
|
-
if (!option) continue;
|
|
16784
|
-
const selected = account.accountId === selectedAccountId;
|
|
16785
|
-
option.button.disabled = disabled;
|
|
16786
|
-
option.button.setAttribute("aria-checked", String(selected));
|
|
16787
|
-
option.button.setAttribute("aria-pressed", String(selected));
|
|
16788
|
-
option.button.style.background = selected ? "rgba(127, 127, 127, 0.16)" : "transparent";
|
|
16789
|
-
option.button.style.cursor = disabled ? "not-allowed" : "pointer";
|
|
16790
|
-
option.button.style.opacity = disabled && !selected ? "0.5" : "1";
|
|
16791
|
-
option.check.style.visibility = selected ? "visible" : "hidden";
|
|
16792
|
-
}
|
|
16793
|
-
}
|
|
16794
|
-
};
|
|
16795
|
-
return control;
|
|
16796
|
-
}
|
|
16797
|
-
|
|
16798
|
-
// src/renderer-picker-popover-style.ts
|
|
16799
|
-
var STYLE_ATTRIBUTE = "data-codexhost-picker-popover-style";
|
|
16800
|
-
var PICKER_POPOVER_CLASS = "codexhost-picker-popover";
|
|
16801
|
-
var PICKER_POPOVER_BORDER_LIGHT = "#EFEFEF";
|
|
16802
|
-
var PICKER_POPOVER_BORDER_DARK = "#424242";
|
|
16803
|
-
var PICKER_POPOVER_BACKGROUND_DARK = "#2D2D2D";
|
|
16804
|
-
var PICKER_POPOVER_BACKGROUND = `light-dark(Canvas, ${PICKER_POPOVER_BACKGROUND_DARK})`;
|
|
16805
|
-
var PICKER_POPOVER_BORDER = `light-dark(${PICKER_POPOVER_BORDER_LIGHT}, ${PICKER_POPOVER_BORDER_DARK})`;
|
|
16806
|
-
var PICKER_POPOVER_RADIUS = "24px";
|
|
16807
|
-
function ensureRendererPickerPopoverStyle(ownerDocument) {
|
|
16808
|
-
if (ownerDocument.querySelector(`style[${STYLE_ATTRIBUTE}]`)) return;
|
|
16809
|
-
const style = ownerDocument.createElement("style");
|
|
16810
|
-
style.setAttribute(STYLE_ATTRIBUTE, "true");
|
|
16811
|
-
style.textContent = `
|
|
16812
|
-
.${PICKER_POPOVER_CLASS} {
|
|
16813
|
-
box-sizing: border-box;
|
|
16814
|
-
border: 1px solid ${PICKER_POPOVER_BORDER};
|
|
16815
|
-
border-radius: ${PICKER_POPOVER_RADIUS};
|
|
16816
|
-
background: ${PICKER_POPOVER_BACKGROUND};
|
|
16817
|
-
color: CanvasText;
|
|
16818
|
-
box-shadow: none;
|
|
16819
|
-
backdrop-filter: none;
|
|
16820
|
-
-webkit-backdrop-filter: none;
|
|
16821
|
-
}
|
|
16822
|
-
.${PICKER_POPOVER_CLASS} :is(input, textarea) {
|
|
16823
|
-
border: 1px solid ${PICKER_POPOVER_BORDER};
|
|
16824
|
-
background: ${PICKER_POPOVER_BACKGROUND};
|
|
16825
|
-
color: inherit;
|
|
16826
|
-
box-shadow: none;
|
|
16827
|
-
}
|
|
16828
|
-
`;
|
|
16829
|
-
(ownerDocument.head ?? ownerDocument.documentElement).append(style);
|
|
16830
|
-
}
|
|
16831
|
-
function applyRendererPickerPopoverSurface(element) {
|
|
16832
|
-
ensureRendererPickerPopoverStyle(element.ownerDocument);
|
|
16833
|
-
element.classList.add(PICKER_POPOVER_CLASS);
|
|
16834
|
-
element.style.border = `1px solid ${PICKER_POPOVER_BORDER}`;
|
|
16835
|
-
element.style.borderRadius = PICKER_POPOVER_RADIUS;
|
|
16836
|
-
element.style.background = PICKER_POPOVER_BACKGROUND;
|
|
16837
|
-
element.style.color = "CanvasText";
|
|
16838
|
-
element.style.boxShadow = "none";
|
|
16839
|
-
element.style.backdropFilter = "none";
|
|
16840
|
-
element.style.setProperty("-webkit-backdrop-filter", "none");
|
|
16841
|
-
}
|
|
16842
|
-
|
|
16843
16595
|
// src/settings/harness-install.ts
|
|
16844
16596
|
var HARNESS_INSTALL_SPECS = Object.freeze({
|
|
16845
16597
|
pi: {
|
|
@@ -17772,41 +17524,25 @@ ${error51.stderrTail}`] : []
|
|
|
17772
17524
|
pluginsRefresh: "Scan environment",
|
|
17773
17525
|
pluginsRefreshing: "Scanning...",
|
|
17774
17526
|
connectionsDescription: "View runtime status by Host. Select an item to inspect details or complete its setup.",
|
|
17775
|
-
accountsDescription: "View
|
|
17527
|
+
accountsDescription: "View the current Codex identity and quotas, plus other Agent accounts.",
|
|
17776
17528
|
accountConnected: "Accounts",
|
|
17777
|
-
accountDefaultBadge: "
|
|
17778
|
-
accountAdd: "Add Codex account",
|
|
17529
|
+
accountDefaultBadge: "Current",
|
|
17779
17530
|
accountColumnAccount: "Account",
|
|
17780
17531
|
accountColumnActions: "Manage",
|
|
17532
|
+
accountColumnCredits: "Quota",
|
|
17781
17533
|
accountSearch: "Search accounts or Agents\u2026",
|
|
17782
|
-
accountEmpty: "No
|
|
17534
|
+
accountEmpty: "No current identities found. Sign in through Codex Desktop or your Harness's native client.",
|
|
17783
17535
|
accountNoMatches: "No matching accounts.",
|
|
17784
17536
|
accountNativeManaged: "Native management",
|
|
17785
17537
|
accountNativeManagementHint: "This account comes from {harness}'s native authentication. This page only displays identity and limits; manage sign-in, sign-out and switching in the native client.",
|
|
17786
|
-
accountMore: "Codex account actions",
|
|
17787
17538
|
accountDetailsClose: "Close account details",
|
|
17788
|
-
accountDefaultHint: "
|
|
17539
|
+
accountDefaultHint: "This is the current identity for all Codex Threads.",
|
|
17789
17540
|
accountCreditsRemaining: "Remaining",
|
|
17790
17541
|
accountCreditsLoading: "Loading limits\u2026",
|
|
17791
17542
|
accountCreditsEmpty: "No limit data available",
|
|
17792
17543
|
accountCreditsFailed: "Could not load limits",
|
|
17793
17544
|
accountCreditsRetry: "Retry",
|
|
17794
17545
|
accountCreditsRefresh: "Refresh limits",
|
|
17795
|
-
accountCreateFailed: "Could not add the Account.",
|
|
17796
|
-
accountDelete: "Delete",
|
|
17797
|
-
accountDeleteConfirm: "Delete this Account and its local data? This cannot be undone.",
|
|
17798
|
-
accountDeleting: "Deleting Account...",
|
|
17799
|
-
accountDeleteFailed: "Could not delete the Account.",
|
|
17800
|
-
accountActive: "Default",
|
|
17801
|
-
accountUse: "Set as default",
|
|
17802
|
-
accountSignIn: "Sign in",
|
|
17803
|
-
accountSigningIn: "Starting device sign-in...",
|
|
17804
|
-
accountVerificationDescription: "Open the verification page and enter this one-time code:",
|
|
17805
|
-
accountCopyCode: "Copy code",
|
|
17806
|
-
accountCopied: "Copied",
|
|
17807
|
-
accountLoginCancel: "Cancel sign-in",
|
|
17808
|
-
accountLoginSucceeded: "Sign-in completed.",
|
|
17809
|
-
accountLoginFailed: "Sign-in failed.",
|
|
17810
17546
|
accountLoadFailed: "Could not load Codex Accounts.",
|
|
17811
17547
|
accountAuthApiPrefix: "API",
|
|
17812
17548
|
accountAuthChatPrefix: "Account",
|
|
@@ -17825,14 +17561,6 @@ ${error51.stderrTail}`] : []
|
|
|
17825
17561
|
accountCreditsPeriodUnknown: "Limit",
|
|
17826
17562
|
accountCreditsBuild: "Build",
|
|
17827
17563
|
accountResetCredits: "Reset cards",
|
|
17828
|
-
accountResetCreditsUse: "Use reset",
|
|
17829
|
-
accountResetCreditsConfirm: "This uses 1 reset card and resets both the 5-hour and 7-day limits. This cannot be undone.",
|
|
17830
|
-
accountResetCreditsUsing: "Using reset card...",
|
|
17831
|
-
accountResetCreditsFailed: "Could not use the reset card.",
|
|
17832
|
-
accountResetCreditsNothingToReset: "Usage does not need a reset right now.",
|
|
17833
|
-
accountResetCreditsNoCredit: "No reset cards are available.",
|
|
17834
|
-
accountResetCreditsAlreadyRedeemed: "That reset card was already used.",
|
|
17835
|
-
accountResetCreditsSucceeded: "Limits were reset.",
|
|
17836
17564
|
accountResetCreditsDetails: "Reset card details",
|
|
17837
17565
|
accountResetCreditsCardExpiry: "Card {index} \xB7 expires {time}",
|
|
17838
17566
|
connectionAdapter: "Renderer adapter",
|
|
@@ -18008,41 +17736,25 @@ ${error51.stderrTail}`] : []
|
|
|
18008
17736
|
pluginsRefresh: "\u626B\u63CF\u73AF\u5883",
|
|
18009
17737
|
pluginsRefreshing: "\u6B63\u5728\u626B\u63CF...",
|
|
18010
17738
|
connectionsDescription: "\u6309 Host \u67E5\u770B\u8FD0\u884C\u65F6\u72B6\u6001\u3002\u9009\u62E9\u4E00\u9879\uFF0C\u5728\u53F3\u4FA7\u68C0\u67E5\u8BE6\u60C5\u6216\u5B8C\u6210\u914D\u7F6E\u3002",
|
|
18011
|
-
accountsDescription: "\u67E5\u770B\
|
|
17739
|
+
accountsDescription: "\u67E5\u770B\u5F53\u524D Codex \u8EAB\u4EFD\u4E0E\u989D\u5EA6\uFF0C\u4EE5\u53CA\u5176\u4ED6 Agent \u8D26\u53F7\u3002",
|
|
18012
17740
|
accountConnected: "\u8D26\u53F7",
|
|
18013
|
-
accountDefaultBadge: "
|
|
18014
|
-
accountAdd: "\u6DFB\u52A0 Codex \u8D26\u53F7",
|
|
17741
|
+
accountDefaultBadge: "\u5F53\u524D",
|
|
18015
17742
|
accountColumnAccount: "\u8D26\u53F7",
|
|
18016
17743
|
accountColumnActions: "\u7BA1\u7406",
|
|
17744
|
+
accountColumnCredits: "\u989D\u5EA6",
|
|
18017
17745
|
accountSearch: "\u641C\u7D22\u8D26\u53F7\u6216 Agent\u2026",
|
|
18018
|
-
accountEmpty: "\
|
|
17746
|
+
accountEmpty: "\u5C1A\u672A\u8BC6\u522B\u5230\u5F53\u524D\u8EAB\u4EFD\uFF0C\u8BF7\u5728 Codex Desktop \u6216\u5BF9\u5E94 Harness \u7684\u539F\u751F\u5BA2\u6237\u7AEF\u767B\u5F55\u3002",
|
|
18019
17747
|
accountNoMatches: "\u6CA1\u6709\u5339\u914D\u7684\u8D26\u53F7\u3002",
|
|
18020
17748
|
accountNativeManaged: "\u539F\u751F\u7BA1\u7406",
|
|
18021
17749
|
accountNativeManagementHint: "\u6B64\u8D26\u53F7\u6765\u81EA {harness} \u7684\u539F\u751F\u767B\u5F55\u3002\u8FD9\u91CC\u53EA\u8BFB\u5C55\u793A\u8EAB\u4EFD\u4E0E\u989D\u5EA6\uFF1B\u767B\u5F55\u3001\u9000\u51FA\u548C\u5207\u6362\u8BF7\u5728\u5176\u539F\u751F\u5BA2\u6237\u7AEF\u4E2D\u5B8C\u6210\u3002",
|
|
18022
|
-
accountMore: "Codex \u8D26\u53F7\u64CD\u4F5C",
|
|
18023
17750
|
accountDetailsClose: "\u5173\u95ED\u8D26\u53F7\u8BE6\u60C5",
|
|
18024
|
-
accountDefaultHint: "\
|
|
17751
|
+
accountDefaultHint: "\u6240\u6709 Codex \u4F1A\u8BDD\u5F53\u524D\u4F7F\u7528\u6B64\u8EAB\u4EFD\u3002",
|
|
18025
17752
|
accountCreditsRemaining: "\u5269\u4F59",
|
|
18026
17753
|
accountCreditsLoading: "\u6B63\u5728\u8BFB\u53D6\u989D\u5EA6\u2026",
|
|
18027
17754
|
accountCreditsEmpty: "\u6682\u65E0\u989D\u5EA6\u6570\u636E",
|
|
18028
17755
|
accountCreditsFailed: "\u989D\u5EA6\u8BFB\u53D6\u5931\u8D25",
|
|
18029
17756
|
accountCreditsRetry: "\u91CD\u8BD5",
|
|
18030
17757
|
accountCreditsRefresh: "\u5237\u65B0\u989D\u5EA6",
|
|
18031
|
-
accountCreateFailed: "\u6DFB\u52A0\u8D26\u53F7\u5931\u8D25\u3002",
|
|
18032
|
-
accountDelete: "\u5220\u9664",
|
|
18033
|
-
accountDeleteConfirm: "\u5220\u9664\u6B64\u8D26\u53F7\u53CA\u5176\u672C\u5730\u6570\u636E\uFF1F\u6B64\u64CD\u4F5C\u65E0\u6CD5\u64A4\u9500\u3002",
|
|
18034
|
-
accountDeleting: "\u6B63\u5728\u5220\u9664\u8D26\u53F7...",
|
|
18035
|
-
accountDeleteFailed: "\u5220\u9664\u8D26\u53F7\u5931\u8D25\u3002",
|
|
18036
|
-
accountActive: "\u9ED8\u8BA4\u8D26\u53F7",
|
|
18037
|
-
accountUse: "\u8BBE\u4E3A\u9ED8\u8BA4",
|
|
18038
|
-
accountSignIn: "\u767B\u5F55",
|
|
18039
|
-
accountSigningIn: "\u6B63\u5728\u542F\u52A8\u8BBE\u5907\u767B\u5F55...",
|
|
18040
|
-
accountVerificationDescription: "\u6253\u5F00\u9A8C\u8BC1\u9875\u9762\u5E76\u8F93\u5165\u4EE5\u4E0B\u4E00\u6B21\u6027\u4EE3\u7801\uFF1A",
|
|
18041
|
-
accountCopyCode: "\u590D\u5236\u4EE3\u7801",
|
|
18042
|
-
accountCopied: "\u5DF2\u590D\u5236",
|
|
18043
|
-
accountLoginCancel: "\u53D6\u6D88\u767B\u5F55",
|
|
18044
|
-
accountLoginSucceeded: "\u767B\u5F55\u6210\u529F\u3002",
|
|
18045
|
-
accountLoginFailed: "\u767B\u5F55\u5931\u8D25\u3002",
|
|
18046
17758
|
accountLoadFailed: "\u65E0\u6CD5\u52A0\u8F7D Codex \u8D26\u53F7\u3002",
|
|
18047
17759
|
accountAuthApiPrefix: "API",
|
|
18048
17760
|
accountAuthChatPrefix: "\u8D26\u53F7",
|
|
@@ -18061,14 +17773,6 @@ ${error51.stderrTail}`] : []
|
|
|
18061
17773
|
accountCreditsPeriodUnknown: "\u989D\u5EA6",
|
|
18062
17774
|
accountCreditsBuild: "Build",
|
|
18063
17775
|
accountResetCredits: "\u91CD\u7F6E\u5361",
|
|
18064
|
-
accountResetCreditsUse: "\u4F7F\u7528\u91CD\u7F6E",
|
|
18065
|
-
accountResetCreditsConfirm: "\u5C06\u6D88\u8017 1 \u5F20\u91CD\u7F6E\u5361\uFF0C\u540C\u65F6\u91CD\u7F6E 5 \u5C0F\u65F6\u548C 7 \u5929\u989D\u5EA6\u3002\u6B64\u64CD\u4F5C\u65E0\u6CD5\u64A4\u9500\u3002",
|
|
18066
|
-
accountResetCreditsUsing: "\u6B63\u5728\u4F7F\u7528\u91CD\u7F6E\u5361...",
|
|
18067
|
-
accountResetCreditsFailed: "\u4F7F\u7528\u91CD\u7F6E\u5361\u5931\u8D25\u3002",
|
|
18068
|
-
accountResetCreditsNothingToReset: "\u5F53\u524D\u989D\u5EA6\u4E0D\u9700\u8981\u91CD\u7F6E\u3002",
|
|
18069
|
-
accountResetCreditsNoCredit: "\u6CA1\u6709\u53EF\u7528\u7684\u91CD\u7F6E\u5361\u3002",
|
|
18070
|
-
accountResetCreditsAlreadyRedeemed: "\u8FD9\u5F20\u91CD\u7F6E\u5361\u5DF2\u7ECF\u4F7F\u7528\u8FC7\u3002",
|
|
18071
|
-
accountResetCreditsSucceeded: "\u989D\u5EA6\u5DF2\u91CD\u7F6E\u3002",
|
|
18072
17776
|
accountResetCreditsDetails: "\u91CD\u7F6E\u5361\u8BE6\u60C5",
|
|
18073
17777
|
accountResetCreditsCardExpiry: "\u7B2C {index} \u5F20 \xB7 {time}\u5230\u671F",
|
|
18074
17778
|
connectionAdapter: "Renderer \u9002\u914D\u5668",
|
|
@@ -18219,8 +17923,6 @@ ${error51.stderrTail}`] : []
|
|
|
18219
17923
|
const messages = rendererSettingsMessages(resolveRendererSettingsLocale(languages));
|
|
18220
17924
|
return {
|
|
18221
17925
|
...messages,
|
|
18222
|
-
codexAccountsLabel: "Codex",
|
|
18223
|
-
manageCodexAccountsLabel: messages.locale === "zh-CN" ? "\u7BA1\u7406 Codex \u8D26\u53F7" : "Manage Codex Accounts",
|
|
18224
17926
|
ownershipErrorLabel: messages.locale === "zh-CN" ? "\u65E0\u6CD5\u786E\u8BA4\u4F1A\u8BDD\u7684 Agent\uFF1B\u91CD\u65B0\u805A\u7126\u7A97\u53E3\u4EE5\u91CD\u8BD5" : "Unable to determine the Thread Agent; refocus the window to retry"
|
|
18225
17927
|
};
|
|
18226
17928
|
}
|
|
@@ -18239,11 +17941,11 @@ ${error51.stderrTail}`] : []
|
|
|
18239
17941
|
grok: "https://grok.com/",
|
|
18240
17942
|
omp: "https://github.com/can1357/oh-my-pi",
|
|
18241
17943
|
antigravity: "https://antigravity.google/product/antigravity-cli",
|
|
18242
|
-
hermes: "https://hermes-agent.nousresearch.com/docs",
|
|
18243
|
-
muse: "https://www.meta.ai/",
|
|
18244
17944
|
"kiro-cli": "https://kiro.dev/docs/cli/",
|
|
18245
17945
|
codebuddy: "https://www.codebuddy.ai/docs/zh/cli/overview",
|
|
18246
|
-
"cursor-cli": "https://cursor.com/docs/cli/installation"
|
|
17946
|
+
"cursor-cli": "https://cursor.com/docs/cli/installation",
|
|
17947
|
+
hermes: "https://hermes-agent.nousresearch.com/docs",
|
|
17948
|
+
muse: "https://www.meta.ai/"
|
|
18247
17949
|
};
|
|
18248
17950
|
var CONTROL_ATTRIBUTE = "data-codexhost-agent-control";
|
|
18249
17951
|
var AGENT_MENU_WIDTH = 224;
|
|
@@ -18268,11 +17970,11 @@ ${error51.stderrTail}`] : []
|
|
|
18268
17970
|
checkVisible: input.selected && !actionVisible
|
|
18269
17971
|
};
|
|
18270
17972
|
}
|
|
18271
|
-
function rendererAgentPickerTooltip(state, activeAccount
|
|
18272
|
-
const account = state.agent === "codex" && activeAccount
|
|
17973
|
+
function rendererAgentPickerTooltip(state, activeAccount) {
|
|
17974
|
+
const account = state.agent === "codex" && activeAccount ? ` \xB7 ${activeAccount.email ?? activeAccount.label}` : "";
|
|
18273
17975
|
return `Agent: ${RENDERER_AGENT_LABELS[state.agent]}${account}${state.phase === "locked" ? " (locked)" : ""}`;
|
|
18274
17976
|
}
|
|
18275
|
-
function rendererAgentPickerView(state, adapterState, switching, agents, availability = {}
|
|
17977
|
+
function rendererAgentPickerView(state, adapterState, switching, agents, availability = {}) {
|
|
18276
17978
|
const optionDisabled = Object.fromEntries(
|
|
18277
17979
|
agents.map((agent) => [
|
|
18278
17980
|
agent,
|
|
@@ -18287,7 +17989,7 @@ ${error51.stderrTail}`] : []
|
|
|
18287
17989
|
);
|
|
18288
17990
|
return {
|
|
18289
17991
|
label: RENDERER_AGENT_LABELS[state.agent],
|
|
18290
|
-
triggerDisabled: switching || state.phase === "locked" || agents.length < 2
|
|
17992
|
+
triggerDisabled: switching || state.phase === "locked" || agents.length < 2,
|
|
18291
17993
|
nativeModelHidden: switching || state.agent !== "codex",
|
|
18292
17994
|
optionDisabled,
|
|
18293
17995
|
downloadVisible,
|
|
@@ -18312,7 +18014,7 @@ ${error51.stderrTail}`] : []
|
|
|
18312
18014
|
return !menu.hidden;
|
|
18313
18015
|
}
|
|
18314
18016
|
}
|
|
18315
|
-
function mountRendererAgentPicker(composerId, enabledAgents, onSelect, onDownload,
|
|
18017
|
+
function mountRendererAgentPicker(composerId, enabledAgents, onSelect, onDownload, onOpen, groupPreference = getSharedAgentGroupPreferenceStore()) {
|
|
18316
18018
|
const root = document.createElement("div");
|
|
18317
18019
|
root.setAttribute(CONTROL_ATTRIBUTE, composerId);
|
|
18318
18020
|
root.style.display = "inline-flex";
|
|
@@ -18395,24 +18097,6 @@ ${error51.stderrTail}`] : []
|
|
|
18395
18097
|
else menu.hidden = true;
|
|
18396
18098
|
trigger.setAttribute("aria-expanded", "false");
|
|
18397
18099
|
};
|
|
18398
|
-
const codexAccountGroup = createRendererCodexAccountGroup({
|
|
18399
|
-
ownerDocument: document,
|
|
18400
|
-
accountsLabel: groupMessages.codexAccountsLabel,
|
|
18401
|
-
manageAccountsLabel: groupMessages.manageCodexAccountsLabel,
|
|
18402
|
-
messages: groupMessages,
|
|
18403
|
-
onSelect(accountId) {
|
|
18404
|
-
close();
|
|
18405
|
-
trigger.focus();
|
|
18406
|
-
onSelectCodexAccount(accountId);
|
|
18407
|
-
},
|
|
18408
|
-
onManage() {
|
|
18409
|
-
close();
|
|
18410
|
-
openSettingsPage("accounts", trigger);
|
|
18411
|
-
}
|
|
18412
|
-
});
|
|
18413
|
-
const codexAccountOptions = codexAccountGroup.options;
|
|
18414
|
-
const codexAccountContainer = codexAccountGroup.root;
|
|
18415
|
-
trigger.append(codexAccountGroup.badge);
|
|
18416
18100
|
const focusOption = (position) => {
|
|
18417
18101
|
const available = [
|
|
18418
18102
|
...menu.querySelectorAll('[role="menuitemradio"], [role="menuitem"]')
|
|
@@ -18653,14 +18337,8 @@ ${error51.stderrTail}`] : []
|
|
|
18653
18337
|
initiallyHidden: true,
|
|
18654
18338
|
bordered: true
|
|
18655
18339
|
});
|
|
18656
|
-
let latestAvailability = {};
|
|
18657
18340
|
let mainAgents = [...enabledAgents];
|
|
18658
18341
|
let moreAgents = [];
|
|
18659
|
-
const isInstalled = (agent) => latestAvailability[agent] !== "notInstalled";
|
|
18660
|
-
const partitionExternal = (agents) => partitionAgentsByInstallStatus(
|
|
18661
|
-
agents.filter((agent) => agent !== "codex").map((agent) => ({ agent })),
|
|
18662
|
-
isInstalled
|
|
18663
|
-
).map((entry) => entry.agent);
|
|
18664
18342
|
const regroup = () => {
|
|
18665
18343
|
const enabledSet = new Set(enabledAgents);
|
|
18666
18344
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -18681,15 +18359,12 @@ ${error51.stderrTail}`] : []
|
|
|
18681
18359
|
seen.add(agent);
|
|
18682
18360
|
nextMain.push(agent);
|
|
18683
18361
|
}
|
|
18684
|
-
|
|
18685
|
-
|
|
18686
|
-
mainAgents = enabledSet.has("codex") ? ["codex", ...mainExternal] : mainExternal;
|
|
18687
|
-
moreAgents = moreExternal;
|
|
18362
|
+
mainAgents = nextMain;
|
|
18363
|
+
moreAgents = nextMore;
|
|
18688
18364
|
const mainChildren = [];
|
|
18689
18365
|
for (const agent of mainAgents) {
|
|
18690
18366
|
const row = rowsByAgent.get(agent);
|
|
18691
18367
|
if (row) mainChildren.push(row);
|
|
18692
|
-
if (agent === "codex") mainChildren.push(codexAccountContainer);
|
|
18693
18368
|
}
|
|
18694
18369
|
mainGroup.replaceChildren(...mainChildren);
|
|
18695
18370
|
moreRows.replaceChildren(
|
|
@@ -18762,15 +18437,6 @@ ${error51.stderrTail}`] : []
|
|
|
18762
18437
|
menu,
|
|
18763
18438
|
agents: [...enabledAgents],
|
|
18764
18439
|
options,
|
|
18765
|
-
syncAvailability(availability) {
|
|
18766
|
-
latestAvailability = availability;
|
|
18767
|
-
regroup();
|
|
18768
|
-
},
|
|
18769
|
-
codexAccounts: [],
|
|
18770
|
-
codexAccountOptions,
|
|
18771
|
-
codexAccountContainer,
|
|
18772
|
-
codexAccountGroup,
|
|
18773
|
-
selectCodexAccount: onSelectCodexAccount,
|
|
18774
18440
|
close,
|
|
18775
18441
|
dispose() {
|
|
18776
18442
|
close();
|
|
@@ -18786,18 +18452,13 @@ ${error51.stderrTail}`] : []
|
|
|
18786
18452
|
};
|
|
18787
18453
|
return control;
|
|
18788
18454
|
}
|
|
18789
|
-
function renderRendererAgentPicker(control, state, adapterState, switching, availability = {},
|
|
18790
|
-
control.syncAvailability(availability);
|
|
18791
|
-
control.codexAccounts = [...codexAccounts];
|
|
18792
|
-
const codexOption = control.options.codex;
|
|
18793
|
-
if (codexOption) codexOption.row.hidden = shouldExpandCodexAccountOptions(codexAccounts.length);
|
|
18455
|
+
function renderRendererAgentPicker(control, state, adapterState, switching, availability = {}, currentCodexAccount = null, ownershipError = false) {
|
|
18794
18456
|
const view = rendererAgentPickerView(
|
|
18795
18457
|
state,
|
|
18796
18458
|
adapterState,
|
|
18797
18459
|
switching,
|
|
18798
18460
|
control.agents,
|
|
18799
|
-
availability
|
|
18800
|
-
shouldExpandCodexAccountOptions(codexAccounts.length) ? codexAccounts.length : 0
|
|
18461
|
+
availability
|
|
18801
18462
|
);
|
|
18802
18463
|
if (control.iconSlot.dataset.agent !== state.agent) {
|
|
18803
18464
|
control.iconSlot.replaceChildren(createRendererAgentIcon(state.agent));
|
|
@@ -18809,14 +18470,7 @@ ${error51.stderrTail}`] : []
|
|
|
18809
18470
|
"aria-label",
|
|
18810
18471
|
ownershipError ? pickerGroupMessages().ownershipErrorLabel : state.phase === "locked" ? `Agent: ${view.label}` : `Select Agent, current ${view.label}`
|
|
18811
18472
|
);
|
|
18812
|
-
|
|
18813
|
-
control.codexAccountGroup.render({
|
|
18814
|
-
accounts: shouldExpandCodexAccountOptions(codexAccounts.length) ? codexAccounts : [],
|
|
18815
|
-
selectedAccountId: state.agent === "codex" ? activeAccount?.accountId ?? null : null,
|
|
18816
|
-
disabled: switching || state.phase === "locked",
|
|
18817
|
-
showBadge: state.agent === "codex" && shouldExpandCodexAccountOptions(codexAccounts.length)
|
|
18818
|
-
});
|
|
18819
|
-
control.trigger.title = ownershipError ? pickerGroupMessages().ownershipErrorLabel : rendererAgentPickerTooltip(state, activeAccount, codexAccounts.length);
|
|
18473
|
+
control.trigger.title = ownershipError ? pickerGroupMessages().ownershipErrorLabel : rendererAgentPickerTooltip(state, currentCodexAccount ?? void 0);
|
|
18820
18474
|
control.trigger.style.cursor = control.trigger.disabled ? "not-allowed" : "pointer";
|
|
18821
18475
|
control.trigger.style.opacity = control.trigger.disabled && !switching ? "0.72" : "1";
|
|
18822
18476
|
control.iconSlot.style.display = switching || ownershipError ? "none" : "inline-flex";
|
|
@@ -19978,6 +19632,32 @@ ${error51.stderrTail}`] : []
|
|
|
19978
19632
|
}
|
|
19979
19633
|
}
|
|
19980
19634
|
|
|
19635
|
+
// src/renderer-codex-account-options.ts
|
|
19636
|
+
function codexAccountAuthKind(account) {
|
|
19637
|
+
return account.authKind === "api" ? "api" : "chatgpt";
|
|
19638
|
+
}
|
|
19639
|
+
function formatCodexAccountAuthLabel(account, messages) {
|
|
19640
|
+
if (codexAccountAuthKind(account) === "api") {
|
|
19641
|
+
const identity2 = account.authIdentity?.trim() || messages.accountAuthApiIdentityFallback;
|
|
19642
|
+
return `${messages.accountAuthApiPrefix} - ${identity2}`;
|
|
19643
|
+
}
|
|
19644
|
+
const identity = account.email ?? account.authIdentity;
|
|
19645
|
+
if (!identity) return `${messages.accountAuthChatPrefix} - ${account.label}`;
|
|
19646
|
+
return `${messages.accountAuthChatPrefix} - ${identity}`;
|
|
19647
|
+
}
|
|
19648
|
+
function codexAccountDisplayName(account) {
|
|
19649
|
+
const full = account.email ?? account.label;
|
|
19650
|
+
const separator = account.email?.lastIndexOf("@") ?? -1;
|
|
19651
|
+
if (!account.email || separator <= 0 || separator === account.email.length - 1) {
|
|
19652
|
+
return { local: full, domain: null, full };
|
|
19653
|
+
}
|
|
19654
|
+
return {
|
|
19655
|
+
local: account.email.slice(0, separator),
|
|
19656
|
+
domain: account.email.slice(separator + 1),
|
|
19657
|
+
full
|
|
19658
|
+
};
|
|
19659
|
+
}
|
|
19660
|
+
|
|
19981
19661
|
// src/renderer-usage-control.ts
|
|
19982
19662
|
var ENGLISH_USAGE_MESSAGES = Object.freeze({
|
|
19983
19663
|
usage: "Usage",
|
|
@@ -21531,7 +21211,7 @@ ${error51.stderrTail}`] : []
|
|
|
21531
21211
|
setNativeControlHidden(control.nativeContextUsageControl, false);
|
|
21532
21212
|
setNativeControlHidden(control.nativePermissionModeControl, hidePermissionMode);
|
|
21533
21213
|
}
|
|
21534
|
-
function mountComposerAgentControl(composer, composerId, sendButton, enabledAgents, onSelect, onDownload,
|
|
21214
|
+
function mountComposerAgentControl(composer, composerId, sendButton, enabledAgents, onSelect, onDownload, onOpenProviderPicker, onSelectModel, onSelectThinking, onSelectPermissionMode, onSelectCommand) {
|
|
21535
21215
|
const nativeModelControl = captureNativeControl(nativeModelControlForComposer(composer));
|
|
21536
21216
|
const nativeContextUsageControl = captureNativeControl(
|
|
21537
21217
|
nativeContextUsageControlForComposer(composer)
|
|
@@ -21544,7 +21224,6 @@ ${error51.stderrTail}`] : []
|
|
|
21544
21224
|
enabledAgents,
|
|
21545
21225
|
onSelect,
|
|
21546
21226
|
onDownload,
|
|
21547
|
-
onSelectCodexAccount,
|
|
21548
21227
|
onOpenProviderPicker
|
|
21549
21228
|
);
|
|
21550
21229
|
const modelPicker = mountRendererModelPicker(composerId, onSelectModel, onSelectThinking);
|
|
@@ -21589,7 +21268,7 @@ ${error51.stderrTail}`] : []
|
|
|
21589
21268
|
refreshCreditsPlacement(control);
|
|
21590
21269
|
return control;
|
|
21591
21270
|
}
|
|
21592
|
-
function renderComposerAgentControl(control, state, adapterState, switching, availability = {}, modelView = { status: "idle" }, permissionModeView = { status: "idle" }, usage = null, accountCredits = null, locale = "en",
|
|
21271
|
+
function renderComposerAgentControl(control, state, adapterState, switching, availability = {}, modelView = { status: "idle" }, permissionModeView = { status: "idle" }, usage = null, accountCredits = null, locale = "en", currentCodexAccount = null, ownershipError = false) {
|
|
21593
21272
|
if (control.usage === null) {
|
|
21594
21273
|
control.usage = mountRendererUsageControl(control.composerId, locale);
|
|
21595
21274
|
}
|
|
@@ -21616,7 +21295,7 @@ ${error51.stderrTail}`] : []
|
|
|
21616
21295
|
adapterState,
|
|
21617
21296
|
switching,
|
|
21618
21297
|
availability,
|
|
21619
|
-
|
|
21298
|
+
currentCodexAccount,
|
|
21620
21299
|
ownershipError
|
|
21621
21300
|
);
|
|
21622
21301
|
reconcileComposerNativeControls(
|
|
@@ -21632,7 +21311,7 @@ ${error51.stderrTail}`] : []
|
|
|
21632
21311
|
permissionModeVisible,
|
|
21633
21312
|
locale
|
|
21634
21313
|
);
|
|
21635
|
-
const selectedCodexAccount = state.agent === "codex" && !ownershipError ?
|
|
21314
|
+
const selectedCodexAccount = state.agent === "codex" && !ownershipError ? currentCodexAccount : void 0;
|
|
21636
21315
|
if (control.usage) {
|
|
21637
21316
|
renderRendererUsageControl(
|
|
21638
21317
|
control.usage,
|
|
@@ -21648,7 +21327,7 @@ ${error51.stderrTail}`] : []
|
|
|
21648
21327
|
if (state.agent === "codex") control.harnessCommands.close();
|
|
21649
21328
|
renderRendererCreditsControl(
|
|
21650
21329
|
control.credits,
|
|
21651
|
-
selectedCodexAccount && codexAccountAuthKind(selectedCodexAccount) === "api" ? null :
|
|
21330
|
+
selectedCodexAccount && codexAccountAuthKind(selectedCodexAccount) === "api" ? null : accountCredits,
|
|
21652
21331
|
locale
|
|
21653
21332
|
);
|
|
21654
21333
|
}
|
|
@@ -21716,40 +21395,119 @@ ${error51.stderrTail}`] : []
|
|
|
21716
21395
|
}
|
|
21717
21396
|
|
|
21718
21397
|
// src/renderer-codex-account-state.ts
|
|
21719
|
-
function
|
|
21720
|
-
|
|
21721
|
-
|
|
21722
|
-
|
|
21723
|
-
|
|
21724
|
-
|
|
21725
|
-
|
|
21726
|
-
|
|
21398
|
+
function resolveCurrentCodexAccountId(accounts, currentAccountId) {
|
|
21399
|
+
return accounts.some((account) => account.accountId === currentAccountId) ? currentAccountId : null;
|
|
21400
|
+
}
|
|
21401
|
+
function shouldApplyCodexAccountSnapshot(current, next) {
|
|
21402
|
+
if (!current) return true;
|
|
21403
|
+
if (next.instanceId !== void 0 && next.instanceId !== current.instanceId) return true;
|
|
21404
|
+
if (current.instanceId !== void 0 && next.instanceId === void 0) return false;
|
|
21405
|
+
return next.revision >= current.revision;
|
|
21727
21406
|
}
|
|
21728
21407
|
var RendererCodexAccountState = class {
|
|
21729
|
-
constructor(client) {
|
|
21408
|
+
constructor(client, changed = () => void 0) {
|
|
21730
21409
|
this.client = client;
|
|
21410
|
+
let unsubscribe;
|
|
21411
|
+
try {
|
|
21412
|
+
unsubscribe = client.subscribeCodexAccounts?.((state) => {
|
|
21413
|
+
if (this.#apply(state)) changed();
|
|
21414
|
+
});
|
|
21415
|
+
} catch {
|
|
21416
|
+
}
|
|
21417
|
+
this.#unsubscribe = unsubscribe;
|
|
21731
21418
|
}
|
|
21732
21419
|
client;
|
|
21733
21420
|
accounts = [];
|
|
21734
|
-
|
|
21735
|
-
|
|
21421
|
+
currentAccountId = null;
|
|
21422
|
+
phase = "unavailable";
|
|
21423
|
+
revision = 0;
|
|
21424
|
+
instanceId;
|
|
21425
|
+
#hasSnapshot = false;
|
|
21736
21426
|
#request = null;
|
|
21737
|
-
|
|
21738
|
-
|
|
21427
|
+
#unsubscribe;
|
|
21428
|
+
get readyAccountId() {
|
|
21429
|
+
return resolveCurrentCodexAccountId(
|
|
21430
|
+
this.accounts,
|
|
21431
|
+
this.phase === "ready" ? this.currentAccountId : null
|
|
21432
|
+
);
|
|
21739
21433
|
}
|
|
21740
21434
|
refresh() {
|
|
21741
21435
|
if (this.#request) return this.#request;
|
|
21742
21436
|
this.#request = Promise.resolve().then(() => this.client.listCodexAccounts()).then((result) => {
|
|
21743
|
-
this
|
|
21744
|
-
this.overrideAccountId = this.selection.overrideAccountId;
|
|
21437
|
+
this.#apply(result);
|
|
21745
21438
|
}).catch(() => {
|
|
21746
21439
|
}).finally(() => {
|
|
21747
21440
|
this.#request = null;
|
|
21748
21441
|
});
|
|
21749
21442
|
return this.#request;
|
|
21750
21443
|
}
|
|
21444
|
+
dispose() {
|
|
21445
|
+
this.#unsubscribe?.();
|
|
21446
|
+
}
|
|
21447
|
+
#apply(result) {
|
|
21448
|
+
if (!shouldApplyCodexAccountSnapshot(
|
|
21449
|
+
this.#hasSnapshot ? { instanceId: this.instanceId, revision: this.revision } : null,
|
|
21450
|
+
result
|
|
21451
|
+
)) {
|
|
21452
|
+
return false;
|
|
21453
|
+
}
|
|
21454
|
+
this.#hasSnapshot = true;
|
|
21455
|
+
this.accounts = result.accounts;
|
|
21456
|
+
this.currentAccountId = result.currentAccountId;
|
|
21457
|
+
this.phase = result.phase;
|
|
21458
|
+
this.revision = result.revision;
|
|
21459
|
+
this.instanceId = result.instanceId;
|
|
21460
|
+
return true;
|
|
21461
|
+
}
|
|
21751
21462
|
};
|
|
21752
21463
|
|
|
21464
|
+
// ../desktop-control/dist/renderer-react-ownership.js
|
|
21465
|
+
function committedReactAncestors(value) {
|
|
21466
|
+
const MAX_VISITED_FIBERS = 2e4;
|
|
21467
|
+
const fiber = (value2) => typeof value2 === "object" && value2 !== null ? value2 : null;
|
|
21468
|
+
const first = fiber(value);
|
|
21469
|
+
if (!first)
|
|
21470
|
+
return [];
|
|
21471
|
+
const previous = [];
|
|
21472
|
+
const seen = /* @__PURE__ */ new Set();
|
|
21473
|
+
for (let node = first; node; node = fiber(node.return)) {
|
|
21474
|
+
if (seen.has(node) || seen.size >= MAX_VISITED_FIBERS)
|
|
21475
|
+
return [];
|
|
21476
|
+
seen.add(node);
|
|
21477
|
+
previous.push(node);
|
|
21478
|
+
}
|
|
21479
|
+
const rootState = fiber(previous.at(-1)?.stateNode);
|
|
21480
|
+
if (!rootState || !("current" in rootState))
|
|
21481
|
+
return previous;
|
|
21482
|
+
const current = fiber(rootState.current);
|
|
21483
|
+
if (!current)
|
|
21484
|
+
return [];
|
|
21485
|
+
const stack = [{ node: current, parent: null }];
|
|
21486
|
+
const alternate = fiber(first.alternate);
|
|
21487
|
+
seen.clear();
|
|
21488
|
+
while (stack.length > 0 && seen.size < MAX_VISITED_FIBERS) {
|
|
21489
|
+
const entry = stack.pop();
|
|
21490
|
+
if (!entry)
|
|
21491
|
+
break;
|
|
21492
|
+
if (seen.has(entry.node))
|
|
21493
|
+
return [];
|
|
21494
|
+
seen.add(entry.node);
|
|
21495
|
+
if (entry.node === first || entry.node === alternate) {
|
|
21496
|
+
const ancestors = [];
|
|
21497
|
+
for (let cursor = entry; cursor; cursor = cursor.parent)
|
|
21498
|
+
ancestors.push(cursor.node);
|
|
21499
|
+
return ancestors;
|
|
21500
|
+
}
|
|
21501
|
+
const sibling = entry.parent && fiber(entry.node.sibling);
|
|
21502
|
+
if (sibling)
|
|
21503
|
+
stack.push({ node: sibling, parent: entry.parent });
|
|
21504
|
+
const child = fiber(entry.node.child);
|
|
21505
|
+
if (child)
|
|
21506
|
+
stack.push({ node: child, parent: entry });
|
|
21507
|
+
}
|
|
21508
|
+
return [];
|
|
21509
|
+
}
|
|
21510
|
+
|
|
21753
21511
|
// src/renderer-request-sender.ts
|
|
21754
21512
|
var RendererMethodUnavailableError = class extends Error {
|
|
21755
21513
|
constructor(method, cause) {
|
|
@@ -22671,6 +22429,8 @@ ${error51.stderrTail}`] : []
|
|
|
22671
22429
|
// src/renderer-model-client.ts
|
|
22672
22430
|
var HARNESS_INSPECT_METHOD = "codexhost/harness/inspect";
|
|
22673
22431
|
var HARNESS_PLUGIN_LIST_METHOD = "codexhost/harness/plugins/list";
|
|
22432
|
+
var HARNESS_ACCOUNT_SOURCES_METHOD = "codexhost/harness/accounts/sources";
|
|
22433
|
+
var HARNESS_ACCOUNT_INSPECT_METHOD = "codexhost/harness/accounts/inspect";
|
|
22674
22434
|
var HARNESS_WEB_UI_OPEN_METHOD = "codexhost/harness/web-ui/open";
|
|
22675
22435
|
var THREAD_FORK_METHOD = "codexhost/thread/fork";
|
|
22676
22436
|
var THREAD_INSPECT_METHOD = "codexhost/thread/inspect";
|
|
@@ -22685,23 +22445,23 @@ ${error51.stderrTail}`] : []
|
|
|
22685
22445
|
var THREAD_USAGE_INSPECT_METHOD = "codexhost/thread/usage/inspect";
|
|
22686
22446
|
var THREAD_USAGE_UPDATED_METHOD = "codexhost/thread/usage/updated";
|
|
22687
22447
|
var THREAD_TOKEN_USAGE_UPDATED_METHOD = "thread/tokenUsage/updated";
|
|
22448
|
+
var TURN_COMPLETED_METHOD = "turn/completed";
|
|
22449
|
+
var THREAD_USAGE_REFRESH_METHODS = [
|
|
22450
|
+
THREAD_TOKEN_USAGE_UPDATED_METHOD,
|
|
22451
|
+
THREAD_USAGE_UPDATED_METHOD,
|
|
22452
|
+
TURN_COMPLETED_METHOD
|
|
22453
|
+
];
|
|
22688
22454
|
var UPDATE_CHECK_METHOD = "codexhost/update/check";
|
|
22689
22455
|
var UPDATE_START_METHOD = "codexhost/update/start";
|
|
22690
22456
|
var UPDATE_STATUS_METHOD = "codexhost/update/status";
|
|
22691
22457
|
var CODEX_ACCOUNT_LIST_METHOD = "codexhost/account/list";
|
|
22692
22458
|
var CODEX_ACCOUNT_REFRESH_METHOD = "codexhost/account/refresh";
|
|
22693
|
-
var
|
|
22694
|
-
var CODEX_ACCOUNT_DELETE_METHOD = "codexhost/account/delete";
|
|
22695
|
-
var CODEX_ACCOUNT_ACTIVATE_METHOD = "codexhost/account/activate";
|
|
22696
|
-
var CODEX_ACCOUNT_LOGIN_START_METHOD = "codexhost/account/login/start";
|
|
22697
|
-
var CODEX_ACCOUNT_LOGIN_CANCEL_METHOD = "codexhost/account/login/cancel";
|
|
22698
|
-
var CODEX_ACCOUNT_LOGIN_COMPLETED_METHOD = "codexhost/account/login/completed";
|
|
22699
|
-
var CODEX_ACCOUNT_RESET_CREDIT_CONSUME_METHOD = "codexhost/account/rate-limit-reset/consume";
|
|
22459
|
+
var CODEX_ACCOUNT_CHANGED_METHOD = "codexhost/account/changed";
|
|
22700
22460
|
function isRecord6(value) {
|
|
22701
22461
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
22702
22462
|
}
|
|
22703
22463
|
function notifiedThreadId(notification) {
|
|
22704
|
-
if (!isRecord6(notification) ||
|
|
22464
|
+
if (!isRecord6(notification) || !THREAD_USAGE_REFRESH_METHODS.includes(notification.method)) {
|
|
22705
22465
|
return null;
|
|
22706
22466
|
}
|
|
22707
22467
|
const params = notification.params;
|
|
@@ -22717,15 +22477,28 @@ ${error51.stderrTail}`] : []
|
|
|
22717
22477
|
function createThreadUsageSubscriptionRelay() {
|
|
22718
22478
|
const listeners = /* @__PURE__ */ new Set();
|
|
22719
22479
|
let removeNotificationCallback = null;
|
|
22480
|
+
let connectedClient = null;
|
|
22481
|
+
let generation = 0;
|
|
22482
|
+
const disconnect = () => {
|
|
22483
|
+
generation += 1;
|
|
22484
|
+
removeNotificationCallback?.();
|
|
22485
|
+
removeNotificationCallback = null;
|
|
22486
|
+
connectedClient = null;
|
|
22487
|
+
};
|
|
22720
22488
|
return {
|
|
22721
22489
|
connect(client) {
|
|
22722
|
-
if (
|
|
22490
|
+
if (client === connectedClient && removeNotificationCallback) return;
|
|
22491
|
+
disconnect();
|
|
22492
|
+
if (!client || listeners.size === 0) return;
|
|
22493
|
+
connectedClient = client;
|
|
22494
|
+
const subscriptionGeneration = generation;
|
|
22723
22495
|
try {
|
|
22724
22496
|
removeNotificationCallback = client.subscribeThreadUsage?.((update) => {
|
|
22497
|
+
if (subscriptionGeneration !== generation) return;
|
|
22725
22498
|
for (const listener of listeners) listener(update);
|
|
22726
22499
|
}) ?? null;
|
|
22727
22500
|
} catch {
|
|
22728
|
-
|
|
22501
|
+
disconnect();
|
|
22729
22502
|
}
|
|
22730
22503
|
},
|
|
22731
22504
|
subscribe(listener) {
|
|
@@ -22733,13 +22506,11 @@ ${error51.stderrTail}`] : []
|
|
|
22733
22506
|
return () => {
|
|
22734
22507
|
listeners.delete(listener);
|
|
22735
22508
|
if (listeners.size > 0) return;
|
|
22736
|
-
|
|
22737
|
-
removeNotificationCallback = null;
|
|
22509
|
+
disconnect();
|
|
22738
22510
|
};
|
|
22739
22511
|
},
|
|
22740
22512
|
dispose() {
|
|
22741
|
-
|
|
22742
|
-
removeNotificationCallback = null;
|
|
22513
|
+
disconnect();
|
|
22743
22514
|
listeners.clear();
|
|
22744
22515
|
}
|
|
22745
22516
|
};
|
|
@@ -22862,7 +22633,7 @@ ${error51.stderrTail}`] : []
|
|
|
22862
22633
|
let disposed = false;
|
|
22863
22634
|
const generations = /* @__PURE__ */ new Map();
|
|
22864
22635
|
const removeNotificationCallback = notifications.addNotificationCallback(
|
|
22865
|
-
|
|
22636
|
+
THREAD_USAGE_REFRESH_METHODS,
|
|
22866
22637
|
(notification) => {
|
|
22867
22638
|
const threadId = notifiedThreadId(notification);
|
|
22868
22639
|
if (!threadId) return;
|
|
@@ -22911,16 +22682,25 @@ ${error51.stderrTail}`] : []
|
|
|
22911
22682
|
);
|
|
22912
22683
|
return codexAccountUsageResultSchema.parse(result);
|
|
22913
22684
|
},
|
|
22914
|
-
async
|
|
22915
|
-
|
|
22916
|
-
|
|
22917
|
-
|
|
22685
|
+
async listHarnessAccountSources() {
|
|
22686
|
+
return harnessAccountSourceListResultSchema.parse(
|
|
22687
|
+
await manager.sendRequest(HARNESS_ACCOUNT_SOURCES_METHOD, {})
|
|
22688
|
+
);
|
|
22689
|
+
},
|
|
22690
|
+
async inspectHarnessAccount(input) {
|
|
22691
|
+
return harnessAccountInspectResultSchema.parse(
|
|
22692
|
+
await manager.sendRequest(
|
|
22693
|
+
HARNESS_ACCOUNT_INSPECT_METHOD,
|
|
22694
|
+
harnessAccountInspectParamsSchema.parse(input)
|
|
22695
|
+
)
|
|
22918
22696
|
);
|
|
22919
|
-
return codexAccountResetCreditConsumeResultSchema.parse(result);
|
|
22920
22697
|
},
|
|
22921
|
-
async listHarnessAccounts() {
|
|
22698
|
+
async listHarnessAccounts(input = {}) {
|
|
22922
22699
|
return harnessAccountListResultSchema.parse(
|
|
22923
|
-
await manager.sendRequest(
|
|
22700
|
+
await manager.sendRequest(
|
|
22701
|
+
"codexhost/harness/accounts/list",
|
|
22702
|
+
harnessAccountListParamsSchema.parse(input)
|
|
22703
|
+
)
|
|
22924
22704
|
);
|
|
22925
22705
|
},
|
|
22926
22706
|
async listCodexAccounts() {
|
|
@@ -22931,56 +22711,16 @@ ${error51.stderrTail}`] : []
|
|
|
22931
22711
|
const result = await manager.sendRequest(CODEX_ACCOUNT_REFRESH_METHOD, {});
|
|
22932
22712
|
return codexAccountListResultSchema.parse(result);
|
|
22933
22713
|
},
|
|
22934
|
-
|
|
22935
|
-
const result = await manager.sendRequest(
|
|
22936
|
-
CODEX_ACCOUNT_CREATE_METHOD,
|
|
22937
|
-
codexAccountCreateParamsSchema.parse(input)
|
|
22938
|
-
);
|
|
22939
|
-
return codexAccountMutationResultSchema.parse(result);
|
|
22940
|
-
},
|
|
22941
|
-
async deleteCodexAccount(input) {
|
|
22942
|
-
const result = await manager.sendRequest(
|
|
22943
|
-
CODEX_ACCOUNT_DELETE_METHOD,
|
|
22944
|
-
codexAccountDeleteParamsSchema.parse(input)
|
|
22945
|
-
);
|
|
22946
|
-
return codexAccountDeleteResultSchema.parse(result);
|
|
22947
|
-
},
|
|
22948
|
-
async activateCodexAccount(input) {
|
|
22949
|
-
const result = await manager.sendRequest(
|
|
22950
|
-
CODEX_ACCOUNT_ACTIVATE_METHOD,
|
|
22951
|
-
codexAccountActivateParamsSchema.parse(input)
|
|
22952
|
-
);
|
|
22953
|
-
return codexAccountMutationResultSchema.parse(result);
|
|
22954
|
-
},
|
|
22955
|
-
async startCodexAccountLogin(input) {
|
|
22956
|
-
const result = await manager.sendRequest(
|
|
22957
|
-
CODEX_ACCOUNT_LOGIN_START_METHOD,
|
|
22958
|
-
codexAccountLoginStartParamsSchema.parse(input)
|
|
22959
|
-
);
|
|
22960
|
-
return codexAccountLoginStartResultSchema.parse(result);
|
|
22961
|
-
},
|
|
22962
|
-
async cancelCodexAccountLogin(input) {
|
|
22963
|
-
const result = await manager.sendRequest(
|
|
22964
|
-
CODEX_ACCOUNT_LOGIN_CANCEL_METHOD,
|
|
22965
|
-
codexAccountLoginCancelParamsSchema.parse(input)
|
|
22966
|
-
);
|
|
22967
|
-
return codexAccountLoginCancelResultSchema.parse(result);
|
|
22968
|
-
},
|
|
22969
|
-
subscribeCodexAccountLogin(listener) {
|
|
22714
|
+
subscribeCodexAccounts(listener) {
|
|
22970
22715
|
const notifications = notificationTarget(source);
|
|
22971
22716
|
if (!notifications?.addNotificationCallback) {
|
|
22972
|
-
throw new Error("Renderer Account
|
|
22717
|
+
throw new Error("Renderer Account notification callback is unavailable");
|
|
22973
22718
|
}
|
|
22974
|
-
return notifications.addNotificationCallback(
|
|
22975
|
-
|
|
22976
|
-
(notification)
|
|
22977
|
-
|
|
22978
|
-
|
|
22979
|
-
}
|
|
22980
|
-
const result = codexAccountLoginCompletedSchema.safeParse(notification.params);
|
|
22981
|
-
if (result.success) listener(result.data);
|
|
22982
|
-
}
|
|
22983
|
-
);
|
|
22719
|
+
return notifications.addNotificationCallback(CODEX_ACCOUNT_CHANGED_METHOD, (notification) => {
|
|
22720
|
+
if (!isRecord6(notification) || notification.method !== CODEX_ACCOUNT_CHANGED_METHOD) return;
|
|
22721
|
+
const state = codexAccountChangedSchema.safeParse(notification.params);
|
|
22722
|
+
if (state.success) listener(state.data);
|
|
22723
|
+
});
|
|
22984
22724
|
}
|
|
22985
22725
|
});
|
|
22986
22726
|
}
|
|
@@ -23305,17 +23045,13 @@ ${error51.stderrTail}`] : []
|
|
|
23305
23045
|
return [];
|
|
23306
23046
|
}
|
|
23307
23047
|
const targets = /* @__PURE__ */ new Set();
|
|
23308
|
-
|
|
23309
|
-
for (let depth = 0; depth < 200; depth += 1) {
|
|
23048
|
+
for (const fiber of committedReactAncestors(firstFiber2)) {
|
|
23310
23049
|
let hook = fiber.memoizedState;
|
|
23311
23050
|
for (let hookIndex = 0; hook && hookIndex < 100; hookIndex += 1) {
|
|
23312
23051
|
const owner = requestTargetOwnerFromHookState(hook.memoizedState);
|
|
23313
23052
|
if (owner) targets.add(owner);
|
|
23314
23053
|
hook = typeof hook.next === "object" && hook.next !== null ? hook.next : null;
|
|
23315
23054
|
}
|
|
23316
|
-
const parent = fiber.return;
|
|
23317
|
-
if (typeof parent !== "object" && typeof parent !== "function" || parent === null) break;
|
|
23318
|
-
fiber = parent;
|
|
23319
23055
|
}
|
|
23320
23056
|
return [...targets];
|
|
23321
23057
|
}
|
|
@@ -23541,6 +23277,7 @@ ${error51.stderrTail}`] : []
|
|
|
23541
23277
|
const syncActiveRoute = (route) => {
|
|
23542
23278
|
const policy = route?.policy ?? null;
|
|
23543
23279
|
const client = route ? modelClientForTargets(route.targets, route.policy) : null;
|
|
23280
|
+
usageSubscription.connect(client);
|
|
23544
23281
|
if (activeRoutePolicy === policy && activeRouteClient === client) return client;
|
|
23545
23282
|
activeRoutePolicy = policy;
|
|
23546
23283
|
activeRouteClient = client;
|
|
@@ -23554,7 +23291,6 @@ ${error51.stderrTail}`] : []
|
|
|
23554
23291
|
const currentModelClient = () => {
|
|
23555
23292
|
const client = currentRequestRoute() ? activeRouteClient : null;
|
|
23556
23293
|
if (!client) throw new Error("Renderer Model request manager is unavailable");
|
|
23557
|
-
usageSubscription.connect(client);
|
|
23558
23294
|
return client;
|
|
23559
23295
|
};
|
|
23560
23296
|
const modelControl = Object.freeze({
|
|
@@ -23593,29 +23329,35 @@ ${error51.stderrTail}`] : []
|
|
|
23593
23329
|
if (!client.inspectCodexAccountUsage) throw new Error("Codex Account Usage is unavailable");
|
|
23594
23330
|
return client.inspectCodexAccountUsage(input);
|
|
23595
23331
|
},
|
|
23596
|
-
|
|
23332
|
+
listHarnessAccountSources: () => {
|
|
23597
23333
|
const client = currentModelClient();
|
|
23598
|
-
if (!client.
|
|
23599
|
-
throw new Error("
|
|
23334
|
+
if (!client.listHarnessAccountSources) {
|
|
23335
|
+
throw new Error("Harness account source discovery is unavailable");
|
|
23600
23336
|
}
|
|
23601
|
-
return client.
|
|
23337
|
+
return client.listHarnessAccountSources();
|
|
23602
23338
|
},
|
|
23603
|
-
|
|
23339
|
+
inspectHarnessAccount: (input) => {
|
|
23340
|
+
const client = currentModelClient();
|
|
23341
|
+
if (!client.inspectHarnessAccount) {
|
|
23342
|
+
throw new Error("Harness account inspection is unavailable");
|
|
23343
|
+
}
|
|
23344
|
+
return client.inspectHarnessAccount(input);
|
|
23345
|
+
},
|
|
23346
|
+
listHarnessAccounts: (input) => {
|
|
23604
23347
|
const client = currentModelClient();
|
|
23605
23348
|
if (!client.listHarnessAccounts) throw new Error("Harness account inspection is unavailable");
|
|
23606
|
-
return client.listHarnessAccounts();
|
|
23349
|
+
return client.listHarnessAccounts(input);
|
|
23607
23350
|
},
|
|
23608
23351
|
listCodexAccounts: () => currentModelClient().listCodexAccounts(),
|
|
23609
23352
|
refreshCodexAccounts: () => {
|
|
23610
23353
|
const client = currentModelClient();
|
|
23611
23354
|
return client.refreshCodexAccounts?.() ?? client.listCodexAccounts();
|
|
23612
23355
|
},
|
|
23613
|
-
|
|
23614
|
-
|
|
23615
|
-
|
|
23616
|
-
|
|
23617
|
-
|
|
23618
|
-
subscribeCodexAccountLogin: (listener) => currentModelClient().subscribeCodexAccountLogin(listener)
|
|
23356
|
+
subscribeCodexAccounts: (listener) => {
|
|
23357
|
+
const client = currentModelClient();
|
|
23358
|
+
if (!client.subscribeCodexAccounts) throw new Error("Codex Account updates are unavailable");
|
|
23359
|
+
return client.subscribeCodexAccounts(listener);
|
|
23360
|
+
}
|
|
23619
23361
|
});
|
|
23620
23362
|
const forkControl = installRendererForkControl({
|
|
23621
23363
|
getClient: () => modelControl,
|
|
@@ -25714,7 +25456,6 @@ ${error51.stderrTail}`] : []
|
|
|
25714
25456
|
trigger.type = "button";
|
|
25715
25457
|
trigger.className = "settings-icon-button";
|
|
25716
25458
|
trigger.title = input.triggerLabel ?? input.label;
|
|
25717
|
-
trigger.disabled = input.disabled ?? false;
|
|
25718
25459
|
trigger.dataset.accountFocus = input.focusKey;
|
|
25719
25460
|
trigger.setAttribute("aria-label", trigger.title);
|
|
25720
25461
|
trigger.setAttribute("aria-haspopup", "dialog");
|
|
@@ -25740,20 +25481,7 @@ ${error51.stderrTail}`] : []
|
|
|
25740
25481
|
dialog.addEventListener("close", () => {
|
|
25741
25482
|
if (trigger.isConnected && !trigger.disabled) trigger.focus({ preventScroll: true });
|
|
25742
25483
|
});
|
|
25743
|
-
dialog.
|
|
25744
|
-
"click",
|
|
25745
|
-
(event) => {
|
|
25746
|
-
if (input.actions.some((action) => action.contains(event.target))) {
|
|
25747
|
-
trigger.focus({ preventScroll: true });
|
|
25748
|
-
dialog.close();
|
|
25749
|
-
}
|
|
25750
|
-
},
|
|
25751
|
-
{ capture: true }
|
|
25752
|
-
);
|
|
25753
|
-
const actions = document2.createElement("div");
|
|
25754
|
-
actions.className = "settings-account-dialog__actions";
|
|
25755
|
-
actions.append(...input.actions);
|
|
25756
|
-
dialog.append(close, heading, description, actions);
|
|
25484
|
+
dialog.append(close, heading, description);
|
|
25757
25485
|
trigger.addEventListener("click", () => dialog.showModal());
|
|
25758
25486
|
root.append(trigger, dialog);
|
|
25759
25487
|
return root;
|
|
@@ -25878,36 +25606,86 @@ ${error51.stderrTail}`] : []
|
|
|
25878
25606
|
const mode = display === "remaining" ? messages.accountCreditsRemaining : messages.accountCreditsUsed;
|
|
25879
25607
|
return `${creditsPeriodLabel2(period, messages)}${messages.locale === "zh-CN" ? "" : " "}${mode}`;
|
|
25880
25608
|
}
|
|
25881
|
-
function
|
|
25882
|
-
|
|
25609
|
+
function comparisonPeriod(periodType) {
|
|
25610
|
+
if (periodType === "five_hour") return "five_hour";
|
|
25611
|
+
if (periodType === "weekly" || periodType === "seven_day") return "seven_day";
|
|
25612
|
+
return null;
|
|
25613
|
+
}
|
|
25614
|
+
function scopedUsageProduct(product) {
|
|
25615
|
+
const suffixes = [
|
|
25616
|
+
[" \xB7 5-hour window", "five_hour"],
|
|
25617
|
+
[" \xB7 Weekly window", "seven_day"],
|
|
25618
|
+
[" \xB7 7-day window", "seven_day"],
|
|
25619
|
+
[" \xB7 5-hour", "five_hour"],
|
|
25620
|
+
[" \xB7 7-day", "seven_day"]
|
|
25621
|
+
];
|
|
25622
|
+
for (const [suffix, period] of suffixes) {
|
|
25623
|
+
if (!product.endsWith(suffix)) continue;
|
|
25624
|
+
const scope = product.slice(0, -suffix.length).trim();
|
|
25625
|
+
if (scope) return { scope, period };
|
|
25626
|
+
}
|
|
25627
|
+
return null;
|
|
25628
|
+
}
|
|
25629
|
+
function splitUsageWindows(credits, messages, filter) {
|
|
25630
|
+
const generic = { columns: {} };
|
|
25631
|
+
const scopedRows = /* @__PURE__ */ new Map();
|
|
25883
25632
|
const additional = [];
|
|
25633
|
+
const addScoped = (scope, period, window2) => {
|
|
25634
|
+
const rows2 = scopedRows.get(scope) ?? [];
|
|
25635
|
+
let row = rows2.find((candidate) => !candidate.columns[period]);
|
|
25636
|
+
if (!row) {
|
|
25637
|
+
row = { scope, columns: {} };
|
|
25638
|
+
rows2.push(row);
|
|
25639
|
+
scopedRows.set(scope, rows2);
|
|
25640
|
+
}
|
|
25641
|
+
row.columns[period] = { ...window2, label: scope, scoped: true };
|
|
25642
|
+
};
|
|
25643
|
+
const addWindow = (window2, period, scope) => {
|
|
25644
|
+
if (scope && period) addScoped(scope, period, window2);
|
|
25645
|
+
else if (!scope && period && !generic.columns[period]) generic.columns[period] = window2;
|
|
25646
|
+
else additional.push(window2);
|
|
25647
|
+
};
|
|
25884
25648
|
if (credits.usedPercent !== void 0) {
|
|
25885
25649
|
const primary = {
|
|
25886
25650
|
label: credits.label ?? creditsPeriodLabel2(credits.periodType, messages),
|
|
25887
25651
|
usedPercent: credits.usedPercent,
|
|
25888
|
-
resetsAt: credits.resetsAt
|
|
25652
|
+
resetsAt: credits.resetsAt,
|
|
25653
|
+
scoped: Boolean(credits.label && scopedUsageProduct(credits.label))
|
|
25889
25654
|
};
|
|
25890
|
-
|
|
25891
|
-
|
|
25892
|
-
|
|
25893
|
-
|
|
25655
|
+
const primaryScope = credits.label ? scopedUsageProduct(credits.label) : null;
|
|
25656
|
+
addWindow(
|
|
25657
|
+
primary,
|
|
25658
|
+
primaryScope?.period ?? (credits.label ? null : comparisonPeriod(credits.periodType)),
|
|
25659
|
+
primaryScope?.scope
|
|
25660
|
+
);
|
|
25894
25661
|
}
|
|
25895
25662
|
for (const product of credits.productUsage ?? []) {
|
|
25663
|
+
const scoped = scopedUsageProduct(product.product);
|
|
25896
25664
|
const window2 = {
|
|
25897
25665
|
label: creditsProductLabel(product.product, messages),
|
|
25898
25666
|
usedPercent: product.usagePercent,
|
|
25899
|
-
resetsAt: product.resetsAt
|
|
25667
|
+
resetsAt: product.resetsAt,
|
|
25668
|
+
scoped: Boolean(scoped)
|
|
25900
25669
|
};
|
|
25901
|
-
const
|
|
25902
|
-
|
|
25903
|
-
|
|
25904
|
-
|
|
25905
|
-
|
|
25906
|
-
|
|
25670
|
+
const genericPeriod = product.product === "5-hour window" ? "five_hour" : product.product === "7-day window" ? "seven_day" : null;
|
|
25671
|
+
addWindow(window2, scoped?.period ?? genericPeriod, scoped?.scope);
|
|
25672
|
+
}
|
|
25673
|
+
const structured = [...scopedRows.values()].flat();
|
|
25674
|
+
let rows = Object.keys(generic.columns).length > 0 ? [generic, ...structured] : structured;
|
|
25675
|
+
if (rows.length === 0) rows = [generic];
|
|
25676
|
+
if (filter === "weekly-only") {
|
|
25677
|
+
rows = rows.map((row) => ({
|
|
25678
|
+
...row,
|
|
25679
|
+
columns: row.columns.seven_day ? { seven_day: row.columns.seven_day } : {}
|
|
25680
|
+
})).filter((row) => row.columns.seven_day);
|
|
25681
|
+
if (rows.length === 0) rows = [{ columns: {} }];
|
|
25682
|
+
return { rows, additional: [] };
|
|
25683
|
+
}
|
|
25684
|
+
return { rows, additional };
|
|
25907
25685
|
}
|
|
25908
25686
|
function renderUsageWindow(document2, window2, messages, display) {
|
|
25909
25687
|
const meter = document2.createElement("div");
|
|
25910
|
-
meter.className = "settings-account-usage__meter";
|
|
25688
|
+
meter.className = window2.scoped ? "settings-account-usage__meter settings-account-usage__meter--scoped" : "settings-account-usage__meter";
|
|
25911
25689
|
const label = document2.createElement("span");
|
|
25912
25690
|
label.className = "settings-account-usage__title";
|
|
25913
25691
|
label.textContent = window2.label;
|
|
@@ -25936,7 +25714,9 @@ ${error51.stderrTail}`] : []
|
|
|
25936
25714
|
if (reset) meter.append(reset.timestamp);
|
|
25937
25715
|
return meter;
|
|
25938
25716
|
}
|
|
25939
|
-
function renderAccountUsage(document2, state, messages, display, onRetry,
|
|
25717
|
+
function renderAccountUsage(document2, state, messages, display, onRetry, options = {}) {
|
|
25718
|
+
const usageColumns = options.usageColumns ?? 2;
|
|
25719
|
+
const filter = options.filter ?? "all";
|
|
25940
25720
|
if (state?.status !== "ready") {
|
|
25941
25721
|
const cell = document2.createElement("td");
|
|
25942
25722
|
cell.colSpan = usageColumns;
|
|
@@ -25958,7 +25738,7 @@ ${error51.stderrTail}`] : []
|
|
|
25958
25738
|
usage.append(retry);
|
|
25959
25739
|
}
|
|
25960
25740
|
cell.append(usage);
|
|
25961
|
-
return { cells: [cell], additional: null };
|
|
25741
|
+
return { cells: [cell], continuationCells: [], additional: null };
|
|
25962
25742
|
}
|
|
25963
25743
|
const credits = state.credits;
|
|
25964
25744
|
if (credits.remaining !== void 0 && credits.unit && credits.usedPercent === void 0) {
|
|
@@ -25982,20 +25762,20 @@ ${error51.stderrTail}`] : []
|
|
|
25982
25762
|
meter.append(value);
|
|
25983
25763
|
usage.append(meter);
|
|
25984
25764
|
cell.append(usage);
|
|
25985
|
-
return { cells: [cell], additional: null };
|
|
25765
|
+
return { cells: [cell], continuationCells: [], additional: null };
|
|
25986
25766
|
}
|
|
25987
|
-
const {
|
|
25988
|
-
const
|
|
25767
|
+
const { rows, additional } = splitUsageWindows(credits, messages, filter);
|
|
25768
|
+
const renderCells = (row) => ["five_hour", "seven_day"].map((period) => {
|
|
25989
25769
|
const cell = document2.createElement("td");
|
|
25990
25770
|
cell.className = "settings-account-usage-cell";
|
|
25991
|
-
const window2 = columns[period];
|
|
25771
|
+
const window2 = row.columns[period];
|
|
25992
25772
|
if (window2) cell.append(renderUsageWindow(document2, window2, messages, display));
|
|
25993
25773
|
else {
|
|
25994
25774
|
const missing = document2.createElement("div");
|
|
25995
25775
|
missing.className = "settings-account-usage__missing";
|
|
25996
25776
|
const label = document2.createElement("span");
|
|
25997
25777
|
label.className = "settings-account-usage__title";
|
|
25998
|
-
label.textContent = creditsPeriodLabel2(period, messages);
|
|
25778
|
+
label.textContent = row.scope ?? creditsPeriodLabel2(period, messages);
|
|
25999
25779
|
const dash = document2.createElement("span");
|
|
26000
25780
|
dash.textContent = "\u2014";
|
|
26001
25781
|
dash.setAttribute("aria-hidden", "true");
|
|
@@ -26004,14 +25784,17 @@ ${error51.stderrTail}`] : []
|
|
|
26004
25784
|
}
|
|
26005
25785
|
return cell;
|
|
26006
25786
|
});
|
|
26007
|
-
|
|
25787
|
+
const [firstRow = { columns: {} }, ...continuations] = rows;
|
|
25788
|
+
const cells = renderCells(firstRow);
|
|
25789
|
+
const continuationCells = continuations.map(renderCells);
|
|
25790
|
+
if (!additional.length) return { cells, continuationCells, additional: null };
|
|
26008
25791
|
const extra = document2.createElement("div");
|
|
26009
25792
|
extra.className = "settings-account-extra-usage";
|
|
26010
25793
|
for (const window2 of additional)
|
|
26011
25794
|
extra.append(renderUsageWindow(document2, window2, messages, display));
|
|
26012
|
-
return { cells, additional: extra };
|
|
25795
|
+
return { cells, continuationCells, additional: extra };
|
|
26013
25796
|
}
|
|
26014
|
-
function renderAccountResetCredits(document2, credits, messages
|
|
25797
|
+
function renderAccountResetCredits(document2, credits, messages) {
|
|
26015
25798
|
const resetCredits = credits.resetCredits;
|
|
26016
25799
|
if (!resetCredits) return null;
|
|
26017
25800
|
const summary = document2.createElement("button");
|
|
@@ -26057,15 +25840,6 @@ ${error51.stderrTail}`] : []
|
|
|
26057
25840
|
copy.append(list);
|
|
26058
25841
|
}
|
|
26059
25842
|
details.append(copy);
|
|
26060
|
-
if (options.onUseReset) {
|
|
26061
|
-
const use = document2.createElement("button");
|
|
26062
|
-
use.type = "button";
|
|
26063
|
-
use.className = "settings-command-button settings-command-button--secondary";
|
|
26064
|
-
use.textContent = options.usingReset ? messages.accountResetCreditsUsing : messages.accountResetCreditsUse;
|
|
26065
|
-
use.disabled = options.resetDisabled;
|
|
26066
|
-
use.addEventListener("click", options.onUseReset);
|
|
26067
|
-
details.append(use);
|
|
26068
|
-
}
|
|
26069
25843
|
return { summary, details };
|
|
26070
25844
|
}
|
|
26071
25845
|
|
|
@@ -26106,7 +25880,7 @@ ${error51.stderrTail}`] : []
|
|
|
26106
25880
|
(row ?? fallback).focus({ preventScroll: true });
|
|
26107
25881
|
};
|
|
26108
25882
|
}
|
|
26109
|
-
function createAccountsTable(document2, messages, kind) {
|
|
25883
|
+
function createAccountsTable(document2, messages, kind = "chatgpt") {
|
|
26110
25884
|
const table = document2.createElement("table");
|
|
26111
25885
|
table.className = `settings-account-table settings-account-table--${kind}`;
|
|
26112
25886
|
table.setAttribute(
|
|
@@ -26125,7 +25899,7 @@ ${error51.stderrTail}`] : []
|
|
|
26125
25899
|
const updateDisplay = (display) => {
|
|
26126
25900
|
const labels = kind === "api" ? [
|
|
26127
25901
|
messages.accountColumnAccount,
|
|
26128
|
-
messages.
|
|
25902
|
+
messages.accountColumnCredits,
|
|
26129
25903
|
messages.accountColumnActions
|
|
26130
25904
|
] : [
|
|
26131
25905
|
messages.accountColumnAccount,
|
|
@@ -26221,86 +25995,46 @@ ${error51.stderrTail}`] : []
|
|
|
26221
25995
|
agent: "Codex",
|
|
26222
25996
|
plan: accountPlanLabel(account.planType),
|
|
26223
25997
|
highlighted: account.planType === "pro" || account.planType === "prolite",
|
|
26224
|
-
active:
|
|
25998
|
+
active: input.current,
|
|
26225
25999
|
mark
|
|
26226
26000
|
})
|
|
26227
26001
|
);
|
|
26228
|
-
const
|
|
26229
|
-
|
|
26230
|
-
|
|
26231
|
-
|
|
26232
|
-
messages,
|
|
26233
|
-
input.display,
|
|
26234
|
-
input.onRetry,
|
|
26235
|
-
usageColumns
|
|
26236
|
-
);
|
|
26002
|
+
const usage = renderAccountUsage(document2, input.usage, messages, input.display, input.onRetry, {
|
|
26003
|
+
usageColumns: authKind === "api" ? 1 : 2,
|
|
26004
|
+
filter: account.planType === "pro" ? "weekly-only" : "all"
|
|
26005
|
+
});
|
|
26237
26006
|
if (usage.additional) personCell.append(usage.additional);
|
|
26238
26007
|
const actionsCell = document2.createElement("td");
|
|
26239
26008
|
actionsCell.className = "settings-account-management-cell";
|
|
26240
26009
|
const management = document2.createElement("div");
|
|
26241
26010
|
management.className = "settings-account-management";
|
|
26242
|
-
|
|
26243
|
-
actions.className = "settings-account-actions";
|
|
26244
|
-
if (!account.active) {
|
|
26245
|
-
const activate = document2.createElement("button");
|
|
26246
|
-
activate.type = "button";
|
|
26247
|
-
activate.className = "settings-account-action";
|
|
26248
|
-
activate.textContent = messages.accountUse;
|
|
26249
|
-
activate.title = messages.accountDefaultHint;
|
|
26250
|
-
activate.dataset.accountFocus = `${account.accountId}:activate`;
|
|
26251
|
-
activate.disabled = input.actionsDisabled;
|
|
26252
|
-
activate.addEventListener("click", input.onActivate);
|
|
26253
|
-
actions.append(activate);
|
|
26254
|
-
}
|
|
26255
|
-
if (authKind !== "api" && !account.email) {
|
|
26256
|
-
const signIn = document2.createElement("button");
|
|
26257
|
-
signIn.type = "button";
|
|
26258
|
-
signIn.className = "settings-account-action";
|
|
26259
|
-
signIn.textContent = messages.accountSignIn;
|
|
26260
|
-
signIn.dataset.accountFocus = `${account.accountId}:login`;
|
|
26261
|
-
signIn.disabled = input.actionsDisabled;
|
|
26262
|
-
signIn.addEventListener("click", input.onSignIn);
|
|
26263
|
-
actions.append(signIn);
|
|
26264
|
-
}
|
|
26265
|
-
const more = [];
|
|
26266
|
-
if (account.email && input.usage) {
|
|
26011
|
+
if (input.usage) {
|
|
26267
26012
|
const refresh = document2.createElement("button");
|
|
26268
26013
|
refresh.type = "button";
|
|
26269
26014
|
refresh.className = "settings-account-action";
|
|
26270
26015
|
refresh.textContent = messages.accountCreditsRefresh;
|
|
26271
26016
|
refresh.dataset.accountFocus = `${account.accountId}:refresh`;
|
|
26272
|
-
refresh.disabled = input.
|
|
26017
|
+
refresh.disabled = input.usage.status === "loading";
|
|
26273
26018
|
refresh.addEventListener("click", input.onRetry);
|
|
26274
|
-
|
|
26275
|
-
}
|
|
26276
|
-
if (!account.isDefault) {
|
|
26277
|
-
const remove = document2.createElement("button");
|
|
26278
|
-
remove.type = "button";
|
|
26279
|
-
remove.className = "settings-account-action settings-account-delete";
|
|
26280
|
-
remove.textContent = messages.accountDelete;
|
|
26281
|
-
remove.dataset.accountFocus = `${account.accountId}:delete`;
|
|
26282
|
-
remove.setAttribute("aria-label", `${messages.accountDelete}: ${name.full}`);
|
|
26283
|
-
remove.disabled = input.actionsDisabled;
|
|
26284
|
-
remove.addEventListener("click", input.onDelete);
|
|
26285
|
-
more.push(remove);
|
|
26286
|
-
}
|
|
26287
|
-
if (more.length)
|
|
26288
|
-
actions.append(
|
|
26289
|
-
createAccountDetails(document2, messages, {
|
|
26290
|
-
label: messages.accountMore,
|
|
26291
|
-
triggerLabel: `${name.full} \xB7 ${messages.accountMore}`,
|
|
26292
|
-
description: name.full,
|
|
26293
|
-
focusKey: `${account.accountId}:more`,
|
|
26294
|
-
icon: "ellipsis",
|
|
26295
|
-
disabled: input.actionsDisabled,
|
|
26296
|
-
actions: more
|
|
26297
|
-
})
|
|
26298
|
-
);
|
|
26299
|
-
management.append(actions);
|
|
26019
|
+
management.append(refresh);
|
|
26020
|
+
}
|
|
26300
26021
|
actionsCell.append(management);
|
|
26022
|
+
const continuationRows = usage.continuationCells.map((cells) => {
|
|
26023
|
+
const continuation = document2.createElement("tr");
|
|
26024
|
+
continuation.className = "settings-account-row settings-account-quota-continuation-row";
|
|
26025
|
+
continuation.dataset.accountId = account.accountId;
|
|
26026
|
+
continuation.append(...cells);
|
|
26027
|
+
return continuation;
|
|
26028
|
+
});
|
|
26029
|
+
if (continuationRows.length > 0) {
|
|
26030
|
+
personCell.rowSpan = continuationRows.length + 1;
|
|
26031
|
+
personCell.className += " settings-account-spanning-cell";
|
|
26032
|
+
actionsCell.rowSpan = continuationRows.length + 1;
|
|
26033
|
+
actionsCell.className += " settings-account-spanning-cell";
|
|
26034
|
+
}
|
|
26301
26035
|
row.append(personCell, ...usage.cells, actionsCell);
|
|
26302
|
-
const reset = input.usage?.status === "ready" ? renderAccountResetCredits(document2, input.usage.credits, messages
|
|
26303
|
-
if (!reset) return [row];
|
|
26036
|
+
const reset = input.usage?.status === "ready" ? renderAccountResetCredits(document2, input.usage.credits, messages) : null;
|
|
26037
|
+
if (!reset) return [row, ...continuationRows];
|
|
26304
26038
|
const detailsRow = document2.createElement("tr");
|
|
26305
26039
|
detailsRow.className = "settings-account-details-row";
|
|
26306
26040
|
detailsRow.id = `settings-account-reset-${++resetDetailsSequence}`;
|
|
@@ -26318,9 +26052,9 @@ ${error51.stderrTail}`] : []
|
|
|
26318
26052
|
input.onResetExpanded(!detailsRow.hidden);
|
|
26319
26053
|
});
|
|
26320
26054
|
management.append(reset.summary);
|
|
26321
|
-
return [row, detailsRow];
|
|
26055
|
+
return [row, ...continuationRows, detailsRow];
|
|
26322
26056
|
}
|
|
26323
|
-
function
|
|
26057
|
+
function renderHarnessAccountRows(document2, account, messages, display) {
|
|
26324
26058
|
const row = document2.createElement("tr");
|
|
26325
26059
|
row.className = "settings-account-row";
|
|
26326
26060
|
row.dataset.harnessId = account.harnessId;
|
|
@@ -26344,10 +26078,11 @@ ${error51.stderrTail}`] : []
|
|
|
26344
26078
|
);
|
|
26345
26079
|
const usage = renderAccountUsage(
|
|
26346
26080
|
document2,
|
|
26347
|
-
{ status: "ready", credits: account.credits },
|
|
26081
|
+
{ status: "ready", credits: account.credits, freshness: "live", observedAt: null },
|
|
26348
26082
|
messages,
|
|
26349
26083
|
display,
|
|
26350
|
-
() => void 0
|
|
26084
|
+
() => void 0,
|
|
26085
|
+
{ filter: account.harnessId === "grok" ? "weekly-only" : "all" }
|
|
26351
26086
|
);
|
|
26352
26087
|
if (usage.additional) personCell.append(usage.additional);
|
|
26353
26088
|
const managementCell = document2.createElement("td");
|
|
@@ -26360,19 +26095,75 @@ ${error51.stderrTail}`] : []
|
|
|
26360
26095
|
label: `${account.harnessName} \xB7 ${messages.accountNativeManaged}`,
|
|
26361
26096
|
description: messages.accountNativeManagementHint.replace("{harness}", account.harnessName),
|
|
26362
26097
|
focusKey: `harness:${account.harnessId}:info`,
|
|
26363
|
-
icon: "info"
|
|
26364
|
-
actions: []
|
|
26098
|
+
icon: "info"
|
|
26365
26099
|
});
|
|
26366
26100
|
management.append(label, info);
|
|
26367
26101
|
managementCell.append(management);
|
|
26102
|
+
const continuationRows = usage.continuationCells.map((cells) => {
|
|
26103
|
+
const continuation = document2.createElement("tr");
|
|
26104
|
+
continuation.className = "settings-account-row settings-account-quota-continuation-row";
|
|
26105
|
+
continuation.dataset.harnessId = account.harnessId;
|
|
26106
|
+
continuation.append(...cells);
|
|
26107
|
+
return continuation;
|
|
26108
|
+
});
|
|
26109
|
+
if (continuationRows.length > 0) {
|
|
26110
|
+
personCell.rowSpan = continuationRows.length + 1;
|
|
26111
|
+
personCell.className += " settings-account-spanning-cell";
|
|
26112
|
+
managementCell.rowSpan = continuationRows.length + 1;
|
|
26113
|
+
managementCell.className += " settings-account-spanning-cell";
|
|
26114
|
+
}
|
|
26368
26115
|
row.append(personCell, ...usage.cells, managementCell);
|
|
26369
|
-
return row;
|
|
26116
|
+
return [row, ...continuationRows];
|
|
26370
26117
|
}
|
|
26371
26118
|
|
|
26372
26119
|
// src/settings/harness-accounts.ts
|
|
26120
|
+
function sortedAccounts(accounts) {
|
|
26121
|
+
return [...accounts].sort((a, b) => {
|
|
26122
|
+
if (a.harnessId === "antigravity") return b.harnessId === "antigravity" ? 0 : 1;
|
|
26123
|
+
if (b.harnessId === "antigravity") return -1;
|
|
26124
|
+
return a.harnessId.localeCompare(b.harnessId);
|
|
26125
|
+
});
|
|
26126
|
+
}
|
|
26373
26127
|
function createHarnessAccounts(signal, getClient, onChange) {
|
|
26374
26128
|
let accounts = [];
|
|
26375
26129
|
let refreshing = false;
|
|
26130
|
+
const loadProgressively = async (client, force) => {
|
|
26131
|
+
let sources;
|
|
26132
|
+
try {
|
|
26133
|
+
sources = await client.listHarnessAccountSources();
|
|
26134
|
+
} catch {
|
|
26135
|
+
return false;
|
|
26136
|
+
}
|
|
26137
|
+
if (signal.aborted) return true;
|
|
26138
|
+
const byHarnessId = new Map(accounts.map((account) => [account.harnessId, account]));
|
|
26139
|
+
await Promise.all(
|
|
26140
|
+
sources.sources.map(async (source) => {
|
|
26141
|
+
try {
|
|
26142
|
+
const result = await client.inspectHarnessAccount({
|
|
26143
|
+
harnessId: source.harnessId,
|
|
26144
|
+
...force ? { refresh: true } : {}
|
|
26145
|
+
});
|
|
26146
|
+
if (signal.aborted || result.harnessId !== source.harnessId) return;
|
|
26147
|
+
if (result.account) {
|
|
26148
|
+
byHarnessId.set(result.harnessId, {
|
|
26149
|
+
...result.account,
|
|
26150
|
+
harnessId: result.harnessId,
|
|
26151
|
+
harnessName: result.harnessName
|
|
26152
|
+
});
|
|
26153
|
+
} else {
|
|
26154
|
+
byHarnessId.delete(source.harnessId);
|
|
26155
|
+
}
|
|
26156
|
+
} catch {
|
|
26157
|
+
if (!signal.aborted) byHarnessId.delete(source.harnessId);
|
|
26158
|
+
}
|
|
26159
|
+
if (!signal.aborted) {
|
|
26160
|
+
accounts = sortedAccounts(byHarnessId.values());
|
|
26161
|
+
onChange();
|
|
26162
|
+
}
|
|
26163
|
+
})
|
|
26164
|
+
);
|
|
26165
|
+
return true;
|
|
26166
|
+
};
|
|
26376
26167
|
return {
|
|
26377
26168
|
get accounts() {
|
|
26378
26169
|
return accounts;
|
|
@@ -26380,16 +26171,25 @@ ${error51.stderrTail}`] : []
|
|
|
26380
26171
|
get refreshing() {
|
|
26381
26172
|
return refreshing;
|
|
26382
26173
|
},
|
|
26383
|
-
async refresh() {
|
|
26174
|
+
async refresh(force = false) {
|
|
26384
26175
|
if (refreshing || signal.aborted) return;
|
|
26385
26176
|
const client = getClient();
|
|
26386
|
-
if (!client
|
|
26177
|
+
if (!client) return;
|
|
26387
26178
|
refreshing = true;
|
|
26179
|
+
accounts = [];
|
|
26388
26180
|
onChange();
|
|
26389
26181
|
try {
|
|
26390
|
-
const
|
|
26391
|
-
|
|
26392
|
-
|
|
26182
|
+
const progressive = client.listHarnessAccountSources && client.inspectHarnessAccount ? await loadProgressively(
|
|
26183
|
+
{
|
|
26184
|
+
listHarnessAccountSources: client.listHarnessAccountSources.bind(client),
|
|
26185
|
+
inspectHarnessAccount: client.inspectHarnessAccount.bind(client)
|
|
26186
|
+
},
|
|
26187
|
+
force
|
|
26188
|
+
) : false;
|
|
26189
|
+
if (progressive || signal.aborted) return;
|
|
26190
|
+
if (!client.listHarnessAccounts) return;
|
|
26191
|
+
const result = await client.listHarnessAccounts(force ? { refresh: true } : {});
|
|
26192
|
+
if (!signal.aborted) accounts = sortedAccounts(result.accounts);
|
|
26393
26193
|
} catch {
|
|
26394
26194
|
if (!signal.aborted) accounts = [];
|
|
26395
26195
|
} finally {
|
|
@@ -26404,9 +26204,6 @@ ${error51.stderrTail}`] : []
|
|
|
26404
26204
|
function errorMessage(error51, fallback) {
|
|
26405
26205
|
return error51 instanceof Error && error51.message ? error51.message : fallback;
|
|
26406
26206
|
}
|
|
26407
|
-
function accountHasUsage(account) {
|
|
26408
|
-
return account.authKind === "api" || Boolean(account.email);
|
|
26409
|
-
}
|
|
26410
26207
|
function createAccountsSettingsPage(messages, getClient) {
|
|
26411
26208
|
return Object.freeze({
|
|
26412
26209
|
id: "accounts",
|
|
@@ -26416,19 +26213,15 @@ ${error51.stderrTail}`] : []
|
|
|
26416
26213
|
const document2 = context.content.ownerDocument;
|
|
26417
26214
|
const header = document2.createElement("div");
|
|
26418
26215
|
header.className = "settings-connection-page-header";
|
|
26419
|
-
const
|
|
26216
|
+
const headingCopy = document2.createElement("div");
|
|
26420
26217
|
const heading = document2.createElement("div");
|
|
26421
26218
|
heading.className = "settings-section-label";
|
|
26422
26219
|
heading.textContent = messages.pageLabels.accounts;
|
|
26423
26220
|
const description = document2.createElement("p");
|
|
26424
26221
|
description.className = "settings-page-description";
|
|
26425
26222
|
description.textContent = messages.accountsDescription;
|
|
26426
|
-
|
|
26427
|
-
|
|
26428
|
-
add.type = "button";
|
|
26429
|
-
add.className = "settings-command-button settings-command-button--secondary";
|
|
26430
|
-
add.append(createRendererSettingsIcon("add", 16), messages.accountAdd);
|
|
26431
|
-
header.append(copy, add);
|
|
26223
|
+
headingCopy.append(heading, description);
|
|
26224
|
+
header.append(headingCopy);
|
|
26432
26225
|
const status = document2.createElement("p");
|
|
26433
26226
|
status.className = "settings-account-status";
|
|
26434
26227
|
status.setAttribute("aria-live", "polite");
|
|
@@ -26453,6 +26246,7 @@ ${error51.stderrTail}`] : []
|
|
|
26453
26246
|
const displayControls = document2.createElement("div");
|
|
26454
26247
|
displayControls.className = "settings-segmented";
|
|
26455
26248
|
displayControls.setAttribute("role", "group");
|
|
26249
|
+
displayControls.setAttribute("aria-label", messages.accountColumnCredits);
|
|
26456
26250
|
const displayButtons = /* @__PURE__ */ new Map();
|
|
26457
26251
|
for (const display of ["used", "remaining"]) {
|
|
26458
26252
|
const button = document2.createElement("button");
|
|
@@ -26475,7 +26269,7 @@ ${error51.stderrTail}`] : []
|
|
|
26475
26269
|
refreshUsage.addEventListener("click", () => {
|
|
26476
26270
|
usageByAccountId.clear();
|
|
26477
26271
|
loadUsage(accounts);
|
|
26478
|
-
void harnessAccounts?.refresh();
|
|
26272
|
+
void harnessAccounts?.refresh(true);
|
|
26479
26273
|
});
|
|
26480
26274
|
search.addEventListener("input", () => render());
|
|
26481
26275
|
toolbar.append(connected, searchWrapper, displayControls, refreshUsage);
|
|
@@ -26486,142 +26280,38 @@ ${error51.stderrTail}`] : []
|
|
|
26486
26280
|
context.content.append(header, status, toolbar, groups);
|
|
26487
26281
|
const stopCountdowns = mountAccountResetCountdowns(groups, messages, context.signal);
|
|
26488
26282
|
let accounts = [];
|
|
26489
|
-
let
|
|
26490
|
-
let
|
|
26491
|
-
let
|
|
26492
|
-
let
|
|
26493
|
-
let
|
|
26494
|
-
let
|
|
26495
|
-
let loginRefreshTimer;
|
|
26283
|
+
let currentAccountId = null;
|
|
26284
|
+
let accountPhase = "unavailable";
|
|
26285
|
+
let accountRevision = 0;
|
|
26286
|
+
let accountInstanceId;
|
|
26287
|
+
let hasAccountSnapshot = false;
|
|
26288
|
+
let loadMessage = null;
|
|
26496
26289
|
const usageByAccountId = /* @__PURE__ */ new Map();
|
|
26497
|
-
let usingResetAccountId = null;
|
|
26498
26290
|
let usageDisplay = "remaining";
|
|
26499
26291
|
const expandedResetAccounts = /* @__PURE__ */ new Set();
|
|
26500
|
-
const accountBusy = () => accountCreating || accountActivating || deletingAccountId !== null || login !== null || loginStartingAccountId !== null || usingResetAccountId !== null;
|
|
26501
|
-
const clearLoginRefresh = () => {
|
|
26502
|
-
if (loginRefreshTimer === void 0) return;
|
|
26503
|
-
document2.defaultView?.clearTimeout(loginRefreshTimer);
|
|
26504
|
-
loginRefreshTimer = void 0;
|
|
26505
|
-
};
|
|
26506
|
-
const scheduleLoginRefresh = () => {
|
|
26507
|
-
clearLoginRefresh();
|
|
26508
|
-
if (!login || context.signal.aborted) return;
|
|
26509
|
-
loginRefreshTimer = document2.defaultView?.setTimeout(() => {
|
|
26510
|
-
loginRefreshTimer = void 0;
|
|
26511
|
-
if (!login || context.signal.aborted) return;
|
|
26512
|
-
void context.runLatest(
|
|
26513
|
-
() => client().refreshCodexAccounts?.() ?? client().listCodexAccounts(),
|
|
26514
|
-
{
|
|
26515
|
-
success(result) {
|
|
26516
|
-
const signedIn = result.accounts.some(
|
|
26517
|
-
(account) => account.accountId === login?.accountId && account.email
|
|
26518
|
-
);
|
|
26519
|
-
if (signedIn) {
|
|
26520
|
-
login = null;
|
|
26521
|
-
loginMessage = messages.accountLoginSucceeded;
|
|
26522
|
-
}
|
|
26523
|
-
setAccounts(result.accounts);
|
|
26524
|
-
scheduleLoginRefresh();
|
|
26525
|
-
},
|
|
26526
|
-
failure() {
|
|
26527
|
-
scheduleLoginRefresh();
|
|
26528
|
-
}
|
|
26529
|
-
}
|
|
26530
|
-
);
|
|
26531
|
-
}, 750);
|
|
26532
|
-
};
|
|
26533
|
-
const appendCodexAccount = (body, account) => {
|
|
26534
|
-
body.append(
|
|
26535
|
-
...renderAccountRows(document2, account, messages, {
|
|
26536
|
-
usage: usageByAccountId.get(account.accountId),
|
|
26537
|
-
display: usageDisplay,
|
|
26538
|
-
actionsDisabled: accountBusy(),
|
|
26539
|
-
usingReset: usingResetAccountId === account.accountId,
|
|
26540
|
-
resetDisabled: accountBusy(),
|
|
26541
|
-
resetExpanded: expandedResetAccounts.has(account.accountId),
|
|
26542
|
-
onActivate: () => mutate(() => client().activateCodexAccount({ accountId: account.accountId })),
|
|
26543
|
-
onSignIn: () => startLogin(account.accountId),
|
|
26544
|
-
onDelete: () => deleteAccount(account.accountId),
|
|
26545
|
-
onRetry: () => {
|
|
26546
|
-
usageByAccountId.delete(account.accountId);
|
|
26547
|
-
loadUsage(accounts);
|
|
26548
|
-
},
|
|
26549
|
-
onResetExpanded: (open) => {
|
|
26550
|
-
if (open) expandedResetAccounts.add(account.accountId);
|
|
26551
|
-
else expandedResetAccounts.delete(account.accountId);
|
|
26552
|
-
},
|
|
26553
|
-
...getClient()?.consumeCodexAccountResetCredit ? { onUseReset: () => useReset(account.accountId) } : {}
|
|
26554
|
-
})
|
|
26555
|
-
);
|
|
26556
|
-
if (login?.accountId !== account.accountId) return;
|
|
26557
|
-
const verification = document2.createElement("div");
|
|
26558
|
-
verification.className = "settings-account-verification";
|
|
26559
|
-
const prompt = document2.createElement("span");
|
|
26560
|
-
prompt.textContent = messages.accountVerificationDescription;
|
|
26561
|
-
const link = document2.createElement("a");
|
|
26562
|
-
link.href = login.verificationUrl;
|
|
26563
|
-
link.target = "_blank";
|
|
26564
|
-
link.rel = "noopener noreferrer";
|
|
26565
|
-
link.textContent = login.verificationUrl;
|
|
26566
|
-
link.addEventListener("click", (event) => {
|
|
26567
|
-
const bridge = document2.defaultView?.electronBridge;
|
|
26568
|
-
if (typeof bridge?.sendMessageFromView !== "function") return;
|
|
26569
|
-
event.preventDefault();
|
|
26570
|
-
void Promise.resolve(
|
|
26571
|
-
bridge.sendMessageFromView({
|
|
26572
|
-
type: "open-in-browser",
|
|
26573
|
-
url: login?.verificationUrl ?? link.href,
|
|
26574
|
-
initiator: "open_in_browser_bridge",
|
|
26575
|
-
openTarget: "external-browser",
|
|
26576
|
-
source: "manual"
|
|
26577
|
-
})
|
|
26578
|
-
).catch(() => void 0);
|
|
26579
|
-
});
|
|
26580
|
-
const code = document2.createElement("code");
|
|
26581
|
-
code.textContent = login.userCode;
|
|
26582
|
-
const copyCode = document2.createElement("button");
|
|
26583
|
-
copyCode.type = "button";
|
|
26584
|
-
copyCode.className = "settings-command-button settings-command-button--secondary";
|
|
26585
|
-
copyCode.textContent = messages.accountCopyCode;
|
|
26586
|
-
copyCode.addEventListener("click", () => {
|
|
26587
|
-
void document2.defaultView?.navigator.clipboard?.writeText(login?.userCode ?? "").then(() => {
|
|
26588
|
-
copyCode.textContent = messages.accountCopied;
|
|
26589
|
-
});
|
|
26590
|
-
});
|
|
26591
|
-
const cancel = document2.createElement("button");
|
|
26592
|
-
cancel.type = "button";
|
|
26593
|
-
cancel.className = "settings-command-button settings-command-button--secondary";
|
|
26594
|
-
cancel.textContent = messages.accountLoginCancel;
|
|
26595
|
-
cancel.addEventListener(
|
|
26596
|
-
"click",
|
|
26597
|
-
() => cancelLogin(login?.accountId ?? "", login?.loginId ?? "")
|
|
26598
|
-
);
|
|
26599
|
-
verification.append(prompt, link, code, copyCode, cancel);
|
|
26600
|
-
const verificationRow = document2.createElement("tr");
|
|
26601
|
-
const verificationCell = document2.createElement("td");
|
|
26602
|
-
verificationCell.colSpan = codexAccountAuthKind(account) === "api" ? 3 : 4;
|
|
26603
|
-
verificationCell.append(verification);
|
|
26604
|
-
verificationRow.append(verificationCell);
|
|
26605
|
-
body.append(verificationRow);
|
|
26606
|
-
};
|
|
26607
26292
|
const render = () => {
|
|
26608
26293
|
const restoreFocus = accountListFocusRestorer(groups, search);
|
|
26609
26294
|
apiGroup.body.replaceChildren();
|
|
26610
26295
|
chatGroup.body.replaceChildren();
|
|
26611
|
-
status.
|
|
26296
|
+
status.replaceChildren();
|
|
26297
|
+
if (loadMessage) status.append(loadMessage);
|
|
26612
26298
|
connectedCount.textContent = String(accounts.length + harnessAccounts.accounts.length);
|
|
26613
26299
|
apiGroup.updateDisplay(usageDisplay);
|
|
26614
26300
|
chatGroup.updateDisplay(usageDisplay);
|
|
26615
|
-
search.disabled = login !== null || loginStartingAccountId !== null;
|
|
26616
26301
|
for (const [display, button] of displayButtons) {
|
|
26617
|
-
|
|
26618
|
-
button.setAttribute("aria-pressed", String(selected));
|
|
26619
|
-
button.className = selected ? "settings-segmented__item settings-segmented__item--selected" : "settings-segmented__item";
|
|
26302
|
+
button.setAttribute("aria-pressed", String(display === usageDisplay));
|
|
26620
26303
|
}
|
|
26621
|
-
refreshUsage.disabled = (!getClient()?.inspectCodexAccountUsage ||
|
|
26304
|
+
refreshUsage.disabled = (!getClient()?.inspectCodexAccountUsage || accounts.length === 0) && !getClient()?.listHarnessAccounts || harnessAccounts?.refreshing === true || [...usageByAccountId.values()].some((usage) => usage.status === "loading");
|
|
26622
26305
|
const query = search.value.trim().toLocaleLowerCase();
|
|
26623
26306
|
const visibleAccounts = accounts.filter(
|
|
26624
|
-
(account) =>
|
|
26307
|
+
(account) => [
|
|
26308
|
+
"Codex",
|
|
26309
|
+
account.email ?? "",
|
|
26310
|
+
account.label,
|
|
26311
|
+
account.authIdentity ?? "",
|
|
26312
|
+
account.authKind ?? "",
|
|
26313
|
+
accountPlanLabel(account.planType) ?? ""
|
|
26314
|
+
].join(" ").toLocaleLowerCase().includes(query)
|
|
26625
26315
|
);
|
|
26626
26316
|
const visibleApi = visibleAccounts.filter(
|
|
26627
26317
|
(account) => codexAccountAuthKind(account) === "api"
|
|
@@ -26633,7 +26323,6 @@ ${error51.stderrTail}`] : []
|
|
|
26633
26323
|
(account) => `${account.harnessName} ${account.email ?? ""} ${account.label ?? ""} ${account.plan ?? ""}`.toLocaleLowerCase().includes(query)
|
|
26634
26324
|
);
|
|
26635
26325
|
displayControls.hidden = !accounts.some((account) => codexAccountAuthKind(account) !== "api") && harnessAccounts.accounts.length === 0;
|
|
26636
|
-
add.disabled = accountBusy();
|
|
26637
26326
|
groups.replaceChildren();
|
|
26638
26327
|
if (visibleApi.length + visibleChat.length + visibleHarnessAccounts.length === 0) {
|
|
26639
26328
|
const empty = document2.createElement("div");
|
|
@@ -26645,14 +26334,48 @@ ${error51.stderrTail}`] : []
|
|
|
26645
26334
|
groups.append(empty);
|
|
26646
26335
|
} else {
|
|
26647
26336
|
if (visibleApi.length) {
|
|
26648
|
-
for (const account of visibleApi)
|
|
26337
|
+
for (const account of visibleApi) {
|
|
26338
|
+
apiGroup.body.append(
|
|
26339
|
+
...renderAccountRows(document2, account, messages, {
|
|
26340
|
+
current: accountPhase === "ready" && account.accountId === currentAccountId,
|
|
26341
|
+
usage: usageByAccountId.get(account.accountId),
|
|
26342
|
+
display: usageDisplay,
|
|
26343
|
+
resetExpanded: expandedResetAccounts.has(account.accountId),
|
|
26344
|
+
onRetry: () => {
|
|
26345
|
+
usageByAccountId.delete(account.accountId);
|
|
26346
|
+
loadUsage(accounts);
|
|
26347
|
+
},
|
|
26348
|
+
onResetExpanded: (open) => {
|
|
26349
|
+
if (open) expandedResetAccounts.add(account.accountId);
|
|
26350
|
+
else expandedResetAccounts.delete(account.accountId);
|
|
26351
|
+
}
|
|
26352
|
+
})
|
|
26353
|
+
);
|
|
26354
|
+
}
|
|
26649
26355
|
groups.append(apiGroup.root);
|
|
26650
26356
|
}
|
|
26651
26357
|
if (visibleChat.length + visibleHarnessAccounts.length) {
|
|
26652
|
-
for (const account of visibleChat)
|
|
26358
|
+
for (const account of visibleChat) {
|
|
26359
|
+
chatGroup.body.append(
|
|
26360
|
+
...renderAccountRows(document2, account, messages, {
|
|
26361
|
+
current: accountPhase === "ready" && account.accountId === currentAccountId,
|
|
26362
|
+
usage: usageByAccountId.get(account.accountId),
|
|
26363
|
+
display: usageDisplay,
|
|
26364
|
+
resetExpanded: expandedResetAccounts.has(account.accountId),
|
|
26365
|
+
onRetry: () => {
|
|
26366
|
+
usageByAccountId.delete(account.accountId);
|
|
26367
|
+
loadUsage(accounts);
|
|
26368
|
+
},
|
|
26369
|
+
onResetExpanded: (open) => {
|
|
26370
|
+
if (open) expandedResetAccounts.add(account.accountId);
|
|
26371
|
+
else expandedResetAccounts.delete(account.accountId);
|
|
26372
|
+
}
|
|
26373
|
+
})
|
|
26374
|
+
);
|
|
26375
|
+
}
|
|
26653
26376
|
for (const account of visibleHarnessAccounts) {
|
|
26654
26377
|
chatGroup.body.append(
|
|
26655
|
-
|
|
26378
|
+
...renderHarnessAccountRows(document2, account, messages, usageDisplay)
|
|
26656
26379
|
);
|
|
26657
26380
|
}
|
|
26658
26381
|
groups.append(chatGroup.root);
|
|
@@ -26667,12 +26390,12 @@ ${error51.stderrTail}`] : []
|
|
|
26667
26390
|
};
|
|
26668
26391
|
const loadUsage = (nextAccounts) => {
|
|
26669
26392
|
const inspect = getClient()?.inspectCodexAccountUsage;
|
|
26670
|
-
const
|
|
26671
|
-
const keep = new Set(
|
|
26393
|
+
const saved = [...nextAccounts];
|
|
26394
|
+
const keep = new Set(saved.map((account) => account.accountId));
|
|
26672
26395
|
for (const accountId of [...usageByAccountId.keys()]) {
|
|
26673
26396
|
if (!keep.has(accountId)) usageByAccountId.delete(accountId);
|
|
26674
26397
|
}
|
|
26675
|
-
const pending =
|
|
26398
|
+
const pending = saved.filter((account) => !usageByAccountId.has(account.accountId));
|
|
26676
26399
|
if (!inspect || pending.length === 0) {
|
|
26677
26400
|
render();
|
|
26678
26401
|
return;
|
|
@@ -26691,7 +26414,12 @@ ${error51.stderrTail}`] : []
|
|
|
26691
26414
|
return;
|
|
26692
26415
|
usageByAccountId.set(
|
|
26693
26416
|
account.accountId,
|
|
26694
|
-
result.accountCredits ? {
|
|
26417
|
+
result.accountCredits ? {
|
|
26418
|
+
status: "ready",
|
|
26419
|
+
credits: result.accountCredits,
|
|
26420
|
+
freshness: result.freshness,
|
|
26421
|
+
observedAt: result.observedAt
|
|
26422
|
+
} : { status: "empty" }
|
|
26695
26423
|
);
|
|
26696
26424
|
} catch {
|
|
26697
26425
|
if (context.signal.aborted || usageByAccountId.get(account.accountId) !== loading)
|
|
@@ -26702,13 +26430,24 @@ ${error51.stderrTail}`] : []
|
|
|
26702
26430
|
})
|
|
26703
26431
|
);
|
|
26704
26432
|
};
|
|
26705
|
-
const setAccounts = (
|
|
26706
|
-
|
|
26433
|
+
const setAccounts = (result) => {
|
|
26434
|
+
if (!shouldApplyCodexAccountSnapshot(
|
|
26435
|
+
hasAccountSnapshot ? { instanceId: accountInstanceId, revision: accountRevision } : null,
|
|
26436
|
+
result
|
|
26437
|
+
)) {
|
|
26438
|
+
return;
|
|
26439
|
+
}
|
|
26440
|
+
hasAccountSnapshot = true;
|
|
26441
|
+
accounts = result.accounts;
|
|
26442
|
+
currentAccountId = result.currentAccountId;
|
|
26443
|
+
accountPhase = result.phase;
|
|
26444
|
+
accountRevision = result.revision;
|
|
26445
|
+
accountInstanceId = result.instanceId;
|
|
26707
26446
|
for (const accountId of expandedResetAccounts) {
|
|
26708
26447
|
if (!accounts.some((account) => account.accountId === accountId))
|
|
26709
26448
|
expandedResetAccounts.delete(accountId);
|
|
26710
26449
|
}
|
|
26711
|
-
loadUsage(
|
|
26450
|
+
loadUsage(accounts);
|
|
26712
26451
|
};
|
|
26713
26452
|
const refreshInBackground = () => {
|
|
26714
26453
|
if (!client().refreshCodexAccounts) return;
|
|
@@ -26716,7 +26455,7 @@ ${error51.stderrTail}`] : []
|
|
|
26716
26455
|
() => client().refreshCodexAccounts?.() ?? client().listCodexAccounts(),
|
|
26717
26456
|
{
|
|
26718
26457
|
success(result) {
|
|
26719
|
-
setAccounts(result
|
|
26458
|
+
setAccounts(result);
|
|
26720
26459
|
},
|
|
26721
26460
|
failure() {
|
|
26722
26461
|
}
|
|
@@ -26726,165 +26465,21 @@ ${error51.stderrTail}`] : []
|
|
|
26726
26465
|
const load = () => {
|
|
26727
26466
|
void context.runLatest(() => client().listCodexAccounts(), {
|
|
26728
26467
|
success(result) {
|
|
26729
|
-
|
|
26730
|
-
setAccounts(result
|
|
26468
|
+
loadMessage = null;
|
|
26469
|
+
setAccounts(result);
|
|
26731
26470
|
refreshInBackground();
|
|
26732
26471
|
},
|
|
26733
26472
|
failure(error51) {
|
|
26734
|
-
|
|
26735
|
-
render();
|
|
26736
|
-
}
|
|
26737
|
-
});
|
|
26738
|
-
};
|
|
26739
|
-
const mutate = (operation) => {
|
|
26740
|
-
if (accountBusy()) return;
|
|
26741
|
-
accountActivating = true;
|
|
26742
|
-
render();
|
|
26743
|
-
void context.runLatest(() => operation(), {
|
|
26744
|
-
success(result) {
|
|
26745
|
-
accountActivating = false;
|
|
26746
|
-
loginMessage = null;
|
|
26747
|
-
setAccounts(
|
|
26748
|
-
accounts.map((account) => ({
|
|
26749
|
-
...account.accountId === result.account.accountId ? result.account : account,
|
|
26750
|
-
active: account.accountId === result.account.accountId
|
|
26751
|
-
}))
|
|
26752
|
-
);
|
|
26753
|
-
},
|
|
26754
|
-
failure(error51) {
|
|
26755
|
-
accountActivating = false;
|
|
26756
|
-
loginMessage = errorMessage(error51, messages.accountLoadFailed);
|
|
26757
|
-
render();
|
|
26758
|
-
}
|
|
26759
|
-
});
|
|
26760
|
-
};
|
|
26761
|
-
const startLogin = (accountId) => {
|
|
26762
|
-
if (accountBusy()) return;
|
|
26763
|
-
loginStartingAccountId = accountId;
|
|
26764
|
-
loginMessage = messages.accountSigningIn;
|
|
26765
|
-
render();
|
|
26766
|
-
void context.runLatest(() => client().startCodexAccountLogin({ accountId }), {
|
|
26767
|
-
success(result) {
|
|
26768
|
-
loginStartingAccountId = null;
|
|
26769
|
-
login = result;
|
|
26770
|
-
loginMessage = null;
|
|
26771
|
-
render();
|
|
26772
|
-
scheduleLoginRefresh();
|
|
26773
|
-
},
|
|
26774
|
-
failure(error51) {
|
|
26775
|
-
loginStartingAccountId = null;
|
|
26776
|
-
loginMessage = errorMessage(error51, messages.accountLoginFailed);
|
|
26777
|
-
render();
|
|
26778
|
-
}
|
|
26779
|
-
});
|
|
26780
|
-
};
|
|
26781
|
-
const createAndLogin = () => {
|
|
26782
|
-
if (accountBusy()) return;
|
|
26783
|
-
accountCreating = true;
|
|
26784
|
-
loginMessage = messages.accountSigningIn;
|
|
26785
|
-
render();
|
|
26786
|
-
void context.runLatest(() => client().createCodexAccount({}), {
|
|
26787
|
-
success(result) {
|
|
26788
|
-
accountCreating = false;
|
|
26789
|
-
loginMessage = null;
|
|
26790
|
-
search.value = "";
|
|
26791
|
-
setAccounts([
|
|
26792
|
-
...accounts.filter(({ accountId }) => accountId !== result.account.accountId),
|
|
26793
|
-
result.account
|
|
26794
|
-
]);
|
|
26795
|
-
startLogin(result.account.accountId);
|
|
26796
|
-
},
|
|
26797
|
-
failure(error51) {
|
|
26798
|
-
accountCreating = false;
|
|
26799
|
-
loginMessage = errorMessage(error51, messages.accountCreateFailed);
|
|
26800
|
-
render();
|
|
26801
|
-
}
|
|
26802
|
-
});
|
|
26803
|
-
};
|
|
26804
|
-
const resetOutcomeMessage = (outcome) => {
|
|
26805
|
-
if (outcome === "reset") return messages.accountResetCreditsSucceeded;
|
|
26806
|
-
if (outcome === "nothingToReset") return messages.accountResetCreditsNothingToReset;
|
|
26807
|
-
if (outcome === "noCredit") return messages.accountResetCreditsNoCredit;
|
|
26808
|
-
return messages.accountResetCreditsAlreadyRedeemed;
|
|
26809
|
-
};
|
|
26810
|
-
const useReset = (accountId) => {
|
|
26811
|
-
const consume = getClient()?.consumeCodexAccountResetCredit;
|
|
26812
|
-
if (!consume || accountBusy()) return;
|
|
26813
|
-
if (document2.defaultView?.confirm?.(messages.accountResetCreditsConfirm) === false) return;
|
|
26814
|
-
usingResetAccountId = accountId;
|
|
26815
|
-
loginMessage = messages.accountResetCreditsUsing;
|
|
26816
|
-
render();
|
|
26817
|
-
void context.runLatest(() => consume({ accountId, idempotencyKey: crypto.randomUUID() }), {
|
|
26818
|
-
success(result) {
|
|
26819
|
-
usingResetAccountId = null;
|
|
26820
|
-
loginMessage = resetOutcomeMessage(result.outcome);
|
|
26821
|
-
if (result.accountCredits) {
|
|
26822
|
-
usageByAccountId.set(accountId, {
|
|
26823
|
-
status: "ready",
|
|
26824
|
-
credits: result.accountCredits
|
|
26825
|
-
});
|
|
26826
|
-
} else if (result.outcome === "reset") {
|
|
26827
|
-
usageByAccountId.delete(accountId);
|
|
26828
|
-
loadUsage(accounts);
|
|
26829
|
-
}
|
|
26830
|
-
render();
|
|
26831
|
-
},
|
|
26832
|
-
failure(error51) {
|
|
26833
|
-
usingResetAccountId = null;
|
|
26834
|
-
loginMessage = errorMessage(error51, messages.accountResetCreditsFailed);
|
|
26473
|
+
loadMessage = errorMessage(error51, messages.accountLoadFailed);
|
|
26835
26474
|
render();
|
|
26836
26475
|
}
|
|
26837
26476
|
});
|
|
26838
26477
|
};
|
|
26839
|
-
|
|
26840
|
-
const account = accounts.find((candidate) => candidate.accountId === accountId);
|
|
26841
|
-
if (!account || account.isDefault || accountBusy()) return;
|
|
26842
|
-
if (document2.defaultView?.confirm?.(messages.accountDeleteConfirm) === false) return;
|
|
26843
|
-
deletingAccountId = accountId;
|
|
26844
|
-
loginMessage = messages.accountDeleting;
|
|
26845
|
-
render();
|
|
26846
|
-
void context.runLatest(() => client().deleteCodexAccount({ accountId }), {
|
|
26847
|
-
success() {
|
|
26848
|
-
deletingAccountId = null;
|
|
26849
|
-
loginMessage = null;
|
|
26850
|
-
setAccounts(
|
|
26851
|
-
accounts.filter((candidate) => candidate.accountId !== accountId).map((candidate) => ({
|
|
26852
|
-
...candidate,
|
|
26853
|
-
active: account.active ? candidate.isDefault : candidate.active
|
|
26854
|
-
}))
|
|
26855
|
-
);
|
|
26856
|
-
},
|
|
26857
|
-
failure(error51) {
|
|
26858
|
-
deletingAccountId = null;
|
|
26859
|
-
loginMessage = errorMessage(error51, messages.accountDeleteFailed);
|
|
26860
|
-
render();
|
|
26861
|
-
}
|
|
26862
|
-
});
|
|
26863
|
-
};
|
|
26864
|
-
const cancelLogin = (accountId, loginId) => {
|
|
26865
|
-
void context.runLatest(() => client().cancelCodexAccountLogin({ accountId, loginId }), {
|
|
26866
|
-
success() {
|
|
26867
|
-
clearLoginRefresh();
|
|
26868
|
-
login = null;
|
|
26869
|
-
loginMessage = null;
|
|
26870
|
-
render();
|
|
26871
|
-
},
|
|
26872
|
-
failure(error51) {
|
|
26873
|
-
loginMessage = errorMessage(error51, messages.accountLoginFailed);
|
|
26874
|
-
render();
|
|
26875
|
-
}
|
|
26876
|
-
});
|
|
26877
|
-
};
|
|
26878
|
-
add.addEventListener("click", createAndLogin);
|
|
26879
|
-
let unsubscribe;
|
|
26478
|
+
let unsubscribeAccounts;
|
|
26880
26479
|
try {
|
|
26881
|
-
|
|
26882
|
-
|
|
26883
|
-
clearLoginRefresh();
|
|
26884
|
-
login = null;
|
|
26885
|
-
loginMessage = result.success ? messages.accountLoginSucceeded : result.error ?? messages.accountLoginFailed;
|
|
26480
|
+
unsubscribeAccounts = getClient()?.subscribeCodexAccounts?.((result) => {
|
|
26481
|
+
setAccounts(result);
|
|
26886
26482
|
render();
|
|
26887
|
-
if (result.success) load();
|
|
26888
26483
|
});
|
|
26889
26484
|
} catch {
|
|
26890
26485
|
}
|
|
@@ -26893,8 +26488,7 @@ ${error51.stderrTail}`] : []
|
|
|
26893
26488
|
load();
|
|
26894
26489
|
return () => {
|
|
26895
26490
|
stopCountdowns();
|
|
26896
|
-
|
|
26897
|
-
unsubscribe?.();
|
|
26491
|
+
unsubscribeAccounts?.();
|
|
26898
26492
|
};
|
|
26899
26493
|
}
|
|
26900
26494
|
});
|
|
@@ -27491,7 +27085,7 @@ ${error51.stderrTail}`] : []
|
|
|
27491
27085
|
var shell_default = ':host {\n /* Inherit Codex Desktop color-scheme; light-dark() tracks the host page. */\n --settings-bg: light-dark(#ffffff, #181818);\n --settings-sidebar: light-dark(#f4f4f5, #1c1c1c);\n --settings-panel: transparent;\n --settings-text: light-dark(#171717, #f5f5f5);\n --settings-muted: light-dark(#737373, #a1a1a1);\n --settings-subtle: light-dark(#8a8a8a, #777777);\n --settings-border: light-dark(rgb(15 23 42 / 10%), rgb(255 255 255 / 10%));\n --settings-divider: light-dark(rgb(15 23 42 / 10%), rgb(255 255 255 / 10%));\n --settings-hover: light-dark(rgb(15 23 42 / 5%), rgb(255 255 255 / 6%));\n --settings-active: light-dark(rgb(51 156 255 / 14%), rgb(51 156 255 / 12%));\n --settings-focus: #339cff;\n --settings-elevated: light-dark(#ffffff, #2c2c2e);\n --settings-inset: light-dark(rgb(15 23 42 / 4%), rgb(0 0 0 / 18%));\n --settings-surface: light-dark(rgb(15 23 42 / 3%), rgb(255 255 255 / 2%));\n --settings-surface-strong: light-dark(rgb(15 23 42 / 6%), rgb(255 255 255 / 6%));\n --settings-surface-hover: light-dark(#eeeeee, #303030);\n --settings-mark: light-dark(#52525b, #d4d8de);\n --settings-dialog-shadow: light-dark(\n 0 24px 64px rgb(15 23 42 / 16%),\n 0 24px 64px rgb(0 0 0 / 38%)\n );\n --settings-backdrop: light-dark(rgb(15 23 42 / 28%), rgb(0 0 0 / 52%));\n --settings-segmented-shadow:\n 0 0 0 0.5px light-dark(rgb(15 23 42 / 6%), rgb(0 0 0 / 4%)),\n 0 3px 1px 0 light-dark(rgb(15 23 42 / 4%), rgb(0 0 0 / 4%)),\n 0 3px 8px 0 light-dark(rgb(15 23 42 / 10%), rgb(0 0 0 / 12%));\n --settings-primary: light-dark(#171717, #f4f4f4);\n --settings-primary-hover: light-dark(#2f2f2f, #ffffff);\n --settings-primary-text: light-dark(#ffffff, #171717);\n --settings-warning: light-dark(#8a5500, #f5c96a);\n --settings-warning-bg: light-dark(#fff8e6, rgb(245 201 106 / 8%));\n --settings-warning-border: light-dark(#ead8a8, rgb(245 201 106 / 24%));\n --settings-danger: light-dark(#b42318, #f87171);\n --settings-danger-bg: light-dark(#fff1f0, rgb(239 68 68 / 8%));\n --settings-danger-border: light-dark(#f3c7c3, rgb(239 68 68 / 22%));\n --settings-success: light-dark(#16784a, #4ade80);\n --settings-dialog-max-width: 1120px;\n --settings-dialog-max-height: 780px;\n --settings-dialog-inset: max(52px, env(titlebar-area-height, 0px));\n color: var(--settings-text);\n color-scheme: inherit;\n font:\n 13px/1.5 system-ui,\n -apple-system,\n BlinkMacSystemFont,\n "Segoe UI",\n sans-serif;\n letter-spacing: 0;\n}\n\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n letter-spacing: 0;\n}\n\nbutton,\ninput,\nselect {\n font: inherit;\n}\n\nbutton {\n color: inherit;\n}\n\n[hidden] {\n display: none !important;\n}\n\n.codexhost-settings-dialog {\n width: min(var(--settings-dialog-max-width), calc(100vw - 2 * var(--settings-dialog-inset)));\n height: min(var(--settings-dialog-max-height), calc(100vh - 2 * var(--settings-dialog-inset)));\n max-width: none;\n max-height: none;\n margin: auto;\n padding: 0;\n overflow: hidden;\n color: var(--settings-text);\n background: var(--settings-bg);\n border: 1px solid var(--settings-border);\n border-radius: 12px;\n box-shadow: var(--settings-dialog-shadow);\n}\n\n.codexhost-settings-dialog::backdrop {\n background: var(--settings-backdrop);\n}\n\n.settings-frame,\n.settings-layout {\n width: 100%;\n height: 100%;\n min-width: 0;\n min-height: 0;\n}\n\n.settings-frame {\n display: flex;\n flex-direction: column;\n}\n\n.settings-layout {\n flex: 1;\n display: grid;\n grid-template-columns: 184px minmax(0, 1fr);\n background: var(--settings-bg);\n}\n\n.settings-sidebar {\n display: flex;\n min-width: 0;\n min-height: 0;\n flex-direction: column;\n overflow: hidden;\n background: var(--settings-sidebar);\n border-right: 1px solid var(--settings-border);\n padding-top: 14px;\n}\n\n.settings-header {\n display: flex;\n align-items: center;\n min-width: 0;\n height: 48px;\n flex: none;\n padding: 0 12px;\n border-bottom: 1px solid var(--settings-border);\n}\n\n.settings-header-actions {\n display: flex;\n align-items: center;\n flex: none;\n gap: 12px;\n margin-left: auto;\n}\n\n.settings-brand {\n display: flex;\n align-items: center;\n min-width: 0;\n gap: 7px;\n}\n\n.settings-brand__mark {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 26px;\n height: 26px;\n flex: none;\n color: var(--settings-text);\n}\n\n.settings-brand__mark .codexhost-settings-icon {\n width: 24px;\n height: 24px;\n object-fit: contain;\n}\n\n.settings-brand__copy {\n display: flex;\n min-width: 0;\n align-items: baseline;\n gap: 0;\n line-height: 20px;\n}\n\n.settings-brand__name {\n overflow: hidden;\n color: var(--settings-text);\n font-size: 13px;\n font-weight: 600;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.settings-brand__title {\n margin-left: 8px;\n padding-left: 8px;\n color: var(--settings-muted);\n font-size: 13px;\n font-weight: 400;\n border-left: 1px solid var(--settings-border);\n}\n\n.settings-nav {\n display: flex;\n min-width: 0;\n min-height: 0;\n flex: 1;\n flex-direction: column;\n gap: 2px;\n padding: 0 7px 10px;\n overflow-y: auto;\n}\n\n.settings-nav-section-label {\n min-height: 28px;\n padding: 7px 9px 3px 4px;\n color: var(--settings-muted);\n font-size: 12px;\n font-weight: 600;\n line-height: 18px;\n}\n\n.settings-nav-section-label:not(:first-child) {\n margin-top: 8px;\n}\n\n.settings-nav-button {\n display: grid;\n grid-template-columns: 16px minmax(0, 1fr);\n align-items: center;\n width: 100%;\n position: relative;\n min-height: 34px;\n flex: none;\n gap: 9px;\n padding: 6px 9px;\n color: var(--settings-text);\n font-size: 14px;\n font-weight: 600;\n line-height: 21px;\n text-align: left;\n background: transparent;\n border: 0;\n border-radius: 8px;\n cursor: pointer;\n}\n\n.settings-nav-button .codexhost-settings-icon {\n width: 16px;\n height: 16px;\n opacity: 0.9;\n}\n\n.settings-nav-button:hover {\n background: var(--settings-hover);\n}\n\n.settings-nav-button[aria-current="page"] {\n background: var(--settings-active);\n color: var(--settings-text);\n font-weight: 500;\n}\n\n.settings-nav-button span {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.settings-icon-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n flex: none;\n padding: 0;\n color: var(--settings-muted);\n background: transparent;\n border: 0;\n border-radius: 8px;\n cursor: pointer;\n}\n\n.settings-icon-button:hover {\n color: var(--settings-text);\n background: var(--settings-hover);\n}\n\n.settings-icon-button:focus-visible,\n.settings-nav-button:focus-visible {\n outline: 2px solid var(--settings-focus);\n outline-offset: 1px;\n}\n\n.settings-page {\n display: block;\n position: relative;\n min-width: 0;\n min-height: 0;\n overflow-y: auto;\n background: var(--settings-bg);\n scrollbar-gutter: stable;\n}\n\n.settings-page__content {\n width: min(930px, calc(100% - 80px));\n margin-inline: auto;\n}\n\n.settings-page__content {\n min-width: 0;\n padding: 28px 0 36px;\n}\n\n.settings-section-label {\n min-height: auto;\n padding: 0 0 28px;\n color: var(--settings-text);\n font-size: 18px;\n font-weight: 600;\n line-height: 26px;\n}\n\n.settings-status-list,\n.settings-empty {\n overflow: hidden;\n background: var(--settings-panel);\n}\n\n.settings-status-row {\n display: grid;\n grid-template-columns: minmax(170px, 1fr) auto minmax(280px, 1.45fr);\n position: relative;\n align-items: center;\n min-height: 72px;\n gap: 20px;\n padding: 12px 0;\n}\n\n.settings-status-row:not(:last-child)::after {\n content: "";\n position: absolute;\n right: 0;\n bottom: 0;\n left: 0;\n height: 1px;\n background: var(--settings-divider);\n}\n\n.settings-status-row__identity {\n display: inline-flex;\n align-items: center;\n min-width: 0;\n color: var(--settings-text);\n gap: 10px;\n font-size: 14px;\n font-weight: 500;\n line-height: 22px;\n}\n\n.settings-status-row__icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 36px;\n height: 36px;\n flex: none;\n color: var(--settings-muted);\n background: var(--settings-surface-strong);\n border-radius: 50%;\n}\n\n.settings-status-badge {\n flex: none;\n padding: 3px 8px;\n color: var(--settings-muted);\n font-size: 11px;\n font-weight: 500;\n line-height: 18px;\n background: var(--settings-surface-strong);\n border: 1px solid var(--settings-border);\n border-radius: 6px;\n}\n\n.settings-status-row__detail {\n min-width: 0;\n color: var(--settings-muted);\n font-size: 13px;\n line-height: 20px;\n}\n\n.settings-page-description {\n max-width: 760px;\n margin: -10px 0 20px;\n color: var(--settings-muted);\n font-size: 12px;\n line-height: 18px;\n}\n\n.settings-session-import-header {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 24px;\n}\n\n.settings-session-import-header .settings-section-label {\n min-width: 0;\n}\n\n.settings-session-import-harness {\n display: flex;\n min-width: 0;\n margin: 0 0 16px;\n}\n\n.settings-session-import-harness__options {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n width: fit-content;\n max-width: 100%;\n gap: 8px;\n}\n\n.settings-session-import-harness__option {\n min-height: 32px;\n flex: none;\n padding: 6px 10px;\n color: var(--settings-muted);\n font: inherit;\n font-size: 12px;\n white-space: nowrap;\n background: transparent;\n border: 1px solid var(--settings-border);\n border-radius: 6px;\n cursor: pointer;\n}\n\n.settings-session-import-harness__option[aria-pressed="true"] {\n color: var(--settings-text);\n background: var(--settings-active);\n border-color: rgb(51 156 255 / 50%);\n}\n\n.settings-session-import-harness__option:disabled {\n opacity: 0.38;\n cursor: not-allowed;\n}\n\n.settings-session-import-harness__option:focus-visible {\n outline: 2px solid var(--settings-focus);\n outline-offset: 2px;\n}\n\n.settings-session-import-search,\n.settings-session-import-pagination {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 10px;\n}\n\n.settings-session-import-search {\n align-items: stretch;\n margin: 16px 0 0;\n}\n\n.settings-session-import-pagination {\n margin: 16px 0 0;\n}\n\n.settings-session-import-search input {\n flex: 1;\n min-width: 160px;\n}\n\n.settings-session-import-search input,\n.settings-session-import-pagination select {\n box-sizing: border-box;\n color: var(--settings-text);\n background: var(--settings-bg);\n border: 1px solid var(--settings-border);\n border-radius: 6px;\n}\n\n.settings-session-import-search input,\n.settings-session-import-search .settings-command-button {\n box-sizing: border-box;\n height: 36px;\n min-height: 36px;\n padding: 6px 10px;\n border-radius: 6px;\n}\n\n.settings-session-import-pagination select {\n min-height: 28px;\n padding: 2px 8px;\n}\n\n.settings-session-import-search input:focus-visible,\n.settings-session-import-pagination select:focus-visible {\n outline: 2px solid var(--settings-focus);\n outline-offset: 2px;\n}\n\n.settings-session-import-pagination {\n color: var(--settings-muted);\n font-size: 12px;\n line-height: 18px;\n}\n\n.settings-session-import-pagination label {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.settings-session-import-pagination > span {\n flex: none;\n min-width: 0;\n}\n\n.settings-session-import-pagination__navigation {\n display: flex;\n gap: 8px;\n margin-left: auto;\n}\n\n.settings-session-import-content,\n.settings-session-import-list {\n display: grid;\n gap: 10px;\n}\n\n.settings-session-import-content {\n margin-top: 16px;\n}\n\n.settings-session-import-status {\n display: flex;\n align-items: center;\n min-height: 0;\n gap: 12px;\n padding: 12px 16px;\n color: var(--settings-muted);\n background: var(--settings-panel);\n border: 1px solid var(--settings-border);\n border-radius: 8px;\n}\n\n.settings-session-import-status.is-error {\n color: #ef4444;\n}\n\n.settings-session-import-recovery {\n display: grid;\n justify-items: start;\n gap: 14px;\n padding: 16px;\n background: var(--settings-panel);\n border: 1px solid var(--settings-border);\n border-radius: 8px;\n}\n\n.settings-session-import-recovery:focus-visible {\n outline: 2px solid var(--settings-focus);\n outline-offset: 2px;\n}\n\n.settings-session-import-recovery__copy {\n display: grid;\n gap: 4px;\n}\n\n.settings-session-import-recovery__copy strong {\n color: var(--settings-text);\n font-size: 14px;\n}\n\n.settings-session-import-recovery__copy p {\n margin: 0;\n color: var(--settings-muted);\n font-size: 13px;\n line-height: 20px;\n}\n\n.settings-session-import-recovery__path {\n display: flex;\n align-items: stretch;\n width: 100%;\n min-width: 0;\n overflow: hidden;\n border: 1px solid var(--settings-border);\n border-radius: 6px;\n}\n\n.settings-session-import-recovery__path code {\n min-width: 0;\n flex: 1;\n padding: 8px 10px;\n overflow-x: auto;\n color: var(--settings-text);\n font-size: 12px;\n line-height: 20px;\n white-space: nowrap;\n}\n\n.settings-session-import-recovery__path .settings-command-button {\n min-height: 0;\n flex: none;\n border-width: 0 0 0 1px;\n border-radius: 0;\n}\n\n.settings-session-import-row {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n align-items: center;\n gap: 20px;\n min-width: 0;\n padding: 16px;\n background: var(--settings-panel);\n border: 1px solid var(--settings-border);\n border-radius: 8px;\n}\n\n.settings-session-import-row__copy {\n display: grid;\n min-width: 0;\n gap: 4px;\n}\n\n.settings-session-import-row__copy strong {\n overflow: hidden;\n color: var(--settings-text);\n font-size: 14px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.settings-session-import-row__copy span,\n.settings-session-import-row__cwd {\n overflow: hidden;\n color: var(--settings-muted);\n font-size: 12px;\n line-height: 18px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.settings-session-import-row__cwd {\n display: block;\n min-width: 0;\n background: transparent;\n}\n\n.settings-session-import-row__action {\n display: flex;\n align-items: flex-end;\n flex-direction: column;\n gap: 8px;\n}\n\n.settings-session-import-running {\n color: var(--settings-muted);\n font-size: 12px;\n}\n\n.settings-preference-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 32px;\n min-height: 88px;\n padding: 18px 0;\n border-top: 1px solid var(--settings-divider);\n border-bottom: 1px solid var(--settings-divider);\n}\n\n.settings-preference-row__copy {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n min-width: 0;\n gap: 5px;\n}\n\n.settings-preference-row__copy strong {\n color: var(--settings-text);\n font-size: 15px;\n font-weight: 600;\n line-height: 22px;\n}\n\n.settings-preference-row__copy span {\n max-width: 680px;\n color: var(--settings-muted);\n font-size: 13px;\n line-height: 20px;\n}\n\n.settings-preference-switch {\n display: inline-flex;\n align-items: center;\n width: 42px;\n height: 24px;\n flex: none;\n padding: 2px;\n border: 0;\n border-radius: 999px;\n background: var(--settings-surface-strong);\n cursor: pointer;\n transition: background 120ms ease;\n}\n\n.settings-preference-switch[aria-checked="true"] {\n justify-content: flex-end;\n background: var(--settings-focus);\n}\n\n.settings-preference-switch:focus-visible {\n outline: 2px solid var(--settings-focus);\n outline-offset: 2px;\n}\n\n.settings-preference-switch__thumb {\n width: 20px;\n height: 20px;\n border-radius: 50%;\n background: var(--settings-primary-text);\n box-shadow: 0 1px 3px rgb(0 0 0 / 24%);\n}\n\n.settings-preference-checkbox {\n width: 18px;\n height: 18px;\n flex: none;\n margin: 0;\n accent-color: var(--settings-focus);\n cursor: pointer;\n}\n\n.settings-preference-checkbox:focus-visible {\n outline: 2px solid var(--settings-focus);\n outline-offset: 2px;\n}\n\n.settings-connection-page-header {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 18px;\n margin-bottom: 18px;\n}\n\n.settings-connection-page-header .settings-section-label {\n padding-bottom: 0;\n}\n\n.settings-connection-page-header .settings-page-description {\n margin: 8px 0 0;\n}\n\n.settings-connection-page-header .settings-page-description + .settings-page-description {\n margin-top: 8px;\n}\n\n.settings-update-header {\n margin-bottom: 8px;\n}\n\n.settings-connections-content,\n.settings-plugins-content,\n.settings-connection-list,\n.settings-connection-rows {\n min-width: 0;\n}\n\n.settings-connections-content,\n.settings-plugins-content {\n display: grid;\n gap: 12px;\n}\n\n.settings-connection-list {\n overflow: hidden;\n background: var(--settings-surface);\n border: 1px solid var(--settings-border);\n border-radius: 10px;\n}\n\n.settings-segmented {\n display: inline-flex;\n flex-wrap: wrap;\n align-items: center;\n width: fit-content;\n max-width: 100%;\n padding: 2px;\n gap: 3px;\n background: var(--settings-surface-strong);\n border-radius: 10px;\n}\n\n.settings-segmented__item {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-height: 28px;\n padding: 4px 14px;\n color: var(--settings-muted);\n font: inherit;\n font-size: 12px;\n font-weight: 600;\n line-height: 18px;\n white-space: nowrap;\n background: transparent;\n border: 0;\n border-radius: 8px;\n cursor: pointer;\n transition:\n color 0.15s ease,\n background-color 0.15s ease,\n box-shadow 0.15s ease;\n}\n\n.settings-segmented__item:hover {\n color: var(--settings-text);\n background: var(--settings-hover);\n}\n\n.settings-segmented__item--selected,\n.settings-segmented__item[aria-selected="true"],\n.settings-segmented__item[aria-pressed="true"] {\n color: var(--settings-text);\n background: var(--settings-elevated);\n box-shadow: var(--settings-segmented-shadow);\n}\n\n.settings-segmented__item:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.settings-segmented__item:disabled:hover {\n color: var(--settings-muted);\n background: transparent;\n}\n\n.settings-segmented__item:focus-visible,\n.settings-connection-row:focus-visible,\n.settings-connection-install-link:focus-visible,\n.settings-connection-view-error:focus-visible {\n outline: 2px solid var(--settings-focus);\n outline-offset: 1px;\n}\n\n.settings-connection-host-tabs {\n display: flex;\n align-items: center;\n min-width: 0;\n gap: 6px;\n overflow-x: auto;\n overflow-y: hidden;\n overscroll-behavior-x: contain;\n scrollbar-width: none;\n scroll-behavior: smooth;\n scroll-snap-type: x proximity;\n touch-action: pan-x;\n}\n\n.settings-connection-host-tabs::-webkit-scrollbar {\n display: none;\n}\n\n.settings-connection-host-tab {\n display: inline-flex;\n align-items: center;\n height: 30px;\n min-width: max-content;\n flex: none;\n padding: 0 9px;\n color: var(--settings-muted);\n font: inherit;\n font-size: 12px;\n line-height: 18px;\n white-space: nowrap;\n background: var(--settings-inset);\n border: 1px solid var(--settings-border);\n border-radius: 7px;\n cursor: pointer;\n scroll-snap-align: start;\n}\n\n.settings-connection-host-tab:hover {\n color: var(--settings-text);\n background: var(--settings-hover);\n}\n\n.settings-connection-host-tab[aria-selected="true"] {\n color: var(--settings-text);\n font-weight: 600;\n background: var(--settings-active);\n border-color: var(--settings-border);\n}\n\n.settings-connection-table-header,\n.settings-connection-row {\n display: grid;\n /* Component : Status : Actions = 4 : 3 : 3 */\n grid-template-columns: minmax(0, 4fr) minmax(0, 3fr) minmax(0, 3fr);\n align-items: center;\n min-width: 0;\n column-gap: 16px;\n}\n\n.settings-connection-table-header {\n min-height: 30px;\n padding: 0 10px;\n color: var(--settings-muted);\n font-size: 10px;\n font-weight: 600;\n line-height: 16px;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n background: var(--settings-surface);\n border-bottom: 1px solid var(--settings-divider);\n}\n\n.settings-connection-rows > .settings-connection-row,\n.settings-connection-rows > .settings-connection-block {\n border-bottom: 1px solid var(--settings-divider);\n}\n\n.settings-connection-rows > .settings-connection-row:last-child,\n.settings-connection-rows > .settings-connection-block:last-child {\n border-bottom: 0;\n}\n\n.settings-connection-row {\n min-height: 52px;\n padding: 8px 10px;\n cursor: pointer;\n}\n\n.settings-connection-row:hover {\n background: var(--settings-hover);\n}\n\n.settings-connection-row[data-connection-selected="true"] {\n background: var(--settings-surface);\n}\n\n.settings-connection-row__identity,\n.settings-connection-inspector__identity {\n display: inline-flex;\n align-items: center;\n min-width: 0;\n gap: 8px;\n color: var(--settings-text);\n}\n\n.settings-connection-row__identity strong,\n.settings-connection-inspector__identity strong {\n min-width: 0;\n overflow-wrap: anywhere;\n font-size: 12px;\n font-weight: 500;\n line-height: 18px;\n}\n\n.settings-connection-row__mark {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n flex: none;\n color: var(--settings-mark);\n font-size: 10px;\n font-weight: 700;\n background: var(--settings-surface-strong);\n border-radius: 7px;\n}\n\n.settings-connection-row__mark--logo {\n color: var(--settings-text);\n background: transparent;\n}\n\n.settings-connection-row__mark--logo > img,\n.settings-connection-row__mark--logo > svg {\n display: block;\n max-width: 18px;\n max-height: 18px;\n}\n\n.settings-connection-table-header > :last-child {\n text-align: end;\n}\n\n.settings-connection-row__status {\n display: inline-flex;\n align-items: center;\n width: fit-content;\n max-width: 100%;\n gap: 6px;\n color: var(--settings-muted);\n font-size: 11px;\n font-weight: 500;\n line-height: 18px;\n}\n\n.settings-connection-row__status::before {\n width: 6px;\n height: 6px;\n flex: none;\n content: "";\n background: currentColor;\n border-radius: 50%;\n}\n\n.settings-connection-row__status[data-connection-tone="ready"] {\n color: var(--settings-success);\n}\n\n.settings-connection-row__status[data-connection-tone="checking"] {\n color: var(--settings-warning);\n}\n\n.settings-connection-row__status[data-connection-tone="setup"] {\n color: var(--settings-muted);\n}\n\n.settings-connection-row__status[data-connection-tone="setup"]::before {\n background: transparent;\n border: 1.5px solid currentColor;\n}\n\n.settings-connection-row__status[data-connection-tone="failed"] {\n color: var(--settings-danger);\n}\n\n.settings-connection-row__action {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n min-width: 0;\n gap: 4px;\n}\n\n.settings-connection-row__handle {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n width: 16px;\n color: var(--settings-muted);\n cursor: grab;\n opacity: 0.6;\n}\n\n.settings-connection-row__handle:hover {\n opacity: 1;\n}\n\n.settings-connection-row[draggable="true"] {\n cursor: grab;\n}\n\n.settings-connection-row[data-connection-dragging="true"] {\n opacity: 0.4;\n}\n\n.settings-connection-row[data-connection-drop-indicator="before"] {\n box-shadow: inset 0 2px 0 0 var(--settings-focus);\n}\n\n.settings-connection-row[data-connection-drop-indicator="after"] {\n box-shadow: inset 0 -2px 0 0 var(--settings-focus);\n}\n\n.settings-connection-inline-detail {\n display: grid;\n gap: 12px;\n margin-top: 2px;\n padding: 14px 12px 16px;\n border-top: 1px solid var(--settings-divider);\n background: var(--settings-inset);\n}\n\n.settings-connection-group-divider {\n padding: 10px 12px 6px;\n color: var(--settings-muted);\n font-size: 10px;\n font-weight: 600;\n line-height: 16px;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n /* No border-top here: the row immediately above already carries its own\n border-bottom (it is no longer :last-child once this divider follows\n it), so adding one here would double the separator line. */\n}\n\n.settings-connection-group-divider[data-connection-drag-over="true"] {\n color: var(--settings-focus);\n background: rgb(51 156 255 / 8%);\n border-radius: 6px;\n}\n\n.settings-connection-group-more[data-connection-drag-over="true"] {\n background: rgb(51 156 255 / 8%);\n}\n\n.settings-connection-group-hint {\n display: grid;\n gap: 3px;\n margin: 0 12px 12px;\n padding: 14px 16px;\n text-align: center;\n border: 1.5px dashed var(--settings-border);\n border-radius: 10px;\n}\n\n.settings-connection-group-more[data-connection-drag-over="true"] .settings-connection-group-hint {\n border-color: var(--settings-focus);\n}\n\n.settings-connection-group-hint strong {\n color: var(--settings-text);\n font-size: 12.5px;\n font-weight: 500;\n line-height: 18px;\n}\n\n.settings-connection-group-hint span {\n color: var(--settings-muted);\n font-size: 12px;\n line-height: 17px;\n}\n\n.settings-connection-group-reset {\n display: flex;\n width: 100%;\n align-items: center;\n gap: 6px;\n padding: 10px 12px;\n color: var(--settings-muted);\n font: inherit;\n font-size: 12px;\n text-align: left;\n background: transparent;\n border: 0;\n border-top: 1px solid var(--settings-divider);\n cursor: pointer;\n}\n\n.settings-connection-group-reset:hover {\n color: var(--settings-text);\n background: var(--settings-hover);\n}\n\n.settings-connection-install-link {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 26px;\n height: 26px;\n padding: 0;\n color: var(--settings-focus);\n font: inherit;\n text-decoration: none;\n background: transparent;\n border: 1px solid transparent;\n border-radius: 7px;\n cursor: pointer;\n}\n\n.settings-connection-install-link:hover,\n.settings-connection-install-link:focus-visible {\n color: var(--settings-focus);\n background: var(--settings-active);\n border-color: var(--settings-border);\n}\n\n.settings-connection-view-error {\n padding: 4px 7px;\n color: var(--settings-danger);\n font: inherit;\n font-size: 11px;\n line-height: 18px;\n background: transparent;\n border: 0;\n border-radius: 6px;\n cursor: pointer;\n}\n\n.settings-connection-view-error:hover {\n color: var(--settings-danger);\n background: var(--settings-danger-bg);\n}\n\n.settings-connection-inspector {\n position: sticky;\n top: 18px;\n}\n\n.settings-connection-inspector__header {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n min-width: 0;\n gap: 10px;\n padding: 12px;\n border-bottom: 1px solid var(--settings-divider);\n}\n\n.settings-connection-inspector__body {\n display: grid;\n min-width: 0;\n gap: 12px;\n padding: 12px;\n}\n\n.settings-connection-install-callout {\n display: grid;\n grid-template-columns: 28px minmax(0, 1fr);\n gap: 9px;\n padding: 11px;\n background: var(--settings-surface);\n border: 0;\n border-radius: 8px;\n}\n\n.settings-connection-install-callout__icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n color: var(--settings-focus);\n background: var(--settings-active);\n border-radius: 7px;\n}\n\n.settings-connection-install-callout strong,\n.settings-connection-error-summary strong,\n.settings-connection-state-summary strong {\n display: block;\n margin: 0 0 4px;\n color: var(--settings-text);\n font-size: 12px;\n font-weight: 500;\n line-height: 18px;\n}\n\n.settings-connection-install-callout p,\n.settings-connection-error-summary p,\n.settings-connection-state-summary p,\n.settings-connection-issue-note {\n margin: 0;\n color: var(--settings-muted);\n font-size: 11px;\n line-height: 16px;\n}\n\n.settings-connection-install-command {\n display: grid;\n gap: 4px;\n margin-top: 8px;\n}\n\n.settings-connection-install-command span {\n color: var(--settings-muted);\n font-size: 10px;\n font-weight: 600;\n line-height: 14px;\n letter-spacing: 0.04em;\n text-transform: uppercase;\n}\n\n.settings-connection-install-command code {\n display: block;\n min-width: 0;\n overflow-wrap: anywhere;\n color: var(--settings-text);\n font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;\n font-size: 11px;\n line-height: 16px;\n white-space: pre-wrap;\n}\n\n.settings-connection-install-actions {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px;\n}\n\n.settings-connection-copy-prompt {\n position: relative;\n}\n\n.settings-connection-copy-prompt__tooltip {\n position: absolute;\n z-index: 4;\n bottom: calc(100% + 6px);\n left: 0;\n width: max-content;\n max-width: min(360px, 72vw);\n max-height: 180px;\n overflow: auto;\n padding: 8px 10px;\n color: var(--settings-text);\n font-size: 11px;\n line-height: 16px;\n white-space: pre-wrap;\n text-align: left;\n background: var(--settings-elevated);\n border: 1px solid var(--settings-border);\n border-radius: 8px;\n box-shadow: 0 10px 24px rgb(0 0 0 / 22%);\n opacity: 0;\n visibility: hidden;\n pointer-events: none;\n transition: opacity 120ms ease;\n}\n\n.settings-connection-copy-prompt:hover .settings-connection-copy-prompt__tooltip,\n.settings-connection-copy-prompt:focus-within .settings-connection-copy-prompt__tooltip {\n opacity: 1;\n visibility: visible;\n}\n\n.settings-connection-error-summary {\n padding: 13px 14px;\n color: var(--settings-danger);\n background: var(--settings-danger-bg);\n border: 1px solid var(--settings-danger-border);\n border-radius: 10px;\n}\n\n.settings-connection-error-metadata {\n display: grid;\n gap: 7px;\n padding: 12px;\n background: var(--settings-inset);\n border: 1px solid var(--settings-border);\n border-radius: 9px;\n}\n\n.settings-connection-detail-line {\n display: grid;\n grid-template-columns: 92px minmax(0, 1fr);\n gap: 10px;\n min-width: 0;\n color: var(--settings-muted);\n font-size: 10px;\n line-height: 16px;\n}\n\n.settings-connection-detail-line code {\n min-width: 0;\n overflow-wrap: anywhere;\n color: var(--settings-text);\n font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;\n white-space: pre-wrap;\n}\n\n.settings-connection-error-log-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 10px;\n}\n\n.settings-connection-error-log-header strong {\n color: var(--settings-text);\n font-size: 11px;\n font-weight: 600;\n}\n\n.settings-connection-error-log-header .settings-command-button {\n min-height: 30px;\n padding: 5px 9px;\n font-size: 11px;\n}\n\n.settings-connection-stderr {\n max-height: 220px;\n min-width: 0;\n margin: 0;\n padding: 11px;\n overflow: auto;\n color: var(--settings-text);\n font:\n 10px/16px ui-monospace,\n "SFMono-Regular",\n Consolas,\n "Liberation Mono",\n monospace;\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n background: var(--settings-inset);\n border: 1px solid var(--settings-border);\n border-radius: 9px;\n}\n\n.settings-connection-error-actions {\n display: grid;\n grid-template-columns: minmax(0, 1fr);\n gap: 8px;\n}\n\n.settings-connection-error-actions .settings-command-button {\n width: 100%;\n}\n\n.settings-connection-issue-note {\n margin-top: -4px;\n}\n\n.settings-connection-state-summary {\n padding: 14px;\n background: var(--settings-surface);\n border: 1px solid var(--settings-border);\n border-radius: 10px;\n}\n\n.settings-empty {\n display: flex;\n align-items: center;\n min-height: 72px;\n padding: 12px 16px;\n}\n\n.settings-empty > div {\n display: grid;\n min-width: 0;\n gap: 2px;\n}\n\n.settings-empty strong {\n color: var(--settings-text);\n font-size: 13px;\n font-weight: 500;\n line-height: 19px;\n}\n\n.settings-empty span {\n color: var(--settings-muted);\n font-size: 13px;\n line-height: 19px;\n}\n\n.settings-about-page {\n display: flex;\n flex-direction: column;\n gap: 18px;\n box-sizing: border-box;\n min-height: min(620px, calc(100vh - 200px));\n max-width: 720px;\n}\n\n.settings-about-page > .settings-section-label {\n padding-bottom: 10px;\n}\n\n.settings-about-panel {\n display: grid;\n gap: 18px;\n padding: 24px;\n background: var(--settings-panel);\n border: 1px solid var(--settings-border);\n border-radius: 12px;\n}\n\n.settings-about-product {\n color: var(--settings-text);\n font-size: 24px;\n font-weight: 700;\n line-height: 32px;\n}\n\n.settings-about-tagline {\n color: var(--settings-text);\n font-size: 16px;\n font-weight: 600;\n line-height: 24px;\n}\n\n.settings-about-copy {\n display: grid;\n max-width: 660px;\n gap: 12px;\n}\n\n.settings-about-lead,\n.settings-about-extension,\n.settings-about-closing p,\n.settings-about-copy p {\n margin: 0;\n color: var(--settings-muted);\n font-size: 13px;\n line-height: 21px;\n}\n\n.settings-about-lead {\n color: var(--settings-text);\n font-weight: 500;\n}\n\n.settings-about-agents {\n display: grid;\n gap: 10px;\n margin: 2px 0;\n padding: 0;\n list-style: none;\n}\n\n.settings-about-agent {\n display: grid;\n gap: 4px;\n padding-left: 2px;\n}\n\n.settings-about-agent-name {\n color: var(--settings-text);\n font-size: 13px;\n font-weight: 600;\n line-height: 18px;\n}\n\n.settings-about-agent-name::before {\n content: "\xB7 ";\n color: var(--settings-muted);\n font-weight: 600;\n}\n\n.settings-about-agent-description {\n display: block;\n padding-left: 0.85em;\n color: var(--settings-muted);\n font-size: 12px;\n font-weight: 400;\n line-height: 18px;\n}\n\n.settings-about-closing {\n display: grid;\n gap: 8px;\n}\n\n.settings-about-repository {\n gap: 10px;\n}\n\n.settings-about-open-source {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 0.35em;\n margin: 0;\n color: var(--settings-muted);\n font-size: 13px;\n line-height: 21px;\n}\n\n.settings-about-repository p {\n margin: 0;\n color: var(--settings-muted);\n font-size: 13px;\n line-height: 21px;\n}\n\n.settings-about-star-callout {\n margin: 4px 0 0;\n color: var(--settings-warning);\n font-size: 14px;\n font-weight: 600;\n line-height: 22px;\n}\n\n.settings-about-repository-link {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n color: #7cb8ff;\n font-weight: 600;\n line-height: 1;\n text-decoration: none;\n}\n\n.settings-about-repository-link .codexhost-settings-icon {\n display: block;\n flex: none;\n}\n\n.settings-about-repository-link:hover {\n text-decoration: underline;\n}\n\n.settings-about-brand {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 12px;\n margin-top: auto;\n padding-top: 12px;\n color: inherit;\n opacity: 0.9;\n text-decoration: none;\n transition: opacity 160ms ease;\n}\n\n.settings-about-brand:hover {\n opacity: 1;\n}\n\n.settings-about-brand-video {\n width: 40px;\n height: 40px;\n flex: none;\n overflow: hidden;\n object-fit: cover;\n border-radius: 999px;\n box-shadow: 0 1px 2px rgb(0 0 0 / 18%);\n}\n\n.settings-about-brand-copy {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 2px;\n}\n\n.settings-about-brand-name {\n color: var(--settings-text);\n font-size: 14px;\n font-weight: 800;\n letter-spacing: 0.18em;\n line-height: 18px;\n}\n\n.settings-about-brand-tagline {\n color: var(--settings-muted);\n font-size: 12px;\n font-weight: 500;\n letter-spacing: 0.18em;\n line-height: 16px;\n}\n\n.settings-page-error {\n padding: 16px;\n color: var(--settings-text);\n font-size: 13px;\n background: var(--settings-panel);\n border: 1px solid var(--settings-border);\n border-radius: 20px;\n}\n\n.settings-update-metadata {\n display: grid;\n grid-template-columns: repeat(3, minmax(0, 1fr));\n gap: 24px;\n margin-bottom: 24px;\n padding: 0 0 20px;\n border-bottom: 1px solid var(--settings-divider);\n}\n\n.settings-update-metadata__item {\n display: grid;\n min-width: 0;\n gap: 4px;\n}\n\n.settings-update-metadata__item span {\n color: var(--settings-muted);\n font-size: 12px;\n line-height: 18px;\n}\n\n.settings-update-metadata__item strong {\n min-width: 0;\n overflow-wrap: anywhere;\n color: var(--settings-text);\n font-size: 15px;\n font-weight: 500;\n line-height: 22px;\n}\n\n/* The only emphasis on this screen: a latest version newer than the installed one. */\n.settings-update-metadata__value--newer {\n color: var(--settings-focus);\n}\n\n.settings-update-panel {\n display: grid;\n gap: 12px;\n padding: 20px;\n color: var(--settings-text);\n background: var(--settings-panel);\n border: 1px solid var(--settings-border);\n border-radius: 8px;\n}\n\n/* Soft status copy and the Update action should not sit in a framed card. */\n.settings-update-panel[data-update-state="unavailable"],\n.settings-update-panel[data-update-state="failed"],\n.settings-update-panel[data-update-state="error"],\n.settings-update-panel[data-update-state="available"] {\n padding: 4px 0 0;\n border: 0;\n border-radius: 0;\n}\n\n.settings-update-panel__status-row {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 8px;\n min-width: 0;\n}\n\n.settings-update-panel__status-row .settings-update-actions {\n flex: none;\n}\n\n.settings-update-panel__status-row .settings-update-panel__head {\n flex: 1 1 auto;\n min-width: 0;\n}\n\n.settings-update-panel__head {\n display: flex;\n align-items: center;\n min-width: 0;\n gap: 8px;\n}\n\n.settings-update-panel__head .codexhost-settings-icon {\n color: var(--settings-muted);\n}\n\n.settings-update-panel[data-update-state="available"]\n .settings-update-panel__head\n .codexhost-settings-icon,\n.settings-update-panel[data-update-state="downloading"]\n .settings-update-panel__head\n .codexhost-settings-icon,\n.settings-update-panel[data-update-state="installing"]\n .settings-update-panel__head\n .codexhost-settings-icon,\n.settings-update-panel[data-update-state="restarting"]\n .settings-update-panel__head\n .codexhost-settings-icon {\n color: var(--settings-focus);\n}\n\n.settings-update-panel[data-update-state="current"]\n .settings-update-panel__head\n .codexhost-settings-icon {\n color: var(--settings-success);\n}\n\n.settings-update-panel[data-update-state="failed"]\n .settings-update-panel__head\n .codexhost-settings-icon,\n.settings-update-panel[data-update-state="error"]\n .settings-update-panel__head\n .codexhost-settings-icon {\n color: var(--settings-danger);\n}\n\n.settings-update-panel[data-update-state="unavailable"]\n .settings-update-panel__head\n .codexhost-settings-icon {\n color: var(--settings-muted);\n}\n\n.settings-update-panel__title {\n min-width: 0;\n overflow-wrap: anywhere;\n color: var(--settings-text);\n font-size: 14px;\n font-weight: 600;\n line-height: 22px;\n}\n\n.settings-update-summary,\n.settings-update-error {\n margin: 0;\n overflow-wrap: anywhere;\n font-size: 13px;\n line-height: 20px;\n}\n\n.settings-update-summary {\n color: var(--settings-muted);\n}\n\n.settings-update-error {\n color: var(--settings-danger);\n}\n\n.settings-update-progress {\n width: 100%;\n height: 8px;\n accent-color: var(--settings-focus);\n}\n\n.settings-update-progress-detail {\n color: var(--settings-muted);\n font-size: 12px;\n line-height: 18px;\n}\n\n/* Release notes scroll with the page; a scroller inside a scroller traps the wheel. */\n.settings-update-notes-section {\n min-width: 0;\n margin-top: 24px;\n padding-top: 24px;\n border-top: 1px solid var(--settings-divider);\n}\n\n.settings-update-notes-section:empty {\n display: none;\n}\n\n.settings-update-notes {\n display: grid;\n min-width: 0;\n gap: 12px;\n color: var(--settings-muted);\n font-size: 14px;\n line-height: 22px;\n overflow-wrap: anywhere;\n}\n\n.settings-update-notes > :first-child {\n margin-top: 0;\n}\n\n.settings-update-notes > :last-child {\n margin-bottom: 0;\n}\n\n.settings-update-notes h1,\n.settings-update-notes h2,\n.settings-update-notes h3,\n.settings-update-notes h4,\n.settings-update-notes h5,\n.settings-update-notes h6 {\n margin: 6px 0 0;\n color: var(--settings-text);\n font-weight: 600;\n}\n\n.settings-update-notes h1 {\n font-size: 18px;\n line-height: 26px;\n}\n\n.settings-update-notes h2 {\n font-size: 17px;\n line-height: 24px;\n}\n\n.settings-update-notes h3,\n.settings-update-notes h4,\n.settings-update-notes h5,\n.settings-update-notes h6 {\n font-size: 14px;\n line-height: 22px;\n}\n\n.settings-update-notes p,\n.settings-update-notes ul,\n.settings-update-notes ol,\n.settings-update-notes pre,\n.settings-update-notes blockquote {\n margin: 0;\n}\n\n.settings-update-notes ul,\n.settings-update-notes ol {\n padding-left: 24px;\n}\n\n.settings-update-notes li {\n padding-left: 4px;\n}\n\n.settings-update-notes li::marker {\n color: var(--settings-muted);\n font-size: 0.85em;\n}\n\n.settings-update-notes li + li {\n margin-top: 14px;\n}\n\n.settings-update-notes .release-note-translation {\n display: block;\n margin-top: 3px;\n color: var(--settings-muted);\n font-size: 13px;\n line-height: 20px;\n}\n\n.settings-update-notes blockquote {\n padding: 8px 12px;\n color: var(--settings-muted);\n border-left: 3px solid var(--settings-focus);\n background: var(--settings-surface);\n}\n\n.settings-update-notes hr {\n width: 100%;\n margin: 2px 0;\n border: 0;\n border-top: 1px solid var(--settings-divider);\n}\n\n.settings-update-notes strong {\n color: var(--settings-text);\n font-weight: 600;\n}\n\n.settings-update-notes a {\n color: var(--settings-focus);\n text-decoration: none;\n}\n\n.settings-update-notes a:hover {\n text-decoration: underline;\n}\n\n.settings-update-notes code {\n font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;\n font-size: 12px;\n}\n\n.settings-update-notes :not(pre) > code {\n padding: 1px 5px;\n background: var(--settings-surface-strong);\n border-radius: 4px;\n}\n\n.settings-update-notes pre {\n min-width: 0;\n max-width: 100%;\n padding: 10px 12px;\n overflow-x: auto;\n overflow-y: hidden;\n background: var(--settings-inset);\n border-radius: 6px;\n}\n\n.settings-update-notes pre code {\n line-height: 18px;\n white-space: pre-wrap;\n}\n\n/* Manual update sits directly under the status panel, not behind a disclosure:\n automatic updates can fail for machine-local reasons and this is the way out. */\n.settings-update-controls {\n display: grid;\n min-width: 0;\n gap: 10px;\n margin-top: 24px;\n}\n\n.settings-update-manual-title {\n color: var(--settings-text);\n font-size: 15px;\n font-weight: 600;\n line-height: 22px;\n}\n\n.settings-update-manual {\n display: grid;\n min-width: 0;\n gap: 8px;\n}\n\n.settings-update-manual[hidden] {\n display: none;\n}\n\n.settings-update-manual-description {\n margin: 0;\n color: var(--settings-muted);\n font-size: 12px;\n line-height: 18px;\n}\n\n.settings-update-manual-description.is-fallback {\n color: var(--settings-danger);\n}\n\n.settings-update-command {\n display: flex;\n align-items: stretch;\n min-width: 0;\n overflow: hidden;\n border: 1px solid var(--settings-border);\n border-radius: 6px;\n}\n\n.settings-update-command code {\n min-width: 0;\n flex: 1;\n padding: 9px 12px;\n overflow-x: auto;\n color: var(--settings-text);\n font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;\n font-size: 12px;\n line-height: 20px;\n white-space: nowrap;\n}\n\n.settings-update-command__copy {\n display: inline-flex;\n align-items: center;\n flex: none;\n gap: 6px;\n padding: 0 12px;\n color: var(--settings-muted);\n font-size: 12px;\n background: transparent;\n border: 0;\n border-left: 1px solid var(--settings-border);\n cursor: pointer;\n}\n\n.settings-update-command__copy:hover {\n color: var(--settings-text);\n background: var(--settings-hover);\n}\n\n.settings-update-command__copy:focus-visible {\n outline: 2px solid var(--settings-focus);\n outline-offset: -2px;\n}\n\n.settings-update-actions {\n display: flex;\n align-items: center;\n min-width: 0;\n gap: 12px;\n flex-wrap: wrap;\n}\n\n.settings-command-button,\n.settings-update-link {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n width: max-content;\n max-width: 100%;\n min-height: 30px;\n gap: 6px;\n padding: 5px 10px;\n white-space: nowrap;\n color: var(--settings-primary-text);\n font: inherit;\n font-size: 12px;\n text-decoration: none;\n background: var(--settings-primary);\n border: 1px solid var(--settings-primary);\n border-radius: 7px;\n cursor: pointer;\n}\n\n.settings-command-button--secondary,\n.settings-update-link {\n color: var(--settings-muted);\n background: transparent;\n border-color: var(--settings-border);\n}\n\n.settings-command-button--secondary .codexhost-settings-icon,\n.settings-update-link .codexhost-settings-icon {\n color: var(--settings-muted);\n}\n\n.settings-command-button:hover:not(.settings-command-button--secondary) {\n filter: brightness(1.08);\n}\n\n.settings-command-button--danger {\n color: var(--settings-danger);\n}\n\n.settings-command-button--danger:hover:not(:disabled) {\n color: #fecaca;\n background: var(--settings-danger-bg);\n border-color: var(--settings-danger-border);\n}\n\n.settings-command-button--secondary:hover,\n.settings-update-link:hover {\n color: var(--settings-text);\n background: var(--settings-hover);\n}\n\n.settings-command-button--secondary:hover .codexhost-settings-icon,\n.settings-update-link:hover .codexhost-settings-icon {\n color: var(--settings-text);\n}\n\n.settings-command-button:disabled,\n.settings-command-button[aria-disabled="true"] {\n opacity: 0.55;\n cursor: not-allowed;\n filter: none;\n}\n\n.settings-command-button:focus-visible,\n.settings-update-link:focus-visible {\n outline: 2px solid var(--settings-focus);\n outline-offset: 2px;\n}\n\n.settings-visually-hidden {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}\n\n.settings-session-import-content {\n display: grid;\n min-width: 0;\n gap: 12px;\n margin-top: 16px;\n}\n\n.settings-session-import-list {\n display: grid;\n min-width: 0;\n overflow: hidden;\n background: var(--settings-surface);\n border: 1px solid var(--settings-border);\n border-radius: 12px;\n}\n\n.settings-session-import-row {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n align-items: center;\n min-width: 0;\n gap: 16px;\n padding: 14px 16px;\n border-bottom: 1px solid var(--settings-divider);\n}\n\n.settings-session-import-row:last-child {\n border-bottom: 0;\n}\n\n.settings-session-import-row__copy {\n display: grid;\n min-width: 0;\n gap: 4px;\n}\n\n.settings-session-import-row__copy strong {\n color: var(--settings-text);\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n}\n\n.settings-session-import-row__copy span,\n.settings-session-import-row__cwd {\n min-width: 0;\n overflow-wrap: anywhere;\n color: var(--settings-muted);\n font-size: 12px;\n line-height: 18px;\n}\n\n.settings-session-import-row__cwd {\n font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;\n}\n\n.settings-session-import-row__action {\n display: flex;\n align-items: center;\n flex: none;\n gap: 8px;\n}\n\n.settings-session-import-running {\n color: #f5c542;\n font-size: 12px;\n font-weight: 500;\n line-height: 18px;\n white-space: nowrap;\n}\n\n.settings-session-import-recovery {\n display: grid;\n min-width: 0;\n gap: 12px;\n padding: 16px;\n background: var(--settings-surface);\n border: 1px solid var(--settings-border);\n border-radius: 12px;\n}\n\n.settings-session-import-recovery__copy {\n display: grid;\n gap: 6px;\n}\n\n.settings-session-import-recovery__copy strong {\n color: var(--settings-text);\n font-size: 15px;\n font-weight: 600;\n line-height: 22px;\n}\n\n.settings-session-import-recovery__copy p {\n margin: 0;\n color: var(--settings-muted);\n font-size: 13px;\n line-height: 20px;\n}\n\n.settings-session-import-recovery__path {\n display: flex;\n align-items: center;\n min-width: 0;\n gap: 8px;\n}\n\n.settings-session-import-recovery__path code {\n min-width: 0;\n flex: 1;\n overflow-wrap: anywhere;\n color: var(--settings-text);\n font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;\n font-size: 12px;\n line-height: 18px;\n}\n\n.codexhost-settings-icon {\n display: block;\n flex: none;\n stroke: currentColor;\n}\n\n@media (max-width: 720px) {\n .codexhost-settings-dialog {\n border-radius: 10px;\n }\n\n .settings-layout {\n grid-template-columns: minmax(0, 1fr);\n grid-template-rows: auto minmax(0, 1fr);\n }\n\n .settings-sidebar {\n border-right: 0;\n border-bottom: 1px solid var(--settings-border);\n }\n\n .settings-header {\n height: 56px;\n padding-inline: 14px;\n }\n\n .settings-sidebar {\n padding-top: 20px;\n }\n\n .settings-nav {\n flex: none;\n flex-direction: row;\n gap: 4px;\n padding: 7px 8px 8px;\n overflow-x: auto;\n overflow-y: hidden;\n }\n\n .settings-nav-section-label {\n display: none;\n }\n\n .settings-nav-button {\n width: auto;\n min-width: max-content;\n min-height: 34px;\n grid-template-columns: 16px auto;\n border-radius: 10px;\n }\n\n .settings-page__content {\n width: calc(100% - 40px);\n }\n\n .settings-page__content {\n padding-top: 32px;\n padding-bottom: 32px;\n }\n\n .settings-section-label {\n padding-bottom: 20px;\n font-size: 20px;\n line-height: 26px;\n }\n\n .settings-update-metadata {\n grid-template-columns: minmax(0, 1fr);\n gap: 16px;\n }\n\n .settings-status-row {\n grid-template-columns: minmax(0, 1fr) auto;\n gap: 16px;\n }\n\n .settings-connection-page-header {\n flex-direction: column;\n }\n\n .settings-connection-page-header > .settings-command-button {\n width: 100%;\n }\n\n .settings-session-import-row {\n grid-template-columns: minmax(0, 1fr);\n }\n\n .settings-session-import-row__action {\n justify-content: flex-start;\n flex-wrap: wrap;\n }\n\n .settings-status-row__detail {\n grid-column: 1 / -1;\n margin: -8px 0 0 58px;\n }\n}\n\n@media (forced-colors: active) {\n :host,\n :host([data-theme="light"]),\n :host([data-theme="dark"]) {\n --settings-bg: Canvas;\n --settings-sidebar: Canvas;\n --settings-panel: Canvas;\n --settings-surface: Canvas;\n --settings-surface-hover: Highlight;\n --settings-inset: Canvas;\n --settings-text: CanvasText;\n --settings-muted: GrayText;\n --settings-subtle: GrayText;\n --settings-border: ButtonBorder;\n --settings-divider: ButtonBorder;\n --settings-hover: Highlight;\n --settings-active: Highlight;\n --settings-focus: Highlight;\n --settings-elevated: Canvas;\n --settings-surface-strong: Canvas;\n --settings-mark: CanvasText;\n --settings-primary: ButtonFace;\n --settings-primary-hover: Highlight;\n --settings-primary-text: ButtonText;\n --settings-warning: CanvasText;\n --settings-warning-bg: Canvas;\n --settings-warning-border: ButtonBorder;\n --settings-danger: CanvasText;\n --settings-danger-bg: Canvas;\n --settings-danger-border: ButtonBorder;\n --settings-success: CanvasText;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n *,\n *::before,\n *::after {\n scroll-behavior: auto !important;\n transition-duration: 0s !important;\n }\n}\n';
|
|
27492
27086
|
|
|
27493
27087
|
// src/settings/accounts.css
|
|
27494
|
-
var accounts_default = '.settings-harness-account__logo {\n display: grid;\n place-items: center;\n width: 34px;\n height: 34px;\n}\n\n.settings-account-status {\n margin: 0;\n color: var(--settings-muted);\n font-size: 12px;\n}\n.settings-account-status:empty {\n display: none;\n}\n\n.settings-account-toolbar {\n margin-top: 0;\n padding: 0 0 16px;\n display: flex;\n align-items: center;\n gap: 14px;\n flex-wrap: wrap;\n}\n.settings-account-count {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 13px;\n white-space: nowrap;\n}\n.settings-account-count > :last-child {\n color: var(--settings-muted);\n font-variant-numeric: tabular-nums;\n}\n.settings-account-search {\n display: flex;\n align-items: center;\n gap: 8px;\n color: var(--settings-muted);\n margin-right: auto;\n min-width: 0;\n max-width: 100%;\n}\n.settings-account-search svg {\n flex: none;\n}\n.settings-account-toolbar input {\n min-width: 80px;\n width: 210px;\n max-width: 100%;\n padding: 5px 0;\n color: var(--settings-text);\n background: transparent;\n border: 0;\n font-size: 13px;\n}\n.settings-account-toolbar input::placeholder {\n color: var(--settings-muted);\n}\n\n.settings-account-groups {\n display: grid;\n gap: 22px;\n}\n.settings-account-group__title {\n margin: 0 0 8px;\n color: var(--settings-text);\n font-size: 13px;\n font-weight: 600;\n letter-spacing: -0.01em;\n}\n.settings-account-list {\n --account-border: light-dark(#e2e2e8, #36363b);\n --account-muted: light-dark(#676773, #a5a5af);\n border: 1px solid var(--account-border);\n border-radius: 11px;\n overflow: hidden;\n container-type: inline-size;\n}\n.settings-account-list > .settings-account-empty {\n margin: 0;\n padding: 28px 16px;\n}\n.settings-account-table {\n width: 100%;\n table-layout: fixed;\n border-collapse: collapse;\n font-size: 12px;\n}\n.settings-account-table th {\n padding: 12px 16px;\n color: var(--account-muted);\n background: light-dark(#f8f8fa, #202024);\n font-size: 11px;\n font-weight: 500;\n text-align: left;\n}\n.settings-account-table th:nth-child(1) {\n width: 32%;\n}\n.settings-account-table th:nth-child(2),\n.settings-account-table th:nth-child(3) {\n width: 24%;\n}\n.settings-account-table th:nth-child(4) {\n width: 20%;\n text-align: right;\n}\n.settings-account-table--api th:nth-child(1) {\n width: 48%;\n}\n.settings-account-table--api th:nth-child(2) {\n width: 32%;\n}\n.settings-account-table--api th:nth-child(3) {\n width: 20%;\n text-align: right;\n}\n.settings-account-table td {\n padding: 17px 16px;\n vertical-align: middle;\n border-top: 1px solid var(--settings-divider);\n}\n.settings-account-row {\n background: light-dark(#ffffff, #232326);\n}\n.settings-account-row:hover {\n background: light-dark(#f7f7fa, #26262a);\n}\n.settings-account-row__person {\n display: grid;\n grid-template-columns: 34px minmax(0, 1fr);\n align-items: center;\n gap: 11px;\n min-width: 0;\n}\n.settings-account-row__mark {\n display: grid;\n place-items: center;\n width: 34px;\n height: 34px;\n color: light-dark(#67558d, #c3baff);\n background: light-dark(#f0ecf7, #353044);\n border: 1px solid light-dark(#d9d0e6, #4d435f);\n border-radius: 10px;\n}\n.settings-account-row__identity {\n min-width: 0;\n}\n.settings-account-email {\n display: block;\n min-width: 0;\n overflow: hidden;\n font-size: 12px;\n font-weight: 550;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.settings-account-metadata {\n display: flex;\n align-items: center;\n min-width: 0;\n gap: 5px;\n margin-top: 4px;\n color: var(--settings-muted);\n flex-wrap: wrap;\n font-size: 11px;\n overflow-wrap: anywhere;\n}\n.settings-account-plan {\n flex: none;\n padding: 0 4px;\n color: var(--settings-muted);\n border: 1px solid var(--settings-border);\n border-radius: 5px;\n font-size: 10px;\n max-width: 100%;\n overflow-wrap: anywhere;\n}\n.settings-account-plan--highlighted {\n color: light-dark(#654f91, #c8bfff);\n background: light-dark(#f2edf9, #a99bff18);\n border-color: light-dark(#d9ccea, #a99bff52);\n font-weight: 600;\n}\n.settings-account-active {\n flex: none;\n color: light-dark(#66548e, #c8bfff);\n font-size: 10px;\n white-space: nowrap;\n}\n\n.settings-account-usage {\n display: grid;\n gap: 10px;\n}\n.settings-account-usage__meter {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n grid-template-rows: 20px 4px 17px;\n align-items: center;\n gap: 6px 0;\n min-width: 0;\n font-variant-numeric: tabular-nums;\n}\n:host([lang="zh-CN"]) .settings-account-usage__meter {\n grid-template-columns: 48px minmax(36px, 1fr) 72px;\n}\n.settings-account-usage__meter--balance {\n display: flex;\n grid-template-columns: none;\n justify-content: flex-start;\n gap: 6px;\n}\n.settings-account-usage__balance {\n display: inline-flex;\n align-items: baseline;\n gap: 4px;\n font-size: 14px;\n font-weight: 600;\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n}\n\n.settings-account-usage__title {\n display: none;\n min-width: 0;\n color: var(--settings-muted);\n font-size: 11px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.settings-account-extra-usage {\n display: grid;\n gap: 12px;\n margin-top: 14px;\n}\n.settings-account-extra-usage .settings-account-usage__meter {\n grid-template-rows: auto 20px 4px 17px;\n}\n.settings-account-extra-usage .settings-account-usage__title {\n display: block;\n grid-column: 1 / -1;\n white-space: normal;\n overflow-wrap: anywhere;\n}\n.settings-account-usage__percent {\n grid-column: 1 / -1;\n min-width: 0;\n display: flex;\n align-items: baseline;\n justify-content: flex-end;\n gap: 7px;\n font-size: 14px;\n font-weight: 600;\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n}\n.settings-account-usage__countdown {\n min-width: 0;\n color: var(--settings-muted);\n font-size: 10px;\n font-weight: 400;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.settings-account-usage__percent > :last-child {\n flex: none;\n}\n.settings-account-usage__percent--warn {\n color: var(--settings-warning);\n}\n.settings-account-usage__percent--hot {\n color: var(--settings-danger);\n}\n.settings-account-usage__bar {\n grid-column: 1 / -1;\n height: 4px;\n overflow: hidden;\n background: light-dark(#e3e1e8, #3c3c43);\n border-radius: 4px;\n}\n.settings-account-usage__bar > span {\n display: block;\n height: 100%;\n background: light-dark(#81769e, #9993b8);\n border-radius: inherit;\n}\n.settings-account-usage__bar--warn > span {\n background: var(--settings-warning);\n}\n.settings-account-usage__bar--hot > span {\n background: var(--settings-danger);\n}\n.settings-account-usage__sub {\n grid-column: 1 / -1;\n color: var(--account-muted);\n font-size: 10px;\n font-variant-numeric: tabular-nums;\n text-align: right;\n white-space: nowrap;\n}\n.settings-account-usage__message {\n color: var(--settings-muted);\n}\n.settings-account-usage__missing {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n align-content: center;\n gap: 6px;\n min-height: 53px;\n color: var(--settings-muted);\n}\n.settings-account-usage__missing > span:not(.settings-account-usage__title) {\n grid-column: 1 / -1;\n font-size: 14px;\n}\n.settings-account-management {\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 4px;\n}\n.settings-account-native {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: 3px;\n color: var(--settings-muted);\n font-size: 11px;\n}\n.settings-account-native .settings-icon-button {\n width: 25px;\n height: 28px;\n}\n.settings-account-usage > button {\n justify-self: start;\n}\n.settings-account-actions {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n gap: 4px;\n flex-wrap: wrap;\n}\n.settings-account-action {\n padding: 4px 5px;\n min-height: 30px;\n font-size: 12px;\n color: var(--settings-text);\n background: transparent;\n border: 1px solid transparent;\n border-radius: 7px;\n white-space: nowrap;\n cursor: pointer;\n}\n.settings-account-action:hover {\n background: var(--settings-hover);\n}\n.settings-account-action:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n.settings-account-delete {\n color: var(--settings-danger);\n}\n.settings-account-delete:hover,\n.settings-account-delete:focus-visible {\n color: var(--settings-danger);\n background: var(--settings-danger-bg);\n}\n.settings-account-reset-summary {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n min-height: 24px;\n padding: 3px 0;\n font-size: 10px;\n white-space: nowrap;\n color: var(--settings-muted);\n background: transparent;\n border: 0;\n border-radius: 5px;\n cursor: pointer;\n}\n.settings-account-reset-summary:hover {\n background: var(--settings-hover);\n}\n.settings-account-reset-summary[aria-expanded="true"] > svg:last-child {\n transform: rotate(90deg);\n}\n.settings-account-details-row > td {\n background: var(--settings-inset);\n}\n.settings-account-reset-details {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 16px;\n flex-wrap: wrap;\n}\n.settings-account-reset-details strong {\n font-size: 12px;\n}\n.settings-account-reset-expiry {\n margin: 6px 0;\n color: var(--settings-muted);\n font-size: 11px;\n}\n.settings-account-reset-expiry.is-warn {\n color: var(--settings-warning);\n}\n.settings-account-reset-expiry.is-hot {\n color: var(--settings-danger);\n}\n.settings-account-reset-list {\n margin: 8px 0 0;\n padding: 0;\n list-style: none;\n color: var(--settings-muted);\n font-size: 11px;\n}\n.settings-account-reset-list li + li {\n margin-top: 4px;\n}\n.settings-account-empty {\n text-align: center;\n color: var(--settings-muted);\n}\n.settings-account-verification {\n display: flex;\n align-items: center;\n gap: 8px;\n flex-wrap: wrap;\n color: var(--settings-muted);\n}\n.settings-account-verification a {\n color: var(--settings-focus);\n overflow-wrap: anywhere;\n}\n.settings-account-verification code {\n padding: 5px 8px;\n color: var(--settings-text);\n font-size: 15px;\n font-weight: 600;\n letter-spacing: 0.08em;\n background: var(--settings-inset);\n border-radius: 6px;\n}\n.settings-account-list :focus-visible,\n.settings-account-toolbar :focus-visible:not(.settings-segmented__item) {\n outline: 2px solid var(--settings-focus);\n outline-offset: -2px;\n}\n\n.settings-account-dialog {\n position: fixed;\n width: min(360px, calc(100vw - 40px));\n max-height: calc(100vh - 40px);\n overflow: auto;\n padding: 22px;\n color: var(--settings-text);\n background: var(--settings-elevated);\n border: 1px solid var(--settings-border);\n border-radius: 12px;\n box-shadow: var(--settings-dialog-shadow);\n text-align: left;\n}\n.settings-account-dialog::backdrop {\n background: var(--settings-backdrop);\n}\n.settings-account-dialog h2 {\n margin: 0 28px 12px 0;\n font-size: 15px;\n}\n.settings-account-dialog p {\n color: var(--settings-muted);\n font-size: 12px;\n line-height: 1.6;\n overflow-wrap: anywhere;\n}\n.settings-account-dialog__close {\n position: absolute;\n top: 12px;\n right: 12px;\n}\n.settings-account-dialog__actions {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n flex-wrap: wrap;\n}\n\n@container (max-width: 680px) {\n .settings-account-table,\n .settings-account-table tbody {\n display: block;\n }\n .settings-account-table thead {\n display: none;\n }\n .settings-account-row {\n display: grid;\n grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);\n padding: 18px;\n gap: 18px 22px;\n border-top: 1px solid var(--settings-divider);\n }\n .settings-account-row:first-child {\n border-top: 0;\n }\n .settings-account-table .settings-account-row > td {\n display: block;\n min-width: 0;\n padding: 0;\n border: 0;\n }\n .settings-account-person-cell,\n .settings-account-management-cell,\n .settings-account-usage-cell--message,\n .settings-account-table--api .settings-account-usage-cell {\n grid-column: 1 / -1;\n }\n .settings-account-table .settings-account-management-cell {\n border-top: 1px solid var(--settings-divider);\n padding-top: 8px;\n }\n .settings-account-email {\n font-size: 13px;\n }\n .settings-account-usage__title {\n display: block;\n grid-column: 1;\n }\n .settings-account-usage__percent,\n .settings-account-usage__missing > span:not(.settings-account-usage__title) {\n grid-column: 2;\n text-align: right;\n }\n .settings-account-extra-usage .settings-account-usage__percent {\n grid-column: 1 / -1;\n }\n .settings-account-management {\n flex-direction: row;\n justify-content: space-between;\n }\n .settings-account-actions {\n order: 1;\n margin-left: auto;\n }\n .settings-account-native {\n justify-content: flex-start;\n }\n .settings-account-table tr:not(.settings-account-row, [hidden]),\n .settings-account-table tr:not(.settings-account-row, [hidden]) > td {\n display: block;\n }\n}\n\n@container (max-width: 360px) {\n .settings-account-row {\n grid-template-columns: minmax(0, 1fr);\n gap: 16px;\n padding: 16px;\n }\n}\n\n@media (forced-colors: active) {\n .settings-account-usage__bar {\n border: 1px solid CanvasText;\n }\n .settings-account-usage__bar > span {\n background: Highlight;\n }\n}\n';
|
|
27088
|
+
var accounts_default = '.settings-harness-account__logo {\n display: grid;\n place-items: center;\n width: 34px;\n height: 34px;\n}\n\n.settings-account-status {\n margin: 0 0 12px;\n color: var(--settings-muted);\n font-size: 12px;\n line-height: 18px;\n}\n.settings-account-status:empty {\n display: none;\n}\n\n.settings-account-toolbar {\n display: flex;\n align-items: center;\n gap: 10px;\n flex-wrap: wrap;\n margin: 0 0 16px;\n}\n.settings-account-count {\n display: flex;\n align-items: center;\n gap: 6px;\n color: var(--settings-muted);\n font-size: 12px;\n line-height: 18px;\n white-space: nowrap;\n}\n.settings-account-count > :last-child {\n color: var(--settings-text);\n font-variant-numeric: tabular-nums;\n font-weight: 600;\n}\n.settings-account-search {\n display: flex;\n align-items: center;\n gap: 8px;\n box-sizing: border-box;\n height: 36px;\n min-width: 180px;\n max-width: 100%;\n margin-right: auto;\n padding: 0 10px;\n color: var(--settings-muted);\n background: var(--settings-bg);\n border: 1px solid var(--settings-border);\n border-radius: 6px;\n}\n.settings-account-search svg {\n flex: none;\n}\n.settings-account-search input {\n flex: 1;\n min-width: 0;\n width: 210px;\n padding: 0;\n color: var(--settings-text);\n background: transparent;\n border: 0;\n font-size: 13px;\n}\n.settings-account-search input::placeholder {\n color: var(--settings-muted);\n}\n.settings-account-search:focus-within {\n outline: 2px solid var(--settings-focus);\n outline-offset: 2px;\n}\n\n.settings-account-groups {\n display: grid;\n gap: 18px;\n}\n.settings-account-group__title {\n margin: 0 0 8px;\n color: var(--settings-text);\n font-size: 13px;\n font-weight: 600;\n letter-spacing: -0.01em;\n}\n.settings-account-list {\n overflow: hidden;\n background: var(--settings-surface);\n border: 1px solid var(--settings-border);\n border-radius: 10px;\n container-type: inline-size;\n}\n.settings-account-list > .settings-account-empty {\n margin: 0;\n padding: 28px 16px;\n}\n.settings-account-table {\n width: 100%;\n table-layout: fixed;\n border-collapse: collapse;\n font-size: 12px;\n}\n.settings-account-table th {\n padding: 10px 16px;\n color: var(--settings-muted);\n background: var(--settings-surface);\n font-size: 10px;\n font-weight: 600;\n line-height: 16px;\n text-align: left;\n}\n.settings-account-table th:nth-child(1) {\n width: 32%;\n}\n.settings-account-table th:nth-child(2),\n.settings-account-table th:nth-child(3) {\n width: 24%;\n}\n.settings-account-table th:nth-child(4) {\n width: 20%;\n text-align: right;\n}\n.settings-account-table--api th:nth-child(1) {\n width: 48%;\n}\n.settings-account-table--api th:nth-child(2) {\n width: 32%;\n}\n.settings-account-table--api th:nth-child(3) {\n width: 20%;\n text-align: right;\n}\n.settings-account-table td {\n padding: 17px 16px;\n vertical-align: middle;\n border-top: 1px solid var(--settings-divider);\n}\n.settings-account-row {\n background: transparent;\n}\n.settings-account-row:hover {\n background: var(--settings-hover);\n}\n.settings-account-row__person {\n display: grid;\n grid-template-columns: 34px minmax(0, 1fr);\n align-items: center;\n gap: 11px;\n min-width: 0;\n}\n.settings-account-row__mark {\n display: grid;\n place-items: center;\n width: 34px;\n height: 34px;\n color: light-dark(#67558d, #c3baff);\n background: light-dark(#f0ecf7, #353044);\n border: 1px solid light-dark(#d9d0e6, #4d435f);\n border-radius: 10px;\n}\n.settings-account-row__identity {\n min-width: 0;\n}\n.settings-account-email {\n display: block;\n min-width: 0;\n overflow: hidden;\n font-size: 12px;\n font-weight: 550;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.settings-account-metadata {\n display: flex;\n align-items: center;\n min-width: 0;\n gap: 5px;\n margin-top: 4px;\n color: var(--settings-muted);\n flex-wrap: wrap;\n font-size: 11px;\n overflow-wrap: anywhere;\n}\n.settings-account-plan {\n flex: none;\n padding: 0 4px;\n color: var(--settings-muted);\n border: 1px solid var(--settings-border);\n border-radius: 5px;\n font-size: 10px;\n max-width: 100%;\n overflow-wrap: anywhere;\n}\n.settings-account-plan--highlighted {\n color: light-dark(#654f91, #c8bfff);\n background: light-dark(#f2edf9, #a99bff18);\n border-color: light-dark(#d9ccea, #a99bff52);\n font-weight: 600;\n}\n.settings-account-active {\n flex: none;\n color: light-dark(#66548e, #c8bfff);\n font-size: 10px;\n white-space: nowrap;\n}\n\n.settings-account-usage {\n display: grid;\n gap: 10px;\n}\n.settings-account-usage__meter {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n grid-template-rows: 20px 4px 17px;\n align-items: center;\n gap: 6px 0;\n min-width: 0;\n font-variant-numeric: tabular-nums;\n}\n:host([lang="zh-CN"]) .settings-account-usage__meter {\n grid-template-columns: 48px minmax(36px, 1fr) 72px;\n}\n.settings-account-usage__meter--balance {\n display: flex;\n grid-template-columns: none;\n justify-content: flex-start;\n gap: 6px;\n}\n.settings-account-usage__balance {\n display: inline-flex;\n align-items: baseline;\n gap: 4px;\n font-size: 14px;\n font-weight: 600;\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n}\n.settings-account-usage__value-label {\n font-size: 14px;\n font-weight: 600;\n}\n\n.settings-account-usage__title {\n display: none;\n min-width: 0;\n color: var(--settings-muted);\n font-size: 11px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.settings-account-extra-usage {\n display: grid;\n gap: 12px;\n margin-top: 14px;\n}\n.settings-account-extra-usage .settings-account-usage__meter,\n.settings-account-usage__meter--scoped {\n grid-template-rows: auto 20px 4px 17px;\n}\n.settings-account-extra-usage .settings-account-usage__title,\n.settings-account-usage__meter--scoped .settings-account-usage__title {\n display: block;\n grid-column: 1 / -1;\n white-space: normal;\n overflow-wrap: anywhere;\n}\n.settings-account-usage__percent {\n grid-column: 1 / -1;\n min-width: 0;\n display: flex;\n align-items: baseline;\n justify-content: flex-end;\n gap: 7px;\n font-size: 14px;\n font-weight: 600;\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n}\n.settings-account-usage__countdown {\n min-width: 0;\n color: var(--settings-muted);\n font-size: 10px;\n font-weight: 400;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.settings-account-usage__percent > :last-child {\n flex: none;\n}\n.settings-account-usage__percent--warn {\n color: var(--settings-warning);\n}\n.settings-account-usage__percent--hot {\n color: var(--settings-danger);\n}\n.settings-account-usage__bar {\n grid-column: 1 / -1;\n height: 4px;\n overflow: hidden;\n background: light-dark(#e3e1e8, #3c3c43);\n border-radius: 4px;\n}\n.settings-account-usage__bar > span {\n display: block;\n height: 100%;\n background: light-dark(#81769e, #9993b8);\n border-radius: inherit;\n}\n.settings-account-usage__bar--warn > span {\n background: var(--settings-warning);\n}\n.settings-account-usage__bar--hot > span {\n background: var(--settings-danger);\n}\n.settings-account-usage__sub {\n grid-column: 1 / -1;\n color: var(--settings-muted);\n font-size: 10px;\n font-variant-numeric: tabular-nums;\n text-align: right;\n white-space: nowrap;\n}\n.settings-account-usage__message {\n color: var(--settings-muted);\n}\n.settings-account-usage__missing {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n align-content: center;\n gap: 6px;\n min-height: 53px;\n color: var(--settings-muted);\n}\n.settings-account-usage__missing > span:not(.settings-account-usage__title) {\n grid-column: 1 / -1;\n font-size: 14px;\n}\n.settings-account-table .settings-account-spanning-cell {\n vertical-align: top;\n}\n.settings-account-quota-continuation-row > .settings-account-usage-cell {\n background: inherit;\n}\n.settings-account-management {\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 4px;\n}\n.settings-account-native {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: 3px;\n color: var(--settings-muted);\n font-size: 11px;\n}\n.settings-account-native .settings-icon-button {\n width: 25px;\n height: 28px;\n}\n.settings-account-usage > button {\n justify-self: start;\n}\n.settings-account-action {\n padding: 4px 5px;\n min-height: 30px;\n font-size: 12px;\n color: var(--settings-text);\n background: transparent;\n border: 1px solid transparent;\n border-radius: 7px;\n white-space: nowrap;\n cursor: pointer;\n}\n.settings-account-action:hover {\n background: var(--settings-hover);\n}\n.settings-account-action:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n.settings-account-reset-summary {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n min-height: 24px;\n padding: 3px 0;\n font-size: 10px;\n white-space: nowrap;\n color: var(--settings-muted);\n background: transparent;\n border: 0;\n border-radius: 5px;\n cursor: pointer;\n}\n.settings-account-reset-summary:hover {\n background: var(--settings-hover);\n}\n.settings-account-reset-summary[aria-expanded="true"] > svg:last-child {\n transform: rotate(90deg);\n}\n.settings-account-details-row > td {\n background: var(--settings-inset);\n}\n.settings-account-reset-details {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 16px;\n flex-wrap: wrap;\n}\n.settings-account-reset-details strong {\n font-size: 12px;\n}\n.settings-account-reset-expiry {\n margin: 6px 0;\n color: var(--settings-muted);\n font-size: 11px;\n}\n.settings-account-reset-expiry.is-warn {\n color: var(--settings-warning);\n}\n.settings-account-reset-expiry.is-hot {\n color: var(--settings-danger);\n}\n.settings-account-reset-list {\n margin: 8px 0 0;\n padding: 0;\n list-style: none;\n color: var(--settings-muted);\n font-size: 11px;\n}\n.settings-account-reset-list li + li {\n margin-top: 4px;\n}\n.settings-account-empty {\n text-align: center;\n color: var(--settings-muted);\n}\n.settings-account-list :focus-visible,\n.settings-account-toolbar :focus-visible:not(.settings-segmented__item):not(input) {\n outline: 2px solid var(--settings-focus);\n outline-offset: 2px;\n}\n\n.settings-account-dialog {\n position: fixed;\n width: min(360px, calc(100vw - 40px));\n max-height: calc(100vh - 40px);\n overflow: auto;\n padding: 22px;\n color: var(--settings-text);\n background: var(--settings-elevated);\n border: 1px solid var(--settings-border);\n border-radius: 12px;\n box-shadow: var(--settings-dialog-shadow);\n text-align: left;\n}\n.settings-account-dialog::backdrop {\n background: var(--settings-backdrop);\n}\n.settings-account-dialog h2 {\n margin: 0 28px 12px 0;\n font-size: 15px;\n}\n.settings-account-dialog p {\n color: var(--settings-muted);\n font-size: 12px;\n line-height: 1.6;\n overflow-wrap: anywhere;\n}\n.settings-account-dialog__close {\n position: absolute;\n top: 12px;\n right: 12px;\n}\n\n@container (max-width: 680px) {\n .settings-account-table,\n .settings-account-table tbody {\n display: block;\n }\n .settings-account-table thead {\n display: none;\n }\n .settings-account-row {\n display: grid;\n grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);\n padding: 18px;\n gap: 18px 22px;\n border-top: 1px solid var(--settings-divider);\n }\n .settings-account-row:first-child {\n border-top: 0;\n }\n .settings-account-table .settings-account-row > td {\n display: block;\n min-width: 0;\n padding: 0;\n border: 0;\n }\n .settings-account-person-cell,\n .settings-account-management-cell,\n .settings-account-usage-cell--message,\n .settings-account-table--api .settings-account-usage-cell {\n grid-column: 1 / -1;\n }\n .settings-account-table .settings-account-management-cell {\n border-top: 1px solid var(--settings-divider);\n padding-top: 8px;\n }\n .settings-account-email {\n font-size: 13px;\n }\n .settings-account-usage__title {\n display: block;\n grid-column: 1;\n }\n .settings-account-usage__percent,\n .settings-account-usage__missing > span:not(.settings-account-usage__title) {\n grid-column: 2;\n text-align: right;\n }\n .settings-account-extra-usage .settings-account-usage__percent {\n grid-column: 1 / -1;\n }\n .settings-account-management {\n flex-direction: row;\n justify-content: space-between;\n }\n .settings-account-native {\n justify-content: flex-start;\n }\n .settings-account-table tr:not(.settings-account-row, [hidden]),\n .settings-account-table tr:not(.settings-account-row, [hidden]) > td {\n display: block;\n }\n}\n\n@container (max-width: 360px) {\n .settings-account-row {\n grid-template-columns: minmax(0, 1fr);\n gap: 16px;\n padding: 16px;\n }\n}\n\n@media (forced-colors: active) {\n .settings-account-usage__bar {\n border: 1px solid CanvasText;\n }\n .settings-account-usage__bar > span {\n background: Highlight;\n }\n}\n';
|
|
27495
27089
|
|
|
27496
27090
|
// src/settings/shell.ts
|
|
27497
27091
|
var SETTINGS_SHELL_ATTRIBUTE = "data-codexhost-settings-shell";
|
|
@@ -28670,7 +28264,18 @@ ${accounts_default}`;
|
|
|
28670
28264
|
if (!client) return null;
|
|
28671
28265
|
const state = hostHarnessAvailabilityState(hostId);
|
|
28672
28266
|
if (state.codexAccounts?.client !== client) {
|
|
28673
|
-
state.codexAccounts
|
|
28267
|
+
state.codexAccounts?.dispose();
|
|
28268
|
+
state.codexAccounts = new RendererCodexAccountState(client, () => {
|
|
28269
|
+
queueMicrotask(() => {
|
|
28270
|
+
if (disposed || hostHarnessAvailabilityState(hostId).codexAccounts?.client !== client)
|
|
28271
|
+
return;
|
|
28272
|
+
for (const mounted of mountedByComposer.values()) {
|
|
28273
|
+
if (mounted.hostId !== hostId) continue;
|
|
28274
|
+
renderMounted(mounted);
|
|
28275
|
+
void refreshDraftCodexUsage(mounted);
|
|
28276
|
+
}
|
|
28277
|
+
});
|
|
28278
|
+
});
|
|
28674
28279
|
}
|
|
28675
28280
|
return state.codexAccounts;
|
|
28676
28281
|
};
|
|
@@ -28688,12 +28293,7 @@ ${accounts_default}`;
|
|
|
28688
28293
|
const isCurrentModelRequest = (mounted, generation) => isMountedComposer(mounted.composer) && mountedByComposer.get(mounted.composer) === mounted && controller.isCurrentModelRequest(mounted.composer, generation);
|
|
28689
28294
|
const isCurrentOwnershipRequest = (mounted, generation) => mounted.composer.isConnected && mountedByComposer.get(mounted.composer) === mounted && controller.isCurrentOwnershipRequest(mounted.composer, generation);
|
|
28690
28295
|
const notifySubmission = (composer, trigger) => {
|
|
28691
|
-
const
|
|
28692
|
-
const state = controller.recordSubmission(
|
|
28693
|
-
composer,
|
|
28694
|
-
accounts?.selection.selectedAccountId ?? void 0
|
|
28695
|
-
);
|
|
28696
|
-
if (state.agent === "codex" && accounts) accounts.overrideAccountId = null;
|
|
28296
|
+
const state = controller.recordSubmission(composer);
|
|
28697
28297
|
writeNewThreadAgentPreference(state.agent);
|
|
28698
28298
|
if (state.agent !== "codex") {
|
|
28699
28299
|
const model = controller.modelForAgent(composer, state.agent);
|
|
@@ -28717,24 +28317,22 @@ ${accounts_default}`;
|
|
|
28717
28317
|
);
|
|
28718
28318
|
};
|
|
28719
28319
|
const renderMounted = (mounted) => {
|
|
28720
|
-
const state = controller.get(mounted.composer);
|
|
28721
28320
|
const accounts = composerCodexAccounts(mounted.composer);
|
|
28722
|
-
const
|
|
28321
|
+
const currentCodexAccount = accounts?.accounts.find(
|
|
28322
|
+
({ accountId }) => accountId === accounts.readyAccountId
|
|
28323
|
+
);
|
|
28723
28324
|
renderComposerAgentControl(
|
|
28724
28325
|
mounted.control,
|
|
28725
28326
|
controller.get(mounted.composer),
|
|
28726
28327
|
adapterStatus.state,
|
|
28727
|
-
|
|
28328
|
+
controller.isSwitching(mounted.composer) || mounted.ownershipStatus === "loading",
|
|
28728
28329
|
activeHarnessAvailabilityState().availability,
|
|
28729
28330
|
mounted.modelView,
|
|
28730
28331
|
mounted.permissionModeView,
|
|
28731
28332
|
mounted.usage,
|
|
28732
28333
|
mounted.accountCredits,
|
|
28733
28334
|
settingsLifecycle.locale,
|
|
28734
|
-
|
|
28735
|
-
...account,
|
|
28736
|
-
active: account.accountId === selectedCodexAccountId
|
|
28737
|
-
})),
|
|
28335
|
+
currentCodexAccount ?? null,
|
|
28738
28336
|
mounted.ownershipStatus === "error"
|
|
28739
28337
|
);
|
|
28740
28338
|
if (mounted.control.usage) {
|
|
@@ -28808,16 +28406,16 @@ ${accounts_default}`;
|
|
|
28808
28406
|
return;
|
|
28809
28407
|
const accounts = composerCodexAccounts(mounted.composer);
|
|
28810
28408
|
const client = accounts?.client;
|
|
28811
|
-
const accountId = accounts?.
|
|
28409
|
+
const accountId = accounts?.readyAccountId;
|
|
28812
28410
|
const hostId = mounted.hostId;
|
|
28813
28411
|
const generation = ++mounted.usageRequestGeneration;
|
|
28814
28412
|
mounted.usage = null;
|
|
28815
28413
|
mounted.accountCredits = null;
|
|
28816
28414
|
renderMounted(mounted);
|
|
28817
|
-
if (
|
|
28415
|
+
if (!accountId || !client?.inspectCodexAccountUsage) return;
|
|
28818
28416
|
try {
|
|
28819
28417
|
const result = await client.inspectCodexAccountUsage({ accountId });
|
|
28820
|
-
if (disposed || mounted.hostId !== hostId || composerCodexAccounts(mounted.composer) !== accounts || !mounted.composer.isConnected || mountedByComposer.get(mounted.composer) !== mounted || mounted.usageRequestGeneration !== generation || controller.get(mounted.composer).agent !== "codex" || controller.get(mounted.composer).phase !== "draft" || controller.isSubmissionPending(mounted.composer) || threadIdFromComposerModelTarget(mounted.modelTarget) || accounts.
|
|
28418
|
+
if (disposed || mounted.hostId !== hostId || composerCodexAccounts(mounted.composer) !== accounts || !mounted.composer.isConnected || mountedByComposer.get(mounted.composer) !== mounted || mounted.usageRequestGeneration !== generation || controller.get(mounted.composer).agent !== "codex" || controller.get(mounted.composer).phase !== "draft" || controller.isSubmissionPending(mounted.composer) || threadIdFromComposerModelTarget(mounted.modelTarget) || accounts.readyAccountId !== accountId || result.accountId !== accountId)
|
|
28821
28419
|
return;
|
|
28822
28420
|
mounted.usage = result.usage;
|
|
28823
28421
|
mounted.accountCredits = composerAccountCredits(result.accountCredits);
|
|
@@ -28924,8 +28522,7 @@ ${accounts_default}`;
|
|
|
28924
28522
|
agent,
|
|
28925
28523
|
model,
|
|
28926
28524
|
thinkingOptionId,
|
|
28927
|
-
permissionModeId
|
|
28928
|
-
inspection.owner === "codex" ? inspection.accountId : void 0
|
|
28525
|
+
permissionModeId
|
|
28929
28526
|
);
|
|
28930
28527
|
if (!restored) {
|
|
28931
28528
|
throw new Error("Thread owner could not be applied to the Composer");
|
|
@@ -29641,39 +29238,6 @@ ${accounts_default}`;
|
|
|
29641
29238
|
void refreshDraftCodexUsage(mounted);
|
|
29642
29239
|
}
|
|
29643
29240
|
};
|
|
29644
|
-
const selectCodexAccount = async (mounted, accountId) => {
|
|
29645
|
-
const hostId = mounted.hostId;
|
|
29646
|
-
const accounts = composerCodexAccounts(mounted.composer);
|
|
29647
|
-
if (!accounts || accounts.switching || controller.get(mounted.composer).phase === "locked" || !accounts.accounts.some((account) => account.accountId === accountId))
|
|
29648
|
-
return;
|
|
29649
|
-
const isCurrent = () => !disposed && mounted.composer.isConnected && mountedByComposer.get(mounted.composer) === mounted && controller.get(mounted.composer).phase !== "locked" && accounts.accounts.some((account) => account.accountId === accountId) && mounted.hostId === hostId && activeModelHostId() === hostId && composerCodexAccounts(mounted.composer) === accounts;
|
|
29650
|
-
accounts.switching = true;
|
|
29651
|
-
for (const candidate of mountedByComposer.values()) {
|
|
29652
|
-
renderMounted(candidate);
|
|
29653
|
-
void refreshDraftCodexUsage(candidate);
|
|
29654
|
-
}
|
|
29655
|
-
try {
|
|
29656
|
-
if (controller.get(mounted.composer).agent !== "codex" && !await switchComposerAgent(mounted, "codex")) {
|
|
29657
|
-
return;
|
|
29658
|
-
}
|
|
29659
|
-
const policy = await waitForRendererDraftPrewarmPolicy(window);
|
|
29660
|
-
if (!isCurrent() || policy.hostId !== hostId) return;
|
|
29661
|
-
await policy.clear();
|
|
29662
|
-
if (!isCurrent() || window.__codexhostDraftPrewarmPolicyV1 !== policy) return;
|
|
29663
|
-
if (!policy.selectAccount) throw new Error("Codex Account selection is unavailable");
|
|
29664
|
-
const override = accountId === accounts.selection.activeAccountId ? null : accountId;
|
|
29665
|
-
policy.selectAccount(override);
|
|
29666
|
-
accounts.overrideAccountId = override;
|
|
29667
|
-
} catch {
|
|
29668
|
-
if (isCurrent()) void loadCodexAccounts();
|
|
29669
|
-
} finally {
|
|
29670
|
-
accounts.switching = false;
|
|
29671
|
-
for (const candidate of mountedByComposer.values()) {
|
|
29672
|
-
renderMounted(candidate);
|
|
29673
|
-
void refreshDraftCodexUsage(candidate);
|
|
29674
|
-
}
|
|
29675
|
-
}
|
|
29676
|
-
};
|
|
29677
29241
|
const openInstallPage = (agent) => {
|
|
29678
29242
|
const url2 = RENDERER_AGENT_INSTALL_URLS[agent];
|
|
29679
29243
|
window.open(url2, "_blank", "noopener,noreferrer");
|
|
@@ -29943,11 +29507,6 @@ ${accounts_default}`;
|
|
|
29943
29507
|
void switchComposerAgent(mounted2, agent);
|
|
29944
29508
|
},
|
|
29945
29509
|
openInstallPage,
|
|
29946
|
-
async (accountId) => {
|
|
29947
|
-
const mounted2 = mountedByComposer.get(composer);
|
|
29948
|
-
if (!composer.isConnected || !mounted2) return;
|
|
29949
|
-
await selectCodexAccount(mounted2, accountId);
|
|
29950
|
-
},
|
|
29951
29510
|
() => {
|
|
29952
29511
|
void loadCodexAccounts();
|
|
29953
29512
|
},
|
|
@@ -30142,26 +29701,12 @@ ${accounts_default}`;
|
|
|
30142
29701
|
const mounted = mountedByComposer.get(composer);
|
|
30143
29702
|
if (!mounted) return null;
|
|
30144
29703
|
const current = controller.get(composer);
|
|
30145
|
-
if (
|
|
29704
|
+
if (controller.isSwitching(composer) || isOwnershipSubmissionBlocked(mounted.ownershipStatus)) {
|
|
30146
29705
|
return false;
|
|
30147
29706
|
}
|
|
30148
29707
|
if (!isExternalConfigurationReady(mounted)) return false;
|
|
30149
29708
|
if (current.phase === "locked") return true;
|
|
30150
29709
|
if (!applyComposerAgent(composer)) return false;
|
|
30151
|
-
if (current.agent === "codex") {
|
|
30152
|
-
const selection = composerCodexAccounts(composer)?.selection;
|
|
30153
|
-
const accountId = controller.isSubmissionPending(composer) && current.codexAccountId ? current.codexAccountId : selection?.selectedAccountId;
|
|
30154
|
-
const override = accountId === selection?.activeAccountId ? null : accountId ?? null;
|
|
30155
|
-
const policy = window.__codexhostDraftPrewarmPolicyV1;
|
|
30156
|
-
if (override !== null && (policy?.hostId !== mounted.hostId || !policy.selectAccount)) {
|
|
30157
|
-
return false;
|
|
30158
|
-
}
|
|
30159
|
-
try {
|
|
30160
|
-
if (policy?.hostId === mounted.hostId) policy.selectAccount?.(override);
|
|
30161
|
-
} catch {
|
|
30162
|
-
return false;
|
|
30163
|
-
}
|
|
30164
|
-
}
|
|
30165
29710
|
controller.markSubmissionPending(composer);
|
|
30166
29711
|
renderMounted(mounted);
|
|
30167
29712
|
return true;
|
|
@@ -30196,7 +29741,7 @@ ${accounts_default}`;
|
|
|
30196
29741
|
const onKeyDown = (event) => {
|
|
30197
29742
|
const composer = isComposerInputIntent(event) ? composerForTarget(event.target) : null;
|
|
30198
29743
|
const mounted = composer ? mountedByComposer.get(composer) : void 0;
|
|
30199
|
-
if (composer &&
|
|
29744
|
+
if (composer && controller.isSwitching(composer)) {
|
|
30200
29745
|
blockEvent(event);
|
|
30201
29746
|
return;
|
|
30202
29747
|
}
|
|
@@ -30353,6 +29898,7 @@ ${accounts_default}`;
|
|
|
30353
29898
|
for (const state of harnessAvailabilityByHost.values()) {
|
|
30354
29899
|
state.requestGeneration += 1;
|
|
30355
29900
|
state.request = null;
|
|
29901
|
+
state.codexAccounts?.dispose();
|
|
30356
29902
|
if (state.retryTimer !== null) window.clearTimeout(state.retryTimer);
|
|
30357
29903
|
}
|
|
30358
29904
|
harnessAvailabilityByHost.clear();
|
|
@@ -30408,6 +29954,7 @@ ${accounts_default}`;
|
|
|
30408
29954
|
window.removeEventListener("focus", onWindowFocus);
|
|
30409
29955
|
for (const state of harnessAvailabilityByHost.values()) {
|
|
30410
29956
|
state.requestGeneration += 1;
|
|
29957
|
+
state.codexAccounts?.dispose();
|
|
30411
29958
|
if (state.retryTimer !== null) window.clearTimeout(state.retryTimer);
|
|
30412
29959
|
}
|
|
30413
29960
|
harnessAvailabilityByHost.clear();
|