@eduwork/dsh-mail 0.2.0 → 0.2.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.en.md +5 -0
- package/CHANGELOG.md +5 -0
- package/lib/index.js +11 -2
- package/package.json +1 -1
package/CHANGELOG.en.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
[简体中文](CHANGELOG.md) | **English**
|
|
4
4
|
|
|
5
|
+
## 0.2.1 — 2026-10-22
|
|
6
|
+
|
|
7
|
+
- Show email-send and attachment-save approval prompts in the active DSH UI language (Chinese or English), using the official approval panel.
|
|
8
|
+
- Preserve existing permission decisions, original reasons and per-call approval behavior.
|
|
9
|
+
|
|
5
10
|
## 0.2.0 — 2026-10-19
|
|
6
11
|
|
|
7
12
|
- Require DSH 0.2.1-rc.2 or a compatible 0.2.x stable Host; use the official configForms settings surface in standalone builds.
|
package/CHANGELOG.md
CHANGED
package/lib/index.js
CHANGED
|
@@ -1018,7 +1018,11 @@ function decideMailPermission(ctx, exec, next) {
|
|
|
1018
1018
|
if (ctx.permissionPresets.current(agent.session) === "danger-full-access") return next();
|
|
1019
1019
|
return Promise.resolve({
|
|
1020
1020
|
kind: "ask",
|
|
1021
|
-
reason: SEND_APPROVAL_REASON
|
|
1021
|
+
reason: SEND_APPROVAL_REASON,
|
|
1022
|
+
displayReason: {
|
|
1023
|
+
en: SEND_APPROVAL_REASON,
|
|
1024
|
+
zh: "允许通过已配置的 SMTP 账号发送这封邮件。请核对工具调用中显示的收件人、主题和附件。"
|
|
1025
|
+
}
|
|
1022
1026
|
});
|
|
1023
1027
|
}
|
|
1024
1028
|
async function decideAttachmentWrite(ctx, exec, next) {
|
|
@@ -1048,9 +1052,14 @@ async function decideAttachmentWrite(ctx, exec, next) {
|
|
|
1048
1052
|
}
|
|
1049
1053
|
return next();
|
|
1050
1054
|
}
|
|
1055
|
+
const reason = "Save this mail attachment in the current workspace";
|
|
1051
1056
|
return {
|
|
1052
1057
|
kind: "ask",
|
|
1053
|
-
reason
|
|
1058
|
+
reason,
|
|
1059
|
+
displayReason: {
|
|
1060
|
+
en: reason,
|
|
1061
|
+
zh: "允许将这封邮件的附件保存到当前工作区"
|
|
1062
|
+
}
|
|
1054
1063
|
};
|
|
1055
1064
|
}
|
|
1056
1065
|
Object.freeze({ SEND_APPROVAL_REASON });
|
package/package.json
CHANGED