dsh-codex-subscription 3.2.26 → 3.2.28

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/lib/client.js CHANGED
@@ -2943,6 +2943,9 @@ window.__ModuleLoader__.load({
2943
2943
  imageAdvancedTitle: "高级:图片型号与质量",
2944
2944
  quotaSettingsTitle: "额度显示与提醒",
2945
2945
  quotaAlertsNeedDisplay: "先选一种显示方式,才能在输入框里看到提醒。",
2946
+ "customInstructionsTitle": "自定义指令",
2947
+ "customInstructionsHint": "为此 DSH 配置中的 Codex 订阅对话设置回复偏好,例如语言或格式。清空后保存即可移除。",
2948
+ "customInstructionsSave": "保存",
2946
2949
  answerStyleTitle: "回答风格",
2947
2950
  verbosityPageHint: "选「简洁」回答更短,选「详细」会多解释。",
2948
2951
  advancedTitle: "高级",
@@ -2998,6 +3001,17 @@ window.__ModuleLoader__.load({
2998
3001
  searchLegacyCost: "搜索不另收费,仅按 DeepSeek 模型 Token 计费。",
2999
3002
  searchApiCost: "每 1,000 次成功搜索 5 元。",
3000
3003
  fetchUnavailableHint: "当前 DSH 不支持切换到 Codex 网页读取,请先升级宿主。",
3004
+ "quotaResetOutlookLasts": "预计够用",
3005
+ "quotaResetOutlookUncertain": "暂难判断",
3006
+ "quotaResetOutlookIfExhausted": "若用完:{when}左右",
3007
+ "quotaResetOutlookExpectedWhen": "预计{when}用完",
3008
+ "quotaResetOutlookLastsSure": "预计有余",
3009
+ "quotaOutlookPart": "{day}{part}",
3010
+ "quotaOutlookEarly": "{day}凌晨",
3011
+ "quotaOutlookRange": "{from}至{to}",
3012
+ "quotaResetOutlookBudget": "目前每天约用 {used}\n剩余天数每天可用约 {budget}",
3013
+ "quotaForecastIdleFor": "最近{duration},显示的剩余额度没有变化",
3014
+ "quotaPopoverResetAt": "重置:{value}",
3001
3015
  quotaForecastCalibrating: "续航正在校准",
3002
3016
  quotaForecastIdle: "近期剩余额度百分比未变化",
3003
3017
  quotaForecastUntilReset: "按最近用量,预计可用到重置",
@@ -3903,6 +3917,9 @@ window.__ModuleLoader__.load({
3903
3917
  imageAdvancedTitle: "Advanced: image model and quality",
3904
3918
  quotaSettingsTitle: "Quota display and alerts",
3905
3919
  quotaAlertsNeedDisplay: "Choose a way to show quota first; the alert is shown in the composer.",
3920
+ "customInstructionsTitle": "Custom instructions",
3921
+ "customInstructionsHint": "Set reply preferences such as language or format for Codex subscription chats in this DSH profile. Clear the field and save to remove them.",
3922
+ "customInstructionsSave": "Save",
3906
3923
  answerStyleTitle: "Answer style",
3907
3924
  verbosityPageHint: "Pick Concise for shorter answers, Detailed for more explanation.",
3908
3925
  advancedTitle: "Advanced",
@@ -3958,6 +3975,17 @@ window.__ModuleLoader__.load({
3958
3975
  searchLegacyCost: "No separate search fee. DeepSeek model tokens are billed.",
3959
3976
  searchApiCost: "CNY 5 per 1,000 successful searches.",
3960
3977
  fetchUnavailableHint: "This DSH version cannot switch to the Codex webpage reader. Update DSH first.",
3978
+ "quotaResetOutlookLasts": "Likely to last",
3979
+ "quotaResetOutlookUncertain": "Too early to tell",
3980
+ "quotaResetOutlookIfExhausted": "If it runs out: {when}",
3981
+ "quotaResetOutlookExpectedWhen": "Likely to run out: {when}",
3982
+ "quotaResetOutlookLastsSure": "Should last comfortably",
3983
+ "quotaOutlookPart": "{day} {part}",
3984
+ "quotaOutlookEarly": "early {day} morning",
3985
+ "quotaOutlookRange": "{from} to {to}",
3986
+ "quotaResetOutlookBudget": "You’ve used about {used} a day\nYou have about {budget} a day left",
3987
+ "quotaForecastIdleFor": "No change in the displayed balance for {duration}",
3988
+ "quotaPopoverResetAt": "Resets: {value}",
3961
3989
  quotaForecastCalibrating: "Runway calibrating",
3962
3990
  quotaForecastIdle: "No recent change in the reported percentage",
3963
3991
  quotaForecastUntilReset: "Estimated to last until reset at recent usage",
@@ -4860,6 +4888,9 @@ window.__ModuleLoader__.load({
4860
4888
  "quotaSettingsTitle": "利用枠の表示と通知",
4861
4889
  "quotaAlertsNeedDisplay": "まず利用枠の表示方法を選んでください。通知は入力欄に表示されます。",
4862
4890
  "answerStyleTitle": "回答スタイル",
4891
+ "customInstructionsTitle": "カスタム指示",
4892
+ "customInstructionsHint": "この DSH プロファイルの Codex 購読チャットで使う言語や回答形式などを指定します。削除するには空欄で保存します。",
4893
+ "customInstructionsSave": "保存",
4863
4894
  "verbosityPageHint": "「簡潔」は短い回答、「詳細」はより詳しい説明になります。",
4864
4895
  "advancedTitle": "詳細設定",
4865
4896
  "advancedSummary": "通常は変更不要です。初期設定は多くのユーザーに適しています。",
@@ -4914,6 +4945,17 @@ window.__ModuleLoader__.load({
4914
4945
  "fetchCodexHint": "Codex サブスクリプションを使って、アクセス可能なウェブページのテキストを読み取ります。失敗時はそのまま通知され、DeepSeek API にはフォールバックしません。",
4915
4946
  "fetchUnavailableHint": "このバージョンの DSH では Codex のウェブページリーダーに切り替えられません。先に DSH を更新してください。",
4916
4947
  "quotaForecastCalibrating": "残り時間を予測中",
4948
+ "quotaResetOutlookLasts": "足りる見込み",
4949
+ "quotaResetOutlookUncertain": "まだ判断できません",
4950
+ "quotaResetOutlookIfExhausted": "使い切るなら{when}ごろ",
4951
+ "quotaResetOutlookExpectedWhen": "{when}ごろに使い切る見込み",
4952
+ "quotaResetOutlookLastsSure": "余裕がある見込み",
4953
+ "quotaOutlookPart": "{day}の{part}",
4954
+ "quotaOutlookEarly": "{day}の早朝",
4955
+ "quotaOutlookRange": "{from}~{to}",
4956
+ "quotaResetOutlookBudget": "これまでの消費は1日約{used}\n残りの日数で使えるのは1日約{budget}",
4957
+ "quotaForecastIdleFor": "この{duration}、残量表示に変化なし",
4958
+ "quotaPopoverResetAt": "リセット:{value}",
4917
4959
  "quotaForecastIdle": "直近の残量表示に変化なし",
4918
4960
  "quotaForecastUntilReset": "最近の利用ペースなら、リセットまで持つ見込みです",
4919
4961
  "runwayDaysHours": "{days}日 {hours}時間",
@@ -5825,6 +5867,9 @@ window.__ModuleLoader__.load({
5825
5867
  "quotaSettingsTitle": "Visualización y alertas de cuota",
5826
5868
  "quotaAlertsNeedDisplay": "Elige primero cómo mostrar la cuota; la alerta aparece en el cuadro de entrada.",
5827
5869
  "answerStyleTitle": "Estilo de respuesta",
5870
+ "customInstructionsTitle": "Instrucciones personalizadas",
5871
+ "customInstructionsHint": "Define el idioma, el formato u otras preferencias de respuesta para los chats de la suscripción a Codex en este perfil de DSH. Para quitarlas, borra el texto y guarda.",
5872
+ "customInstructionsSave": "Guardar",
5828
5873
  "verbosityPageHint": "Elige Conciso para respuestas más breves o Detallado para obtener más explicaciones.",
5829
5874
  "advancedTitle": "Avanzado",
5830
5875
  "advancedSummary": "Rara vez hace falta; los valores predeterminados sirven para la mayoría",
@@ -5879,6 +5924,17 @@ window.__ModuleLoader__.load({
5879
5924
  "fetchCodexHint": "Lee el texto accesible de las páginas web con tu suscripción a Codex. Los errores se indican directamente, sin recurrir a la API de DeepSeek.",
5880
5925
  "fetchUnavailableHint": "Esta versión de DSH no permite cambiar al lector de páginas web de Codex. Actualiza DSH primero.",
5881
5926
  "quotaForecastCalibrating": "Calibrando autonomía",
5927
+ "quotaResetOutlookLasts": "Debería alcanzar",
5928
+ "quotaResetOutlookUncertain": "Aún sin estimación",
5929
+ "quotaResetOutlookIfExhausted": "Si se agota: {when}",
5930
+ "quotaResetOutlookExpectedWhen": "Fin previsto: {when}",
5931
+ "quotaResetOutlookLastsSure": "Debería sobrar",
5932
+ "quotaOutlookPart": "{day} {part}",
5933
+ "quotaOutlookEarly": "{day} de madrugada",
5934
+ "quotaOutlookRange": "{from} a {to}",
5935
+ "quotaResetOutlookBudget": "Has usado cerca del {used} al día\nTe queda cerca del {budget} por día",
5936
+ "quotaForecastIdleFor": "El saldo mostrado lleva {duration} sin cambiar",
5937
+ "quotaPopoverResetAt": "Reinicio: {value}",
5882
5938
  "quotaForecastIdle": "Sin cambios recientes en el porcentaje",
5883
5939
  "quotaForecastUntilReset": "Según el uso reciente, se estima que durará hasta el restablecimiento",
5884
5940
  "runwayDaysHours": "{days} d {hours} h",
@@ -6785,6 +6841,9 @@ window.__ModuleLoader__.load({
6785
6841
  "quotaSettingsTitle": "Affichage et alertes de quota",
6786
6842
  "quotaAlertsNeedDisplay": "Choisissez d’abord un mode d’affichage du quota ; l’alerte apparaîtra dans la zone de saisie.",
6787
6843
  "answerStyleTitle": "Style de réponse",
6844
+ "customInstructionsTitle": "Instructions personnalisées",
6845
+ "customInstructionsHint": "Définissez la langue, le format ou d’autres préférences de réponse pour les chats avec l’abonnement Codex dans ce profil DSH. Pour les supprimer, videz le champ et enregistrez.",
6846
+ "customInstructionsSave": "Enregistrer",
6788
6847
  "verbosityPageHint": "Choisissez « Concis » pour des réponses plus courtes ou « Détaillé » pour plus d’explications.",
6789
6848
  "advancedTitle": "Avancé",
6790
6849
  "advancedSummary": "Rarement nécessaire ; les paramètres par défaut conviennent à la plupart des personnes",
@@ -6839,6 +6898,17 @@ window.__ModuleLoader__.load({
6839
6898
  "fetchCodexHint": "Lire le texte accessible des pages Web avec votre abonnement Codex. Les échecs sont signalés directement, sans recours à l’API DeepSeek.",
6840
6899
  "fetchUnavailableHint": "Cette version de DSH ne permet pas de passer au lecteur de pages Web Codex. Mettez d’abord DSH à jour.",
6841
6900
  "quotaForecastCalibrating": "Estimation de l’autonomie en cours",
6901
+ "quotaResetOutlookLasts": "Devrait suffire",
6902
+ "quotaResetOutlookUncertain": "Encore incertain",
6903
+ "quotaResetOutlookIfExhausted": "Si épuisé : {when}",
6904
+ "quotaResetOutlookExpectedWhen": "Épuisement prévu : {when}",
6905
+ "quotaResetOutlookLastsSure": "Marge confortable",
6906
+ "quotaOutlookPart": "{day} {part}",
6907
+ "quotaOutlookEarly": "{day} tôt le matin",
6908
+ "quotaOutlookRange": "{from} à {to}",
6909
+ "quotaResetOutlookBudget": "Vous avez utilisé environ {used} par jour\nIl vous reste environ {budget} par jour",
6910
+ "quotaForecastIdleFor": "Solde affiché inchangé depuis {duration}",
6911
+ "quotaPopoverResetAt": "Réinitialisation : {value}",
6842
6912
  "quotaForecastIdle": "Aucune variation récente du pourcentage",
6843
6913
  "quotaForecastUntilReset": "Au rythme récent, le quota devrait suffire jusqu’à sa réinitialisation",
6844
6914
  "runwayDaysHours": "{days} j {hours} h",
@@ -7745,6 +7815,9 @@ window.__ModuleLoader__.load({
7745
7815
  "quotaSettingsTitle": "Anzeige und Benachrichtigungen zum Nutzungskontingent",
7746
7816
  "quotaAlertsNeedDisplay": "Wähle zuerst eine Anzeige für das Nutzungskontingent. Die Benachrichtigung erscheint im Eingabefeld.",
7747
7817
  "answerStyleTitle": "Antwortstil",
7818
+ "customInstructionsTitle": "Benutzerdefinierte Anweisungen",
7819
+ "customInstructionsHint": "Lege Antwortpräferenzen wie Sprache oder Format für Codex-Abonnement-Chats in diesem DSH-Profil fest. Zum Entfernen das Feld leeren und speichern.",
7820
+ "customInstructionsSave": "Speichern",
7748
7821
  "verbosityPageHint": "Wähle „Prägnant“ für kürzere Antworten oder „Ausführlich“ für mehr Erklärungen.",
7749
7822
  "advancedTitle": "Erweitert",
7750
7823
  "advancedSummary": "Selten erforderlich; die Standardeinstellungen passen für die meisten",
@@ -7799,6 +7872,17 @@ window.__ModuleLoader__.load({
7799
7872
  "fetchCodexHint": "Liest zugängliche Webseitentexte mit deinem Codex-Abo. Fehler werden direkt gemeldet; es gibt keinen Rückgriff auf die DeepSeek-API.",
7800
7873
  "fetchUnavailableHint": "Diese DSH-Version kann nicht zum Codex-Webseitenleser wechseln. Aktualisiere zuerst DSH.",
7801
7874
  "quotaForecastCalibrating": "Restlaufzeit wird kalibriert",
7875
+ "quotaResetOutlookLasts": "Reicht wohl aus",
7876
+ "quotaResetOutlookUncertain": "Noch unklar",
7877
+ "quotaResetOutlookIfExhausted": "Falls aufgebraucht: {when}",
7878
+ "quotaResetOutlookExpectedWhen": "Wohl aufgebraucht: {when}",
7879
+ "quotaResetOutlookLastsSure": "Reicht gut aus",
7880
+ "quotaOutlookPart": "{day} {part}",
7881
+ "quotaOutlookEarly": "{day} frühmorgens",
7882
+ "quotaOutlookRange": "{from} bis {to}",
7883
+ "quotaResetOutlookBudget": "Bisher etwa {used} pro Tag verbraucht\nFür die restlichen Tage bleiben etwa {budget} pro Tag",
7884
+ "quotaForecastIdleFor": "Seit {duration} keine Änderung beim angezeigten Rest",
7885
+ "quotaPopoverResetAt": "Zurücksetzung: {value}",
7802
7886
  "quotaForecastIdle": "Zuletzt keine Änderung der angezeigten Quote",
7803
7887
  "quotaForecastUntilReset": "Reicht bei jüngster Nutzung voraussichtlich bis zur Zurücksetzung",
7804
7888
  "runwayDaysHours": "{days} Tg. {hours} Std.",
@@ -8705,6 +8789,9 @@ window.__ModuleLoader__.load({
8705
8789
  "quotaSettingsTitle": "Отображение лимита и оповещения",
8706
8790
  "quotaAlertsNeedDisplay": "Сначала выберите способ отображения лимита; оповещение появится в поле ввода.",
8707
8791
  "answerStyleTitle": "Стиль ответов",
8792
+ "customInstructionsTitle": "Пользовательские инструкции",
8793
+ "customInstructionsHint": "Задайте язык, формат и другие предпочтения ответов для чатов с подпиской Codex в этом профиле DSH. Чтобы удалить инструкции, очистите поле и сохраните изменения.",
8794
+ "customInstructionsSave": "Сохранить",
8708
8795
  "verbosityPageHint": "Выберите «Кратко» для лаконичных ответов, «Подробно» — для более развёрнутых.",
8709
8796
  "advancedTitle": "Дополнительно",
8710
8797
  "advancedSummary": "Нужно редко; настройки по умолчанию подходят большинству",
@@ -8759,6 +8846,17 @@ window.__ModuleLoader__.load({
8759
8846
  "fetchCodexHint": "Читать доступный текст веб-страниц с подпиской Codex. Об ошибках сообщается напрямую, без перехода на API DeepSeek.",
8760
8847
  "fetchUnavailableHint": "Эта версия DSH не поддерживает переключение на средство чтения веб-страниц Codex. Сначала обновите DSH.",
8761
8848
  "quotaForecastCalibrating": "Прогноз остатка калибруется",
8849
+ "quotaResetOutlookLasts": "Должно хватить",
8850
+ "quotaResetOutlookUncertain": "Пока неясно",
8851
+ "quotaResetOutlookIfExhausted": "Если закончится: {when}",
8852
+ "quotaResetOutlookExpectedWhen": "Ожидаемый срок: {when}",
8853
+ "quotaResetOutlookLastsSure": "Хватит с запасом",
8854
+ "quotaOutlookPart": "{day} {part}",
8855
+ "quotaOutlookEarly": "{day} рано утром",
8856
+ "quotaOutlookRange": "{from} — {to}",
8857
+ "quotaResetOutlookBudget": "В среднем уходит около {used} в день\nНа оставшиеся дни есть примерно по {budget} в день",
8858
+ "quotaForecastIdleFor": "Отображаемый остаток не меняется уже {duration}",
8859
+ "quotaPopoverResetAt": "Сброс: {value}",
8762
8860
  "quotaForecastIdle": "Процент остатка недавно не менялся",
8763
8861
  "quotaForecastUntilReset": "При недавнем темпе лимита должно хватить до сброса",
8764
8862
  "runwayDaysHours": "{days} д {hours} ч",
@@ -9665,6 +9763,9 @@ window.__ModuleLoader__.load({
9665
9763
  "quotaSettingsTitle": "Exibição e alertas de cota",
9666
9764
  "quotaAlertsNeedDisplay": "Escolha primeiro como exibir a cota; o alerta aparece no campo de mensagem.",
9667
9765
  "answerStyleTitle": "Estilo de resposta",
9766
+ "customInstructionsTitle": "Instruções personalizadas",
9767
+ "customInstructionsHint": "Defina o idioma, o formato ou outras preferências de resposta para os chats da assinatura do Codex neste perfil do DSH. Para removê-las, limpe o campo e salve.",
9768
+ "customInstructionsSave": "Salvar",
9668
9769
  "verbosityPageHint": "Escolha Conciso para respostas mais curtas ou Detalhado para mais explicações.",
9669
9770
  "advancedTitle": "Avançado",
9670
9771
  "advancedSummary": "Raramente necessário; os padrões atendem à maioria das pessoas",
@@ -9719,6 +9820,17 @@ window.__ModuleLoader__.load({
9719
9820
  "fetchCodexHint": "Ler o texto acessível das páginas da web usando sua assinatura do Codex. Falhas são informadas diretamente, sem recorrer à API do DeepSeek.",
9720
9821
  "fetchUnavailableHint": "Esta versão do DSH não permite usar o leitor de páginas do Codex. Atualize o DSH primeiro.",
9721
9822
  "quotaForecastCalibrating": "Previsão em calibração",
9823
+ "quotaResetOutlookLasts": "Deve durar",
9824
+ "quotaResetOutlookUncertain": "Ainda incerto",
9825
+ "quotaResetOutlookIfExhausted": "Se acabar: {when}",
9826
+ "quotaResetOutlookExpectedWhen": "Fim previsto: {when}",
9827
+ "quotaResetOutlookLastsSure": "Deve sobrar",
9828
+ "quotaOutlookPart": "{day} {part}",
9829
+ "quotaOutlookEarly": "{day} de madrugada",
9830
+ "quotaOutlookRange": "{from} até {to}",
9831
+ "quotaResetOutlookBudget": "Você usou cerca de {used} por dia\nRestam cerca de {budget} por dia",
9832
+ "quotaForecastIdleFor": "Saldo exibido sem mudança há {duration}",
9833
+ "quotaPopoverResetAt": "Redefinição: {value}",
9722
9834
  "quotaForecastIdle": "Sem alteração recente no percentual",
9723
9835
  "quotaForecastUntilReset": "Previsão de duração até a redefinição, com base no uso recente",
9724
9836
  "runwayDaysHours": "{days}d {hours}h",
@@ -9884,6 +9996,10 @@ window.__ModuleLoader__.load({
9884
9996
  .codexSubscriptionCard{border:1px solid var(--dsw-alias-border-l2);border-radius:12px;background:var(--dsw-alias-bg-layer-1);padding:14px 16px;display:flex;flex-direction:column;gap:12px}
9885
9997
  .codexSubscriptionUsageCard{padding:12px 14px;gap:9px}
9886
9998
  .codexSubscriptionPreferencesCard{padding:12px 14px;gap:10px}
9999
+ .codexCustomInstructions{display:grid;gap:6px;font-size:13px}
10000
+ .codexCustomInstructions textarea{box-sizing:border-box;width:100%;min-height:64px;resize:vertical;border:1px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm,8px);background:transparent;color:inherit;font:inherit;padding:6px 8px}
10001
+ .codexCustomInstructions textarea:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-alias-state-business-primary);outline-offset:2px}
10002
+ .codexCustomInstructions>.dcsButton{justify-self:end}
9887
10003
  .codexSubscriptionPreference{min-height:32px;box-sizing:border-box;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 12px;color:var(--dsw-alias-label-primary);font-size:13px;line-height:20px}
9888
10004
  .codexSubscriptionPreferenceCopy{display:flex;min-width:0;flex-direction:column;gap:2px}
9889
10005
  .codexSubscriptionPreferenceLabel{display:flex;align-items:center;gap:6px}
@@ -10265,6 +10381,9 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
10265
10381
  .codexSubscriptionNotices button{margin-left:6px;border:0;background:transparent;padding:0;font:inherit;color:var(--dsw-alias-label-primary);text-decoration:underline;cursor:pointer}
10266
10382
  .codexSubscriptionPace{margin:0;font-size:12px;line-height:18px;color:var(--dsw-alias-state-warning-primary,#b45309)}
10267
10383
  .codexSubscriptionForecast{margin:0;font-size:12px;line-height:18px;color:var(--dsw-alias-label-tertiary)}
10384
+ .codexSubscriptionForecast p{margin:0}
10385
+ .codexQuotaDetail p,.codexSubscriptionForecast p{white-space:pre-line}
10386
+ .codexQuotaDetail p.codexQuotaOutlook,.codexSubscriptionForecast .codexQuotaOutlook{color:var(--dsw-alias-label-secondary)}
10268
10387
  .codexSubscriptionLimit[data-pace=true] progress{accent-color:var(--dsw-alias-state-warning-primary,#f5a300)}
10269
10388
  .codexSubscriptionLimit[data-pace=true] progress::-webkit-progress-value{background:var(--dsw-alias-state-warning-primary,#f5a300)}
10270
10389
  .codexSubscriptionLimit[data-pace=true] progress::-moz-progress-bar{background:var(--dsw-alias-state-warning-primary,#f5a300)}
@@ -10740,6 +10859,8 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
10740
10859
  const SPEED_MODE_ULTRAFAST = "ultrafast";
10741
10860
  const DEFAULT_SPEED_MODE = SPEED_MODE_STANDARD;
10742
10861
  const OUTPUT_VERBOSITY_FIELD = "outputVerbosity";
10862
+ const CUSTOM_INSTRUCTIONS_FIELD = "customInstructions";
10863
+ const CUSTOM_INSTRUCTIONS_LIMIT = 1500;
10743
10864
  const OUTPUT_VERBOSITY_DEFAULT = "default";
10744
10865
  const OUTPUT_VERBOSITY_MEDIUM = "medium";
10745
10866
  const OUTPUT_VERBOSITY_HIGH = "high";
@@ -11156,6 +11277,7 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
11156
11277
  fetchRoutingAvailable,
11157
11278
  speedMode: normalizeSpeedMode(value?.[SPEED_MODE_FIELD]),
11158
11279
  [SPEED_SHORTCUT_FIELD]: normalizeSpeedShortcut(value?.[SPEED_SHORTCUT_FIELD]),
11280
+ [CUSTOM_INSTRUCTIONS_FIELD]: value?.["customInstructions"] ?? "",
11159
11281
  outputVerbosity: normalizeOutputVerbosity(value?.[OUTPUT_VERBOSITY_FIELD]),
11160
11282
  inputImageDetail: normalizeInputImageDetail(value?.[INPUT_IMAGE_DETAIL_FIELD]),
11161
11283
  reasoningSummary: normalizeReasoningSummary(value?.[REASONING_SUMMARY_FIELD]),
@@ -11240,6 +11362,7 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
11240
11362
  webFetchFallbackProvider: value?.webFetchFallbackProvider,
11241
11363
  [FETCH_PROVIDER_FIELD]: normalizeFetchProvider(value?.[FETCH_PROVIDER_FIELD]),
11242
11364
  [SPEED_MODE_FIELD]: normalizeSpeedMode(value?.[SPEED_MODE_FIELD]),
11365
+ [CUSTOM_INSTRUCTIONS_FIELD]: typeof value?.["customInstructions"] === "string" ? value[CUSTOM_INSTRUCTIONS_FIELD] : "",
11243
11366
  [OUTPUT_VERBOSITY_FIELD]: normalizeOutputVerbosity(value?.[OUTPUT_VERBOSITY_FIELD]),
11244
11367
  [INPUT_IMAGE_DETAIL_FIELD]: normalizeInputImageDetail(value?.[INPUT_IMAGE_DETAIL_FIELD]),
11245
11368
  [REASONING_SUMMARY_FIELD]: normalizeReasoningSummary(value?.[REASONING_SUMMARY_FIELD]),
@@ -11336,6 +11459,7 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
11336
11459
  acceptFallback(value);
11337
11460
  if (patch.subagentBackend === "codex" && Array.isArray(value?.subagentModels)) subagentModels = value.subagentModels;
11338
11461
  pendingPatch = void 0;
11462
+ return true;
11339
11463
  } catch {
11340
11464
  if (current === generation) {
11341
11465
  pendingPatch = void 0;
@@ -11703,8 +11827,67 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
11703
11827
  function quotaReadingIsStale({ fetchedAt, now = Date.now(), resetsAt, refreshError = false }) {
11704
11828
  return refreshError || Number.isFinite(fetchedAt) && (fetchedAt > now || now - fetchedAt > 5 * 6e4) || Number.isFinite(resetsAt) && resetsAt * 1e3 <= now;
11705
11829
  }
11830
+ const DISPLAY_RISK_BANDS = {
11831
+ low: [0, .15],
11832
+ possible: [.15, .5],
11833
+ likely: [.5, .8],
11834
+ "very-likely": [.8, 1]
11835
+ };
11836
+ const HOUR_MS = 36e5;
11837
+ function riskView(forecast, { windowSeconds } = {}) {
11838
+ const outlook = forecast?.exhaustion, level = forecast?.risk?.shown;
11839
+ if (outlook === void 0 || outlook.status === "exhausted") return void 0;
11840
+ if (outlook.status !== "ready" || level === void 0 || level === "hold") return {
11841
+ level: "hold",
11842
+ reason: outlook.reason ?? "early-cycle"
11843
+ };
11844
+ const [floor, ceiling] = DISPLAY_RISK_BANDS[level];
11845
+ const probability = Math.min(ceiling, Math.max(floor, Math.round(outlook.probability * 20) / 20));
11846
+ const view = {
11847
+ level,
11848
+ runOutProbability: probability,
11849
+ lastsProbability: 1 - probability,
11850
+ extreme: level === "low" && outlook.probability < .05 || level === "very-likely" && outlook.probability > .95,
11851
+ uncertain: outlook.probabilityHigh - outlook.probabilityLow > .25 || outlook.misfit === true,
11852
+ runOutBy: outlook.runOutCurve
11853
+ };
11854
+ if (outlook.horizonHours >= 24 && outlook.elapsedHours > 0) {
11855
+ view.dailyUsed = outlook.usedPercent / outlook.elapsedHours * 24;
11856
+ view.dailyBudget = outlook.needPacePerHour * 24;
11857
+ }
11858
+ const range = outlook.runOutAt;
11859
+ if (range && !view.uncertain && level !== "low") {
11860
+ const width = range.q90 - range.q10;
11861
+ const limit = Math.max(12 * HOUR_MS, .3 * (windowSeconds ?? 604800) * 1e3);
11862
+ if (width <= 24 * HOUR_MS) view.ifRunsOut = {
11863
+ grain: "part",
11864
+ earliest: range.q50,
11865
+ latest: range.q50
11866
+ };
11867
+ else if (width <= limit) view.ifRunsOut = {
11868
+ grain: "part",
11869
+ earliest: range.q10,
11870
+ latest: range.q90
11871
+ };
11872
+ else view.ifRunsOut = {
11873
+ grain: "day",
11874
+ earliest: range.q50,
11875
+ latest: range.q50
11876
+ };
11877
+ }
11878
+ return view;
11879
+ }
11706
11880
  /** A time estimate is anchored to the reading, never advanced by opening another view later. */
11707
- function quotaForecastView(forecast, { fetchedAt, now = Date.now(), resetsAt, remainingPercent, refreshError = false } = {}) {
11881
+ function quotaForecastView(forecast, options = {}) {
11882
+ const view = shortHorizonView(forecast, options);
11883
+ if (view.kind === "stale" || view.kind === "exhausted") return view;
11884
+ const risk = riskView(forecast, options);
11885
+ return risk === void 0 ? view : {
11886
+ ...view,
11887
+ risk
11888
+ };
11889
+ }
11890
+ function shortHorizonView(forecast, { fetchedAt, now = Date.now(), resetsAt, remainingPercent, refreshError = false } = {}) {
11708
11891
  if (quotaReadingIsStale({
11709
11892
  fetchedAt,
11710
11893
  now,
@@ -11715,7 +11898,8 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
11715
11898
  if (forecast?.status === "calibrating") return { kind: forecast.reason ?? "calibrating" };
11716
11899
  if (forecast?.status === "flat" || forecast?.status === "idle") return {
11717
11900
  kind: "idle",
11718
- upperPacePerHour: forecast.upperPacePerHour
11901
+ upperPacePerHour: forecast.upperPacePerHour,
11902
+ spanMs: forecast.observedSpanMs
11719
11903
  };
11720
11904
  if (!Number.isFinite(fetchedAt)) return { kind: "calibrating" };
11721
11905
  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" };
@@ -11760,9 +11944,18 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
11760
11944
  };
11761
11945
  const today = local(now).day;
11762
11946
  const render = (key, values) => Object.entries(values).reduce((text, [name, value]) => text.replace(`{${name}}`, value), t(key));
11947
+ const weekday = (time) => {
11948
+ const japanese = locale?.toLowerCase().split("-")[0] === "ja";
11949
+ const day = new Intl.DateTimeFormat(locale, {
11950
+ timeZone,
11951
+ weekday: japanese || locale?.startsWith("zh") ? "short" : "long"
11952
+ }).format(time);
11953
+ return japanese ? `${day}曜` : day;
11954
+ };
11955
+ if (view.grain === "day") return weekday(view.earliest);
11763
11956
  const when = (time) => {
11764
11957
  const date = local(time), gap = (date.day - today) / 864e5;
11765
- const day = gap === 0 ? t("paceDay_today") : gap === 1 ? t("paceDay_tomorrow") : new Intl.DateTimeFormat(locale, gap > 1 && gap < 7 ? {
11958
+ const day = view.grain === "part" ? weekday(time) : gap === 0 ? t("paceDay_today") : gap === 1 ? t("paceDay_tomorrow") : new Intl.DateTimeFormat(locale, gap > 1 && gap < 7 ? {
11766
11959
  timeZone,
11767
11960
  weekday: locale?.startsWith("zh") ? "short" : "long"
11768
11961
  } : {
@@ -11772,7 +11965,7 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
11772
11965
  }).format(time);
11773
11966
  const part = date.hour < 5 ? "early" : date.hour < 12 ? "morning" : date.hour < 18 ? "afternoon" : date.hour < 23 ? "evening" : "night";
11774
11967
  const partText = t(`pacePart_${part}`);
11775
- const key = gap === 0 ? part === "early" ? "quotaWhenEarlyToday" : part === "night" ? "quotaWhenTonight" : "quotaWhenToday" : part === "early" ? "quotaWhenEarly" : "paceWhen";
11968
+ const key = view.grain === "part" ? part === "early" ? "quotaOutlookEarly" : "quotaOutlookPart" : gap === 0 ? part === "early" ? "quotaWhenEarlyToday" : part === "night" ? "quotaWhenTonight" : "quotaWhenToday" : part === "early" ? "quotaWhenEarly" : "paceWhen";
11776
11969
  return {
11777
11970
  day: date.day,
11778
11971
  period: part,
@@ -11785,7 +11978,11 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
11785
11978
  };
11786
11979
  if (view.kind !== "time") return void 0;
11787
11980
  const from = when(view.earliest), to = when(view.latest);
11788
- if (from.label === to.label) return from.label;
11981
+ if (from.day === to.day && from.label === to.label) return from.label;
11982
+ if (view.grain === "part" && from.day !== to.day) return render("quotaOutlookRange", {
11983
+ from: from.label,
11984
+ to: to.label
11985
+ });
11789
11986
  const end = from.day === to.day ? render("quotaWhenRangeEnd", {
11790
11987
  part: to.part,
11791
11988
  label: to.label
@@ -11863,8 +12060,7 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
11863
12060
  const usePreferenceSnapshot = (preference) => (0, react.useSyncExternalStore)(preference.subscribe, preference.getSnapshot);
11864
12061
  const useAccountStatusSnapshot = (accountStatus) => (0, react.useSyncExternalStore)(accountStatus.subscribe, accountStatus.getSnapshot);
11865
12062
  const notifyQuickQuota = () => window.dispatchEvent(new Event(QUICK_QUOTA_REFRESH_EVENT));
11866
- const formatQuotaForecast = (forecast, t, options = {}) => {
11867
- const view = quotaForecastView(forecast, options);
12063
+ const formatQuotaForecastView = (view, t, options) => {
11868
12064
  if (view.kind !== "time") return t({
11869
12065
  resolution: "forecastResolution",
11870
12066
  "changing-pace": "forecastChanging",
@@ -11881,6 +12077,62 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
11881
12077
  });
11882
12078
  return fill(t(view.provisional ? "quotaForecastRoughAt" : "quotaForecastAt"), { when });
11883
12079
  };
12080
+ function formatQuotaForecastLines(forecast, t, options = {}) {
12081
+ const view = quotaForecastView(forecast, options);
12082
+ const locale = options.locale ?? uiLocale();
12083
+ const risk = view.risk;
12084
+ if (!risk || risk.level === "hold") {
12085
+ if (view.kind === "idle" && view.spanMs >= 6e4) {
12086
+ const minutes = Math.round(view.spanMs / 6e4);
12087
+ const hours = minutes >= 120;
12088
+ const duration = new Intl.NumberFormat(locale, {
12089
+ style: "unit",
12090
+ unit: hours ? "hour" : "minute",
12091
+ unitDisplay: "long"
12092
+ }).format(hours ? Math.round(minutes / 60) : minutes);
12093
+ return [{
12094
+ role: "status",
12095
+ text: fill(t("quotaForecastIdleFor"), { duration })
12096
+ }];
12097
+ }
12098
+ return [{
12099
+ role: "status",
12100
+ text: formatQuotaForecastView(view, t, options)
12101
+ }];
12102
+ }
12103
+ const percent = new Intl.NumberFormat(locale, {
12104
+ style: "percent",
12105
+ maximumFractionDigits: 0
12106
+ });
12107
+ let text = t("quotaResetOutlookUncertain");
12108
+ if (risk.ifRunsOut) {
12109
+ const when = formatQuotaRunout({
12110
+ kind: "time",
12111
+ ...risk.ifRunsOut
12112
+ }, {
12113
+ ...options,
12114
+ t,
12115
+ locale
12116
+ });
12117
+ text = fill(t(risk.level === "very-likely" ? "quotaResetOutlookExpectedWhen" : "quotaResetOutlookIfExhausted"), { when });
12118
+ } else if (!risk.uncertain && risk.level === "low") text = t(risk.extreme ? "quotaResetOutlookLastsSure" : "quotaResetOutlookLasts");
12119
+ const lines = [{
12120
+ role: "outlook",
12121
+ text
12122
+ }];
12123
+ if ((risk.level !== "low" || risk.uncertain) && Number.isFinite(risk.dailyUsed) && Number.isFinite(risk.dailyBudget)) lines.push({
12124
+ role: "budget",
12125
+ text: fill(t("quotaResetOutlookBudget"), {
12126
+ used: percent.format(risk.dailyUsed / 100),
12127
+ budget: percent.format(risk.dailyBudget / 100)
12128
+ })
12129
+ });
12130
+ if (view.kind === "time") lines.push({
12131
+ role: "status",
12132
+ text: formatQuotaForecastView(view, t, options)
12133
+ });
12134
+ return lines;
12135
+ }
11884
12136
  //#endregion
11885
12137
  //#region src/sidebar-quota.js
11886
12138
  const isDisplayableWindow = (window) => Number.isFinite(window?.remainingPercent) && window.remainingPercent >= 0 && window.remainingPercent <= 100 && Number.isFinite(window?.windowSeconds) && window.windowSeconds > 0;
@@ -11906,7 +12158,7 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
11906
12158
  }
11907
12159
  //#endregion
11908
12160
  //#region src/version.js
11909
- const PACKAGE_VERSION = "3.2.26";
12161
+ const PACKAGE_VERSION = "3.2.28";
11910
12162
  //#endregion
11911
12163
  //#region src/client-recovery.js
11912
12164
  async function recoveryCall(rpc, endpoint, payload = {}, timeoutMs = endpoint === "usage" || endpoint.startsWith("usage/") ? 3e4 : 1e4) {
@@ -12244,7 +12496,10 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
12244
12496
  className: "codexQuotaReset",
12245
12497
  children: shortReset(quota, t)
12246
12498
  })
12247
- ] }), forecastMode ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: formatQuotaForecast(quota.forecast, t, quota) }) : null]
12499
+ ] }), forecastMode ? formatQuotaForecastLines(quota.forecast, t, quota).map(({ role, text }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
12500
+ className: role === "outlook" ? "codexQuotaOutlook" : void 0,
12501
+ children: text
12502
+ }, role)) : null]
12248
12503
  }, `${quota.windowSeconds}-${index}`)), openSettings ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
12249
12504
  type: "button",
12250
12505
  className: "codexQuotaSettingsLink",
@@ -12269,7 +12524,7 @@ a.codexVoiceCall{display:flex;align-items:center;justify-content:center;box-sizi
12269
12524
  hour: "2-digit",
12270
12525
  minute: "2-digit"
12271
12526
  });
12272
- return fill(t("resets"), { value });
12527
+ return fill(t("quotaPopoverResetAt"), { value });
12273
12528
  }
12274
12529
  //#endregion
12275
12530
  //#region node_modules/.pnpm/@heroicons+react@2.2.0_react@18.3.1/node_modules/@heroicons/react/16/solid/esm/BoltIcon.js
@@ -18908,6 +19163,40 @@ void main(){
18908
19163
  })]
18909
19164
  });
18910
19165
  }
19166
+ function CustomInstructionsPreference({ preference, snapshot, t }) {
19167
+ const id = (0, react.useId)();
19168
+ const [draft, setDraft] = (0, react.useState)(null);
19169
+ const saved = snapshot[CUSTOM_INSTRUCTIONS_FIELD];
19170
+ const value = draft ?? saved;
19171
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
19172
+ className: "codexCustomInstructions",
19173
+ children: [
19174
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingsLabel, {
19175
+ as: "label",
19176
+ htmlFor: id,
19177
+ children: t("customInstructionsTitle")
19178
+ }),
19179
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Hint, { children: t("customInstructionsHint") }),
19180
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
19181
+ id,
19182
+ value,
19183
+ rows: 3,
19184
+ maxLength: CUSTOM_INSTRUCTIONS_LIMIT,
19185
+ disabled: snapshot.status !== "ready" || snapshot.hostReadOnly || snapshot.saving,
19186
+ onChange: (event) => setDraft(event.target.value)
19187
+ }),
19188
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
19189
+ variant: "outline",
19190
+ size: "sm",
19191
+ disabled: !ready(snapshot) || value === saved,
19192
+ onClick: async () => {
19193
+ if (await preference.set({ ["customInstructions"]: value })) setDraft(null);
19194
+ },
19195
+ children: t("customInstructionsSave")
19196
+ })
19197
+ ]
19198
+ });
19199
+ }
18911
19200
  function ModelsPage({ preference, t, defaultModel, rpc, active, accountKey }) {
18912
19201
  const snapshot = usePreferenceSnapshot(preference);
18913
19202
  const loaded = snapshot.status === "ready";
@@ -19022,6 +19311,12 @@ void main(){
19022
19311
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InputImageDetailPreference, {
19023
19312
  preference,
19024
19313
  t
19314
+ }),
19315
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "codexSubscriptionDivider" }),
19316
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CustomInstructionsPreference, {
19317
+ preference,
19318
+ snapshot,
19319
+ t
19025
19320
  })
19026
19321
  ]
19027
19322
  }),
@@ -20948,15 +21243,18 @@ void main(){
20948
21243
  t
20949
21244
  })]
20950
21245
  }),
20951
- forecastMode ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
21246
+ forecastMode ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
20952
21247
  className: "codexSubscriptionForecast",
20953
21248
  role: "status",
20954
- children: formatQuotaForecast(window.forecast, t, {
21249
+ children: formatQuotaForecastLines(window.forecast, t, {
20955
21250
  ...window,
20956
21251
  fetchedAt: visibleUsage.fetchedAt,
20957
21252
  now,
20958
21253
  refreshError: error !== void 0
20959
- })
21254
+ }).map(({ role, text }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
21255
+ className: role === "outlook" ? "codexQuotaOutlook" : void 0,
21256
+ children: text
21257
+ }, role))
20960
21258
  }) : null
20961
21259
  ]
20962
21260
  }, `${limit.id}-${window.windowSeconds}-${index}`)))