dsh-codex-subscription 3.2.21 → 3.2.23
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.de.md +4 -4
- package/README.en.md +4 -4
- package/README.es.md +4 -4
- package/README.fr.md +4 -4
- package/README.ja.md +4 -4
- package/README.md +4 -4
- package/README.pt.md +4 -4
- package/README.ru.md +4 -4
- package/README.zh-CN.md +4 -4
- package/lib/client.js +204 -29
- package/lib/index.js +644 -160
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -2111,6 +2111,11 @@ window.__ModuleLoader__.load({
|
|
|
2111
2111
|
//#region src/client-languages.js
|
|
2112
2112
|
const dictionaries = {
|
|
2113
2113
|
zh: {
|
|
2114
|
+
speedShortcutTitle: "输入栏速度切换",
|
|
2115
|
+
speedShortcut_off: "关闭",
|
|
2116
|
+
speedShortcut_icon: "闪电",
|
|
2117
|
+
speedShortcut_hover: "悬停显示",
|
|
2118
|
+
speedShortcut_label: "速度名称",
|
|
2114
2119
|
catalogTimeout: "模型目录读取超时。请检查网络或代理后重试。",
|
|
2115
2120
|
catalogCachedTimeout: "继续使用已读取的模型目录;在线更新超时,请检查网络或代理后重试。",
|
|
2116
2121
|
openSubscriptionSettings: "订阅设置",
|
|
@@ -3059,6 +3064,11 @@ window.__ModuleLoader__.load({
|
|
|
3059
3064
|
imageRemoveAnnotation: "删除标注"
|
|
3060
3065
|
},
|
|
3061
3066
|
en: {
|
|
3067
|
+
speedShortcutTitle: "Composer speed shortcut",
|
|
3068
|
+
speedShortcut_off: "Off",
|
|
3069
|
+
speedShortcut_icon: "Lightning",
|
|
3070
|
+
speedShortcut_hover: "On hover",
|
|
3071
|
+
speedShortcut_label: "Speed name",
|
|
3062
3072
|
catalogTimeout: "The model catalog request timed out. Check your network or proxy and retry.",
|
|
3063
3073
|
catalogCachedTimeout: "Keeping the available model catalog; the online refresh timed out. Check your network or proxy and retry.",
|
|
3064
3074
|
openSubscriptionSettings: "Subscription settings",
|
|
@@ -4889,6 +4899,11 @@ window.__ModuleLoader__.load({
|
|
|
4889
4899
|
"composerMenuCustom": "モデルメニューの拡張が有効",
|
|
4890
4900
|
"composerMenuHost": "DSH または他のプラグインのメニューを使用",
|
|
4891
4901
|
"legacyModelPicker": "入力欄のモデルメニュー",
|
|
4902
|
+
"speedShortcutTitle": "入力欄の速度切り替え",
|
|
4903
|
+
"speedShortcut_off": "オフ",
|
|
4904
|
+
"speedShortcut_icon": "稲妻",
|
|
4905
|
+
"speedShortcut_hover": "ホバーで表示",
|
|
4906
|
+
"speedShortcut_label": "速度名",
|
|
4892
4907
|
"composerMenuAuto": "自動",
|
|
4893
4908
|
"composerMenuDsh": "DSH 標準",
|
|
4894
4909
|
"composerMenuSubscription": "購読メニュー",
|
|
@@ -4955,6 +4970,11 @@ window.__ModuleLoader__.load({
|
|
|
4955
4970
|
"imageRemoveAnnotation": "メモを削除"
|
|
4956
4971
|
},
|
|
4957
4972
|
es: {
|
|
4973
|
+
"speedShortcutTitle": "Atajo de velocidad en el cuadro de entrada",
|
|
4974
|
+
"speedShortcut_off": "Desactivado",
|
|
4975
|
+
"speedShortcut_icon": "Rayo",
|
|
4976
|
+
"speedShortcut_hover": "Al pasar el puntero",
|
|
4977
|
+
"speedShortcut_label": "Nombre de la velocidad",
|
|
4958
4978
|
"catalogTimeout": "La solicitud del catálogo de modelos agotó el tiempo de espera. Comprueba la red o el proxy y reinténtalo.",
|
|
4959
4979
|
"catalogCachedTimeout": "Se conserva el catálogo disponible; la actualización en línea agotó el tiempo de espera. Comprueba la red o el proxy y reinténtalo.",
|
|
4960
4980
|
"openSubscriptionSettings": "Configuración de la suscripción",
|
|
@@ -5903,6 +5923,11 @@ window.__ModuleLoader__.load({
|
|
|
5903
5923
|
"imageRemoveAnnotation": "Eliminar nota"
|
|
5904
5924
|
},
|
|
5905
5925
|
fr: {
|
|
5926
|
+
"speedShortcutTitle": "Raccourci de vitesse dans la zone de saisie",
|
|
5927
|
+
"speedShortcut_off": "Désactivé",
|
|
5928
|
+
"speedShortcut_icon": "Éclair",
|
|
5929
|
+
"speedShortcut_hover": "Au survol",
|
|
5930
|
+
"speedShortcut_label": "Nom de la vitesse",
|
|
5906
5931
|
"catalogTimeout": "La demande du catalogue de modèles a expiré. Vérifiez le réseau ou le proxy et réessayez.",
|
|
5907
5932
|
"catalogCachedTimeout": "Le catalogue disponible est conservé ; la mise à jour en ligne a expiré. Vérifiez le réseau ou le proxy et réessayez.",
|
|
5908
5933
|
"openSubscriptionSettings": "Paramètres de l’abonnement",
|
|
@@ -6851,6 +6876,11 @@ window.__ModuleLoader__.load({
|
|
|
6851
6876
|
"imageRemoveAnnotation": "Supprimer la note"
|
|
6852
6877
|
},
|
|
6853
6878
|
de: {
|
|
6879
|
+
"speedShortcutTitle": "Tempo-Kürzel im Eingabefeld",
|
|
6880
|
+
"speedShortcut_off": "Aus",
|
|
6881
|
+
"speedShortcut_icon": "Blitzsymbol",
|
|
6882
|
+
"speedShortcut_hover": "Beim Zeigen",
|
|
6883
|
+
"speedShortcut_label": "Temponame",
|
|
6854
6884
|
"catalogTimeout": "Die Anfrage für den Modellkatalog hat das Zeitlimit überschritten. Netzwerk oder Proxy prüfen und erneut versuchen.",
|
|
6855
6885
|
"catalogCachedTimeout": "Der vorhandene Modellkatalog bleibt verfügbar. Die Online-Aktualisierung hat das Zeitlimit überschritten. Netzwerk oder Proxy prüfen und erneut versuchen.",
|
|
6856
6886
|
"openSubscriptionSettings": "Abo-Einstellungen",
|
|
@@ -7799,6 +7829,11 @@ window.__ModuleLoader__.load({
|
|
|
7799
7829
|
"imageRemoveAnnotation": "Notiz entfernen"
|
|
7800
7830
|
},
|
|
7801
7831
|
ru: {
|
|
7832
|
+
"speedShortcutTitle": "Переключатель скорости в поле ввода",
|
|
7833
|
+
"speedShortcut_off": "Выкл.",
|
|
7834
|
+
"speedShortcut_icon": "Молния",
|
|
7835
|
+
"speedShortcut_hover": "При наведении",
|
|
7836
|
+
"speedShortcut_label": "Название скорости",
|
|
7802
7837
|
"catalogTimeout": "Время ожидания каталога моделей истекло. Проверьте сеть или прокси и повторите попытку.",
|
|
7803
7838
|
"catalogCachedTimeout": "Доступный каталог моделей сохранён; время онлайн-обновления истекло. Проверьте сеть или прокси и повторите попытку.",
|
|
7804
7839
|
"openSubscriptionSettings": "Настройки подписки",
|
|
@@ -8747,6 +8782,11 @@ window.__ModuleLoader__.load({
|
|
|
8747
8782
|
"imageRemoveAnnotation": "Удалить примечание"
|
|
8748
8783
|
},
|
|
8749
8784
|
pt: {
|
|
8785
|
+
"speedShortcutTitle": "Atalho de velocidade no campo de mensagem",
|
|
8786
|
+
"speedShortcut_off": "Desativado",
|
|
8787
|
+
"speedShortcut_icon": "Raio",
|
|
8788
|
+
"speedShortcut_hover": "Ao passar o cursor",
|
|
8789
|
+
"speedShortcut_label": "Nome da velocidade",
|
|
8750
8790
|
"catalogTimeout": "A solicitação do catálogo de modelos excedeu o tempo limite. Verifique a rede ou o proxy e tente novamente.",
|
|
8751
8791
|
"catalogCachedTimeout": "O catálogo disponível foi mantido; a atualização online excedeu o tempo limite. Verifique a rede ou o proxy e tente novamente.",
|
|
8752
8792
|
"openSubscriptionSettings": "Configurações da assinatura",
|
|
@@ -9704,7 +9744,10 @@ window.__ModuleLoader__.load({
|
|
|
9704
9744
|
.codexModelSelectTrigger:focus-visible{box-shadow:0 0 0 2px var(--dsw-alias-border-l3)}
|
|
9705
9745
|
.codexModelSelectTrigger:disabled{color:var(--dsw-alias-label-dimmed);cursor:default}
|
|
9706
9746
|
.codexModelSelectBolt{display:block;flex:none;width:14px;height:14px;color:var(--dsw-alias-label-primary)}
|
|
9707
|
-
.codexModelInlineLabel{display:inline
|
|
9747
|
+
.codexModelInlineLabel{display:inline}
|
|
9748
|
+
.codexModelInlineLabel>.codexModelSelectBolt{display:inline-block;vertical-align:-2px;margin-inline-end:4px}
|
|
9749
|
+
.codexModelInlineLabel[data-placement=trigger]>.codexModelCatalogBadge{margin-inline-end:4px}
|
|
9750
|
+
.codexModelInlineLabel:not([data-placement=trigger])>.codexModelCatalogBadge{margin-inline-start:4px}
|
|
9708
9751
|
.codexModelCatalogBadge{font-size:11px;line-height:16px;padding:0 3px;border-radius:4px;background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-secondary)}
|
|
9709
9752
|
.codexModelSelectLabel{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
9710
9753
|
.codexModelSelectEffort{flex:none;color:var(--dsw-alias-label-caption)}
|
|
@@ -10618,6 +10661,14 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
|
|
|
10618
10661
|
"legacy"
|
|
10619
10662
|
]);
|
|
10620
10663
|
const normalizeComposerModelPicker = (value) => COMPOSER_MODEL_PICKER_MODES.includes(value) ? value : "auto";
|
|
10664
|
+
const SPEED_SHORTCUT_FIELD = "speedShortcut";
|
|
10665
|
+
const SPEED_SHORTCUT_STYLES = Object.freeze([
|
|
10666
|
+
"off",
|
|
10667
|
+
"icon",
|
|
10668
|
+
"hover",
|
|
10669
|
+
"label"
|
|
10670
|
+
]);
|
|
10671
|
+
const normalizeSpeedShortcut = (value) => SPEED_SHORTCUT_STYLES.includes(value) ? value : "off";
|
|
10621
10672
|
const SPEED_MODE_FIELD = "speedMode";
|
|
10622
10673
|
const SPEED_MODE_STANDARD = "standard";
|
|
10623
10674
|
const SPEED_MODE_FAST = "fast";
|
|
@@ -10899,6 +10950,11 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
|
|
|
10899
10950
|
default: "dsh",
|
|
10900
10951
|
error: "Invalid fetch provider preference"
|
|
10901
10952
|
},
|
|
10953
|
+
[SPEED_SHORTCUT_FIELD]: {
|
|
10954
|
+
choices: SPEED_SHORTCUT_STYLES,
|
|
10955
|
+
default: "off",
|
|
10956
|
+
error: "Invalid speed shortcut style"
|
|
10957
|
+
},
|
|
10902
10958
|
[SPEED_MODE_FIELD]: {
|
|
10903
10959
|
choices: [
|
|
10904
10960
|
SPEED_MODE_STANDARD,
|
|
@@ -11034,6 +11090,7 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
|
|
|
11034
11090
|
fetchProvider: normalizeFetchProvider(value?.[FETCH_PROVIDER_FIELD]),
|
|
11035
11091
|
fetchRoutingAvailable,
|
|
11036
11092
|
speedMode: normalizeSpeedMode(value?.[SPEED_MODE_FIELD]),
|
|
11093
|
+
[SPEED_SHORTCUT_FIELD]: normalizeSpeedShortcut(value?.[SPEED_SHORTCUT_FIELD]),
|
|
11037
11094
|
outputVerbosity: normalizeOutputVerbosity(value?.[OUTPUT_VERBOSITY_FIELD]),
|
|
11038
11095
|
inputImageDetail: normalizeInputImageDetail(value?.[INPUT_IMAGE_DETAIL_FIELD]),
|
|
11039
11096
|
reasoningSummary: normalizeReasoningSummary(value?.[REASONING_SUMMARY_FIELD]),
|
|
@@ -11101,6 +11158,7 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
|
|
|
11101
11158
|
remoteControl: value?.remoteControl === "on" ? "on" : "off",
|
|
11102
11159
|
composerPredictions: value?.composerPredictions === "on" ? "on" : "off",
|
|
11103
11160
|
composerModelPicker: normalizeComposerModelPicker(value?.composerModelPicker),
|
|
11161
|
+
[SPEED_SHORTCUT_FIELD]: normalizeSpeedShortcut(value?.[SPEED_SHORTCUT_FIELD]),
|
|
11104
11162
|
otherModels: value?.otherModels === "off" ? "off" : "on",
|
|
11105
11163
|
otherModels: value?.otherModels === "off" ? "off" : "on",
|
|
11106
11164
|
compactionMode: value?.compactionMode === "cloud" ? "cloud" : "dsh",
|
|
@@ -11560,7 +11618,7 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
|
|
|
11560
11618
|
/** @returns {{kind:'reset'}|{kind:'range',min:number,max:number}|{kind:'point',seconds:number}|undefined} rounded seconds. */
|
|
11561
11619
|
function forecastRunway(forecast) {
|
|
11562
11620
|
if (forecast?.status !== "ready") return void 0;
|
|
11563
|
-
if (forecast.survivesReset && !forecast.provisional) return { kind: "reset" };
|
|
11621
|
+
if ((forecast.survivesReset === "yes" || forecast.survivesReset === true) && !forecast.provisional) return { kind: "reset" };
|
|
11564
11622
|
if (!forecast.provisional && Number.isFinite(forecast.runwayMinSeconds) && Number.isFinite(forecast.runwayMaxSeconds)) {
|
|
11565
11623
|
const min = roundRunwaySeconds(forecast.runwayMinSeconds), max = roundRunwaySeconds(forecast.runwayMaxSeconds);
|
|
11566
11624
|
if (min > 0 && max > min) return {
|
|
@@ -11590,9 +11648,12 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
|
|
|
11590
11648
|
})) return { kind: "stale" };
|
|
11591
11649
|
if (remainingPercent === 0) return { kind: "exhausted" };
|
|
11592
11650
|
if (forecast?.status === "calibrating") return { kind: forecast.reason ?? "calibrating" };
|
|
11593
|
-
if (forecast?.status === "
|
|
11651
|
+
if (forecast?.status === "flat" || forecast?.status === "idle") return {
|
|
11652
|
+
kind: "idle",
|
|
11653
|
+
upperPacePerHour: forecast.upperPacePerHour
|
|
11654
|
+
};
|
|
11594
11655
|
if (!Number.isFinite(fetchedAt)) return { kind: "calibrating" };
|
|
11595
|
-
if (forecast?.status === "ready" && !forecast.provisional && Number.isFinite(forecast.runwayMinSeconds) && forecast.runwayMinSeconds > 0 && Number.isFinite(resetsAt) && fetchedAt + forecast.runwayMinSeconds * 1e3 >= resetsAt * 1e3) return { kind: "reset" };
|
|
11656
|
+
if (forecast?.status === "ready" && !forecast.provisional && (typeof forecast.survivesReset !== "string" || forecast.survivesReset === "yes") && Number.isFinite(forecast.runwayMinSeconds) && forecast.runwayMinSeconds > 0 && Number.isFinite(resetsAt) && fetchedAt + forecast.runwayMinSeconds * 1e3 >= resetsAt * 1e3) return { kind: "reset" };
|
|
11596
11657
|
const rawMin = !forecast?.provisional && Number.isFinite(forecast?.runwayMinSeconds) ? forecast.runwayMinSeconds : forecast?.runwaySeconds;
|
|
11597
11658
|
if (Number.isFinite(rawMin) && fetchedAt + rawMin * 1e3 <= now) return { kind: "stale" };
|
|
11598
11659
|
const runway = forecastRunway({
|
|
@@ -11780,7 +11841,7 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
|
|
|
11780
11841
|
}
|
|
11781
11842
|
//#endregion
|
|
11782
11843
|
//#region src/version.js
|
|
11783
|
-
const PACKAGE_VERSION = "3.2.
|
|
11844
|
+
const PACKAGE_VERSION = "3.2.23";
|
|
11784
11845
|
//#endregion
|
|
11785
11846
|
//#region src/client-recovery.js
|
|
11786
11847
|
async function recoveryCall(rpc, endpoint, payload = {}, timeoutMs = endpoint === "usage" || endpoint.startsWith("usage/") ? 3e4 : 1e4) {
|
|
@@ -12163,6 +12224,94 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
|
|
|
12163
12224
|
}));
|
|
12164
12225
|
}
|
|
12165
12226
|
const ForwardRef = /*#__PURE__*/ react.forwardRef(BoltIcon);
|
|
12227
|
+
//#endregion
|
|
12228
|
+
//#region src/client-speed-shortcut.jsx
|
|
12229
|
+
const labels = {
|
|
12230
|
+
standard: "speedStandard",
|
|
12231
|
+
fast: "speedFast",
|
|
12232
|
+
ultrafast: "speedUltrafast"
|
|
12233
|
+
};
|
|
12234
|
+
function CodexSpeedShortcut({ directory, preference, t, locked }) {
|
|
12235
|
+
const { current } = (0, react.useSyncExternalStore)((listener) => directory.subscribe(listener), () => directory.getSnapshot());
|
|
12236
|
+
const status = usePreferenceSnapshot(preference);
|
|
12237
|
+
const mode = status[SPEED_SHORTCUT_FIELD];
|
|
12238
|
+
const modelId = current?.model;
|
|
12239
|
+
const supportsFast = status.fastModels?.includes(modelId) ?? supportsCodexFastMode(modelId);
|
|
12240
|
+
const visible = mode !== "off" && current?.provider === "openai-codex" && supportsFast && status.status === "ready";
|
|
12241
|
+
(0, react.useLayoutEffect)(() => {
|
|
12242
|
+
if (!visible) return;
|
|
12243
|
+
const style = document.createElement("style");
|
|
12244
|
+
style.textContent = SPEED_SHORTCUT_CSS;
|
|
12245
|
+
document.head.append(style);
|
|
12246
|
+
return () => style.remove();
|
|
12247
|
+
}, [visible]);
|
|
12248
|
+
if (!visible) return null;
|
|
12249
|
+
const speed = effectiveCodexSpeedMode(status.speedMode, modelId, {
|
|
12250
|
+
supportsFast,
|
|
12251
|
+
supportsUltrafast: status.ultrafastModels?.includes(modelId)
|
|
12252
|
+
});
|
|
12253
|
+
const next = speed === "standard" ? SPEED_MODE_FAST : SPEED_MODE_STANDARD;
|
|
12254
|
+
const label = t(labels[speed]);
|
|
12255
|
+
const hint = `${t("speedTitle")} · ${label} → ${t(labels[next])}${next === "fast" ? ` · ${t("speedFastHint")}` : ""}`;
|
|
12256
|
+
const toggle = () => {
|
|
12257
|
+
const selected = directory.getSnapshot().current;
|
|
12258
|
+
const saved = preference.getSnapshot();
|
|
12259
|
+
if (selected?.provider !== current.provider || selected?.model !== modelId || saved.speedMode !== status.speedMode || saved.saving || !saved.writable) return;
|
|
12260
|
+
preference.set({ [SPEED_MODE_FIELD]: next });
|
|
12261
|
+
};
|
|
12262
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
12263
|
+
className: "codexSpeedShortcutSeat",
|
|
12264
|
+
"data-layout": mode,
|
|
12265
|
+
"data-speed": speed,
|
|
12266
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
12267
|
+
type: "button",
|
|
12268
|
+
className: "codexSpeedShortcut",
|
|
12269
|
+
"data-speed": speed,
|
|
12270
|
+
title: hint,
|
|
12271
|
+
"aria-label": hint,
|
|
12272
|
+
"aria-pressed": speed !== SPEED_MODE_STANDARD,
|
|
12273
|
+
disabled: locked || status.saving || !status.writable,
|
|
12274
|
+
onClick: toggle,
|
|
12275
|
+
children: mode === "label" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: label }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
12276
|
+
className: "codexSpeedShortcutBolt",
|
|
12277
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ForwardRef, { "aria-hidden": "true" })
|
|
12278
|
+
})
|
|
12279
|
+
})
|
|
12280
|
+
});
|
|
12281
|
+
}
|
|
12282
|
+
const SPEED_SHORTCUT_CSS = `
|
|
12283
|
+
.codexSpeedShortcutSeat{display:inline-flex;align-items:center;flex:none}
|
|
12284
|
+
.codexSpeedShortcut{display:inline-flex;align-items:center;justify-content:center;min-width:25px;min-height:27px;padding:2px 5px;border:0;border-radius:6px;background:transparent;color:var(--dsw-alias-label-secondary,CanvasText);font:inherit;font-size:12px;line-height:1.2;white-space:nowrap;cursor:pointer}
|
|
12285
|
+
.codexSpeedShortcutBolt{display:grid;place-items:center}
|
|
12286
|
+
.codexSpeedShortcut svg{width:14px;height:14px;display:block}
|
|
12287
|
+
.codexSpeedShortcut[data-speed=standard] svg{fill:none;stroke:currentColor;stroke-width:.9}
|
|
12288
|
+
.codexSpeedShortcut:not([data-speed=standard]){color:var(--dsw-alias-label-primary,CanvasText)}
|
|
12289
|
+
.codexSpeedShortcut:hover:not(:disabled){background:color-mix(in srgb,currentColor 10%,transparent)}
|
|
12290
|
+
.codexSpeedShortcut:focus-visible{outline:2px solid currentColor;outline-offset:1px}
|
|
12291
|
+
.codexSpeedShortcut:disabled{cursor:default;opacity:.5}
|
|
12292
|
+
|
|
12293
|
+
[data-slot="conversation.input.right"]:has(.codexSpeedShortcutSeat:is([data-layout=icon],[data-layout=hover])){display:flex;align-items:center}
|
|
12294
|
+
div:has(>[data-slot="conversation.input.right"]>.codexSpeedShortcutSeat:is([data-layout=icon],[data-layout=hover])):has(>[data-slot="conversation.input.model"]){column-gap:0}
|
|
12295
|
+
|
|
12296
|
+
@media(hover:hover) and (pointer:fine){
|
|
12297
|
+
/* Keep the hit area in flow so revealing the shortcut cannot overlap the quota button. */
|
|
12298
|
+
[data-slot="conversation.input.right"]:has(+[data-slot="conversation.input.model"])>.codexSpeedShortcutSeat[data-layout=hover][data-speed=standard]>.codexSpeedShortcut{
|
|
12299
|
+
opacity:0;visibility:hidden;
|
|
12300
|
+
transition:opacity 150ms,visibility 0s 150ms
|
|
12301
|
+
}
|
|
12302
|
+
[data-slot="conversation.input.right"]:has(+[data-slot="conversation.input.model"]:is(:hover,:focus-within))>.codexSpeedShortcutSeat[data-layout=hover][data-speed=standard]>.codexSpeedShortcut,
|
|
12303
|
+
.codexSpeedShortcutSeat[data-layout=hover][data-speed=standard]:is(:hover,:focus-within)>.codexSpeedShortcut{opacity:1;visibility:visible;transition:none}
|
|
12304
|
+
}
|
|
12305
|
+
|
|
12306
|
+
/* Keep the labelled shortcut next to the native model trigger. */
|
|
12307
|
+
div:has(>[data-slot="conversation.input.right"]>.codexSpeedShortcutSeat[data-layout=label]):has(>[data-slot="conversation.input.model"]){column-gap:0}
|
|
12308
|
+
[data-slot="conversation.input.right"]:has(>.codexSpeedShortcutSeat[data-layout=label]):has(+[data-slot="conversation.input.model"]){display:contents}
|
|
12309
|
+
div:has(>[data-slot="conversation.input.right"]>.codexSpeedShortcutSeat[data-layout=label])>[data-slot="conversation.input.model"]{order:1}
|
|
12310
|
+
.codexSpeedShortcutSeat[data-layout=label]{order:2}
|
|
12311
|
+
.codexSpeedShortcutSeat[data-layout=label]>.codexSpeedShortcut{padding-inline:7px}
|
|
12312
|
+
.codexSpeedShortcutSeat[data-layout=label]>.codexSpeedShortcut:not([data-speed=standard]){font-weight:600}
|
|
12313
|
+
|
|
12314
|
+
`;
|
|
12166
12315
|
//#endregion
|
|
12167
12316
|
//#region src/client-model-select.jsx
|
|
12168
12317
|
function createModelOptionsMenu() {
|
|
@@ -12191,10 +12340,14 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
|
|
|
12191
12340
|
"data-tone": model.badge.tone,
|
|
12192
12341
|
children: resolveText(model.badge.text)
|
|
12193
12342
|
});
|
|
12343
|
+
const shortcutShown = snapshot.speedShortcut && snapshot.speedShortcut !== "off" && (snapshot.fastModels?.includes(model.id) ?? supportsCodexFastMode(model.id));
|
|
12344
|
+
const bolt = placement === "trigger" && selected && speed !== "standard" && !shortcutShown;
|
|
12345
|
+
if (!badge && !bolt) return model.name;
|
|
12194
12346
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
12195
12347
|
className: "codexModelInlineLabel",
|
|
12348
|
+
"data-placement": placement,
|
|
12196
12349
|
children: [
|
|
12197
|
-
|
|
12350
|
+
bolt && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ForwardRef, {
|
|
12198
12351
|
className: "codexModelSelectBolt",
|
|
12199
12352
|
"aria-label": t(speed === "ultrafast" ? "speedUltrafast" : "speedFast")
|
|
12200
12353
|
}),
|
|
@@ -12749,7 +12902,7 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
|
|
|
12749
12902
|
load();
|
|
12750
12903
|
},
|
|
12751
12904
|
children: [
|
|
12752
|
-
fast && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ForwardRef, {
|
|
12905
|
+
fast && (!preferenceSnapshot.speedShortcut || preferenceSnapshot.speedShortcut === "off" || !speedSupported) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ForwardRef, {
|
|
12753
12906
|
className: "codexModelSelectBolt",
|
|
12754
12907
|
"aria-hidden": "true"
|
|
12755
12908
|
}),
|
|
@@ -18684,29 +18837,47 @@ void main(){
|
|
|
18684
18837
|
className: "codexComposerMenuGroup",
|
|
18685
18838
|
role: "group",
|
|
18686
18839
|
"aria-label": t("legacyModelPicker"),
|
|
18687
|
-
children: [
|
|
18688
|
-
|
|
18689
|
-
|
|
18690
|
-
|
|
18691
|
-
|
|
18692
|
-
|
|
18693
|
-
|
|
18694
|
-
|
|
18695
|
-
|
|
18840
|
+
children: [
|
|
18841
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
18842
|
+
className: "codexSubscriptionPreference",
|
|
18843
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
18844
|
+
className: "codexSubscriptionPreferenceCopy",
|
|
18845
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingsLabel, {
|
|
18846
|
+
description: t("legacyModelPickerHint"),
|
|
18847
|
+
children: t("legacyModelPicker")
|
|
18848
|
+
}), loaded ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Hint, { children: t(customMenu ? "composerMenuCustom" : "composerMenuHost") }) : null]
|
|
18849
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Radios, {
|
|
18850
|
+
snapshot,
|
|
18851
|
+
preference,
|
|
18852
|
+
field: "composerModelPicker",
|
|
18853
|
+
values: COMPOSER_MODEL_PICKER_MODES,
|
|
18854
|
+
name: "codex-model-picker",
|
|
18855
|
+
label: t("legacyModelPicker"),
|
|
18856
|
+
text: (value) => t(menuLabels[value]),
|
|
18857
|
+
disabled: !loaded || snapshot.saving
|
|
18858
|
+
})]
|
|
18859
|
+
}),
|
|
18860
|
+
loaded ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SpeedPreference, {
|
|
18696
18861
|
snapshot,
|
|
18697
18862
|
preference,
|
|
18698
|
-
|
|
18699
|
-
|
|
18700
|
-
|
|
18701
|
-
|
|
18702
|
-
|
|
18703
|
-
|
|
18704
|
-
|
|
18705
|
-
|
|
18706
|
-
|
|
18707
|
-
|
|
18708
|
-
|
|
18709
|
-
|
|
18863
|
+
t
|
|
18864
|
+
}) : null,
|
|
18865
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
18866
|
+
className: "codexSubscriptionPreference",
|
|
18867
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
18868
|
+
className: "codexSubscriptionPreferenceCopy",
|
|
18869
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingsLabel, { children: t("speedShortcutTitle") })
|
|
18870
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Radios, {
|
|
18871
|
+
snapshot,
|
|
18872
|
+
preference,
|
|
18873
|
+
field: SPEED_SHORTCUT_FIELD,
|
|
18874
|
+
values: SPEED_SHORTCUT_STYLES,
|
|
18875
|
+
name: "codex-speed-shortcut",
|
|
18876
|
+
label: t("speedShortcutTitle"),
|
|
18877
|
+
text: (value) => t(`speedShortcut_${value}`)
|
|
18878
|
+
})]
|
|
18879
|
+
})
|
|
18880
|
+
]
|
|
18710
18881
|
}),
|
|
18711
18882
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PickerModelsPreference, {
|
|
18712
18883
|
preference,
|
|
@@ -21794,7 +21965,11 @@ void main(){
|
|
|
21794
21965
|
"uiConversation",
|
|
21795
21966
|
"sessions"
|
|
21796
21967
|
];
|
|
21797
|
-
const ComposerRight = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
21968
|
+
const ComposerRight = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
21969
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(CodexComposerQuota, { ...props }),
|
|
21970
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(VoiceCallButton, { ...props }),
|
|
21971
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(CodexSpeedShortcut, { ...props })
|
|
21972
|
+
] });
|
|
21798
21973
|
function apply(ctx) {
|
|
21799
21974
|
if (new URL(window.location.href).searchParams.has("codexVoiceSession")) ctx.inject(["uiWorkspace", "sessions"], (scope) => scope.effect(() => {
|
|
21800
21975
|
const sessions = scope.get("sessions"), controller = new AbortController();
|