@codexhost/cli-linux-arm64 0.7.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/THIRD_PARTY_NOTICES.txt +4 -0
- package/app/codexhost-distribution.json +1 -1
- package/app/desktop-controller.mjs +121 -23
- package/app/host-runtime.mjs +6950 -2918
- package/app/plugins/antigravity/plugin.mjs +73 -18
- package/app/plugins/claude-code/plugin.mjs +96 -27
- package/app/plugins/codebuddy/plugin.mjs +73 -18
- package/app/plugins/cursor-cli/plugin.mjs +73 -18
- package/app/plugins/deepseek-harness/plugin.mjs +73 -18
- package/app/plugins/enabled.json +2 -1
- package/app/plugins/grok/plugin.mjs +73 -18
- package/app/plugins/hermes/manifest.json +11 -0
- package/app/plugins/hermes/plugin.mjs +21718 -0
- package/app/plugins/kiro-cli/plugin.mjs +73 -18
- package/app/plugins/omp/plugin.mjs +73 -18
- package/app/plugins/opencode/plugin.mjs +97 -23
- package/app/plugins/pi/plugin.mjs +73 -18
- package/app/renderer-extension.js +927 -553
- package/bin/codexhost +0 -0
- package/libexec/codexhost-shim +0 -0
- package/libexec/codexhost-updater +0 -0
- package/licenses/opencodex-LICENSE.txt +21 -0
- package/package.json +1 -1
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
"antigravity",
|
|
19
19
|
"kiro-cli",
|
|
20
20
|
"codebuddy",
|
|
21
|
-
"cursor-cli"
|
|
21
|
+
"cursor-cli",
|
|
22
|
+
"hermes"
|
|
22
23
|
];
|
|
23
24
|
var DEFAULT_RENDERER_AGENTS = KNOWN_RENDERER_AGENTS;
|
|
24
25
|
function defaultIdFactory(sequence) {
|
|
@@ -119,14 +120,12 @@
|
|
|
119
120
|
this.#ownershipRequestGenerations.set(state, ++this.#ownershipRequestSequence);
|
|
120
121
|
return state;
|
|
121
122
|
}
|
|
122
|
-
restore(composer, agent, model, thinkingOptionId, permissionModeId
|
|
123
|
+
restore(composer, agent, model, thinkingOptionId, permissionModeId) {
|
|
123
124
|
if (!this.#enabledAgents.has(agent)) return null;
|
|
124
125
|
const state = this.#state(composer);
|
|
125
126
|
this.#pendingSubmissions.delete(state);
|
|
126
127
|
state.agent = agent;
|
|
127
128
|
state.phase = "locked";
|
|
128
|
-
if (agent === "codex" && codexAccountId) state.codexAccountId = codexAccountId;
|
|
129
|
-
else delete state.codexAccountId;
|
|
130
129
|
if (agent === "pi" && model) state.piModel = model;
|
|
131
130
|
else if (agent === "pi") delete state.piModel;
|
|
132
131
|
if (agent === "claude-code" && model) state.claudeModel = model;
|
|
@@ -147,6 +146,8 @@
|
|
|
147
146
|
else if (agent === "codebuddy") delete state.codeBuddyModel;
|
|
148
147
|
if (agent === "cursor-cli" && model) state.cursorCliModel = model;
|
|
149
148
|
else if (agent === "cursor-cli") delete state.cursorCliModel;
|
|
149
|
+
if (agent === "hermes" && model) state.hermesModel = model;
|
|
150
|
+
else if (agent === "hermes") delete state.hermesModel;
|
|
150
151
|
if (agent === "pi" && thinkingOptionId) state.piThinkingOptionId = thinkingOptionId;
|
|
151
152
|
else if (agent === "pi") delete state.piThinkingOptionId;
|
|
152
153
|
if (agent === "claude-code" && thinkingOptionId) {
|
|
@@ -180,7 +181,8 @@
|
|
|
180
181
|
"antigravity",
|
|
181
182
|
"kiro-cli",
|
|
182
183
|
"codebuddy",
|
|
183
|
-
"cursor-cli"
|
|
184
|
+
"cursor-cli",
|
|
185
|
+
"hermes"
|
|
184
186
|
]) {
|
|
185
187
|
const current = state.permissionModeByAgent?.[candidate];
|
|
186
188
|
if (candidate !== agent && current) permissionModeByAgent[candidate] = current;
|
|
@@ -206,6 +208,7 @@
|
|
|
206
208
|
if (agent === "kiro-cli") return state.kiroCliModel;
|
|
207
209
|
if (agent === "codebuddy") return state.codeBuddyModel;
|
|
208
210
|
if (agent === "cursor-cli") return state.cursorCliModel;
|
|
211
|
+
if (agent === "hermes") return state.hermesModel;
|
|
209
212
|
return void 0;
|
|
210
213
|
}
|
|
211
214
|
thinkingOptionForAgent(composer, agent) {
|
|
@@ -243,6 +246,8 @@
|
|
|
243
246
|
else if (agent === "kiro-cli") state.kiroCliModel = model;
|
|
244
247
|
else if (agent === "codebuddy") state.codeBuddyModel = model;
|
|
245
248
|
else if (agent === "cursor-cli") state.cursorCliModel = model;
|
|
249
|
+
else if (agent === "hermes") state.hermesModel = model;
|
|
250
|
+
else state.antigravityModel = model;
|
|
246
251
|
return state;
|
|
247
252
|
}
|
|
248
253
|
setPiConfiguration(composer, model, thinkingOptionId) {
|
|
@@ -310,13 +315,9 @@
|
|
|
310
315
|
clearPendingSubmission(composer) {
|
|
311
316
|
const state = this.#state(composer);
|
|
312
317
|
this.#pendingSubmissions.delete(state);
|
|
313
|
-
if (state.phase === "draft") delete state.codexAccountId;
|
|
314
318
|
}
|
|
315
|
-
recordSubmission(composer
|
|
319
|
+
recordSubmission(composer) {
|
|
316
320
|
const state = this.#state(composer);
|
|
317
|
-
if (state.agent === "codex" && state.phase === "draft" && !state.codexAccountId && codexAccountId) {
|
|
318
|
-
state.codexAccountId = codexAccountId;
|
|
319
|
-
}
|
|
320
321
|
this.#lastSubmittedAgent = state.agent;
|
|
321
322
|
return state;
|
|
322
323
|
}
|
|
@@ -15000,12 +15001,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15000
15001
|
plan: external_exports.string().trim().min(1).max(128).optional(),
|
|
15001
15002
|
credits: accountCreditsSnapshotSchema
|
|
15002
15003
|
}).strict();
|
|
15003
|
-
var
|
|
15004
|
+
var harnessAccountIdentityShape = {
|
|
15005
|
+
harnessId: harnessIdSchema,
|
|
15006
|
+
harnessName: external_exports.string().trim().min(1).max(128)
|
|
15007
|
+
};
|
|
15008
|
+
var harnessAccountSourceSchema = external_exports.object(harnessAccountIdentityShape).strict();
|
|
15009
|
+
var harnessAccountSourceListParamsSchema = external_exports.object({}).strict();
|
|
15010
|
+
var harnessAccountSourceListResultSchema = external_exports.object({ sources: external_exports.array(harnessAccountSourceSchema).max(128) }).strict();
|
|
15011
|
+
var harnessAccountInspectParamsSchema = external_exports.object({ harnessId: harnessIdSchema, refresh: external_exports.boolean().optional() }).strict();
|
|
15012
|
+
var harnessAccountInspectResultSchema = external_exports.object({
|
|
15013
|
+
...harnessAccountIdentityShape,
|
|
15014
|
+
account: harnessAccountSnapshotSchema.nullable()
|
|
15015
|
+
}).strict();
|
|
15016
|
+
var harnessAccountListParamsSchema = external_exports.object({ refresh: external_exports.boolean().optional() }).strict();
|
|
15004
15017
|
var harnessAccountListResultSchema = external_exports.object({
|
|
15005
|
-
accounts: external_exports.array(harnessAccountSnapshotSchema.extend(
|
|
15006
|
-
harnessId: harnessIdSchema,
|
|
15007
|
-
harnessName: external_exports.string().min(1)
|
|
15008
|
-
})).max(128)
|
|
15018
|
+
accounts: external_exports.array(harnessAccountSnapshotSchema.extend(harnessAccountIdentityShape)).max(128)
|
|
15009
15019
|
}).strict();
|
|
15010
15020
|
|
|
15011
15021
|
// ../shared-contracts/dist/json-value.js
|
|
@@ -15302,7 +15312,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15302
15312
|
}).strict();
|
|
15303
15313
|
var codexThreadInspectionSchema = external_exports.object({
|
|
15304
15314
|
owner: external_exports.literal("codex"),
|
|
15305
|
-
accountId: nonBlankTextSchema2.optional(),
|
|
15306
15315
|
locked: external_exports.literal(true)
|
|
15307
15316
|
}).strict();
|
|
15308
15317
|
var externalThreadInspectionSchema = external_exports.object({
|
|
@@ -15464,37 +15473,86 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15464
15473
|
accountId: accountIdSchema,
|
|
15465
15474
|
label: nonBlankTextSchema3.max(256),
|
|
15466
15475
|
email: external_exports.string().email().max(320).optional(),
|
|
15467
|
-
planType: codexAccountPlanTypeSchema.optional()
|
|
15468
|
-
|
|
15469
|
-
|
|
15470
|
-
|
|
15476
|
+
planType: codexAccountPlanTypeSchema.optional()
|
|
15477
|
+
}).strict();
|
|
15478
|
+
var codexAccountPhaseSchema = external_exports.enum(["ready", "changing", "unavailable"]);
|
|
15479
|
+
var codexAccountPendingOperationSchema = external_exports.object({
|
|
15480
|
+
operationId: nonBlankTextSchema3.max(1024),
|
|
15481
|
+
kind: external_exports.enum(["login", "switch", "logout", "recovery"])
|
|
15482
|
+
}).strict();
|
|
15483
|
+
var codexAccountCapabilitiesSchema = external_exports.object({
|
|
15484
|
+
manage: external_exports.boolean(),
|
|
15485
|
+
switch: external_exports.boolean(),
|
|
15486
|
+
login: external_exports.boolean(),
|
|
15487
|
+
delete: external_exports.boolean(),
|
|
15488
|
+
recover: external_exports.boolean().optional(),
|
|
15489
|
+
logout: external_exports.boolean().optional(),
|
|
15490
|
+
reason: external_exports.enum([
|
|
15491
|
+
"ssh-single-account",
|
|
15492
|
+
"unsupported-storage",
|
|
15493
|
+
"unsupported-version",
|
|
15494
|
+
"recovery-required",
|
|
15495
|
+
"keyring-unavailable",
|
|
15496
|
+
"migration-required"
|
|
15497
|
+
]).optional()
|
|
15498
|
+
}).strict();
|
|
15499
|
+
var codexAccountListResultSchema = external_exports.object({
|
|
15500
|
+
version: external_exports.literal(2),
|
|
15501
|
+
currentAccountId: accountIdSchema.nullable(),
|
|
15502
|
+
phase: codexAccountPhaseSchema,
|
|
15503
|
+
revision: external_exports.number().int().nonnegative(),
|
|
15504
|
+
instanceId: nonBlankTextSchema3.max(1024).optional(),
|
|
15505
|
+
cleanupRequired: external_exports.boolean().optional(),
|
|
15506
|
+
/** Credentials were adopted; other native homes/history remain unmerged. */
|
|
15507
|
+
legacyHistoryPreserved: external_exports.boolean().optional(),
|
|
15508
|
+
pendingOperation: codexAccountPendingOperationSchema.optional(),
|
|
15509
|
+
capabilities: codexAccountCapabilitiesSchema,
|
|
15510
|
+
accounts: external_exports.array(codexAccountSchema).max(128)
|
|
15471
15511
|
}).strict();
|
|
15472
|
-
var codexAccountListResultSchema = external_exports.object({ accounts: external_exports.array(codexAccountSchema).max(128) }).strict();
|
|
15473
|
-
var codexAccountCreateParamsSchema = external_exports.object({ label: nonBlankTextSchema3.max(256).optional() }).strict();
|
|
15474
15512
|
var codexAccountActivateParamsSchema = external_exports.object({ accountId: accountIdSchema }).strict();
|
|
15513
|
+
var codexAccountSwitchParamsSchema = external_exports.object({ accountId: accountIdSchema }).strict();
|
|
15514
|
+
var codexAccountReadyMutationResultShape = {
|
|
15515
|
+
phase: external_exports.literal("ready"),
|
|
15516
|
+
revision: external_exports.number().int().nonnegative()
|
|
15517
|
+
};
|
|
15518
|
+
var codexAccountSwitchResultSchema = external_exports.object({
|
|
15519
|
+
currentAccountId: accountIdSchema,
|
|
15520
|
+
...codexAccountReadyMutationResultShape
|
|
15521
|
+
}).strict();
|
|
15522
|
+
var codexAccountChangedSchema = codexAccountListResultSchema;
|
|
15475
15523
|
var codexAccountDeleteParamsSchema = external_exports.object({ accountId: accountIdSchema }).strict();
|
|
15476
15524
|
var codexAccountDeleteResultSchema = external_exports.object({ deletedAccountId: accountIdSchema }).strict();
|
|
15477
|
-
var
|
|
15478
|
-
var codexAccountLoginStartParamsSchema = external_exports.object({ accountId: accountIdSchema }).strict();
|
|
15525
|
+
var codexAccountLoginStartParamsSchema = external_exports.object({ accountId: accountIdSchema.optional() }).strict();
|
|
15479
15526
|
var codexAccountLoginStartResultSchema = external_exports.object({
|
|
15480
15527
|
accountId: accountIdSchema,
|
|
15481
15528
|
loginId: nonBlankTextSchema3.max(1024),
|
|
15482
15529
|
verificationUrl: external_exports.string().url().max(16384),
|
|
15483
15530
|
userCode: nonBlankTextSchema3.max(1024)
|
|
15484
15531
|
}).strict();
|
|
15485
|
-
var codexAccountLoginCancelParamsSchema = external_exports.object({
|
|
15532
|
+
var codexAccountLoginCancelParamsSchema = external_exports.object({ loginId: nonBlankTextSchema3.max(1024) }).strict();
|
|
15486
15533
|
var codexAccountLoginCancelResultSchema = external_exports.object({ cancelled: external_exports.boolean() }).strict();
|
|
15487
15534
|
var codexAccountLoginCompletedSchema = external_exports.object({
|
|
15488
15535
|
accountId: accountIdSchema,
|
|
15489
15536
|
loginId: nonBlankTextSchema3.max(1024),
|
|
15490
15537
|
success: external_exports.boolean(),
|
|
15491
|
-
error: external_exports.string().max(4096).nullable()
|
|
15538
|
+
error: external_exports.string().max(4096).nullable(),
|
|
15539
|
+
saved: external_exports.boolean().optional(),
|
|
15540
|
+
cleanupRequired: external_exports.boolean().optional()
|
|
15541
|
+
}).strict();
|
|
15542
|
+
var codexAccountLogoutParamsSchema = external_exports.object({}).strict();
|
|
15543
|
+
var codexAccountLogoutResultSchema = external_exports.object({
|
|
15544
|
+
currentAccountId: external_exports.null(),
|
|
15545
|
+
...codexAccountReadyMutationResultShape
|
|
15492
15546
|
}).strict();
|
|
15493
|
-
var
|
|
15547
|
+
var codexAccountRecoverParamsSchema = external_exports.object({}).strict();
|
|
15548
|
+
var codexAccountRecoverResultSchema = codexAccountListResultSchema;
|
|
15549
|
+
var codexAccountUsageParamsSchema = external_exports.object({ accountId: accountIdSchema, refresh: external_exports.boolean().optional() }).strict();
|
|
15494
15550
|
var codexAccountUsageResultSchema = external_exports.object({
|
|
15495
15551
|
accountId: accountIdSchema,
|
|
15496
15552
|
usage: threadUsageSnapshotSchema.nullable(),
|
|
15497
|
-
accountCredits: accountCreditsSnapshotSchema.optional()
|
|
15553
|
+
accountCredits: accountCreditsSnapshotSchema.optional(),
|
|
15554
|
+
freshness: external_exports.enum(["live", "cached"]),
|
|
15555
|
+
observedAt: external_exports.string().datetime().nullable()
|
|
15498
15556
|
}).strict();
|
|
15499
15557
|
var codexAccountResetCreditConsumeParamsSchema = external_exports.object({
|
|
15500
15558
|
accountId: accountIdSchema,
|
|
@@ -15863,6 +15921,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15863
15921
|
// src/assets/grok-agent.png
|
|
15864
15922
|
var grok_agent_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA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lU1NeHge6HwPget30Imc6AyTwaWjrmWgjIX+cAi0gF1KrpF2/BVIanQj2g3WnfBJcOftzlrn+Tu8DT+A18E6p8KRkE3umE3v08Gs8SMw+pWO+TVYBn+CHvCxVVE2Cglmxwk/HFxPXXdttyWYYo1UPVvn2AZGsrvZhaAxjUzlRkzj6PXH84//b+a4kX9QSGNrrHFgWsymLjzU8ENgMjwM74CybrPJSHgZrG8L7NbuGfj4zMD/A1DD7XafOaXCAAAAAElFTkSuQmCC";
|
|
15926
|
+
|
|
15866
15927
|
// src/assets/antigravity-agent.svg
|
|
15867
15928
|
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';
|
|
15868
15929
|
|
|
@@ -15893,7 +15954,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15893
15954
|
antigravity: "Antigravity CLI",
|
|
15894
15955
|
"kiro-cli": "Kiro CLI",
|
|
15895
15956
|
codebuddy: "CodeBuddy",
|
|
15896
|
-
"cursor-cli": "Cursor CLI (Experimental)"
|
|
15957
|
+
"cursor-cli": "Cursor CLI (Experimental)",
|
|
15958
|
+
hermes: "Hermes"
|
|
15897
15959
|
};
|
|
15898
15960
|
var PI_PATHS = [
|
|
15899
15961
|
{
|
|
@@ -15980,6 +16042,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15980
16042
|
image.style.flex = "none";
|
|
15981
16043
|
return image;
|
|
15982
16044
|
}
|
|
16045
|
+
if (agent === "hermes") {
|
|
16046
|
+
const image = ownerDocument.createElement("img");
|
|
16047
|
+
image.src = hermes_agent_default;
|
|
16048
|
+
image.alt = "";
|
|
16049
|
+
image.draggable = false;
|
|
16050
|
+
image.style.width = `${size}px`;
|
|
16051
|
+
image.style.height = `${size}px`;
|
|
16052
|
+
image.style.objectFit = "contain";
|
|
16053
|
+
image.style.boxSizing = "border-box";
|
|
16054
|
+
image.style.padding = `${Math.max(1, Math.round(size / 16))}px`;
|
|
16055
|
+
image.style.borderRadius = "22.37%";
|
|
16056
|
+
image.style.background = "#d8d8e8";
|
|
16057
|
+
image.style.flex = "none";
|
|
16058
|
+
return image;
|
|
16059
|
+
}
|
|
15983
16060
|
const mark = ownerDocument.createElement("img");
|
|
15984
16061
|
mark.src = grok_agent_default;
|
|
15985
16062
|
mark.alt = "";
|
|
@@ -15992,225 +16069,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15992
16069
|
return mark;
|
|
15993
16070
|
}
|
|
15994
16071
|
|
|
15995
|
-
// src/renderer-codex-account-options.ts
|
|
15996
|
-
var ACCOUNT_COLORS = ["#5b38c9", "#239b88", "#ce6724", "#2878c7", "#b34778", "#65752a"];
|
|
15997
|
-
function codexAccountDisplayName(account) {
|
|
15998
|
-
const full = account.email ?? account.label;
|
|
15999
|
-
const separator = account.email?.lastIndexOf("@") ?? -1;
|
|
16000
|
-
if (!account.email || separator <= 0 || separator === account.email.length - 1) {
|
|
16001
|
-
return { local: full, domain: null, full };
|
|
16002
|
-
}
|
|
16003
|
-
return {
|
|
16004
|
-
local: account.email.slice(0, separator),
|
|
16005
|
-
domain: account.email.slice(separator + 1),
|
|
16006
|
-
full
|
|
16007
|
-
};
|
|
16008
|
-
}
|
|
16009
|
-
function codexAccountPresentationSignature(accounts) {
|
|
16010
|
-
return accounts.map(({ accountId, label, email: email3 }) => `${accountId}\0${label}\0${email3 ?? ""}`).join("");
|
|
16011
|
-
}
|
|
16012
|
-
function accountColor(accountId) {
|
|
16013
|
-
let hash2 = 0;
|
|
16014
|
-
for (const character of accountId) hash2 = hash2 * 31 + character.charCodeAt(0) >>> 0;
|
|
16015
|
-
return ACCOUNT_COLORS[hash2 % ACCOUNT_COLORS.length] ?? ACCOUNT_COLORS[0];
|
|
16016
|
-
}
|
|
16017
|
-
function accountInitial(account) {
|
|
16018
|
-
const display = codexAccountDisplayName(account).local.trim();
|
|
16019
|
-
return display.match(/[\p{L}\p{N}]/u)?.[0]?.toUpperCase() ?? "?";
|
|
16020
|
-
}
|
|
16021
|
-
function setInteractiveHighlight(button) {
|
|
16022
|
-
const update = (hovered) => {
|
|
16023
|
-
const selected = button.getAttribute("aria-checked") === "true";
|
|
16024
|
-
button.style.background = selected || hovered && !button.disabled ? `rgba(127, 127, 127, ${selected ? "0.16" : "0.1"})` : "transparent";
|
|
16025
|
-
};
|
|
16026
|
-
button.addEventListener("pointerenter", () => update(true));
|
|
16027
|
-
button.addEventListener("pointerleave", () => update(false));
|
|
16028
|
-
button.addEventListener("focus", () => update(true));
|
|
16029
|
-
button.addEventListener("blur", () => update(false));
|
|
16030
|
-
}
|
|
16031
|
-
function createRendererCodexAccountGroup(input) {
|
|
16032
|
-
const { ownerDocument: document2 } = input;
|
|
16033
|
-
const root = document2.createElement("div");
|
|
16034
|
-
root.dataset.codexAccountOptions = "true";
|
|
16035
|
-
root.hidden = true;
|
|
16036
|
-
const accountSection = document2.createElement("div");
|
|
16037
|
-
accountSection.setAttribute("role", "group");
|
|
16038
|
-
accountSection.setAttribute("aria-label", input.accountsLabel);
|
|
16039
|
-
accountSection.style.position = "relative";
|
|
16040
|
-
const header = document2.createElement("div");
|
|
16041
|
-
header.style.display = "flex";
|
|
16042
|
-
header.style.alignItems = "center";
|
|
16043
|
-
header.style.gap = "7px";
|
|
16044
|
-
header.style.height = "30px";
|
|
16045
|
-
header.style.padding = "0 34px 0 8px";
|
|
16046
|
-
header.style.color = "inherit";
|
|
16047
|
-
header.style.font = "600 12px/1 system-ui, sans-serif";
|
|
16048
|
-
header.style.opacity = "0.72";
|
|
16049
|
-
header.append(createRendererAgentIcon("codex", 16, document2), input.accountsLabel);
|
|
16050
|
-
const list = document2.createElement("div");
|
|
16051
|
-
list.style.display = "flex";
|
|
16052
|
-
list.style.flexDirection = "column";
|
|
16053
|
-
list.style.gap = "2px";
|
|
16054
|
-
list.style.maxHeight = "132px";
|
|
16055
|
-
list.style.marginBottom = "4px";
|
|
16056
|
-
list.style.paddingLeft = "14px";
|
|
16057
|
-
list.style.overflowY = "auto";
|
|
16058
|
-
list.style.scrollbarWidth = "thin";
|
|
16059
|
-
const manage = document2.createElement("button");
|
|
16060
|
-
manage.type = "button";
|
|
16061
|
-
manage.setAttribute("role", "menuitem");
|
|
16062
|
-
manage.setAttribute("aria-label", input.manageAccountsLabel);
|
|
16063
|
-
manage.title = input.manageAccountsLabel;
|
|
16064
|
-
manage.textContent = "\u2026";
|
|
16065
|
-
manage.style.position = "absolute";
|
|
16066
|
-
manage.style.top = "3px";
|
|
16067
|
-
manage.style.right = "4px";
|
|
16068
|
-
manage.style.display = "inline-flex";
|
|
16069
|
-
manage.style.alignItems = "center";
|
|
16070
|
-
manage.style.justifyContent = "center";
|
|
16071
|
-
manage.style.width = "24px";
|
|
16072
|
-
manage.style.height = "24px";
|
|
16073
|
-
manage.style.padding = "0";
|
|
16074
|
-
manage.style.color = "inherit";
|
|
16075
|
-
manage.style.background = "transparent";
|
|
16076
|
-
manage.style.border = "0";
|
|
16077
|
-
manage.style.borderRadius = "5px";
|
|
16078
|
-
manage.style.font = "600 16px/1 system-ui, sans-serif";
|
|
16079
|
-
manage.style.opacity = "0.56";
|
|
16080
|
-
manage.style.cursor = "pointer";
|
|
16081
|
-
manage.addEventListener("pointerenter", () => {
|
|
16082
|
-
manage.style.background = "rgba(127, 127, 127, 0.1)";
|
|
16083
|
-
manage.style.opacity = "1";
|
|
16084
|
-
});
|
|
16085
|
-
manage.addEventListener("pointerleave", () => {
|
|
16086
|
-
manage.style.background = "transparent";
|
|
16087
|
-
manage.style.opacity = "0.56";
|
|
16088
|
-
});
|
|
16089
|
-
manage.addEventListener("click", input.onManage);
|
|
16090
|
-
accountSection.append(header, list, manage);
|
|
16091
|
-
root.append(accountSection);
|
|
16092
|
-
const badge = document2.createElement("span");
|
|
16093
|
-
badge.setAttribute("aria-hidden", "true");
|
|
16094
|
-
badge.style.display = "none";
|
|
16095
|
-
badge.style.position = "absolute";
|
|
16096
|
-
badge.style.right = "1px";
|
|
16097
|
-
badge.style.bottom = "0";
|
|
16098
|
-
badge.style.width = "9px";
|
|
16099
|
-
badge.style.height = "9px";
|
|
16100
|
-
badge.style.border = "1.5px solid Canvas";
|
|
16101
|
-
badge.style.borderRadius = "50%";
|
|
16102
|
-
badge.style.pointerEvents = "none";
|
|
16103
|
-
const options = /* @__PURE__ */ new Map();
|
|
16104
|
-
let accounts = [];
|
|
16105
|
-
let presentationSignature = "";
|
|
16106
|
-
const rebuild = (nextAccounts) => {
|
|
16107
|
-
list.replaceChildren();
|
|
16108
|
-
options.clear();
|
|
16109
|
-
for (const account of nextAccounts) {
|
|
16110
|
-
const row = document2.createElement("div");
|
|
16111
|
-
const button = document2.createElement("button");
|
|
16112
|
-
button.type = "button";
|
|
16113
|
-
button.dataset.codexAccountId = account.accountId;
|
|
16114
|
-
button.setAttribute("role", "menuitemradio");
|
|
16115
|
-
button.style.display = "grid";
|
|
16116
|
-
button.style.gridTemplateColumns = "20px minmax(0, 1fr) 16px";
|
|
16117
|
-
button.style.alignItems = "center";
|
|
16118
|
-
button.style.gap = "7px";
|
|
16119
|
-
button.style.width = "100%";
|
|
16120
|
-
button.style.height = "32px";
|
|
16121
|
-
button.style.padding = "0 7px";
|
|
16122
|
-
button.style.color = "inherit";
|
|
16123
|
-
button.style.background = "transparent";
|
|
16124
|
-
button.style.border = "0";
|
|
16125
|
-
button.style.borderRadius = "5px";
|
|
16126
|
-
button.style.textAlign = "left";
|
|
16127
|
-
button.style.cursor = "pointer";
|
|
16128
|
-
setInteractiveHighlight(button);
|
|
16129
|
-
const avatar = document2.createElement("span");
|
|
16130
|
-
avatar.textContent = accountInitial(account);
|
|
16131
|
-
avatar.style.display = "inline-flex";
|
|
16132
|
-
avatar.style.alignItems = "center";
|
|
16133
|
-
avatar.style.justifyContent = "center";
|
|
16134
|
-
avatar.style.width = "20px";
|
|
16135
|
-
avatar.style.height = "20px";
|
|
16136
|
-
avatar.style.color = "#fff";
|
|
16137
|
-
avatar.style.background = accountColor(account.accountId);
|
|
16138
|
-
avatar.style.borderRadius = "50%";
|
|
16139
|
-
avatar.style.font = "700 10px/1 system-ui, sans-serif";
|
|
16140
|
-
const displayName = codexAccountDisplayName(account);
|
|
16141
|
-
const name = document2.createElement("span");
|
|
16142
|
-
name.style.display = "flex";
|
|
16143
|
-
name.style.alignItems = "baseline";
|
|
16144
|
-
name.style.minWidth = "0";
|
|
16145
|
-
name.style.gap = "4px";
|
|
16146
|
-
const local = document2.createElement("strong");
|
|
16147
|
-
local.textContent = displayName.local;
|
|
16148
|
-
local.style.minWidth = "0";
|
|
16149
|
-
local.style.overflow = "hidden";
|
|
16150
|
-
local.style.font = "600 13px/1 system-ui, sans-serif";
|
|
16151
|
-
local.style.textOverflow = "ellipsis";
|
|
16152
|
-
local.style.whiteSpace = "nowrap";
|
|
16153
|
-
name.append(local);
|
|
16154
|
-
if (displayName.domain) {
|
|
16155
|
-
const domain2 = document2.createElement("span");
|
|
16156
|
-
domain2.textContent = displayName.domain;
|
|
16157
|
-
domain2.style.maxWidth = "48%";
|
|
16158
|
-
domain2.style.overflow = "hidden";
|
|
16159
|
-
domain2.style.flex = "none";
|
|
16160
|
-
domain2.style.font = "400 11px/1 system-ui, sans-serif";
|
|
16161
|
-
domain2.style.opacity = "0.58";
|
|
16162
|
-
domain2.style.textOverflow = "ellipsis";
|
|
16163
|
-
domain2.style.whiteSpace = "nowrap";
|
|
16164
|
-
name.append(domain2);
|
|
16165
|
-
}
|
|
16166
|
-
const check2 = document2.createElement("span");
|
|
16167
|
-
check2.textContent = "\u2713";
|
|
16168
|
-
check2.setAttribute("aria-hidden", "true");
|
|
16169
|
-
check2.style.width = "16px";
|
|
16170
|
-
check2.style.textAlign = "center";
|
|
16171
|
-
check2.style.font = "600 14px/1 system-ui, sans-serif";
|
|
16172
|
-
check2.style.visibility = "hidden";
|
|
16173
|
-
button.title = displayName.full;
|
|
16174
|
-
button.setAttribute("aria-label", `${input.accountsLabel}: ${displayName.full}`);
|
|
16175
|
-
button.append(avatar, name, check2);
|
|
16176
|
-
button.addEventListener("click", () => input.onSelect(account.accountId));
|
|
16177
|
-
row.append(button);
|
|
16178
|
-
list.append(row);
|
|
16179
|
-
options.set(account.accountId, { row, button, check: check2, action: null });
|
|
16180
|
-
}
|
|
16181
|
-
presentationSignature = codexAccountPresentationSignature(nextAccounts);
|
|
16182
|
-
};
|
|
16183
|
-
const control = {
|
|
16184
|
-
root,
|
|
16185
|
-
badge,
|
|
16186
|
-
options,
|
|
16187
|
-
accounts,
|
|
16188
|
-
render({ accounts: nextAccounts, selectedAccountId, disabled, showBadge }) {
|
|
16189
|
-
const nextSignature = codexAccountPresentationSignature(nextAccounts);
|
|
16190
|
-
if (nextSignature !== presentationSignature) rebuild(nextAccounts);
|
|
16191
|
-
accounts = [...nextAccounts];
|
|
16192
|
-
control.accounts = accounts;
|
|
16193
|
-
root.hidden = accounts.length === 0;
|
|
16194
|
-
const selectedAccount = accounts.find(({ accountId }) => accountId === selectedAccountId);
|
|
16195
|
-
badge.style.display = showBadge && selectedAccount ? "block" : "none";
|
|
16196
|
-
if (selectedAccount) badge.style.background = accountColor(selectedAccount.accountId);
|
|
16197
|
-
for (const account of accounts) {
|
|
16198
|
-
const option = options.get(account.accountId);
|
|
16199
|
-
if (!option) continue;
|
|
16200
|
-
const selected = account.accountId === selectedAccountId;
|
|
16201
|
-
option.button.disabled = disabled;
|
|
16202
|
-
option.button.setAttribute("aria-checked", String(selected));
|
|
16203
|
-
option.button.setAttribute("aria-pressed", String(selected));
|
|
16204
|
-
option.button.style.background = selected ? "rgba(127, 127, 127, 0.16)" : "transparent";
|
|
16205
|
-
option.button.style.cursor = disabled ? "not-allowed" : "pointer";
|
|
16206
|
-
option.button.style.opacity = disabled && !selected ? "0.5" : "1";
|
|
16207
|
-
option.check.style.visibility = selected ? "visible" : "hidden";
|
|
16208
|
-
}
|
|
16209
|
-
}
|
|
16210
|
-
};
|
|
16211
|
-
return control;
|
|
16212
|
-
}
|
|
16213
|
-
|
|
16214
16072
|
// ../../node_modules/lucide/dist/esm/defaultAttributes.mjs
|
|
16215
16073
|
var defaultAttributes = {
|
|
16216
16074
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -16629,7 +16487,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16629
16487
|
antigravity: "https://antigravity.google/product/antigravity-cli",
|
|
16630
16488
|
"kiro-cli": "https://kiro.dev/docs/cli/",
|
|
16631
16489
|
codebuddy: "https://www.codebuddy.ai/docs/zh/cli/overview",
|
|
16632
|
-
"cursor-cli": "https://cursor.com/docs/cli/installation"
|
|
16490
|
+
"cursor-cli": "https://cursor.com/docs/cli/installation",
|
|
16491
|
+
hermes: "https://hermes-agent.nousresearch.com/docs"
|
|
16633
16492
|
});
|
|
16634
16493
|
function connectionStatusLabel(availability, messages, hasError = false) {
|
|
16635
16494
|
if (hasError && availability !== "notInstalled") return messages.connectionStatusError;
|
|
@@ -17446,9 +17305,8 @@ ${error51.stderrTail}`] : []
|
|
|
17446
17305
|
sessionImportRetryOpen: "Try opening again",
|
|
17447
17306
|
sessionImportRetrying: "Opening...",
|
|
17448
17307
|
connectionsDescription: "View runtime status by Host. Select an item to inspect details or complete its setup.",
|
|
17449
|
-
accountsDescription: "View accounts and limits across Agents, and manage your Codex default account.",
|
|
17450
17308
|
accountConnected: "Accounts",
|
|
17451
|
-
accountDefaultBadge: "
|
|
17309
|
+
accountDefaultBadge: "Current",
|
|
17452
17310
|
accountAdd: "Add Codex account",
|
|
17453
17311
|
accountColumnAccount: "Account",
|
|
17454
17312
|
accountColumnActions: "Manage",
|
|
@@ -17459,20 +17317,32 @@ ${error51.stderrTail}`] : []
|
|
|
17459
17317
|
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.",
|
|
17460
17318
|
accountMore: "Codex account actions",
|
|
17461
17319
|
accountDetailsClose: "Close account details",
|
|
17462
|
-
accountDefaultHint: "
|
|
17320
|
+
accountDefaultHint: "This is the current identity for all Codex Threads.",
|
|
17463
17321
|
accountCreditsRemaining: "Remaining",
|
|
17464
17322
|
accountCreditsLoading: "Loading limits\u2026",
|
|
17465
17323
|
accountCreditsEmpty: "No limit data available",
|
|
17466
17324
|
accountCreditsFailed: "Could not load limits",
|
|
17467
17325
|
accountCreditsRetry: "Retry",
|
|
17468
17326
|
accountCreditsRefresh: "Refresh limits",
|
|
17469
|
-
accountCreateFailed: "Could not add the Account.",
|
|
17470
17327
|
accountDelete: "Delete",
|
|
17471
17328
|
accountDeleteConfirm: "Delete this Account and its local data? This cannot be undone.",
|
|
17472
17329
|
accountDeleting: "Deleting Account...",
|
|
17473
17330
|
accountDeleteFailed: "Could not delete the Account.",
|
|
17474
|
-
|
|
17475
|
-
|
|
17331
|
+
accountUse: "Switch",
|
|
17332
|
+
accountLogout: "Sign out",
|
|
17333
|
+
accountLogoutConfirm: "Sign out the current Codex identity? Saved Accounts are retained.",
|
|
17334
|
+
accountLoggingOut: "Signing out...",
|
|
17335
|
+
accountLoggedOut: "Signed out. Saved Accounts are retained.",
|
|
17336
|
+
accountLogoutFailed: "Could not sign out the current Codex identity.",
|
|
17337
|
+
accountRecover: "Recover",
|
|
17338
|
+
accountRecovering: "Recovering Codex...",
|
|
17339
|
+
accountRecoveryRequired: "Codex Account recovery is required before work can continue.",
|
|
17340
|
+
accountLegacyCompatibility: "Native compatibility mode: Codex uses the existing official home. Account management is disabled. Other account homes and their history have not been merged; use the previous version to access them. No source data was migrated or deleted.",
|
|
17341
|
+
accountMigrationRequired: "Legacy Codex data requires migration before this layout can be used. Your data is preserved; use the previous version to access it. This is not a sign-in request.",
|
|
17342
|
+
accountCleanupRequired: "Account saved. Temporary file cleanup is incomplete.",
|
|
17343
|
+
accountSavedUnavailable: "Account saved. Codex is not ready yet.",
|
|
17344
|
+
accountRetryCleanup: "Retry cleanup",
|
|
17345
|
+
accountCleaningUp: "Retrying cleanup...",
|
|
17476
17346
|
accountSignIn: "Sign in",
|
|
17477
17347
|
accountSigningIn: "Starting device sign-in...",
|
|
17478
17348
|
accountVerificationDescription: "Open the verification page and enter this one-time code:",
|
|
@@ -17480,6 +17350,7 @@ ${error51.stderrTail}`] : []
|
|
|
17480
17350
|
accountCopied: "Copied",
|
|
17481
17351
|
accountLoginCancel: "Cancel sign-in",
|
|
17482
17352
|
accountLoginSucceeded: "Sign-in completed.",
|
|
17353
|
+
accountLoginResultUnconfirmed: "Sign-in finished, but its result was not received. Inspect the saved Account state.",
|
|
17483
17354
|
accountLoginFailed: "Sign-in failed.",
|
|
17484
17355
|
accountLoadFailed: "Could not load Codex Accounts.",
|
|
17485
17356
|
accountCreditsUsed: "Used",
|
|
@@ -17656,9 +17527,8 @@ ${error51.stderrTail}`] : []
|
|
|
17656
17527
|
sessionImportRetryOpen: "\u91CD\u8BD5\u6253\u5F00",
|
|
17657
17528
|
sessionImportRetrying: "\u6B63\u5728\u6253\u5F00\u2026\u2026",
|
|
17658
17529
|
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",
|
|
17659
|
-
accountsDescription: "\u67E5\u770B\u5404 Agent \u7684\u8D26\u53F7\u4E0E\u989D\u5EA6\uFF0C\u7BA1\u7406 Codex \u9ED8\u8BA4\u8D26\u53F7\u3002",
|
|
17660
17530
|
accountConnected: "\u8D26\u53F7",
|
|
17661
|
-
accountDefaultBadge: "
|
|
17531
|
+
accountDefaultBadge: "\u5F53\u524D",
|
|
17662
17532
|
accountAdd: "\u6DFB\u52A0 Codex \u8D26\u53F7",
|
|
17663
17533
|
accountColumnAccount: "\u8D26\u53F7",
|
|
17664
17534
|
accountColumnActions: "\u7BA1\u7406",
|
|
@@ -17669,20 +17539,32 @@ ${error51.stderrTail}`] : []
|
|
|
17669
17539
|
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",
|
|
17670
17540
|
accountMore: "Codex \u8D26\u53F7\u64CD\u4F5C",
|
|
17671
17541
|
accountDetailsClose: "\u5173\u95ED\u8D26\u53F7\u8BE6\u60C5",
|
|
17672
|
-
accountDefaultHint: "\
|
|
17542
|
+
accountDefaultHint: "\u6240\u6709 Codex \u4F1A\u8BDD\u5F53\u524D\u4F7F\u7528\u6B64\u8EAB\u4EFD\u3002",
|
|
17673
17543
|
accountCreditsRemaining: "\u5269\u4F59",
|
|
17674
17544
|
accountCreditsLoading: "\u6B63\u5728\u8BFB\u53D6\u989D\u5EA6\u2026",
|
|
17675
17545
|
accountCreditsEmpty: "\u6682\u65E0\u989D\u5EA6\u6570\u636E",
|
|
17676
17546
|
accountCreditsFailed: "\u989D\u5EA6\u8BFB\u53D6\u5931\u8D25",
|
|
17677
17547
|
accountCreditsRetry: "\u91CD\u8BD5",
|
|
17678
17548
|
accountCreditsRefresh: "\u5237\u65B0\u989D\u5EA6",
|
|
17679
|
-
accountCreateFailed: "\u6DFB\u52A0\u8D26\u53F7\u5931\u8D25\u3002",
|
|
17680
17549
|
accountDelete: "\u5220\u9664",
|
|
17681
17550
|
accountDeleteConfirm: "\u5220\u9664\u6B64\u8D26\u53F7\u53CA\u5176\u672C\u5730\u6570\u636E\uFF1F\u6B64\u64CD\u4F5C\u65E0\u6CD5\u64A4\u9500\u3002",
|
|
17682
17551
|
accountDeleting: "\u6B63\u5728\u5220\u9664\u8D26\u53F7...",
|
|
17683
17552
|
accountDeleteFailed: "\u5220\u9664\u8D26\u53F7\u5931\u8D25\u3002",
|
|
17684
|
-
|
|
17685
|
-
|
|
17553
|
+
accountUse: "\u5207\u6362",
|
|
17554
|
+
accountLogout: "\u9000\u51FA\u767B\u5F55",
|
|
17555
|
+
accountLogoutConfirm: "\u9000\u51FA\u5F53\u524D Codex \u8EAB\u4EFD\uFF1F\u5DF2\u4FDD\u5B58\u7684\u8D26\u53F7\u4F1A\u4FDD\u7559\u3002",
|
|
17556
|
+
accountLoggingOut: "\u6B63\u5728\u9000\u51FA\u767B\u5F55...",
|
|
17557
|
+
accountLoggedOut: "\u5DF2\u9000\u51FA\u767B\u5F55\uFF0C\u4FDD\u5B58\u7684\u8D26\u53F7\u4ECD\u4F1A\u4FDD\u7559\u3002",
|
|
17558
|
+
accountLogoutFailed: "\u65E0\u6CD5\u9000\u51FA\u5F53\u524D Codex \u8EAB\u4EFD\u3002",
|
|
17559
|
+
accountRecover: "\u6062\u590D",
|
|
17560
|
+
accountRecovering: "\u6B63\u5728\u6062\u590D Codex...",
|
|
17561
|
+
accountRecoveryRequired: "\u7EE7\u7EED\u5DE5\u4F5C\u524D\u9700\u8981\u6062\u590D Codex \u8D26\u53F7\u72B6\u6001\u3002",
|
|
17562
|
+
accountLegacyCompatibility: "\u539F\u751F\u517C\u5BB9\u6A21\u5F0F\uFF1A\u7EE7\u7EED\u4F7F\u7528\u539F\u6709\u5B98\u65B9\u76EE\u5F55\uFF0C\u8D26\u53F7\u7BA1\u7406\u6682\u4E0D\u53EF\u7528\u3002\u5176\u4ED6\u8D26\u53F7\u76EE\u5F55\u53CA\u5176\u5386\u53F2\u5C1A\u672A\u5408\u5E76\uFF0C\u8BF7\u4F7F\u7528\u65E7\u7248\u8BBF\u95EE\uFF1B\u6CA1\u6709\u8FC1\u79FB\u6216\u5220\u9664\u539F\u6570\u636E\u3002",
|
|
17563
|
+
accountMigrationRequired: "\u65E7 Codex \u6570\u636E\u5E03\u5C40\u9700\u8981\u8FC1\u79FB\u540E\u624D\u80FD\u4F7F\u7528\u3002\u539F\u6570\u636E\u5DF2\u4FDD\u7559\uFF0C\u8BF7\u4F7F\u7528\u65E7\u7248\u8BBF\u95EE\uFF1B\u8FD9\u4E0D\u662F\u8981\u6C42\u91CD\u65B0\u767B\u5F55\u3002",
|
|
17564
|
+
accountCleanupRequired: "\u8D26\u53F7\u5DF2\u4FDD\u5B58\uFF0C\u4E34\u65F6\u6587\u4EF6\u6E05\u7406\u672A\u5B8C\u6210\u3002",
|
|
17565
|
+
accountSavedUnavailable: "\u8D26\u53F7\u5DF2\u4FDD\u5B58\uFF0CCodex \u5C1A\u672A\u5C31\u7EEA\u3002",
|
|
17566
|
+
accountRetryCleanup: "\u91CD\u8BD5\u6E05\u7406",
|
|
17567
|
+
accountCleaningUp: "\u6B63\u5728\u91CD\u8BD5\u6E05\u7406...",
|
|
17686
17568
|
accountSignIn: "\u767B\u5F55",
|
|
17687
17569
|
accountSigningIn: "\u6B63\u5728\u542F\u52A8\u8BBE\u5907\u767B\u5F55...",
|
|
17688
17570
|
accountVerificationDescription: "\u6253\u5F00\u9A8C\u8BC1\u9875\u9762\u5E76\u8F93\u5165\u4EE5\u4E0B\u4E00\u6B21\u6027\u4EE3\u7801\uFF1A",
|
|
@@ -17690,6 +17572,7 @@ ${error51.stderrTail}`] : []
|
|
|
17690
17572
|
accountCopied: "\u5DF2\u590D\u5236",
|
|
17691
17573
|
accountLoginCancel: "\u53D6\u6D88\u767B\u5F55",
|
|
17692
17574
|
accountLoginSucceeded: "\u767B\u5F55\u6210\u529F\u3002",
|
|
17575
|
+
accountLoginResultUnconfirmed: "\u767B\u5F55\u5DF2\u7ED3\u675F\uFF0C\u4F46\u672A\u6536\u5230\u7ED3\u679C\u3002\u8BF7\u68C0\u67E5\u5DF2\u4FDD\u5B58\u7684\u8D26\u53F7\u72B6\u6001\u3002",
|
|
17693
17576
|
accountLoginFailed: "\u767B\u5F55\u5931\u8D25\u3002",
|
|
17694
17577
|
accountLoadFailed: "\u65E0\u6CD5\u52A0\u8F7D Codex \u8D26\u53F7\u3002",
|
|
17695
17578
|
accountCreditsUsed: "\u5DF2\u7528",
|
|
@@ -17845,8 +17728,6 @@ ${error51.stderrTail}`] : []
|
|
|
17845
17728
|
const messages = rendererSettingsMessages(resolveRendererSettingsLocale(languages));
|
|
17846
17729
|
return {
|
|
17847
17730
|
...messages,
|
|
17848
|
-
codexAccountsLabel: "Codex",
|
|
17849
|
-
manageCodexAccountsLabel: messages.locale === "zh-CN" ? "\u7BA1\u7406 Codex \u8D26\u53F7" : "Manage Codex Accounts",
|
|
17850
17731
|
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"
|
|
17851
17732
|
};
|
|
17852
17733
|
}
|
|
@@ -17867,7 +17748,8 @@ ${error51.stderrTail}`] : []
|
|
|
17867
17748
|
antigravity: "https://antigravity.google/product/antigravity-cli",
|
|
17868
17749
|
"kiro-cli": "https://kiro.dev/docs/cli/",
|
|
17869
17750
|
codebuddy: "https://www.codebuddy.ai/docs/zh/cli/overview",
|
|
17870
|
-
"cursor-cli": "https://cursor.com/docs/cli/installation"
|
|
17751
|
+
"cursor-cli": "https://cursor.com/docs/cli/installation",
|
|
17752
|
+
hermes: "https://hermes-agent.nousresearch.com/docs"
|
|
17871
17753
|
};
|
|
17872
17754
|
var CONTROL_ATTRIBUTE = "data-codexhost-agent-control";
|
|
17873
17755
|
var AGENT_MENU_WIDTH = 224;
|
|
@@ -17889,7 +17771,7 @@ ${error51.stderrTail}`] : []
|
|
|
17889
17771
|
const account = state.agent === "codex" && activeAccount ? ` \xB7 ${activeAccount.email ?? activeAccount.label}` : "";
|
|
17890
17772
|
return `Agent: ${RENDERER_AGENT_LABELS[state.agent]}${account}${state.phase === "locked" ? " (locked)" : ""}`;
|
|
17891
17773
|
}
|
|
17892
|
-
function rendererAgentPickerView(state, adapterState, switching, agents, availability = {}
|
|
17774
|
+
function rendererAgentPickerView(state, adapterState, switching, agents, availability = {}) {
|
|
17893
17775
|
const optionDisabled = Object.fromEntries(
|
|
17894
17776
|
agents.map((agent) => [
|
|
17895
17777
|
agent,
|
|
@@ -17904,7 +17786,7 @@ ${error51.stderrTail}`] : []
|
|
|
17904
17786
|
);
|
|
17905
17787
|
return {
|
|
17906
17788
|
label: RENDERER_AGENT_LABELS[state.agent],
|
|
17907
|
-
triggerDisabled: switching || state.phase === "locked" || agents.length < 2
|
|
17789
|
+
triggerDisabled: switching || state.phase === "locked" || agents.length < 2,
|
|
17908
17790
|
nativeModelHidden: switching || state.agent !== "codex",
|
|
17909
17791
|
optionDisabled,
|
|
17910
17792
|
downloadVisible,
|
|
@@ -17929,7 +17811,7 @@ ${error51.stderrTail}`] : []
|
|
|
17929
17811
|
return !menu.hidden;
|
|
17930
17812
|
}
|
|
17931
17813
|
}
|
|
17932
|
-
function mountRendererAgentPicker(composerId, enabledAgents, onSelect, onDownload,
|
|
17814
|
+
function mountRendererAgentPicker(composerId, enabledAgents, onSelect, onDownload, onOpen, groupPreference = getSharedAgentGroupPreferenceStore()) {
|
|
17933
17815
|
const root = document.createElement("div");
|
|
17934
17816
|
root.setAttribute(CONTROL_ATTRIBUTE, composerId);
|
|
17935
17817
|
root.style.display = "inline-flex";
|
|
@@ -18016,23 +17898,6 @@ ${error51.stderrTail}`] : []
|
|
|
18016
17898
|
else menu.hidden = true;
|
|
18017
17899
|
trigger.setAttribute("aria-expanded", "false");
|
|
18018
17900
|
};
|
|
18019
|
-
const codexAccountGroup = createRendererCodexAccountGroup({
|
|
18020
|
-
ownerDocument: document,
|
|
18021
|
-
accountsLabel: groupMessages.codexAccountsLabel,
|
|
18022
|
-
manageAccountsLabel: groupMessages.manageCodexAccountsLabel,
|
|
18023
|
-
onSelect(accountId) {
|
|
18024
|
-
close();
|
|
18025
|
-
trigger.focus();
|
|
18026
|
-
onSelectCodexAccount(accountId);
|
|
18027
|
-
},
|
|
18028
|
-
onManage() {
|
|
18029
|
-
close();
|
|
18030
|
-
openSettingsPage("accounts", trigger);
|
|
18031
|
-
}
|
|
18032
|
-
});
|
|
18033
|
-
const codexAccountOptions = codexAccountGroup.options;
|
|
18034
|
-
const codexAccountContainer = codexAccountGroup.root;
|
|
18035
|
-
trigger.append(codexAccountGroup.badge);
|
|
18036
17901
|
const focusOption = (position) => {
|
|
18037
17902
|
const available = [
|
|
18038
17903
|
...menu.querySelectorAll('[role="menuitemradio"], [role="menuitem"]')
|
|
@@ -18264,7 +18129,6 @@ ${error51.stderrTail}`] : []
|
|
|
18264
18129
|
for (const agent of mainAgents) {
|
|
18265
18130
|
const row = rowsByAgent.get(agent);
|
|
18266
18131
|
if (row) mainChildren.push(row);
|
|
18267
|
-
if (agent === "codex") mainChildren.push(codexAccountContainer);
|
|
18268
18132
|
}
|
|
18269
18133
|
mainGroup.replaceChildren(...mainChildren);
|
|
18270
18134
|
moreRows.replaceChildren(
|
|
@@ -18336,11 +18200,6 @@ ${error51.stderrTail}`] : []
|
|
|
18336
18200
|
menu,
|
|
18337
18201
|
agents: [...enabledAgents],
|
|
18338
18202
|
options,
|
|
18339
|
-
codexAccounts: [],
|
|
18340
|
-
codexAccountOptions,
|
|
18341
|
-
codexAccountContainer,
|
|
18342
|
-
codexAccountGroup,
|
|
18343
|
-
selectCodexAccount: onSelectCodexAccount,
|
|
18344
18203
|
close,
|
|
18345
18204
|
dispose() {
|
|
18346
18205
|
close();
|
|
@@ -18356,17 +18215,13 @@ ${error51.stderrTail}`] : []
|
|
|
18356
18215
|
};
|
|
18357
18216
|
return control;
|
|
18358
18217
|
}
|
|
18359
|
-
function renderRendererAgentPicker(control, state, adapterState, switching, availability = {},
|
|
18360
|
-
control.codexAccounts = [...codexAccounts];
|
|
18361
|
-
const codexOption = control.options.codex;
|
|
18362
|
-
if (codexOption) codexOption.row.hidden = codexAccounts.length > 0;
|
|
18218
|
+
function renderRendererAgentPicker(control, state, adapterState, switching, availability = {}, currentCodexAccount = null, ownershipError = false) {
|
|
18363
18219
|
const view = rendererAgentPickerView(
|
|
18364
18220
|
state,
|
|
18365
18221
|
adapterState,
|
|
18366
18222
|
switching,
|
|
18367
18223
|
control.agents,
|
|
18368
|
-
availability
|
|
18369
|
-
codexAccounts.length
|
|
18224
|
+
availability
|
|
18370
18225
|
);
|
|
18371
18226
|
if (control.iconSlot.dataset.agent !== state.agent) {
|
|
18372
18227
|
control.iconSlot.replaceChildren(createRendererAgentIcon(state.agent));
|
|
@@ -18378,14 +18233,7 @@ ${error51.stderrTail}`] : []
|
|
|
18378
18233
|
"aria-label",
|
|
18379
18234
|
ownershipError ? pickerGroupMessages().ownershipErrorLabel : state.phase === "locked" ? `Agent: ${view.label}` : `Select Agent, current ${view.label}`
|
|
18380
18235
|
);
|
|
18381
|
-
|
|
18382
|
-
control.codexAccountGroup.render({
|
|
18383
|
-
accounts: codexAccounts,
|
|
18384
|
-
selectedAccountId: state.agent === "codex" ? activeAccount?.accountId ?? null : null,
|
|
18385
|
-
disabled: switching || state.phase === "locked",
|
|
18386
|
-
showBadge: state.agent === "codex" && codexAccounts.length > 1
|
|
18387
|
-
});
|
|
18388
|
-
control.trigger.title = ownershipError ? pickerGroupMessages().ownershipErrorLabel : rendererAgentPickerTooltip(state, activeAccount);
|
|
18236
|
+
control.trigger.title = ownershipError ? pickerGroupMessages().ownershipErrorLabel : rendererAgentPickerTooltip(state, currentCodexAccount ?? void 0);
|
|
18389
18237
|
control.trigger.style.cursor = control.trigger.disabled ? "not-allowed" : "pointer";
|
|
18390
18238
|
control.trigger.style.opacity = control.trigger.disabled && !switching ? "0.72" : "1";
|
|
18391
18239
|
control.iconSlot.style.display = switching || ownershipError ? "none" : "inline-flex";
|
|
@@ -21015,7 +20863,7 @@ ${error51.stderrTail}`] : []
|
|
|
21015
20863
|
setNativeControlHidden(control.nativeContextUsageControl, false);
|
|
21016
20864
|
setNativeControlHidden(control.nativePermissionModeControl, hidePermissionMode);
|
|
21017
20865
|
}
|
|
21018
|
-
function mountComposerAgentControl(composer, composerId, sendButton, enabledAgents, onSelect, onDownload,
|
|
20866
|
+
function mountComposerAgentControl(composer, composerId, sendButton, enabledAgents, onSelect, onDownload, onOpenProviderPicker, onSelectModel, onSelectThinking, onSelectPermissionMode, onSelectCommand) {
|
|
21019
20867
|
const nativeModelControl = captureNativeControl(nativeModelControlForComposer(composer));
|
|
21020
20868
|
const nativeContextUsageControl = captureNativeControl(
|
|
21021
20869
|
nativeContextUsageControlForComposer(composer)
|
|
@@ -21028,7 +20876,6 @@ ${error51.stderrTail}`] : []
|
|
|
21028
20876
|
enabledAgents,
|
|
21029
20877
|
onSelect,
|
|
21030
20878
|
onDownload,
|
|
21031
|
-
onSelectCodexAccount,
|
|
21032
20879
|
onOpenProviderPicker
|
|
21033
20880
|
);
|
|
21034
20881
|
const modelPicker = mountRendererModelPicker(composerId, onSelectModel, onSelectThinking);
|
|
@@ -21072,7 +20919,7 @@ ${error51.stderrTail}`] : []
|
|
|
21072
20919
|
refreshCreditsPlacement(control);
|
|
21073
20920
|
return control;
|
|
21074
20921
|
}
|
|
21075
|
-
function renderComposerAgentControl(control, state, adapterState, switching, availability = {}, modelView = { status: "idle" }, permissionModeView = { status: "idle" }, usage = null, accountCredits = null, locale = "en",
|
|
20922
|
+
function renderComposerAgentControl(control, state, adapterState, switching, availability = {}, modelView = { status: "idle" }, permissionModeView = { status: "idle" }, usage = null, accountCredits = null, locale = "en", currentCodexAccount = null, ownershipError = false) {
|
|
21076
20923
|
if (control.usage === null) {
|
|
21077
20924
|
control.usage = mountRendererUsageControl(control.composerId, locale);
|
|
21078
20925
|
}
|
|
@@ -21099,7 +20946,7 @@ ${error51.stderrTail}`] : []
|
|
|
21099
20946
|
adapterState,
|
|
21100
20947
|
switching,
|
|
21101
20948
|
availability,
|
|
21102
|
-
|
|
20949
|
+
currentCodexAccount,
|
|
21103
20950
|
ownershipError
|
|
21104
20951
|
);
|
|
21105
20952
|
reconcileComposerNativeControls(
|
|
@@ -21115,7 +20962,7 @@ ${error51.stderrTail}`] : []
|
|
|
21115
20962
|
permissionModeVisible,
|
|
21116
20963
|
locale
|
|
21117
20964
|
);
|
|
21118
|
-
const selectedCodexAccount = state.agent === "codex" && !ownershipError ?
|
|
20965
|
+
const selectedCodexAccount = state.agent === "codex" && !ownershipError ? currentCodexAccount : void 0;
|
|
21119
20966
|
if (control.usage) {
|
|
21120
20967
|
renderRendererUsageControl(
|
|
21121
20968
|
control.usage,
|
|
@@ -21192,40 +21039,132 @@ ${error51.stderrTail}`] : []
|
|
|
21192
21039
|
}
|
|
21193
21040
|
|
|
21194
21041
|
// src/renderer-codex-account-state.ts
|
|
21195
|
-
function
|
|
21196
|
-
|
|
21197
|
-
|
|
21198
|
-
|
|
21199
|
-
|
|
21200
|
-
|
|
21201
|
-
|
|
21202
|
-
|
|
21042
|
+
function resolveCurrentCodexAccountId(accounts, currentAccountId) {
|
|
21043
|
+
return accounts.some((account) => account.accountId === currentAccountId) ? currentAccountId : null;
|
|
21044
|
+
}
|
|
21045
|
+
function shouldApplyCodexAccountSnapshot(current, next) {
|
|
21046
|
+
if (!current) return true;
|
|
21047
|
+
if (next.instanceId !== void 0 && next.instanceId !== current.instanceId) return true;
|
|
21048
|
+
if (current.instanceId !== void 0 && next.instanceId === void 0) return false;
|
|
21049
|
+
return next.revision >= current.revision;
|
|
21203
21050
|
}
|
|
21204
21051
|
var RendererCodexAccountState = class {
|
|
21205
|
-
constructor(client) {
|
|
21052
|
+
constructor(client, changed = () => void 0) {
|
|
21206
21053
|
this.client = client;
|
|
21054
|
+
let unsubscribe;
|
|
21055
|
+
try {
|
|
21056
|
+
unsubscribe = client.subscribeCodexAccounts?.((state) => {
|
|
21057
|
+
if (this.#apply(state)) changed();
|
|
21058
|
+
});
|
|
21059
|
+
} catch {
|
|
21060
|
+
}
|
|
21061
|
+
this.#unsubscribe = unsubscribe;
|
|
21207
21062
|
}
|
|
21208
21063
|
client;
|
|
21209
21064
|
accounts = [];
|
|
21210
|
-
|
|
21065
|
+
currentAccountId = null;
|
|
21066
|
+
phase = "unavailable";
|
|
21067
|
+
revision = 0;
|
|
21068
|
+
instanceId;
|
|
21069
|
+
cleanupRequired = false;
|
|
21070
|
+
pendingOperation;
|
|
21071
|
+
capabilities = {
|
|
21072
|
+
manage: false,
|
|
21073
|
+
switch: false,
|
|
21074
|
+
login: false,
|
|
21075
|
+
delete: false
|
|
21076
|
+
};
|
|
21211
21077
|
switching = false;
|
|
21078
|
+
#hasSnapshot = false;
|
|
21212
21079
|
#request = null;
|
|
21213
|
-
|
|
21214
|
-
|
|
21080
|
+
#unsubscribe;
|
|
21081
|
+
get readyAccountId() {
|
|
21082
|
+
return resolveCurrentCodexAccountId(
|
|
21083
|
+
this.accounts,
|
|
21084
|
+
this.phase === "ready" ? this.currentAccountId : null
|
|
21085
|
+
);
|
|
21215
21086
|
}
|
|
21216
21087
|
refresh() {
|
|
21217
21088
|
if (this.#request) return this.#request;
|
|
21218
21089
|
this.#request = Promise.resolve().then(() => this.client.listCodexAccounts()).then((result) => {
|
|
21219
|
-
this
|
|
21220
|
-
this.overrideAccountId = this.selection.overrideAccountId;
|
|
21090
|
+
this.#apply(result);
|
|
21221
21091
|
}).catch(() => {
|
|
21222
21092
|
}).finally(() => {
|
|
21223
21093
|
this.#request = null;
|
|
21224
21094
|
});
|
|
21225
21095
|
return this.#request;
|
|
21226
21096
|
}
|
|
21097
|
+
dispose() {
|
|
21098
|
+
this.#unsubscribe?.();
|
|
21099
|
+
}
|
|
21100
|
+
#apply(result) {
|
|
21101
|
+
if (!shouldApplyCodexAccountSnapshot(
|
|
21102
|
+
this.#hasSnapshot ? { instanceId: this.instanceId, revision: this.revision } : null,
|
|
21103
|
+
result
|
|
21104
|
+
)) {
|
|
21105
|
+
return false;
|
|
21106
|
+
}
|
|
21107
|
+
this.#hasSnapshot = true;
|
|
21108
|
+
this.accounts = result.accounts;
|
|
21109
|
+
this.currentAccountId = result.currentAccountId;
|
|
21110
|
+
this.phase = result.phase;
|
|
21111
|
+
this.revision = result.revision;
|
|
21112
|
+
this.instanceId = result.instanceId;
|
|
21113
|
+
this.cleanupRequired = result.cleanupRequired ?? false;
|
|
21114
|
+
this.pendingOperation = result.pendingOperation;
|
|
21115
|
+
this.capabilities = result.capabilities;
|
|
21116
|
+
this.switching = result.phase === "changing";
|
|
21117
|
+
return true;
|
|
21118
|
+
}
|
|
21227
21119
|
};
|
|
21228
21120
|
|
|
21121
|
+
// ../desktop-control/dist/renderer-react-ownership.js
|
|
21122
|
+
function committedReactAncestors(value) {
|
|
21123
|
+
const MAX_VISITED_FIBERS = 2e4;
|
|
21124
|
+
const fiber = (value2) => typeof value2 === "object" && value2 !== null ? value2 : null;
|
|
21125
|
+
const first = fiber(value);
|
|
21126
|
+
if (!first)
|
|
21127
|
+
return [];
|
|
21128
|
+
const previous = [];
|
|
21129
|
+
const seen = /* @__PURE__ */ new Set();
|
|
21130
|
+
for (let node = first; node; node = fiber(node.return)) {
|
|
21131
|
+
if (seen.has(node) || seen.size >= MAX_VISITED_FIBERS)
|
|
21132
|
+
return [];
|
|
21133
|
+
seen.add(node);
|
|
21134
|
+
previous.push(node);
|
|
21135
|
+
}
|
|
21136
|
+
const rootState = fiber(previous.at(-1)?.stateNode);
|
|
21137
|
+
if (!rootState || !("current" in rootState))
|
|
21138
|
+
return previous;
|
|
21139
|
+
const current = fiber(rootState.current);
|
|
21140
|
+
if (!current)
|
|
21141
|
+
return [];
|
|
21142
|
+
const stack = [{ node: current, parent: null }];
|
|
21143
|
+
const alternate = fiber(first.alternate);
|
|
21144
|
+
seen.clear();
|
|
21145
|
+
while (stack.length > 0 && seen.size < MAX_VISITED_FIBERS) {
|
|
21146
|
+
const entry = stack.pop();
|
|
21147
|
+
if (!entry)
|
|
21148
|
+
break;
|
|
21149
|
+
if (seen.has(entry.node))
|
|
21150
|
+
return [];
|
|
21151
|
+
seen.add(entry.node);
|
|
21152
|
+
if (entry.node === first || entry.node === alternate) {
|
|
21153
|
+
const ancestors = [];
|
|
21154
|
+
for (let cursor = entry; cursor; cursor = cursor.parent)
|
|
21155
|
+
ancestors.push(cursor.node);
|
|
21156
|
+
return ancestors;
|
|
21157
|
+
}
|
|
21158
|
+
const sibling = entry.parent && fiber(entry.node.sibling);
|
|
21159
|
+
if (sibling)
|
|
21160
|
+
stack.push({ node: sibling, parent: entry.parent });
|
|
21161
|
+
const child = fiber(entry.node.child);
|
|
21162
|
+
if (child)
|
|
21163
|
+
stack.push({ node: child, parent: entry });
|
|
21164
|
+
}
|
|
21165
|
+
return [];
|
|
21166
|
+
}
|
|
21167
|
+
|
|
21229
21168
|
// src/renderer-request-sender.ts
|
|
21230
21169
|
var RendererMethodUnavailableError = class extends Error {
|
|
21231
21170
|
constructor(method, cause) {
|
|
@@ -21320,6 +21259,7 @@ ${error51.stderrTail}`] : []
|
|
|
21320
21259
|
if (ownership.harnessId === "kiro-cli") return "kiro-cli";
|
|
21321
21260
|
if (ownership.harnessId === "codebuddy") return "codebuddy";
|
|
21322
21261
|
if (ownership.harnessId === "cursor-cli") return "cursor-cli";
|
|
21262
|
+
if (ownership.harnessId === "hermes") return "hermes";
|
|
21323
21263
|
return null;
|
|
21324
21264
|
}
|
|
21325
21265
|
var BrowserSidebarAgentIconRow = class {
|
|
@@ -22080,6 +22020,8 @@ ${error51.stderrTail}`] : []
|
|
|
22080
22020
|
// src/renderer-model-client.ts
|
|
22081
22021
|
var HARNESS_INSPECT_METHOD = "codexhost/harness/inspect";
|
|
22082
22022
|
var HARNESS_PLUGIN_LIST_METHOD = "codexhost/harness/plugins/list";
|
|
22023
|
+
var HARNESS_ACCOUNT_SOURCES_METHOD = "codexhost/harness/accounts/sources";
|
|
22024
|
+
var HARNESS_ACCOUNT_INSPECT_METHOD = "codexhost/harness/accounts/inspect";
|
|
22083
22025
|
var HARNESS_WEB_UI_OPEN_METHOD = "codexhost/harness/web-ui/open";
|
|
22084
22026
|
var THREAD_FORK_METHOD = "codexhost/thread/fork";
|
|
22085
22027
|
var THREAD_INSPECT_METHOD = "codexhost/thread/inspect";
|
|
@@ -22098,12 +22040,14 @@ ${error51.stderrTail}`] : []
|
|
|
22098
22040
|
var UPDATE_STATUS_METHOD = "codexhost/update/status";
|
|
22099
22041
|
var CODEX_ACCOUNT_LIST_METHOD = "codexhost/account/list";
|
|
22100
22042
|
var CODEX_ACCOUNT_REFRESH_METHOD = "codexhost/account/refresh";
|
|
22101
|
-
var CODEX_ACCOUNT_CREATE_METHOD = "codexhost/account/create";
|
|
22102
22043
|
var CODEX_ACCOUNT_DELETE_METHOD = "codexhost/account/delete";
|
|
22103
|
-
var
|
|
22044
|
+
var CODEX_ACCOUNT_SWITCH_METHOD = "codexhost/account/switch";
|
|
22045
|
+
var CODEX_ACCOUNT_CHANGED_METHOD = "codexhost/account/changed";
|
|
22104
22046
|
var CODEX_ACCOUNT_LOGIN_START_METHOD = "codexhost/account/login/start";
|
|
22105
22047
|
var CODEX_ACCOUNT_LOGIN_CANCEL_METHOD = "codexhost/account/login/cancel";
|
|
22106
22048
|
var CODEX_ACCOUNT_LOGIN_COMPLETED_METHOD = "codexhost/account/login/completed";
|
|
22049
|
+
var CODEX_ACCOUNT_LOGOUT_METHOD = "codexhost/account/logout";
|
|
22050
|
+
var CODEX_ACCOUNT_RECOVER_METHOD = "codexhost/account/recover";
|
|
22107
22051
|
var CODEX_ACCOUNT_RESET_CREDIT_CONSUME_METHOD = "codexhost/account/rate-limit-reset/consume";
|
|
22108
22052
|
function isRecord6(value) {
|
|
22109
22053
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -22319,9 +22263,25 @@ ${error51.stderrTail}`] : []
|
|
|
22319
22263
|
);
|
|
22320
22264
|
return codexAccountResetCreditConsumeResultSchema.parse(result);
|
|
22321
22265
|
},
|
|
22322
|
-
async
|
|
22266
|
+
async listHarnessAccountSources() {
|
|
22267
|
+
return harnessAccountSourceListResultSchema.parse(
|
|
22268
|
+
await manager.sendRequest(HARNESS_ACCOUNT_SOURCES_METHOD, {})
|
|
22269
|
+
);
|
|
22270
|
+
},
|
|
22271
|
+
async inspectHarnessAccount(input) {
|
|
22272
|
+
return harnessAccountInspectResultSchema.parse(
|
|
22273
|
+
await manager.sendRequest(
|
|
22274
|
+
HARNESS_ACCOUNT_INSPECT_METHOD,
|
|
22275
|
+
harnessAccountInspectParamsSchema.parse(input)
|
|
22276
|
+
)
|
|
22277
|
+
);
|
|
22278
|
+
},
|
|
22279
|
+
async listHarnessAccounts(input = {}) {
|
|
22323
22280
|
return harnessAccountListResultSchema.parse(
|
|
22324
|
-
await manager.sendRequest(
|
|
22281
|
+
await manager.sendRequest(
|
|
22282
|
+
"codexhost/harness/accounts/list",
|
|
22283
|
+
harnessAccountListParamsSchema.parse(input)
|
|
22284
|
+
)
|
|
22325
22285
|
);
|
|
22326
22286
|
},
|
|
22327
22287
|
async listCodexAccounts() {
|
|
@@ -22332,13 +22292,6 @@ ${error51.stderrTail}`] : []
|
|
|
22332
22292
|
const result = await manager.sendRequest(CODEX_ACCOUNT_REFRESH_METHOD, {});
|
|
22333
22293
|
return codexAccountListResultSchema.parse(result);
|
|
22334
22294
|
},
|
|
22335
|
-
async createCodexAccount(input) {
|
|
22336
|
-
const result = await manager.sendRequest(
|
|
22337
|
-
CODEX_ACCOUNT_CREATE_METHOD,
|
|
22338
|
-
codexAccountCreateParamsSchema.parse(input)
|
|
22339
|
-
);
|
|
22340
|
-
return codexAccountMutationResultSchema.parse(result);
|
|
22341
|
-
},
|
|
22342
22295
|
async deleteCodexAccount(input) {
|
|
22343
22296
|
const result = await manager.sendRequest(
|
|
22344
22297
|
CODEX_ACCOUNT_DELETE_METHOD,
|
|
@@ -22346,12 +22299,37 @@ ${error51.stderrTail}`] : []
|
|
|
22346
22299
|
);
|
|
22347
22300
|
return codexAccountDeleteResultSchema.parse(result);
|
|
22348
22301
|
},
|
|
22349
|
-
async
|
|
22302
|
+
async switchCodexAccount(input) {
|
|
22303
|
+
const result = await manager.sendRequest(
|
|
22304
|
+
CODEX_ACCOUNT_SWITCH_METHOD,
|
|
22305
|
+
codexAccountSwitchParamsSchema.parse(input)
|
|
22306
|
+
);
|
|
22307
|
+
return codexAccountSwitchResultSchema.parse(result);
|
|
22308
|
+
},
|
|
22309
|
+
async logoutCodexAccount(input = {}) {
|
|
22310
|
+
const result = await manager.sendRequest(
|
|
22311
|
+
CODEX_ACCOUNT_LOGOUT_METHOD,
|
|
22312
|
+
codexAccountLogoutParamsSchema.parse(input)
|
|
22313
|
+
);
|
|
22314
|
+
return codexAccountLogoutResultSchema.parse(result);
|
|
22315
|
+
},
|
|
22316
|
+
async recoverCodexAccounts(input = {}) {
|
|
22350
22317
|
const result = await manager.sendRequest(
|
|
22351
|
-
|
|
22352
|
-
|
|
22318
|
+
CODEX_ACCOUNT_RECOVER_METHOD,
|
|
22319
|
+
codexAccountRecoverParamsSchema.parse(input)
|
|
22353
22320
|
);
|
|
22354
|
-
return
|
|
22321
|
+
return codexAccountRecoverResultSchema.parse(result);
|
|
22322
|
+
},
|
|
22323
|
+
subscribeCodexAccounts(listener) {
|
|
22324
|
+
const notifications = notificationTarget(source);
|
|
22325
|
+
if (!notifications?.addNotificationCallback) {
|
|
22326
|
+
throw new Error("Renderer Account notification callback is unavailable");
|
|
22327
|
+
}
|
|
22328
|
+
return notifications.addNotificationCallback(CODEX_ACCOUNT_CHANGED_METHOD, (notification) => {
|
|
22329
|
+
if (!isRecord6(notification) || notification.method !== CODEX_ACCOUNT_CHANGED_METHOD) return;
|
|
22330
|
+
const state = codexAccountChangedSchema.safeParse(notification.params);
|
|
22331
|
+
if (state.success) listener(state.data);
|
|
22332
|
+
});
|
|
22355
22333
|
},
|
|
22356
22334
|
async startCodexAccountLogin(input) {
|
|
22357
22335
|
const result = await manager.sendRequest(
|
|
@@ -22401,6 +22379,13 @@ ${error51.stderrTail}`] : []
|
|
|
22401
22379
|
var OMP_TRANSPORT_MODEL_PREFIX = `${OMP_TRANSPORT_MODEL_ID}@`;
|
|
22402
22380
|
var ANTIGRAVITY_TRANSPORT_MODEL_ID = "codexhost/antigravity-native";
|
|
22403
22381
|
var ANTIGRAVITY_TRANSPORT_MODEL_PREFIX = `${ANTIGRAVITY_TRANSPORT_MODEL_ID}@`;
|
|
22382
|
+
function hermesTransportModelId(model, permissionModeId) {
|
|
22383
|
+
return encodeHarnessPluginRoute({
|
|
22384
|
+
harnessId: harnessIdSchema.parse("hermes"),
|
|
22385
|
+
...model ? { model: harnessModelRefSchema.parse(model) } : {},
|
|
22386
|
+
...permissionModeId ? { permissionModeId: harnessPermissionModeIdSchema.parse(permissionModeId) } : {}
|
|
22387
|
+
});
|
|
22388
|
+
}
|
|
22404
22389
|
function transitionRendererAdapterStatus(current, next, publish) {
|
|
22405
22390
|
if (current.state === next.state && current.reason === next.reason && current.hook === next.hook) {
|
|
22406
22391
|
return false;
|
|
@@ -22702,17 +22687,13 @@ ${error51.stderrTail}`] : []
|
|
|
22702
22687
|
return [];
|
|
22703
22688
|
}
|
|
22704
22689
|
const targets = /* @__PURE__ */ new Set();
|
|
22705
|
-
|
|
22706
|
-
for (let depth = 0; depth < 200; depth += 1) {
|
|
22690
|
+
for (const fiber of committedReactAncestors(firstFiber2)) {
|
|
22707
22691
|
let hook = fiber.memoizedState;
|
|
22708
22692
|
for (let hookIndex = 0; hook && hookIndex < 100; hookIndex += 1) {
|
|
22709
22693
|
const owner = requestTargetOwnerFromHookState(hook.memoizedState);
|
|
22710
22694
|
if (owner) targets.add(owner);
|
|
22711
22695
|
hook = typeof hook.next === "object" && hook.next !== null ? hook.next : null;
|
|
22712
22696
|
}
|
|
22713
|
-
const parent = fiber.return;
|
|
22714
|
-
if (typeof parent !== "object" && typeof parent !== "function" || parent === null) break;
|
|
22715
|
-
fiber = parent;
|
|
22716
22697
|
}
|
|
22717
22698
|
return [...targets];
|
|
22718
22699
|
}
|
|
@@ -22890,7 +22871,7 @@ ${error51.stderrTail}`] : []
|
|
|
22890
22871
|
...model ? { model } : {},
|
|
22891
22872
|
...thinkingOptionId && agent !== "cursor-cli" ? { thinkingOptionId } : {},
|
|
22892
22873
|
...permissionModeId ? { permissionModeId } : {}
|
|
22893
|
-
}) : transportModelIdForAgent(agent);
|
|
22874
|
+
}) : agent === "hermes" ? hermesTransportModelId(model, permissionModeId) : transportModelIdForAgent(agent);
|
|
22894
22875
|
return transportModelId ? { model: transportModelId, reasoningEffort } : officialSelection;
|
|
22895
22876
|
}
|
|
22896
22877
|
function installCurrentRendererAdapter() {
|
|
@@ -22997,19 +22978,39 @@ ${error51.stderrTail}`] : []
|
|
|
22997
22978
|
}
|
|
22998
22979
|
return client.consumeCodexAccountResetCredit(input);
|
|
22999
22980
|
},
|
|
23000
|
-
|
|
22981
|
+
listHarnessAccountSources: () => {
|
|
22982
|
+
const client = currentModelClient();
|
|
22983
|
+
if (!client.listHarnessAccountSources) {
|
|
22984
|
+
throw new Error("Harness account source discovery is unavailable");
|
|
22985
|
+
}
|
|
22986
|
+
return client.listHarnessAccountSources();
|
|
22987
|
+
},
|
|
22988
|
+
inspectHarnessAccount: (input) => {
|
|
22989
|
+
const client = currentModelClient();
|
|
22990
|
+
if (!client.inspectHarnessAccount) {
|
|
22991
|
+
throw new Error("Harness account inspection is unavailable");
|
|
22992
|
+
}
|
|
22993
|
+
return client.inspectHarnessAccount(input);
|
|
22994
|
+
},
|
|
22995
|
+
listHarnessAccounts: (input) => {
|
|
23001
22996
|
const client = currentModelClient();
|
|
23002
22997
|
if (!client.listHarnessAccounts) throw new Error("Harness account inspection is unavailable");
|
|
23003
|
-
return client.listHarnessAccounts();
|
|
22998
|
+
return client.listHarnessAccounts(input);
|
|
23004
22999
|
},
|
|
23005
23000
|
listCodexAccounts: () => currentModelClient().listCodexAccounts(),
|
|
23006
23001
|
refreshCodexAccounts: () => {
|
|
23007
23002
|
const client = currentModelClient();
|
|
23008
23003
|
return client.refreshCodexAccounts?.() ?? client.listCodexAccounts();
|
|
23009
23004
|
},
|
|
23010
|
-
createCodexAccount: (input) => currentModelClient().createCodexAccount(input),
|
|
23011
23005
|
deleteCodexAccount: (input) => currentModelClient().deleteCodexAccount(input),
|
|
23012
|
-
|
|
23006
|
+
switchCodexAccount: (input) => currentModelClient().switchCodexAccount(input),
|
|
23007
|
+
logoutCodexAccount: (input) => currentModelClient().logoutCodexAccount(input),
|
|
23008
|
+
recoverCodexAccounts: (input) => currentModelClient().recoverCodexAccounts(input),
|
|
23009
|
+
subscribeCodexAccounts: (listener) => {
|
|
23010
|
+
const client = currentModelClient();
|
|
23011
|
+
if (!client.subscribeCodexAccounts) throw new Error("Codex Account updates are unavailable");
|
|
23012
|
+
return client.subscribeCodexAccounts(listener);
|
|
23013
|
+
},
|
|
23013
23014
|
startCodexAccountLogin: (input) => currentModelClient().startCodexAccountLogin(input),
|
|
23014
23015
|
cancelCodexAccountLogin: (input) => currentModelClient().cancelCodexAccountLogin(input),
|
|
23015
23016
|
subscribeCodexAccountLogin: (listener) => currentModelClient().subscribeCodexAccountLogin(listener)
|
|
@@ -24303,6 +24304,20 @@ ${error51.stderrTail}`] : []
|
|
|
24303
24304
|
}
|
|
24304
24305
|
}
|
|
24305
24306
|
|
|
24307
|
+
// src/renderer-codex-account-options.ts
|
|
24308
|
+
function codexAccountDisplayName(account) {
|
|
24309
|
+
const full = account.email ?? account.label;
|
|
24310
|
+
const separator = account.email?.lastIndexOf("@") ?? -1;
|
|
24311
|
+
if (!account.email || separator <= 0 || separator === account.email.length - 1) {
|
|
24312
|
+
return { local: full, domain: null, full };
|
|
24313
|
+
}
|
|
24314
|
+
return {
|
|
24315
|
+
local: account.email.slice(0, separator),
|
|
24316
|
+
domain: account.email.slice(separator + 1),
|
|
24317
|
+
full
|
|
24318
|
+
};
|
|
24319
|
+
}
|
|
24320
|
+
|
|
24306
24321
|
// src/settings/accounts-details.ts
|
|
24307
24322
|
function createAccountDetails(document2, messages, input) {
|
|
24308
24323
|
const root = document2.createElement("div");
|
|
@@ -24475,34 +24490,84 @@ ${error51.stderrTail}`] : []
|
|
|
24475
24490
|
const mode = display === "remaining" ? messages.accountCreditsRemaining : messages.accountCreditsUsed;
|
|
24476
24491
|
return `${creditsPeriodLabel2(period, messages)}${messages.locale === "zh-CN" ? "" : " "}${mode}`;
|
|
24477
24492
|
}
|
|
24478
|
-
function
|
|
24479
|
-
|
|
24493
|
+
function comparisonPeriod(periodType) {
|
|
24494
|
+
if (periodType === "five_hour") return "five_hour";
|
|
24495
|
+
if (periodType === "weekly" || periodType === "seven_day") return "seven_day";
|
|
24496
|
+
return null;
|
|
24497
|
+
}
|
|
24498
|
+
function scopedUsageProduct(product) {
|
|
24499
|
+
const suffixes = [
|
|
24500
|
+
[" \xB7 5-hour window", "five_hour"],
|
|
24501
|
+
[" \xB7 Weekly window", "seven_day"],
|
|
24502
|
+
[" \xB7 7-day window", "seven_day"],
|
|
24503
|
+
[" \xB7 5-hour", "five_hour"],
|
|
24504
|
+
[" \xB7 7-day", "seven_day"]
|
|
24505
|
+
];
|
|
24506
|
+
for (const [suffix, period] of suffixes) {
|
|
24507
|
+
if (!product.endsWith(suffix)) continue;
|
|
24508
|
+
const scope = product.slice(0, -suffix.length).trim();
|
|
24509
|
+
if (scope) return { scope, period };
|
|
24510
|
+
}
|
|
24511
|
+
return null;
|
|
24512
|
+
}
|
|
24513
|
+
function splitUsageWindows(credits, messages, filter) {
|
|
24514
|
+
const generic = { columns: {} };
|
|
24515
|
+
const scopedRows = /* @__PURE__ */ new Map();
|
|
24480
24516
|
const additional = [];
|
|
24517
|
+
const addScoped = (scope, period, window2) => {
|
|
24518
|
+
const rows2 = scopedRows.get(scope) ?? [];
|
|
24519
|
+
let row = rows2.find((candidate) => !candidate.columns[period]);
|
|
24520
|
+
if (!row) {
|
|
24521
|
+
row = { scope, columns: {} };
|
|
24522
|
+
rows2.push(row);
|
|
24523
|
+
scopedRows.set(scope, rows2);
|
|
24524
|
+
}
|
|
24525
|
+
row.columns[period] = { ...window2, label: scope, scoped: true };
|
|
24526
|
+
};
|
|
24527
|
+
const addWindow = (window2, period, scope) => {
|
|
24528
|
+
if (scope && period) addScoped(scope, period, window2);
|
|
24529
|
+
else if (!scope && period && !generic.columns[period]) generic.columns[period] = window2;
|
|
24530
|
+
else additional.push(window2);
|
|
24531
|
+
};
|
|
24481
24532
|
const primary = {
|
|
24482
24533
|
label: credits.label ?? creditsPeriodLabel2(credits.periodType, messages),
|
|
24483
24534
|
usedPercent: credits.usedPercent,
|
|
24484
|
-
resetsAt: credits.resetsAt
|
|
24485
|
-
|
|
24486
|
-
|
|
24487
|
-
|
|
24488
|
-
|
|
24489
|
-
|
|
24535
|
+
resetsAt: credits.resetsAt,
|
|
24536
|
+
scoped: Boolean(credits.label && scopedUsageProduct(credits.label))
|
|
24537
|
+
};
|
|
24538
|
+
const primaryScope = credits.label ? scopedUsageProduct(credits.label) : null;
|
|
24539
|
+
addWindow(
|
|
24540
|
+
primary,
|
|
24541
|
+
primaryScope?.period ?? (credits.label ? null : comparisonPeriod(credits.periodType)),
|
|
24542
|
+
primaryScope?.scope
|
|
24543
|
+
);
|
|
24490
24544
|
for (const product of credits.productUsage ?? []) {
|
|
24545
|
+
const scoped = scopedUsageProduct(product.product);
|
|
24491
24546
|
const window2 = {
|
|
24492
24547
|
label: creditsProductLabel(product.product, messages),
|
|
24493
24548
|
usedPercent: product.usagePercent,
|
|
24494
|
-
resetsAt: product.resetsAt
|
|
24549
|
+
resetsAt: product.resetsAt,
|
|
24550
|
+
scoped: Boolean(scoped)
|
|
24495
24551
|
};
|
|
24496
|
-
const
|
|
24497
|
-
|
|
24498
|
-
|
|
24499
|
-
|
|
24500
|
-
|
|
24501
|
-
|
|
24552
|
+
const genericPeriod = product.product === "5-hour window" ? "five_hour" : product.product === "7-day window" ? "seven_day" : null;
|
|
24553
|
+
addWindow(window2, scoped?.period ?? genericPeriod, scoped?.scope);
|
|
24554
|
+
}
|
|
24555
|
+
const structured = [...scopedRows.values()].flat();
|
|
24556
|
+
let rows = Object.keys(generic.columns).length > 0 ? [generic, ...structured] : structured;
|
|
24557
|
+
if (rows.length === 0) rows = [generic];
|
|
24558
|
+
if (filter === "weekly-only") {
|
|
24559
|
+
rows = rows.map((row) => ({
|
|
24560
|
+
...row,
|
|
24561
|
+
columns: row.columns.seven_day ? { seven_day: row.columns.seven_day } : {}
|
|
24562
|
+
})).filter((row) => row.columns.seven_day);
|
|
24563
|
+
if (rows.length === 0) rows = [{ columns: {} }];
|
|
24564
|
+
return { rows, additional: [] };
|
|
24565
|
+
}
|
|
24566
|
+
return { rows, additional };
|
|
24502
24567
|
}
|
|
24503
24568
|
function renderUsageWindow(document2, window2, messages, display) {
|
|
24504
24569
|
const meter = document2.createElement("div");
|
|
24505
|
-
meter.className = "settings-account-usage__meter";
|
|
24570
|
+
meter.className = window2.scoped ? "settings-account-usage__meter settings-account-usage__meter--scoped" : "settings-account-usage__meter";
|
|
24506
24571
|
const label = document2.createElement("span");
|
|
24507
24572
|
label.className = "settings-account-usage__title";
|
|
24508
24573
|
label.textContent = window2.label;
|
|
@@ -24531,7 +24596,7 @@ ${error51.stderrTail}`] : []
|
|
|
24531
24596
|
if (reset) meter.append(reset.timestamp);
|
|
24532
24597
|
return meter;
|
|
24533
24598
|
}
|
|
24534
|
-
function renderAccountUsage(document2, state, messages, display, onRetry) {
|
|
24599
|
+
function renderAccountUsage(document2, state, messages, display, onRetry, filter = "all") {
|
|
24535
24600
|
if (state?.status !== "ready") {
|
|
24536
24601
|
const cell = document2.createElement("td");
|
|
24537
24602
|
cell.colSpan = 2;
|
|
@@ -24553,20 +24618,20 @@ ${error51.stderrTail}`] : []
|
|
|
24553
24618
|
usage.append(retry);
|
|
24554
24619
|
}
|
|
24555
24620
|
cell.append(usage);
|
|
24556
|
-
return { cells: [cell], additional: null };
|
|
24621
|
+
return { cells: [cell], continuationCells: [], additional: null };
|
|
24557
24622
|
}
|
|
24558
|
-
const {
|
|
24559
|
-
const
|
|
24623
|
+
const { rows, additional } = splitUsageWindows(state.credits, messages, filter);
|
|
24624
|
+
const renderCells = (row) => ["five_hour", "seven_day"].map((period) => {
|
|
24560
24625
|
const cell = document2.createElement("td");
|
|
24561
24626
|
cell.className = "settings-account-usage-cell";
|
|
24562
|
-
const window2 = columns[period];
|
|
24627
|
+
const window2 = row.columns[period];
|
|
24563
24628
|
if (window2) cell.append(renderUsageWindow(document2, window2, messages, display));
|
|
24564
24629
|
else {
|
|
24565
24630
|
const missing = document2.createElement("div");
|
|
24566
24631
|
missing.className = "settings-account-usage__missing";
|
|
24567
24632
|
const label = document2.createElement("span");
|
|
24568
24633
|
label.className = "settings-account-usage__title";
|
|
24569
|
-
label.textContent = creditsPeriodLabel2(period, messages);
|
|
24634
|
+
label.textContent = row.scope ?? creditsPeriodLabel2(period, messages);
|
|
24570
24635
|
const dash = document2.createElement("span");
|
|
24571
24636
|
dash.textContent = "\u2014";
|
|
24572
24637
|
dash.setAttribute("aria-hidden", "true");
|
|
@@ -24575,12 +24640,15 @@ ${error51.stderrTail}`] : []
|
|
|
24575
24640
|
}
|
|
24576
24641
|
return cell;
|
|
24577
24642
|
});
|
|
24578
|
-
|
|
24643
|
+
const [firstRow = { columns: {} }, ...continuations] = rows;
|
|
24644
|
+
const cells = renderCells(firstRow);
|
|
24645
|
+
const continuationCells = continuations.map(renderCells);
|
|
24646
|
+
if (!additional.length) return { cells, continuationCells, additional: null };
|
|
24579
24647
|
const extra = document2.createElement("div");
|
|
24580
24648
|
extra.className = "settings-account-extra-usage";
|
|
24581
24649
|
for (const window2 of additional)
|
|
24582
24650
|
extra.append(renderUsageWindow(document2, window2, messages, display));
|
|
24583
|
-
return { cells, additional: extra };
|
|
24651
|
+
return { cells, continuationCells, additional: extra };
|
|
24584
24652
|
}
|
|
24585
24653
|
function renderAccountResetCredits(document2, credits, messages, options) {
|
|
24586
24654
|
const resetCredits = credits.resetCredits;
|
|
@@ -24767,11 +24835,18 @@ ${error51.stderrTail}`] : []
|
|
|
24767
24835
|
agent: "Codex",
|
|
24768
24836
|
plan: accountPlanLabel(account.planType),
|
|
24769
24837
|
highlighted: account.planType === "pro" || account.planType === "prolite",
|
|
24770
|
-
active:
|
|
24838
|
+
active: input.current,
|
|
24771
24839
|
mark
|
|
24772
24840
|
})
|
|
24773
24841
|
);
|
|
24774
|
-
const usage = renderAccountUsage(
|
|
24842
|
+
const usage = renderAccountUsage(
|
|
24843
|
+
document2,
|
|
24844
|
+
input.usage,
|
|
24845
|
+
messages,
|
|
24846
|
+
input.display,
|
|
24847
|
+
input.onRetry,
|
|
24848
|
+
account.planType === "pro" ? "weekly-only" : "all"
|
|
24849
|
+
);
|
|
24775
24850
|
if (usage.additional) personCell.append(usage.additional);
|
|
24776
24851
|
const actionsCell = document2.createElement("td");
|
|
24777
24852
|
actionsCell.className = "settings-account-management-cell";
|
|
@@ -24779,29 +24854,28 @@ ${error51.stderrTail}`] : []
|
|
|
24779
24854
|
management.className = "settings-account-management";
|
|
24780
24855
|
const actions = document2.createElement("div");
|
|
24781
24856
|
actions.className = "settings-account-actions";
|
|
24782
|
-
|
|
24857
|
+
const more = [];
|
|
24858
|
+
if (!input.current) {
|
|
24783
24859
|
const activate = document2.createElement("button");
|
|
24784
24860
|
activate.type = "button";
|
|
24785
24861
|
activate.className = "settings-account-action";
|
|
24786
24862
|
activate.textContent = messages.accountUse;
|
|
24787
24863
|
activate.title = messages.accountDefaultHint;
|
|
24788
24864
|
activate.dataset.accountFocus = `${account.accountId}:activate`;
|
|
24789
|
-
activate.disabled = input.actionsDisabled;
|
|
24865
|
+
activate.disabled = input.actionsDisabled || input.switchDisabled;
|
|
24790
24866
|
activate.addEventListener("click", input.onActivate);
|
|
24791
24867
|
actions.append(activate);
|
|
24792
24868
|
}
|
|
24793
|
-
|
|
24794
|
-
|
|
24795
|
-
|
|
24796
|
-
|
|
24797
|
-
|
|
24798
|
-
|
|
24799
|
-
|
|
24800
|
-
|
|
24801
|
-
|
|
24802
|
-
|
|
24803
|
-
const more = [];
|
|
24804
|
-
if (account.email && input.usage) {
|
|
24869
|
+
const signIn = document2.createElement("button");
|
|
24870
|
+
signIn.type = "button";
|
|
24871
|
+
signIn.className = "settings-account-action";
|
|
24872
|
+
signIn.textContent = messages.accountSignIn;
|
|
24873
|
+
signIn.dataset.accountFocus = `${account.accountId}:login`;
|
|
24874
|
+
signIn.disabled = input.actionsDisabled || input.loginDisabled;
|
|
24875
|
+
signIn.addEventListener("click", input.onSignIn);
|
|
24876
|
+
if (account.email) more.push(signIn);
|
|
24877
|
+
else actions.append(signIn);
|
|
24878
|
+
if (input.usage) {
|
|
24805
24879
|
const refresh = document2.createElement("button");
|
|
24806
24880
|
refresh.type = "button";
|
|
24807
24881
|
refresh.className = "settings-account-action";
|
|
@@ -24811,14 +24885,23 @@ ${error51.stderrTail}`] : []
|
|
|
24811
24885
|
refresh.addEventListener("click", input.onRetry);
|
|
24812
24886
|
more.push(refresh);
|
|
24813
24887
|
}
|
|
24814
|
-
if (
|
|
24888
|
+
if (input.current) {
|
|
24889
|
+
const logout = document2.createElement("button");
|
|
24890
|
+
logout.type = "button";
|
|
24891
|
+
logout.className = "settings-account-action";
|
|
24892
|
+
logout.textContent = messages.accountLogout;
|
|
24893
|
+
logout.dataset.accountFocus = `${account.accountId}:logout`;
|
|
24894
|
+
logout.disabled = input.actionsDisabled || input.logoutDisabled;
|
|
24895
|
+
logout.addEventListener("click", input.onLogout);
|
|
24896
|
+
more.push(logout);
|
|
24897
|
+
} else {
|
|
24815
24898
|
const remove = document2.createElement("button");
|
|
24816
24899
|
remove.type = "button";
|
|
24817
24900
|
remove.className = "settings-account-action settings-account-delete";
|
|
24818
24901
|
remove.textContent = messages.accountDelete;
|
|
24819
24902
|
remove.dataset.accountFocus = `${account.accountId}:delete`;
|
|
24820
24903
|
remove.setAttribute("aria-label", `${messages.accountDelete}: ${name.full}`);
|
|
24821
|
-
remove.disabled = input.actionsDisabled;
|
|
24904
|
+
remove.disabled = input.actionsDisabled || input.deleteDisabled;
|
|
24822
24905
|
remove.addEventListener("click", input.onDelete);
|
|
24823
24906
|
more.push(remove);
|
|
24824
24907
|
}
|
|
@@ -24836,9 +24919,22 @@ ${error51.stderrTail}`] : []
|
|
|
24836
24919
|
);
|
|
24837
24920
|
management.append(actions);
|
|
24838
24921
|
actionsCell.append(management);
|
|
24922
|
+
const continuationRows = usage.continuationCells.map((cells) => {
|
|
24923
|
+
const continuation = document2.createElement("tr");
|
|
24924
|
+
continuation.className = "settings-account-row settings-account-quota-continuation-row";
|
|
24925
|
+
continuation.dataset.accountId = account.accountId;
|
|
24926
|
+
continuation.append(...cells);
|
|
24927
|
+
return continuation;
|
|
24928
|
+
});
|
|
24929
|
+
if (continuationRows.length > 0) {
|
|
24930
|
+
personCell.rowSpan = continuationRows.length + 1;
|
|
24931
|
+
personCell.className += " settings-account-spanning-cell";
|
|
24932
|
+
actionsCell.rowSpan = continuationRows.length + 1;
|
|
24933
|
+
actionsCell.className += " settings-account-spanning-cell";
|
|
24934
|
+
}
|
|
24839
24935
|
row.append(personCell, ...usage.cells, actionsCell);
|
|
24840
24936
|
const reset = input.usage?.status === "ready" ? renderAccountResetCredits(document2, input.usage.credits, messages, input) : null;
|
|
24841
|
-
if (!reset) return [row];
|
|
24937
|
+
if (!reset) return [row, ...continuationRows];
|
|
24842
24938
|
const detailsRow = document2.createElement("tr");
|
|
24843
24939
|
detailsRow.className = "settings-account-details-row";
|
|
24844
24940
|
detailsRow.id = `settings-account-reset-${++resetDetailsSequence}`;
|
|
@@ -24856,9 +24952,9 @@ ${error51.stderrTail}`] : []
|
|
|
24856
24952
|
input.onResetExpanded(!detailsRow.hidden);
|
|
24857
24953
|
});
|
|
24858
24954
|
management.append(reset.summary);
|
|
24859
|
-
return [row, detailsRow];
|
|
24955
|
+
return [row, ...continuationRows, detailsRow];
|
|
24860
24956
|
}
|
|
24861
|
-
function
|
|
24957
|
+
function renderHarnessAccountRows(document2, account, messages, display) {
|
|
24862
24958
|
const row = document2.createElement("tr");
|
|
24863
24959
|
row.className = "settings-account-row";
|
|
24864
24960
|
row.dataset.harnessId = account.harnessId;
|
|
@@ -24882,10 +24978,11 @@ ${error51.stderrTail}`] : []
|
|
|
24882
24978
|
);
|
|
24883
24979
|
const usage = renderAccountUsage(
|
|
24884
24980
|
document2,
|
|
24885
|
-
{ status: "ready", credits: account.credits },
|
|
24981
|
+
{ status: "ready", credits: account.credits, freshness: "live", observedAt: null },
|
|
24886
24982
|
messages,
|
|
24887
24983
|
display,
|
|
24888
|
-
() => void 0
|
|
24984
|
+
() => void 0,
|
|
24985
|
+
account.harnessId === "grok" ? "weekly-only" : "all"
|
|
24889
24986
|
);
|
|
24890
24987
|
if (usage.additional) personCell.append(usage.additional);
|
|
24891
24988
|
const managementCell = document2.createElement("td");
|
|
@@ -24903,14 +25000,71 @@ ${error51.stderrTail}`] : []
|
|
|
24903
25000
|
});
|
|
24904
25001
|
management.append(label, info);
|
|
24905
25002
|
managementCell.append(management);
|
|
25003
|
+
const continuationRows = usage.continuationCells.map((cells) => {
|
|
25004
|
+
const continuation = document2.createElement("tr");
|
|
25005
|
+
continuation.className = "settings-account-row settings-account-quota-continuation-row";
|
|
25006
|
+
continuation.dataset.harnessId = account.harnessId;
|
|
25007
|
+
continuation.append(...cells);
|
|
25008
|
+
return continuation;
|
|
25009
|
+
});
|
|
25010
|
+
if (continuationRows.length > 0) {
|
|
25011
|
+
personCell.rowSpan = continuationRows.length + 1;
|
|
25012
|
+
personCell.className += " settings-account-spanning-cell";
|
|
25013
|
+
managementCell.rowSpan = continuationRows.length + 1;
|
|
25014
|
+
managementCell.className += " settings-account-spanning-cell";
|
|
25015
|
+
}
|
|
24906
25016
|
row.append(personCell, ...usage.cells, managementCell);
|
|
24907
|
-
return row;
|
|
25017
|
+
return [row, ...continuationRows];
|
|
24908
25018
|
}
|
|
24909
25019
|
|
|
24910
25020
|
// src/settings/harness-accounts.ts
|
|
25021
|
+
function sortedAccounts(accounts) {
|
|
25022
|
+
return [...accounts].sort((a, b) => {
|
|
25023
|
+
if (a.harnessId === "antigravity") return b.harnessId === "antigravity" ? 0 : 1;
|
|
25024
|
+
if (b.harnessId === "antigravity") return -1;
|
|
25025
|
+
return a.harnessId.localeCompare(b.harnessId);
|
|
25026
|
+
});
|
|
25027
|
+
}
|
|
24911
25028
|
function createHarnessAccounts(signal, getClient, onChange) {
|
|
24912
25029
|
let accounts = [];
|
|
24913
25030
|
let refreshing = false;
|
|
25031
|
+
const loadProgressively = async (client, force) => {
|
|
25032
|
+
let sources;
|
|
25033
|
+
try {
|
|
25034
|
+
sources = await client.listHarnessAccountSources();
|
|
25035
|
+
} catch {
|
|
25036
|
+
return false;
|
|
25037
|
+
}
|
|
25038
|
+
if (signal.aborted) return true;
|
|
25039
|
+
const byHarnessId = new Map(accounts.map((account) => [account.harnessId, account]));
|
|
25040
|
+
await Promise.all(
|
|
25041
|
+
sources.sources.map(async (source) => {
|
|
25042
|
+
try {
|
|
25043
|
+
const result = await client.inspectHarnessAccount({
|
|
25044
|
+
harnessId: source.harnessId,
|
|
25045
|
+
...force ? { refresh: true } : {}
|
|
25046
|
+
});
|
|
25047
|
+
if (signal.aborted || result.harnessId !== source.harnessId) return;
|
|
25048
|
+
if (result.account) {
|
|
25049
|
+
byHarnessId.set(result.harnessId, {
|
|
25050
|
+
...result.account,
|
|
25051
|
+
harnessId: result.harnessId,
|
|
25052
|
+
harnessName: result.harnessName
|
|
25053
|
+
});
|
|
25054
|
+
} else {
|
|
25055
|
+
byHarnessId.delete(source.harnessId);
|
|
25056
|
+
}
|
|
25057
|
+
} catch {
|
|
25058
|
+
if (!signal.aborted) byHarnessId.delete(source.harnessId);
|
|
25059
|
+
}
|
|
25060
|
+
if (!signal.aborted) {
|
|
25061
|
+
accounts = sortedAccounts(byHarnessId.values());
|
|
25062
|
+
onChange();
|
|
25063
|
+
}
|
|
25064
|
+
})
|
|
25065
|
+
);
|
|
25066
|
+
return true;
|
|
25067
|
+
};
|
|
24914
25068
|
return {
|
|
24915
25069
|
get accounts() {
|
|
24916
25070
|
return accounts;
|
|
@@ -24918,16 +25072,25 @@ ${error51.stderrTail}`] : []
|
|
|
24918
25072
|
get refreshing() {
|
|
24919
25073
|
return refreshing;
|
|
24920
25074
|
},
|
|
24921
|
-
async refresh() {
|
|
25075
|
+
async refresh(force = false) {
|
|
24922
25076
|
if (refreshing || signal.aborted) return;
|
|
24923
25077
|
const client = getClient();
|
|
24924
|
-
if (!client
|
|
25078
|
+
if (!client) return;
|
|
24925
25079
|
refreshing = true;
|
|
25080
|
+
accounts = [];
|
|
24926
25081
|
onChange();
|
|
24927
25082
|
try {
|
|
24928
|
-
const
|
|
24929
|
-
|
|
24930
|
-
|
|
25083
|
+
const progressive = client.listHarnessAccountSources && client.inspectHarnessAccount ? await loadProgressively(
|
|
25084
|
+
{
|
|
25085
|
+
listHarnessAccountSources: client.listHarnessAccountSources.bind(client),
|
|
25086
|
+
inspectHarnessAccount: client.inspectHarnessAccount.bind(client)
|
|
25087
|
+
},
|
|
25088
|
+
force
|
|
25089
|
+
) : false;
|
|
25090
|
+
if (progressive || signal.aborted) return;
|
|
25091
|
+
if (!client.listHarnessAccounts) return;
|
|
25092
|
+
const result = await client.listHarnessAccounts(force ? { refresh: true } : {});
|
|
25093
|
+
if (!signal.aborted) accounts = sortedAccounts(result.accounts);
|
|
24931
25094
|
} catch {
|
|
24932
25095
|
if (!signal.aborted) accounts = [];
|
|
24933
25096
|
} finally {
|
|
@@ -24955,10 +25118,7 @@ ${error51.stderrTail}`] : []
|
|
|
24955
25118
|
const heading = document2.createElement("h1");
|
|
24956
25119
|
heading.className = "settings-section-label";
|
|
24957
25120
|
heading.textContent = messages.pageLabels.accounts;
|
|
24958
|
-
|
|
24959
|
-
description.className = "settings-page-description";
|
|
24960
|
-
description.textContent = messages.accountsDescription;
|
|
24961
|
-
copy.append(heading, description);
|
|
25121
|
+
copy.append(heading);
|
|
24962
25122
|
const add = document2.createElement("button");
|
|
24963
25123
|
add.type = "button";
|
|
24964
25124
|
add.className = "settings-command-button";
|
|
@@ -25008,7 +25168,7 @@ ${error51.stderrTail}`] : []
|
|
|
25008
25168
|
refreshUsage.addEventListener("click", () => {
|
|
25009
25169
|
usageByAccountId.clear();
|
|
25010
25170
|
loadUsage(accounts);
|
|
25011
|
-
void harnessAccounts?.refresh();
|
|
25171
|
+
void harnessAccounts?.refresh(true);
|
|
25012
25172
|
});
|
|
25013
25173
|
search.addEventListener("input", () => render());
|
|
25014
25174
|
toolbar.append(connected, searchWrapper, displayControls, refreshUsage);
|
|
@@ -25019,18 +25179,34 @@ ${error51.stderrTail}`] : []
|
|
|
25019
25179
|
context.content.append(header, status, toolbar, list);
|
|
25020
25180
|
const stopCountdowns = mountAccountResetCountdowns(list, messages, context.signal);
|
|
25021
25181
|
let accounts = [];
|
|
25182
|
+
let currentAccountId = null;
|
|
25183
|
+
let accountPhase = "unavailable";
|
|
25184
|
+
let accountRevision = 0;
|
|
25185
|
+
let accountInstanceId;
|
|
25186
|
+
let hasAccountSnapshot = false;
|
|
25187
|
+
let cleanupRequired = false;
|
|
25188
|
+
let capabilities = {
|
|
25189
|
+
manage: false,
|
|
25190
|
+
switch: false,
|
|
25191
|
+
login: false,
|
|
25192
|
+
delete: false
|
|
25193
|
+
};
|
|
25022
25194
|
let accountCreating = false;
|
|
25023
25195
|
let accountActivating = false;
|
|
25196
|
+
let accountRecovering = false;
|
|
25197
|
+
let accountLoggingOut = false;
|
|
25024
25198
|
let deletingAccountId = null;
|
|
25025
25199
|
let login = null;
|
|
25026
25200
|
let loginStartingAccountId = null;
|
|
25027
25201
|
let loginMessage = null;
|
|
25028
25202
|
let loginRefreshTimer;
|
|
25203
|
+
let loginStartSnapshot;
|
|
25204
|
+
const earlyLoginCompletions = /* @__PURE__ */ new Map();
|
|
25029
25205
|
const usageByAccountId = /* @__PURE__ */ new Map();
|
|
25030
25206
|
let usingResetAccountId = null;
|
|
25031
25207
|
let usageDisplay = "remaining";
|
|
25032
25208
|
const expandedResetAccounts = /* @__PURE__ */ new Set();
|
|
25033
|
-
const accountBusy = () => accountCreating || accountActivating || deletingAccountId !== null || login !== null || loginStartingAccountId !== null || usingResetAccountId !== null;
|
|
25209
|
+
const accountBusy = () => accountCreating || accountActivating || accountRecovering || accountLoggingOut || accountPhase === "changing" || deletingAccountId !== null || login !== null || loginStartingAccountId !== null || usingResetAccountId !== null;
|
|
25034
25210
|
const clearLoginRefresh = () => {
|
|
25035
25211
|
if (loginRefreshTimer === void 0) return;
|
|
25036
25212
|
document2.defaultView?.clearTimeout(loginRefreshTimer);
|
|
@@ -25046,14 +25222,16 @@ ${error51.stderrTail}`] : []
|
|
|
25046
25222
|
() => client().refreshCodexAccounts?.() ?? client().listCodexAccounts(),
|
|
25047
25223
|
{
|
|
25048
25224
|
success(result) {
|
|
25049
|
-
const
|
|
25050
|
-
|
|
25051
|
-
);
|
|
25052
|
-
if (
|
|
25225
|
+
const refreshedLogin = login;
|
|
25226
|
+
const snapshotAdvanced = loginStartSnapshot && (result.instanceId !== void 0 && result.instanceId !== loginStartSnapshot.instanceId || result.instanceId === loginStartSnapshot.instanceId && result.revision > loginStartSnapshot.revision);
|
|
25227
|
+
setAccounts(result);
|
|
25228
|
+
if (refreshedLogin && snapshotAdvanced && result.phase !== "changing" && !(result.pendingOperation?.kind === "login" && result.pendingOperation.operationId === refreshedLogin.loginId)) {
|
|
25053
25229
|
login = null;
|
|
25054
|
-
|
|
25230
|
+
loginStartSnapshot = void 0;
|
|
25231
|
+
loginMessage = messages.accountLoginResultUnconfirmed;
|
|
25232
|
+
render();
|
|
25233
|
+
return;
|
|
25055
25234
|
}
|
|
25056
|
-
setAccounts(result.accounts);
|
|
25057
25235
|
scheduleLoginRefresh();
|
|
25058
25236
|
},
|
|
25059
25237
|
failure() {
|
|
@@ -25066,14 +25244,26 @@ ${error51.stderrTail}`] : []
|
|
|
25066
25244
|
const render = () => {
|
|
25067
25245
|
const restoreFocus = accountListFocusRestorer(list, search);
|
|
25068
25246
|
body.replaceChildren();
|
|
25069
|
-
status.
|
|
25247
|
+
status.replaceChildren();
|
|
25248
|
+
const cleanupOnly = cleanupRequired && accountPhase === "ready";
|
|
25249
|
+
const accountStatus = cleanupRequired ? cleanupOnly ? messages.accountCleanupRequired : messages.accountSavedUnavailable : accountPhase === "unavailable" && capabilities.reason === "recovery-required" ? messages.accountRecoveryRequired : capabilities.reason === "migration-required" ? accountPhase === "ready" && currentAccountId !== null ? messages.accountLegacyCompatibility : messages.accountMigrationRequired : loginMessage;
|
|
25250
|
+
if (accountStatus) status.append(accountStatus);
|
|
25251
|
+
if ((cleanupRequired || capabilities.reason === "recovery-required") && capabilities.recover) {
|
|
25252
|
+
const recover = document2.createElement("button");
|
|
25253
|
+
recover.type = "button";
|
|
25254
|
+
recover.className = "settings-command-button settings-command-button--secondary";
|
|
25255
|
+
recover.textContent = cleanupOnly ? accountRecovering ? messages.accountCleaningUp : messages.accountRetryCleanup : accountRecovering ? messages.accountRecovering : messages.accountRecover;
|
|
25256
|
+
recover.disabled = accountBusy();
|
|
25257
|
+
recover.addEventListener("click", recoverAccounts);
|
|
25258
|
+
status.append(" ", recover);
|
|
25259
|
+
}
|
|
25070
25260
|
connectedCount.textContent = String(accounts.length + harnessAccounts.accounts.length);
|
|
25071
25261
|
updateDisplay(usageDisplay);
|
|
25072
25262
|
search.disabled = login !== null || loginStartingAccountId !== null;
|
|
25073
25263
|
for (const [display, button] of displayButtons) {
|
|
25074
25264
|
button.setAttribute("aria-pressed", String(display === usageDisplay));
|
|
25075
25265
|
}
|
|
25076
|
-
refreshUsage.disabled = (!getClient()?.inspectCodexAccountUsage ||
|
|
25266
|
+
refreshUsage.disabled = (!getClient()?.inspectCodexAccountUsage || accounts.length === 0) && !getClient()?.listHarnessAccounts || harnessAccounts?.refreshing === true || [...usageByAccountId.values()].some((usage) => usage.status === "loading") || accountBusy();
|
|
25077
25267
|
const query = search.value.trim().toLocaleLowerCase();
|
|
25078
25268
|
const visibleAccounts = accounts.filter(
|
|
25079
25269
|
(account) => `Codex ${account.email ?? ""} ${account.label} ${accountPlanLabel(account.planType) ?? ""}`.toLocaleLowerCase().includes(query)
|
|
@@ -25090,19 +25280,25 @@ ${error51.stderrTail}`] : []
|
|
|
25090
25280
|
emptyRow.append(emptyCell);
|
|
25091
25281
|
body.append(emptyRow);
|
|
25092
25282
|
}
|
|
25093
|
-
add.disabled = accountBusy();
|
|
25283
|
+
add.disabled = accountBusy() || !capabilities.login;
|
|
25094
25284
|
for (const account of visibleAccounts) {
|
|
25095
25285
|
body.append(
|
|
25096
25286
|
...renderAccountRows(document2, account, messages, {
|
|
25287
|
+
current: accountPhase === "ready" && account.accountId === currentAccountId,
|
|
25097
25288
|
usage: usageByAccountId.get(account.accountId),
|
|
25098
25289
|
display: usageDisplay,
|
|
25099
25290
|
actionsDisabled: accountBusy(),
|
|
25291
|
+
switchDisabled: !capabilities.switch,
|
|
25292
|
+
loginDisabled: !capabilities.login,
|
|
25293
|
+
deleteDisabled: !capabilities.delete,
|
|
25294
|
+
logoutDisabled: !capabilities.logout,
|
|
25100
25295
|
usingReset: usingResetAccountId === account.accountId,
|
|
25101
25296
|
resetDisabled: accountBusy(),
|
|
25102
25297
|
resetExpanded: expandedResetAccounts.has(account.accountId),
|
|
25103
|
-
onActivate: () =>
|
|
25298
|
+
onActivate: () => switchAccount(account.accountId),
|
|
25104
25299
|
onSignIn: () => startLogin(account.accountId),
|
|
25105
25300
|
onDelete: () => deleteAccount(account.accountId),
|
|
25301
|
+
onLogout: logoutAccount,
|
|
25106
25302
|
onRetry: () => {
|
|
25107
25303
|
usageByAccountId.delete(account.accountId);
|
|
25108
25304
|
loadUsage(accounts);
|
|
@@ -25111,7 +25307,7 @@ ${error51.stderrTail}`] : []
|
|
|
25111
25307
|
if (open) expandedResetAccounts.add(account.accountId);
|
|
25112
25308
|
else expandedResetAccounts.delete(account.accountId);
|
|
25113
25309
|
},
|
|
25114
|
-
...getClient()?.consumeCodexAccountResetCredit ? { onUseReset: () => useReset(account.accountId) } : {}
|
|
25310
|
+
...account.accountId === currentAccountId && accountPhase === "ready" && getClient()?.consumeCodexAccountResetCredit ? { onUseReset: () => useReset(account.accountId) } : {}
|
|
25115
25311
|
})
|
|
25116
25312
|
);
|
|
25117
25313
|
if (login?.accountId === account.accountId) {
|
|
@@ -25166,8 +25362,43 @@ ${error51.stderrTail}`] : []
|
|
|
25166
25362
|
body.append(verificationRow);
|
|
25167
25363
|
}
|
|
25168
25364
|
}
|
|
25365
|
+
if (login && !accounts.some((account) => account.accountId === login?.accountId)) {
|
|
25366
|
+
const verification = document2.createElement("div");
|
|
25367
|
+
verification.className = "settings-account-verification";
|
|
25368
|
+
const prompt = document2.createElement("span");
|
|
25369
|
+
prompt.textContent = messages.accountVerificationDescription;
|
|
25370
|
+
const link = document2.createElement("a");
|
|
25371
|
+
link.href = login.verificationUrl;
|
|
25372
|
+
link.target = "_blank";
|
|
25373
|
+
link.rel = "noopener noreferrer";
|
|
25374
|
+
link.textContent = login.verificationUrl;
|
|
25375
|
+
const code = document2.createElement("code");
|
|
25376
|
+
code.textContent = login.userCode;
|
|
25377
|
+
const copyCode = document2.createElement("button");
|
|
25378
|
+
copyCode.type = "button";
|
|
25379
|
+
copyCode.className = "settings-command-button settings-command-button--secondary";
|
|
25380
|
+
copyCode.textContent = messages.accountCopyCode;
|
|
25381
|
+
copyCode.addEventListener("click", () => {
|
|
25382
|
+
void document2.defaultView?.navigator.clipboard?.writeText(login?.userCode ?? "");
|
|
25383
|
+
});
|
|
25384
|
+
const cancel = document2.createElement("button");
|
|
25385
|
+
cancel.type = "button";
|
|
25386
|
+
cancel.className = "settings-command-button settings-command-button--secondary";
|
|
25387
|
+
cancel.textContent = messages.accountLoginCancel;
|
|
25388
|
+
cancel.addEventListener(
|
|
25389
|
+
"click",
|
|
25390
|
+
() => cancelLogin(login?.accountId ?? "", login?.loginId ?? "")
|
|
25391
|
+
);
|
|
25392
|
+
verification.append(prompt, link, code, copyCode, cancel);
|
|
25393
|
+
const verificationRow = document2.createElement("tr");
|
|
25394
|
+
const verificationCell = document2.createElement("td");
|
|
25395
|
+
verificationCell.colSpan = 4;
|
|
25396
|
+
verificationCell.append(verification);
|
|
25397
|
+
verificationRow.append(verificationCell);
|
|
25398
|
+
body.append(verificationRow);
|
|
25399
|
+
}
|
|
25169
25400
|
for (const account of visibleHarnessAccounts) {
|
|
25170
|
-
body.append(
|
|
25401
|
+
body.append(...renderHarnessAccountRows(document2, account, messages, usageDisplay));
|
|
25171
25402
|
}
|
|
25172
25403
|
restoreFocus();
|
|
25173
25404
|
};
|
|
@@ -25178,12 +25409,12 @@ ${error51.stderrTail}`] : []
|
|
|
25178
25409
|
};
|
|
25179
25410
|
const loadUsage = (nextAccounts) => {
|
|
25180
25411
|
const inspect = getClient()?.inspectCodexAccountUsage;
|
|
25181
|
-
const
|
|
25182
|
-
const keep = new Set(
|
|
25412
|
+
const saved = [...nextAccounts];
|
|
25413
|
+
const keep = new Set(saved.map((account) => account.accountId));
|
|
25183
25414
|
for (const accountId of [...usageByAccountId.keys()]) {
|
|
25184
25415
|
if (!keep.has(accountId)) usageByAccountId.delete(accountId);
|
|
25185
25416
|
}
|
|
25186
|
-
const pending =
|
|
25417
|
+
const pending = saved.filter((account) => !usageByAccountId.has(account.accountId));
|
|
25187
25418
|
if (!inspect || pending.length === 0) {
|
|
25188
25419
|
render();
|
|
25189
25420
|
return;
|
|
@@ -25202,7 +25433,12 @@ ${error51.stderrTail}`] : []
|
|
|
25202
25433
|
return;
|
|
25203
25434
|
usageByAccountId.set(
|
|
25204
25435
|
account.accountId,
|
|
25205
|
-
result.accountCredits ? {
|
|
25436
|
+
result.accountCredits ? {
|
|
25437
|
+
status: "ready",
|
|
25438
|
+
credits: result.accountCredits,
|
|
25439
|
+
freshness: result.freshness,
|
|
25440
|
+
observedAt: result.observedAt
|
|
25441
|
+
} : { status: "empty" }
|
|
25206
25442
|
);
|
|
25207
25443
|
} catch {
|
|
25208
25444
|
if (context.signal.aborted || usageByAccountId.get(account.accountId) !== loading)
|
|
@@ -25213,13 +25449,26 @@ ${error51.stderrTail}`] : []
|
|
|
25213
25449
|
})
|
|
25214
25450
|
);
|
|
25215
25451
|
};
|
|
25216
|
-
const setAccounts = (
|
|
25217
|
-
|
|
25452
|
+
const setAccounts = (result) => {
|
|
25453
|
+
if (!shouldApplyCodexAccountSnapshot(
|
|
25454
|
+
hasAccountSnapshot ? { instanceId: accountInstanceId, revision: accountRevision } : null,
|
|
25455
|
+
result
|
|
25456
|
+
)) {
|
|
25457
|
+
return;
|
|
25458
|
+
}
|
|
25459
|
+
hasAccountSnapshot = true;
|
|
25460
|
+
accounts = result.accounts;
|
|
25461
|
+
currentAccountId = result.currentAccountId;
|
|
25462
|
+
accountPhase = result.phase;
|
|
25463
|
+
accountRevision = result.revision;
|
|
25464
|
+
accountInstanceId = result.instanceId;
|
|
25465
|
+
cleanupRequired = result.cleanupRequired ?? false;
|
|
25466
|
+
capabilities = result.capabilities;
|
|
25218
25467
|
for (const accountId of expandedResetAccounts) {
|
|
25219
25468
|
if (!accounts.some((account) => account.accountId === accountId))
|
|
25220
25469
|
expandedResetAccounts.delete(accountId);
|
|
25221
25470
|
}
|
|
25222
|
-
loadUsage(
|
|
25471
|
+
loadUsage(accounts);
|
|
25223
25472
|
};
|
|
25224
25473
|
const refreshInBackground = () => {
|
|
25225
25474
|
if (!client().refreshCodexAccounts) return;
|
|
@@ -25227,18 +25476,18 @@ ${error51.stderrTail}`] : []
|
|
|
25227
25476
|
() => client().refreshCodexAccounts?.() ?? client().listCodexAccounts(),
|
|
25228
25477
|
{
|
|
25229
25478
|
success(result) {
|
|
25230
|
-
setAccounts(result
|
|
25479
|
+
setAccounts(result);
|
|
25231
25480
|
},
|
|
25232
25481
|
failure() {
|
|
25233
25482
|
}
|
|
25234
25483
|
}
|
|
25235
25484
|
);
|
|
25236
25485
|
};
|
|
25237
|
-
const load = () => {
|
|
25486
|
+
const load = (keepMessage = false) => {
|
|
25238
25487
|
void context.runLatest(() => client().listCodexAccounts(), {
|
|
25239
25488
|
success(result) {
|
|
25240
|
-
loginMessage = null;
|
|
25241
|
-
setAccounts(result
|
|
25489
|
+
if (!keepMessage) loginMessage = null;
|
|
25490
|
+
setAccounts(result);
|
|
25242
25491
|
refreshInBackground();
|
|
25243
25492
|
},
|
|
25244
25493
|
failure(error51) {
|
|
@@ -25247,20 +25496,38 @@ ${error51.stderrTail}`] : []
|
|
|
25247
25496
|
}
|
|
25248
25497
|
});
|
|
25249
25498
|
};
|
|
25250
|
-
const
|
|
25251
|
-
if (
|
|
25499
|
+
const completeLogin = (result) => {
|
|
25500
|
+
if (context.signal.aborted || result.loginId !== login?.loginId) return;
|
|
25501
|
+
clearLoginRefresh();
|
|
25502
|
+
login = null;
|
|
25503
|
+
loginStartSnapshot = void 0;
|
|
25504
|
+
cleanupRequired = result.cleanupRequired ?? cleanupRequired;
|
|
25505
|
+
loginMessage = result.saved || result.success ? messages.accountLoginSucceeded : result.error ?? messages.accountLoginFailed;
|
|
25506
|
+
render();
|
|
25507
|
+
if (result.saved || result.success) load(true);
|
|
25508
|
+
};
|
|
25509
|
+
const reconcileLoginStart = (result) => {
|
|
25510
|
+
login = result;
|
|
25511
|
+
const completed = earlyLoginCompletions.get(result.loginId);
|
|
25512
|
+
earlyLoginCompletions.clear();
|
|
25513
|
+
if (completed) {
|
|
25514
|
+
completeLogin(completed);
|
|
25515
|
+
return;
|
|
25516
|
+
}
|
|
25517
|
+
render();
|
|
25518
|
+
scheduleLoginRefresh();
|
|
25519
|
+
};
|
|
25520
|
+
const switchAccount = (accountId) => {
|
|
25521
|
+
if (accountBusy() || !capabilities.switch || accountId === currentAccountId) return;
|
|
25252
25522
|
accountActivating = true;
|
|
25523
|
+
loginMessage = null;
|
|
25253
25524
|
render();
|
|
25254
|
-
void context.runLatest(() =>
|
|
25255
|
-
success(
|
|
25525
|
+
void context.runLatest(() => client().switchCodexAccount({ accountId }), {
|
|
25526
|
+
success() {
|
|
25256
25527
|
accountActivating = false;
|
|
25257
25528
|
loginMessage = null;
|
|
25258
|
-
|
|
25259
|
-
|
|
25260
|
-
...account.accountId === result.account.accountId ? result.account : account,
|
|
25261
|
-
active: account.accountId === result.account.accountId
|
|
25262
|
-
}))
|
|
25263
|
-
);
|
|
25529
|
+
usageByAccountId.delete(accountId);
|
|
25530
|
+
load();
|
|
25264
25531
|
},
|
|
25265
25532
|
failure(error51) {
|
|
25266
25533
|
accountActivating = false;
|
|
@@ -25270,44 +25537,47 @@ ${error51.stderrTail}`] : []
|
|
|
25270
25537
|
});
|
|
25271
25538
|
};
|
|
25272
25539
|
const startLogin = (accountId) => {
|
|
25273
|
-
if (accountBusy()) return;
|
|
25274
|
-
loginStartingAccountId = accountId;
|
|
25540
|
+
if (accountBusy() || !capabilities.login) return;
|
|
25541
|
+
loginStartingAccountId = accountId ?? "new";
|
|
25542
|
+
loginStartSnapshot = { instanceId: accountInstanceId, revision: accountRevision };
|
|
25275
25543
|
loginMessage = messages.accountSigningIn;
|
|
25276
25544
|
render();
|
|
25277
|
-
void context.runLatest(
|
|
25278
|
-
|
|
25279
|
-
|
|
25280
|
-
|
|
25281
|
-
|
|
25282
|
-
|
|
25283
|
-
|
|
25284
|
-
|
|
25285
|
-
|
|
25286
|
-
|
|
25287
|
-
|
|
25288
|
-
|
|
25545
|
+
void context.runLatest(
|
|
25546
|
+
() => client().startCodexAccountLogin(accountId ? { accountId } : {}),
|
|
25547
|
+
{
|
|
25548
|
+
success(result) {
|
|
25549
|
+
loginStartingAccountId = null;
|
|
25550
|
+
loginMessage = null;
|
|
25551
|
+
reconcileLoginStart(result);
|
|
25552
|
+
},
|
|
25553
|
+
failure(error51) {
|
|
25554
|
+
loginStartingAccountId = null;
|
|
25555
|
+
loginStartSnapshot = void 0;
|
|
25556
|
+
earlyLoginCompletions.clear();
|
|
25557
|
+
loginMessage = errorMessage(error51, messages.accountLoginFailed);
|
|
25558
|
+
render();
|
|
25559
|
+
}
|
|
25289
25560
|
}
|
|
25290
|
-
|
|
25561
|
+
);
|
|
25291
25562
|
};
|
|
25292
25563
|
const createAndLogin = () => {
|
|
25293
|
-
if (accountBusy()) return;
|
|
25564
|
+
if (accountBusy() || !capabilities.login) return;
|
|
25294
25565
|
accountCreating = true;
|
|
25566
|
+
loginStartSnapshot = { instanceId: accountInstanceId, revision: accountRevision };
|
|
25295
25567
|
loginMessage = messages.accountSigningIn;
|
|
25296
25568
|
render();
|
|
25297
|
-
void context.runLatest(() => client().
|
|
25569
|
+
void context.runLatest(() => client().startCodexAccountLogin({}), {
|
|
25298
25570
|
success(result) {
|
|
25299
25571
|
accountCreating = false;
|
|
25300
25572
|
loginMessage = null;
|
|
25301
25573
|
search.value = "";
|
|
25302
|
-
|
|
25303
|
-
...accounts.filter(({ accountId }) => accountId !== result.account.accountId),
|
|
25304
|
-
result.account
|
|
25305
|
-
]);
|
|
25306
|
-
startLogin(result.account.accountId);
|
|
25574
|
+
reconcileLoginStart(result);
|
|
25307
25575
|
},
|
|
25308
25576
|
failure(error51) {
|
|
25309
25577
|
accountCreating = false;
|
|
25310
|
-
|
|
25578
|
+
loginStartSnapshot = void 0;
|
|
25579
|
+
earlyLoginCompletions.clear();
|
|
25580
|
+
loginMessage = errorMessage(error51, messages.accountLoginFailed);
|
|
25311
25581
|
render();
|
|
25312
25582
|
}
|
|
25313
25583
|
});
|
|
@@ -25332,7 +25602,9 @@ ${error51.stderrTail}`] : []
|
|
|
25332
25602
|
if (result.accountCredits) {
|
|
25333
25603
|
usageByAccountId.set(accountId, {
|
|
25334
25604
|
status: "ready",
|
|
25335
|
-
credits: result.accountCredits
|
|
25605
|
+
credits: result.accountCredits,
|
|
25606
|
+
freshness: "live",
|
|
25607
|
+
observedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
25336
25608
|
});
|
|
25337
25609
|
} else if (result.outcome === "reset") {
|
|
25338
25610
|
usageByAccountId.delete(accountId);
|
|
@@ -25349,7 +25621,8 @@ ${error51.stderrTail}`] : []
|
|
|
25349
25621
|
};
|
|
25350
25622
|
const deleteAccount = (accountId) => {
|
|
25351
25623
|
const account = accounts.find((candidate) => candidate.accountId === accountId);
|
|
25352
|
-
if (!account || account.
|
|
25624
|
+
if (!account || account.accountId === currentAccountId || !capabilities.delete || accountBusy())
|
|
25625
|
+
return;
|
|
25353
25626
|
if (document2.defaultView?.confirm?.(messages.accountDeleteConfirm) === false) return;
|
|
25354
25627
|
deletingAccountId = accountId;
|
|
25355
25628
|
loginMessage = messages.accountDeleting;
|
|
@@ -25358,12 +25631,7 @@ ${error51.stderrTail}`] : []
|
|
|
25358
25631
|
success() {
|
|
25359
25632
|
deletingAccountId = null;
|
|
25360
25633
|
loginMessage = null;
|
|
25361
|
-
|
|
25362
|
-
accounts.filter((candidate) => candidate.accountId !== accountId).map((candidate) => ({
|
|
25363
|
-
...candidate,
|
|
25364
|
-
active: account.active ? candidate.isDefault : candidate.active
|
|
25365
|
-
}))
|
|
25366
|
-
);
|
|
25634
|
+
load();
|
|
25367
25635
|
},
|
|
25368
25636
|
failure(error51) {
|
|
25369
25637
|
deletingAccountId = null;
|
|
@@ -25372,11 +25640,51 @@ ${error51.stderrTail}`] : []
|
|
|
25372
25640
|
}
|
|
25373
25641
|
});
|
|
25374
25642
|
};
|
|
25375
|
-
const
|
|
25376
|
-
|
|
25643
|
+
const logoutAccount = () => {
|
|
25644
|
+
if (accountBusy() || !capabilities.logout || currentAccountId === null) return;
|
|
25645
|
+
if (document2.defaultView?.confirm?.(messages.accountLogoutConfirm) === false) return;
|
|
25646
|
+
accountLoggingOut = true;
|
|
25647
|
+
loginMessage = messages.accountLoggingOut;
|
|
25648
|
+
render();
|
|
25649
|
+
void context.runLatest(() => client().logoutCodexAccount({}), {
|
|
25650
|
+
success() {
|
|
25651
|
+
accountLoggingOut = false;
|
|
25652
|
+
loginMessage = messages.accountLoggedOut;
|
|
25653
|
+
load();
|
|
25654
|
+
},
|
|
25655
|
+
failure(error51) {
|
|
25656
|
+
accountLoggingOut = false;
|
|
25657
|
+
loginMessage = errorMessage(error51, messages.accountLogoutFailed);
|
|
25658
|
+
render();
|
|
25659
|
+
}
|
|
25660
|
+
});
|
|
25661
|
+
};
|
|
25662
|
+
const recoverAccounts = () => {
|
|
25663
|
+
if (accountBusy() || !capabilities.recover) return;
|
|
25664
|
+
accountRecovering = true;
|
|
25665
|
+
loginMessage = cleanupRequired && accountPhase === "ready" ? messages.accountCleaningUp : messages.accountRecovering;
|
|
25666
|
+
render();
|
|
25667
|
+
void context.runLatest(() => client().recoverCodexAccounts({}), {
|
|
25668
|
+
success(result) {
|
|
25669
|
+
accountRecovering = false;
|
|
25670
|
+
loginMessage = null;
|
|
25671
|
+
setAccounts(result);
|
|
25672
|
+
render();
|
|
25673
|
+
},
|
|
25674
|
+
failure(error51) {
|
|
25675
|
+
accountRecovering = false;
|
|
25676
|
+
loginMessage = errorMessage(error51, messages.accountRecoveryRequired);
|
|
25677
|
+
render();
|
|
25678
|
+
}
|
|
25679
|
+
});
|
|
25680
|
+
};
|
|
25681
|
+
const cancelLogin = (_accountId, loginId) => {
|
|
25682
|
+
void context.runLatest(() => client().cancelCodexAccountLogin({ loginId }), {
|
|
25377
25683
|
success() {
|
|
25378
25684
|
clearLoginRefresh();
|
|
25685
|
+
earlyLoginCompletions.clear();
|
|
25379
25686
|
login = null;
|
|
25687
|
+
loginStartSnapshot = void 0;
|
|
25380
25688
|
loginMessage = null;
|
|
25381
25689
|
render();
|
|
25382
25690
|
},
|
|
@@ -25388,14 +25696,24 @@ ${error51.stderrTail}`] : []
|
|
|
25388
25696
|
};
|
|
25389
25697
|
add.addEventListener("click", createAndLogin);
|
|
25390
25698
|
let unsubscribe;
|
|
25699
|
+
let unsubscribeAccounts;
|
|
25391
25700
|
try {
|
|
25392
|
-
|
|
25393
|
-
|
|
25394
|
-
clearLoginRefresh();
|
|
25395
|
-
login = null;
|
|
25396
|
-
loginMessage = result.success ? messages.accountLoginSucceeded : result.error ?? messages.accountLoginFailed;
|
|
25701
|
+
unsubscribeAccounts = getClient()?.subscribeCodexAccounts?.((result) => {
|
|
25702
|
+
setAccounts(result);
|
|
25397
25703
|
render();
|
|
25398
|
-
|
|
25704
|
+
});
|
|
25705
|
+
unsubscribe = getClient()?.subscribeCodexAccountLogin?.((result) => {
|
|
25706
|
+
if (context.signal.aborted) return;
|
|
25707
|
+
if (result.loginId === login?.loginId) {
|
|
25708
|
+
completeLogin(result);
|
|
25709
|
+
return;
|
|
25710
|
+
}
|
|
25711
|
+
if (login || loginStartingAccountId === null && !accountCreating) return;
|
|
25712
|
+
earlyLoginCompletions.set(result.loginId, result);
|
|
25713
|
+
if (earlyLoginCompletions.size > 4) {
|
|
25714
|
+
const oldestLoginId = earlyLoginCompletions.keys().next().value;
|
|
25715
|
+
if (oldestLoginId) earlyLoginCompletions.delete(oldestLoginId);
|
|
25716
|
+
}
|
|
25399
25717
|
});
|
|
25400
25718
|
} catch {
|
|
25401
25719
|
}
|
|
@@ -25405,7 +25723,9 @@ ${error51.stderrTail}`] : []
|
|
|
25405
25723
|
return () => {
|
|
25406
25724
|
stopCountdowns();
|
|
25407
25725
|
clearLoginRefresh();
|
|
25726
|
+
earlyLoginCompletions.clear();
|
|
25408
25727
|
unsubscribe?.();
|
|
25728
|
+
unsubscribeAccounts?.();
|
|
25409
25729
|
};
|
|
25410
25730
|
}
|
|
25411
25731
|
});
|
|
@@ -25917,7 +26237,7 @@ ${error51.stderrTail}`] : []
|
|
|
25917
26237
|
var shell_default = ':host {\n --settings-bg: light-dark(#ffffff, #202020);\n --settings-sidebar: light-dark(#f7f7f8, #191919);\n --settings-panel: light-dark(#ffffff, #232323);\n --settings-surface: light-dark(#f6f6f6, #292929);\n --settings-surface-hover: light-dark(#eeeeee, #303030);\n --settings-inset: light-dark(#f3f3f3, #161616);\n --settings-text: light-dark(#0d0d0d, #ececec);\n --settings-muted: light-dark(#676767, #a3a3a3);\n --settings-subtle: light-dark(#8a8a8a, #777777);\n --settings-border: light-dark(rgb(13 13 13 / 9%), rgb(255 255 255 / 9%));\n --settings-divider: light-dark(rgb(13 13 13 / 7%), rgb(255 255 255 / 7%));\n --settings-hover: light-dark(rgb(13 13 13 / 5%), rgb(255 255 255 / 7%));\n --settings-active: light-dark(rgb(13 13 13 / 7%), rgb(255 255 255 / 9%));\n --settings-focus: light-dark(#0b75d1, #66aaf9);\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 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.settings-visually-hidden {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n}\n\n.codexhost-settings-dialog {\n width: min(1120px, calc(100vw - 32px));\n height: min(780px, calc(100vh - 32px));\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: 14px;\n box-shadow: light-dark(0 16px 42px rgb(0 0 0 / 16%), 0 20px 54px rgb(0 0 0 / 42%));\n}\n\n.codexhost-settings-dialog::backdrop {\n background: light-dark(rgb(0 0 0 / 24%), rgb(0 0 0 / 56%));\n backdrop-filter: blur(1px);\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: 24px;\n padding: 4px 9px 2px;\n color: var(--settings-subtle);\n font-size: 11px;\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: 13px;\n line-height: 20px;\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-nav-star-link {\n margin-top: 0;\n color: var(--settings-text);\n text-decoration: none;\n}\n\n.settings-nav-star-link .codexhost-settings-icon {\n color: var(--settings-warning);\n}\n\n.settings-nav-star-link:hover {\n color: var(--settings-warning);\n background: var(--settings-warning-bg);\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 margin: 0;\n padding: 0 0 18px;\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);\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);\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 align-items: center;\n min-width: 0;\n gap: 12px;\n margin: -12px 0 16px;\n color: var(--settings-muted);\n font-size: 13px;\n}\n\n.settings-session-import-harness > span {\n flex: none;\n}\n\n.settings-session-import-harness__options {\n display: flex;\n align-items: center;\n min-width: 0;\n flex: 1;\n gap: 6px;\n overflow-x: auto;\n overflow-y: hidden;\n scrollbar-width: none;\n}\n\n.settings-session-import-harness__options::-webkit-scrollbar {\n display: none;\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: rgb(255 255 255 / 4%);\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-harness + .settings-page-description {\n margin-top: 0;\n margin-bottom: 4px;\n}\n\n.settings-session-import-availability-note {\n margin-top: 0;\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 margin: 16px 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 min-height: 36px;\n padding: 6px 10px;\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: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}\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: 1;\n min-width: 130px;\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-status {\n display: flex;\n align-items: center;\n min-height: 64px;\n gap: 12px;\n padding: 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-hover);\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: 5px 0 0;\n}\n\n.settings-connections-content,\n.settings-connections-layout,\n.settings-connection-list,\n.settings-connection-rows {\n min-width: 0;\n}\n\n.settings-connections-layout {\n display: grid;\n grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.85fr);\n align-items: start;\n gap: 18px;\n}\n\n.settings-connection-list,\n.settings-connection-inspector {\n overflow: hidden;\n background: var(--settings-panel);\n border: 1px solid var(--settings-border);\n border-radius: 10px;\n}\n\n.settings-connection-host-strip {\n display: grid;\n grid-template-columns: 30px minmax(0, 1fr) 30px;\n align-items: center;\n min-width: 0;\n gap: 5px;\n padding: 9px 10px;\n border-bottom: 1px solid var(--settings-divider);\n}\n\n.settings-connection-host-scroll {\n display: none;\n align-items: center;\n justify-content: center;\n width: 30px;\n height: 34px;\n padding: 0;\n color: var(--settings-muted);\n background: var(--settings-inset);\n border: 1px solid var(--settings-border);\n border-radius: 8px;\n cursor: pointer;\n}\n\n.settings-connection-host-strip[data-connection-host-overflow="true"]\n .settings-connection-host-scroll {\n display: inline-flex;\n}\n\n.settings-connection-host-strip:not([data-connection-host-overflow="true"]) {\n grid-template-columns: minmax(0, 1fr);\n}\n\n.settings-connection-host-scroll:hover:not(:disabled) {\n color: var(--settings-text);\n background: var(--settings-hover);\n}\n\n.settings-connection-host-scroll:disabled {\n cursor: default;\n opacity: 0.35;\n}\n\n.settings-connection-host-scroll:focus-visible,\n.settings-connection-host-tab: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 grid-template-columns: minmax(160px, 1fr) minmax(92px, auto) 108px;\n align-items: center;\n min-width: 0;\n gap: 10px;\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: transparent;\n border-bottom: 1px solid var(--settings-divider);\n}\n\n.settings-connection-row {\n min-height: 52px;\n padding: 8px 10px;\n cursor: pointer;\n border-bottom: 1px solid var(--settings-divider);\n}\n\n.settings-connection-row:last-child {\n border-bottom: 0;\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-muted);\n font-size: 10px;\n font-weight: 700;\n background: var(--settings-surface);\n border-radius: 6px;\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-row__status {\n display: inline-flex;\n align-items: center;\n width: fit-content;\n gap: 5px;\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-row__group-toggle {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n width: 26px;\n height: 26px;\n color: var(--settings-muted);\n background: transparent;\n border: 0;\n border-radius: 6px;\n cursor: pointer;\n}\n\n.settings-connection-row__group-toggle:hover {\n color: var(--settings-text);\n background: var(--settings-hover);\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-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 color: var(--settings-focus);\n text-decoration: none;\n background: transparent;\n border: 1px solid transparent;\n border-radius: 7px;\n opacity: 0;\n transition: opacity 120ms ease;\n}\n\n.settings-connection-row:hover .settings-connection-install-link,\n.settings-connection-install-link:focus-visible {\n opacity: 1;\n}\n\n.settings-connection-install-link:hover {\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-button {\n width: fit-content;\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-panel {\n display: grid;\n max-width: 720px;\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-copy p,\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: 2px 0;\n color: var(--settings-warning);\n font-size: 14px;\n font-weight: 600;\n line-height: 22px;\n}\n\n.settings-about-repository {\n display: grid;\n gap: 10px;\n padding-top: 18px;\n border-top: 1px solid var(--settings-divider);\n}\n\n.settings-about-repository-link {\n display: flex;\n align-items: center;\n width: fit-content;\n min-width: 0;\n max-width: 100%;\n gap: 8px;\n color: var(--settings-focus);\n font-size: 13px;\n font-weight: 600;\n text-decoration: none;\n}\n\n.settings-about-repository-link:hover {\n text-decoration: underline;\n}\n\n.settings-about-repository-link code {\n min-width: 0;\n overflow: hidden;\n color: var(--settings-muted);\n font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;\n font-size: 11px;\n font-weight: 400;\n text-overflow: ellipsis;\n white-space: nowrap;\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 4px 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.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"] .codexhost-settings-icon,\n.settings-update-panel[data-update-state="downloading"] .codexhost-settings-icon,\n.settings-update-panel[data-update-state="installing"] .codexhost-settings-icon,\n.settings-update-panel[data-update-state="restarting"] .codexhost-settings-icon {\n color: var(--settings-focus);\n}\n\n.settings-update-panel[data-update-state="current"] .codexhost-settings-icon {\n color: var(--settings-success);\n}\n\n.settings-update-panel[data-update-state="failed"] .codexhost-settings-icon,\n.settings-update-panel[data-update-state="error"] .codexhost-settings-icon {\n color: var(--settings-danger);\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);\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-text);\n background: var(--settings-panel);\n border-color: var(--settings-border);\n}\n\n.settings-command-button:hover:not(:disabled) {\n background: var(--settings-primary-hover);\n border-color: var(--settings-primary-hover);\n}\n\n.settings-command-button--secondary:hover:not(:disabled),\n.settings-update-link:hover {\n background: var(--settings-hover);\n border-color: var(--settings-border);\n}\n\n.settings-command-button--danger {\n color: #f87171;\n}\n\n.settings-command-button--danger:hover:not(:disabled) {\n color: #fecaca;\n background: rgb(127 29 29 / 24%);\n border-color: rgb(248 113 113 / 45%);\n}\n\n.settings-command-button:disabled {\n cursor: default;\n opacity: 0.45;\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.codexhost-settings-icon {\n display: block;\n flex: none;\n stroke: currentColor;\n}\n\n@media (max-width: 720px) {\n .codexhost-settings-dialog {\n width: calc(100vw - 16px);\n height: calc(100vh - 16px);\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-session-import-row {\n grid-template-columns: minmax(0, 1fr);\n }\n\n .settings-session-import-row__action {\n align-items: flex-start;\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-nav-star-link {\n margin-top: 0;\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-account-header,\n .settings-connection-page-header {\n flex-direction: column;\n }\n\n .settings-account-header > .settings-command-button,\n .settings-connection-page-header > .settings-command-button {\n width: 100%;\n }\n\n .settings-connections-layout {\n grid-template-columns: minmax(0, 1fr);\n }\n\n .settings-connection-inspector {\n position: static;\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 --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-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';
|
|
25918
26238
|
|
|
25919
26239
|
// src/settings/accounts.css
|
|
25920
|
-
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-header {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 20px;\n}\n\n.settings-account-header > :first-child {\n min-width: 0;\n flex: 1 1 auto;\n}\n\n.settings-account-header > .settings-command-button {\n flex: none;\n white-space: nowrap;\n margin-top: 0;\n min-height: 36px;\n padding: 8px 12px;\n border-radius: 7px;\n}\n\n.settings-account-header .settings-section-label {\n margin: 0;\n padding: 0;\n font-size: 27px;\n line-height: 1.4;\n font-weight: 650;\n letter-spacing: -0.035em;\n}\n.settings-account-header .settings-page-description {\n margin: 8px 0 0;\n font-size: 13px;\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: 27px;\n padding: 18px 0;\n border-top: 1px solid var(--settings-border);\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.settings-account-display-controls {\n display: flex;\n padding: 3px;\n border: 1px solid var(--settings-border);\n border-radius: 7px;\n background: var(--settings-inset);\n}\n.settings-account-display-controls button {\n padding: 4px 10px;\n color: var(--settings-muted);\n background: transparent;\n border: 0;\n border-radius: 4px;\n font-size: 12px;\n cursor: pointer;\n}\n.settings-account-display-controls button:hover {\n color: var(--settings-text);\n}\n.settings-account-display-controls button[aria-pressed="true"] {\n color: var(--settings-text);\n background: var(--settings-active);\n}\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-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 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.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 {\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-surface);\n border: 1px solid var(--settings-border);\n border-radius: 12px;\n text-align: left;\n}\n.settings-account-dialog::backdrop {\n background: #0005;\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 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';
|
|
26240
|
+
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-header {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 20px;\n}\n\n.settings-account-header > :first-child {\n min-width: 0;\n flex: 1 1 auto;\n}\n\n.settings-account-header > .settings-command-button {\n flex: none;\n white-space: nowrap;\n margin-top: 0;\n min-height: 36px;\n padding: 8px 12px;\n border-radius: 7px;\n}\n\n.settings-account-header .settings-section-label {\n margin: 0;\n padding: 0;\n font-size: 27px;\n line-height: 1.4;\n font-weight: 650;\n letter-spacing: -0.035em;\n}\n.settings-account-header .settings-page-description {\n margin: 8px 0 0;\n font-size: 13px;\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: 27px;\n padding: 18px 0;\n border-top: 1px solid var(--settings-border);\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.settings-account-display-controls {\n display: flex;\n padding: 3px;\n border: 1px solid var(--settings-border);\n border-radius: 7px;\n background: var(--settings-inset);\n}\n.settings-account-display-controls button {\n padding: 4px 10px;\n color: var(--settings-muted);\n background: transparent;\n border: 0;\n border-radius: 4px;\n font-size: 12px;\n cursor: pointer;\n}\n.settings-account-display-controls button:hover {\n color: var(--settings-text);\n}\n.settings-account-display-controls button[aria-pressed="true"] {\n color: var(--settings-text);\n background: var(--settings-active);\n}\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-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 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.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(--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-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-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 {\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-surface);\n border: 1px solid var(--settings-border);\n border-radius: 12px;\n text-align: left;\n}\n.settings-account-dialog::backdrop {\n background: #0005;\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 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';
|
|
25921
26241
|
|
|
25922
26242
|
// src/settings/shell.ts
|
|
25923
26243
|
var SETTINGS_SHELL_ATTRIBUTE = "data-codexhost-settings-shell";
|
|
@@ -26540,6 +26860,82 @@ ${accounts_default}`;
|
|
|
26540
26860
|
};
|
|
26541
26861
|
}
|
|
26542
26862
|
|
|
26863
|
+
// src/renderer-account-navigation.ts
|
|
26864
|
+
function createRendererAccountNavigation(currentThread) {
|
|
26865
|
+
let cancel = () => {
|
|
26866
|
+
};
|
|
26867
|
+
return {
|
|
26868
|
+
async switchAccount(operation) {
|
|
26869
|
+
cancel();
|
|
26870
|
+
const view = currentThread();
|
|
26871
|
+
if (!view) return operation();
|
|
26872
|
+
const controller = new AbortController();
|
|
26873
|
+
let deadline = 0;
|
|
26874
|
+
let timer;
|
|
26875
|
+
let committed = false;
|
|
26876
|
+
let opening = false;
|
|
26877
|
+
let done = false;
|
|
26878
|
+
const finish = () => {
|
|
26879
|
+
if (done) return;
|
|
26880
|
+
done = true;
|
|
26881
|
+
observer.disconnect();
|
|
26882
|
+
if (timer !== void 0) window.clearTimeout(timer);
|
|
26883
|
+
document.removeEventListener("pointerdown", onInput, true);
|
|
26884
|
+
document.removeEventListener("keydown", onInput, true);
|
|
26885
|
+
controller.abort();
|
|
26886
|
+
};
|
|
26887
|
+
const onInput = (event) => {
|
|
26888
|
+
if (!event.composedPath().some(
|
|
26889
|
+
(node) => node instanceof Element && node.hasAttribute("data-codexhost-settings-shell")
|
|
26890
|
+
))
|
|
26891
|
+
finish();
|
|
26892
|
+
};
|
|
26893
|
+
const restore = () => {
|
|
26894
|
+
if (done || !committed || opening || view.composer.isConnected) return;
|
|
26895
|
+
if (Date.now() >= deadline) {
|
|
26896
|
+
finish();
|
|
26897
|
+
return;
|
|
26898
|
+
}
|
|
26899
|
+
const composer = document.querySelector(CODEX_COMPOSER_SELECTOR);
|
|
26900
|
+
if (!composer) return;
|
|
26901
|
+
const selected = composer.querySelector(":scope > [data-above-composer-portal]")?.getAttribute("data-above-composer-conversation-id");
|
|
26902
|
+
if (selected) {
|
|
26903
|
+
finish();
|
|
26904
|
+
return;
|
|
26905
|
+
}
|
|
26906
|
+
opening = true;
|
|
26907
|
+
void openRendererThread(view.threadId, { hostId: "local", signal: controller.signal }).catch(() => {
|
|
26908
|
+
if (!controller.signal.aborted)
|
|
26909
|
+
console.warn(
|
|
26910
|
+
"codexhost: Could not restore the selected Thread after Account switching"
|
|
26911
|
+
);
|
|
26912
|
+
}).finally(finish);
|
|
26913
|
+
};
|
|
26914
|
+
const observer = new MutationObserver(restore);
|
|
26915
|
+
cancel = finish;
|
|
26916
|
+
observer.observe(document.documentElement, { childList: true, subtree: true });
|
|
26917
|
+
document.addEventListener("pointerdown", onInput, true);
|
|
26918
|
+
document.addEventListener("keydown", onInput, true);
|
|
26919
|
+
try {
|
|
26920
|
+
const result = await operation();
|
|
26921
|
+
committed = true;
|
|
26922
|
+
if (!done) {
|
|
26923
|
+
deadline = Date.now() + 3e4;
|
|
26924
|
+
timer = window.setTimeout(finish, 3e4);
|
|
26925
|
+
restore();
|
|
26926
|
+
}
|
|
26927
|
+
return result;
|
|
26928
|
+
} catch (error51) {
|
|
26929
|
+
finish();
|
|
26930
|
+
throw error51;
|
|
26931
|
+
}
|
|
26932
|
+
},
|
|
26933
|
+
dispose() {
|
|
26934
|
+
cancel();
|
|
26935
|
+
}
|
|
26936
|
+
};
|
|
26937
|
+
}
|
|
26938
|
+
|
|
26543
26939
|
// src/renderer-binding-probe.ts
|
|
26544
26940
|
var externalHarnessIds = {
|
|
26545
26941
|
pi: harnessIdSchema.parse("pi"),
|
|
@@ -26551,7 +26947,8 @@ ${accounts_default}`;
|
|
|
26551
26947
|
antigravity: harnessIdSchema.parse("antigravity"),
|
|
26552
26948
|
"kiro-cli": harnessIdSchema.parse("kiro-cli"),
|
|
26553
26949
|
codebuddy: harnessIdSchema.parse("codebuddy"),
|
|
26554
|
-
"cursor-cli": harnessIdSchema.parse("cursor-cli")
|
|
26950
|
+
"cursor-cli": harnessIdSchema.parse("cursor-cli"),
|
|
26951
|
+
hermes: harnessIdSchema.parse("hermes")
|
|
26555
26952
|
};
|
|
26556
26953
|
var externalAgents = [
|
|
26557
26954
|
"pi",
|
|
@@ -26563,7 +26960,8 @@ ${accounts_default}`;
|
|
|
26563
26960
|
"antigravity",
|
|
26564
26961
|
"kiro-cli",
|
|
26565
26962
|
"codebuddy",
|
|
26566
|
-
"cursor-cli"
|
|
26963
|
+
"cursor-cli",
|
|
26964
|
+
"hermes"
|
|
26567
26965
|
];
|
|
26568
26966
|
function isRetryableHarnessAvailability(availability, error51) {
|
|
26569
26967
|
return availability !== void 0 && availability !== "ready" && availability !== "notInstalled" && error51?.retryable === true;
|
|
@@ -26748,6 +27146,13 @@ ${accounts_default}`;
|
|
|
26748
27146
|
...permissionModeId ? { permissionModeId } : {}
|
|
26749
27147
|
};
|
|
26750
27148
|
}
|
|
27149
|
+
if (inspection.harnessId === "hermes") {
|
|
27150
|
+
return {
|
|
27151
|
+
agent: "hermes",
|
|
27152
|
+
...inspection.effectiveModel ? { model: inspection.effectiveModel } : {},
|
|
27153
|
+
...inspection.effectivePermissionModeId ? { permissionModeId: inspection.effectivePermissionModeId } : {}
|
|
27154
|
+
};
|
|
27155
|
+
}
|
|
26751
27156
|
throw new Error("Thread owner is not a Renderer Agent");
|
|
26752
27157
|
}
|
|
26753
27158
|
function isOwnershipSubmissionBlocked(status) {
|
|
@@ -26852,9 +27257,23 @@ ${accounts_default}`;
|
|
|
26852
27257
|
getLocalAgent: localAgentForSidebarThread
|
|
26853
27258
|
});
|
|
26854
27259
|
let connectionDiagnostics = null;
|
|
27260
|
+
const accountNavigation = createRendererAccountNavigation(() => {
|
|
27261
|
+
const views = [...mountedByComposer.values()].filter(
|
|
27262
|
+
(mounted) => mounted.composer.isConnected && mounted.hostId === "local" && mounted.ownershipStatus === "ready" && controller.get(mounted.composer).agent === "codex"
|
|
27263
|
+
);
|
|
27264
|
+
const view = views.length === 1 ? views[0] : void 0;
|
|
27265
|
+
const threadId = view && threadIdFromComposerModelTarget(view.modelTarget);
|
|
27266
|
+
return view && threadId ? { composer: view.composer, threadId } : null;
|
|
27267
|
+
});
|
|
26855
27268
|
const settingsLifecycle = installRendererSettingsLifecycle(window, {
|
|
26856
27269
|
getUpdateClient: () => modelControl,
|
|
26857
|
-
getAccountClient: () =>
|
|
27270
|
+
getAccountClient: () => {
|
|
27271
|
+
const client = modelControl;
|
|
27272
|
+
return client && {
|
|
27273
|
+
...client,
|
|
27274
|
+
switchCodexAccount: (input) => accountNavigation.switchAccount(() => client.switchCodexAccount(input))
|
|
27275
|
+
};
|
|
27276
|
+
},
|
|
26858
27277
|
getConnectionDiagnostics: () => connectionDiagnostics,
|
|
26859
27278
|
getSessionImportClient: () => {
|
|
26860
27279
|
const client = modelClientForHost("local");
|
|
@@ -26894,7 +27313,8 @@ ${accounts_default}`;
|
|
|
26894
27313
|
antigravity: void 0,
|
|
26895
27314
|
"kiro-cli": void 0,
|
|
26896
27315
|
codebuddy: void 0,
|
|
26897
|
-
"cursor-cli": void 0
|
|
27316
|
+
"cursor-cli": void 0,
|
|
27317
|
+
hermes: void 0
|
|
26898
27318
|
},
|
|
26899
27319
|
webUi: Object.fromEntries(
|
|
26900
27320
|
externalAgents.map((agent) => [agent, false])
|
|
@@ -26919,7 +27339,18 @@ ${accounts_default}`;
|
|
|
26919
27339
|
if (!client) return null;
|
|
26920
27340
|
const state = hostHarnessAvailabilityState(hostId);
|
|
26921
27341
|
if (state.codexAccounts?.client !== client) {
|
|
26922
|
-
state.codexAccounts
|
|
27342
|
+
state.codexAccounts?.dispose();
|
|
27343
|
+
state.codexAccounts = new RendererCodexAccountState(client, () => {
|
|
27344
|
+
queueMicrotask(() => {
|
|
27345
|
+
if (disposed || hostHarnessAvailabilityState(hostId).codexAccounts?.client !== client)
|
|
27346
|
+
return;
|
|
27347
|
+
for (const mounted of mountedByComposer.values()) {
|
|
27348
|
+
if (mounted.hostId !== hostId) continue;
|
|
27349
|
+
renderMounted(mounted);
|
|
27350
|
+
void refreshDraftCodexUsage(mounted);
|
|
27351
|
+
}
|
|
27352
|
+
});
|
|
27353
|
+
});
|
|
26923
27354
|
}
|
|
26924
27355
|
return state.codexAccounts;
|
|
26925
27356
|
};
|
|
@@ -26937,12 +27368,7 @@ ${accounts_default}`;
|
|
|
26937
27368
|
const isCurrentModelRequest = (mounted, generation) => isMountedComposer(mounted.composer) && mountedByComposer.get(mounted.composer) === mounted && controller.isCurrentModelRequest(mounted.composer, generation);
|
|
26938
27369
|
const isCurrentOwnershipRequest = (mounted, generation) => mounted.composer.isConnected && mountedByComposer.get(mounted.composer) === mounted && controller.isCurrentOwnershipRequest(mounted.composer, generation);
|
|
26939
27370
|
const notifySubmission = (composer, trigger) => {
|
|
26940
|
-
const
|
|
26941
|
-
const state = controller.recordSubmission(
|
|
26942
|
-
composer,
|
|
26943
|
-
accounts?.selection.selectedAccountId ?? void 0
|
|
26944
|
-
);
|
|
26945
|
-
if (state.agent === "codex" && accounts) accounts.overrideAccountId = null;
|
|
27371
|
+
const state = controller.recordSubmission(composer);
|
|
26946
27372
|
writeNewThreadAgentPreference(state.agent);
|
|
26947
27373
|
if (state.agent !== "codex") {
|
|
26948
27374
|
const model = controller.modelForAgent(composer, state.agent);
|
|
@@ -26966,9 +27392,10 @@ ${accounts_default}`;
|
|
|
26966
27392
|
);
|
|
26967
27393
|
};
|
|
26968
27394
|
const renderMounted = (mounted) => {
|
|
26969
|
-
const state = controller.get(mounted.composer);
|
|
26970
27395
|
const accounts = composerCodexAccounts(mounted.composer);
|
|
26971
|
-
const
|
|
27396
|
+
const currentCodexAccount = accounts?.accounts.find(
|
|
27397
|
+
({ accountId }) => accountId === accounts.readyAccountId
|
|
27398
|
+
);
|
|
26972
27399
|
renderComposerAgentControl(
|
|
26973
27400
|
mounted.control,
|
|
26974
27401
|
controller.get(mounted.composer),
|
|
@@ -26980,10 +27407,7 @@ ${accounts_default}`;
|
|
|
26980
27407
|
mounted.usage,
|
|
26981
27408
|
mounted.accountCredits,
|
|
26982
27409
|
settingsLifecycle.locale,
|
|
26983
|
-
|
|
26984
|
-
...account,
|
|
26985
|
-
active: account.accountId === selectedCodexAccountId
|
|
26986
|
-
})),
|
|
27410
|
+
currentCodexAccount ?? null,
|
|
26987
27411
|
mounted.ownershipStatus === "error"
|
|
26988
27412
|
);
|
|
26989
27413
|
if (mounted.control.usage) {
|
|
@@ -27057,7 +27481,7 @@ ${accounts_default}`;
|
|
|
27057
27481
|
return;
|
|
27058
27482
|
const accounts = composerCodexAccounts(mounted.composer);
|
|
27059
27483
|
const client = accounts?.client;
|
|
27060
|
-
const accountId = accounts?.
|
|
27484
|
+
const accountId = accounts?.readyAccountId;
|
|
27061
27485
|
const hostId = mounted.hostId;
|
|
27062
27486
|
const generation = ++mounted.usageRequestGeneration;
|
|
27063
27487
|
mounted.usage = null;
|
|
@@ -27066,7 +27490,7 @@ ${accounts_default}`;
|
|
|
27066
27490
|
if (accounts?.switching || !accountId || !client?.inspectCodexAccountUsage) return;
|
|
27067
27491
|
try {
|
|
27068
27492
|
const result = await client.inspectCodexAccountUsage({ accountId });
|
|
27069
|
-
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.
|
|
27493
|
+
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)
|
|
27070
27494
|
return;
|
|
27071
27495
|
mounted.usage = result.usage;
|
|
27072
27496
|
mounted.accountCredits = result.accountCredits ?? null;
|
|
@@ -27173,8 +27597,7 @@ ${accounts_default}`;
|
|
|
27173
27597
|
agent,
|
|
27174
27598
|
model,
|
|
27175
27599
|
thinkingOptionId,
|
|
27176
|
-
permissionModeId
|
|
27177
|
-
inspection.owner === "codex" ? inspection.accountId : void 0
|
|
27600
|
+
permissionModeId
|
|
27178
27601
|
);
|
|
27179
27602
|
if (!restored) {
|
|
27180
27603
|
throw new Error("Thread owner could not be applied to the Composer");
|
|
@@ -27890,39 +28313,6 @@ ${accounts_default}`;
|
|
|
27890
28313
|
void refreshDraftCodexUsage(mounted);
|
|
27891
28314
|
}
|
|
27892
28315
|
};
|
|
27893
|
-
const selectCodexAccount = async (mounted, accountId) => {
|
|
27894
|
-
const hostId = mounted.hostId;
|
|
27895
|
-
const accounts = composerCodexAccounts(mounted.composer);
|
|
27896
|
-
if (!accounts || accounts.switching || controller.get(mounted.composer).phase === "locked" || !accounts.accounts.some((account) => account.accountId === accountId))
|
|
27897
|
-
return;
|
|
27898
|
-
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;
|
|
27899
|
-
accounts.switching = true;
|
|
27900
|
-
for (const candidate of mountedByComposer.values()) {
|
|
27901
|
-
renderMounted(candidate);
|
|
27902
|
-
void refreshDraftCodexUsage(candidate);
|
|
27903
|
-
}
|
|
27904
|
-
try {
|
|
27905
|
-
if (controller.get(mounted.composer).agent !== "codex" && !await switchComposerAgent(mounted, "codex")) {
|
|
27906
|
-
return;
|
|
27907
|
-
}
|
|
27908
|
-
const policy = await waitForRendererDraftPrewarmPolicy(window);
|
|
27909
|
-
if (!isCurrent() || policy.hostId !== hostId) return;
|
|
27910
|
-
await policy.clear();
|
|
27911
|
-
if (!isCurrent() || window.__codexhostDraftPrewarmPolicyV1 !== policy) return;
|
|
27912
|
-
if (!policy.selectAccount) throw new Error("Codex Account selection is unavailable");
|
|
27913
|
-
const override = accountId === accounts.selection.activeAccountId ? null : accountId;
|
|
27914
|
-
policy.selectAccount(override);
|
|
27915
|
-
accounts.overrideAccountId = override;
|
|
27916
|
-
} catch {
|
|
27917
|
-
if (isCurrent()) void loadCodexAccounts();
|
|
27918
|
-
} finally {
|
|
27919
|
-
accounts.switching = false;
|
|
27920
|
-
for (const candidate of mountedByComposer.values()) {
|
|
27921
|
-
renderMounted(candidate);
|
|
27922
|
-
void refreshDraftCodexUsage(candidate);
|
|
27923
|
-
}
|
|
27924
|
-
}
|
|
27925
|
-
};
|
|
27926
28316
|
const openInstallPage = (agent) => {
|
|
27927
28317
|
const url2 = RENDERER_AGENT_INSTALL_URLS[agent];
|
|
27928
28318
|
window.open(url2, "_blank", "noopener,noreferrer");
|
|
@@ -28193,11 +28583,6 @@ ${accounts_default}`;
|
|
|
28193
28583
|
void switchComposerAgent(mounted2, agent);
|
|
28194
28584
|
},
|
|
28195
28585
|
openInstallPage,
|
|
28196
|
-
async (accountId) => {
|
|
28197
|
-
const mounted2 = mountedByComposer.get(composer);
|
|
28198
|
-
if (!composer.isConnected || !mounted2) return;
|
|
28199
|
-
await selectCodexAccount(mounted2, accountId);
|
|
28200
|
-
},
|
|
28201
28586
|
() => {
|
|
28202
28587
|
void loadCodexAccounts();
|
|
28203
28588
|
},
|
|
@@ -28398,20 +28783,6 @@ ${accounts_default}`;
|
|
|
28398
28783
|
if (!isExternalConfigurationReady(mounted)) return false;
|
|
28399
28784
|
if (current.phase === "locked") return true;
|
|
28400
28785
|
if (!applyComposerAgent(composer)) return false;
|
|
28401
|
-
if (current.agent === "codex") {
|
|
28402
|
-
const selection = composerCodexAccounts(composer)?.selection;
|
|
28403
|
-
const accountId = controller.isSubmissionPending(composer) && current.codexAccountId ? current.codexAccountId : selection?.selectedAccountId;
|
|
28404
|
-
const override = accountId === selection?.activeAccountId ? null : accountId ?? null;
|
|
28405
|
-
const policy = window.__codexhostDraftPrewarmPolicyV1;
|
|
28406
|
-
if (override !== null && (policy?.hostId !== mounted.hostId || !policy.selectAccount)) {
|
|
28407
|
-
return false;
|
|
28408
|
-
}
|
|
28409
|
-
try {
|
|
28410
|
-
if (policy?.hostId === mounted.hostId) policy.selectAccount?.(override);
|
|
28411
|
-
} catch {
|
|
28412
|
-
return false;
|
|
28413
|
-
}
|
|
28414
|
-
}
|
|
28415
28786
|
controller.markSubmissionPending(composer);
|
|
28416
28787
|
renderMounted(mounted);
|
|
28417
28788
|
return true;
|
|
@@ -28603,6 +28974,7 @@ ${accounts_default}`;
|
|
|
28603
28974
|
for (const state of harnessAvailabilityByHost.values()) {
|
|
28604
28975
|
state.requestGeneration += 1;
|
|
28605
28976
|
state.request = null;
|
|
28977
|
+
state.codexAccounts?.dispose();
|
|
28606
28978
|
if (state.retryTimer !== null) window.clearTimeout(state.retryTimer);
|
|
28607
28979
|
}
|
|
28608
28980
|
harnessAvailabilityByHost.clear();
|
|
@@ -28645,6 +29017,7 @@ ${accounts_default}`;
|
|
|
28645
29017
|
mutationObserver.disconnect();
|
|
28646
29018
|
disposeReasoningSoftWrap();
|
|
28647
29019
|
sidebarAgentIcons.dispose();
|
|
29020
|
+
accountNavigation.dispose();
|
|
28648
29021
|
settingsLifecycle.dispose();
|
|
28649
29022
|
document.removeEventListener("beforeinput", onBeforeInput, true);
|
|
28650
29023
|
document.removeEventListener("submit", onSubmit, true);
|
|
@@ -28655,6 +29028,7 @@ ${accounts_default}`;
|
|
|
28655
29028
|
window.removeEventListener("focus", onWindowFocus);
|
|
28656
29029
|
for (const state of harnessAvailabilityByHost.values()) {
|
|
28657
29030
|
state.requestGeneration += 1;
|
|
29031
|
+
state.codexAccounts?.dispose();
|
|
28658
29032
|
if (state.retryTimer !== null) window.clearTimeout(state.retryTimer);
|
|
28659
29033
|
}
|
|
28660
29034
|
harnessAvailabilityByHost.clear();
|