@michengai/dsh-codex-ui 0.2.70 → 0.2.71

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.
Files changed (2) hide show
  1. package/dist/client.js +34 -4
  2. package/package.json +6 -6
package/dist/client.js CHANGED
@@ -2705,6 +2705,19 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
2705
2705
  }
2706
2706
  //#endregion
2707
2707
  //#region src/client/ChannelBrowser.tsx
2708
+ const CHANNEL_LOCALE_KEYS = {
2709
+ dingtalk: "channel.dingtalk",
2710
+ feishu: "channel.feishu",
2711
+ lark: "channel.lark",
2712
+ weixin: "channel.weixin",
2713
+ wecom: "channel.wecom",
2714
+ qq: "channel.qq",
2715
+ telegram: "channel.telegram"
2716
+ };
2717
+ function channelLabel(id, fallback, t) {
2718
+ const key = CHANNEL_LOCALE_KEYS[id];
2719
+ return key === void 0 ? fallback : t(key);
2720
+ }
2708
2721
  /** 频道树:数据来自 IM,行/菜单/悬停与任务树共用。 */
2709
2722
  function ChannelBrowser(props) {
2710
2723
  const [menu, setMenu] = (0, react.useState)();
@@ -2747,8 +2760,8 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
2747
2760
  setGroups(next);
2748
2761
  setPollError(void 0);
2749
2762
  }
2750
- }).catch((reason) => {
2751
- if (!disposed) setPollError(reason instanceof Error ? reason.message : String(reason));
2763
+ }).catch(() => {
2764
+ if (!disposed) setPollError(t("channels.loadError"));
2752
2765
  }).finally(() => {
2753
2766
  loading = false;
2754
2767
  });
@@ -2781,11 +2794,12 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
2781
2794
  }),
2782
2795
  groups.map((group) => {
2783
2796
  const isExpanded = expanded[group.id] ?? true;
2797
+ const label = channelLabel(group.id, group.label, t);
2784
2798
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
2785
2799
  className: "dcu-wb-project",
2786
2800
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(GroupHead, {
2787
2801
  expanded: isExpanded,
2788
- title: group.label,
2802
+ title: label,
2789
2803
  icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ChannelBrandIcon, { id: group.id }),
2790
2804
  onToggle: () => {
2791
2805
  setExpanded((current) => ({
@@ -2835,7 +2849,7 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
2835
2849
  const box = hoverCardAnchor(event.currentTarget.getBoundingClientRect());
2836
2850
  showTip({
2837
2851
  title,
2838
- project: group.label,
2852
+ project: label,
2839
2853
  time: updatedAt === void 0 ? void 0 : formatHoverTime(updatedAt),
2840
2854
  left: box.left,
2841
2855
  top: box.top
@@ -4036,6 +4050,14 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
4036
4050
  "sidebar.channelsTab": "频道",
4037
4051
  "sidebar.scheduleTab": "定时",
4038
4052
  "channels.empty": "还没有频道会话。先在设置 → IM助理 里连接渠道。",
4053
+ "channels.loadError": "无法读取频道会话。",
4054
+ "channel.dingtalk": "钉钉",
4055
+ "channel.feishu": "飞书",
4056
+ "channel.lark": "Lark",
4057
+ "channel.weixin": "微信",
4058
+ "channel.wecom": "企业微信",
4059
+ "channel.qq": "QQ",
4060
+ "channel.telegram": "Telegram",
4039
4061
  "schedule.empty": "还没有定时任务运行记录。",
4040
4062
  "search.placeholder": "搜索会话、设置和操作",
4041
4063
  "search.empty": "没有匹配的结果。",
@@ -4147,6 +4169,14 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
4147
4169
  "sidebar.channelsTab": "Channels",
4148
4170
  "sidebar.scheduleTab": "Schedule",
4149
4171
  "channels.empty": "No channel conversations yet. Connect a channel in Settings → IM Assistant.",
4172
+ "channels.loadError": "Could not load channel conversations.",
4173
+ "channel.dingtalk": "DingTalk",
4174
+ "channel.feishu": "Feishu",
4175
+ "channel.lark": "Lark",
4176
+ "channel.weixin": "WeChat",
4177
+ "channel.wecom": "WeCom",
4178
+ "channel.qq": "QQ",
4179
+ "channel.telegram": "Telegram",
4150
4180
  "schedule.empty": "No scheduled-task runs yet.",
4151
4181
  "search.placeholder": "Search conversations, settings, and actions",
4152
4182
  "search.empty": "No matching results.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@michengai/dsh-codex-ui",
3
- "version": "0.2.70",
3
+ "version": "0.2.71",
4
4
  "description": "以 Codex 风格重构 DSH Web 侧栏的独立客户端插件",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {
@@ -51,10 +51,6 @@
51
51
  "platform": "web"
52
52
  }
53
53
  },
54
- "scripts": {
55
- "build": "tsc --noEmit && tsdown",
56
- "test": "tsx tests/hover-tip.assert.ts && tsx tests/companion-slots.assert.ts && tsx tests/channel-api.assert.ts && tsx tests/schedule-sessions.assert.ts && tsx tests/session-tree.assert.ts && tsx tests/pinned-sessions.assert.ts && tsx tests/session-manager.assert.ts && tsx tests/workspace-browser.assert.ts && tsx tests/sidebar-search.assert.ts && tsx tests/settings-navigation.assert.ts && tsx tests/settings-nav-icons.assert.ts && tsx tests/locales.assert.ts && vitest run tests/client-runtime.integration.spec.ts && tsx tests/settings-integration.assert.ts && tsx tests/about-dependencies.assert.ts && tsx tests/dependency-manager.assert.ts && tsx tests/conversation-bubbles.assert.ts && tsx tests/conversation-header.assert.ts && tsx tests/conversation-visuals.assert.ts && tsdown && tsx tests/client-bundle.assert.ts && tsx tests/codex-suite.assert.ts"
57
- },
58
54
  "peerDependencies": {
59
55
  "@deepseek-ai/cordis": ">=4.0.1 <5.0.0",
60
56
  "@deepseek-ai/dsh-client-locale": ">=0.1.0-rc.0 <0.2.0",
@@ -100,5 +96,9 @@
100
96
  "tsx": "^4.22.4",
101
97
  "typescript": "^6.0.3",
102
98
  "vitest": "^4.1.8"
99
+ },
100
+ "scripts": {
101
+ "build": "tsc --noEmit && tsdown",
102
+ "test": "tsx tests/hover-tip.assert.ts && tsx tests/companion-slots.assert.ts && tsx tests/channel-api.assert.ts && tsx tests/schedule-sessions.assert.ts && tsx tests/session-tree.assert.ts && tsx tests/pinned-sessions.assert.ts && tsx tests/session-manager.assert.ts && tsx tests/workspace-browser.assert.ts && tsx tests/sidebar-search.assert.ts && tsx tests/settings-navigation.assert.ts && tsx tests/settings-nav-icons.assert.ts && tsx tests/locales.assert.ts && vitest run tests/client-runtime.integration.spec.ts && tsx tests/settings-integration.assert.ts && tsx tests/about-dependencies.assert.ts && tsx tests/dependency-manager.assert.ts && tsx tests/conversation-bubbles.assert.ts && tsx tests/conversation-header.assert.ts && tsx tests/conversation-visuals.assert.ts && tsdown && tsx tests/client-bundle.assert.ts && tsx tests/codex-suite.assert.ts"
103
103
  }
104
- }
104
+ }