@xmanrui/dsh-im 4.13.0 → 4.14.0

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
@@ -571,7 +571,7 @@ var React27 = __toESM(require("react"), 1);
571
571
  // package.json
572
572
  var package_default = {
573
573
  name: "@xmanrui/dsh-im",
574
- version: "4.13.0",
574
+ version: "4.14.0",
575
575
  description: "\u628A\u4E5D\u79CD IM \u673A\u5668\u4EBA\u548C\u516C\u7F51 AI Office \u63A5\u5165\u672C\u673A DeepSeek Harness\u3002 Connect nine IM channels and a public AI Office to a local DeepSeek Harness.",
576
576
  keywords: [
577
577
  "deepseek-harness",
@@ -1074,6 +1074,11 @@ var EN = Object.freeze({
1074
1074
  "\u5173\u95ED\uFF08\u7FA4\u5185\u76F4\u63A5\u56DE\u590D\uFF09": "Off (reply in the group feed)",
1075
1075
  "\u5F00\u542F\uFF08\u81EA\u52A8\u5F00\u542F\u72EC\u7ACB\u98DE\u4E66\u8BDD\u9898\uFF09": "On (auto-open a dedicated Feishu topic)",
1076
1076
  "\u5F00\u542F\u540E\uFF0C\u7FA4\u804A\u4E2D\u5411\u673A\u5668\u4EBA\u63D0\u95EE\u4F1A\u81EA\u52A8\u5F00\u542F\u72EC\u7ACB\u98DE\u4E66\u8BDD\u9898\uFF0C\u56DE\u590D\u843D\u5728\u8BDD\u9898\u5185\uFF1B\u6BCF\u4E2A\u8BDD\u9898\u662F dsh \u4F1A\u8BDD\u5217\u8868\u91CC\u4E00\u6761\u72EC\u7ACB\u4F1A\u8BDD\uFF0C\u4E0A\u4E0B\u6587\u4E92\u4E0D\u4E32\u3002\u79C1\u804A\u4E0D\u53D7\u5F71\u54CD\u3002": "When enabled, questions to the bot in a group auto-open a dedicated Feishu topic and replies stay inside it. Each topic is an independent conversation in dsh with its own context. Private chats are unaffected.",
1077
+ "\u5206\u6B65\u76F4\u63A8": "Step push",
1078
+ "\u5F00\u542F\u540E\u9010\u6B65\u63A8\u9001\u5DE5\u5177\u8C03\u7528\u4E0E\u8FC7\u7A0B\u8BF4\u660E": "Push tool calls and process notes step by step",
1079
+ "\u5173\u95ED\uFF08\u4FDD\u6301\u6D41\u5F0F\u5361\u6A21\u5F0F\uFF09": "Off (keep the streaming card)",
1080
+ "\u5F00\u542F\uFF08\u9010\u6B65\u63A8\u9001\u5DE5\u5177\u8C03\u7528\u4E0E\u8FC7\u7A0B\u8BF4\u660E\uFF09": "On (push tool calls and process notes step by step)",
1081
+ "\u5206\u6B65\u76F4\u63A8\u8BBE\u7F6E\u4FDD\u5B58\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002": "Could not save the step push setting. Try again.",
1077
1082
  "\u9489\u9489\u8BBE\u7F6E": "DingTalk settings",
1078
1083
  "\u4F01\u4E1A\u5FAE\u4FE1\u8BBE\u7F6E": "WeCom settings",
1079
1084
  "\u626B\u7801\u63A5\u5165\u673A\u5668\u4EBA": "Scan QR code",
@@ -5758,6 +5763,7 @@ var FEISHU_ENDPOINTS = Object.freeze({
5758
5763
  setAccessPolicy: "bot.access-policy.set",
5759
5764
  setGroupResponseMode: "bot.group-response-mode.set",
5760
5765
  setGroupTopicReply: "bot.group-topic-reply.set",
5766
+ setStepPush: "bot.step-push.set",
5761
5767
  // Kept for rolling upgrades. The multi-bot UI never calls these endpoints.
5762
5768
  testConnection: "connection.test",
5763
5769
  disconnect: "connection.disconnect"
@@ -5910,6 +5916,7 @@ function normalizeBotConnection(value, fallbackBotId) {
5910
5916
  ...Object.hasOwn(value, "accessPolicy") ? { accessPolicy: normalizeAccessPolicy(value.accessPolicy) } : {},
5911
5917
  groupResponseMode: normalizeGroupResponseMode(value.groupResponseMode),
5912
5918
  groupTopicReply: value.groupTopicReply === true,
5919
+ stepPush: value.stepPush === true,
5913
5920
  groupMessagePermissionGranted: value.groupMessagePermissionGranted === true,
5914
5921
  bot: normalizeBot2(value.bot),
5915
5922
  health: normalizeHealth(value.health, connected),
@@ -6480,6 +6487,61 @@ function RemoveConfirmation2({ bot, busy, onConfirm, onCancel }) {
6480
6487
  )
6481
6488
  );
6482
6489
  }
6490
+ function StepPushEditor({ value = false, disabled = false, onSave }) {
6491
+ const titleId = React15.useId();
6492
+ const current = value === true ? "on" : "off";
6493
+ const [saving, setSaving] = React15.useState(false);
6494
+ const [error, setError] = React15.useState(null);
6495
+ const change = async (event) => {
6496
+ const next = event.target.value === "on";
6497
+ if ((next ? "on" : "off") === current || saving || disabled) return;
6498
+ setSaving(true);
6499
+ setError(null);
6500
+ try {
6501
+ await onSave?.(next);
6502
+ } catch (cause) {
6503
+ setError(cause?.message ?? "\u5206\u6B65\u76F4\u63A8\u8BBE\u7F6E\u4FDD\u5B58\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002");
6504
+ } finally {
6505
+ setSaving(false);
6506
+ }
6507
+ };
6508
+ return h2(
6509
+ "section",
6510
+ {
6511
+ className: "dim-feishuGroupControl",
6512
+ "aria-labelledby": titleId
6513
+ },
6514
+ h2(
6515
+ "div",
6516
+ { className: "dim-feishuGroupControlHeader" },
6517
+ h2("h3", { id: titleId }, "\u5206\u6B65\u76F4\u63A8"),
6518
+ saving ? h2("span", { className: "dim-feishuGroupControlStatus", role: "status" }, "\u4FDD\u5B58\u4E2D\u2026") : null
6519
+ ),
6520
+ h2(
6521
+ "select",
6522
+ {
6523
+ className: "dim-feishuGroupSelect",
6524
+ value: current,
6525
+ disabled: disabled || saving,
6526
+ "aria-label": "\u5206\u6B65\u76F4\u63A8",
6527
+ onChange: (event) => {
6528
+ void change(event);
6529
+ }
6530
+ },
6531
+ h2("option", { value: "off" }, "\u5173\u95ED\uFF08\u4FDD\u6301\u6D41\u5F0F\u5361\u6A21\u5F0F\uFF09"),
6532
+ h2("option", { value: "on" }, "\u5F00\u542F\uFF08\u9010\u6B65\u63A8\u9001\u5DE5\u5177\u8C03\u7528\u4E0E\u8FC7\u7A0B\u8BF4\u660E\uFF09")
6533
+ ),
6534
+ h2(
6535
+ "p",
6536
+ { className: "dim-feishuGroupHelp" },
6537
+ "\u5F00\u542F\u540E\u9010\u6B65\u63A8\u9001\u5DE5\u5177\u8C03\u7528\u4E0E\u8FC7\u7A0B\u8BF4\u660E"
6538
+ ),
6539
+ error ? h2("p", {
6540
+ className: "dim-feishuGroupError",
6541
+ role: "alert"
6542
+ }, error) : null
6543
+ );
6544
+ }
6483
6545
  function BotCard({
6484
6546
  connection,
6485
6547
  busy,
@@ -6495,6 +6557,7 @@ function BotCard({
6495
6557
  onModelSave,
6496
6558
  onAgentPresetSave,
6497
6559
  onContextEnhancementSave,
6560
+ onStepPushSave,
6498
6561
  onRequestRemove,
6499
6562
  onConfirmRemove,
6500
6563
  onCancelRemove,
@@ -6597,6 +6660,11 @@ function BotCard({
6597
6660
  disabled: Boolean(busy),
6598
6661
  onSave: onContextEnhancementSave
6599
6662
  }),
6663
+ h2(StepPushEditor, {
6664
+ value: connection.stepPush,
6665
+ disabled: Boolean(busy),
6666
+ onSave: onStepPushSave
6667
+ }),
6600
6668
  provisionContent ? h2("section", {
6601
6669
  className: "bxf-botProvision dim-botProvision",
6602
6670
  "aria-label": `${bot.name}\u7684\u98DE\u4E66\u6388\u6743\u6D41\u7A0B`,
@@ -6707,6 +6775,7 @@ function BotList(props) {
6707
6775
  onModelSave: (model) => props.onModelSave(bot, model),
6708
6776
  onAgentPresetSave: (agentPreset) => props.onAgentPresetSave(bot, agentPreset),
6709
6777
  onContextEnhancementSave: (config) => props.onContextEnhancementSave(bot, config),
6778
+ onStepPushSave: (stepPush) => props.onStepPushSave(bot, stepPush),
6710
6779
  onRequestRemove: () => props.onRequestRemove(bot),
6711
6780
  onConfirmRemove: () => props.onConfirmRemove(bot),
6712
6781
  onCancelRemove: props.onCancelRemove,
@@ -7409,6 +7478,12 @@ function FeishuSettingsTab({ rpcCall }) {
7409
7478
  FEISHU_ENDPOINTS.setContextEnhancement,
7410
7479
  { config }
7411
7480
  ),
7481
+ onStepPushSave: (connection, stepPush) => saveBotSetting(
7482
+ connection,
7483
+ "step-push",
7484
+ FEISHU_ENDPOINTS.setStepPush,
7485
+ { stepPush }
7486
+ ),
7412
7487
  onRequestRemove: requestRemove,
7413
7488
  onConfirmRemove: (bot) => void confirmRemove(bot),
7414
7489
  onCancelRemove: cancelRemove,