dsh-thinking-levels 1.0.0-beta.1 → 2.0.0-beta.1
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 +55 -38
- package/INSTALL.md +11 -0
- package/INSTALL.zh.md +11 -0
- package/README.md +7 -14
- package/dsh.plugin.json +1 -1
- package/lib/client.js +157 -226
- package/lib/client.js.map +1 -1
- package/package.json +10 -9
package/lib/client.js
CHANGED
|
@@ -447,7 +447,7 @@ window.__ModuleLoader__.load({
|
|
|
447
447
|
padding: "3px 8px",
|
|
448
448
|
fontSize: "13px"
|
|
449
449
|
};
|
|
450
|
-
const sectionStyle = {
|
|
450
|
+
const sectionStyle$1 = {
|
|
451
451
|
marginTop: "14px",
|
|
452
452
|
paddingTop: "12px",
|
|
453
453
|
borderTop: "1px solid var(--dsw-alias-border-l2)"
|
|
@@ -883,14 +883,14 @@ window.__ModuleLoader__.load({
|
|
|
883
883
|
commitContextWindow(entry, void 0);
|
|
884
884
|
};
|
|
885
885
|
if (unavailable) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
886
|
-
style: sectionStyle,
|
|
886
|
+
style: sectionStyle$1,
|
|
887
887
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
888
888
|
style: hintStyle,
|
|
889
889
|
children: t("card.capabilities.unavailable")
|
|
890
890
|
})
|
|
891
891
|
});
|
|
892
892
|
if (allEntries.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
893
|
-
style: sectionStyle,
|
|
893
|
+
style: sectionStyle$1,
|
|
894
894
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
895
895
|
style: fieldLabelStyle,
|
|
896
896
|
children: t("card.capabilities")
|
|
@@ -903,7 +903,7 @@ window.__ModuleLoader__.load({
|
|
|
903
903
|
const visible = needle === "" ? allEntries : allEntries.filter((entry) => entry.modelId.toLowerCase().includes(needle) || entry.providerId.toLowerCase().includes(needle));
|
|
904
904
|
const providerIds = [...new Set(visible.map((entry) => entry.providerId))];
|
|
905
905
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
906
|
-
style: sectionStyle,
|
|
906
|
+
style: sectionStyle$1,
|
|
907
907
|
children: [
|
|
908
908
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
909
909
|
style: fieldLabelStyle,
|
|
@@ -1508,22 +1508,15 @@ window.__ModuleLoader__.load({
|
|
|
1508
1508
|
//#endregion
|
|
1509
1509
|
//#region src/client/context-quick.tsx
|
|
1510
1510
|
/**
|
|
1511
|
-
* Context-window quick control for the
|
|
1512
|
-
* (`conversation.input.
|
|
1513
|
-
*
|
|
1514
|
-
* This is the compat (DSH < 0.1.2-alpha.1) implementation: it targets the
|
|
1515
|
-
* CURRENT session's active model and lets the user cap that model's context
|
|
1516
|
-
* window on the fly. The trigger is a compact pill showing the committed value
|
|
1517
|
-
* only; the popover holds one slider row over the shared presets, a collapsed
|
|
1518
|
-
* custom-integer editor and Clear — no preset button grid.
|
|
1511
|
+
* Context-window quick control for the model menu card
|
|
1512
|
+
* (`conversation.input.model.section`, rendered under the Model /
|
|
1513
|
+
* Reasoning-effort rows of the root pane).
|
|
1519
1514
|
*
|
|
1520
|
-
*
|
|
1521
|
-
* `
|
|
1522
|
-
*
|
|
1523
|
-
*
|
|
1524
|
-
*
|
|
1525
|
-
* line that does not provide the seat renders nothing at all here instead of a
|
|
1526
|
-
* dead control.
|
|
1515
|
+
* It targets the CURRENT session's active model (read through the session
|
|
1516
|
+
* `useTrajectory` standard seat) and lets the user cap that model's context
|
|
1517
|
+
* window on the fly. The row is deliberately compact: one label, a slider over
|
|
1518
|
+
* the shared presets, the committed value, a collapsed custom-integer editor
|
|
1519
|
+
* and Clear — no title block and no preset button grid.
|
|
1527
1520
|
*
|
|
1528
1521
|
* Two model families are served, each with its own writable settings
|
|
1529
1522
|
* namespace (both consumed live by `resolveModelInfo(...).context.contextWindow`,
|
|
@@ -1548,42 +1541,13 @@ window.__ModuleLoader__.load({
|
|
|
1548
1541
|
const DEEPSEEK_DEFAULT_WINDOW = 1e6;
|
|
1549
1542
|
/** Slider stop an unset window parks on: the thumb needs a position, the readout stays "unset". */
|
|
1550
1543
|
const UNSET_STOP_INDEX = CONTEXT_WINDOW_PRESETS.findIndex((preset) => preset.value === 256e3);
|
|
1551
|
-
const
|
|
1552
|
-
display: "inline-flex",
|
|
1553
|
-
alignItems: "center",
|
|
1554
|
-
gap: "4px",
|
|
1555
|
-
height: "24px",
|
|
1556
|
-
padding: "0 8px",
|
|
1557
|
-
background: "var(--dsw-alias-bg-surface, #fff)",
|
|
1558
|
-
color: "var(--dsw-alias-label-secondary)",
|
|
1559
|
-
border: "1px solid var(--dsw-alias-border-l2)",
|
|
1560
|
-
borderRadius: "6px",
|
|
1561
|
-
fontSize: "11px",
|
|
1562
|
-
lineHeight: "16px",
|
|
1563
|
-
fontFamily: "var(--ds-font-family-code, monospace)",
|
|
1564
|
-
cursor: "pointer",
|
|
1565
|
-
whiteSpace: "nowrap"
|
|
1566
|
-
};
|
|
1567
|
-
const popStyle = {
|
|
1568
|
-
position: "absolute",
|
|
1569
|
-
bottom: "calc(100% + 8px)",
|
|
1570
|
-
right: "0",
|
|
1571
|
-
zIndex: 1200,
|
|
1572
|
-
minWidth: "260px",
|
|
1573
|
-
padding: "10px",
|
|
1574
|
-
background: "var(--dsw-alias-bg-layer-3, rgba(127,127,127,0.05))",
|
|
1575
|
-
color: "var(--dsw-alias-label-primary)",
|
|
1576
|
-
border: "1px solid var(--dsw-alias-border-l2)",
|
|
1577
|
-
borderRadius: "10px",
|
|
1578
|
-
boxShadow: "0 8px 28px rgba(0,0,0,0.18)",
|
|
1544
|
+
const sectionStyle = {
|
|
1579
1545
|
display: "flex",
|
|
1580
1546
|
flexDirection: "column",
|
|
1581
|
-
gap: "
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
inset: 0,
|
|
1586
|
-
zIndex: 1199
|
|
1547
|
+
gap: "6px",
|
|
1548
|
+
marginTop: "4px",
|
|
1549
|
+
paddingTop: "7px",
|
|
1550
|
+
borderTop: "1px solid var(--dsw-alias-border-l1)"
|
|
1587
1551
|
};
|
|
1588
1552
|
const rowStyle = {
|
|
1589
1553
|
display: "flex",
|
|
@@ -1683,25 +1647,24 @@ window.__ModuleLoader__.load({
|
|
|
1683
1647
|
/**
|
|
1684
1648
|
* The stable trajectory selector: the seat memoizes its selection on the
|
|
1685
1649
|
* selector reference, so it must not be a fresh closure per render. Selecting
|
|
1686
|
-
* the
|
|
1687
|
-
*
|
|
1650
|
+
* the request ledger (a snapshot-owned array, not a derived object) keeps the
|
|
1651
|
+
* selected value reference-stable between snapshots — a selector that built a
|
|
1688
1652
|
* new object would re-render forever.
|
|
1689
|
-
* @param snapshot - the current
|
|
1690
|
-
* @returns the
|
|
1653
|
+
* @param snapshot - the current Trajectory view snapshot.
|
|
1654
|
+
* @returns the assembled request ledger.
|
|
1691
1655
|
*/
|
|
1692
|
-
const
|
|
1656
|
+
const selectRequests = (snapshot) => snapshot.requests;
|
|
1693
1657
|
/**
|
|
1694
1658
|
* The current session's active model, taken from the trajectory ledger's
|
|
1695
1659
|
* latest assistant request prompt config. Absent for a blank session (no
|
|
1696
|
-
* request yet) — the control then renders disabled.
|
|
1697
|
-
* @param
|
|
1660
|
+
* request yet) — the control then renders read-only/disabled.
|
|
1661
|
+
* @param requests - the trajectory ledger's request views.
|
|
1698
1662
|
*/
|
|
1699
|
-
function activeModelOf(
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
if (requests[index]?.purpose === "assistant" && typeof config?.provider === "string" && typeof config?.model === "string") return {
|
|
1663
|
+
function activeModelOf(requests) {
|
|
1664
|
+
const list = requests ?? [];
|
|
1665
|
+
for (let index = list.length - 1; index >= 0; index -= 1) {
|
|
1666
|
+
const config = list[index]?.prompt?.config;
|
|
1667
|
+
if (list[index]?.purpose === "assistant" && typeof config?.provider === "string" && typeof config?.model === "string") return {
|
|
1705
1668
|
provider: config.provider,
|
|
1706
1669
|
model: config.model
|
|
1707
1670
|
};
|
|
@@ -1714,7 +1677,7 @@ window.__ModuleLoader__.load({
|
|
|
1714
1677
|
}
|
|
1715
1678
|
/**
|
|
1716
1679
|
* The slider stop nearest to a committed token count; a window that matches no
|
|
1717
|
-
* preset still parks the thumb on its closest stop.
|
|
1680
|
+
* preset (typed through the card) still parks the thumb on its closest stop.
|
|
1718
1681
|
* @param value - the committed context window, when one is set.
|
|
1719
1682
|
* @returns the stop index, or the unset park position.
|
|
1720
1683
|
*/
|
|
@@ -1732,28 +1695,14 @@ window.__ModuleLoader__.load({
|
|
|
1732
1695
|
return best;
|
|
1733
1696
|
}
|
|
1734
1697
|
/**
|
|
1735
|
-
* The
|
|
1736
|
-
*
|
|
1737
|
-
*
|
|
1698
|
+
* The model card's context-window section: a preset slider, the committed
|
|
1699
|
+
* value, a collapsed custom-integer editor and Clear. Custom gateways and
|
|
1700
|
+
* official DeepSeek models are both supported (see module doc for the
|
|
1701
|
+
* namespace each writes).
|
|
1738
1702
|
* @param props - injected scopes, session standard seats, copy.
|
|
1739
1703
|
*/
|
|
1740
|
-
function ContextQuick(
|
|
1741
|
-
const
|
|
1742
|
-
if (typeof useConversation !== "function") return null;
|
|
1743
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ContextQuickControl, {
|
|
1744
|
-
...props,
|
|
1745
|
-
useConversation
|
|
1746
|
-
});
|
|
1747
|
-
}
|
|
1748
|
-
/**
|
|
1749
|
-
* The bound control: a value pill that opens a one-row slider popover
|
|
1750
|
-
* (preset slider, committed value, collapsed custom-integer editor, Clear).
|
|
1751
|
-
* Custom gateways and official DeepSeek models are both supported (see module
|
|
1752
|
-
* doc for the namespace each writes).
|
|
1753
|
-
* @param props - injected scopes, the present conversation seat, copy.
|
|
1754
|
-
*/
|
|
1755
|
-
function ContextQuickControl({ useConversation, piAiScope, deepseekScope, t }) {
|
|
1756
|
-
const active = activeModelOf(useConversation(selectTrajectory));
|
|
1704
|
+
function ContextQuick({ useTrajectory, piAiScope, deepseekScope, t }) {
|
|
1705
|
+
const active = activeModelOf(useTrajectory(selectRequests));
|
|
1757
1706
|
const official = active !== void 0 && active.provider === DEEPSEEK_PROVIDER;
|
|
1758
1707
|
const piSnapshot = (0, react.useSyncExternalStore)((listener) => piAiScope.subscribe(listener), () => piAiScope.getSnapshot());
|
|
1759
1708
|
const dsSnapshot = (0, react.useSyncExternalStore)((listener) => deepseekScope.subscribe(listener), () => deepseekScope.getSnapshot());
|
|
@@ -1775,7 +1724,6 @@ window.__ModuleLoader__.load({
|
|
|
1775
1724
|
currentWindow = model === void 0 ? void 0 : contextWindowOf(model);
|
|
1776
1725
|
writableTarget = model !== void 0;
|
|
1777
1726
|
}
|
|
1778
|
-
const [open, setOpen] = (0, react.useState)(false);
|
|
1779
1727
|
const [draft, setDraft] = (0, react.useState)(null);
|
|
1780
1728
|
const [custom, setCustom] = (0, react.useState)(false);
|
|
1781
1729
|
const [raw, setRaw] = (0, react.useState)("");
|
|
@@ -1852,136 +1800,112 @@ window.__ModuleLoader__.load({
|
|
|
1852
1800
|
commitWindow(validation.value);
|
|
1853
1801
|
};
|
|
1854
1802
|
const value = draft === null ? currentWindow === void 0 ? t("input.context.unset") : formatContextWindow(currentWindow) : formatContextWindow(CONTEXT_WINDOW_PRESETS[draft]?.value ?? 0);
|
|
1855
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("
|
|
1856
|
-
style:
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
setRaw(event.currentTarget.value);
|
|
1962
|
-
},
|
|
1963
|
-
onKeyDown: (event) => {
|
|
1964
|
-
if (event.key === "Enter") applyCustom();
|
|
1965
|
-
}
|
|
1966
|
-
}),
|
|
1967
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1968
|
-
type: "button",
|
|
1969
|
-
disabled,
|
|
1970
|
-
style: {
|
|
1971
|
-
...actionButtonStyle,
|
|
1972
|
-
cursor: disabled ? "default" : "pointer",
|
|
1973
|
-
opacity: disabled ? .55 : 1
|
|
1974
|
-
},
|
|
1975
|
-
onClick: applyCustom,
|
|
1976
|
-
children: t("input.context.apply")
|
|
1977
|
-
}),
|
|
1978
|
-
error !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1979
|
-
style: errorStyle,
|
|
1980
|
-
children: error
|
|
1981
|
-
})
|
|
1982
|
-
]
|
|
1983
|
-
}) : null]
|
|
1984
|
-
})] }) : null]
|
|
1803
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
1804
|
+
style: sectionStyle,
|
|
1805
|
+
role: "group",
|
|
1806
|
+
"aria-label": t("input.context.title"),
|
|
1807
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1808
|
+
style: rowStyle,
|
|
1809
|
+
children: [
|
|
1810
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1811
|
+
style: labelStyle,
|
|
1812
|
+
title: t("input.context.globalHint"),
|
|
1813
|
+
children: t("input.context.title")
|
|
1814
|
+
}),
|
|
1815
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
1816
|
+
type: "range",
|
|
1817
|
+
min: 0,
|
|
1818
|
+
max: CONTEXT_WINDOW_PRESETS.length - 1,
|
|
1819
|
+
step: 1,
|
|
1820
|
+
value: stop,
|
|
1821
|
+
disabled,
|
|
1822
|
+
"aria-label": t("input.context.title"),
|
|
1823
|
+
title: active === void 0 ? t("input.context.noModel") : `${active.provider}/${active.model}`,
|
|
1824
|
+
style: {
|
|
1825
|
+
...sliderStyle,
|
|
1826
|
+
cursor: disabled ? "default" : "pointer",
|
|
1827
|
+
opacity: disabled ? .55 : 1
|
|
1828
|
+
},
|
|
1829
|
+
onChange: (event) => {
|
|
1830
|
+
setDraft(Number(event.currentTarget.value));
|
|
1831
|
+
},
|
|
1832
|
+
onPointerUp: commitStop,
|
|
1833
|
+
onKeyUp: commitStop,
|
|
1834
|
+
onBlur: commitStop
|
|
1835
|
+
}),
|
|
1836
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1837
|
+
style: valueStyle,
|
|
1838
|
+
children: value
|
|
1839
|
+
}),
|
|
1840
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1841
|
+
type: "button",
|
|
1842
|
+
disabled,
|
|
1843
|
+
"aria-label": t("input.context.custom"),
|
|
1844
|
+
"aria-expanded": custom,
|
|
1845
|
+
title: t("input.context.custom"),
|
|
1846
|
+
style: {
|
|
1847
|
+
...glyphButtonStyle,
|
|
1848
|
+
cursor: disabled ? "default" : "pointer",
|
|
1849
|
+
opacity: disabled ? .55 : 1
|
|
1850
|
+
},
|
|
1851
|
+
onClick: () => {
|
|
1852
|
+
setCustom((open) => !open);
|
|
1853
|
+
setError(null);
|
|
1854
|
+
},
|
|
1855
|
+
children: "⋯"
|
|
1856
|
+
}),
|
|
1857
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1858
|
+
type: "button",
|
|
1859
|
+
disabled: disabled || currentWindow === void 0,
|
|
1860
|
+
style: {
|
|
1861
|
+
...actionButtonStyle,
|
|
1862
|
+
cursor: disabled || currentWindow === void 0 ? "default" : "pointer",
|
|
1863
|
+
opacity: disabled || currentWindow === void 0 ? .55 : 1
|
|
1864
|
+
},
|
|
1865
|
+
onClick: () => {
|
|
1866
|
+
setDraft(null);
|
|
1867
|
+
setError(null);
|
|
1868
|
+
setRaw("");
|
|
1869
|
+
commitWindow(void 0);
|
|
1870
|
+
},
|
|
1871
|
+
children: t("input.context.clear")
|
|
1872
|
+
})
|
|
1873
|
+
]
|
|
1874
|
+
}), custom ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1875
|
+
style: customRowStyle,
|
|
1876
|
+
children: [
|
|
1877
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
1878
|
+
type: "text",
|
|
1879
|
+
inputMode: "numeric",
|
|
1880
|
+
value: raw,
|
|
1881
|
+
disabled,
|
|
1882
|
+
placeholder: t("input.context.customPlaceholder"),
|
|
1883
|
+
"aria-label": t("input.context.customPlaceholder"),
|
|
1884
|
+
style: inputStyle,
|
|
1885
|
+
onChange: (event) => {
|
|
1886
|
+
setRaw(event.currentTarget.value);
|
|
1887
|
+
},
|
|
1888
|
+
onKeyDown: (event) => {
|
|
1889
|
+
if (event.key === "Enter") applyCustom();
|
|
1890
|
+
}
|
|
1891
|
+
}),
|
|
1892
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1893
|
+
type: "button",
|
|
1894
|
+
disabled,
|
|
1895
|
+
style: {
|
|
1896
|
+
...actionButtonStyle,
|
|
1897
|
+
cursor: disabled ? "default" : "pointer",
|
|
1898
|
+
opacity: disabled ? .55 : 1
|
|
1899
|
+
},
|
|
1900
|
+
onClick: applyCustom,
|
|
1901
|
+
children: t("input.context.apply")
|
|
1902
|
+
}),
|
|
1903
|
+
error !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1904
|
+
style: errorStyle,
|
|
1905
|
+
children: error
|
|
1906
|
+
})
|
|
1907
|
+
]
|
|
1908
|
+
}) : null]
|
|
1985
1909
|
});
|
|
1986
1910
|
}
|
|
1987
1911
|
//#endregion
|
|
@@ -1999,12 +1923,19 @@ window.__ModuleLoader__.load({
|
|
|
1999
1923
|
* @param ctx - client root context.
|
|
2000
1924
|
*/
|
|
2001
1925
|
function apply(ctx) {
|
|
2002
|
-
ctx.effect(() =>
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
1926
|
+
ctx.effect(() => {
|
|
1927
|
+
const disposers = [
|
|
1928
|
+
ctx.locale.register(NS, {
|
|
1929
|
+
zh,
|
|
1930
|
+
en
|
|
1931
|
+
}),
|
|
1932
|
+
ctx.locale.register(NS, "ja", ja),
|
|
1933
|
+
ctx.locale.register(NS, "ko", ko)
|
|
1934
|
+
];
|
|
1935
|
+
return () => {
|
|
1936
|
+
for (const dispose of disposers) dispose();
|
|
1937
|
+
};
|
|
1938
|
+
}, "dsh-thinking-levels: dictionaries");
|
|
2008
1939
|
ctx.slots.inject("settings.plugin.item", function* () {
|
|
2009
1940
|
yield ctx.slots.register({
|
|
2010
1941
|
name: "settings.plugin.item",
|
|
@@ -2019,9 +1950,9 @@ window.__ModuleLoader__.load({
|
|
|
2019
1950
|
}
|
|
2020
1951
|
}, ThinkingLevelsCard);
|
|
2021
1952
|
});
|
|
2022
|
-
ctx.slots.inject("conversation.input.
|
|
1953
|
+
ctx.slots.inject("conversation.input.model.section", function* () {
|
|
2023
1954
|
yield ctx.slots.register({
|
|
2024
|
-
name: "conversation.input.
|
|
1955
|
+
name: "conversation.input.model.section",
|
|
2025
1956
|
id: "context-window-quick",
|
|
2026
1957
|
locale: NS,
|
|
2027
1958
|
inject: () => {
|