weaver-work-cli 0.1.39 → 0.1.40
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/README.md +4 -2
- package/dist/chunks/{archive-ENZYBBME.js → archive-JHTONRST.js} +2 -2
- package/dist/chunks/{archive-oa-YWLEC5V4.js → archive-oa-FCHLCPHC.js} +2 -2
- package/dist/chunks/{asset-OOV6DWPA.js → asset-RLIHC7DB.js} +2 -2
- package/dist/chunks/{asset-idle-RE632MY5.js → asset-idle-KVOFTLCP.js} +2 -2
- package/dist/chunks/{attachment-content-RWN2FCLL.js → attachment-content-RZYDB3MB.js} +3 -3
- package/dist/chunks/{blog-PEPOJAL7.js → blog-42OZTJNP.js} +2 -2
- package/dist/chunks/{caizhilian-WYIQDVPJ.js → caizhilian-KRK547K5.js} +2 -2
- package/dist/chunks/{calendar-CIARBAOX.js → calendar-RTWAMKHD.js} +2 -2
- package/dist/chunks/{chunk-L4N7B7ZD.js → chunk-4CTESSKI.js} +4 -4
- package/dist/chunks/{chunk-XXJOSZTQ.js → chunk-4TEDNCON.js} +43 -5
- package/dist/chunks/chunk-57IECMWX.js +487 -0
- package/dist/chunks/{chunk-CQHGNCK2.js → chunk-7BRU4EFH.js} +13 -7
- package/dist/chunks/{chunk-KTCB5R5H.js → chunk-7E6MUOEK.js} +2 -2
- package/dist/chunks/{chunk-I2HB737U.js → chunk-7U577Q7U.js} +2 -2
- package/dist/chunks/{chunk-BJGXMFGD.js → chunk-CAQNBBQA.js} +2 -2
- package/dist/chunks/{chunk-MUQUHKPG.js → chunk-CXRQWOZ5.js} +2 -2
- package/dist/chunks/{chunk-T7JDJJ7H.js → chunk-FLS4DPGP.js} +110 -16
- package/dist/chunks/{chunk-P2DAISYW.js → chunk-I566ZYNF.js} +1 -1
- package/dist/chunks/{chunk-36DIFZAH.js → chunk-IZSSVYAG.js} +2 -2
- package/dist/chunks/{chunk-EINRJHQ3.js → chunk-JWRZM2H2.js} +3 -3
- package/dist/chunks/{chunk-F2EQXUEE.js → chunk-LFMSDBZN.js} +97 -14
- package/dist/chunks/{chunk-GVPJZXJ2.js → chunk-LN447PY2.js} +91 -50
- package/dist/chunks/{chunk-K3RUEEOL.js → chunk-NETCCARD.js} +2 -2
- package/dist/chunks/{chunk-YS5DPN4T.js → chunk-NJKREDA3.js} +1 -1
- package/dist/chunks/{chunk-ZXRNHZTE.js → chunk-SPRHHSVC.js} +2 -2
- package/dist/chunks/{chunk-HJYVHXUQ.js → chunk-T6EGVBKU.js} +1 -1
- package/dist/chunks/{chunk-NLK2RZKG.js → chunk-VNBU55SL.js} +428 -145
- package/dist/chunks/{chunk-EZGFHJFW.js → chunk-WFFNM65B.js} +26 -7
- package/dist/chunks/{conflict-DRMDOL56.js → conflict-VR55AOOO.js} +2 -2
- package/dist/chunks/{contract-73MERZWN.js → contract-HI4FNPYE.js} +2 -2
- package/dist/chunks/{cowork-HNGBPD7A.js → cowork-HJLI353D.js} +12 -5
- package/dist/chunks/{ebuilder-form-OY6DVNRK.js → ebuilder-form-HTGI63UU.js} +3 -3
- package/dist/chunks/{ehr-RAQNEQO7.js → ehr-GYXIYH3A.js} +2 -2
- package/dist/chunks/env-DW3G4HUO.js +19 -0
- package/dist/chunks/{esb-6XV7C7YV.js → esb-I5INCEFE.js} +4 -4
- package/dist/chunks/factory-TKXGXS6L.js +30 -0
- package/dist/chunks/{fna-XTSRB7G7.js → fna-K2MHTQ24.js} +2 -2
- package/dist/chunks/group-chat-VYBNMJLG.js +18 -0
- package/dist/chunks/{host-VGPVP7YF.js → host-256GVCAH.js} +3 -3
- package/dist/chunks/{host-A7J6GDUP.js → host-D5SERMAJ.js} +3 -3
- package/dist/chunks/{host-3F5UM5GN.js → host-JM4YVHFM.js} +3 -3
- package/dist/chunks/{host-YAQAPYNP.js → host-L3VLITMT.js} +3 -3
- package/dist/chunks/{host-YMBXWFWX.js → host-ZUQTJYYK.js} +3 -3
- package/dist/chunks/{hrm-TLHKC545.js → hrm-VLRBKTZB.js} +3 -3
- package/dist/chunks/{im-YOUCFMUK.js → im-QK3VTLXK.js} +8 -8
- package/dist/chunks/{invoice-WNBS2B4C.js → invoice-T5JTA32H.js} +3 -3
- package/dist/chunks/{jiuchuanhui-XABWS5RN.js → jiuchuanhui-P2FNEQVZ.js} +2 -2
- package/dist/chunks/{lazy-dispatch-NLZ5UQQI.js → lazy-dispatch-XRRI46M6.js} +4 -4
- package/dist/chunks/{mail-LRYMBFNL.js → mail-3Y7MJ6PS.js} +9 -4
- package/dist/chunks/{meeting-ESXL6MFI.js → meeting-M7LTXGJE.js} +11 -10
- package/dist/chunks/{okr-EOV65SSF.js → okr-OBC6S67L.js} +2 -2
- package/dist/chunks/{plan-YFPVKW6Y.js → plan-5H6I53SK.js} +2 -2
- package/dist/chunks/{project-MDVZUYQW.js → project-L75QZV4S.js} +2 -2
- package/dist/chunks/{registry-QCLZEDAP.js → registry-KMHCPAAD.js} +9 -8
- package/dist/chunks/{registry-OZSMDVPP.js → registry-QGHFNUWS.js} +2 -2
- package/dist/chunks/{registry-VT5Y2HLA.js → registry-RXPN6BBT.js} +4 -4
- package/dist/chunks/{registry-YX4CSEMD.js → registry-UGRBCBHO.js} +2 -2
- package/dist/chunks/{room-recommend-L3MWH4JW.js → room-recommend-A3UDC3CA.js} +4 -4
- package/dist/chunks/{schedule-UASAVDVD.js → schedule-5GCACCK7.js} +4 -4
- package/dist/chunks/{workflow-KDGIUCNW.js → workflow-M5ZJ7DWF.js} +6 -6
- package/dist/index.js +28 -28
- package/dist/internal/e10/auth/commands.js +109 -56
- package/dist/internal/e10/auth/session.js +11 -1
- package/dist/internal/e10/auth/xiaoe.js +29 -4
- package/dist/internal/e10/client.js +13 -0
- package/dist/internal/e10/context.js +14 -6
- package/dist/internal/e10/request-runtime.js +9 -0
- package/dist/shortcuts/cowork/operations/item-write.js +10 -2
- package/dist/shortcuts/mail/operations/mail-send.js +8 -2
- package/dist/shortcuts/meeting/operations/eb/catalog.js +5 -1
- package/dist/shortcuts/meeting/operations/eb/create-flow.js +381 -104
- package/dist/shortcuts/meeting/operations/eb/crm-search.js +87 -5
- package/dist/shortcuts/meeting/operations/eb/flow-memory.js +49 -0
- package/dist/shortcuts/meeting/operations/eb/group-chat.js +583 -0
- package/dist/shortcuts/meeting/operations/eb/index.js +2 -0
- package/dist/shortcuts/meeting/operations/eb/room-recommend.js +19 -3
- package/dist/shortcuts/meeting/operations/eb/room-summary.js +2 -0
- package/dist/shortcuts/meeting/operations/eb/usage-cache.js +99 -0
- package/dist/shortcuts/meeting/operations/from-group-chat.js +35 -12
- package/dist/shortcuts/workflow/operations/form.js +21 -2
- package/dist/shortcuts/workflow/operations/todoSmartConvert/aigroupRules.js +52 -1
- package/dist/shortcuts/workflow/operations/todoSmartConvert/summaryCache.js +10 -9
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +28 -2
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.core.js +1 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.group.js +17 -9
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +1 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.summary.js +14 -2
- package/docs/e10-auth.md +15 -0
- package/package.json +1 -1
- package/scripts/mcp-meeting.mjs +234 -0
- package/skills/weaver-e10-cowork/references/cowork-write.md +1 -1
- package/skills/weaver-e10-mail/references/mail-send.md +2 -0
- package/skills/weaver-e10-meeting/SKILL.md +88 -25
- package/skills/weaver-e10-meeting/references/meeting-minute-file.md +25 -11
- package/skills/weaver-e10-meeting.zip +0 -0
- package/skills/weaver-e10-shared/SKILL.md +1 -1
- package/skills/weaver-e10-shared/references/e10-auth-and-session.md +1 -1
- package/skills/weaver-e10-workflow/SKILL.md +4 -0
- package/skills/weaver-e10-workflow/aigroup/default.json +12 -0
- package/skills/weaver-e10-workflow/references/todo-smart-convert.md +17 -11
- package/skills/weaver-e10-workflow/tools/todo-summary.cjs +73 -23
- package/dist/chunks/{chunk-2LV74IWP.js → chunk-E7OK5WD5.js} +5 -5
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
cacheScopeSuffix,
|
|
5
5
|
readCache,
|
|
6
6
|
writeCache
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-I566ZYNF.js";
|
|
8
8
|
import {
|
|
9
9
|
EB_BASE,
|
|
10
10
|
SCHEMA_DATETIME_MINUTE,
|
|
@@ -13,15 +13,94 @@ import {
|
|
|
13
13
|
meetingSuccess,
|
|
14
14
|
queryBody,
|
|
15
15
|
schemaOf
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-7BRU4EFH.js";
|
|
17
|
+
|
|
18
|
+
// src/shortcuts/meeting/operations/eb/usage-cache.ts
|
|
19
|
+
var USAGE_TTL_MS = 5 * 60 * 1e3;
|
|
20
|
+
var MAX_PAGES = 10;
|
|
21
|
+
var PAGE_SIZE = 200;
|
|
22
|
+
function dayOf(datetime) {
|
|
23
|
+
return String(datetime ?? "").trim().slice(0, 10);
|
|
24
|
+
}
|
|
25
|
+
function usageOverlaps(row, begin, end) {
|
|
26
|
+
return row.start < end && row.end > begin;
|
|
27
|
+
}
|
|
28
|
+
function filterUsages(rows, options) {
|
|
29
|
+
return rows.filter((row) => {
|
|
30
|
+
if (options.roomId && row.roomId !== options.roomId) return false;
|
|
31
|
+
if (options.excludeMtId && row.mtId && row.mtId === options.excludeMtId) return false;
|
|
32
|
+
return usageOverlaps(row, options.begin, options.end);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
function busyRoomIds(rows, begin, end) {
|
|
36
|
+
const ids = /* @__PURE__ */ new Set();
|
|
37
|
+
for (const row of rows) {
|
|
38
|
+
if (row.roomId && usageOverlaps(row, begin, end)) ids.add(row.roomId);
|
|
39
|
+
}
|
|
40
|
+
return ids;
|
|
41
|
+
}
|
|
42
|
+
function usageKey(scope, day) {
|
|
43
|
+
return `usage-v1-${scope}-${day}`;
|
|
44
|
+
}
|
|
45
|
+
async function loadDayUsages(env, day, options = {}) {
|
|
46
|
+
const scope = await cacheScopeSuffix(env);
|
|
47
|
+
const key = usageKey(scope, day);
|
|
48
|
+
if (options.refresh !== true) {
|
|
49
|
+
const cached = await readCache(env, key, { ttlMs: USAGE_TTL_MS });
|
|
50
|
+
if (cached) {
|
|
51
|
+
return { rows: cached.data, fromCache: true, ageMs: cached.ageMs, requests: 0 };
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
const session = await env.host.getSession();
|
|
55
|
+
const rows = [];
|
|
56
|
+
let requests = 0;
|
|
57
|
+
for (let pageNo = 1; pageNo <= MAX_PAGES; pageNo += 1) {
|
|
58
|
+
const response = await env.host.request({
|
|
59
|
+
method: "POST",
|
|
60
|
+
path: `${EB_BASE}/getFormDataList/query_roomusage_list`,
|
|
61
|
+
operation: "meeting.eb.roomUsage.list",
|
|
62
|
+
// 与 fetchBusyRoomIds 同一套算子语义:enddatetime lt 当天末尾、begindatetime gt 当天开头
|
|
63
|
+
query: { enddatetime: `${day} 23:59`, begindatetime: `${day} 00:00` },
|
|
64
|
+
body: queryBody(session.userId, { pageNo, pageSize: PAGE_SIZE }),
|
|
65
|
+
acceptBusiness: ebBusinessSuccess
|
|
66
|
+
});
|
|
67
|
+
requests += 1;
|
|
68
|
+
const { rows: pageRows } = extractEbRows(response);
|
|
69
|
+
for (const row of pageRows) {
|
|
70
|
+
const main = row?.mainTable ?? row ?? {};
|
|
71
|
+
const roomId = String(main.address ?? main.room_id ?? "").trim();
|
|
72
|
+
const start = String(main.startdate ?? "").trim();
|
|
73
|
+
const end = String(main.enddate ?? "").trim();
|
|
74
|
+
if (roomId && start && end) {
|
|
75
|
+
rows.push({ roomId, mtId: String(main.mt_id ?? "").trim(), start, end });
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (pageRows.length < PAGE_SIZE) break;
|
|
79
|
+
}
|
|
80
|
+
await writeCache(env, key, rows);
|
|
81
|
+
return { rows, fromCache: false, ageMs: 0, requests };
|
|
82
|
+
}
|
|
83
|
+
async function invalidateDayUsages(env, day) {
|
|
84
|
+
const scope = await cacheScopeSuffix(env);
|
|
85
|
+
await clearCache(env, usageKey(scope, day));
|
|
86
|
+
}
|
|
87
|
+
async function clearCache(env, key) {
|
|
88
|
+
try {
|
|
89
|
+
const { rm } = await import("node:fs/promises");
|
|
90
|
+
const { join } = await import("node:path");
|
|
91
|
+
const { meetingStateDir } = await import("./env-DW3G4HUO.js");
|
|
92
|
+
await rm(join(meetingStateDir(env.ctx), "cache", `${key}.json`), { force: true });
|
|
93
|
+
} catch {
|
|
94
|
+
}
|
|
95
|
+
}
|
|
17
96
|
|
|
18
97
|
// src/shortcuts/meeting/operations/eb/room-recommend.ts
|
|
19
98
|
var ROOMS_TTL_MS = 24 * 60 * 60 * 1e3;
|
|
20
99
|
var STALE_NOTICE_MS = 4 * 60 * 60 * 1e3;
|
|
21
100
|
var FREQUENT_TTL_MS = 7 * 24 * 60 * 60 * 1e3;
|
|
22
101
|
var FREQUENT_WINDOW_DAYS = 180;
|
|
23
|
-
var
|
|
24
|
-
var
|
|
102
|
+
var PAGE_SIZE2 = 100;
|
|
103
|
+
var MAX_PAGES2 = 20;
|
|
25
104
|
var STATUS_TEXT = { "0": "\u6B63\u5E38", "1": "\u5C01\u5B58" };
|
|
26
105
|
var ATTR_TEXT = { "0": "\u5B9E\u4F53", "1": "\u865A\u62DF", "2": "\u7EC4\u5408" };
|
|
27
106
|
function toText(value) {
|
|
@@ -47,7 +126,7 @@ async function fetchRoomsPage(env, pageNo) {
|
|
|
47
126
|
method: "POST",
|
|
48
127
|
path: `${EB_BASE}/getFormDataList/query_meeting_room_list`,
|
|
49
128
|
operation: "meeting.eb.room.recommend",
|
|
50
|
-
body: queryBody(session.userId, { pageNo, pageSize:
|
|
129
|
+
body: queryBody(session.userId, { pageNo, pageSize: PAGE_SIZE2 }),
|
|
51
130
|
acceptBusiness: ebBusinessSuccess
|
|
52
131
|
});
|
|
53
132
|
const { rows } = extractEbRows(response);
|
|
@@ -72,7 +151,7 @@ function normalizeRoom(row) {
|
|
|
72
151
|
};
|
|
73
152
|
}
|
|
74
153
|
async function loadRooms(env, options = {}) {
|
|
75
|
-
const key = `rooms-${await cacheScopeSuffix(env)}`;
|
|
154
|
+
const key = `rooms-v2-${await cacheScopeSuffix(env)}`;
|
|
76
155
|
const warnings = [];
|
|
77
156
|
if (!options.refresh) {
|
|
78
157
|
const cached = await readCache(env, key, { ttlMs: ROOMS_TTL_MS });
|
|
@@ -88,11 +167,11 @@ async function loadRooms(env, options = {}) {
|
|
|
88
167
|
}
|
|
89
168
|
const rooms = [];
|
|
90
169
|
let requests = 0;
|
|
91
|
-
for (let pageNo = 1; pageNo <=
|
|
170
|
+
for (let pageNo = 1; pageNo <= MAX_PAGES2; pageNo += 1) {
|
|
92
171
|
const page = await fetchRoomsPage(env, pageNo);
|
|
93
172
|
requests += page.requests;
|
|
94
173
|
rooms.push(...page.rows.map(normalizeRoom).filter((room) => room.id !== ""));
|
|
95
|
-
if (page.rows.length <
|
|
174
|
+
if (page.rows.length < PAGE_SIZE2) break;
|
|
96
175
|
}
|
|
97
176
|
if (rooms.length === 0) {
|
|
98
177
|
warnings.push("\u4F1A\u8BAE\u5BA4\u5217\u8868\u4E3A\u7A7A\uFF08\u6216\u5F53\u524D\u8D26\u53F7\u65E0\u4F1A\u8BAE\u5BA4\u8BFB\u53D6\u6743\u9650\uFF09\u2014\u2014\u65E0\u6CD5\u63A8\u8350\uFF0C\u8BF7\u6539\u4E3A\u624B\u5DE5\u6307\u5B9A\u4F1A\u8BAE\u5BA4");
|
|
@@ -121,11 +200,11 @@ async function loadFrequentRooms(env, options = {}) {
|
|
|
121
200
|
const counts = /* @__PURE__ */ new Map();
|
|
122
201
|
let requests = 0;
|
|
123
202
|
try {
|
|
124
|
-
const { getMeetingOperation } = await import("./registry-
|
|
203
|
+
const { getMeetingOperation } = await import("./registry-KMHCPAAD.js");
|
|
125
204
|
const listOp = getMeetingOperation("meeting.eb.meeting.list");
|
|
126
205
|
for (let pageNo = 1; pageNo <= 5; pageNo += 1) {
|
|
127
206
|
const page = await listOp.handler(
|
|
128
|
-
{ creator: userId, begindatetime: sinceText, pageNo, pageSize:
|
|
207
|
+
{ creator: userId, begindatetime: sinceText, pageNo, pageSize: PAGE_SIZE2 },
|
|
129
208
|
env
|
|
130
209
|
);
|
|
131
210
|
requests += 1;
|
|
@@ -136,7 +215,7 @@ async function loadFrequentRooms(env, options = {}) {
|
|
|
136
215
|
if (!name) continue;
|
|
137
216
|
counts.set(name, (counts.get(name) ?? 0) + 1);
|
|
138
217
|
}
|
|
139
|
-
if (rows.length <
|
|
218
|
+
if (rows.length < PAGE_SIZE2) break;
|
|
140
219
|
}
|
|
141
220
|
} catch (error) {
|
|
142
221
|
warnings.push(`\u5E38\u7528\u4F1A\u8BAE\u5BA4\u7EDF\u8BA1\u5931\u8D25\uFF08${String(error?.message ?? error).slice(0, 80)}\uFF09\uFF1A\u672C\u6B21\u6309\u5168\u91CF\u4F1A\u8BAE\u5BA4\u6392\u5E8F\u63A8\u8350`);
|
|
@@ -150,13 +229,13 @@ async function fetchBusyRoomIds(env, begin, end) {
|
|
|
150
229
|
const ids = /* @__PURE__ */ new Set();
|
|
151
230
|
let requests = 0;
|
|
152
231
|
const usageQuery = { enddatetime: end, begindatetime: begin };
|
|
153
|
-
for (let pageNo = 1; pageNo <=
|
|
232
|
+
for (let pageNo = 1; pageNo <= MAX_PAGES2; pageNo += 1) {
|
|
154
233
|
const response = await env.host.request({
|
|
155
234
|
method: "POST",
|
|
156
235
|
path: `${EB_BASE}/getFormDataList/query_roomusage_list`,
|
|
157
236
|
operation: "meeting.eb.room.recommend",
|
|
158
237
|
query: usageQuery,
|
|
159
|
-
body: queryBody(session.userId, { pageNo, pageSize:
|
|
238
|
+
body: queryBody(session.userId, { pageNo, pageSize: PAGE_SIZE2 }),
|
|
160
239
|
acceptBusiness: ebBusinessSuccess
|
|
161
240
|
});
|
|
162
241
|
requests += 1;
|
|
@@ -166,7 +245,7 @@ async function fetchBusyRoomIds(env, begin, end) {
|
|
|
166
245
|
const roomId = toText(main.address ?? main.room_id).trim();
|
|
167
246
|
if (roomId) ids.add(roomId);
|
|
168
247
|
}
|
|
169
|
-
if (rows.length <
|
|
248
|
+
if (rows.length < PAGE_SIZE2) break;
|
|
170
249
|
}
|
|
171
250
|
return { ids, requests };
|
|
172
251
|
}
|
|
@@ -182,7 +261,7 @@ async function recommendRooms(env, input) {
|
|
|
182
261
|
}
|
|
183
262
|
const frequent = await loadFrequentRooms(env, { refresh: input.refreshFrequent === true });
|
|
184
263
|
warnings.push(...frequent.warnings);
|
|
185
|
-
const busy = await fetchBusyRoomIds(env, input.beginDatetime, input.endDatetime);
|
|
264
|
+
const busy = input.dayUsages ? { ids: busyRoomIds(input.dayUsages, input.beginDatetime, input.endDatetime), requests: 0 } : await fetchBusyRoomIds(env, input.beginDatetime, input.endDatetime);
|
|
186
265
|
const frequentRank = /* @__PURE__ */ new Map();
|
|
187
266
|
frequent.order.forEach((item, index) => {
|
|
188
267
|
frequentRank.set(item.name, { rank: index, count: item.count });
|
|
@@ -235,6 +314,15 @@ async function recommendRooms(env, input) {
|
|
|
235
314
|
reasons.push(`\u8BBE\u5907\u542B\u300C${requirement.equipmentsKeyword}\u300D`);
|
|
236
315
|
score += 10;
|
|
237
316
|
}
|
|
317
|
+
if (requirement.hasCustomer === true) {
|
|
318
|
+
const hostText = `${room.roomDesc ?? ""} ${room.name}`;
|
|
319
|
+
const hostHit = hostText.match(/(接待|招待|客户|商务|贵宾|vip|VIP)/u);
|
|
320
|
+
if (hostHit) {
|
|
321
|
+
const desc = String(room.roomDesc ?? "").trim();
|
|
322
|
+
reasons.push(`\u5E26\u5BA2\u6237\u4F18\u5148\uFF1A${desc !== "" ? `\u63CF\u8FF0\u542B\u300C${desc.slice(0, 30)}\u300D` : `\u540D\u79F0\u542B\u300C${hostHit[1]}\u300D`}`);
|
|
323
|
+
score += 35;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
238
326
|
if (isBusy) {
|
|
239
327
|
reasons.push("\u8BE5\u65F6\u6BB5\u5DF2\u88AB\u5360\u7528\uFF08\u6309 includeBusy \u4E00\u5E76\u8FD4\u56DE\uFF09");
|
|
240
328
|
score -= 100;
|
|
@@ -248,6 +336,7 @@ async function recommendRooms(env, input) {
|
|
|
248
336
|
place: room.place,
|
|
249
337
|
equipments: room.equipments,
|
|
250
338
|
roomAttrText: room.roomAttrText,
|
|
339
|
+
...String(room.roomDesc ?? "").trim() !== "" ? { roomDesc: String(room.roomDesc).trim() } : {},
|
|
251
340
|
frequentCount: freq?.count ?? 0,
|
|
252
341
|
score,
|
|
253
342
|
reasons
|
|
@@ -321,6 +410,7 @@ var ebRoomRecommendOperation = {
|
|
|
321
410
|
mrType: { type: "string", description: "\u4F1A\u8BAE\u5BA4\u7C7B\u578B id\uFF08mr_type\uFF09" },
|
|
322
411
|
roomAttr: { type: "string", enum: ["0", "1", "2"], description: "\u4F1A\u8BAE\u5BA4\u5C5E\u6027\uFF1A0 \u5B9E\u4F53 / 1 \u865A\u62DF / 2 \u7EC4\u5408" },
|
|
323
412
|
equipmentsKeyword: { type: "string", description: "\u8BBE\u5907\u5173\u952E\u8BCD\uFF08\u6A21\u7CCA\u5339\u914D equipments\uFF0C\u5982 \u6295\u5F71/\u89C6\u9891\uFF09" },
|
|
413
|
+
hasCustomer: { type: "boolean", description: "\u672C\u6B21\u4F1A\u8BAE\u662F\u5426\u5E26\u5BA2\u6237\uFF1Atrue \u65F6\u4F18\u5148\u63A8\u8350\u63A5\u5F85\u7C7B\u4F1A\u8BAE\u5BA4\uFF08\u63CF\u8FF0/\u540D\u79F0\u542B \u63A5\u5F85/\u62DB\u5F85/\u5BA2\u6237/\u5546\u52A1/\u8D35\u5BBE \u7684\u52A0\u5206\uFF09" },
|
|
324
414
|
topN: { type: "number", description: "\u8FD4\u56DE\u5019\u9009\u6570\u91CF\uFF08\u9ED8\u8BA4 3\uFF0C\u6700\u591A 10\uFF09" },
|
|
325
415
|
refresh: { type: "boolean", description: "true=\u5237\u65B0\u4F1A\u8BAE\u5BA4\u5168\u91CF\u4E0E\u5E38\u7528\u8BB0\u5F55\u7F13\u5B58" },
|
|
326
416
|
includeBusy: { type: "boolean", description: "true=\u628A\u8BE5\u65F6\u6BB5\u5DF2\u88AB\u5360\u7528\u7684\u4F1A\u8BAE\u5BA4\u4E5F\u8FD4\u56DE\uFF08\u6392\u5728\u6700\u540E\uFF0C\u5E26\u8BF4\u660E\uFF09" }
|
|
@@ -360,7 +450,7 @@ async function rememberFrequentRoom(env, roomId) {
|
|
|
360
450
|
const id = String(roomId ?? "").trim();
|
|
361
451
|
if (!id) return false;
|
|
362
452
|
const scope = await cacheScopeSuffix(env);
|
|
363
|
-
const roomsCached = await readCache(env, `rooms-${scope}`, { ttlMs: ROOMS_TTL_MS });
|
|
453
|
+
const roomsCached = await readCache(env, `rooms-v2-${scope}`, { ttlMs: ROOMS_TTL_MS });
|
|
364
454
|
const name = roomsCached?.data?.find((room) => room.id === id)?.name ?? "";
|
|
365
455
|
if (!name) return false;
|
|
366
456
|
const session = await env.host.getSession().catch(() => null);
|
|
@@ -378,6 +468,10 @@ async function rememberFrequentRoom(env, roomId) {
|
|
|
378
468
|
}
|
|
379
469
|
|
|
380
470
|
export {
|
|
471
|
+
dayOf,
|
|
472
|
+
filterUsages,
|
|
473
|
+
loadDayUsages,
|
|
474
|
+
invalidateDayUsages,
|
|
381
475
|
loadRooms,
|
|
382
476
|
loadFrequentRooms,
|
|
383
477
|
recommendRooms,
|
|
@@ -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-
|
|
5
|
+
} from "./chunk-NJKREDA3.js";
|
|
6
6
|
|
|
7
7
|
// src/shortcuts/meeting/operations/eb/cache.ts
|
|
8
8
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
@@ -11,11 +11,11 @@ import {
|
|
|
11
11
|
createE10RequestRuntime,
|
|
12
12
|
isE10SessionExpiredResponse,
|
|
13
13
|
requireE10Session
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-WFFNM65B.js";
|
|
15
15
|
import {
|
|
16
16
|
E10_SESSION_EXPIRED_MESSAGE,
|
|
17
17
|
getActiveProfile
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-4TEDNCON.js";
|
|
19
19
|
|
|
20
20
|
// src/shortcuts/hrm/host.ts
|
|
21
21
|
function inferProfile(ctx) {
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
meetingValidationError,
|
|
13
13
|
queryBody,
|
|
14
14
|
toIdCsv
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-7BRU4EFH.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-
|
|
299
|
+
const { resolveMemberIdsByName } = await import("./schedule-5GCACCK7.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(",");
|
|
@@ -610,7 +610,7 @@ async function findCommonFreeSlots(env, input) {
|
|
|
610
610
|
const scheduleItems = [];
|
|
611
611
|
if (includeSchedule) {
|
|
612
612
|
try {
|
|
613
|
-
const { runScheduleConflictFlow, parseScheduleConflictMessage, resolveMemberIdsByName } = await import("./schedule-
|
|
613
|
+
const { runScheduleConflictFlow, parseScheduleConflictMessage, resolveMemberIdsByName } = await import("./schedule-5GCACCK7.js");
|
|
614
614
|
const dayBegin = new Date(rangeStart.getFullYear(), rangeStart.getMonth(), rangeStart.getDate(), 0, 0, 0, 0);
|
|
615
615
|
const dayEnd = new Date(rangeStart.getFullYear(), rangeStart.getMonth(), rangeStart.getDate(), 23, 59, 0, 0);
|
|
616
616
|
const flow = await runScheduleConflictFlow(env, {
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
createFetchTimingSink,
|
|
25
25
|
hasXiaoEEnv,
|
|
26
26
|
runWithFetchTiming
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-4TEDNCON.js";
|
|
28
28
|
|
|
29
29
|
// src/shortcuts/workflow/operations/form.ts
|
|
30
30
|
import { randomUUID } from "node:crypto";
|
|
@@ -5140,6 +5140,10 @@ var READONLY_COMPONENTS = /* @__PURE__ */ new Set([
|
|
|
5140
5140
|
"subtablecontrol",
|
|
5141
5141
|
"mobileinteraction"
|
|
5142
5142
|
]);
|
|
5143
|
+
function isBrowserLikeComponentKey(componentKey) {
|
|
5144
|
+
const normalized = String(componentKey ?? "").toLowerCase();
|
|
5145
|
+
return normalized === "einvoicecomponent" || normalized === "filecomponent";
|
|
5146
|
+
}
|
|
5143
5147
|
var SYSTEM_FIELD_KEYS = {
|
|
5144
5148
|
REQUEST_NAMEL: "\u6D41\u7A0B\u6807\u9898",
|
|
5145
5149
|
REQUEST_LEVEL: "\u7D27\u6025\u7A0B\u5EA6",
|
|
@@ -6519,6 +6523,7 @@ async function buildCreateFormData(workflowId, env, options = {}) {
|
|
|
6519
6523
|
for (const key of ["isBrowser", "isSelect", "isMultiple", "browserType", "browserModule"]) {
|
|
6520
6524
|
if (field[key]) item[key] = field[key];
|
|
6521
6525
|
}
|
|
6526
|
+
if (!item.isBrowser && isBrowserLikeComponentKey(field.componentKey)) item.isBrowser = true;
|
|
6522
6527
|
if (String(field.componentKey ?? "").toLowerCase() === "employeescope") item.isEmployeeScope = true;
|
|
6523
6528
|
if (String(field.componentKey ?? "").toLowerCase() === "einvoicecomponent") item.isEinvoice = true;
|
|
6524
6529
|
if (String(field.componentKey ?? "").toLowerCase() === "filecomponent") {
|
|
@@ -8311,7 +8316,7 @@ function xiaoECustomParams(preview, fields) {
|
|
|
8311
8316
|
const browserFieldIds = /* @__PURE__ */ new Set();
|
|
8312
8317
|
for (const field of toArray(fields)) {
|
|
8313
8318
|
const id = String(field?.id ?? "").trim();
|
|
8314
|
-
if (id && field?.isBrowser) browserFieldIds.add(id);
|
|
8319
|
+
if (id && (field?.isBrowser || isBrowserLikeComponentKey(field?.componentKey))) browserFieldIds.add(id);
|
|
8315
8320
|
}
|
|
8316
8321
|
for (const item of toArray(preview)) {
|
|
8317
8322
|
const fieldId = String(item?.fieldId ?? "").trim();
|
|
@@ -10094,6 +10099,7 @@ var ALLOWED_INPUT_KEYS = [
|
|
|
10094
10099
|
"tabid",
|
|
10095
10100
|
"tabName",
|
|
10096
10101
|
"subCategory",
|
|
10102
|
+
"isremarks",
|
|
10097
10103
|
"workflow",
|
|
10098
10104
|
"creator",
|
|
10099
10105
|
"requestName",
|
|
@@ -10394,8 +10400,8 @@ function promptTagOf(prompt) {
|
|
|
10394
10400
|
return String(prompt ?? "").trim();
|
|
10395
10401
|
}
|
|
10396
10402
|
function entryMatches(entry, maxChars, pk, dv) {
|
|
10397
|
-
if (
|
|
10398
|
-
if (
|
|
10403
|
+
if (pk !== void 0 && entry.pk !== void 0 && entry.pk !== pk) return false;
|
|
10404
|
+
if (maxChars !== void 0 && entry.maxChars !== void 0 && entry.maxChars !== maxChars) return false;
|
|
10399
10405
|
if (entry.dv !== void 0 && entry.dv !== dv) return false;
|
|
10400
10406
|
return true;
|
|
10401
10407
|
}
|
|
@@ -10576,6 +10582,39 @@ function validateRuleFile(raw) {
|
|
|
10576
10582
|
errors.push("rules \u5FC5\u987B\u662F\u6570\u7EC4");
|
|
10577
10583
|
return errors;
|
|
10578
10584
|
}
|
|
10585
|
+
if (file.generalRules !== void 0) {
|
|
10586
|
+
if (!file.generalRules || typeof file.generalRules !== "object" || Array.isArray(file.generalRules)) {
|
|
10587
|
+
errors.push("generalRules \u5FC5\u987B\u662F\u5BF9\u8C61");
|
|
10588
|
+
} else {
|
|
10589
|
+
const identity = file.generalRules.identityFilter;
|
|
10590
|
+
if (identity !== void 0) {
|
|
10591
|
+
if (!identity || typeof identity !== "object" || Array.isArray(identity)) {
|
|
10592
|
+
errors.push("generalRules.identityFilter \u5FC5\u987B\u662F\u5BF9\u8C61");
|
|
10593
|
+
} else if (identity.defaultIsremarks !== void 0 && !/^\d+(,\d+)*$/.test(String(identity.defaultIsremarks).trim())) {
|
|
10594
|
+
errors.push("generalRules.identityFilter.defaultIsremarks \u5FC5\u987B\u662F\u300C\u6570\u5B57\u9017\u53F7\u62FC\u63A5\u300D\u683C\u5F0F\uFF0C\u5982 0,1,2");
|
|
10595
|
+
}
|
|
10596
|
+
if (identity?.excludedCodes !== void 0 && (!Array.isArray(identity.excludedCodes) || identity.excludedCodes.some((c) => !/^\d+$/.test(String(c))))) {
|
|
10597
|
+
errors.push("generalRules.identityFilter.excludedCodes \u5FC5\u987B\u662F\u6570\u5B57\u7801\u6570\u7EC4");
|
|
10598
|
+
}
|
|
10599
|
+
}
|
|
10600
|
+
const priority = file.generalRules.priorityGroup;
|
|
10601
|
+
if (priority !== void 0) {
|
|
10602
|
+
if (!priority || typeof priority !== "object" || Array.isArray(priority)) {
|
|
10603
|
+
errors.push("generalRules.priorityGroup \u5FC5\u987B\u662F\u5BF9\u8C61");
|
|
10604
|
+
} else {
|
|
10605
|
+
if (priority.title !== void 0 && (typeof priority.title !== "string" || !priority.title.trim())) {
|
|
10606
|
+
errors.push("generalRules.priorityGroup.title \u5FC5\u987B\u662F\u975E\u7A7A\u5B57\u7B26\u4E32");
|
|
10607
|
+
}
|
|
10608
|
+
if (priority.rules !== void 0) {
|
|
10609
|
+
const KNOWN_PRIORITY_RULES = ["overdue", "levelFallback"];
|
|
10610
|
+
if (!Array.isArray(priority.rules) || priority.rules.length === 0 || priority.rules.some((r) => !KNOWN_PRIORITY_RULES.includes(String(r)))) {
|
|
10611
|
+
errors.push(`generalRules.priorityGroup.rules \u53EA\u652F\u6301 ${KNOWN_PRIORITY_RULES.join("\u3001")}`);
|
|
10612
|
+
}
|
|
10613
|
+
}
|
|
10614
|
+
}
|
|
10615
|
+
}
|
|
10616
|
+
}
|
|
10617
|
+
}
|
|
10579
10618
|
const defaultsExclude = validateExcludeFields(
|
|
10580
10619
|
file.defaults?.excludeOriginFormDataFields,
|
|
10581
10620
|
"defaults.excludeOriginFormDataFields"
|
|
@@ -10701,7 +10740,13 @@ function loadRules(options = {}) {
|
|
|
10701
10740
|
}
|
|
10702
10741
|
}
|
|
10703
10742
|
return {
|
|
10704
|
-
file: {
|
|
10743
|
+
file: {
|
|
10744
|
+
schemaVersion: base.file.schemaVersion,
|
|
10745
|
+
defaults: { ...FALLBACK_DEFAULTS, ...base.file.defaults },
|
|
10746
|
+
rules,
|
|
10747
|
+
// 通用规则区(2026-11-03):仅取 default.json 的定义;用户意图文件不参与通用规则
|
|
10748
|
+
...base.file.generalRules ? { generalRules: base.file.generalRules } : {}
|
|
10749
|
+
},
|
|
10705
10750
|
warnings,
|
|
10706
10751
|
dir
|
|
10707
10752
|
};
|
|
@@ -10874,6 +10919,9 @@ function activeRuleFor(workflowName) {
|
|
|
10874
10919
|
if (!name) return null;
|
|
10875
10920
|
return resolveRule(activeRules(), name)?.rule ?? null;
|
|
10876
10921
|
}
|
|
10922
|
+
function generalRules() {
|
|
10923
|
+
return activeRules().generalRules ?? null;
|
|
10924
|
+
}
|
|
10877
10925
|
function resetActiveRules() {
|
|
10878
10926
|
activeFile = null;
|
|
10879
10927
|
activeDir = null;
|
|
@@ -10888,6 +10936,11 @@ function excludeTagFor(workflowName) {
|
|
|
10888
10936
|
return excludeTagOf(excludeFieldsFor(workflowName));
|
|
10889
10937
|
}
|
|
10890
10938
|
|
|
10939
|
+
// src/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.ts
|
|
10940
|
+
import { writeFileSync } from "node:fs";
|
|
10941
|
+
import { tmpdir as tmpdir2 } from "node:os";
|
|
10942
|
+
import { join as join3 } from "node:path";
|
|
10943
|
+
|
|
10891
10944
|
// src/shortcuts/workflow/operations/todoSmartConvert/todoListRows.ts
|
|
10892
10945
|
var DISPLAY_ROW_FIELDS = [
|
|
10893
10946
|
// 定位键
|
|
@@ -11638,18 +11691,19 @@ function isExpiringTodayRow(row, now = Date.now()) {
|
|
|
11638
11691
|
if (row.overTime) return false;
|
|
11639
11692
|
return isExpiringTodayUserOverTime(row.userOverTime, now);
|
|
11640
11693
|
}
|
|
11641
|
-
function selectPriorityRows(rows) {
|
|
11694
|
+
function selectPriorityRows(rows, enabledRules) {
|
|
11695
|
+
const rules = enabledRules ?? /* @__PURE__ */ new Set(["overdue", "levelFallback"]);
|
|
11642
11696
|
let maxLevel = 0;
|
|
11643
11697
|
for (const row of rows) {
|
|
11644
11698
|
if (row.requestLevel > maxLevel) maxLevel = row.requestLevel;
|
|
11645
11699
|
}
|
|
11646
|
-
const targetLevel = maxLevel >= 2 ? 2 : maxLevel >= 1 ? 1 : void 0;
|
|
11700
|
+
const targetLevel = rules.has("levelFallback") && maxLevel >= 2 ? 2 : rules.has("levelFallback") && maxLevel >= 1 ? 1 : void 0;
|
|
11647
11701
|
const selected = [];
|
|
11648
11702
|
let overdueCount = 0;
|
|
11649
11703
|
let levelCount = 0;
|
|
11650
11704
|
let bothCount = 0;
|
|
11651
11705
|
for (const row of rows) {
|
|
11652
|
-
const overdue = isOverdueRow(row);
|
|
11706
|
+
const overdue = rules.has("overdue") && isOverdueRow(row);
|
|
11653
11707
|
const byLevel = targetLevel !== void 0 && row.requestLevel >= targetLevel;
|
|
11654
11708
|
if (overdue) overdueCount += 1;
|
|
11655
11709
|
if (byLevel) levelCount += 1;
|
|
@@ -11779,7 +11833,10 @@ function runGroup(args) {
|
|
|
11779
11833
|
const { rawCount, rows, duplicateCount, unreadableCount } = readItems(args.items);
|
|
11780
11834
|
const groupBy = readGroupBy(args.groupBy);
|
|
11781
11835
|
const topN = readTopN(args.topN);
|
|
11782
|
-
const
|
|
11836
|
+
const pgConfig = generalRules()?.priorityGroup ?? null;
|
|
11837
|
+
const pgTitle = pgConfig?.title?.trim() || PRIORITY_GROUP_TITLE;
|
|
11838
|
+
const pgRules = new Set(pgConfig?.rules ?? ["overdue", "levelFallback"]);
|
|
11839
|
+
const priority = selectPriorityRows(rows, pgRules);
|
|
11783
11840
|
const priorityRows = sortPriorityRows(priority.rows);
|
|
11784
11841
|
const restRows = rows;
|
|
11785
11842
|
const buckets = /* @__PURE__ */ new Map();
|
|
@@ -11809,7 +11866,7 @@ function runGroup(args) {
|
|
|
11809
11866
|
const groups = priorityRows.length > 0 && groupBy === "workflow" ? [{
|
|
11810
11867
|
id: PRIORITY_GROUP_ID,
|
|
11811
11868
|
topPriority: true,
|
|
11812
|
-
title:
|
|
11869
|
+
title: pgTitle,
|
|
11813
11870
|
count: priorityRows.length,
|
|
11814
11871
|
requestDatas: priorityRows.map((row) => toRequestData(row)),
|
|
11815
11872
|
stats: statsOf(priorityRows)
|
|
@@ -11835,7 +11892,7 @@ function runGroup(args) {
|
|
|
11835
11892
|
if (priorityRows.length > 0 && groupBy === "workflow") {
|
|
11836
11893
|
const levelText = priority.targetLevel === 2 ? "\u7D27\u6025\uFF08requestLevel=2\uFF09" : priority.targetLevel === 1 ? "\u91CD\u8981\uFF08requestLevel=1\uFF1B\u672C\u6B21\u65E0 2 \u7EA7\u6570\u636E\uFF0C\u5DF2\u6309\u89C4\u5219\u964D\u7EA7\u53D6 1\uFF0C0 \u7EA7\u4E0D\u53D6\uFF09" : "\u65E0\u7B49\u7EA7\uFF08\u672C\u6B21\u6574\u6279\u6CA1\u6709 \u22651 \u7EA7\u7684\u6761\u76EE\uFF0C\u53EA\u6309\u8D85\u65F6\u7B5B\uFF09";
|
|
11837
11894
|
warnings.push(
|
|
11838
|
-
`\u300C${
|
|
11895
|
+
`\u300C${pgTitle}\u300D\u7B5B\u51FA ${priorityRows.length} \u6761\uFF1A\u8D85\u65F6 ${priority.overdueCount} \u6761 / \u7B49\u7EA7\u547D\u4E2D ${priority.levelCount} \u6761\uFF08\u4E24\u8005\u90FD\u6EE1\u8DB3 ${priority.bothCount} \u6761\uFF09\uFF0C\u7B49\u7EA7\u53E3\u5F84=${levelText}\uFF1B\u8FD9 ${priorityRows.length} \u6761\u540C\u65F6\u4FDD\u7559\u5728\u5404\u81EA\u5DE5\u4F5C\u6D41\u5206\u7EC4\u4E2D\uFF08\u53E0\u52A0\u89C6\u56FE\uFF1A\u03A3count \u4F1A\u5927\u4E8E totalCount\uFF0CtotalCount \u6309\u53BB\u91CD\u6761\u6570\u8BA1 = ${rows.length}\uFF09`
|
|
11839
11896
|
);
|
|
11840
11897
|
} else if (priorityRows.length === 0 && groupBy === "workflow") {
|
|
11841
11898
|
warnings.push(
|
|
@@ -11900,7 +11957,7 @@ async function collectRawTodos(args, env) {
|
|
|
11900
11957
|
const plannedPages = Math.max(1, Math.min(Math.ceil(limit / pageSize), MAX_FETCH_PAGES));
|
|
11901
11958
|
const listEnv = guardListOnlyHost(env);
|
|
11902
11959
|
const searchArgs = { category };
|
|
11903
|
-
for (const key of ["tabid", "tabName", "subCategory", "workflow", "creator", "requestName", "receiveTime", "requestLevel"]) {
|
|
11960
|
+
for (const key of ["tabid", "tabName", "subCategory", "isremarks", "workflow", "creator", "requestName", "receiveTime", "requestLevel"]) {
|
|
11904
11961
|
const value = args[key];
|
|
11905
11962
|
if (value !== void 0 && value !== null && value !== "") searchArgs[key] = value;
|
|
11906
11963
|
}
|
|
@@ -11909,6 +11966,13 @@ async function collectRawTodos(args, env) {
|
|
|
11909
11966
|
);
|
|
11910
11967
|
if (!explicitTab) searchArgs.tabid = DEFAULT_TABID2;
|
|
11911
11968
|
const warnings = [];
|
|
11969
|
+
if (searchArgs.isremarks === void 0) {
|
|
11970
|
+
const defaultIsremarks = generalRules()?.identityFilter?.defaultIsremarks?.trim();
|
|
11971
|
+
if (defaultIsremarks) {
|
|
11972
|
+
searchArgs.isremarks = defaultIsremarks;
|
|
11973
|
+
warnings.push(`\u5DF2\u6309\u901A\u7528\u89C4\u5219\u9ED8\u8BA4\u6392\u9664\u6284\u9001\u7C7B\u8EAB\u4EFD\uFF08isremarks=${defaultIsremarks}\uFF09\uFF1B\u5982\u9700\u5305\u542B\u6284\u9001\uFF0C\u8BF7\u5728\u63D0\u793A\u8BCD\u4E2D\u8BF4\u660E`);
|
|
11974
|
+
}
|
|
11975
|
+
}
|
|
11912
11976
|
if (cappedFrom !== void 0) {
|
|
11913
11977
|
warnings.push(
|
|
11914
11978
|
`\u5355\u6B21\u6700\u591A\u53EA\u80FD\u53D6 ${MAX_FETCH_LIMIT} \u6761\uFF08${MAX_FETCH_PAGES} \u6B21\u8BF7\u6C42 \xD7 ${FETCH_PAGE_SIZE} \u6761\uFF09\uFF0C\u4F60\u8981\u6C42\u7684 ${cappedFrom} \u6761\u5DF2\u6309\u4E0A\u9650 ${MAX_FETCH_LIMIT} \u6761\u5904\u7406\uFF1B\u5982\u9700\u8986\u76D6\u66F4\u591A\uFF0C\u8BF7\u7F29\u5C0F\u7B5B\u9009\u6761\u4EF6\uFF08\u5982\u6309\u5DE5\u4F5C\u6D41\u3001\u65F6\u95F4\u8303\u56F4\u5206\u6279\uFF09\u540E\u518D\u6C47\u603B`
|
|
@@ -11933,6 +11997,19 @@ async function collectRawTodos(args, env) {
|
|
|
11933
11997
|
{ ...searchArgs, current: pageNo, pageSize },
|
|
11934
11998
|
"list"
|
|
11935
11999
|
);
|
|
12000
|
+
const isremarks = String(searchArgs.isremarks ?? "").trim();
|
|
12001
|
+
if (isremarks !== "") {
|
|
12002
|
+
query.params = { ...query.params || {}, isremarks };
|
|
12003
|
+
}
|
|
12004
|
+
if (process.env.WEAVER_WORK_CLI_DUMP_LIST_BODY) {
|
|
12005
|
+
try {
|
|
12006
|
+
writeFileSync(
|
|
12007
|
+
join3(tmpdir2(), `weaver-list-body-page${pageNo}.json`),
|
|
12008
|
+
JSON.stringify({ path: listPath, body: query }, null, 2)
|
|
12009
|
+
);
|
|
12010
|
+
} catch {
|
|
12011
|
+
}
|
|
12012
|
+
}
|
|
11936
12013
|
const response = await listEnv.host.workflowRequest({
|
|
11937
12014
|
method: "POST",
|
|
11938
12015
|
path: listPath,
|
|
@@ -12681,6 +12758,11 @@ function requestMaxCharsFor(args, workflowName) {
|
|
|
12681
12758
|
500
|
|
12682
12759
|
);
|
|
12683
12760
|
}
|
|
12761
|
+
function explicitMaxCharsFor(args, workflowName) {
|
|
12762
|
+
const explicit = args.summaryMaxChars;
|
|
12763
|
+
if (explicit === void 0 || explicit === null || String(explicit).trim() === "") return void 0;
|
|
12764
|
+
return requestMaxCharsFor(args, workflowName);
|
|
12765
|
+
}
|
|
12684
12766
|
function requestPromptFor(workflowName) {
|
|
12685
12767
|
return (activeRuleFor(workflowName)?.requestSummaryPrompt ?? "").trim();
|
|
12686
12768
|
}
|
|
@@ -12882,7 +12964,7 @@ async function runSummaryContext(args, env, prefetched) {
|
|
|
12882
12964
|
const cached = summaryCache.get(
|
|
12883
12965
|
row.requestId,
|
|
12884
12966
|
row.lastFeedBackDateTime,
|
|
12885
|
-
|
|
12967
|
+
explicitMaxCharsFor(args, name),
|
|
12886
12968
|
promptTagOf(requestPromptFor(name)),
|
|
12887
12969
|
materialTagOfRow(row.requestId, row.lastFeedBackDateTime)
|
|
12888
12970
|
);
|
|
@@ -13101,7 +13183,7 @@ async function runSummary(args, env) {
|
|
|
13101
13183
|
const cached = summaryCache.get(
|
|
13102
13184
|
row.requestId,
|
|
13103
13185
|
row.lastFeedBackDateTime,
|
|
13104
|
-
|
|
13186
|
+
explicitMaxCharsFor(args, name),
|
|
13105
13187
|
promptTagOf(requestPromptFor(name)),
|
|
13106
13188
|
materialTagOfRow(row.requestId, row.lastFeedBackDateTime)
|
|
13107
13189
|
);
|
|
@@ -13601,6 +13683,7 @@ var inputSchema = schemaOf({
|
|
|
13601
13683
|
tabid: { type: "string" },
|
|
13602
13684
|
tabName: { type: "string" },
|
|
13603
13685
|
subCategory: { type: "string" },
|
|
13686
|
+
isremarks: { type: "string", description: "\u5907\u6CE8\u7B5B\u9009\uFF08getTodoListData params.isremarks\uFF09\uFF0C\u591A\u4E2A\u6570\u5B57\u7528\u82F1\u6587\u9017\u53F7\u62FC\u63A5\uFF0C\u4EC5\u4F5C\u7528\u4E8E\u672C\u6C47\u603B\u53D6\u6570" },
|
|
13604
13687
|
workflow: { type: "array", items: { type: "string" } },
|
|
13605
13688
|
creator: { type: "string" },
|
|
13606
13689
|
requestName: { type: "string" },
|