dsh-codex-subscription 3.1.4 → 3.1.6

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
@@ -7276,6 +7276,12 @@ window.__ModuleLoader__.load({
7276
7276
  connectors_write: "直接写入",
7277
7277
  reasoningSummary: "推理摘要",
7278
7278
  reasoningSummaryHint: "让模型在会话的“思考”部分给出推理摘要。自动由模型决定;简洁更短;详细更完整;关闭则不要摘要。",
7279
+ reasoningCache: "切换推理强度时复用缓存",
7280
+ reasoningCache_off: "关闭",
7281
+ reasoningCache_on: "开启",
7282
+ reasoningCacheHint: "默认开启,仅对支持的模型生效,切换推理强度时尽量复用此前缓存。关闭后仍有普通缓存;不保证每次命中或提速。",
7283
+ reasoningCacheCloud: "当前使用云端自动压缩,此优化暂不生效。切回 DSH 压缩后按此开关的选择生效;不会自动更改压缩设置。",
7284
+ reasoningCacheRetry: "当前使用无限重试,此优化暂不生效。切回普通重试策略后按此开关的选择生效;不会自动更改重试设置。",
7279
7285
  retryPolicy: "请求重试",
7280
7286
  retryPolicyHint: "请求因网络或服务端错误失败时的自动重试次数。默认沿用 DSH 的标准重试;无限会一直重试直到成功或手动停止。",
7281
7287
  retryPolicy_default: "默认",
@@ -7667,13 +7673,13 @@ window.__ModuleLoader__.load({
7667
7673
  hideEmail: "隐藏邮箱",
7668
7674
  emailUnavailable: "邮箱不可用",
7669
7675
  searchTitle: "搜索来源",
7670
- searchScope: "自动按当前会话模型分流;手动选择会覆盖所有模型和会话。",
7676
+ searchScope: "自动按当前会话模型分流;手动选择固定来源。关闭“其他模型”后,非 Codex 会话只用 DSH 原生搜索。",
7671
7677
  searchAuto: "自动",
7672
- searchAutoHint: "Codex 模型用订阅搜索,其他模型用 DSH;一方未登录或没有 Key 时自动改用另一方。",
7678
+ searchAutoHint: "Codex 模型优先订阅搜索,其他模型优先 DSH;仅缺少登录、Key 或服务不可用时尝试另一方。关闭“其他模型”后,非 Codex 会话只用 DSH 原生搜索。",
7673
7679
  searchDsh: "DSH 默认",
7674
- searchDshHint: "所有模型使用 DSH 当前搜索服务;没有 API Key 时用已登录的 DeepSeek 账号",
7680
+ searchDshHint: "只使用 DSH 当前配置的搜索服务,失败直接报错;插件不再额外使用 DeepSeek 账号回退。费用由 DSH 所选服务决定。",
7675
7681
  searchCodex: "Codex 订阅",
7676
- searchCodexHint: "所有模型通过已登录的 ChatGPT 订阅搜索",
7682
+ searchCodexHint: "固定使用 ChatGPT 订阅搜索,失败直接报错。关闭“其他模型”后,非 Codex 会话只用 DSH 原生搜索。",
7677
7683
  preferenceFailed: "设置未保存。",
7678
7684
  preferenceRetry: "重试",
7679
7685
  usage: "订阅额度",
@@ -8120,6 +8126,12 @@ window.__ModuleLoader__.load({
8120
8126
  connectors_write: "Write directly",
8121
8127
  reasoningSummary: "Reasoning summary",
8122
8128
  reasoningSummaryHint: "Shows a summary of the reasoning in the Thinking section of the conversation. Auto lets the model decide; concise is shorter; detailed is fuller; off asks for none.",
8129
+ reasoningCache: "Reuse cache when changing effort",
8130
+ reasoningCache_off: "Off",
8131
+ reasoningCache_on: "On",
8132
+ reasoningCacheHint: "On by default for supported models. Tries to reuse earlier cache when you change reasoning effort. Ordinary caching still works when off; cache hits and faster replies are not guaranteed.",
8133
+ reasoningCacheCloud: "Paused while cloud auto-compaction is selected. With DSH compaction, this switch applies again. Your compaction setting is never changed automatically.",
8134
+ reasoningCacheRetry: "Paused while Unlimited retries is selected. With a normal retry policy, this switch applies again. Your retry setting is never changed automatically.",
8123
8135
  retryPolicy: "Request retries",
8124
8136
  retryPolicyHint: "How many times a request is retried after a network or server error. Default keeps the standard DSH retries; Unlimited keeps retrying until it succeeds or you stop it.",
8125
8137
  retryPolicy_default: "Default",
@@ -8511,13 +8523,13 @@ window.__ModuleLoader__.load({
8511
8523
  hideEmail: "Hide email",
8512
8524
  emailUnavailable: "Email unavailable",
8513
8525
  searchTitle: "Search source",
8514
- searchScope: "Auto follows the current session model; an explicit choice overrides every model and session.",
8526
+ searchScope: "Auto follows the current session model; explicit choices fix the source. With Other models off, non-Codex chats use native DSH search only.",
8515
8527
  searchAuto: "Auto",
8516
- searchAutoHint: "Codex models use subscription search; other models use DSH; if one side is not signed in or has no key, the other is used.",
8528
+ searchAutoHint: "Codex models prefer subscription search; other models prefer DSH. Only missing sign-in, keys or an unavailable service trigger the other source. With Other models off, non-Codex chats use native DSH search only.",
8517
8529
  searchDsh: "DSH default",
8518
- searchDshHint: "Use DSH's current search service for every model; without an API key the signed-in DeepSeek account is used",
8530
+ searchDshHint: "Use only DSH's configured search service and report failures directly. The plugin adds no DeepSeek account fallback. Charges depend on the service selected in DSH.",
8519
8531
  searchCodex: "Codex subscription",
8520
- searchCodexHint: "Search through the signed-in ChatGPT subscription for every model",
8532
+ searchCodexHint: "Use ChatGPT subscription search and report failures directly. With Other models off, non-Codex chats use native DSH search only.",
8521
8533
  preferenceFailed: "The setting was not saved.",
8522
8534
  preferenceRetry: "Retry",
8523
8535
  usage: "Subscription quota",
@@ -10659,6 +10671,8 @@ window.__ModuleLoader__.load({
10659
10671
  const DEFAULT_SEARCH_PROVIDER = SEARCH_PROVIDER_AUTO;
10660
10672
  const SPEED_MODE_FIELD = "speedMode";
10661
10673
  const SPEED_MODE_STANDARD = "standard";
10674
+ const SPEED_MODE_FAST = "fast";
10675
+ const SPEED_MODE_ULTRAFAST = "ultrafast";
10662
10676
  const DEFAULT_SPEED_MODE = SPEED_MODE_STANDARD;
10663
10677
  const OUTPUT_VERBOSITY_FIELD = "outputVerbosity";
10664
10678
  const OUTPUT_VERBOSITY_DEFAULT = "default";
@@ -10828,6 +10842,134 @@ window.__ModuleLoader__.load({
10828
10842
  "forecast"
10829
10843
  ].includes(value) ? value : legacyVisible === true ? QUICK_QUOTA_MODE_PERCENT : "off";
10830
10844
  const supportsCodexFastMode = (modelId) => typeof modelId === "string" && (/^gpt-5\.(?:5|6)(?:$|-)/u.test(modelId) || modelId === "gpt-5.4" || modelId === "gpt-6-astra");
10845
+ Object.freeze({
10846
+ compactionMode: {
10847
+ choices: ["dsh", "cloud"],
10848
+ default: "dsh",
10849
+ error: "Invalid compaction mode"
10850
+ },
10851
+ reasoningCache: {
10852
+ choices: [
10853
+ "off",
10854
+ "on",
10855
+ "sol"
10856
+ ],
10857
+ default: "on",
10858
+ error: "Invalid reasoning cache preference"
10859
+ },
10860
+ connectionMode: {
10861
+ choices: ["sse", "websocket"],
10862
+ default: "sse",
10863
+ error: "Invalid connection mode"
10864
+ },
10865
+ reviewModel: {
10866
+ choices: ["session", "official"],
10867
+ default: "session",
10868
+ error: "Invalid review model"
10869
+ },
10870
+ remoteControl: {
10871
+ choices: ["off", "on"],
10872
+ default: "off",
10873
+ error: "Invalid Remote Control setting"
10874
+ },
10875
+ otherModels: {
10876
+ choices: ["on", "off"],
10877
+ default: "on",
10878
+ error: "Invalid other-models setting"
10879
+ },
10880
+ subagentBackend: {
10881
+ choices: ["dsh", "codex"],
10882
+ default: "dsh",
10883
+ error: "Invalid subagent backend"
10884
+ },
10885
+ [QUICK_QUOTA_MODE_FIELD]: {
10886
+ choices: [
10887
+ "off",
10888
+ QUICK_QUOTA_MODE_PERCENT,
10889
+ "bar",
10890
+ QUICK_QUOTA_MODE_FORECAST
10891
+ ],
10892
+ error: "Invalid quick quota preference"
10893
+ },
10894
+ [SEARCH_PROVIDER_FIELD]: {
10895
+ choices: [
10896
+ SEARCH_PROVIDER_AUTO,
10897
+ "dsh",
10898
+ SEARCH_PROVIDER_CODEX
10899
+ ],
10900
+ default: DEFAULT_SEARCH_PROVIDER,
10901
+ error: "Invalid search provider preference"
10902
+ },
10903
+ [SPEED_MODE_FIELD]: {
10904
+ choices: [
10905
+ SPEED_MODE_STANDARD,
10906
+ SPEED_MODE_FAST,
10907
+ SPEED_MODE_ULTRAFAST
10908
+ ],
10909
+ default: DEFAULT_SPEED_MODE,
10910
+ error: "Invalid speed mode preference"
10911
+ },
10912
+ [OUTPUT_VERBOSITY_FIELD]: {
10913
+ choices: [
10914
+ OUTPUT_VERBOSITY_DEFAULT,
10915
+ "low",
10916
+ OUTPUT_VERBOSITY_MEDIUM,
10917
+ OUTPUT_VERBOSITY_HIGH
10918
+ ],
10919
+ default: DEFAULT_OUTPUT_VERBOSITY,
10920
+ error: "Invalid output verbosity preference"
10921
+ },
10922
+ [REASONING_SUMMARY_FIELD]: {
10923
+ choices: REASONING_SUMMARIES,
10924
+ default: DEFAULT_REASONING_SUMMARY,
10925
+ error: "Invalid reasoning summary preference"
10926
+ },
10927
+ [RETRY_POLICY_FIELD]: {
10928
+ choices: RETRY_POLICIES,
10929
+ default: DEFAULT_RETRY_POLICY,
10930
+ error: "Invalid retry policy preference"
10931
+ },
10932
+ [CONNECTORS_FIELD]: {
10933
+ choices: CONNECTOR_MODES,
10934
+ default: "off",
10935
+ error: "Invalid connectors preference"
10936
+ },
10937
+ [INPUT_IMAGE_DETAIL_FIELD]: {
10938
+ choices: INPUT_IMAGE_DETAILS,
10939
+ default: DEFAULT_INPUT_IMAGE_DETAIL,
10940
+ error: "Invalid input image detail preference"
10941
+ },
10942
+ [STREAM_IDLE_TIMEOUT_MINUTES_FIELD]: {
10943
+ choices: STREAM_IDLE_TIMEOUT_MINUTES,
10944
+ default: 10,
10945
+ error: "Invalid stream idle timeout preference"
10946
+ },
10947
+ [VOICE_CALL_FIELD]: {
10948
+ choices: ["off", "on"],
10949
+ default: "off",
10950
+ error: "Invalid voice call setting"
10951
+ },
10952
+ [VOICE_VOICE_FIELD]: {
10953
+ choices: VOICE_VOICES,
10954
+ default: "cove",
10955
+ error: "Invalid voice preference"
10956
+ },
10957
+ [VOICE_LANGUAGE_FIELD]: {
10958
+ choices: VOICE_LANGUAGES,
10959
+ default: "auto",
10960
+ error: "Invalid voice language preference"
10961
+ },
10962
+ [CONTEXT_MODE_FIELD]: {
10963
+ choices: [
10964
+ CONTEXT_MODE_STANDARD,
10965
+ CONTEXT_MODE_EXTENDED,
10966
+ CONTEXT_MODE_CUSTOM
10967
+ ],
10968
+ default: DEFAULT_CONTEXT_MODE,
10969
+ error: "Invalid context mode preference"
10970
+ }
10971
+ });
10972
+ const normalizeReasoningCache = (value) => value === void 0 || value === "on" || value === "sol" ? "on" : "off";
10831
10973
  //#endregion
10832
10974
  //#region src/preference-controller.js
10833
10975
  function createPreferenceController(rpc) {
@@ -10868,6 +11010,7 @@ window.__ModuleLoader__.load({
10868
11010
  remoteControl: value?.remoteControl === "on" ? "on" : "off",
10869
11011
  otherModels: value?.otherModels === "off" ? "off" : "on",
10870
11012
  compactionMode: value?.compactionMode === "cloud" ? "cloud" : "dsh",
11013
+ reasoningCache: normalizeReasoningCache(value?.reasoningCache),
10871
11014
  subagentBackend: value?.subagentBackend === "codex" ? "codex" : "dsh",
10872
11015
  subagentBackendAvailable,
10873
11016
  subagentRuntimeInstalled,
@@ -10934,6 +11077,7 @@ window.__ModuleLoader__.load({
10934
11077
  otherModels: value?.otherModels === "off" ? "off" : "on",
10935
11078
  otherModels: value?.otherModels === "off" ? "off" : "on",
10936
11079
  compactionMode: value?.compactionMode === "cloud" ? "cloud" : "dsh",
11080
+ reasoningCache: normalizeReasoningCache(value?.reasoningCache),
10937
11081
  subagentBackend: value?.subagentBackend === "codex" ? "codex" : "dsh",
10938
11082
  ...readCapabilitySettings(value),
10939
11083
  [QUICK_QUOTA_MODE_FIELD]: normalizeQuickQuotaMode(value?.[QUICK_QUOTA_MODE_FIELD], value?.[LEGACY_QUICK_QUOTA_FIELD]),
@@ -11492,7 +11636,7 @@ window.__ModuleLoader__.load({
11492
11636
  }
11493
11637
  //#endregion
11494
11638
  //#region src/version.js
11495
- const PACKAGE_VERSION = "3.1.4";
11639
+ const PACKAGE_VERSION = "3.1.6";
11496
11640
  //#endregion
11497
11641
  //#region src/client-recovery.js
11498
11642
  async function recoveryCall(rpc, endpoint, payload = {}, timeoutMs = 1e4) {
@@ -16958,6 +17102,42 @@ void main(){
16958
17102
  })]
16959
17103
  });
16960
17104
  }
17105
+ function ReasoningCachePreference({ preference, t }) {
17106
+ const snapshot = usePreferenceSnapshot(preference);
17107
+ const writable = snapshot.status === "ready" && snapshot.writable === true;
17108
+ const blocked = snapshot.compactionMode === "cloud" || snapshot.retryPolicy === "unlimited";
17109
+ const hint = snapshot.compactionMode === "cloud" ? "reasoningCacheCloud" : snapshot.retryPolicy === "unlimited" ? "reasoningCacheRetry" : "reasoningCacheHint";
17110
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
17111
+ className: "codexSubscriptionPreference",
17112
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
17113
+ className: "codexSubscriptionPreferenceCopy",
17114
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
17115
+ className: "codexSubscriptionPreferenceLabel",
17116
+ children: t("reasoningCache")
17117
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Hint, {
17118
+ t,
17119
+ children: t(hint)
17120
+ })]
17121
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
17122
+ className: "codexSubscriptionQuotaModes",
17123
+ role: "radiogroup",
17124
+ "aria-label": t("reasoningCache"),
17125
+ "aria-busy": snapshot.saving || void 0,
17126
+ children: ["off", "on"].map((value) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
17127
+ className: "codexSubscriptionQuotaMode",
17128
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
17129
+ type: "radio",
17130
+ name: "codex-reasoning-cache",
17131
+ checked: snapshot.reasoningCache === value,
17132
+ disabled: !writable || value === "on" && blocked,
17133
+ onChange: () => {
17134
+ preference.set({ reasoningCache: value });
17135
+ }
17136
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t(`reasoningCache_${value}`) })]
17137
+ }, value))
17138
+ })]
17139
+ });
17140
+ }
16961
17141
  function RetryPolicyPreference({ preference, t }) {
16962
17142
  const snapshot = usePreferenceSnapshot(preference);
16963
17143
  const writable = snapshot.status === "ready" && snapshot.writable === true;
@@ -17665,6 +17845,11 @@ void main(){
17665
17845
  t
17666
17846
  }),
17667
17847
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "codexSubscriptionDivider" }),
17848
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ReasoningCachePreference, {
17849
+ preference,
17850
+ t
17851
+ }),
17852
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "codexSubscriptionDivider" }),
17668
17853
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RetryPolicyPreference, {
17669
17854
  preference,
17670
17855
  t