@michengai/dsh-codex-ui 2.2.1 → 2.2.3
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/CHANGELOG.md +16 -0
- package/CHANGELOG.zh-CN.md +16 -0
- package/lib/client.js +395 -25
- package/lib/composer-plugin.d.mts +18 -0
- package/lib/composer-plugin.mjs +143 -11
- package/lib/desktop-menu-plugin.mjs +1 -1
- package/lib/index.mjs +1 -1
- package/lib/{profile-resolver-BkTv7lmZ.mjs → profile-resolver-DSHfL3KW.mjs} +1 -0
- package/lib/session-title-plugin.mjs +48 -0
- package/lib/settings-skin-plugin.mjs +1 -1
- package/lib/sidebar-plugin.mjs +1 -1
- package/lib/theme-plugin.mjs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.2.3] - 2026-11-14
|
|
4
|
+
|
|
5
|
+
- **Custom Workspace Section Reordering via Actions Menu (Issue #99)**:
|
|
6
|
+
- Added "Move up" and "Move down" actions to the `···` more actions menu on custom section headers, enabling easy manual reordering of workspace sections;
|
|
7
|
+
- Boundary positions are handled automatically (topmost custom sections omit "Move up", and bottommost custom sections omit "Move down");
|
|
8
|
+
- Moving a section immediately updates the visual layout and automatically synchronizes the physical order of enclosed workspaces in the host tree, persisting across restarts.
|
|
9
|
+
|
|
10
|
+
## [2.2.2] - 2026-11-14
|
|
11
|
+
|
|
12
|
+
- **Dedicated Model Selection & Automatic Low Reasoning for Prediction (Issue #98)**:
|
|
13
|
+
- Added a "Prediction model" selector in Settings → Codex UI → Composer Enhancements, matching the single-field experience of the native chat interface;
|
|
14
|
+
- Follows the active conversation's model by default, with the ability to choose any enabled fast model for completions to significantly reduce latency and token consumption;
|
|
15
|
+
- Supports choosing reasoning effort levels for reasoning-capable models, automatically defaulting to the lowest available effort to avoid full-depth thinking during inline typing completions.
|
|
16
|
+
- **Fixed Prediction Route & Configuration Passthrough (Issue #98)**:
|
|
17
|
+
- Fixed an issue where model routing, token bounds, and timeout options specified in Profile configs (`cordis.patch.yml`) were not applied to the prediction engine.
|
|
18
|
+
|
|
3
19
|
## [2.2.1] - 2026-11-13
|
|
4
20
|
|
|
5
21
|
- **Sidebar New Session & Navigation Visibility Fix (Issue #96)**: Fixed an issue where the "New Session" button and custom sidebar navigation items (Tasks, Channels, Scheduled, etc.) disappeared and left a blank area on DeepSeek Harness `0.2.2-rc.3`; added fallback safeguards to ensure native sidebar controls remain visible and functional in all conditions.
|
package/CHANGELOG.zh-CN.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# 更新日志
|
|
2
2
|
|
|
3
|
+
## [2.2.3] - 2026-11-14
|
|
4
|
+
|
|
5
|
+
- **自定义工作区分区支持菜单调整排序(Issue #99)**:
|
|
6
|
+
- 在自定义分区标题栏右侧的 `···` 更多操作菜单中新增「向上移动」与「向下移动」操作项,支持自由调整分区的上下排列顺序;
|
|
7
|
+
- 自动处理首尾边界(最上方的自定义分区不显示向上移动,最下方的自定义分区不显示向下移动);
|
|
8
|
+
- 调整分区顺序后即时刷新界面,并自动将分区内部所包含的工作区在宿主树上的物理顺序同步到位与持久化,重启后依然生效。
|
|
9
|
+
|
|
10
|
+
## [2.2.2] - 2026-11-14
|
|
11
|
+
|
|
12
|
+
- **智能输入预测支持专属模型选择与自动低推理档位(Issue #98)**:
|
|
13
|
+
- 在「设置 → Codex UI → 输入框增强」中新增「预测调用模型」设置项,对齐官方对话界面的单字段极简体验;
|
|
14
|
+
- 默认跟随当前会话模型,同时支持自由指定任意已启用的快速小模型进行输入续写,大幅降低打字补全延迟与 Token 开销;
|
|
15
|
+
- 针对带深度思考的模型,支持展开选择思考强度档位;在未指定时自动选用模型的最低推理强度,避免打字行内预测误跑高强度思考。
|
|
16
|
+
- **预测引擎配置透传修复(Issue #98)**:
|
|
17
|
+
- 修复了此前在 Profile 配置文件(`cordis.patch.yml`)中指定预测模型、最大 Token 限制及超时时间等高级选项未生效的问题。
|
|
18
|
+
|
|
3
19
|
## [2.2.1] - 2026-11-13
|
|
4
20
|
|
|
5
21
|
- **侧栏新会话与导航栏显示修复(Issue #96)**:修复了在 DeepSeek Harness `0.2.2-rc.3` 宿主环境下,展开侧栏时左上角「新建会话」按钮及同组导航项(任务/频道/定时等)消失不见、呈现大面积空白的问题;优化了挂载容错保障,确保在任何异常情况下侧栏原生入口均能平稳回退并保持可用。
|
package/lib/client.js
CHANGED
|
@@ -73,6 +73,7 @@ window.__ModuleLoader__.load({
|
|
|
73
73
|
const FALLBACK_LIST_PEN = createFallbackIcon("M3 4h10M3 8h6M3 12h4m6-3l2 2-5 5H9v-2l5-5z");
|
|
74
74
|
const FALLBACK_LOADING = createFallbackIcon("M8 2a6 6 0 1 0 6 6");
|
|
75
75
|
const FALLBACK_REFRESH = createFallbackIcon("M2.5 8a5.5 5.5 0 1 0 1.2-3.4M2.5 3v3h3");
|
|
76
|
+
const FALLBACK_CHEVRON_DOWN = createFallbackIcon("M4 6l4 4 4-4");
|
|
76
77
|
/**
|
|
77
78
|
* 跨宿主版本图标安全解析器:按候选名依次匹配(新版 → 老版 → Medium/Regular 变体),
|
|
78
79
|
* 全部缺失时才回退到给到的 fallback;没有 fallback 就抛错(由单测保护)。
|
|
@@ -99,6 +100,7 @@ window.__ModuleLoader__.load({
|
|
|
99
100
|
const IconListPenOutlineMedium = hostIcon("IconListPenOutlineMedium", "IconListPenOutline16", FALLBACK_LIST_PEN);
|
|
100
101
|
const IconLoadingOutlineMedium = hostIcon("IconLoadingOutlineMedium", "IconLoadingOutline16", FALLBACK_LOADING);
|
|
101
102
|
const IconRefreshOutlineMedium = hostIcon("IconRefreshOutlineMedium", "IconRefreshOutline16", FALLBACK_REFRESH);
|
|
103
|
+
const IconChevronDownOutlineMedium = hostIcon("IconChevronDownOutlineMedium", "IconChevronDownOutline", FALLBACK_CHEVRON_DOWN);
|
|
102
104
|
//#endregion
|
|
103
105
|
//#region src/business-api.ts
|
|
104
106
|
const CODEX_UI_API_BASE = "/api/michengai/dsh-codex-ui";
|
|
@@ -108,6 +110,7 @@ window.__ModuleLoader__.load({
|
|
|
108
110
|
dependencies: `${CODEX_UI_API_BASE}/dependencies`,
|
|
109
111
|
settingsSkin: `${CODEX_UI_API_BASE}/settings-skin`,
|
|
110
112
|
composer: `${CODEX_UI_API_BASE}/composer`,
|
|
113
|
+
composerModels: `${CODEX_UI_API_BASE}/composer/models`,
|
|
111
114
|
composerPrediction: `${CODEX_UI_API_BASE}/composer/prediction`,
|
|
112
115
|
composerPredictionStream: `${CODEX_UI_API_BASE}/composer/prediction/stream`,
|
|
113
116
|
sidebar: `${CODEX_UI_API_BASE}/sidebar`,
|
|
@@ -3566,7 +3569,7 @@ html[data-dsh-glass] body:not([data-ds-dark-theme]) .dcu-section-card {
|
|
|
3566
3569
|
glassPreset: "codex-ui.glass.preset",
|
|
3567
3570
|
glassGlow: "codex-ui.glass.glow"
|
|
3568
3571
|
});
|
|
3569
|
-
const listeners$
|
|
3572
|
+
const listeners$4 = /* @__PURE__ */ new Set();
|
|
3570
3573
|
const VALID_THEMES = [
|
|
3571
3574
|
"stock",
|
|
3572
3575
|
"codex-dark",
|
|
@@ -3631,7 +3634,7 @@ html[data-dsh-glass] body:not([data-ds-dark-theme]) .dcu-section-card {
|
|
|
3631
3634
|
}
|
|
3632
3635
|
function notify() {
|
|
3633
3636
|
currentSnapshot = computeSnapshot();
|
|
3634
|
-
for (const listener of listeners$
|
|
3637
|
+
for (const listener of listeners$4) try {
|
|
3635
3638
|
listener();
|
|
3636
3639
|
} catch (e) {
|
|
3637
3640
|
console.warn("[codex-ui:theme] listener error:", e);
|
|
@@ -3658,9 +3661,9 @@ html[data-dsh-glass] body:not([data-ds-dark-theme]) .dcu-section-card {
|
|
|
3658
3661
|
notify();
|
|
3659
3662
|
}
|
|
3660
3663
|
function subscribeThemeSettings(listener) {
|
|
3661
|
-
listeners$
|
|
3664
|
+
listeners$4.add(listener);
|
|
3662
3665
|
return () => {
|
|
3663
|
-
listeners$
|
|
3666
|
+
listeners$4.delete(listener);
|
|
3664
3667
|
};
|
|
3665
3668
|
}
|
|
3666
3669
|
if (typeof window !== "undefined") window.addEventListener("storage", (event) => {
|
|
@@ -4591,7 +4594,7 @@ ${SECTION_CARD_CSS}
|
|
|
4591
4594
|
const PREDICTION_STORAGE_KEY = "codex-ui.composer.prediction";
|
|
4592
4595
|
/** 同一窗口内跨标签页同步(storage 事件在写入方自身不触发)。 */
|
|
4593
4596
|
const PREDICTION_STORAGE_EVENT = "codex-ui:prediction-change";
|
|
4594
|
-
const listeners$
|
|
4597
|
+
const listeners$3 = /* @__PURE__ */ new Set();
|
|
4595
4598
|
function safeGetItem(key) {
|
|
4596
4599
|
try {
|
|
4597
4600
|
if (typeof localStorage !== "undefined") return localStorage.getItem(key);
|
|
@@ -4628,7 +4631,7 @@ ${SECTION_CARD_CSS}
|
|
|
4628
4631
|
const next = snapshot();
|
|
4629
4632
|
if (next.subPluginEnabled === cached.subPluginEnabled && next.userEnabled === cached.userEnabled && next.mode === cached.mode && next.hostAllowed === cached.hostAllowed && next.enabled === cached.enabled && next.nextEnabled === cached.nextEnabled && next.continueEnabled === cached.continueEnabled) return;
|
|
4630
4633
|
cached = next;
|
|
4631
|
-
for (const listener of [...listeners$
|
|
4634
|
+
for (const listener of [...listeners$3]) try {
|
|
4632
4635
|
listener();
|
|
4633
4636
|
} catch {}
|
|
4634
4637
|
}
|
|
@@ -4637,8 +4640,8 @@ ${SECTION_CARD_CSS}
|
|
|
4637
4640
|
return cached;
|
|
4638
4641
|
}
|
|
4639
4642
|
function subscribePredictionSettings(listener) {
|
|
4640
|
-
listeners$
|
|
4641
|
-
return () => listeners$
|
|
4643
|
+
listeners$3.add(listener);
|
|
4644
|
+
return () => listeners$3.delete(listener);
|
|
4642
4645
|
}
|
|
4643
4646
|
function setPredictionMode(mode) {
|
|
4644
4647
|
currentMode = mode;
|
|
@@ -4682,7 +4685,7 @@ ${SECTION_CARD_CSS}
|
|
|
4682
4685
|
const HISTORY_SCOPE_STORAGE_KEY = "codex-ui.composer.history-scope";
|
|
4683
4686
|
/** 同一窗口内跨标签页同步(storage 事件在写入方自身不触发)。 */
|
|
4684
4687
|
const HISTORY_SCOPE_STORAGE_EVENT = "codex-ui:history-scope-change";
|
|
4685
|
-
const listeners$
|
|
4688
|
+
const listeners$2 = /* @__PURE__ */ new Set();
|
|
4686
4689
|
function safeStorage() {
|
|
4687
4690
|
try {
|
|
4688
4691
|
if (typeof localStorage !== "undefined") return localStorage;
|
|
@@ -4697,13 +4700,13 @@ ${SECTION_CARD_CSS}
|
|
|
4697
4700
|
return currentScope;
|
|
4698
4701
|
}
|
|
4699
4702
|
function subscribeHistoryScope(listener) {
|
|
4700
|
-
listeners$
|
|
4703
|
+
listeners$2.add(listener);
|
|
4701
4704
|
return () => {
|
|
4702
|
-
listeners$
|
|
4705
|
+
listeners$2.delete(listener);
|
|
4703
4706
|
};
|
|
4704
4707
|
}
|
|
4705
4708
|
function publish() {
|
|
4706
|
-
for (const listener of [...listeners$
|
|
4709
|
+
for (const listener of [...listeners$2]) try {
|
|
4707
4710
|
listener();
|
|
4708
4711
|
} catch {}
|
|
4709
4712
|
}
|
|
@@ -4739,6 +4742,232 @@ ${SECTION_CARD_CSS}
|
|
|
4739
4742
|
};
|
|
4740
4743
|
}
|
|
4741
4744
|
//#endregion
|
|
4745
|
+
//#region src/client/composer/prediction-route-state.ts
|
|
4746
|
+
const PREDICTION_ROUTE_STORAGE_KEY = "codex-ui.composer.prediction-route";
|
|
4747
|
+
let currentRouteChoice = (() => {
|
|
4748
|
+
if (typeof window === "undefined") return null;
|
|
4749
|
+
try {
|
|
4750
|
+
const raw = window.localStorage.getItem(PREDICTION_ROUTE_STORAGE_KEY);
|
|
4751
|
+
if (!raw) return null;
|
|
4752
|
+
const parsed = JSON.parse(raw);
|
|
4753
|
+
if (parsed && typeof parsed === "object" && typeof parsed.provider === "string" && typeof parsed.model === "string" && parsed.provider && parsed.model) return {
|
|
4754
|
+
provider: parsed.provider.trim(),
|
|
4755
|
+
model: parsed.model.trim(),
|
|
4756
|
+
...typeof parsed.reasoningEffort === "string" && parsed.reasoningEffort.trim() !== "" ? { reasoningEffort: parsed.reasoningEffort.trim() } : {}
|
|
4757
|
+
};
|
|
4758
|
+
return null;
|
|
4759
|
+
} catch {
|
|
4760
|
+
return null;
|
|
4761
|
+
}
|
|
4762
|
+
})();
|
|
4763
|
+
const listeners$1 = /* @__PURE__ */ new Set();
|
|
4764
|
+
function getPredictionRoute() {
|
|
4765
|
+
return currentRouteChoice;
|
|
4766
|
+
}
|
|
4767
|
+
function setPredictionRoute(choice) {
|
|
4768
|
+
currentRouteChoice = choice;
|
|
4769
|
+
if (typeof window !== "undefined") try {
|
|
4770
|
+
if (choice && choice.provider && choice.model) window.localStorage.setItem(PREDICTION_ROUTE_STORAGE_KEY, JSON.stringify(choice));
|
|
4771
|
+
else window.localStorage.removeItem(PREDICTION_ROUTE_STORAGE_KEY);
|
|
4772
|
+
} catch {}
|
|
4773
|
+
listeners$1.forEach((fn) => {
|
|
4774
|
+
try {
|
|
4775
|
+
fn();
|
|
4776
|
+
} catch {}
|
|
4777
|
+
});
|
|
4778
|
+
}
|
|
4779
|
+
function subscribePredictionRoute(listener) {
|
|
4780
|
+
listeners$1.add(listener);
|
|
4781
|
+
return () => {
|
|
4782
|
+
listeners$1.delete(listener);
|
|
4783
|
+
};
|
|
4784
|
+
}
|
|
4785
|
+
//#endregion
|
|
4786
|
+
//#region src/client/composer/PredictionModelPicker.tsx
|
|
4787
|
+
let cachedProviders = null;
|
|
4788
|
+
/**
|
|
4789
|
+
* 智能输入预测模型选择器(单字段级联选择组件)
|
|
4790
|
+
* 对齐官方 Chat 式单字段交互:
|
|
4791
|
+
* - 紧凑单字段展示;
|
|
4792
|
+
* - 默认「跟随当前会话」;
|
|
4793
|
+
* - 下拉通过 Menu Submenu 支持推理模型档位级联点选。
|
|
4794
|
+
*/
|
|
4795
|
+
function PredictionModelPicker({ t, disabled = false }) {
|
|
4796
|
+
const currentRoute = (0, react.useSyncExternalStore)(subscribePredictionRoute, getPredictionRoute, getPredictionRoute);
|
|
4797
|
+
const [open, setOpen] = (0, react.useState)(false);
|
|
4798
|
+
const [providers, setProviders] = (0, react.useState)(() => cachedProviders ?? []);
|
|
4799
|
+
(0, react.useEffect)(() => {
|
|
4800
|
+
if (!open) return;
|
|
4801
|
+
if (cachedProviders !== null) {
|
|
4802
|
+
setProviders(cachedProviders);
|
|
4803
|
+
return;
|
|
4804
|
+
}
|
|
4805
|
+
let cancelled = false;
|
|
4806
|
+
fetch(CODEX_UI_API_ENDPOINTS.composerModels).then((res) => res.ok ? res.json() : null).then((data) => {
|
|
4807
|
+
if (cancelled || !data?.ok || !Array.isArray(data.providers)) return;
|
|
4808
|
+
cachedProviders = data.providers;
|
|
4809
|
+
setProviders(data.providers);
|
|
4810
|
+
}).catch(() => {});
|
|
4811
|
+
return () => {
|
|
4812
|
+
cancelled = true;
|
|
4813
|
+
};
|
|
4814
|
+
}, [open]);
|
|
4815
|
+
const handleSelect = (id) => {
|
|
4816
|
+
setOpen(false);
|
|
4817
|
+
if (id === "__follow_session__") {
|
|
4818
|
+
setPredictionRoute(null);
|
|
4819
|
+
return;
|
|
4820
|
+
}
|
|
4821
|
+
if (id.startsWith("model::")) {
|
|
4822
|
+
const [, p, m] = id.split("::");
|
|
4823
|
+
if (p && m) setPredictionRoute({
|
|
4824
|
+
provider: p,
|
|
4825
|
+
model: m
|
|
4826
|
+
});
|
|
4827
|
+
return;
|
|
4828
|
+
}
|
|
4829
|
+
if (id.startsWith("effort::")) {
|
|
4830
|
+
const [, p, m, eff] = id.split("::");
|
|
4831
|
+
if (p && m) {
|
|
4832
|
+
if (eff === "__auto__") setPredictionRoute({
|
|
4833
|
+
provider: p,
|
|
4834
|
+
model: m
|
|
4835
|
+
});
|
|
4836
|
+
else setPredictionRoute({
|
|
4837
|
+
provider: p,
|
|
4838
|
+
model: m,
|
|
4839
|
+
reasoningEffort: eff
|
|
4840
|
+
});
|
|
4841
|
+
}
|
|
4842
|
+
}
|
|
4843
|
+
};
|
|
4844
|
+
const triggerText = (() => {
|
|
4845
|
+
if (!currentRoute || !currentRoute.provider || !currentRoute.model) return t("composer.modelFollowSession") || "跟随当前会话 (默认)";
|
|
4846
|
+
let foundModelName = currentRoute.model;
|
|
4847
|
+
for (const p of providers) if (p.id === currentRoute.provider) {
|
|
4848
|
+
const m = p.models.find((item) => item.id === currentRoute.model);
|
|
4849
|
+
if (m?.name) foundModelName = m.name;
|
|
4850
|
+
break;
|
|
4851
|
+
}
|
|
4852
|
+
if (currentRoute.reasoningEffort) return `${foundModelName} · ${currentRoute.reasoningEffort}`;
|
|
4853
|
+
return foundModelName;
|
|
4854
|
+
})();
|
|
4855
|
+
const selectedId = (() => {
|
|
4856
|
+
if (!currentRoute || !currentRoute.provider || !currentRoute.model) return "__follow_session__";
|
|
4857
|
+
if (currentRoute.reasoningEffort) return `effort::${currentRoute.provider}::${currentRoute.model}::${currentRoute.reasoningEffort}`;
|
|
4858
|
+
for (const p of providers) if (p.id === currentRoute.provider) {
|
|
4859
|
+
const m = p.models.find((item) => item.id === currentRoute.model);
|
|
4860
|
+
if (m?.reasoning?.efforts && m.reasoning.efforts.length > 0) return `effort::${currentRoute.provider}::${currentRoute.model}::__auto__`;
|
|
4861
|
+
break;
|
|
4862
|
+
}
|
|
4863
|
+
return `model::${currentRoute.provider}::${currentRoute.model}`;
|
|
4864
|
+
})();
|
|
4865
|
+
const items = [{
|
|
4866
|
+
id: "__follow_session__",
|
|
4867
|
+
label: t("composer.modelFollowSession") || "跟随当前会话 (默认)"
|
|
4868
|
+
}];
|
|
4869
|
+
if (providers.length > 0) {
|
|
4870
|
+
items.push({
|
|
4871
|
+
type: "separator",
|
|
4872
|
+
id: "sep_follow"
|
|
4873
|
+
});
|
|
4874
|
+
for (const p of providers) {
|
|
4875
|
+
items.push({
|
|
4876
|
+
type: "label",
|
|
4877
|
+
id: `group_${p.id}`,
|
|
4878
|
+
text: p.name
|
|
4879
|
+
});
|
|
4880
|
+
for (const m of p.models) {
|
|
4881
|
+
const efforts = m.reasoning?.efforts ?? [];
|
|
4882
|
+
if (efforts.length === 0) items.push({
|
|
4883
|
+
id: `model::${p.id}::${m.id}`,
|
|
4884
|
+
label: m.name || m.id
|
|
4885
|
+
});
|
|
4886
|
+
else {
|
|
4887
|
+
const submenuEntries = [{
|
|
4888
|
+
id: `effort::${p.id}::${m.id}::__auto__`,
|
|
4889
|
+
label: t("composer.effortAuto") || "自动最低档 (推荐)"
|
|
4890
|
+
}];
|
|
4891
|
+
for (const eff of efforts) submenuEntries.push({
|
|
4892
|
+
id: `effort::${p.id}::${m.id}::${eff.id}`,
|
|
4893
|
+
label: eff.name ? `${eff.name} (${eff.id})` : eff.id
|
|
4894
|
+
});
|
|
4895
|
+
items.push({
|
|
4896
|
+
id: `model_parent::${p.id}::${m.id}`,
|
|
4897
|
+
label: m.name || m.id,
|
|
4898
|
+
submenu: submenuEntries
|
|
4899
|
+
});
|
|
4900
|
+
}
|
|
4901
|
+
}
|
|
4902
|
+
}
|
|
4903
|
+
}
|
|
4904
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4905
|
+
className: "dcu-prediction-model-picker-root",
|
|
4906
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("style", { children: `
|
|
4907
|
+
.dcu-prediction-model-picker-root {
|
|
4908
|
+
display: inline-flex;
|
|
4909
|
+
align-items: center;
|
|
4910
|
+
position: relative;
|
|
4911
|
+
}
|
|
4912
|
+
.dcu-prediction-model-trigger {
|
|
4913
|
+
display: inline-flex;
|
|
4914
|
+
align-items: center;
|
|
4915
|
+
justify-content: space-between;
|
|
4916
|
+
gap: 6px;
|
|
4917
|
+
min-width: 140px;
|
|
4918
|
+
max-width: 280px;
|
|
4919
|
+
height: 32px;
|
|
4920
|
+
padding: 0 10px;
|
|
4921
|
+
font-size: 13px;
|
|
4922
|
+
border-radius: 6px;
|
|
4923
|
+
}
|
|
4924
|
+
.dcu-prediction-model-label {
|
|
4925
|
+
overflow: hidden;
|
|
4926
|
+
text-overflow: ellipsis;
|
|
4927
|
+
white-space: nowrap;
|
|
4928
|
+
flex: 1 1 auto;
|
|
4929
|
+
text-align: left;
|
|
4930
|
+
}
|
|
4931
|
+
.dcu-prediction-model-arrow {
|
|
4932
|
+
flex: 0 0 auto;
|
|
4933
|
+
transition: transform 150ms ease;
|
|
4934
|
+
opacity: 0.7;
|
|
4935
|
+
}
|
|
4936
|
+
.dcu-prediction-model-arrow.is-rotated {
|
|
4937
|
+
transform: rotate(180deg);
|
|
4938
|
+
}
|
|
4939
|
+
` }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Menu, {
|
|
4940
|
+
open,
|
|
4941
|
+
anchor: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
4942
|
+
variant: "outline",
|
|
4943
|
+
size: "sm",
|
|
4944
|
+
disabled,
|
|
4945
|
+
"aria-expanded": open,
|
|
4946
|
+
"aria-haspopup": "menu",
|
|
4947
|
+
className: `dcu-prediction-model-trigger ${open ? "is-open" : ""}`,
|
|
4948
|
+
onClick: () => {
|
|
4949
|
+
if (!disabled) setOpen((prev) => !prev);
|
|
4950
|
+
},
|
|
4951
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4952
|
+
className: "dcu-prediction-model-label",
|
|
4953
|
+
title: triggerText,
|
|
4954
|
+
children: triggerText
|
|
4955
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconChevronDownOutlineMedium, {
|
|
4956
|
+
size: 12,
|
|
4957
|
+
className: `dcu-prediction-model-arrow ${open ? "is-rotated" : ""}`
|
|
4958
|
+
})]
|
|
4959
|
+
}),
|
|
4960
|
+
items,
|
|
4961
|
+
selectedId,
|
|
4962
|
+
onClose: () => setOpen(false),
|
|
4963
|
+
onSelect: handleSelect,
|
|
4964
|
+
portal: true,
|
|
4965
|
+
dense: true,
|
|
4966
|
+
align: "end"
|
|
4967
|
+
})]
|
|
4968
|
+
});
|
|
4969
|
+
}
|
|
4970
|
+
//#endregion
|
|
4742
4971
|
//#region src/client/composer/ComposerSettingsCard.tsx
|
|
4743
4972
|
/**
|
|
4744
4973
|
* 输入框增强设置卡片。
|
|
@@ -4808,6 +5037,22 @@ ${SECTION_CARD_CSS}
|
|
|
4808
5037
|
}
|
|
4809
5038
|
})]
|
|
4810
5039
|
}),
|
|
5040
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5041
|
+
className: "dcu-settings-row",
|
|
5042
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5043
|
+
className: "dcu-settings-row-label",
|
|
5044
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5045
|
+
className: "dcu-settings-row-title",
|
|
5046
|
+
children: t("composer.predictionModel")
|
|
5047
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5048
|
+
className: "dcu-settings-row-hint",
|
|
5049
|
+
children: t("composer.predictionModelHint")
|
|
5050
|
+
})]
|
|
5051
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PredictionModelPicker, {
|
|
5052
|
+
t,
|
|
5053
|
+
disabled: lockedByHost || state.mode === "off"
|
|
5054
|
+
})]
|
|
5055
|
+
}),
|
|
4811
5056
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4812
5057
|
className: "dcu-settings-row",
|
|
4813
5058
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -5462,6 +5707,10 @@ html[data-dsh-glass] body:not([data-ds-dark-theme]) .dcu-section-card{background
|
|
|
5462
5707
|
"composer.modeOff": "オフ",
|
|
5463
5708
|
"composer.modeContinue": "続きのみ",
|
|
5464
5709
|
"composer.modeAll": "予測+続き",
|
|
5710
|
+
"composer.predictionModel": "予測モデル",
|
|
5711
|
+
"composer.predictionModelHint": "デフォルトでは現在の会話に追従します。高速モデルを指定することも可能です。",
|
|
5712
|
+
"composer.modelFollowSession": "現在の会話に従う (デフォルト)",
|
|
5713
|
+
"composer.effortAuto": "自動最少推論 (推奨)",
|
|
5465
5714
|
"composer.historyScope": "履歴の呼び出し範囲",
|
|
5466
5715
|
"composer.historyScopeHint": "現在の会話のみ、または同じワークスペースのすべての会話と共有します。",
|
|
5467
5716
|
"composer.historyScopeSession": "現在の会話",
|
|
@@ -5524,6 +5773,8 @@ html[data-dsh-glass] body:not([data-ds-dark-theme]) .dcu-section-card{background
|
|
|
5524
5773
|
"sections.remove": "セクションを削除",
|
|
5525
5774
|
"sections.addWorkspace": "ワークスペースを追加",
|
|
5526
5775
|
"sections.rename": "名前を変更",
|
|
5776
|
+
"sections.moveUp": "上へ移動",
|
|
5777
|
+
"sections.moveDown": "下へ移動",
|
|
5527
5778
|
"sections.settings": "セクション設定",
|
|
5528
5779
|
"sections.unpin": "ピン留めを解除",
|
|
5529
5780
|
"sections.writeAborted": "ワークスペースの移動が完了しなかったため、自動的に中止されました。",
|
|
@@ -5685,6 +5936,10 @@ html[data-dsh-glass] body:not([data-ds-dark-theme]) .dcu-section-card{background
|
|
|
5685
5936
|
"composer.modeOff": "Desactivado",
|
|
5686
5937
|
"composer.modeContinue": "Solo continuación",
|
|
5687
5938
|
"composer.modeAll": "Predicción y continuación",
|
|
5939
|
+
"composer.predictionModel": "Modelo de predicción",
|
|
5940
|
+
"composer.predictionModelHint": "Sigue la sesión actual por defecto; o especifique un modelo rápido.",
|
|
5941
|
+
"composer.modelFollowSession": "Seguir sesión actual (por defecto)",
|
|
5942
|
+
"composer.effortAuto": "Esfuerzo mínimo automático (recomendado)",
|
|
5688
5943
|
"composer.historyScope": "Alcance del historial",
|
|
5689
5944
|
"composer.historyScopeHint": "Recupera mensajes solo de esta conversación o compártelos con todas las conversaciones del espacio de trabajo.",
|
|
5690
5945
|
"composer.historyScopeSession": "Esta conversación",
|
|
@@ -5747,6 +6002,8 @@ html[data-dsh-glass] body:not([data-ds-dark-theme]) .dcu-section-card{background
|
|
|
5747
6002
|
"sections.remove": "Eliminar sección",
|
|
5748
6003
|
"sections.addWorkspace": "Agregar espacio de trabajo",
|
|
5749
6004
|
"sections.rename": "Renombrar",
|
|
6005
|
+
"sections.moveUp": "Mover hacia arriba",
|
|
6006
|
+
"sections.moveDown": "Mover hacia abajo",
|
|
5750
6007
|
"sections.settings": "Ajustes de sección",
|
|
5751
6008
|
"sections.unpin": "Desfijar",
|
|
5752
6009
|
"sections.writeAborted": "El movimiento del espacio de trabajo no se completó y fue cancelado automáticamente.",
|
|
@@ -5908,6 +6165,10 @@ html[data-dsh-glass] body:not([data-ds-dark-theme]) .dcu-section-card{background
|
|
|
5908
6165
|
"composer.modeOff": "Désactivé",
|
|
5909
6166
|
"composer.modeContinue": "Continuer seulement",
|
|
5910
6167
|
"composer.modeAll": "Prédiction et continuation",
|
|
6168
|
+
"composer.predictionModel": "Modèle de prédiction",
|
|
6169
|
+
"composer.predictionModelHint": "Suit la session actuelle par défaut ; ou spécifiez un modèle rapide.",
|
|
6170
|
+
"composer.modelFollowSession": "Suivre la session actuelle (par défaut)",
|
|
6171
|
+
"composer.effortAuto": "Effort minimal automatique (recommandé)",
|
|
5911
6172
|
"composer.historyScope": "Portée de l'historique",
|
|
5912
6173
|
"composer.historyScopeHint": "Rappelez les messages de cette conversation uniquement, ou partagez-les avec toutes les conversations de l'espace de travail.",
|
|
5913
6174
|
"composer.historyScopeSession": "Cette conversation",
|
|
@@ -5970,6 +6231,8 @@ html[data-dsh-glass] body:not([data-ds-dark-theme]) .dcu-section-card{background
|
|
|
5970
6231
|
"sections.remove": "Supprimer la section",
|
|
5971
6232
|
"sections.addWorkspace": "Ajouter un espace de travail",
|
|
5972
6233
|
"sections.rename": "Renommer",
|
|
6234
|
+
"sections.moveUp": "Monter",
|
|
6235
|
+
"sections.moveDown": "Descendre",
|
|
5973
6236
|
"sections.settings": "Paramètres de section",
|
|
5974
6237
|
"sections.unpin": "Détacher",
|
|
5975
6238
|
"sections.writeAborted": "Le déplacement de l'espace de travail n'a pas abouti et a été automatiquement annulé.",
|
|
@@ -6131,6 +6394,10 @@ html[data-dsh-glass] body:not([data-ds-dark-theme]) .dcu-section-card{background
|
|
|
6131
6394
|
"composer.modeOff": "Aus",
|
|
6132
6395
|
"composer.modeContinue": "Nur Fortsetzung",
|
|
6133
6396
|
"composer.modeAll": "Vorhersage & Fortsetzung",
|
|
6397
|
+
"composer.predictionModel": "Vorhersagemodell",
|
|
6398
|
+
"composer.predictionModelHint": "Folgt standardmäßig der aktuellen Unterhaltung; oder ein schnelles Modell festlegen.",
|
|
6399
|
+
"composer.modelFollowSession": "Aktueller Unterhaltung folgen (Standard)",
|
|
6400
|
+
"composer.effortAuto": "Automatisch niedrigste Stufe (Empfohlen)",
|
|
6134
6401
|
"composer.historyScope": "Verlaufsbereich",
|
|
6135
6402
|
"composer.historyScopeHint": "Erinnerte Eingaben nur aus dieser Unterhaltung oder gemeinsam mit allen Unterhaltungen im Arbeitsbereich.",
|
|
6136
6403
|
"composer.historyScopeSession": "Diese Unterhaltung",
|
|
@@ -6193,6 +6460,8 @@ html[data-dsh-glass] body:not([data-ds-dark-theme]) .dcu-section-card{background
|
|
|
6193
6460
|
"sections.remove": "Bereich entfernen",
|
|
6194
6461
|
"sections.addWorkspace": "Arbeitsbereich hinzufügen",
|
|
6195
6462
|
"sections.rename": "Umbenennen",
|
|
6463
|
+
"sections.moveUp": "Nach oben verschieben",
|
|
6464
|
+
"sections.moveDown": "Nach unten verschieben",
|
|
6196
6465
|
"sections.settings": "Bereichseinstellungen",
|
|
6197
6466
|
"sections.unpin": "Lösen",
|
|
6198
6467
|
"sections.writeAborted": "Verschieben des Arbeitsbereichs wurde nicht abgeschlossen und automatisch abgebrochen.",
|
|
@@ -6354,6 +6623,10 @@ html[data-dsh-glass] body:not([data-ds-dark-theme]) .dcu-section-card{background
|
|
|
6354
6623
|
"composer.modeOff": "Выкл",
|
|
6355
6624
|
"composer.modeContinue": "Только продолжение",
|
|
6356
6625
|
"composer.modeAll": "Предсказание и продолжение",
|
|
6626
|
+
"composer.predictionModel": "Модель предсказания",
|
|
6627
|
+
"composer.predictionModelHint": "По умолчанию следует за текущим диалогом; или укажите быструю модель.",
|
|
6628
|
+
"composer.modelFollowSession": "Следовать за диалогом (по умолчанию)",
|
|
6629
|
+
"composer.effortAuto": "Авто минимальное рассуждение (рекомендуется)",
|
|
6357
6630
|
"composer.historyScope": "Область истории",
|
|
6358
6631
|
"composer.historyScopeHint": "Показывать введённые сообщения только этого диалога или всех диалогов рабочей области.",
|
|
6359
6632
|
"composer.historyScopeSession": "Этот диалог",
|
|
@@ -6416,6 +6689,8 @@ html[data-dsh-glass] body:not([data-ds-dark-theme]) .dcu-section-card{background
|
|
|
6416
6689
|
"sections.remove": "Удалить секцию",
|
|
6417
6690
|
"sections.addWorkspace": "Добавить рабочую область",
|
|
6418
6691
|
"sections.rename": "Переименовать",
|
|
6692
|
+
"sections.moveUp": "Переместить вверх",
|
|
6693
|
+
"sections.moveDown": "Переместить вниз",
|
|
6419
6694
|
"sections.settings": "Настройки секции",
|
|
6420
6695
|
"sections.unpin": "Открепить",
|
|
6421
6696
|
"sections.writeAborted": "Перемещение рабочей области не было завершено и было автоматически отменено.",
|
|
@@ -6577,6 +6852,10 @@ html[data-dsh-glass] body:not([data-ds-dark-theme]) .dcu-section-card{background
|
|
|
6577
6852
|
"composer.modeOff": "Desativado",
|
|
6578
6853
|
"composer.modeContinue": "Apenas continuação",
|
|
6579
6854
|
"composer.modeAll": "Previsão e continuação",
|
|
6855
|
+
"composer.predictionModel": "Modelo de previsão",
|
|
6856
|
+
"composer.predictionModelHint": "Segue a conversa atual por padrão; ou especifique um modelo rápido.",
|
|
6857
|
+
"composer.modelFollowSession": "Seguir conversa atual (padrão)",
|
|
6858
|
+
"composer.effortAuto": "Esforço mínimo automático (recomendado)",
|
|
6580
6859
|
"composer.historyScope": "Escopo do histórico",
|
|
6581
6860
|
"composer.historyScopeHint": "Recupere mensagens apenas desta conversa ou compartilhe com todas as conversas do espaço de trabalho.",
|
|
6582
6861
|
"composer.historyScopeSession": "Esta conversa",
|
|
@@ -6639,6 +6918,8 @@ html[data-dsh-glass] body:not([data-ds-dark-theme]) .dcu-section-card{background
|
|
|
6639
6918
|
"sections.remove": "Remover seção",
|
|
6640
6919
|
"sections.addWorkspace": "Adicionar espaço de trabalho",
|
|
6641
6920
|
"sections.rename": "Renomear",
|
|
6921
|
+
"sections.moveUp": "Mover para cima",
|
|
6922
|
+
"sections.moveDown": "Mover para baixo",
|
|
6642
6923
|
"sections.settings": "Configurações de seção",
|
|
6643
6924
|
"sections.unpin": "Desafixar",
|
|
6644
6925
|
"sections.writeAborted": "A movimentação do espaço de trabalho não foi concluída e foi abortada automaticamente.",
|
|
@@ -6766,6 +7047,8 @@ html[data-dsh-glass] body:not([data-ds-dark-theme]) .dcu-section-card{background
|
|
|
6766
7047
|
"sections.pin": "置顶",
|
|
6767
7048
|
"sections.unpin": "取消置顶",
|
|
6768
7049
|
"sections.rename": "重命名",
|
|
7050
|
+
"sections.moveUp": "向上移动",
|
|
7051
|
+
"sections.moveDown": "向下移动",
|
|
6769
7052
|
"sections.remove": "移除分区",
|
|
6770
7053
|
"sections.addWorkspace": "添加工作区",
|
|
6771
7054
|
"sections.writePending": "工作区移动尚未完成,后续操作正在等待宿主响应。",
|
|
@@ -6890,6 +7173,10 @@ html[data-dsh-glass] body:not([data-ds-dark-theme]) .dcu-section-card{background
|
|
|
6890
7173
|
"composer.modeOff": "关闭",
|
|
6891
7174
|
"composer.modeContinue": "仅续写",
|
|
6892
7175
|
"composer.modeAll": "推测+续写",
|
|
7176
|
+
"composer.predictionModel": "预测调用模型",
|
|
7177
|
+
"composer.predictionModelHint": "默认跟随当前会话;可指定专属轻量小模型以降低延迟与 Token 费用。",
|
|
7178
|
+
"composer.modelFollowSession": "跟随当前会话 (默认)",
|
|
7179
|
+
"composer.effortAuto": "自动最低档 (推荐)",
|
|
6893
7180
|
"composer.historyScope": "历史召回范围",
|
|
6894
7181
|
"composer.historyScopeHint": "仅在当前会话内召回,或与同一工作区的所有会话共享。",
|
|
6895
7182
|
"composer.historyScopeSession": "当前会话",
|
|
@@ -6987,6 +7274,8 @@ html[data-dsh-glass] body:not([data-ds-dark-theme]) .dcu-section-card{background
|
|
|
6987
7274
|
"sections.pin": "Pin",
|
|
6988
7275
|
"sections.unpin": "Unpin",
|
|
6989
7276
|
"sections.rename": "Rename",
|
|
7277
|
+
"sections.moveUp": "Move up",
|
|
7278
|
+
"sections.moveDown": "Move down",
|
|
6990
7279
|
"sections.remove": "Remove section",
|
|
6991
7280
|
"sections.addWorkspace": "Add workspace",
|
|
6992
7281
|
"sections.writePending": "Workspace move is still pending host response.",
|
|
@@ -7111,6 +7400,10 @@ html[data-dsh-glass] body:not([data-ds-dark-theme]) .dcu-section-card{background
|
|
|
7111
7400
|
"composer.modeOff": "Off",
|
|
7112
7401
|
"composer.modeContinue": "Continuation only",
|
|
7113
7402
|
"composer.modeAll": "Prediction & continuation",
|
|
7403
|
+
"composer.predictionModel": "Prediction model",
|
|
7404
|
+
"composer.predictionModelHint": "Follows the active session by default; or specify a fast model to reduce latency and token usage.",
|
|
7405
|
+
"composer.modelFollowSession": "Follow current session (default)",
|
|
7406
|
+
"composer.effortAuto": "Auto lowest effort (recommended)",
|
|
7114
7407
|
"composer.historyScope": "History scope",
|
|
7115
7408
|
"composer.historyScopeHint": "Recall prompts from this conversation only, or share them across every conversation in the workspace.",
|
|
7116
7409
|
"composer.historyScopeSession": "This conversation",
|
|
@@ -10783,17 +11076,20 @@ html[data-dcu-mobile-web] [data-shortcut-modal="settings"][role="dialog"] {
|
|
|
10783
11076
|
});
|
|
10784
11077
|
};
|
|
10785
11078
|
try {
|
|
11079
|
+
const selectedRoute = getPredictionRoute();
|
|
11080
|
+
const payload = {
|
|
11081
|
+
sessionId,
|
|
11082
|
+
mode,
|
|
11083
|
+
draft: draftText
|
|
11084
|
+
};
|
|
11085
|
+
if (selectedRoute && selectedRoute.provider && selectedRoute.model) payload.route = selectedRoute;
|
|
10786
11086
|
const response = await fetch(ENDPOINT, {
|
|
10787
11087
|
method: "POST",
|
|
10788
11088
|
headers: {
|
|
10789
11089
|
"content-type": "application/json",
|
|
10790
11090
|
accept: "text/event-stream"
|
|
10791
11091
|
},
|
|
10792
|
-
body: JSON.stringify(
|
|
10793
|
-
sessionId,
|
|
10794
|
-
mode,
|
|
10795
|
-
draft: draftText
|
|
10796
|
-
}),
|
|
11092
|
+
body: JSON.stringify(payload),
|
|
10797
11093
|
signal: controller.signal
|
|
10798
11094
|
});
|
|
10799
11095
|
if (!response.ok || controller.signal.aborted) {
|
|
@@ -12837,6 +13133,60 @@ html[data-dcu-mobile-web] [data-shortcut-modal="settings"][role="dialog"] {
|
|
|
12837
13133
|
}) };
|
|
12838
13134
|
}
|
|
12839
13135
|
/**
|
|
13136
|
+
* 调整分区顺序。
|
|
13137
|
+
*
|
|
13138
|
+
* @param state - 当前结构。
|
|
13139
|
+
* @param sectionId - 被移动的分区。
|
|
13140
|
+
* @param beforeSectionId - 插入到该分区之前;`null` 表示排到最后(兜底分区之前)。
|
|
13141
|
+
* @returns 新的结构;兜底分区不可移动,非法目标原样返回。
|
|
13142
|
+
*/
|
|
13143
|
+
function moveSection(state, sectionId, beforeSectionId) {
|
|
13144
|
+
if (sectionId === "default" || sectionId === "pinned") return state;
|
|
13145
|
+
const moving = state.sections.find((section) => section.id === sectionId);
|
|
13146
|
+
if (moving === void 0) return state;
|
|
13147
|
+
if (beforeSectionId === "default" || beforeSectionId === sectionId) return state;
|
|
13148
|
+
const rest = state.sections.filter((section) => section.id !== sectionId);
|
|
13149
|
+
let at = rest.length;
|
|
13150
|
+
if (beforeSectionId !== null) {
|
|
13151
|
+
const index = rest.findIndex((section) => section.id === beforeSectionId);
|
|
13152
|
+
if (index === -1) return state;
|
|
13153
|
+
at = index;
|
|
13154
|
+
}
|
|
13155
|
+
rest.splice(at, 0, moving);
|
|
13156
|
+
const fallbackIndex = rest.findIndex((section) => section.id === DEFAULT_SECTION_ID);
|
|
13157
|
+
if (fallbackIndex !== -1 && fallbackIndex !== rest.length - 1) {
|
|
13158
|
+
const [fallback] = rest.splice(fallbackIndex, 1);
|
|
13159
|
+
rest.push(fallback);
|
|
13160
|
+
}
|
|
13161
|
+
return { sections: rest };
|
|
13162
|
+
}
|
|
13163
|
+
/** 判断某个分区是否可以向上移动(必须是非内置分区,且上方还有其他自定义分区)。 */
|
|
13164
|
+
function canMoveSectionUp(state, sectionId) {
|
|
13165
|
+
if (isBuiltinSection(sectionId)) return false;
|
|
13166
|
+
return state.sections.filter((s) => !isBuiltinSection(s.id)).findIndex((s) => s.id === sectionId) > 0;
|
|
13167
|
+
}
|
|
13168
|
+
/** 判断某个分区是否可以向下移动(必须是非内置分区,且下方还有其他自定义分区)。 */
|
|
13169
|
+
function canMoveSectionDown(state, sectionId) {
|
|
13170
|
+
if (isBuiltinSection(sectionId)) return false;
|
|
13171
|
+
const custom = state.sections.filter((s) => !isBuiltinSection(s.id));
|
|
13172
|
+
const index = custom.findIndex((s) => s.id === sectionId);
|
|
13173
|
+
return index !== -1 && index < custom.length - 1;
|
|
13174
|
+
}
|
|
13175
|
+
/** 向上移动自定义分区(与上方相邻的自定义分区交换位置)。 */
|
|
13176
|
+
function moveSectionUp(state, sectionId) {
|
|
13177
|
+
if (!canMoveSectionUp(state, sectionId)) return state;
|
|
13178
|
+
const custom = state.sections.filter((s) => !isBuiltinSection(s.id));
|
|
13179
|
+
const prev = custom[custom.findIndex((s) => s.id === sectionId) - 1];
|
|
13180
|
+
return moveSection(state, sectionId, prev.id);
|
|
13181
|
+
}
|
|
13182
|
+
/** 向下移动自定义分区(与下方相邻的自定义分区交换位置)。 */
|
|
13183
|
+
function moveSectionDown(state, sectionId) {
|
|
13184
|
+
if (!canMoveSectionDown(state, sectionId)) return state;
|
|
13185
|
+
const custom = state.sections.filter((s) => !isBuiltinSection(s.id));
|
|
13186
|
+
const index = custom.findIndex((s) => s.id === sectionId);
|
|
13187
|
+
return moveSection(state, sectionId, index + 2 < custom.length ? custom[index + 2].id : null);
|
|
13188
|
+
}
|
|
13189
|
+
/**
|
|
12840
13190
|
* 用宿主的最新顺序校正归属(用户在原生树上直接拖动项目后调用)。
|
|
12841
13191
|
*
|
|
12842
13192
|
* 判定方式:把新旧顺序做前后缀比较,找出唯一被移动的项;它归入「新位置上方最近的邻居」所属分区,
|
|
@@ -13957,14 +14307,32 @@ body[data-dcu-drag-blocked='true'] [class*="dropAfter"]::after{display:none !imp
|
|
|
13957
14307
|
if (section === void 0) return;
|
|
13958
14308
|
const builtin = sectionId === "pinned" || sectionId === "default";
|
|
13959
14309
|
const items = [];
|
|
13960
|
-
if (!builtin)
|
|
13961
|
-
|
|
13962
|
-
|
|
13963
|
-
|
|
13964
|
-
|
|
13965
|
-
|
|
13966
|
-
|
|
13967
|
-
|
|
14310
|
+
if (!builtin) {
|
|
14311
|
+
items.push({
|
|
14312
|
+
label: text("sections.rename", "重命名"),
|
|
14313
|
+
icon: iconEdit(),
|
|
14314
|
+
onSelect: () => {
|
|
14315
|
+
closeSectionMenu();
|
|
14316
|
+
startRename(sectionId);
|
|
14317
|
+
}
|
|
14318
|
+
});
|
|
14319
|
+
if (canMoveSectionUp(state, sectionId)) items.push({
|
|
14320
|
+
label: text("sections.moveUp", "向上移动"),
|
|
14321
|
+
icon: iconUp(),
|
|
14322
|
+
onSelect: () => {
|
|
14323
|
+
closeSectionMenu();
|
|
14324
|
+
commitExplicit(moveSectionUp(state, sectionId), section.ids);
|
|
14325
|
+
}
|
|
14326
|
+
});
|
|
14327
|
+
if (canMoveSectionDown(state, sectionId)) items.push({
|
|
14328
|
+
label: text("sections.moveDown", "向下移动"),
|
|
14329
|
+
icon: iconDown(),
|
|
14330
|
+
onSelect: () => {
|
|
14331
|
+
closeSectionMenu();
|
|
14332
|
+
commitExplicit(moveSectionDown(state, sectionId), section.ids);
|
|
14333
|
+
}
|
|
14334
|
+
});
|
|
14335
|
+
}
|
|
13968
14336
|
items.push({
|
|
13969
14337
|
label: text("sections.new", "新建分区"),
|
|
13970
14338
|
icon: iconPlus(),
|
|
@@ -14310,6 +14678,8 @@ body[data-dcu-drag-blocked='true'] [class*="dropAfter"]::after{display:none !imp
|
|
|
14310
14678
|
/** 分区展开箭头:和宿主项目行同一颗 `IconTriangleRightFillRegular`,展开时旋转 90°。 */
|
|
14311
14679
|
const iconChevron = () => hostIconMarkup("IconTriangleRightFillRegular");
|
|
14312
14680
|
const iconEdit = () => hostIconMarkup("IconEditOutlineRegular");
|
|
14681
|
+
const iconUp = () => hostIconMarkup("IconChevronUpOutlineRegular");
|
|
14682
|
+
const iconDown = () => hostIconMarkup("IconChevronDownOutlineRegular");
|
|
14313
14683
|
const iconClose = () => hostIconMarkup("IconCloseOutlineRegular");
|
|
14314
14684
|
/**
|
|
14315
14685
|
* 按宿主菜单项的行结构复制一行,保证图标槽、字号、悬停与危险态样式完全一致。
|
|
@@ -14,6 +14,24 @@ type ComposerPluginConfig = {
|
|
|
14
14
|
* @default true
|
|
15
15
|
*/
|
|
16
16
|
prediction?: boolean;
|
|
17
|
+
/** 固定预测调用的 LLM provider(例如 deepseek) */
|
|
18
|
+
provider?: string;
|
|
19
|
+
/** 固定预测调用的 LLM model(例如 deepseek-chat) */
|
|
20
|
+
model?: string;
|
|
21
|
+
/** 预测调用的 reasoning effort(off | low | high | max) */
|
|
22
|
+
reasoningEffort?: string;
|
|
23
|
+
/** 预测生成的最大 token 数(16 ~ 4096,默认 220) */
|
|
24
|
+
maxOutputTokens?: number;
|
|
25
|
+
/** 单次预测超时时间毫秒数(1000 ~ 120000,默认 20000) */
|
|
26
|
+
timeoutMs?: number;
|
|
27
|
+
/** 纳入上下文的最大历史消息条数(2 ~ 40,默认 10) */
|
|
28
|
+
maxMessages?: number;
|
|
29
|
+
/** 纳入上下文的最大字符数(500 ~ 40000,默认 8000) */
|
|
30
|
+
maxChars?: number;
|
|
31
|
+
/** 返回的最大候选数(1 ~ 5,默认 3) */
|
|
32
|
+
maxSuggestions?: number;
|
|
33
|
+
/** 提取的工具活动摘要条数(0 ~ 20,默认 6) */
|
|
34
|
+
maxToolNotes?: number;
|
|
17
35
|
};
|
|
18
36
|
/** 严格读取配置:只有显式 `false` 才关闭,其余(含未声明、类型错误)一律视为开启。 */
|
|
19
37
|
declare function resolvePredictionAllowed(config: ComposerPluginConfig | undefined): boolean;
|
package/lib/composer-plugin.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as CODEX_UI_API_ENDPOINTS, t as isSubPluginDisabledOnDisk$1 } from "./profile-resolver-
|
|
1
|
+
import { r as CODEX_UI_API_ENDPOINTS, t as isSubPluginDisabledOnDisk$1 } from "./profile-resolver-DSHfL3KW.mjs";
|
|
2
2
|
//#region src/composer-prediction.ts
|
|
3
3
|
/** 使用自研专属命名空间端点,杜绝与社区插件全局路径冲突 */
|
|
4
4
|
const ENDPOINT = CODEX_UI_API_ENDPOINTS.composerPrediction;
|
|
@@ -288,6 +288,16 @@ async function planRequest(ctx, request, response) {
|
|
|
288
288
|
error: "no-draft"
|
|
289
289
|
};
|
|
290
290
|
const seq = Number(session.seq);
|
|
291
|
+
let clientRoute;
|
|
292
|
+
if (body?.route && typeof body.route === "object") {
|
|
293
|
+
const p = typeof body.route.provider === "string" ? body.route.provider.trim() : "";
|
|
294
|
+
const m = typeof body.route.model === "string" ? body.route.model.trim() : "";
|
|
295
|
+
if (p !== "" && m !== "") clientRoute = {
|
|
296
|
+
provider: p,
|
|
297
|
+
model: m,
|
|
298
|
+
...typeof body.route.reasoningEffort === "string" && body.route.reasoningEffort.trim() !== "" ? { reasoningEffort: body.route.reasoningEffort.trim() } : {}
|
|
299
|
+
};
|
|
300
|
+
}
|
|
291
301
|
return {
|
|
292
302
|
sessionId,
|
|
293
303
|
session,
|
|
@@ -298,8 +308,12 @@ async function planRequest(ctx, request, response) {
|
|
|
298
308
|
sessionId,
|
|
299
309
|
seq,
|
|
300
310
|
mode,
|
|
301
|
-
draft
|
|
302
|
-
|
|
311
|
+
draft,
|
|
312
|
+
clientRoute?.provider,
|
|
313
|
+
clientRoute?.model,
|
|
314
|
+
clientRoute?.reasoningEffort
|
|
315
|
+
]),
|
|
316
|
+
clientRoute
|
|
303
317
|
};
|
|
304
318
|
}
|
|
305
319
|
/**
|
|
@@ -316,7 +330,7 @@ async function runPrediction(ctx, options, cache, inflight, plan, signals, onDel
|
|
|
316
330
|
const controller = new AbortController();
|
|
317
331
|
inflight.add(controller);
|
|
318
332
|
try {
|
|
319
|
-
const result = await predict(ctx, options, plan.session, plan.sessionId, plan.mode, plan.draft, joinSignals([controller.signal, ...signals]), onDelta);
|
|
333
|
+
const result = await predict(ctx, options, plan.session, plan.sessionId, plan.mode, plan.draft, joinSignals([controller.signal, ...signals]), onDelta, plan.clientRoute);
|
|
320
334
|
if (result.items.length > 0 && !controller.signal.aborted && !signals.some((signal) => signal.aborted)) remember(cache, plan.key, { items: result.items });
|
|
321
335
|
return result;
|
|
322
336
|
} finally {
|
|
@@ -327,13 +341,13 @@ async function runPrediction(ctx, options, cache, inflight, plan, signals, onDel
|
|
|
327
341
|
* Run one auxiliary model call over the transcript tail and tool activity.
|
|
328
342
|
* @returns `{ items }` on success or `{ items: [], reason }` when none is usable.
|
|
329
343
|
*/
|
|
330
|
-
async function predict(ctx, options, session, sessionId, mode, draft, signal, onDelta) {
|
|
344
|
+
async function predict(ctx, options, session, sessionId, mode, draft, signal, onDelta, clientRoute) {
|
|
331
345
|
const prompt = buildPrompt(session, options, mode, draft);
|
|
332
346
|
if (prompt === null) return {
|
|
333
347
|
items: [],
|
|
334
348
|
reason: "no-conversation"
|
|
335
349
|
};
|
|
336
|
-
const route = resolveRoute(ctx, session, options);
|
|
350
|
+
const route = resolveRoute(ctx, session, options, clientRoute);
|
|
337
351
|
if (route === void 0) return {
|
|
338
352
|
items: [],
|
|
339
353
|
reason: "no-route"
|
|
@@ -361,9 +375,11 @@ async function predict(ctx, options, session, sessionId, mode, draft, signal, on
|
|
|
361
375
|
effortIds = [];
|
|
362
376
|
}
|
|
363
377
|
if (effortIds && effortIds.length > 0) {
|
|
364
|
-
const requested = options.reasoningEffort || "off";
|
|
378
|
+
const requested = clientRoute?.reasoningEffort || options.reasoningEffort || "off";
|
|
365
379
|
if (effortIds.includes(requested)) targetEffort = requested;
|
|
366
380
|
else if (effortIds.includes("off")) targetEffort = "off";
|
|
381
|
+
else if (effortIds.includes("low")) targetEffort = "low";
|
|
382
|
+
else targetEffort = effortIds[0];
|
|
367
383
|
}
|
|
368
384
|
}
|
|
369
385
|
const baseConfig = {
|
|
@@ -443,8 +459,13 @@ function remember(cache, key, entry) {
|
|
|
443
459
|
const oldest = cache.keys().next();
|
|
444
460
|
if (!oldest.done) cache.delete(oldest.value);
|
|
445
461
|
}
|
|
446
|
-
/** Prefer
|
|
447
|
-
function resolveRoute(ctx, session, options) {
|
|
462
|
+
/** Prefer explicit client route first, then fixed host options route, then session route, then default model. */
|
|
463
|
+
function resolveRoute(ctx, session, options, clientRoute) {
|
|
464
|
+
if (clientRoute && clientRoute.provider && clientRoute.model) return {
|
|
465
|
+
provider: clientRoute.provider,
|
|
466
|
+
model: clientRoute.model,
|
|
467
|
+
...clientRoute.reasoningEffort ? { reasoningEffort: clientRoute.reasoningEffort } : {}
|
|
468
|
+
};
|
|
448
469
|
if (options.provider !== "" && options.model !== "") return {
|
|
449
470
|
provider: options.provider,
|
|
450
471
|
model: options.model
|
|
@@ -733,9 +754,93 @@ function timedSignal(signal, timeoutMs) {
|
|
|
733
754
|
};
|
|
734
755
|
}
|
|
735
756
|
//#endregion
|
|
757
|
+
//#region src/composer-models.ts
|
|
758
|
+
let catalogCache;
|
|
759
|
+
const CATALOG_TTL_MS = 3e4;
|
|
760
|
+
/**
|
|
761
|
+
* 收集当前宿主已配置的所有可用提供商与模型目录。
|
|
762
|
+
* 遵循与 dsh-automation / dsh-im-connect 一致的提供商排序规范(官方置顶)。
|
|
763
|
+
* 单模型推理信息探测附带超时保护,杜绝外部提供商异常挂死端点。
|
|
764
|
+
*/
|
|
765
|
+
async function collectModelCatalog(ctx) {
|
|
766
|
+
const now = Date.now();
|
|
767
|
+
if (catalogCache !== void 0 && catalogCache.expiresAt > now) return catalogCache.data;
|
|
768
|
+
const llm = ctx.llm ?? ctx.get?.("llm");
|
|
769
|
+
if (!llm || typeof llm.listProviders !== "function") return [];
|
|
770
|
+
let rawProviders = [];
|
|
771
|
+
try {
|
|
772
|
+
rawProviders = llm.listProviders() ?? [];
|
|
773
|
+
} catch {
|
|
774
|
+
return [];
|
|
775
|
+
}
|
|
776
|
+
const providers = [];
|
|
777
|
+
for (const item of rawProviders) {
|
|
778
|
+
const providerId = String(item.id ?? item.provider ?? "").trim();
|
|
779
|
+
if (!providerId) continue;
|
|
780
|
+
const providerName = String(item.name ?? providerId);
|
|
781
|
+
let modelsRaw = [];
|
|
782
|
+
try {
|
|
783
|
+
if (typeof llm.listModels === "function") modelsRaw = await llm.listModels(providerId) ?? [];
|
|
784
|
+
} catch {
|
|
785
|
+
modelsRaw = [];
|
|
786
|
+
}
|
|
787
|
+
const models = [];
|
|
788
|
+
for (const m of modelsRaw) {
|
|
789
|
+
const modelId = String(m?.id ?? "").trim();
|
|
790
|
+
if (!modelId) continue;
|
|
791
|
+
let reasoning = null;
|
|
792
|
+
try {
|
|
793
|
+
if (typeof llm.resolveModelInfo === "function") {
|
|
794
|
+
let timer;
|
|
795
|
+
const timeoutPromise = new Promise((_, reject) => {
|
|
796
|
+
timer = setTimeout(() => reject(/* @__PURE__ */ new Error("timeout")), 1500);
|
|
797
|
+
});
|
|
798
|
+
try {
|
|
799
|
+
const info = await Promise.race([llm.resolveModelInfo(providerId, modelId), timeoutPromise]);
|
|
800
|
+
if (info?.reasoning && Array.isArray(info.reasoning.efforts) && info.reasoning.efforts.length > 0) reasoning = {
|
|
801
|
+
efforts: info.reasoning.efforts.map((e) => ({
|
|
802
|
+
id: String(e.id ?? ""),
|
|
803
|
+
name: e.name ? String(e.name) : void 0,
|
|
804
|
+
description: e.description ? String(e.description) : void 0
|
|
805
|
+
})).filter((e) => e.id !== ""),
|
|
806
|
+
defaultEffort: info.reasoning.defaultEffort ? String(info.reasoning.defaultEffort) : void 0
|
|
807
|
+
};
|
|
808
|
+
} finally {
|
|
809
|
+
if (timer !== void 0) clearTimeout(timer);
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
} catch {
|
|
813
|
+
reasoning = null;
|
|
814
|
+
}
|
|
815
|
+
models.push({
|
|
816
|
+
id: modelId,
|
|
817
|
+
name: m.name ? String(m.name) : modelId,
|
|
818
|
+
description: m.description ? String(m.description) : void 0,
|
|
819
|
+
reasoning
|
|
820
|
+
});
|
|
821
|
+
}
|
|
822
|
+
if (models.length > 0) providers.push({
|
|
823
|
+
id: providerId,
|
|
824
|
+
name: providerName,
|
|
825
|
+
models
|
|
826
|
+
});
|
|
827
|
+
}
|
|
828
|
+
providers.sort((a, b) => {
|
|
829
|
+
const rankA = a.id === "deepseek-account" ? 0 : a.id === "deepseek-official" ? 1 : 2;
|
|
830
|
+
const rankB = b.id === "deepseek-account" ? 0 : b.id === "deepseek-official" ? 1 : 2;
|
|
831
|
+
if (rankA !== rankB) return rankA - rankB;
|
|
832
|
+
return a.name.localeCompare(b.name);
|
|
833
|
+
});
|
|
834
|
+
catalogCache = {
|
|
835
|
+
expiresAt: now + CATALOG_TTL_MS,
|
|
836
|
+
data: providers
|
|
837
|
+
};
|
|
838
|
+
return providers;
|
|
839
|
+
}
|
|
840
|
+
//#endregion
|
|
736
841
|
//#region src/composer-plugin.ts
|
|
737
842
|
const name = "codex-ui-composer";
|
|
738
|
-
const inject = ["webServer"];
|
|
843
|
+
const inject = ["webServer", "llm"];
|
|
739
844
|
function isSubPluginDisabledOnDisk(id, homeDir, ctx) {
|
|
740
845
|
return isSubPluginDisabledOnDisk$1(id, homeDir, ctx);
|
|
741
846
|
}
|
|
@@ -754,7 +859,7 @@ function apply(ctx, config) {
|
|
|
754
859
|
const predictionAllowed = resolvePredictionAllowed(config);
|
|
755
860
|
ctx.effect(() => {
|
|
756
861
|
if (isSubPluginDisabledOnDisk("codex-ui-composer", void 0, ctx) || !predictionAllowed) return () => {};
|
|
757
|
-
apply$1(ctx);
|
|
862
|
+
apply$1(ctx, config);
|
|
758
863
|
return () => {};
|
|
759
864
|
}, "michengai-codex-ui: composer predictions engine");
|
|
760
865
|
ctx.effect(() => {
|
|
@@ -775,8 +880,35 @@ function apply(ctx, config) {
|
|
|
775
880
|
}));
|
|
776
881
|
}
|
|
777
882
|
});
|
|
883
|
+
const disposeModels = webServer.register({
|
|
884
|
+
kind: "exact",
|
|
885
|
+
path: CODEX_UI_API_ENDPOINTS.composerModels,
|
|
886
|
+
handler: async (_request, response) => {
|
|
887
|
+
try {
|
|
888
|
+
const providers = await collectModelCatalog(ctx);
|
|
889
|
+
response.writeHead(200, {
|
|
890
|
+
"content-type": "application/json; charset=utf-8",
|
|
891
|
+
"cache-control": "no-store"
|
|
892
|
+
});
|
|
893
|
+
response.end(JSON.stringify({
|
|
894
|
+
ok: true,
|
|
895
|
+
providers
|
|
896
|
+
}));
|
|
897
|
+
} catch (error) {
|
|
898
|
+
response.writeHead(500, {
|
|
899
|
+
"content-type": "application/json; charset=utf-8",
|
|
900
|
+
"cache-control": "no-store"
|
|
901
|
+
});
|
|
902
|
+
response.end(JSON.stringify({
|
|
903
|
+
ok: false,
|
|
904
|
+
error: String(error)
|
|
905
|
+
}));
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
});
|
|
778
909
|
return () => {
|
|
779
910
|
disposeStatus?.();
|
|
911
|
+
disposeModels?.();
|
|
780
912
|
};
|
|
781
913
|
}, "michengai-codex-ui: composer state");
|
|
782
914
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as CODEX_UI_API_ENDPOINTS, t as isSubPluginDisabledOnDisk$1 } from "./profile-resolver-
|
|
1
|
+
import { r as CODEX_UI_API_ENDPOINTS, t as isSubPluginDisabledOnDisk$1 } from "./profile-resolver-DSHfL3KW.mjs";
|
|
2
2
|
import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
3
3
|
import { tmpdir } from "node:os";
|
|
4
4
|
import { dirname, join } from "node:path";
|
package/lib/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as resolveCurrentProfile, r as CODEX_UI_API_ENDPOINTS } from "./profile-resolver-
|
|
1
|
+
import { n as resolveCurrentProfile, r as CODEX_UI_API_ENDPOINTS } from "./profile-resolver-DSHfL3KW.mjs";
|
|
2
2
|
import { existsSync, mkdirSync, readFileSync, renameSync, unlinkSync, writeFileSync } from "node:fs";
|
|
3
3
|
import { readFile } from "node:fs/promises";
|
|
4
4
|
import { homedir } from "node:os";
|
|
@@ -9,6 +9,7 @@ const CODEX_UI_API_ENDPOINTS = Object.freeze({
|
|
|
9
9
|
dependencies: `${CODEX_UI_API_BASE}/dependencies`,
|
|
10
10
|
settingsSkin: `${CODEX_UI_API_BASE}/settings-skin`,
|
|
11
11
|
composer: `${CODEX_UI_API_BASE}/composer`,
|
|
12
|
+
composerModels: `${CODEX_UI_API_BASE}/composer/models`,
|
|
12
13
|
composerPrediction: `${CODEX_UI_API_BASE}/composer/prediction`,
|
|
13
14
|
composerPredictionStream: `${CODEX_UI_API_BASE}/composer/prediction/stream`,
|
|
14
15
|
sidebar: `${CODEX_UI_API_BASE}/sidebar`,
|
|
@@ -79,6 +79,10 @@ const ja = {
|
|
|
79
79
|
"composer.modeOff": "オフ",
|
|
80
80
|
"composer.modeContinue": "続きのみ",
|
|
81
81
|
"composer.modeAll": "予測+続き",
|
|
82
|
+
"composer.predictionModel": "予測モデル",
|
|
83
|
+
"composer.predictionModelHint": "デフォルトでは現在の会話に追従します。高速モデルを指定することも可能です。",
|
|
84
|
+
"composer.modelFollowSession": "現在の会話に従う (デフォルト)",
|
|
85
|
+
"composer.effortAuto": "自動最少推論 (推奨)",
|
|
82
86
|
"composer.historyScope": "履歴の呼び出し範囲",
|
|
83
87
|
"composer.historyScopeHint": "現在の会話のみ、または同じワークスペースのすべての会話と共有します。",
|
|
84
88
|
"composer.historyScopeSession": "現在の会話",
|
|
@@ -141,6 +145,8 @@ const ja = {
|
|
|
141
145
|
"sections.remove": "セクションを削除",
|
|
142
146
|
"sections.addWorkspace": "ワークスペースを追加",
|
|
143
147
|
"sections.rename": "名前を変更",
|
|
148
|
+
"sections.moveUp": "上へ移動",
|
|
149
|
+
"sections.moveDown": "下へ移動",
|
|
144
150
|
"sections.settings": "セクション設定",
|
|
145
151
|
"sections.unpin": "ピン留めを解除",
|
|
146
152
|
"sections.writeAborted": "ワークスペースの移動が完了しなかったため、自動的に中止されました。",
|
|
@@ -302,6 +308,10 @@ const es = {
|
|
|
302
308
|
"composer.modeOff": "Desactivado",
|
|
303
309
|
"composer.modeContinue": "Solo continuación",
|
|
304
310
|
"composer.modeAll": "Predicción y continuación",
|
|
311
|
+
"composer.predictionModel": "Modelo de predicción",
|
|
312
|
+
"composer.predictionModelHint": "Sigue la sesión actual por defecto; o especifique un modelo rápido.",
|
|
313
|
+
"composer.modelFollowSession": "Seguir sesión actual (por defecto)",
|
|
314
|
+
"composer.effortAuto": "Esfuerzo mínimo automático (recomendado)",
|
|
305
315
|
"composer.historyScope": "Alcance del historial",
|
|
306
316
|
"composer.historyScopeHint": "Recupera mensajes solo de esta conversación o compártelos con todas las conversaciones del espacio de trabajo.",
|
|
307
317
|
"composer.historyScopeSession": "Esta conversación",
|
|
@@ -364,6 +374,8 @@ const es = {
|
|
|
364
374
|
"sections.remove": "Eliminar sección",
|
|
365
375
|
"sections.addWorkspace": "Agregar espacio de trabajo",
|
|
366
376
|
"sections.rename": "Renombrar",
|
|
377
|
+
"sections.moveUp": "Mover hacia arriba",
|
|
378
|
+
"sections.moveDown": "Mover hacia abajo",
|
|
367
379
|
"sections.settings": "Ajustes de sección",
|
|
368
380
|
"sections.unpin": "Desfijar",
|
|
369
381
|
"sections.writeAborted": "El movimiento del espacio de trabajo no se completó y fue cancelado automáticamente.",
|
|
@@ -525,6 +537,10 @@ const fr = {
|
|
|
525
537
|
"composer.modeOff": "Désactivé",
|
|
526
538
|
"composer.modeContinue": "Continuer seulement",
|
|
527
539
|
"composer.modeAll": "Prédiction et continuation",
|
|
540
|
+
"composer.predictionModel": "Modèle de prédiction",
|
|
541
|
+
"composer.predictionModelHint": "Suit la session actuelle par défaut ; ou spécifiez un modèle rapide.",
|
|
542
|
+
"composer.modelFollowSession": "Suivre la session actuelle (par défaut)",
|
|
543
|
+
"composer.effortAuto": "Effort minimal automatique (recommandé)",
|
|
528
544
|
"composer.historyScope": "Portée de l'historique",
|
|
529
545
|
"composer.historyScopeHint": "Rappelez les messages de cette conversation uniquement, ou partagez-les avec toutes les conversations de l'espace de travail.",
|
|
530
546
|
"composer.historyScopeSession": "Cette conversation",
|
|
@@ -587,6 +603,8 @@ const fr = {
|
|
|
587
603
|
"sections.remove": "Supprimer la section",
|
|
588
604
|
"sections.addWorkspace": "Ajouter un espace de travail",
|
|
589
605
|
"sections.rename": "Renommer",
|
|
606
|
+
"sections.moveUp": "Monter",
|
|
607
|
+
"sections.moveDown": "Descendre",
|
|
590
608
|
"sections.settings": "Paramètres de section",
|
|
591
609
|
"sections.unpin": "Détacher",
|
|
592
610
|
"sections.writeAborted": "Le déplacement de l'espace de travail n'a pas abouti et a été automatiquement annulé.",
|
|
@@ -748,6 +766,10 @@ const de = {
|
|
|
748
766
|
"composer.modeOff": "Aus",
|
|
749
767
|
"composer.modeContinue": "Nur Fortsetzung",
|
|
750
768
|
"composer.modeAll": "Vorhersage & Fortsetzung",
|
|
769
|
+
"composer.predictionModel": "Vorhersagemodell",
|
|
770
|
+
"composer.predictionModelHint": "Folgt standardmäßig der aktuellen Unterhaltung; oder ein schnelles Modell festlegen.",
|
|
771
|
+
"composer.modelFollowSession": "Aktueller Unterhaltung folgen (Standard)",
|
|
772
|
+
"composer.effortAuto": "Automatisch niedrigste Stufe (Empfohlen)",
|
|
751
773
|
"composer.historyScope": "Verlaufsbereich",
|
|
752
774
|
"composer.historyScopeHint": "Erinnerte Eingaben nur aus dieser Unterhaltung oder gemeinsam mit allen Unterhaltungen im Arbeitsbereich.",
|
|
753
775
|
"composer.historyScopeSession": "Diese Unterhaltung",
|
|
@@ -810,6 +832,8 @@ const de = {
|
|
|
810
832
|
"sections.remove": "Bereich entfernen",
|
|
811
833
|
"sections.addWorkspace": "Arbeitsbereich hinzufügen",
|
|
812
834
|
"sections.rename": "Umbenennen",
|
|
835
|
+
"sections.moveUp": "Nach oben verschieben",
|
|
836
|
+
"sections.moveDown": "Nach unten verschieben",
|
|
813
837
|
"sections.settings": "Bereichseinstellungen",
|
|
814
838
|
"sections.unpin": "Lösen",
|
|
815
839
|
"sections.writeAborted": "Verschieben des Arbeitsbereichs wurde nicht abgeschlossen und automatisch abgebrochen.",
|
|
@@ -971,6 +995,10 @@ const ru = {
|
|
|
971
995
|
"composer.modeOff": "Выкл",
|
|
972
996
|
"composer.modeContinue": "Только продолжение",
|
|
973
997
|
"composer.modeAll": "Предсказание и продолжение",
|
|
998
|
+
"composer.predictionModel": "Модель предсказания",
|
|
999
|
+
"composer.predictionModelHint": "По умолчанию следует за текущим диалогом; или укажите быструю модель.",
|
|
1000
|
+
"composer.modelFollowSession": "Следовать за диалогом (по умолчанию)",
|
|
1001
|
+
"composer.effortAuto": "Авто минимальное рассуждение (рекомендуется)",
|
|
974
1002
|
"composer.historyScope": "Область истории",
|
|
975
1003
|
"composer.historyScopeHint": "Показывать введённые сообщения только этого диалога или всех диалогов рабочей области.",
|
|
976
1004
|
"composer.historyScopeSession": "Этот диалог",
|
|
@@ -1033,6 +1061,8 @@ const ru = {
|
|
|
1033
1061
|
"sections.remove": "Удалить секцию",
|
|
1034
1062
|
"sections.addWorkspace": "Добавить рабочую область",
|
|
1035
1063
|
"sections.rename": "Переименовать",
|
|
1064
|
+
"sections.moveUp": "Переместить вверх",
|
|
1065
|
+
"sections.moveDown": "Переместить вниз",
|
|
1036
1066
|
"sections.settings": "Настройки секции",
|
|
1037
1067
|
"sections.unpin": "Открепить",
|
|
1038
1068
|
"sections.writeAborted": "Перемещение рабочей области не было завершено и было автоматически отменено.",
|
|
@@ -1194,6 +1224,10 @@ const pt = {
|
|
|
1194
1224
|
"composer.modeOff": "Desativado",
|
|
1195
1225
|
"composer.modeContinue": "Apenas continuação",
|
|
1196
1226
|
"composer.modeAll": "Previsão e continuação",
|
|
1227
|
+
"composer.predictionModel": "Modelo de previsão",
|
|
1228
|
+
"composer.predictionModelHint": "Segue a conversa atual por padrão; ou especifique um modelo rápido.",
|
|
1229
|
+
"composer.modelFollowSession": "Seguir conversa atual (padrão)",
|
|
1230
|
+
"composer.effortAuto": "Esforço mínimo automático (recomendado)",
|
|
1197
1231
|
"composer.historyScope": "Escopo do histórico",
|
|
1198
1232
|
"composer.historyScopeHint": "Recupere mensagens apenas desta conversa ou compartilhe com todas as conversas do espaço de trabalho.",
|
|
1199
1233
|
"composer.historyScopeSession": "Esta conversa",
|
|
@@ -1256,6 +1290,8 @@ const pt = {
|
|
|
1256
1290
|
"sections.remove": "Remover seção",
|
|
1257
1291
|
"sections.addWorkspace": "Adicionar espaço de trabalho",
|
|
1258
1292
|
"sections.rename": "Renomear",
|
|
1293
|
+
"sections.moveUp": "Mover para cima",
|
|
1294
|
+
"sections.moveDown": "Mover para baixo",
|
|
1259
1295
|
"sections.settings": "Configurações de seção",
|
|
1260
1296
|
"sections.unpin": "Desafixar",
|
|
1261
1297
|
"sections.writeAborted": "A movimentação do espaço de trabalho não foi concluída e foi abortada automaticamente.",
|
|
@@ -1381,6 +1417,8 @@ const zh = {
|
|
|
1381
1417
|
"sections.pin": "置顶",
|
|
1382
1418
|
"sections.unpin": "取消置顶",
|
|
1383
1419
|
"sections.rename": "重命名",
|
|
1420
|
+
"sections.moveUp": "向上移动",
|
|
1421
|
+
"sections.moveDown": "向下移动",
|
|
1384
1422
|
"sections.remove": "移除分区",
|
|
1385
1423
|
"sections.addWorkspace": "添加工作区",
|
|
1386
1424
|
"sections.writePending": "工作区移动尚未完成,后续操作正在等待宿主响应。",
|
|
@@ -1505,6 +1543,10 @@ const zh = {
|
|
|
1505
1543
|
"composer.modeOff": "关闭",
|
|
1506
1544
|
"composer.modeContinue": "仅续写",
|
|
1507
1545
|
"composer.modeAll": "推测+续写",
|
|
1546
|
+
"composer.predictionModel": "预测调用模型",
|
|
1547
|
+
"composer.predictionModelHint": "默认跟随当前会话;可指定专属轻量小模型以降低延迟与 Token 费用。",
|
|
1548
|
+
"composer.modelFollowSession": "跟随当前会话 (默认)",
|
|
1549
|
+
"composer.effortAuto": "自动最低档 (推荐)",
|
|
1508
1550
|
"composer.historyScope": "历史召回范围",
|
|
1509
1551
|
"composer.historyScopeHint": "仅在当前会话内召回,或与同一工作区的所有会话共享。",
|
|
1510
1552
|
"composer.historyScopeSession": "当前会话",
|
|
@@ -1602,6 +1644,8 @@ const en = {
|
|
|
1602
1644
|
"sections.pin": "Pin",
|
|
1603
1645
|
"sections.unpin": "Unpin",
|
|
1604
1646
|
"sections.rename": "Rename",
|
|
1647
|
+
"sections.moveUp": "Move up",
|
|
1648
|
+
"sections.moveDown": "Move down",
|
|
1605
1649
|
"sections.remove": "Remove section",
|
|
1606
1650
|
"sections.addWorkspace": "Add workspace",
|
|
1607
1651
|
"sections.writePending": "Workspace move is still pending host response.",
|
|
@@ -1726,6 +1770,10 @@ const en = {
|
|
|
1726
1770
|
"composer.modeOff": "Off",
|
|
1727
1771
|
"composer.modeContinue": "Continuation only",
|
|
1728
1772
|
"composer.modeAll": "Prediction & continuation",
|
|
1773
|
+
"composer.predictionModel": "Prediction model",
|
|
1774
|
+
"composer.predictionModelHint": "Follows the active session by default; or specify a fast model to reduce latency and token usage.",
|
|
1775
|
+
"composer.modelFollowSession": "Follow current session (default)",
|
|
1776
|
+
"composer.effortAuto": "Auto lowest effort (recommended)",
|
|
1729
1777
|
"composer.historyScope": "History scope",
|
|
1730
1778
|
"composer.historyScopeHint": "Recall prompts from this conversation only, or share them across every conversation in the workspace.",
|
|
1731
1779
|
"composer.historyScopeSession": "This conversation",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as CODEX_UI_API_ENDPOINTS, t as isSubPluginDisabledOnDisk } from "./profile-resolver-
|
|
1
|
+
import { r as CODEX_UI_API_ENDPOINTS, t as isSubPluginDisabledOnDisk } from "./profile-resolver-DSHfL3KW.mjs";
|
|
2
2
|
//#region src/settings-skin-plugin.ts
|
|
3
3
|
const name = "codex-ui-settings-skin";
|
|
4
4
|
const inject = ["webServer"];
|
package/lib/sidebar-plugin.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as CODEX_UI_API_ENDPOINTS, t as isSubPluginDisabledOnDisk$1 } from "./profile-resolver-
|
|
1
|
+
import { r as CODEX_UI_API_ENDPOINTS, t as isSubPluginDisabledOnDisk$1 } from "./profile-resolver-DSHfL3KW.mjs";
|
|
2
2
|
//#region src/sidebar-plugin.ts
|
|
3
3
|
const name = "codex-ui-sidebar";
|
|
4
4
|
const inject = ["webServer"];
|
package/lib/theme-plugin.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as CODEX_UI_API_ENDPOINTS, t as isSubPluginDisabledOnDisk$1 } from "./profile-resolver-
|
|
1
|
+
import { r as CODEX_UI_API_ENDPOINTS, t as isSubPluginDisabledOnDisk$1 } from "./profile-resolver-DSHfL3KW.mjs";
|
|
2
2
|
//#region src/theme-plugin.ts
|
|
3
3
|
const name = "codex-ui-theme";
|
|
4
4
|
const inject = ["webServer"];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@michengai/dsh-codex-ui",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.3",
|
|
4
4
|
"description": "DSH Codex UI — 为 DeepSeek Harness 提供极速历史召回、全屏设置皮肤、原生物理毛玻璃换肤、模块化侧栏与桌面原生窗口菜单 · Input enhancement, settings skin, native glass theme, modular sidebar, and desktop titlebar menu for DSH",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"publishConfig": {
|