weaver-work-cli 0.1.49 → 0.1.52

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 (207) hide show
  1. package/README.md +1 -1
  2. package/dist/chunks/{attachment-content-MU2LPI5P.js → attachment-content-MBYYSQIX.js} +3 -3
  3. package/dist/chunks/{chunk-ZKEUGS2U.js → chunk-7UOXOGFL.js} +4 -4
  4. package/dist/chunks/{chunk-72MI3MBX.js → chunk-ATEXBEPD.js} +55 -15
  5. package/dist/chunks/{chunk-3NV2ETZR.js → chunk-D3TDNRFE.js} +8 -8
  6. package/dist/chunks/{chunk-6GWU63YF.js → chunk-DZOC77ZD.js} +1 -1
  7. package/dist/chunks/{chunk-K3BT54CU.js → chunk-IRMA3GVP.js} +1 -1
  8. package/dist/chunks/{chunk-3X7VOSBA.js → chunk-KLZ3ULQQ.js} +1 -1
  9. package/dist/chunks/{chunk-YLCYX7LE.js → chunk-KMRT7NAT.js} +18 -5
  10. package/dist/chunks/{chunk-NBEWUR7L.js → chunk-LALWNK6M.js} +167 -44
  11. package/dist/chunks/{chunk-BRRW7CWA.js → chunk-LM2H7SZI.js} +26 -26
  12. package/dist/chunks/{chunk-KV5SOWMS.js → chunk-LTRLF6MM.js} +4 -4
  13. package/dist/chunks/{chunk-D2QRZUW4.js → chunk-RPRFIG6I.js} +35 -28
  14. package/dist/chunks/{chunk-GEOMANP7.js → chunk-RWFRZSIP.js} +2 -2
  15. package/dist/chunks/{chunk-EJVA5ZVB.js → chunk-ZRHKGQRQ.js} +2 -2
  16. package/dist/chunks/{conflict-6347A7YK.js → conflict-D2HYKBMH.js} +2 -2
  17. package/dist/chunks/{contract-N6P2HIIE.js → contract-MFOFMM2J.js} +4284 -254
  18. package/dist/chunks/{create-flow-7WG7LVX5.js → create-flow-7ZATJVTM.js} +6 -6
  19. package/dist/chunks/{data-QO7QWOIV.js → data-WK5CQXNF.js} +17 -32
  20. package/dist/chunks/{env-LHRKSLG6.js → env-5DO4YENS.js} +2 -2
  21. package/dist/chunks/{factory-2H7Z4RWJ.js → factory-3M7D7WJC.js} +1 -1
  22. package/dist/chunks/{fna-ZVB2IILI.js → fna-ECOYBQYL.js} +328 -5
  23. package/dist/chunks/{group-chat-EW6PNDDT.js → group-chat-B2HT5NEO.js} +3 -3
  24. package/dist/chunks/{im-3RCNL5GT.js → im-TN2JYVGJ.js} +2 -2
  25. package/dist/chunks/{invoice-FXWH5GPO.js → invoice-V7ZTITUO.js} +726 -206
  26. package/dist/chunks/{meeting-N2FQBHXI.js → meeting-HZOX3CBB.js} +10 -10
  27. package/dist/chunks/{msg-parse-4GSQ2WTO.js → msg-parse-FPFVPMYI.js} +5 -1
  28. package/dist/chunks/{reception-MYOKJULO.js → reception-QGPNTGHG.js} +98 -82
  29. package/dist/chunks/{recruit-stage-FKWS5UQF.js → recruit-stage-XCMVEQA2.js} +718 -131
  30. package/dist/chunks/{registry-BUTEDK3C.js → registry-E5RQJVWN.js} +2 -2
  31. package/dist/chunks/{registry-7VZ6YJUF.js → registry-KYPFFQIH.js} +1 -1
  32. package/dist/chunks/{registry-CKUVBS53.js → registry-SJHSBO5G.js} +10 -10
  33. package/dist/chunks/{room-recommend-MBCYENQ2.js → room-recommend-5AHR4YQV.js} +4 -4
  34. package/dist/chunks/{schedule-5IFMCXME.js → schedule-KZPJUPC2.js} +4 -4
  35. package/dist/chunks/smart-extract-IXHCZE4R.js +2846 -0
  36. package/dist/chunks/{workflow-2TRU2ZSP.js → workflow-UHKCZJMY.js} +1 -1
  37. package/dist/index.js +14 -9
  38. package/dist/shortcuts/contract/host.js +11 -0
  39. package/dist/shortcuts/contract/index.js +13 -0
  40. package/dist/shortcuts/contract/manifest.js +204 -0
  41. package/dist/shortcuts/contract/operations/card-action.js +585 -0
  42. package/dist/shortcuts/contract/operations/card-ebdf-list.js +315 -0
  43. package/dist/shortcuts/contract/operations/card-plan.js +327 -0
  44. package/dist/shortcuts/contract/operations/card-risk-report.js +565 -0
  45. package/dist/shortcuts/contract/operations/elements-build.js +714 -0
  46. package/dist/shortcuts/contract/operations/elements-spec.js +216 -0
  47. package/dist/shortcuts/contract/operations/first-screen.js +563 -0
  48. package/dist/shortcuts/contract/operations/flow.js +81 -25
  49. package/dist/shortcuts/contract/operations/modeltext.js +132 -0
  50. package/dist/shortcuts/contract/operations/op-resolver.js +22 -0
  51. package/dist/shortcuts/contract/operations/performance.js +58 -7
  52. package/dist/shortcuts/contract/operations/quote.js +410 -22
  53. package/dist/shortcuts/contract/operations/registry.js +22 -0
  54. package/dist/shortcuts/contract/operations/review.js +73 -58
  55. package/dist/shortcuts/contract/operations/save-recognize.js +151 -0
  56. package/dist/shortcuts/contract/operations/summary-validate.js +293 -0
  57. package/dist/shortcuts/contract/operations/summary.js +4 -2
  58. package/dist/shortcuts/contract/operations/upload.js +48 -7
  59. package/dist/shortcuts/contract/prewarm-cache.js +90 -0
  60. package/dist/shortcuts/contract/prewarm.js +88 -0
  61. package/dist/shortcuts/contract/upload-cache.js +49 -4
  62. package/dist/shortcuts/data/index.js +1 -6
  63. package/dist/shortcuts/data/manifest.js +2 -2
  64. package/dist/shortcuts/data/operations/index.js +1 -1
  65. package/dist/shortcuts/data/operations/query.js +23 -46
  66. package/dist/shortcuts/fna/host.js +4 -2
  67. package/dist/shortcuts/fna/manifest.js +14 -5
  68. package/dist/shortcuts/fna/operations/audit.js +334 -0
  69. package/dist/shortcuts/fna/operations/registry.js +2 -0
  70. package/dist/shortcuts/im/operations/at-mention.js +6 -3
  71. package/dist/shortcuts/im/operations/msg-parse.js +35 -5
  72. package/dist/shortcuts/im/operations/msg-sync.js +3 -1
  73. package/dist/shortcuts/im/operations/msg-write.js +57 -9
  74. package/dist/shortcuts/index.js +5 -0
  75. package/dist/shortcuts/invoice/index.js +0 -12
  76. package/dist/shortcuts/invoice/manifest.js +201 -50
  77. package/dist/shortcuts/invoice/operations/registry.js +4 -2
  78. package/dist/shortcuts/invoice/operations/reim-relation.js +438 -0
  79. package/dist/shortcuts/invoice/operations/shared.js +3 -19
  80. package/dist/shortcuts/invoice/operations/upload-and-validate.js +109 -73
  81. package/dist/shortcuts/meeting/operations/from-group-chat.js +16 -2
  82. package/dist/shortcuts/reception/constants.js +3 -7
  83. package/dist/shortcuts/reception/operations/leads.js +30 -6
  84. package/dist/shortcuts/reception/operations/panels.js +3 -2
  85. package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +4 -2
  86. package/dist/shortcuts/recruit-stage/operations/jd-create.js +6 -2
  87. package/dist/shortcuts/recruit-stage/operations/list.js +217 -1
  88. package/dist/shortcuts/recruit-stage/operations/resume-import.js +144 -158
  89. package/dist/shortcuts/recruit-stage/operations/search.js +348 -0
  90. package/dist/shortcuts/recruit-stage/shared.js +5 -0
  91. package/dist/shortcuts/recruit-stage/tag-lookup.js +136 -0
  92. package/dist/shortcuts/smart-extract/constants.js +79 -0
  93. package/dist/shortcuts/smart-extract/continuation.js +71 -0
  94. package/dist/shortcuts/smart-extract/errors.js +68 -0
  95. package/dist/shortcuts/smart-extract/host.js +191 -0
  96. package/dist/shortcuts/smart-extract/index.js +105 -0
  97. package/dist/shortcuts/smart-extract/ledger.js +70 -0
  98. package/dist/shortcuts/smart-extract/manifest.js +35 -0
  99. package/dist/shortcuts/smart-extract/operations/attachment.js +212 -0
  100. package/dist/shortcuts/smart-extract/operations/batch.js +67 -0
  101. package/dist/shortcuts/smart-extract/operations/config.js +118 -0
  102. package/dist/shortcuts/smart-extract/operations/fill.js +489 -0
  103. package/dist/shortcuts/smart-extract/operations/preview.js +174 -0
  104. package/dist/shortcuts/smart-extract/operations/registry.js +34 -0
  105. package/dist/shortcuts/smart-extract/operations/save.js +355 -0
  106. package/dist/shortcuts/smart-extract/operations/shared.js +191 -0
  107. package/dist/shortcuts/smart-extract/operations/structure.js +401 -0
  108. package/dist/shortcuts/smart-extract/operations/target.js +167 -0
  109. package/dist/shortcuts/smart-extract/operations/types.js +22 -0
  110. package/dist/shortcuts/smart-extract/operations/validate.js +408 -0
  111. package/dist/shortcuts/workflow/operations/read.js +77 -15
  112. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +140 -24
  113. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.core.js +42 -14
  114. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +4 -6
  115. package/docs/SKILL.md +1 -1
  116. package/docs/_catalog.md +4 -1
  117. package/docs/agent-invoice.md +5 -7
  118. package/docs/data.md +5 -1
  119. package/docs/fna.md +24 -4
  120. package/docs/invoice.md +7 -5
  121. package/docs/smart-extract.md +156 -0
  122. package/package.json +1 -1
  123. package/skill-template/business-info.json +21 -1
  124. package/skill-template/domains/qiyecheng.md +6 -2
  125. package/skill-template/domains/smart-extract.md +16 -0
  126. package/skill-template/domains/yepiaotong.md +2 -2
  127. package/skills/weaver-e10-data/references/scene-and-misc.md +4 -3
  128. package/skills/weaver-e10-jinchengda/SKILL.md +159 -11
  129. package/skills/weaver-e10-jinchengda/references/contract-action-card.md +13 -8
  130. package/skills/weaver-e10-jinchengda/references/contract-action-engine.md +5 -4
  131. package/skills/weaver-e10-jinchengda/references/contract-clause-library-crud.md +44 -2
  132. package/skills/weaver-e10-jinchengda/references/contract-command-index.md +2 -2
  133. package/skills/weaver-e10-jinchengda/references/contract-element-save-record.md +220 -0
  134. package/skills/weaver-e10-jinchengda/references/contract-field-extract-new-customer.md +68 -33
  135. package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +26 -15
  136. package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +1 -1
  137. package/skills/weaver-e10-jinchengda/references/contract-modeltext-library.md +128 -0
  138. package/skills/weaver-e10-jinchengda/references/contract-multi-file.md +90 -0
  139. package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +96 -2
  140. package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +167 -5
  141. package/skills/weaver-e10-jinchengda/scripts/contract_first_screen.py +200 -0
  142. package/skills/weaver-e10-jinchengda/scripts/fill_contract_from_quote.py +572 -0
  143. package/skills/weaver-e10-jinchengda/scripts/fill_plan.py +997 -0
  144. package/skills/weaver-e10-jinchengda/scripts/quote_screen.py +560 -0
  145. package/skills/weaver-e10-jinchengda/scripts/triage_contract.py +894 -0
  146. package/skills/weaver-e10-jinchengda/scripts/validate_action_card.py +93 -0
  147. package/skills/weaver-e10-jinchengda/scripts/verify_docx_placeholders.py +118 -0
  148. package/skills/weaver-e10-qiyecheng/SKILL.md +58 -7
  149. package/skills/weaver-e10-qiyecheng/references/ai-check-audit.md +118 -0
  150. package/skills/weaver-e10-qiyecheng/references/budget.md +14 -0
  151. package/skills/weaver-e10-qiyecheng/references/catalog.md +42 -3
  152. package/skills/weaver-e10-qiyecheng/references/expense-center.md +8 -0
  153. package/skills/weaver-e10-qiyecheng/references/expense-chart.md +9 -0
  154. package/skills/weaver-e10-qiyecheng/references/invoice-writeoff.md +13 -0
  155. package/skills/weaver-e10-qiyecheng/references/loan-management.md +14 -0
  156. package/skills/weaver-e10-qiyecheng/references/self-hosted-mode.md +239 -0
  157. package/skills/weaver-e10-qiyecheng/references/source-manifest.json +153 -40
  158. package/skills/weaver-e10-reception-flow/SKILL.md +43 -6
  159. package/skills/weaver-e10-reception-flow/references/guide.md +1 -1
  160. package/skills/weaver-e10-recruit-stage/SKILL.md +62 -4
  161. package/skills/weaver-e10-recruit-stage/agents/openai.yaml +42 -8
  162. package/skills/weaver-e10-recruit-stage/references/env-ziyong.md +79 -0
  163. package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +11 -3
  164. package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +3 -2
  165. package/skills/weaver-e10-recruit-stage/references/recruit-interview-not-attended.md +153 -0
  166. package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +7 -4
  167. package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +1 -1
  168. package/skills/weaver-e10-recruit-stage/references/recruit-my-positions.md +66 -0
  169. package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +156 -40
  170. package/skills/weaver-e10-recruit-stage/references/recruit-resume-import-batch.md +122 -0
  171. package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +36 -8
  172. package/skills/weaver-e10-recruit-stage/references/recruit-search-by-tag.md +157 -0
  173. package/skills/weaver-e10-recruit-stage/references/recruit-utterance-glossary.md +35 -0
  174. package/skills/weaver-e10-smart-extract/SKILL.md +169 -0
  175. package/skills/weaver-e10-smart-extract/references/api-contract.md +71 -0
  176. package/skills/weaver-e10-smart-extract/references/result-format.md +102 -0
  177. package/skills/weaver-e10-smart-extract/references/troubleshooting.md +105 -0
  178. package/skills/weaver-e10-workflow/SKILL.md +2 -1
  179. package/skills/weaver-e10-workflow/references/todo-smart-convert.md +29 -6
  180. package/skills/weaver-e10-workflow/references/workflow-query.md +1 -1
  181. package/skills/weaver-e10-workflow/references/workflow-view.md +1 -1
  182. package/skills/weaver-e10-workflow/tools/todo-summary.cjs +162 -10
  183. package/skills/weaver-e10-yepiaotong/SKILL.md +53 -35
  184. package/skills/weaver-e10-yepiaotong/references/invoice-add.md +2 -0
  185. package/skills/weaver-e10-yepiaotong/references/invoice-file-upload.md +1 -1
  186. package/skills/weaver-e10-yepiaotong/references/invoice-import.md +19 -2
  187. package/skills/weaver-e10-yepiaotong/references/invoice-issuing-workflow.md +19 -32
  188. package/skills/weaver-e10-yepiaotong/references/invoice-ocr-preview.md +8 -2
  189. package/skills/weaver-e10-yepiaotong/references/invoice-reim-relation.md +407 -0
  190. package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +18 -53
  191. package/skills/weaver-e10-yepiaotong/references/invoice-upload-and-validate.md +97 -39
  192. package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +96 -7
  193. package/skills/weaver-e10-yepiaotong/references/reim-examples.md +5 -38
  194. package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +14 -14
  195. package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +8 -4
  196. package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +139 -94
  197. package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +131 -58
  198. package/skills/weaver-e10-yepiaotong/references/source-manifest.json +110 -43
  199. package/skills/weaver-e10-yimiaoban/SKILL.md +8 -6
  200. package/skills/weaver-e10-yimiaoban/references/msg-read.md +20 -0
  201. package/skills/weaver-e10-yimiaoban/references/msg-write.md +7 -0
  202. package/skills/weaver-e10-yimiaoban/references/source-manifest.json +18 -15
  203. package/dist/shortcuts/invoice/operations/validate-preview.js +0 -40
  204. package/skills/weaver-e10-jinchengda/scripts/plan_actions.py +0 -279
  205. package/skills/weaver-e10-jinchengda/scripts/render_action_card.py +0 -450
  206. package/skills/weaver-e10-jinchengda/scripts/render_risk_report.py +0 -358
  207. package/skills/weaver-e10-yepiaotong/references/invoice-validation-preview.md +0 -40
package/README.md CHANGED
@@ -478,7 +478,7 @@ weaver-work-cli --json invoice enterprise list --input-json '{"page_size":10,"st
478
478
  weaver-work-cli --json invoice get --fid INVOICE_FID
479
479
  weaver-work-cli --json invoice upload --file ./invoice.pdf
480
480
  weaver-work-cli --json invoice ocr preview --file ./invoice.pdf
481
- weaver-work-cli --json invoice validate preview --fid INVOICE_FID --scope personal
481
+ weaver-work-cli --json invoice run invoice.upload-and-validate --input-json '{"file":"./invoice.pdf"}'
482
482
  weaver-work-cli --json invoice download --fid INVOICE_FID --file-id FILE_ID --output ./invoice.pdf
483
483
  ```
484
484
 
@@ -8,9 +8,9 @@ import {
8
8
  looksLikeFileId,
9
9
  meetingAttachmentContentOperations,
10
10
  parseFileIdList
11
- } from "./chunk-EJVA5ZVB.js";
12
- import "./chunk-6GWU63YF.js";
13
- import "./chunk-K3BT54CU.js";
11
+ } from "./chunk-ZRHKGQRQ.js";
12
+ import "./chunk-DZOC77ZD.js";
13
+ import "./chunk-IRMA3GVP.js";
14
14
  import "./chunk-7BDPM5ST.js";
15
15
  import "./chunk-UG5G54VL.js";
16
16
  import "./chunk-BUSC6UAE.js";
@@ -12,7 +12,7 @@ import {
12
12
  meetingValidationError,
13
13
  queryBody,
14
14
  toIdCsv
15
- } from "./chunk-K3BT54CU.js";
15
+ } from "./chunk-IRMA3GVP.js";
16
16
 
17
17
  // src/shortcuts/meeting/operations/eb/conflict.ts
18
18
  var ACTIVE_MT_STATUS = "1,2,8,9";
@@ -296,7 +296,7 @@ var ebMeetingWritePreflight = async ({ endpoint, payload, args, env, extras }) =
296
296
  const items = rawMembers.split(/[,;,;]+/u).map((item) => item.trim()).filter((item) => item !== "");
297
297
  const nameLike = items.filter((item) => !/^\d+$/u.test(item));
298
298
  if (nameLike.length > 0) {
299
- const { resolveMemberIdsByName } = await import("./schedule-5IFMCXME.js");
299
+ const { resolveMemberIdsByName } = await import("./schedule-KZPJUPC2.js");
300
300
  const idsByName = await resolveMemberIdsByName(env, nameLike);
301
301
  const resolved = items.map((item) => idsByName.get(item) ?? item);
302
302
  payload.mainTable.hrm_members = [...new Set(resolved)].join(",");
@@ -429,7 +429,7 @@ var ebConflictRoom = {
429
429
  let addressId = String(args.address ?? "").trim();
430
430
  let resolvedRoom = null;
431
431
  if (!addressId && String(args.room_name ?? "").trim()) {
432
- const { resolveAddressRoom } = await import("./create-flow-7WG7LVX5.js");
432
+ const { resolveAddressRoom } = await import("./create-flow-7ZATJVTM.js");
433
433
  const resolved = await resolveAddressRoom(env, String(args.room_name));
434
434
  if (!resolved?.id) {
435
435
  throw meetingValidationError(
@@ -639,7 +639,7 @@ async function findCommonFreeSlots(env, input) {
639
639
  const scheduleItems = [];
640
640
  if (includeSchedule) {
641
641
  try {
642
- const { runScheduleConflictFlow, parseScheduleConflictMessage, resolveMemberIdsByName } = await import("./schedule-5IFMCXME.js");
642
+ const { runScheduleConflictFlow, parseScheduleConflictMessage, resolveMemberIdsByName } = await import("./schedule-KZPJUPC2.js");
643
643
  const dayBegin = new Date(rangeStart.getFullYear(), rangeStart.getMonth(), rangeStart.getDate(), 0, 0, 0, 0);
644
644
  const dayEnd = new Date(rangeStart.getFullYear(), rangeStart.getMonth(), rangeStart.getDate(), 23, 59, 0, 0);
645
645
  const flow = await runScheduleConflictFlow(env, {
@@ -16,7 +16,7 @@ import {
16
16
  parseContent,
17
17
  parseMsg,
18
18
  senderName
19
- } from "./chunk-YLCYX7LE.js";
19
+ } from "./chunk-KMRT7NAT.js";
20
20
 
21
21
  // src/shortcuts/im/operations/types.ts
22
22
  var READ = "read";
@@ -1726,7 +1726,9 @@ async function enrichMessages(rawRows, host, options = {}) {
1726
1726
  type: parsed.type,
1727
1727
  typeName: parsed.typeName,
1728
1728
  title: options.titleFirst ? parsed.title : void 0,
1729
- content: collapseNewlines(parsed.content),
1729
+ // markdown 消息(vt=1)保留原文换行/表格结构不折叠;普通文本维持 ⏎ 单行化
1730
+ content: parsed.format === "markdown" ? parsed.content : collapseNewlines(parsed.content),
1731
+ contentFormat: parsed.format,
1730
1732
  ...quoteSummary ? { quote: quoteSummary, quoteTime: Number(quoteSummary.msgtime) > 0 ? formatFullTime(Math.floor(Number(quoteSummary.msgtime) / 1e3)) : void 0 } : {},
1731
1733
  must: parsed.must,
1732
1734
  fileName: parsed.fileName,
@@ -2172,13 +2174,13 @@ function buildAtText(text, entries) {
2172
2174
  const aus = [...used, ...rest];
2173
2175
  return { v, aus };
2174
2176
  }
2175
- function buildAtMsgJson(v, aus, self, extra = {}) {
2177
+ function buildAtMsgJson(v, aus, self, extra = {}, txtExtra = {}) {
2176
2178
  return JSON.stringify({
2177
2179
  bgc: "",
2178
2180
  cnt: "0",
2179
2181
  dev: 5,
2180
2182
  display: "",
2181
- dt: [{ txt: { aus, ft: "china", next: "0", v } }],
2183
+ dt: [{ txt: { aus, ft: "china", next: "0", v, ...txtExtra } }],
2182
2184
  guid: "0",
2183
2185
  idx: "0",
2184
2186
  opb: ["received", "reply"],
@@ -2204,13 +2206,20 @@ function normalizeContent(args) {
2204
2206
  const txt = txtRaw.trim() !== "" ? txtRaw : void 0;
2205
2207
  const imgPath = args.img || args.imgPath ? String(args.img || args.imgPath) : void 0;
2206
2208
  const filePath = args.file || args.filePath ? String(args.file || args.filePath) : void 0;
2209
+ const markdown = args.markdown === true || args.markdown === "true" || args.markdown === "1";
2207
2210
  if (!txt && !imgPath && !filePath) {
2208
2211
  throw imValidationError("content_required", "txt / img / file \u81F3\u5C11\u63D0\u4F9B\u4E00\u79CD\uFF08\u7A7A\u767D\u6587\u672C\u4E0D\u7B97\u5185\u5BB9\uFF0C\u7981\u6B62\u53D1\u9001\u7A7A\u767D\u6D88\u606F\uFF09");
2209
2212
  }
2210
2213
  if (imgPath && filePath) {
2211
2214
  throw imValidationError("content_conflict", "img \u4E0E file \u4E0D\u80FD\u540C\u65F6\u63D0\u4F9B\uFF08\u4E00\u6B21\u53D1\u4E00\u79CD\u5A92\u4F53\uFF09");
2212
2215
  }
2213
- return { txt, imgPath, filePath };
2216
+ if (markdown && !txt) {
2217
+ throw imValidationError("markdown_requires_txt", "markdown:true \u5FC5\u987B\u540C\u65F6\u63D0\u4F9B txt\uFF08markdown \u4EC5\u652F\u6301\u6587\u672C\u6D88\u606F\uFF09");
2218
+ }
2219
+ if (markdown && (imgPath || filePath)) {
2220
+ throw imValidationError("markdown_txt_only", "markdown \u4EC5\u652F\u6301 txt \u6587\u672C\u6D88\u606F\uFF0C\u4E0D\u80FD\u4E0E img/file \u540C\u65F6\u4F7F\u7528");
2221
+ }
2222
+ return { txt, imgPath, filePath, markdown };
2214
2223
  }
2215
2224
  var sendSinglePair = makeWritePair({
2216
2225
  action: "im.msg.send.single",
@@ -2237,11 +2246,13 @@ var sendSinglePair = makeWritePair({
2237
2246
  toCid,
2238
2247
  hasTxt: Boolean(content.txt),
2239
2248
  hasImg: Boolean(content.imgPath),
2240
- hasFile: Boolean(content.filePath)
2249
+ hasFile: Boolean(content.filePath),
2250
+ ...content.markdown ? { contentFormat: "markdown" } : {}
2241
2251
  };
2242
2252
  const snapshot = { toUid, toCid };
2243
2253
  if (content.txt) {
2244
2254
  snapshot.txt = content.txt;
2255
+ snapshot.markdown = content.markdown;
2245
2256
  summary.textPreview = content.txt.length > 60 ? `${content.txt.slice(0, 60)}\u2026` : content.txt;
2246
2257
  }
2247
2258
  if (quote) {
@@ -2264,11 +2275,18 @@ var sendSinglePair = makeWritePair({
2264
2275
  async execute(plan, env) {
2265
2276
  const body = { reciver: { cid: plan.toCid, uid: plan.toUid } };
2266
2277
  const quoteRef = plan.quoteRef ?? null;
2278
+ const txtExtra = plan.markdown ? { vt: "1" } : {};
2279
+ const markdownTypeExtra = plan.markdown ? { type: "26" } : {};
2267
2280
  if (quoteRef) {
2268
2281
  const self = await env.host.getSelfIdentity();
2269
- body.msg = buildAtMsgJson(String(plan.txt ?? ""), [], self, { ref: quoteRef });
2282
+ body.msg = buildAtMsgJson(String(plan.txt ?? ""), [], self, { ref: quoteRef, ...markdownTypeExtra }, txtExtra);
2270
2283
  } else if (plan.txt !== void 0) {
2271
- body.txt = plan.txt;
2284
+ if (plan.markdown) {
2285
+ const self = await env.host.getSelfIdentity();
2286
+ body.msg = buildAtMsgJson(plan.txt, [], self, markdownTypeExtra, txtExtra);
2287
+ } else {
2288
+ body.txt = plan.txt;
2289
+ }
2272
2290
  }
2273
2291
  if (plan.imgPath) {
2274
2292
  const fileObj = await env.host.uploadFile(plan.imgPath, { shareUsers: plan.toUid });
@@ -2302,10 +2320,11 @@ var sendGroupPair = makeWritePair({
2302
2320
  if (quote && !content.txt) {
2303
2321
  throw imValidationError("quote_requires_txt", "quoteMsgId/replyMsgId \u4EC5\u652F\u6301\u6587\u672C\u6D88\u606F\uFF08txt\uFF09");
2304
2322
  }
2305
- const summary = { action: "\u53D1\u9001\u7FA4\u804A\u6D88\u606F", groupId, hasTxt: Boolean(content.txt), hasImg: Boolean(content.imgPath), hasFile: Boolean(content.filePath) };
2323
+ const summary = { action: "\u53D1\u9001\u7FA4\u804A\u6D88\u606F", groupId, hasTxt: Boolean(content.txt), hasImg: Boolean(content.imgPath), hasFile: Boolean(content.filePath), ...content.markdown ? { contentFormat: "markdown" } : {} };
2306
2324
  const snapshot = { groupId };
2307
2325
  if (content.txt) {
2308
2326
  snapshot.txt = content.txt;
2327
+ snapshot.markdown = content.markdown;
2309
2328
  summary.textPreview = content.txt.length > 60 ? `${content.txt.slice(0, 60)}\u2026` : content.txt;
2310
2329
  }
2311
2330
  if (atEntries.length) {
@@ -2333,12 +2352,19 @@ var sendGroupPair = makeWritePair({
2333
2352
  const body = { groupId: plan.groupId };
2334
2353
  const atEntries = Array.isArray(plan.atEntries) ? plan.atEntries : [];
2335
2354
  const quoteRef = plan.quoteRef ?? null;
2355
+ const txtExtra = plan.markdown ? { vt: "1" } : {};
2356
+ const markdownTypeExtra = plan.markdown ? { type: "26" } : {};
2336
2357
  if (atEntries.length || quoteRef) {
2337
2358
  const { v, aus } = buildAtText(String(plan.txt ?? ""), atEntries);
2338
2359
  const self = await env.host.getSelfIdentity();
2339
- body.msg = buildAtMsgJson(v, aus, self, quoteRef ? { [plan.quoteKind === "reply" ? "rmsg" : "ref"]: quoteRef } : {});
2360
+ body.msg = buildAtMsgJson(v, aus, self, { ...quoteRef ? { [plan.quoteKind === "reply" ? "rmsg" : "ref"]: quoteRef } : {}, ...markdownTypeExtra }, txtExtra);
2340
2361
  } else if (plan.txt !== void 0) {
2341
- body.txt = plan.txt;
2362
+ if (plan.markdown) {
2363
+ const self = await env.host.getSelfIdentity();
2364
+ body.msg = buildAtMsgJson(plan.txt, [], self, markdownTypeExtra, txtExtra);
2365
+ } else {
2366
+ body.txt = plan.txt;
2367
+ }
2342
2368
  }
2343
2369
  if (plan.imgPath) {
2344
2370
  const fileObj = await env.host.uploadFile(plan.imgPath, { shareGroups: plan.groupId });
@@ -2492,6 +2518,13 @@ var dingSendPair = makeWritePair({
2492
2518
  const txtRaw = args.txt !== void 0 && args.txt !== null ? String(args.txt) : "";
2493
2519
  const txt = txtRaw.trim() !== "" ? txtRaw : "";
2494
2520
  if (!convertMsgid && !txt) throw imValidationError("content_required", "\u666E\u901A\u5FC5\u8FBE\u9700 txt\uFF1B\u8F6C\u5FC5\u8FBE\u9700 convertMsgid");
2521
+ const markdown = args.markdown === true || args.markdown === "true" || args.markdown === "1";
2522
+ if (markdown && convertMsgid) {
2523
+ throw imValidationError("markdown_txt_only", "markdown \u4EC5\u652F\u6301\u666E\u901A\u5FC5\u8FBE\uFF08txt\uFF09\uFF0C\u8F6C\u5FC5\u8FBE\u6CBF\u7528\u6E90\u6D88\u606F\u683C\u5F0F");
2524
+ }
2525
+ if (markdown && !txt) {
2526
+ throw imValidationError("markdown_requires_txt", "markdown:true \u5FC5\u987B\u540C\u65F6\u63D0\u4F9B txt");
2527
+ }
2495
2528
  if (args.unreadOnly === true && !groupId) {
2496
2529
  throw imValidationError("unread_only_group_only", "unreadOnly \u4EC5\u652F\u6301\u7FA4\u804A\u8F6C\u5FC5\u8FBE\uFF08\u9700\u63D0\u4F9B groupId\uFF09");
2497
2530
  }
@@ -2503,6 +2536,7 @@ var dingSendPair = makeWritePair({
2503
2536
  targetType: groupId ? "\u7FA4\u804A" : "\u5355\u804A",
2504
2537
  ...groupId ? { groupId } : { toUid },
2505
2538
  ...convertMsgid ? { convertMsgid } : { textPreview: txt.length > 60 ? `${txt.slice(0, 60)}\u2026` : txt },
2539
+ ...markdown ? { contentFormat: "markdown" } : {},
2506
2540
  sendMsg: args.sendMsg !== void 0 ? Number(args.sendMsg) : 1,
2507
2541
  showType: args.showType !== void 0 ? Number(args.showType) : 0
2508
2542
  };
@@ -2511,6 +2545,7 @@ var dingSendPair = makeWritePair({
2511
2545
  toUid: toUid || void 0,
2512
2546
  toCid: args.toCid !== void 0 ? str(args.toCid) : void 0,
2513
2547
  txt: txt || void 0,
2548
+ markdown,
2514
2549
  convertMsgid: convertMsgid || void 0,
2515
2550
  unreadOnly: args.unreadOnly === true,
2516
2551
  toUids: args.toUids !== void 0 ? Array.isArray(args.toUids) ? args.toUids.map((x) => String(x)) : String(args.toUids).split(",").map((s) => s.trim()).filter(Boolean) : void 0,
@@ -2653,6 +2688,8 @@ var dingSendPair = makeWritePair({
2653
2688
  } else {
2654
2689
  content = plan.txt;
2655
2690
  mkind = 1;
2691
+ const mdType = plan.markdown ? "26" : "1";
2692
+ const txtSeg = plan.markdown ? { v: plan.txt, vt: "1", next: "0", ft: "china" } : { v: plan.txt, next: "0", ft: "china" };
2656
2693
  msgEntity = JSON.stringify({
2657
2694
  ver: "1.0",
2658
2695
  dev: 5,
@@ -2666,11 +2703,11 @@ var dingSendPair = makeWritePair({
2666
2703
  sysId: "",
2667
2704
  weaOaId: "",
2668
2705
  bgc: "",
2669
- type: "1",
2670
- dt: [{ txt: { v: plan.txt, next: "0", ft: "china" } }],
2706
+ type: mdType,
2707
+ dt: [{ txt: txtSeg }],
2671
2708
  tf: "1"
2672
2709
  });
2673
- msgTitle = JSON.stringify({ sname: myName, suid: myUid, scid: myCid, display: "0", type: "1", dt: [{ txt: { v: plan.txt, next: "0", ft: "china" } }], vv: "", des: "", tf: "1" });
2710
+ msgTitle = JSON.stringify({ sname: myName, suid: myUid, scid: myCid, display: "0", type: mdType, dt: [{ txt: txtSeg }], vv: "", des: "", tf: "1" });
2674
2711
  }
2675
2712
  if (plan.groupId) {
2676
2713
  targetType = 2;
@@ -2751,6 +2788,7 @@ var msgWriteOps = [
2751
2788
  toUid: { type: "string", pattern: "^\\d+$", description: "\u63A5\u6536\u4EBA uid" },
2752
2789
  toCid: { type: "string", pattern: "^\\d+$", description: "\u63A5\u6536\u4EBA cid" },
2753
2790
  txt: { type: "string", description: "\u6587\u672C\u5185\u5BB9" },
2791
+ markdown: { type: "boolean", description: "true \u65F6 txt \u6309 markdown \u53D1\u9001\uFF08\u5916\u5C42 type=26 + txt \u6BB5 vt=1\uFF09\uFF0C\u5BA2\u6237\u7AEF\u6309 markdown \u6E32\u67D3\uFF1B\u4EC5\u652F\u6301\u7EAF\u6587\u672C\u6D88\u606F\uFF0C\u4E0D\u80FD\u4E0E img/file/quoteMsgId \u51B2\u7A81\uFF08quote \u53EF\u7EC4\u5408\uFF09" },
2754
2792
  quoteMsgId: { type: "string", pattern: "^\\d+$", description: "\u5F15\u7528\u8BE5\u6D88\u606F\uFF08\u5355\u804A\u4EC5\u652F\u6301\u5F15\u7528\uFF0C\u4E0D\u652F\u6301\u56DE\u590D\uFF1B\u4EC5 txt \u6587\u672C\u6D88\u606F\uFF09\uFF1B\u4F20\u5355\u804A\u4F1A\u8BDD\u5185\u6D88\u606F id\uFF08ser_msgid\uFF09\uFF0Cprepare \u9636\u6BB5\u81EA\u52A8\u5B9A\u4F4D\u5E76\u7EC4\u88C5 ref" },
2755
2793
  img: { type: "string", description: "\u672C\u5730\u56FE\u7247\u8DEF\u5F84\uFF08\u53D1\u9001\u524D\u4F1A\u4E0A\u4F20\u5230 E10 \u6587\u4EF6\u670D\u52A1\uFF09" },
2756
2794
  file: { type: "string", description: "\u672C\u5730\u6587\u4EF6\u8DEF\u5F84" }
@@ -2761,6 +2799,7 @@ var msgWriteOps = [
2761
2799
  ...buildMsgWriteDefinition("im.msg.send.group", "msg.send.group", "\u53D1\u9001\u7FA4\u804A\u6D88\u606F\uFF08\u6587\u672C/\u56FE\u7247/\u6587\u4EF6\uFF0C\u6587\u672C\u652F\u6301 @ \u63D0\u53CA\u4E0E\u5F15\u7528/\u56DE\u590D\uFF09", {
2762
2800
  groupId: { type: "string", pattern: "^\\d+$", description: "\u7FA4 id" },
2763
2801
  txt: { type: "string", description: "\u6587\u672C\u5185\u5BB9\uFF1B@ \u4F4D\u7F6E\u76F4\u63A5\u5199 @<\u59D3\u540D>\uFF08\u5982 @\u5F20\u4E09\uFF09\u6216 @\u5168\u4F53\u6210\u5458/@\u6240\u6709\u4EBA" },
2802
+ markdown: { type: "boolean", description: "true \u65F6 txt \u6309 markdown \u53D1\u9001\uFF08\u5916\u5C42 type=26 + txt \u6BB5 vt=1\uFF09\uFF0C\u5BA2\u6237\u7AEF\u6309 markdown \u6E32\u67D3\uFF1B\u4EC5\u652F\u6301\u7EAF\u6587\u672C\u6D88\u606F\uFF0C\u4E0D\u80FD\u4E0E img/file \u540C\u7528\uFF0C\u53EF\u4E0E @/\u5F15\u7528/\u56DE\u590D\u7EC4\u5408" },
2764
2803
  atAll: { type: "boolean", description: "@\u5168\u4F53\u6210\u5458\uFF08\u670D\u52A1\u7AEF\u56FA\u5B9A id=88\uFF09\uFF0C\u4EC5\u7FA4\u804A\u3001\u4EC5 txt \u6587\u672C\u6D88\u606F\u751F\u6548" },
2765
2804
  atUids: { type: "array", items: { type: "string" }, description: "@\u5177\u4F53\u4EBA uid \u5217\u8868\uFF0C\u4EC5\u7FA4\u804A\uFF1Bprepare \u9636\u6BB5\u4F1A\u9010\u4E2A\u6838\u5B9E\u662F\u5426\u5728\u7FA4\u5185\uFF0C\u4E0D\u5728\u7FA4\u5185\u5219\u62D2\u7EDD\u53D1\u9001" },
2766
2805
  quoteMsgId: { type: "string", pattern: "^\\d+$", description: "\u5F15\u7528\u8BE5\u6D88\u606F\uFF08\u4E0E replyMsgId \u4E92\u65A5\uFF0C\u4EC5\u7FA4\u804A\u3001\u4EC5 txt \u6587\u672C\u6D88\u606F\uFF09\uFF1B\u4F20\u6D88\u606F id\uFF08ser_msgid\uFF09\uFF0Cprepare \u9636\u6BB5\u81EA\u52A8\u5B9A\u4F4D\u88AB\u5F15\u6D88\u606F\u5E76\u7EC4\u88C5 ref" },
@@ -2786,6 +2825,7 @@ var msgWriteOps = [
2786
2825
  toUid: { type: "string", pattern: "^\\d+$", description: "\u5355\u804A\u573A\u666F\u5BF9\u65B9 uid" },
2787
2826
  toCid: { type: "string", pattern: "^\\d+$", description: "\u5355\u804A\u8F6C\u5FC5\u8FBE\u5BF9\u65B9 cid" },
2788
2827
  txt: { type: "string", description: "\u666E\u901A\u5FC5\u8FBE\u6587\u672C" },
2828
+ markdown: { type: "boolean", description: "true \u65F6 txt \u6309 markdown \u53D1\u9001\uFF08\u5916\u5C42 type=26 + txt \u6BB5 vt=1\uFF09\uFF1B\u4EC5\u666E\u901A\u5FC5\u8FBE\u652F\u6301\uFF0C\u8F6C\u5FC5\u8FBE\u6CBF\u7528\u6E90\u6D88\u606F\u683C\u5F0F" },
2789
2829
  convertMsgid: { type: "string", pattern: "^\\d+$", description: "\u8F6C\u5FC5\u8FBE\u6E90\u6D88\u606F id" },
2790
2830
  unreadOnly: { type: "boolean", description: "\u7FA4\u8F6C\u5FC5\u8FBE\u4EC5\u53D1\u7ED9\u672A\u8BFB\u4EBA\u5458" },
2791
2831
  toUids: { type: "array", items: { type: "string" }, description: "\u6307\u5B9A\u63A5\u6536\u4EBA uid" },
@@ -3146,7 +3186,7 @@ var sysmsgQuery = {
3146
3186
  read_status: r?.read_status,
3147
3187
  deal_status: r?.deal_status
3148
3188
  }));
3149
- const { collectI18nIds: collectI18nIds2, collectPersonIds: collectPersonIds2 } = await import("./msg-parse-4GSQ2WTO.js");
3189
+ const { collectI18nIds: collectI18nIds2, collectPersonIds: collectPersonIds2 } = await import("./msg-parse-FPFVPMYI.js");
3150
3190
  const i18nIds = collectI18nIds2(msgRows);
3151
3191
  const personIds = collectPersonIds2(msgRows);
3152
3192
  for (const r of msgRows) if (r.from_uid) personIds.push(String(r.from_uid));
@@ -2,12 +2,12 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
2
2
  const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  meetingStateDir
5
- } from "./chunk-6GWU63YF.js";
5
+ } from "./chunk-DZOC77ZD.js";
6
6
  import {
7
7
  meetingSuccess,
8
8
  meetingValidationError,
9
9
  schemaOf
10
- } from "./chunk-K3BT54CU.js";
10
+ } from "./chunk-IRMA3GVP.js";
11
11
 
12
12
  // src/shortcuts/meeting/operations/eb/group-chat.ts
13
13
  import { mkdir, readFile, readdir, rm, writeFile } from "node:fs/promises";
@@ -113,7 +113,7 @@ async function findGroupByName(env, name) {
113
113
  const target = name.trim();
114
114
  if (target === "") return null;
115
115
  try {
116
- const { getImOperation } = await import("./registry-BUTEDK3C.js");
116
+ const { getImOperation } = await import("./registry-E5RQJVWN.js");
117
117
  const search = getImOperation("im.group.search");
118
118
  const imEnv = await buildImEnv(env);
119
119
  const found = await search.handler({ name: target }, imEnv);
@@ -159,7 +159,7 @@ async function triggerGroupFlow(env, input, meetingName, memberIds) {
159
159
  if (addressText === "[object Object]") addressText = "";
160
160
  if (addressText) {
161
161
  try {
162
- const { resolveAddressRoom } = await import("./create-flow-7WG7LVX5.js");
162
+ const { resolveAddressRoom } = await import("./create-flow-7ZATJVTM.js");
163
163
  const room = await resolveAddressRoom(env, addressText);
164
164
  if (room?.name) addressText = room.name;
165
165
  } catch {
@@ -201,7 +201,7 @@ async function bindGroupToMeeting(env, meetingId, groupId) {
201
201
  const group = String(groupId).trim();
202
202
  if (id === "" || group === "") return { ok: false, error: "\u6CA1\u6709\u4F1A\u8BAE id \u6216\u7FA4 id" };
203
203
  try {
204
- const { EB_BASE, ebBusinessSuccess, writeBody } = await import("./factory-2H7Z4RWJ.js");
204
+ const { EB_BASE, ebBusinessSuccess, writeBody } = await import("./factory-3M7D7WJC.js");
205
205
  const session = await env.host.getSession();
206
206
  await env.host.request({
207
207
  method: "POST",
@@ -219,7 +219,7 @@ async function bindGroupToMeeting(env, meetingId, groupId) {
219
219
  return { ok: false, error: String(error?.message ?? error).slice(0, 300) };
220
220
  }
221
221
  try {
222
- const { getMeetingOperation } = await import("./registry-CKUVBS53.js");
222
+ const { getMeetingOperation } = await import("./registry-SJHSBO5G.js");
223
223
  const detail = getMeetingOperation("meeting.eb.meeting.detail");
224
224
  const read = await detail.handler({ id }, env);
225
225
  const main = read?.data?.data ?? read?.data?.main ?? {};
@@ -235,7 +235,7 @@ async function bindGroupToMeeting(env, meetingId, groupId) {
235
235
  }
236
236
  async function searchMyRequests(env, options = {}) {
237
237
  try {
238
- const { getWorkflowOperation } = await import("./registry-7VZ6YJUF.js");
238
+ const { getWorkflowOperation } = await import("./registry-KYPFFQIH.js");
239
239
  const op = getWorkflowOperation("workflow.search");
240
240
  const wfEnv = await buildWorkflowEnv(env);
241
241
  const args = { category: "mine", pageSize: 20, sort: "createTime:desc" };
@@ -267,7 +267,7 @@ async function resolveMeetingByRequestId(env, requestId, sinceMs) {
267
267
  const target = String(requestId).trim();
268
268
  if (target === "") return null;
269
269
  try {
270
- const { getMeetingOperation } = await import("./registry-CKUVBS53.js");
270
+ const { getMeetingOperation } = await import("./registry-SJHSBO5G.js");
271
271
  const list = getMeetingOperation("meeting.eb.meeting.list");
272
272
  const detail = getMeetingOperation("meeting.eb.meeting.detail");
273
273
  const page = await list.handler({ pageSize: 30 }, env);
@@ -5,7 +5,7 @@ import {
5
5
  ebBusinessSuccess,
6
6
  meetingSuccess,
7
7
  meetingValidationError
8
- } from "./chunk-K3BT54CU.js";
8
+ } from "./chunk-IRMA3GVP.js";
9
9
 
10
10
  // src/shortcuts/meeting/operations/env.ts
11
11
  import { existsSync } from "node:fs";
@@ -2329,7 +2329,7 @@ function buildWriteOperations(endpoint, preflight, afterWrite) {
2329
2329
  );
2330
2330
  }
2331
2331
  if (endpoint.interfacePk === "create_meeting") {
2332
- const { fetchEbAppSettings, assertEbCreatePathAllowed } = await import("./conflict-6347A7YK.js");
2332
+ const { fetchEbAppSettings, assertEbCreatePathAllowed } = await import("./conflict-D2HYKBMH.js");
2333
2333
  assertEbCreatePathAllowed(await fetchEbAppSettings(env, applyName));
2334
2334
  }
2335
2335
  const pkQuery = writePkQuery(endpoint, payload);
@@ -2,7 +2,7 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
2
2
  const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  meetingStateDir
5
- } from "./chunk-6GWU63YF.js";
5
+ } from "./chunk-DZOC77ZD.js";
6
6
 
7
7
  // src/shortcuts/meeting/operations/eb/cache.ts
8
8
  import { mkdir, readFile, writeFile } from "node:fs/promises";
@@ -11,14 +11,14 @@ var MSG_TYPES = {
11
11
  6: "\u56FE\u6587",
12
12
  7: "\u89C6\u9891",
13
13
  8: "\u4E8B\u9879",
14
- 9: "\u7CFB\u7EDF\u6D88\u606F",
14
+ 9: "\u7CFB\u7EDF",
15
15
  10: "\u64A4\u56DE",
16
16
  11: "\u6296\u4E00\u6296",
17
17
  12: "\u5C4F\u853D",
18
- 14: "\u901A\u77E5",
19
- 15: "\u81EA\u5B9A\u4E49",
18
+ 14: "\u5C45\u4E2D",
19
+ 15: "\u7B2C\u4E09\u65B9",
20
20
  16: "\u8BED\u97F3\u901A\u8BDD",
21
- 17: "\u804A\u5929\u8BB0\u5F55",
21
+ 17: "\u5408\u5E76\u8F6C\u53D1",
22
22
  18: "\u89C6\u9891\u901A\u8BDD",
23
23
  19: "\u7FA4\u516C\u544A",
24
24
  20: "\u5206\u4EAB\u5730\u5740",
@@ -144,6 +144,16 @@ function parseSysMsg(msg) {
144
144
  id18n: sys.id18n !== void 0 ? String(sys.id18n) : void 0
145
145
  };
146
146
  }
147
+ function isMarkdownTxt(txt) {
148
+ if (!txt || typeof txt !== "object") return false;
149
+ const vt = txt.vt;
150
+ return vt === 1 || vt === "1";
151
+ }
152
+ function isMarkdownMsg(msg) {
153
+ if (Number(msg?.type) !== 26) return false;
154
+ const dt = Array.isArray(msg?.dt) ? msg.dt : [];
155
+ return dt.some((seg) => isMarkdownTxt(seg?.txt));
156
+ }
147
157
  function parseContent(value, opts = {}) {
148
158
  const msg = parseMsg(value) || {};
149
159
  const type = Number(msg.type || 0);
@@ -197,7 +207,8 @@ function parseContent(value, opts = {}) {
197
207
  let title = "";
198
208
  if (sys.etName) title = sys.etName;
199
209
  else if (sys.id18n && opts.i18nMap?.[sys.id18n]) title = opts.i18nMap[sys.id18n];
200
- return { type, typeName, content, title, must, fileName, sys };
210
+ const format = isMarkdownMsg(msg) ? "markdown" : "text";
211
+ return { type, typeName, content, title, must, fileName, sys, format };
201
212
  }
202
213
  function parseSegment(seg, opts = {}) {
203
214
  if (!seg) return "";
@@ -359,6 +370,8 @@ export {
359
370
  replaceMentions,
360
371
  extractTxt,
361
372
  parseSysMsg,
373
+ isMarkdownTxt,
374
+ isMarkdownMsg,
362
375
  parseContent,
363
376
  senderName,
364
377
  extractImgs,