codex-multi-auth 1.2.7 → 1.3.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 +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +41 -21
- package/dist/index.js.map +1 -1
- package/dist/lib/accounts.d.ts +47 -0
- package/dist/lib/accounts.d.ts.map +1 -1
- package/dist/lib/accounts.js +219 -33
- package/dist/lib/accounts.js.map +1 -1
- package/dist/lib/auth/auth.d.ts +16 -0
- package/dist/lib/auth/auth.d.ts.map +1 -1
- package/dist/lib/auth/auth.js +52 -6
- package/dist/lib/auth/auth.js.map +1 -1
- package/dist/lib/auth/server.d.ts +1 -1
- package/dist/lib/auth/server.d.ts.map +1 -1
- package/dist/lib/auth/server.js +10 -8
- package/dist/lib/auth/server.js.map +1 -1
- package/dist/lib/codex-manager/commands/status.d.ts.map +1 -1
- package/dist/lib/codex-manager/commands/status.js +13 -5
- package/dist/lib/codex-manager/commands/status.js.map +1 -1
- package/dist/lib/codex-manager/commands/verify.d.ts +59 -0
- package/dist/lib/codex-manager/commands/verify.d.ts.map +1 -0
- package/dist/lib/codex-manager/commands/verify.js +332 -0
- package/dist/lib/codex-manager/commands/verify.js.map +1 -0
- package/dist/lib/codex-manager/commands/why-selected.d.ts +57 -0
- package/dist/lib/codex-manager/commands/why-selected.d.ts.map +1 -0
- package/dist/lib/codex-manager/commands/why-selected.js +198 -0
- package/dist/lib/codex-manager/commands/why-selected.js.map +1 -0
- package/dist/lib/codex-manager/help.d.ts.map +1 -1
- package/dist/lib/codex-manager/help.js +4 -0
- package/dist/lib/codex-manager/help.js.map +1 -1
- package/dist/lib/codex-manager/settings-hub/backend.d.ts +9 -0
- package/dist/lib/codex-manager/settings-hub/backend.d.ts.map +1 -0
- package/dist/lib/codex-manager/settings-hub/backend.js +79 -0
- package/dist/lib/codex-manager/settings-hub/backend.js.map +1 -0
- package/dist/lib/codex-manager/settings-hub/dashboard.d.ts +24 -0
- package/dist/lib/codex-manager/settings-hub/dashboard.d.ts.map +1 -0
- package/dist/lib/codex-manager/settings-hub/dashboard.js +223 -0
- package/dist/lib/codex-manager/settings-hub/dashboard.js.map +1 -0
- package/dist/lib/codex-manager/settings-hub/experimental.d.ts +18 -0
- package/dist/lib/codex-manager/settings-hub/experimental.d.ts.map +1 -0
- package/dist/lib/codex-manager/settings-hub/experimental.js +78 -0
- package/dist/lib/codex-manager/settings-hub/experimental.js.map +1 -0
- package/dist/lib/codex-manager/settings-hub/index.d.ts +34 -0
- package/dist/lib/codex-manager/settings-hub/index.d.ts.map +1 -0
- package/dist/lib/codex-manager/settings-hub/index.js +81 -0
- package/dist/lib/codex-manager/settings-hub/index.js.map +1 -0
- package/dist/lib/codex-manager/settings-hub/shared.d.ts +40 -0
- package/dist/lib/codex-manager/settings-hub/shared.d.ts.map +1 -0
- package/dist/lib/codex-manager/settings-hub/shared.js +103 -0
- package/dist/lib/codex-manager/settings-hub/shared.js.map +1 -0
- package/dist/lib/codex-manager/settings-hub.d.ts +1 -64
- package/dist/lib/codex-manager/settings-hub.d.ts.map +1 -1
- package/dist/lib/codex-manager/settings-hub.js +4 -515
- package/dist/lib/codex-manager/settings-hub.js.map +1 -1
- package/dist/lib/codex-manager.d.ts.map +1 -1
- package/dist/lib/codex-manager.js +95 -13
- package/dist/lib/codex-manager.js.map +1 -1
- package/dist/lib/config.d.ts +14 -0
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +21 -9
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/health.d.ts.map +1 -1
- package/dist/lib/health.js.map +1 -1
- package/dist/lib/recovery/storage.d.ts.map +1 -1
- package/dist/lib/recovery/storage.js +112 -8
- package/dist/lib/recovery/storage.js.map +1 -1
- package/dist/lib/request/response-handler.d.ts.map +1 -1
- package/dist/lib/request/response-handler.js +67 -23
- package/dist/lib/request/response-handler.js.map +1 -1
- package/dist/lib/rotation.d.ts +53 -1
- package/dist/lib/rotation.d.ts.map +1 -1
- package/dist/lib/rotation.js +135 -23
- package/dist/lib/rotation.js.map +1 -1
- package/dist/lib/routing-mutex.d.ts +107 -0
- package/dist/lib/routing-mutex.d.ts.map +1 -0
- package/dist/lib/routing-mutex.js +104 -0
- package/dist/lib/routing-mutex.js.map +1 -0
- package/dist/lib/runtime/storage-scope.d.ts.map +1 -1
- package/dist/lib/runtime/storage-scope.js +17 -1
- package/dist/lib/runtime/storage-scope.js.map +1 -1
- package/dist/lib/schemas.d.ts +125 -0
- package/dist/lib/schemas.d.ts.map +1 -1
- package/dist/lib/schemas.js +139 -5
- package/dist/lib/schemas.js.map +1 -1
- package/dist/lib/storage/account-clear.d.ts.map +1 -1
- package/dist/lib/storage/account-clear.js +7 -1
- package/dist/lib/storage/account-clear.js.map +1 -1
- package/dist/lib/storage/flagged-storage-file.d.ts.map +1 -1
- package/dist/lib/storage/flagged-storage-file.js +17 -1
- package/dist/lib/storage/flagged-storage-file.js.map +1 -1
- package/dist/lib/storage/flagged-storage-io.d.ts.map +1 -1
- package/dist/lib/storage/flagged-storage-io.js +24 -10
- package/dist/lib/storage/flagged-storage-io.js.map +1 -1
- package/dist/lib/storage/import-export.d.ts.map +1 -1
- package/dist/lib/storage/import-export.js +16 -4
- package/dist/lib/storage/import-export.js.map +1 -1
- package/dist/lib/storage/paths.d.ts.map +1 -1
- package/dist/lib/storage/paths.js +62 -7
- package/dist/lib/storage/paths.js.map +1 -1
- package/dist/lib/storage/snapshot-inspectors.d.ts.map +1 -1
- package/dist/lib/storage/snapshot-inspectors.js +23 -16
- package/dist/lib/storage/snapshot-inspectors.js.map +1 -1
- package/dist/lib/storage/storage-parser.d.ts +17 -0
- package/dist/lib/storage/storage-parser.d.ts.map +1 -1
- package/dist/lib/storage/storage-parser.js +30 -1
- package/dist/lib/storage/storage-parser.js.map +1 -1
- package/dist/lib/storage.d.ts +1 -1
- package/dist/lib/storage.d.ts.map +1 -1
- package/dist/lib/storage.js +45 -26
- package/dist/lib/storage.js.map +1 -1
- package/dist/lib/ui/copy.d.ts +1 -1
- package/dist/lib/ui/copy.d.ts.map +1 -1
- package/dist/lib/ui/copy.js +2 -1
- package/dist/lib/ui/copy.js.map +1 -1
- package/package.json +5 -5
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PluginConfig } from "../../types.js";
|
|
2
|
+
import { type BackendCategoryOption, type BackendSettingFocusKey } from "../backend-settings-schema.js";
|
|
3
|
+
export declare function promptBackendCategorySettings(initial: PluginConfig, category: BackendCategoryOption, initialFocus: BackendSettingFocusKey): Promise<{
|
|
4
|
+
draft: PluginConfig;
|
|
5
|
+
focusKey: BackendSettingFocusKey;
|
|
6
|
+
}>;
|
|
7
|
+
export declare function promptBackendSettings(initial: PluginConfig): Promise<PluginConfig | null>;
|
|
8
|
+
export declare function configureBackendSettings(currentConfig?: PluginConfig): Promise<PluginConfig>;
|
|
9
|
+
//# sourceMappingURL=backend.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../../../../lib/codex-manager/settings-hub/backend.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAqBnD,OAAO,EAKN,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,MAAM,+BAA+B,CAAC;AAUvC,wBAAsB,6BAA6B,CAClD,OAAO,EAAE,YAAY,EACrB,QAAQ,EAAE,qBAAqB,EAC/B,YAAY,EAAE,sBAAsB,GAClC,OAAO,CAAC;IAAE,KAAK,EAAE,YAAY,CAAC;IAAC,QAAQ,EAAE,sBAAsB,CAAA;CAAE,CAAC,CA0BpE;AAED,wBAAsB,qBAAqB,CAC1C,OAAO,EAAE,YAAY,GACnB,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAqB9B;AAED,wBAAsB,wBAAwB,CAC7C,aAAa,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,YAAY,CAAC,CAavB"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { loadPluginConfig } from "../../config.js";
|
|
2
|
+
import { UI_COPY } from "../../ui/copy.js";
|
|
3
|
+
import { getUiRuntimeOptions } from "../../ui/runtime.js";
|
|
4
|
+
import { select } from "../../ui/select.js";
|
|
5
|
+
import { promptBackendCategorySettingsEntry } from "../backend-category-entry.js";
|
|
6
|
+
import { applyBackendCategoryDefaults, getBackendCategory, getBackendCategoryInitialFocus, resolveFocusedBackendNumberKey, } from "../backend-category-helpers.js";
|
|
7
|
+
import { promptBackendCategorySettingsMenu } from "../backend-category-prompt.js";
|
|
8
|
+
import { configureBackendSettingsController } from "../backend-settings-controller.js";
|
|
9
|
+
import { configureBackendSettingsEntry } from "../backend-settings-entry.js";
|
|
10
|
+
import { backendSettingsEqual, buildBackendSettingsPreview, cloneBackendPluginConfig, formatBackendNumberValue, } from "../backend-settings-helpers.js";
|
|
11
|
+
import { promptBackendSettingsMenu } from "../backend-settings-prompt.js";
|
|
12
|
+
import { BACKEND_CATEGORY_OPTIONS, BACKEND_DEFAULTS, BACKEND_NUMBER_OPTION_BY_KEY, BACKEND_TOGGLE_OPTION_BY_KEY, } from "../backend-settings-schema.js";
|
|
13
|
+
import { formatDashboardSettingState } from "../dashboard-formatters.js";
|
|
14
|
+
import { highlightPreviewToken } from "../settings-preview.js";
|
|
15
|
+
import { clampBackendNumber, isTtyInteractive, persistBackendConfigSelection, } from "./shared.js";
|
|
16
|
+
/* c8 ignore start - interactive prompt flows are covered by integration tests */
|
|
17
|
+
export async function promptBackendCategorySettings(initial, category, initialFocus) {
|
|
18
|
+
return promptBackendCategorySettingsEntry({
|
|
19
|
+
initial,
|
|
20
|
+
category,
|
|
21
|
+
initialFocus,
|
|
22
|
+
promptBackendCategorySettingsMenu,
|
|
23
|
+
ui: getUiRuntimeOptions(),
|
|
24
|
+
cloneBackendPluginConfig,
|
|
25
|
+
buildBackendSettingsPreview,
|
|
26
|
+
highlightPreviewToken,
|
|
27
|
+
resolveFocusedBackendNumberKey,
|
|
28
|
+
clampBackendNumber,
|
|
29
|
+
formatBackendNumberValue,
|
|
30
|
+
formatDashboardSettingState,
|
|
31
|
+
applyBackendCategoryDefaults: (config, selectedCategory) => applyBackendCategoryDefaults(config, selectedCategory, {
|
|
32
|
+
backendDefaults: BACKEND_DEFAULTS,
|
|
33
|
+
numberOptionByKey: BACKEND_NUMBER_OPTION_BY_KEY,
|
|
34
|
+
}),
|
|
35
|
+
getBackendCategoryInitialFocus,
|
|
36
|
+
backendDefaults: BACKEND_DEFAULTS,
|
|
37
|
+
toggleOptionByKey: BACKEND_TOGGLE_OPTION_BY_KEY,
|
|
38
|
+
numberOptionByKey: BACKEND_NUMBER_OPTION_BY_KEY,
|
|
39
|
+
select,
|
|
40
|
+
copy: UI_COPY.settings,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
export async function promptBackendSettings(initial) {
|
|
44
|
+
const interactive = isTtyInteractive();
|
|
45
|
+
if (!interactive) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
return promptBackendSettingsMenu({
|
|
49
|
+
initial,
|
|
50
|
+
isInteractive: () => interactive,
|
|
51
|
+
ui: getUiRuntimeOptions(),
|
|
52
|
+
cloneBackendPluginConfig,
|
|
53
|
+
backendCategoryOptions: BACKEND_CATEGORY_OPTIONS,
|
|
54
|
+
getBackendCategoryInitialFocus,
|
|
55
|
+
buildBackendSettingsPreview,
|
|
56
|
+
highlightPreviewToken,
|
|
57
|
+
select,
|
|
58
|
+
getBackendCategory,
|
|
59
|
+
promptBackendCategorySettings,
|
|
60
|
+
backendDefaults: BACKEND_DEFAULTS,
|
|
61
|
+
copy: UI_COPY.settings,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
export async function configureBackendSettings(currentConfig) {
|
|
65
|
+
return configureBackendSettingsEntry(currentConfig, {
|
|
66
|
+
configureBackendSettingsController,
|
|
67
|
+
cloneBackendPluginConfig,
|
|
68
|
+
loadPluginConfig,
|
|
69
|
+
promptBackendSettings,
|
|
70
|
+
backendSettingsEqual,
|
|
71
|
+
persistBackendConfigSelection,
|
|
72
|
+
isInteractive: isTtyInteractive,
|
|
73
|
+
writeLine: (message) => {
|
|
74
|
+
console.log(message);
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
/* c8 ignore stop */
|
|
79
|
+
//# sourceMappingURL=backend.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backend.js","sourceRoot":"","sources":["../../../../lib/codex-manager/settings-hub/backend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,kCAAkC,EAAE,MAAM,8BAA8B,CAAC;AAClF,OAAO,EACN,4BAA4B,EAC5B,kBAAkB,EAClB,8BAA8B,EAC9B,8BAA8B,GAC9B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,iCAAiC,EAAE,MAAM,+BAA+B,CAAC;AAClF,OAAO,EAAE,kCAAkC,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EACN,oBAAoB,EACpB,2BAA2B,EAC3B,wBAAwB,EACxB,wBAAwB,GACxB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EACN,wBAAwB,EACxB,gBAAgB,EAChB,4BAA4B,EAC5B,4BAA4B,GAG5B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,wB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,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC7C,aAA4B;IAE5B,OAAO,6BAA6B,CAAC,aAAa,EAAE;QACnD,kCAAkC;QAClC,wBAAwB;QACxB,gBAAgB;QAChB,qBAAqB;QACrB,oBAAoB;QACpB,6BAA6B;QAC7B,aAAa,EAAE,gBAAgB;QAC/B,SAAS,EAAE,CAAC,OAAO,EAAE,EAAE;YACtB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACtB,CAAC;KACD,CAAC,CAAC;AACJ,CAAC;AACD,oBAAoB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type DashboardAccentColor, type DashboardDisplaySettings, type DashboardStatuslineField, type DashboardThemePreset } from "../../dashboard-settings.js";
|
|
2
|
+
import { type DashboardDisplaySettingOption } from "../dashboard-display-panel.js";
|
|
3
|
+
export declare const DASHBOARD_DISPLAY_OPTIONS: DashboardDisplaySettingOption[];
|
|
4
|
+
export declare const STATUSLINE_FIELD_OPTIONS: Array<{
|
|
5
|
+
key: DashboardStatuslineField;
|
|
6
|
+
label: string;
|
|
7
|
+
description: string;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const AUTO_RETURN_OPTIONS_MS: readonly [1000, 2000, 4000];
|
|
10
|
+
export declare const MENU_QUOTA_TTL_OPTIONS_MS: readonly [60000, number, number];
|
|
11
|
+
export declare const THEME_PRESET_OPTIONS: DashboardThemePreset[];
|
|
12
|
+
export declare const ACCENT_COLOR_OPTIONS: DashboardAccentColor[];
|
|
13
|
+
export declare const ACCOUNT_LIST_PANEL_KEYS: readonly ["menuShowStatusBadge", "menuShowCurrentBadge", "menuShowLastUsed", "menuShowQuotaSummary", "menuShowQuotaCooldown", "menuShowFetchStatus", "menuShowDetailsForUnselectedRows", "menuHighlightCurrentRow", "menuSortEnabled", "menuSortMode", "menuSortPinCurrent", "menuSortQuickSwitchVisibleRow", "menuLayoutMode"];
|
|
14
|
+
export declare const STATUSLINE_PANEL_KEYS: readonly ["menuStatuslineFields"];
|
|
15
|
+
export declare const BEHAVIOR_PANEL_KEYS: readonly ["actionAutoReturnMs", "actionPauseOnKey", "menuAutoFetchLimits", "menuShowFetchStatus", "menuQuotaTtlMs"];
|
|
16
|
+
export declare const THEME_PANEL_KEYS: readonly ["uiThemePreset", "uiAccentColor"];
|
|
17
|
+
export declare function applyUiThemeFromDashboardSettings(settings: DashboardDisplaySettings): void;
|
|
18
|
+
export declare function promptDashboardDisplaySettings(initial: DashboardDisplaySettings): Promise<DashboardDisplaySettings | null>;
|
|
19
|
+
export declare function configureDashboardDisplaySettings(currentSettings?: DashboardDisplaySettings): Promise<DashboardDisplaySettings>;
|
|
20
|
+
export declare function promptStatuslineSettings(initial: DashboardDisplaySettings): Promise<DashboardDisplaySettings | null>;
|
|
21
|
+
export declare function configureStatuslineSettings(currentSettings?: DashboardDisplaySettings): Promise<DashboardDisplaySettings>;
|
|
22
|
+
export declare function promptBehaviorSettings(initial: DashboardDisplaySettings): Promise<DashboardDisplaySettings | null>;
|
|
23
|
+
export declare function promptThemeSettings(initial: DashboardDisplaySettings): Promise<DashboardDisplaySettings | null>;
|
|
24
|
+
//# sourceMappingURL=dashboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../../../../lib/codex-manager/settings-hub/dashboard.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EAIzB,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAEN,KAAK,6BAA6B,EAClC,MAAM,+BAA+B,CAAC;AA6BvC,eAAO,MAAM,yBAAyB,EAAE,6BAA6B,EAmDpE,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC;IAC5C,GAAG,EAAE,wBAAwB,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACpB,CAgBA,CAAC;AAEF,eAAO,MAAM,sBAAsB,6BAAiC,CAAC;AACrE,eAAO,MAAM,yBAAyB,kCAI5B,CAAC;AACX,eAAO,MAAM,oBAAoB,EAAE,oBAAoB,EAAsB,CAAC;AAC9E,eAAO,MAAM,oBAAoB,EAAE,oBAAoB,EAKtD,CAAC;AAEF,eAAO,MAAM,uBAAuB,iUAce,CAAC;AAEpD,eAAO,MAAM,qBAAqB,mCAEiB,CAAC;AACpD,eAAO,MAAM,mBAAmB,qHAMmB,CAAC;AACpD,eAAO,MAAM,gBAAgB,6CAGsB,CAAC;AAEpD,wBAAgB,iCAAiC,CAChD,QAAQ,EAAE,wBAAwB,GAChC,IAAI,CASN;AAGD,wBAAsB,8BAA8B,CACnD,OAAO,EAAE,wBAAwB,GAC/B,OAAO,CAAC,wBAAwB,GAAG,IAAI,CAAC,CAgB1C;AAED,wBAAsB,iCAAiC,CACtD,eAAe,CAAC,EAAE,wBAAwB,GACxC,OAAO,CAAC,wBAAwB,CAAC,CAmBnC;AAED,wBAAsB,wBAAwB,CAC7C,OAAO,EAAE,wBAAwB,GAC/B,OAAO,CAAC,wBAAwB,GAAG,IAAI,CAAC,CAa1C;AAED,wBAAsB,2BAA2B,CAChD,eAAe,CAAC,EAAE,wBAAwB,GACxC,OAAO,CAAC,wBAAwB,CAAC,CAmBnC;AAED,wBAAsB,sBAAsB,CAC3C,OAAO,EAAE,wBAAwB,GAC/B,OAAO,CAAC,wBAAwB,GAAG,IAAI,CAAC,CAY1C;AAED,wBAAsB,mBAAmB,CACxC,OAAO,EAAE,wBAAwB,GAC/B,OAAO,CAAC,wBAAwB,GAAG,IAAI,CAAC,CAY1C"}
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import { DEFAULT_DASHBOARD_DISPLAY_SETTINGS, getDashboardSettingsPath, loadDashboardDisplaySettings, } from "../../dashboard-settings.js";
|
|
2
|
+
import { UI_COPY } from "../../ui/copy.js";
|
|
3
|
+
import { getUiRuntimeOptions, setUiRuntimeOptions } from "../../ui/runtime.js";
|
|
4
|
+
import { promptBehaviorSettingsPanel } from "../behavior-settings-panel.js";
|
|
5
|
+
import { promptDashboardDisplayPanel, } from "../dashboard-display-panel.js";
|
|
6
|
+
import { formatDashboardSettingState, formatMenuLayoutMode, formatMenuQuotaTtl, formatMenuSortMode, } from "../dashboard-formatters.js";
|
|
7
|
+
import { configureDashboardSettingsController } from "../dashboard-settings-controller.js";
|
|
8
|
+
import { configureDashboardSettingsEntry } from "../dashboard-settings-entry.js";
|
|
9
|
+
import { promptBehaviorSettingsPanelEntry, promptDashboardDisplaySettingsPanelEntry, promptStatuslineSettingsPanelEntry, promptThemeSettingsPanelEntry, } from "../settings-panels.js";
|
|
10
|
+
import { normalizeStatuslineFields } from "../settings-preview.js";
|
|
11
|
+
import { promptStatuslineSettingsPanel } from "../statusline-settings-panel.js";
|
|
12
|
+
import { promptThemeSettingsPanel } from "../theme-settings-panel.js";
|
|
13
|
+
import { applyDashboardDefaultsForKeys, buildAccountListPreview, cloneDashboardSettings, dashboardSettingsEqual, isTtyInteractive, persistDashboardSettingsSelection, resolveMenuLayoutMode, } from "./shared.js";
|
|
14
|
+
export const DASHBOARD_DISPLAY_OPTIONS = [
|
|
15
|
+
{
|
|
16
|
+
key: "menuShowStatusBadge",
|
|
17
|
+
label: "Show Status Badges",
|
|
18
|
+
description: "Show [ok], [active], and similar badges.",
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
key: "menuShowCurrentBadge",
|
|
22
|
+
label: "Show [current]",
|
|
23
|
+
description: "Mark the account active in Codex.",
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
key: "menuShowLastUsed",
|
|
27
|
+
label: "Show Last Used",
|
|
28
|
+
description: "Show relative usage like 'today'.",
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
key: "menuShowQuotaSummary",
|
|
32
|
+
label: "Show Limits (5h / 7d)",
|
|
33
|
+
description: "Show limit bars in each row.",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
key: "menuShowQuotaCooldown",
|
|
37
|
+
label: "Show Limit Cooldowns",
|
|
38
|
+
description: "Show reset timers next to 5h/7d bars.",
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
key: "menuShowFetchStatus",
|
|
42
|
+
label: "Show Fetch Status",
|
|
43
|
+
description: "Show background limit refresh status in the menu subtitle.",
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
key: "menuHighlightCurrentRow",
|
|
47
|
+
label: "Highlight Current Row",
|
|
48
|
+
description: "Use stronger color on the current row.",
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
key: "menuSortEnabled",
|
|
52
|
+
label: "Enable Smart Sort",
|
|
53
|
+
description: "Sort accounts by readiness (view only).",
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
key: "menuSortPinCurrent",
|
|
57
|
+
label: "Pin [current] when tied",
|
|
58
|
+
description: "Keep current at top only when it is equally ready.",
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
key: "menuSortQuickSwitchVisibleRow",
|
|
62
|
+
label: "Quick Switch Uses Visible Rows",
|
|
63
|
+
description: "Number keys (1-9) follow what you see in the list.",
|
|
64
|
+
},
|
|
65
|
+
];
|
|
66
|
+
export const STATUSLINE_FIELD_OPTIONS = [
|
|
67
|
+
{
|
|
68
|
+
key: "last-used",
|
|
69
|
+
label: "Show Last Used",
|
|
70
|
+
description: "Example: 'today' or '2d ago'.",
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
key: "limits",
|
|
74
|
+
label: "Show Limits (5h / 7d)",
|
|
75
|
+
description: "Uses cached limit data from checks.",
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
key: "status",
|
|
79
|
+
label: "Show Status Text",
|
|
80
|
+
description: "Visible when badges are hidden.",
|
|
81
|
+
},
|
|
82
|
+
];
|
|
83
|
+
export const AUTO_RETURN_OPTIONS_MS = [1_000, 2_000, 4_000];
|
|
84
|
+
export const MENU_QUOTA_TTL_OPTIONS_MS = [
|
|
85
|
+
60_000,
|
|
86
|
+
5 * 60_000,
|
|
87
|
+
10 * 60_000,
|
|
88
|
+
];
|
|
89
|
+
export const THEME_PRESET_OPTIONS = ["green", "blue"];
|
|
90
|
+
export const ACCENT_COLOR_OPTIONS = [
|
|
91
|
+
"green",
|
|
92
|
+
"cyan",
|
|
93
|
+
"blue",
|
|
94
|
+
"yellow",
|
|
95
|
+
];
|
|
96
|
+
export const ACCOUNT_LIST_PANEL_KEYS = [
|
|
97
|
+
"menuShowStatusBadge",
|
|
98
|
+
"menuShowCurrentBadge",
|
|
99
|
+
"menuShowLastUsed",
|
|
100
|
+
"menuShowQuotaSummary",
|
|
101
|
+
"menuShowQuotaCooldown",
|
|
102
|
+
"menuShowFetchStatus",
|
|
103
|
+
"menuShowDetailsForUnselectedRows",
|
|
104
|
+
"menuHighlightCurrentRow",
|
|
105
|
+
"menuSortEnabled",
|
|
106
|
+
"menuSortMode",
|
|
107
|
+
"menuSortPinCurrent",
|
|
108
|
+
"menuSortQuickSwitchVisibleRow",
|
|
109
|
+
"menuLayoutMode",
|
|
110
|
+
];
|
|
111
|
+
export const STATUSLINE_PANEL_KEYS = [
|
|
112
|
+
"menuStatuslineFields",
|
|
113
|
+
];
|
|
114
|
+
export const BEHAVIOR_PANEL_KEYS = [
|
|
115
|
+
"actionAutoReturnMs",
|
|
116
|
+
"actionPauseOnKey",
|
|
117
|
+
"menuAutoFetchLimits",
|
|
118
|
+
"menuShowFetchStatus",
|
|
119
|
+
"menuQuotaTtlMs",
|
|
120
|
+
];
|
|
121
|
+
export const THEME_PANEL_KEYS = [
|
|
122
|
+
"uiThemePreset",
|
|
123
|
+
"uiAccentColor",
|
|
124
|
+
];
|
|
125
|
+
export function applyUiThemeFromDashboardSettings(settings) {
|
|
126
|
+
const current = getUiRuntimeOptions();
|
|
127
|
+
setUiRuntimeOptions({
|
|
128
|
+
v2Enabled: current.v2Enabled,
|
|
129
|
+
colorProfile: current.colorProfile,
|
|
130
|
+
glyphMode: current.glyphMode,
|
|
131
|
+
palette: settings.uiThemePreset ?? "green",
|
|
132
|
+
accent: settings.uiAccentColor ?? "green",
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
/* c8 ignore start - interactive prompt flows are covered by integration tests */
|
|
136
|
+
export async function promptDashboardDisplaySettings(initial) {
|
|
137
|
+
return promptDashboardDisplaySettingsPanelEntry({
|
|
138
|
+
initial,
|
|
139
|
+
promptDashboardDisplayPanel,
|
|
140
|
+
cloneDashboardSettings,
|
|
141
|
+
buildAccountListPreview,
|
|
142
|
+
formatDashboardSettingState,
|
|
143
|
+
formatMenuSortMode,
|
|
144
|
+
resolveMenuLayoutMode: (settings = DEFAULT_DASHBOARD_DISPLAY_SETTINGS) => resolveMenuLayoutMode(settings),
|
|
145
|
+
formatMenuLayoutMode,
|
|
146
|
+
applyDashboardDefaultsForKeys,
|
|
147
|
+
DASHBOARD_DISPLAY_OPTIONS,
|
|
148
|
+
ACCOUNT_LIST_PANEL_KEYS,
|
|
149
|
+
UI_COPY,
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
export async function configureDashboardDisplaySettings(currentSettings) {
|
|
153
|
+
return configureDashboardSettingsEntry(currentSettings, {
|
|
154
|
+
configureDashboardSettingsController,
|
|
155
|
+
loadDashboardDisplaySettings,
|
|
156
|
+
promptSettings: promptDashboardDisplaySettings,
|
|
157
|
+
settingsEqual: dashboardSettingsEqual,
|
|
158
|
+
persistSelection: (selected) => persistDashboardSettingsSelection(selected, ACCOUNT_LIST_PANEL_KEYS, "account-list"),
|
|
159
|
+
applyUiThemeFromDashboardSettings,
|
|
160
|
+
isInteractive: isTtyInteractive,
|
|
161
|
+
getDashboardSettingsPath,
|
|
162
|
+
writeLine: (message) => {
|
|
163
|
+
console.log(message);
|
|
164
|
+
},
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
export async function promptStatuslineSettings(initial) {
|
|
168
|
+
return promptStatuslineSettingsPanelEntry({
|
|
169
|
+
initial,
|
|
170
|
+
promptStatuslineSettingsPanel,
|
|
171
|
+
cloneDashboardSettings,
|
|
172
|
+
buildAccountListPreview,
|
|
173
|
+
normalizeStatuslineFields,
|
|
174
|
+
formatDashboardSettingState,
|
|
175
|
+
applyDashboardDefaultsForKeys,
|
|
176
|
+
STATUSLINE_FIELD_OPTIONS,
|
|
177
|
+
STATUSLINE_PANEL_KEYS,
|
|
178
|
+
UI_COPY,
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
export async function configureStatuslineSettings(currentSettings) {
|
|
182
|
+
return configureDashboardSettingsEntry(currentSettings, {
|
|
183
|
+
configureDashboardSettingsController,
|
|
184
|
+
loadDashboardDisplaySettings,
|
|
185
|
+
promptSettings: promptStatuslineSettings,
|
|
186
|
+
settingsEqual: dashboardSettingsEqual,
|
|
187
|
+
persistSelection: (selected) => persistDashboardSettingsSelection(selected, STATUSLINE_PANEL_KEYS, "summary-fields"),
|
|
188
|
+
applyUiThemeFromDashboardSettings,
|
|
189
|
+
isInteractive: isTtyInteractive,
|
|
190
|
+
getDashboardSettingsPath,
|
|
191
|
+
writeLine: (message) => {
|
|
192
|
+
console.log(message);
|
|
193
|
+
},
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
export async function promptBehaviorSettings(initial) {
|
|
197
|
+
return promptBehaviorSettingsPanelEntry({
|
|
198
|
+
initial,
|
|
199
|
+
promptBehaviorSettingsPanel,
|
|
200
|
+
cloneDashboardSettings,
|
|
201
|
+
applyDashboardDefaultsForKeys,
|
|
202
|
+
formatMenuQuotaTtl,
|
|
203
|
+
AUTO_RETURN_OPTIONS_MS,
|
|
204
|
+
MENU_QUOTA_TTL_OPTIONS_MS,
|
|
205
|
+
BEHAVIOR_PANEL_KEYS,
|
|
206
|
+
UI_COPY,
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
export async function promptThemeSettings(initial) {
|
|
210
|
+
return promptThemeSettingsPanelEntry({
|
|
211
|
+
initial,
|
|
212
|
+
promptThemeSettingsPanel,
|
|
213
|
+
cloneDashboardSettings,
|
|
214
|
+
applyDashboardDefaultsForKeys,
|
|
215
|
+
applyUiThemeFromDashboardSettings,
|
|
216
|
+
THEME_PRESET_OPTIONS,
|
|
217
|
+
ACCENT_COLOR_OPTIONS,
|
|
218
|
+
THEME_PANEL_KEYS,
|
|
219
|
+
UI_COPY,
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
/* c8 ignore stop */
|
|
223
|
+
//# sourceMappingURL=dashboard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../../../../lib/codex-manager/settings-hub/dashboard.ts"],"names":[],"mappings":"AAAA,OAAO,EAKN,kCAAkC,EAClC,wBAAwB,EACxB,4BAA4B,GAC5B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EACN,2BAA2B,GAE3B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACN,2BAA2B,EAC3B,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,GAClB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,oCAAoC,EAAE,MAAM,qCAAqC,CAAC;AAC3F,OAAO,EAAE,+BAA+B,EAAE,MAAM,gCAAgC,CAAC;AACjF,OAAO,EACN,gCAAgC,EAChC,wCAAwC,EACxC,kCAAkC,EAClC,6BAA6B,GAC7B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAA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AAwB;QACxB,qBAAqB;QACrB,OAAO;KACP,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAChD,eAA0C;IAE1C,OAAO,+BAA+B,CAAC,eAAe,EAAE;QACvD,oCAAoC;QACpC,4BAA4B;QAC5B,cAAc,EAAE,wBAAwB;QACxC,aAAa,EAAE,sBAAsB;QACrC,gBAAgB,EAAE,CAAC,QAAQ,EAAE,EAAE,CAC9B,iCAAiC,CAChC,QAAQ,EACR,qBAAqB,EACrB,gBAAgB,CAChB;QACF,iCAAiC;QACjC,aAAa,EAAE,gBAAgB;QAC/B,wBAAwB;QACxB,SAAS,EAAE,CAAC,OAAO,EAAE,EAAE;YACtB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACtB,CAAC;KACD,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC3C,OAAiC;IAEjC,OAAO,gCAAgC,CAAC;QACvC,OAAO;QACP,2BAA2B;QAC3B,sBAAsB;QACtB,6BAA6B;QAC7B,kBAAkB;QAClB,sBAAsB;QACtB,yBAAyB;QACzB,mBAAmB;QACnB,OAAO;KACP,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACxC,OAAiC;IAEjC,OAAO,6BAA6B,CAAC;QACpC,OAAO;QACP,wBAAwB;QACxB,sBAAsB;QACtB,6BAA6B;QAC7B,iCAAiC;QACjC,oBAAoB;QACpB,oBAAoB;QACpB,gBAAgB;QAChB,OAAO;KACP,CAAC,CAAC;AACJ,CAAC;AACD,oBAAoB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { detectOcChatgptMultiAuthTarget } from "../../oc-chatgpt-target-detection.js";
|
|
2
|
+
import type { PluginConfig } from "../../types.js";
|
|
3
|
+
export declare function loadExperimentalSyncTarget(): Promise<{
|
|
4
|
+
kind: "blocked-ambiguous";
|
|
5
|
+
detection: ReturnType<typeof detectOcChatgptMultiAuthTarget>;
|
|
6
|
+
} | {
|
|
7
|
+
kind: "blocked-none";
|
|
8
|
+
detection: ReturnType<typeof detectOcChatgptMultiAuthTarget>;
|
|
9
|
+
} | {
|
|
10
|
+
kind: "error";
|
|
11
|
+
message: string;
|
|
12
|
+
} | {
|
|
13
|
+
kind: "target";
|
|
14
|
+
detection: ReturnType<typeof detectOcChatgptMultiAuthTarget>;
|
|
15
|
+
destination: import("../../storage.js").AccountStorageV3 | null;
|
|
16
|
+
}>;
|
|
17
|
+
export declare function promptExperimentalSettings(initialConfig: PluginConfig): Promise<PluginConfig | null>;
|
|
18
|
+
//# sourceMappingURL=experimental.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"experimental.d.ts","sourceRoot":"","sources":["../../../../lib/codex-manager/settings-hub/experimental.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAEtF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAmBnD,wBAAsB,0BAA0B,IAAI,OAAO,CACxD;IACA,IAAI,EAAE,mBAAmB,CAAC;IAC1B,SAAS,EAAE,UAAU,CAAC,OAAO,8BAA8B,CAAC,CAAC;CAC5D,GACD;IACA,IAAI,EAAE,cAAc,CAAC;IACrB,SAAS,EAAE,UAAU,CAAC,OAAO,8BAA8B,CAAC,CAAC;CAC5D,GACD;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAClC;IACA,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,UAAU,CAAC,OAAO,8BAA8B,CAAC,CAAC;IAC7D,WAAW,EAAE,OAAO,kBAAkB,EAAE,gBAAgB,GAAG,IAAI,CAAC;CAC/D,CACH,CAQA;AAGD,wBAAsB,0BAA0B,CAC/C,aAAa,EAAE,YAAY,GACzB,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAmF9B"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { stdin as input, stdout as output } from "node:process";
|
|
2
|
+
import { applyOcChatgptSync, planOcChatgptSync, runNamedBackupExport, } from "../../oc-chatgpt-orchestrator.js";
|
|
3
|
+
import { detectOcChatgptMultiAuthTarget } from "../../oc-chatgpt-target-detection.js";
|
|
4
|
+
import { loadAccounts, normalizeAccountStorage } from "../../storage.js";
|
|
5
|
+
import { UI_COPY } from "../../ui/copy.js";
|
|
6
|
+
import { getUiRuntimeOptions } from "../../ui/runtime.js";
|
|
7
|
+
import { select } from "../../ui/select.js";
|
|
8
|
+
import { sleep } from "../../utils.js";
|
|
9
|
+
import { cloneBackendPluginConfig } from "../backend-settings-helpers.js";
|
|
10
|
+
import { formatDashboardSettingState } from "../dashboard-formatters.js";
|
|
11
|
+
import { promptExperimentalSettingsEntry } from "../experimental-settings-entry.js";
|
|
12
|
+
import { promptExperimentalSettingsMenu } from "../experimental-settings-prompt.js";
|
|
13
|
+
import { getExperimentalSelectOptions, mapExperimentalMenuHotkey, mapExperimentalStatusHotkey, } from "../experimental-settings-schema.js";
|
|
14
|
+
import { loadExperimentalSyncTargetState } from "../experimental-sync-target.js";
|
|
15
|
+
import { loadExperimentalSyncTargetEntry } from "../experimental-sync-target-entry.js";
|
|
16
|
+
import { readFileWithRetry } from "../settings-persist-utils.js";
|
|
17
|
+
import { isTtyInteractive } from "./shared.js";
|
|
18
|
+
export async function loadExperimentalSyncTarget() {
|
|
19
|
+
return loadExperimentalSyncTargetEntry({
|
|
20
|
+
loadExperimentalSyncTargetState,
|
|
21
|
+
detectTarget: detectOcChatgptMultiAuthTarget,
|
|
22
|
+
readFileWithRetry,
|
|
23
|
+
normalizeAccountStorage,
|
|
24
|
+
sleep,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
/* c8 ignore start - interactive prompt flows are covered by integration tests */
|
|
28
|
+
export async function promptExperimentalSettings(initialConfig) {
|
|
29
|
+
return promptExperimentalSettingsEntry({
|
|
30
|
+
initialConfig,
|
|
31
|
+
promptExperimentalSettingsMenu,
|
|
32
|
+
isInteractive: isTtyInteractive,
|
|
33
|
+
ui: getUiRuntimeOptions(),
|
|
34
|
+
cloneBackendPluginConfig,
|
|
35
|
+
select,
|
|
36
|
+
getExperimentalSelectOptions,
|
|
37
|
+
mapExperimentalMenuHotkey,
|
|
38
|
+
mapExperimentalStatusHotkey,
|
|
39
|
+
formatDashboardSettingState,
|
|
40
|
+
copy: UI_COPY.settings,
|
|
41
|
+
input,
|
|
42
|
+
output,
|
|
43
|
+
runNamedBackupExport,
|
|
44
|
+
loadAccounts,
|
|
45
|
+
loadExperimentalSyncTarget,
|
|
46
|
+
planOcChatgptSync,
|
|
47
|
+
applyOcChatgptSync,
|
|
48
|
+
getTargetKind: (targetState) => targetState.kind,
|
|
49
|
+
getTargetDestination: (targetState) => targetState.destination ?? null,
|
|
50
|
+
getTargetDetection: (targetState) => targetState.detection,
|
|
51
|
+
getTargetErrorMessage: (targetState) => targetState.kind === "error"
|
|
52
|
+
? (targetState.message ?? "Unknown error")
|
|
53
|
+
: null,
|
|
54
|
+
getPlanKind: (plan) => plan.kind,
|
|
55
|
+
getPlanBlockedReason: (plan) => {
|
|
56
|
+
const candidate = plan;
|
|
57
|
+
return candidate.kind === "blocked-ambiguous"
|
|
58
|
+
? `Sync blocked: ${candidate.detection?.reason ?? "unknown"}`
|
|
59
|
+
: `Sync unavailable: ${candidate.detection?.reason ?? "unknown"}`;
|
|
60
|
+
},
|
|
61
|
+
getPlanPreview: (plan) => plan.preview,
|
|
62
|
+
getAppliedLabel: (applied) => {
|
|
63
|
+
const candidate = applied;
|
|
64
|
+
return {
|
|
65
|
+
label: candidate.kind === "applied"
|
|
66
|
+
? `Applied sync to ${candidate.target?.accountPath ?? "target"}`
|
|
67
|
+
: candidate.kind === "error"
|
|
68
|
+
? candidate.error instanceof Error
|
|
69
|
+
? candidate.error.message
|
|
70
|
+
: String(candidate.error)
|
|
71
|
+
: "Sync did not apply",
|
|
72
|
+
color: candidate.kind === "applied" ? "green" : "yellow",
|
|
73
|
+
};
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
/* c8 ignore stop */
|
|
78
|
+
//# sourceMappingURL=experimental.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"experimental.js","sourceRoot":"","sources":["../../../../lib/codex-manager/settings-hub/experimental.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,KAAK,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EACN,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,GACpB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAEzE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,8BAA8B,EAAE,MAAM,oCAAoC,CAAC;AACpF,OAAO,EACN,4BAA4B,EAC5B,yBAAyB,EACzB,2BAA2B,GAC3B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,+BAA+B,EAAE,MAAM,gCAAgC,CAAC;AACjF,OAAO,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CA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iBAAiB,SAAS,CAAC,SAAS,EAAE,MAAM,IAAI,SAAS,EAAE;gBAC7D,CAAC,CAAC,qBAAqB,SAAS,CAAC,SAAS,EAAE,MAAM,IAAI,SAAS,EAAE,CAAC;QACpE,CAAC;QACD,cAAc,EAAE,CAAC,IAAI,EAAE,EAAE,CAEvB,IASA,CAAC,OAAO;QACV,eAAe,EAAE,CAAC,OAAO,EAAE,EAAE;YAC5B,MAAM,SAAS,GAAG,OAIjB,CAAC;YACF,OAAO;gBACN,KAAK,EACJ,SAAS,CAAC,IAAI,KAAK,SAAS;oBAC3B,CAAC,CAAC,mBAAmB,SAAS,CAAC,MAAM,EAAE,WAAW,IAAI,QAAQ,EAAE;oBAChE,CAAC,CAAC,SAAS,CAAC,IAAI,KAAK,OAAO;wBAC3B,CAAC,CAAC,SAAS,CAAC,KAAK,YAAY,KAAK;4BACjC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO;4BACzB,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC;wBAC1B,CAAC,CAAC,oBAAoB;gBACzB,KAAK,EAAE,SAAS,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ;aACxD,CAAC;QACH,CAAC;KACD,CAAC,CAAC;AACJ,CAAC;AACD,oBAAoB"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type DashboardDisplaySettings } from "../../dashboard-settings.js";
|
|
2
|
+
import { clampBackendNumberForTests } from "../backend-settings-helpers.js";
|
|
3
|
+
import { formatMenuLayoutMode } from "../dashboard-formatters.js";
|
|
4
|
+
import { mapExperimentalMenuHotkey, mapExperimentalStatusHotkey } from "../experimental-settings-schema.js";
|
|
5
|
+
import { reorderStatuslineField } from "../settings-panels.js";
|
|
6
|
+
import { normalizeStatuslineFields } from "../settings-preview.js";
|
|
7
|
+
import { promptBackendSettings } from "./backend.js";
|
|
8
|
+
import { applyUiThemeFromDashboardSettings, promptBehaviorSettings, promptDashboardDisplaySettings, promptStatuslineSettings, promptThemeSettings } from "./dashboard.js";
|
|
9
|
+
import { loadExperimentalSyncTarget, promptExperimentalSettings } from "./experimental.js";
|
|
10
|
+
import { buildAccountListPreview, buildSummaryPreviewText, cloneDashboardSettings, persistBackendConfigSelectionForTests, persistDashboardSettingsSelectionForTests, resolveMenuLayoutMode, withQueuedRetryForTests } from "./shared.js";
|
|
11
|
+
declare function configureUnifiedSettings(initialSettings?: DashboardDisplaySettings): Promise<DashboardDisplaySettings>;
|
|
12
|
+
declare const __testOnly: {
|
|
13
|
+
clampBackendNumber: typeof clampBackendNumberForTests;
|
|
14
|
+
formatMenuLayoutMode: typeof formatMenuLayoutMode;
|
|
15
|
+
cloneDashboardSettings: typeof cloneDashboardSettings;
|
|
16
|
+
withQueuedRetry: typeof withQueuedRetryForTests;
|
|
17
|
+
loadExperimentalSyncTarget: typeof loadExperimentalSyncTarget;
|
|
18
|
+
mapExperimentalMenuHotkey: typeof mapExperimentalMenuHotkey;
|
|
19
|
+
mapExperimentalStatusHotkey: typeof mapExperimentalStatusHotkey;
|
|
20
|
+
promptExperimentalSettings: typeof promptExperimentalSettings;
|
|
21
|
+
persistDashboardSettingsSelection: typeof persistDashboardSettingsSelectionForTests;
|
|
22
|
+
persistBackendConfigSelection: typeof persistBackendConfigSelectionForTests;
|
|
23
|
+
buildAccountListPreview: typeof buildAccountListPreview;
|
|
24
|
+
buildSummaryPreviewText: typeof buildSummaryPreviewText;
|
|
25
|
+
normalizeStatuslineFields: typeof normalizeStatuslineFields;
|
|
26
|
+
reorderField: typeof reorderStatuslineField;
|
|
27
|
+
promptDashboardDisplaySettings: typeof promptDashboardDisplaySettings;
|
|
28
|
+
promptStatuslineSettings: typeof promptStatuslineSettings;
|
|
29
|
+
promptBehaviorSettings: typeof promptBehaviorSettings;
|
|
30
|
+
promptThemeSettings: typeof promptThemeSettings;
|
|
31
|
+
promptBackendSettings: typeof promptBackendSettings;
|
|
32
|
+
};
|
|
33
|
+
export { configureUnifiedSettings, applyUiThemeFromDashboardSettings, resolveMenuLayoutMode, __testOnly, };
|
|
34
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../lib/codex-manager/settings-hub/index.ts"],"names":[],"mappings":"AACA,OAAO,EACN,KAAK,wBAAwB,EAE7B,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAEN,0BAA0B,EAE1B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EACN,yBAAyB,EACzB,2BAA2B,EAC3B,MAAM,oCAAoC,CAAC;AAO5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAMnE,OAAO,EAA4B,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAC/E,OAAO,EACN,iCAAiC,EAIjC,sBAAsB,EACtB,8BAA8B,EAC9B,wBAAwB,EACxB,mBAAmB,EAEnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACN,0BAA0B,EAC1B,0BAA0B,EAC1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACN,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EAItB,qCAAqC,EAErC,yCAAyC,EACzC,qBAAqB,EAErB,uBAAuB,EACvB,MAAM,aAAa,CAAC;AAqBrB,iBAAe,wBAAwB,CACtC,eAAe,CAAC,EAAE,wBAAwB,GACxC,OAAO,CAAC,wBAAwB,CAAC,CAuBnC;AAED,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;CAoBf,CAAC;AAEF,OAAO,EACN,wBAAwB,EACxB,iCAAiC,EACjC,qBAAqB,EACrB,UAAU,GACV,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { loadPluginConfig } from "../../config.js";
|
|
2
|
+
import { loadDashboardDisplaySettings, } from "../../dashboard-settings.js";
|
|
3
|
+
import { UI_COPY } from "../../ui/copy.js";
|
|
4
|
+
import { getUiRuntimeOptions } from "../../ui/runtime.js";
|
|
5
|
+
import { select } from "../../ui/select.js";
|
|
6
|
+
import { backendSettingsEqual, clampBackendNumberForTests, cloneBackendPluginConfig, } from "../backend-settings-helpers.js";
|
|
7
|
+
import { formatMenuLayoutMode } from "../dashboard-formatters.js";
|
|
8
|
+
import { mapExperimentalMenuHotkey, mapExperimentalStatusHotkey, } from "../experimental-settings-schema.js";
|
|
9
|
+
import { promptSettingsHubEntry } from "../settings-hub-entry.js";
|
|
10
|
+
import { buildSettingsHubItems, findSettingsHubInitialCursor, } from "../settings-hub-menu.js";
|
|
11
|
+
import { promptSettingsHubMenu } from "../settings-hub-prompt.js";
|
|
12
|
+
import { reorderStatuslineField } from "../settings-panels.js";
|
|
13
|
+
import { normalizeStatuslineFields } from "../settings-preview.js";
|
|
14
|
+
import { configureUnifiedSettingsController, } from "../unified-settings-controller.js";
|
|
15
|
+
import { configureUnifiedSettingsEntry } from "../unified-settings-entry.js";
|
|
16
|
+
import { configureBackendSettings, promptBackendSettings } from "./backend.js";
|
|
17
|
+
import { applyUiThemeFromDashboardSettings, BEHAVIOR_PANEL_KEYS, configureDashboardDisplaySettings, configureStatuslineSettings, promptBehaviorSettings, promptDashboardDisplaySettings, promptStatuslineSettings, promptThemeSettings, THEME_PANEL_KEYS, } from "./dashboard.js";
|
|
18
|
+
import { loadExperimentalSyncTarget, promptExperimentalSettings, } from "./experimental.js";
|
|
19
|
+
import { buildAccountListPreview, buildSummaryPreviewText, cloneDashboardSettings, dashboardSettingsEqual, isTtyInteractive, persistBackendConfigSelection, persistBackendConfigSelectionForTests, persistDashboardSettingsSelection, persistDashboardSettingsSelectionForTests, resolveMenuLayoutMode, withQueuedRetryForTests, } from "./shared.js";
|
|
20
|
+
async function promptSettingsHub(initialFocus = "account-list") {
|
|
21
|
+
return promptSettingsHubEntry({
|
|
22
|
+
initialFocus,
|
|
23
|
+
promptSettingsHubMenu,
|
|
24
|
+
isInteractive: isTtyInteractive,
|
|
25
|
+
getUiRuntimeOptions,
|
|
26
|
+
buildItems: () => buildSettingsHubItems(UI_COPY.settings),
|
|
27
|
+
findInitialCursor: findSettingsHubInitialCursor,
|
|
28
|
+
select,
|
|
29
|
+
copy: {
|
|
30
|
+
title: UI_COPY.settings.title,
|
|
31
|
+
subtitle: UI_COPY.settings.subtitle,
|
|
32
|
+
help: UI_COPY.settings.help,
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
async function configureUnifiedSettings(initialSettings) {
|
|
37
|
+
return configureUnifiedSettingsEntry(initialSettings, {
|
|
38
|
+
configureUnifiedSettingsController,
|
|
39
|
+
cloneDashboardSettings,
|
|
40
|
+
cloneBackendPluginConfig,
|
|
41
|
+
loadDashboardDisplaySettings,
|
|
42
|
+
loadPluginConfig,
|
|
43
|
+
applyUiThemeFromDashboardSettings,
|
|
44
|
+
promptSettingsHub: async (focus) => promptSettingsHub(focus),
|
|
45
|
+
configureDashboardDisplaySettings,
|
|
46
|
+
configureStatuslineSettings,
|
|
47
|
+
promptBehaviorSettings,
|
|
48
|
+
promptThemeSettings,
|
|
49
|
+
dashboardSettingsEqual,
|
|
50
|
+
persistDashboardSettingsSelection,
|
|
51
|
+
promptExperimentalSettings,
|
|
52
|
+
backendSettingsEqual,
|
|
53
|
+
persistBackendConfigSelection,
|
|
54
|
+
configureBackendSettings,
|
|
55
|
+
BEHAVIOR_PANEL_KEYS,
|
|
56
|
+
THEME_PANEL_KEYS,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
const __testOnly = {
|
|
60
|
+
clampBackendNumber: clampBackendNumberForTests,
|
|
61
|
+
formatMenuLayoutMode,
|
|
62
|
+
cloneDashboardSettings,
|
|
63
|
+
withQueuedRetry: withQueuedRetryForTests,
|
|
64
|
+
loadExperimentalSyncTarget,
|
|
65
|
+
mapExperimentalMenuHotkey,
|
|
66
|
+
mapExperimentalStatusHotkey,
|
|
67
|
+
promptExperimentalSettings,
|
|
68
|
+
persistDashboardSettingsSelection: persistDashboardSettingsSelectionForTests,
|
|
69
|
+
persistBackendConfigSelection: persistBackendConfigSelectionForTests,
|
|
70
|
+
buildAccountListPreview,
|
|
71
|
+
buildSummaryPreviewText,
|
|
72
|
+
normalizeStatuslineFields,
|
|
73
|
+
reorderField: reorderStatuslineField,
|
|
74
|
+
promptDashboardDisplaySettings,
|
|
75
|
+
promptStatuslineSettings,
|
|
76
|
+
promptBehaviorSettings,
|
|
77
|
+
promptThemeSettings,
|
|
78
|
+
promptBackendSettings,
|
|
79
|
+
};
|
|
80
|
+
export { configureUnifiedSettings, applyUiThemeFromDashboardSettings, resolveMenuLayoutMode, __testOnly, };
|
|
81
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/codex-manager/settings-hub/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAEN,4BAA4B,GAC5B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EACN,oBAAoB,EACpB,0BAA0B,EAC1B,wBAAwB,GACxB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EACN,yBAAyB,EACzB,2BAA2B,GAC3B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EACN,qBAAqB,EACrB,4BAA4B,GAC5B,MAAM,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