@zaclinley/dsh-mailharbor 0.9.0 → 0.9.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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.9.1
4
+
5
+ ### Patch Changes
6
+
7
+ - e300651: Stop suggesting a reply to mail you were only copied on.
8
+
9
+ - The summary prompt now receives your role (直接收件人 / 仅抄送 / 发件人 / 不在名单)
10
+ and is told to skip reply suggestions unless you are a direct recipient.
11
+ - For non-recipients the host also removes a reply-suggestion section the model
12
+ still writes, so summaries stay deterministic.
13
+ - The summary card hides "用这些要点回复" and shows "未建议回复" in that case.
14
+
3
15
  ## 0.9.0
4
16
 
5
17
  ### Minor Changes
package/lib/client.js CHANGED
@@ -690,9 +690,11 @@ function summaryBlocks(text) {
690
690
  }
691
691
  function suggestionsOf(summary) {
692
692
  const match = /建议回复要点[::]?\s*\n([\s\S]*)$/.exec(summary);
693
- if (match === null) return "\u6839\u636E\u8FD9\u5C01\u90AE\u4EF6\u5199\u4E00\u5C01\u5F97\u4F53\u7684\u56DE\u590D\u3002";
693
+ if (match === null) return null;
694
+ const body = (match[1] ?? "").trim();
695
+ if (body === "") return null;
694
696
  return `\u6839\u636E\u8FD9\u4E9B\u5EFA\u8BAE\u5199\u56DE\u590D\uFF1A
695
- ${(match[1] ?? "").trim()}`;
697
+ ${body}`;
696
698
  }
697
699
  var KIND_LABEL = {
698
700
  summary: "AI \u6458\u8981",
@@ -1054,15 +1056,18 @@ ${card.output}`
1054
1056
  (0, import_react5.createElement)(
1055
1057
  "div",
1056
1058
  { className: "mailharbor-ai-card-actions" },
1057
- card.kind === "summary" ? (0, import_react5.createElement)(
1058
- "button",
1059
- {
1060
- className: "ghost",
1061
- disabled: generating !== null,
1062
- onClick: () => void generate("reply", { instruction: suggestionsOf(card.output) })
1063
- },
1064
- "\u7528\u8FD9\u4E9B\u8981\u70B9\u56DE\u590D"
1065
- ) : null,
1059
+ card.kind === "summary" ? (() => {
1060
+ const suggestion = suggestionsOf(card.output);
1061
+ return suggestion === null ? (0, import_react5.createElement)("span", { className: "small muted" }, "\u672A\u5EFA\u8BAE\u56DE\u590D") : (0, import_react5.createElement)(
1062
+ "button",
1063
+ {
1064
+ className: "ghost",
1065
+ disabled: generating !== null,
1066
+ onClick: () => void generate("reply", { instruction: suggestion })
1067
+ },
1068
+ "\u7528\u8FD9\u4E9B\u8981\u70B9\u56DE\u590D"
1069
+ );
1070
+ })() : null,
1066
1071
  card.kind === "reply" || card.kind === "translate" ? (0, import_react5.createElement)(
1067
1072
  "button",
1068
1073
  { className: "ghost", onClick: () => onInsert(replyInit(card)) },
@@ -5191,7 +5196,7 @@ function TaskEditor({
5191
5196
  }
5192
5197
 
5193
5198
  // src/client/index.tsx
5194
- var VERSION = "0.9.0";
5199
+ var VERSION = "0.9.1";
5195
5200
  var inject = ["slots"];
5196
5201
  var PANEL_ID = "mailharbor";
5197
5202
  var TASKS_PANEL_ID = "mailharbor-tasks";