dsh-context 0.38.3 → 0.38.4

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
@@ -249,6 +249,9 @@ window.__ModuleLoader__.load({
249
249
  "rich.md": "Markdown",
250
250
  "rich.toMd": "按 Markdown 渲染查看",
251
251
  "rich.toRaw": "查看原始文本",
252
+ "rich.md.copy": "复制",
253
+ "rich.md.copied": "已复制",
254
+ "rich.md.footnotes": "脚注",
252
255
  "block.thinking": "思考",
253
256
  "block.answer": "回答",
254
257
  "block.content": "内容",
@@ -517,6 +520,9 @@ window.__ModuleLoader__.load({
517
520
  "rich.md": "Markdown",
518
521
  "rich.toMd": "View as Markdown",
519
522
  "rich.toRaw": "View Raw Text",
523
+ "rich.md.copy": "Copy",
524
+ "rich.md.copied": "Copied",
525
+ "rich.md.footnotes": "Footnotes",
520
526
  "block.thinking": "Reasoning",
521
527
  "block.answer": "Response",
522
528
  "block.content": "Content",
@@ -1706,6 +1712,7 @@ window.__ModuleLoader__.load({
1706
1712
  }
1707
1713
  //#endregion
1708
1714
  //#region src/client/components/richText.tsx
1715
+ const Markdown = _deepseek_ai_dsh_client_ui_primitives.MarkdownText;
1709
1716
  function makeRichText(kit) {
1710
1717
  const { t } = kit;
1711
1718
  function useRichMode() {
@@ -1734,7 +1741,17 @@ window.__ModuleLoader__.load({
1734
1741
  }, line)));
1735
1742
  }
1736
1743
  function RichText(props) {
1737
- if (props.mode === "md") return /* @__PURE__ */ React.createElement("div", { className: "lc-ts-desc-md" }, /* @__PURE__ */ React.createElement(_deepseek_ai_dsh_client_ui_primitives.MarkdownText, { text: props.text }));
1744
+ const mdLabels = React.useMemo(() => ({
1745
+ code: {
1746
+ copyLabel: t("rich.md.copy"),
1747
+ copiedLabel: t("rich.md.copied")
1748
+ },
1749
+ footnotes: t("rich.md.footnotes")
1750
+ }), [t]);
1751
+ if (props.mode === "md") return /* @__PURE__ */ React.createElement("div", { className: "lc-ts-desc-md" }, /* @__PURE__ */ React.createElement(Markdown, {
1752
+ text: props.text,
1753
+ labels: mdLabels
1754
+ }));
1738
1755
  return /* @__PURE__ */ React.createElement(RawText, { text: props.text });
1739
1756
  }
1740
1757
  return {
@@ -4816,7 +4833,7 @@ window.__ModuleLoader__.load({
4816
4833
  return function PluginInfo() {
4817
4834
  const [latest, setLatest] = React.useState(null);
4818
4835
  React.useEffect(() => {
4819
- if ("0.38.3".includes("-dev")) return;
4836
+ if ("0.38.4".includes("-dev")) return;
4820
4837
  let on = true;
4821
4838
  fetchLatestVersion().then((v) => {
4822
4839
  if (on && v) setLatest(v);
@@ -4825,8 +4842,8 @@ window.__ModuleLoader__.load({
4825
4842
  on = false;
4826
4843
  };
4827
4844
  }, []);
4828
- const update = latest !== null && isNewerVersion(latest, "0.38.3") ? latest : null;
4829
- const nameText = "dsh-context (v0.38.3)";
4845
+ const update = latest !== null && isNewerVersion(latest, "0.38.4") ? latest : null;
4846
+ const nameText = "dsh-context (v0.38.4)";
4830
4847
  const nameValue = [nameText];
4831
4848
  if (update) nameValue.push(/* @__PURE__ */ React.createElement("span", {
4832
4849
  key: "update",
package/lib/index.js CHANGED
@@ -2,7 +2,6 @@ import { existsSync, readFileSync } from "node:fs";
2
2
  import { dirname, join, normalize } from "node:path";
3
3
  import { fileURLToPath } from "node:url";
4
4
  import { z } from "zod";
5
- import { settingsNamespace } from "@deepseek-ai/dsh-settings";
6
5
  import z$1 from "@deepseek-ai/schemastery";
7
6
  import { deriveEventMessage } from "@deepseek-ai/dsh-session";
8
7
  /**
@@ -657,7 +656,7 @@ const SettingsSchema = z$1.object({
657
656
  /** Serve the namespace while a settings provider is composed; inert otherwise. */
658
657
  function installSettings(ctx) {
659
658
  ctx.inject(["settings"], (sctx) => {
660
- sctx.settings.register(settingsNamespace(SETTINGS_NAMESPACE), SettingsSchema);
659
+ sctx.settings.register(SETTINGS_NAMESPACE, SettingsSchema);
661
660
  });
662
661
  }
663
662
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-context",
3
- "version": "0.38.3",
3
+ "version": "0.38.4",
4
4
  "description": "A DeepSeek Harness plugin for context insight and management, with context dashboard and context command, for understanding how the context is made of, and how it evolves.",
5
5
  "author": "bowenliang123",
6
6
  "repository": {
@@ -68,14 +68,16 @@
68
68
  "ui"
69
69
  ],
70
70
  "license": "Apache-2.0",
71
+ "dependencies": {
72
+ "zod": "^4.4.3"
73
+ },
71
74
  "peerDependencies": {
72
75
  "@deepseek-ai/cordis": "^4.0.1",
73
76
  "@deepseek-ai/dsh-client-ui-primitives": ">=0.1.0-rc.7",
74
77
  "@deepseek-ai/dsh-session": ">=0.1.0-rc.7",
75
78
  "@deepseek-ai/dsh-settings": ">=0.1.0-rc.7",
76
79
  "@deepseek-ai/schemastery": "^3.18.1",
77
- "react": "^18.3.1",
78
- "zod": "^4.4.3"
80
+ "react": "^18.3.1"
79
81
  },
80
82
  "peerDependenciesMeta": {
81
83
  "@deepseek-ai/dsh-client-ui-primitives": {
@@ -92,6 +94,7 @@
92
94
  "@deepseek-ai/dsh-session-projection": "^0.1.1-rc.2",
93
95
  "@deepseek-ai/dsh-settings": "^0.1.1-rc.2",
94
96
  "@deepseek-ai/schemastery": "^3.18.1",
97
+ "zod": "^4.4.3",
95
98
  "@stylistic/eslint-plugin": "^5.10.0",
96
99
  "@types/node": "^26.2.0",
97
100
  "@types/react": "^18.3.31",