dsh-qq-affinity 1.0.0 → 1.5.6

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/analyze.js CHANGED
@@ -11,8 +11,9 @@
11
11
  */
12
12
 
13
13
  import { score as clampScore, clamp, isAiAuthored, formatTime, styleReply } from './util.js'
14
- import { lastInbound, measure, renderTranscript, rowsForPerson, GROUP_UNMENTIONED_WEIGHT } from './features.js'
14
+ import { lastInbound, measure, renderTranscript, rowsForPerson, groupFeatures, GROUP_UNMENTIONED_WEIGHT } from './features.js'
15
15
  import { completeText, extractJson, routeFor } from './llm.js'
16
+ import { resolvePersona } from './personas.js'
16
17
  import { collectImageBlocks, imagesOf, modelSeesImages } from './vision.js'
17
18
 
18
19
  /** The shared persona instruction for both judgements. */
@@ -26,6 +27,16 @@ const SYSTEM = [
26
27
  '4. 记录里标记为「AI代笔」的消息不是使用者本人的表达,禁止用它们推断使用者对对方的态度。',
27
28
  ].join('\n')
28
29
 
30
+ /** A system prompt for the group-room analysis: same discipline, different object. */
31
+ const GROUP_SYSTEM = [
32
+ '你是群聊氛围分析助手,只输出 JSON,不输出解释、前言或 Markdown 代码围栏。',
33
+ '纪律:',
34
+ '1. 只依据给出的消息和统计推断,不编造记录之外的事件、身份或关系。',
35
+ '2. 话题、氛围、成员角色都必须有证据:引用具体的发言片段或统计数字。',
36
+ '3. 不评价群成员的人品、外貌、职业、学历、所在地;只描述可观察到的沟通行为。',
37
+ '4. 不确定就降低 confidence,不要为了显得聪明而编。',
38
+ ].join('\n')
39
+
29
40
  /** Whether the user allows images to leave the machine, and whether the model can read them. */
30
41
  function visionAllowed(store) {
31
42
  return store.state.settings.visionImages !== false
@@ -346,16 +357,28 @@ export async function writeAutoReply(ctx, store, request) {
346
357
  excludeAdopted: true,
347
358
  maxChars: 2500,
348
359
  })
360
+ // The configured voice. With the default persona the reply simply imitates me;
361
+ // with a preset it is written in that character's voice instead.
362
+ const persona = resolvePersona(store.state.replyPersonas, store.state.care[uin]?.persona)
363
+ const inCharacter = persona.prompt !== ''
364
+ // A single huge message must not become a huge request: the quoted line was the
365
+ // one part of this prompt with no size bound.
366
+ const inbound = clampInbound(newest.text)
349
367
 
350
368
  const prompt = [
351
- `「${targetName}」刚给我发了这条消息,请以我的身份回一句。`,
352
- `[${new Date(newest.ts).toLocaleString('zh-CN')}] ${targetName}:${newest.text}`,
369
+ inCharacter
370
+ ? `「${targetName}」刚给我发了这条消息。请以「${persona.name}」的身份和口吻回一句。`
371
+ : `「${targetName}」刚给我发了这条消息,请以我的身份回一句。`,
372
+ `[${new Date(newest.ts).toLocaleString('zh-CN')}] ${targetName}:${inbound.text}`,
353
373
  '',
374
+ ...(inCharacter
375
+ ? ['【说话人设】', `你是「${persona.name}」,请完全用这个人设说话:`, persona.prompt, '', '人设优先于「我平时说话的样子」:下面那段只用来了解聊什么,不要照搬我的用词习惯,也不要提到自己是 AI 或有人在设定你。', '']
376
+ : []),
354
377
  '【最近的对话】',
355
378
  recent.text === '' ? '(无)' : recent.text,
356
379
  '',
357
- '【我平时说话的样子(只作语气参考,不要复述内容)】',
358
- input.text === '' ? '(没有足够样本,按普通口语回)' : input.text,
380
+ inCharacter ? '【我平时说话的样子(只用来了解聊天内容与节奏,不要模仿我的语气)】' : '【我平时说话的样子(只作语气参考,不要复述内容)】',
381
+ input.text === '' ? '(没有足够样本,按人设的口吻回)' : input.text,
359
382
  '',
360
383
  '【关系背景】',
361
384
  stored === undefined
@@ -368,19 +391,30 @@ export async function writeAutoReply(ctx, store, request) {
368
391
  '【要求】',
369
392
  `1. 只输出这一句要发出去的话本身,不要引号、不要「我:」、不要任何解释或换行。`,
370
393
  `2. 长度不超过 ${request.maxChars ?? 60} 个字,宁短勿长。`,
371
- '3. 像真人打字:口语、自然。不要用任何 emoji 或表情符号。',
394
+ `3. 像真人打字:口语、自然。不要用任何 emoji 或表情符号。`,
372
395
  '4. 不要用句号、逗号、顿号、分号、冒号,需要断句就空一格;句尾不要加句号。',
373
396
  '5. 不要问超过一个问题,不要连着寒暄,不要用「哈哈」「亲」这类套话开头。',
374
- '5. 如果对方说的是坏消息、求助或情绪问题,先接住情绪,不要急着给建议。',
375
- '6. 不要承诺时间、地点、金额这类具体事项 —— 这些需要我自己确认。',
397
+ '6. 如果对方说的是坏消息、求助或情绪问题,先接住情绪,不要急着给建议。',
398
+ '7. 不要承诺时间、地点、金额这类具体事项 —— 这些需要我自己确认。',
399
+ inCharacter ? '8. 保持人设,但不要写动作描写、不要用括号、不要说「(微笑)」这类旁白。' : '',
376
400
  ].filter(line => line !== '').join('\n')
377
401
 
378
402
  // The message being answered may itself be a picture or a sticker.
379
403
  const vision = await gatherVision(ctx, store, [newest], { who: 'them', limit: 2, signal: request.signal })
380
404
 
405
+ // Last line of defence: whatever the inputs did, one call stays bounded.
406
+ const fullPrompt = capPrompt(`${prompt}${visionBlock(vision)}`)
407
+ if (request.stats !== null && typeof request.stats === 'object') {
408
+ request.stats.promptChars = fullPrompt.length
409
+ request.stats.inboundChars = String(newest.text ?? '').length
410
+ request.stats.inboundOmitted = inbound.omitted
411
+ }
412
+
381
413
  const answer = await completeText(ctx, {
382
- system: '你替使用者回一条微信/QQ 消息。只输出要发送的正文,不要任何前后缀。',
383
- prompt: `${prompt}${visionBlock(vision)}`,
414
+ system: inCharacter
415
+ ? `你现在是「${persona.name}」,正在替使用者回一条 QQ 消息。只输出要发送的正文,不要任何前后缀。`
416
+ : '你替使用者回一条微信/QQ 消息。只输出要发送的正文,不要任何前后缀。',
417
+ prompt: fullPrompt,
384
418
  images: vision.blocks,
385
419
  maxTokens: 800,
386
420
  temperature: 0.85,
@@ -408,6 +442,89 @@ export async function writeAutoReply(ctx, store, request) {
408
442
  return text
409
443
  }
410
444
 
445
+ /** How much of one inbound message is worth sending to the model. */
446
+ const MAX_INBOUND_CHARS = 500
447
+ /** Hard ceiling for the whole auto-reply prompt, in characters. */
448
+ const MAX_PROMPT_CHARS = 6000
449
+
450
+ /** Shorten one inbound message, keeping the start (the gist is almost always there). */
451
+ function clampInbound(text) {
452
+ const full = String(text ?? '')
453
+ if (full.length <= MAX_INBOUND_CHARS) return { text: full, omitted: 0 }
454
+ return {
455
+ text: `${full.slice(0, MAX_INBOUND_CHARS)}…(后面还有 ${full.length - MAX_INBOUND_CHARS} 字,已省略)`,
456
+ omitted: full.length - MAX_INBOUND_CHARS,
457
+ }
458
+ }
459
+
460
+ /**
461
+ * Keep a prompt under a hard size, whatever the inputs did.
462
+ *
463
+ * The head carries the instruction and the newest message; the tail carries the
464
+ * output format. The middle is what gets dropped.
465
+ */
466
+ function capPrompt(prompt, limit = MAX_PROMPT_CHARS) {
467
+ if (prompt.length <= limit) return prompt
468
+ const headSize = Math.floor(limit * 0.6)
469
+ const tailSize = limit - headSize
470
+ return `${prompt.slice(0, headSize)}\n\n(中间 ${prompt.length - limit} 字已省略,避免一次请求过大)\n\n${prompt.slice(-tailSize)}`
471
+ }
472
+
473
+ /** Canned fallbacks, used when the model cannot phrase a brush-off in time. */
474
+ const EXCUSE_FALLBACKS = [
475
+ '我这边有点事要处理 晚点再聊',
476
+ '先忙一下 回头找你',
477
+ '手上还有活没弄完 等下说',
478
+ ]
479
+
480
+ /**
481
+ * Phrase one polite brush-off, for when the hourly reply cap is reached.
482
+ *
483
+ * Sending this instead of going silent is the difference between "busy" and
484
+ * "ignoring you": the conversation ends on a warm note, and no promise about a
485
+ * specific time is made, so nothing later has to be explained.
486
+ */
487
+ export async function writeCapExcuse(ctx, store, request) {
488
+ const targetName = nameOf(store, request.uin)
489
+ const persona = resolvePersona(store.state.replyPersonas, store.state.care[request.uin]?.persona)
490
+ const inCharacter = persona.prompt !== ''
491
+ const limit = request.maxChars ?? 40
492
+ const prompt = [
493
+ `「${targetName}」刚给我发了消息,但我现在没法继续聊,需要礼貌地把这次对话收个尾。`,
494
+ '',
495
+ ...(inCharacter ? ['【说话人设】', `你是「${persona.name}」,用这个人设的口吻说话:`, persona.prompt, ''] : []),
496
+ '【要求】',
497
+ '1. 只输出这一句要发出去的话,不要引号、不要解释。',
498
+ `2. 不超过 ${Math.min(limit, 30)} 个字,越短越好。`,
499
+ '3. 找一个体面的理由:手头有事、要下线、暂时不方便,不要编具体的谎话(别提生病、出事这类)。',
500
+ '4. 不要承诺具体时间(别说「十分钟后」「晚上八点」),也不要说「马上回来」。',
501
+ '5. 不用道歉太多次,一次「抱歉」或「不好意思」就够;语气自然、不生硬。',
502
+ '6. 不要用 emoji、不要用引号、句尾不加句号,需要断句就空一格。',
503
+ ].filter(line => line !== '').join('\n')
504
+
505
+ const answer = await completeText(ctx, {
506
+ system: inCharacter
507
+ ? `你现在是「${persona.name}」,要礼貌地推辞一次聊天。只输出要发送的正文。`
508
+ : '你要礼貌地推辞一次聊天,替使用者回一句话。只输出要发送的正文。',
509
+ prompt,
510
+ maxTokens: 300,
511
+ temperature: 0.9,
512
+ signal: request.signal,
513
+ purpose: 'qq-affinity-excuse',
514
+ })
515
+
516
+ let text = styleReply(answer)
517
+ const limitChars = Math.min(limit, 30)
518
+ if (text.length > limitChars) text = `${styleReply(text.slice(0, limitChars - 1)).replace(/\s+$/, '')}…`
519
+ if (text === '') throw new Error('模型没有给出可用的推辞内容。')
520
+ return text
521
+ }
522
+
523
+ /** One of the canned brush-offs, for when the model call fails. */
524
+ export function cannedExcuse(seed = Date.now()) {
525
+ return EXCUSE_FALLBACKS[Math.abs(Math.round(seed)) % EXCUSE_FALLBACKS.length]
526
+ }
527
+
411
528
  /**
412
529
  * Produce three candidate replies to the newest inbound message.
413
530
  * @param {object} ctx
@@ -908,3 +1025,211 @@ export async function analyzePersona(ctx, store, uin, options = {}) {
908
1025
  return store.savePersona(uin, result)
909
1026
  }
910
1027
 
1028
+ /** One line per speaker, for the prompt: who talks, how much, how they talk. */
1029
+ function speakerBlock(features, { limit = 12 } = {}) {
1030
+ return features.speakers.slice(0, limit).map((speaker, index) => {
1031
+ const label = speaker.name === '' ? `QQ ${speaker.uin}` : `${speaker.name}(${speaker.uin})`
1032
+ const role = speaker.uin === (features.selfUin ?? '') ? '就是我' : ''
1033
+ return `${index + 1}. ${label} ${role}:${speaker.messages} 条(占 ${Math.round(speaker.share * 100)}%),`
1034
+ + `平均 ${speaker.avgChars} 字,提问率 ${Math.round(speaker.questionRatio * 100)}%,表情密度 ${speaker.decorationPerMessage}`
1035
+ }).join('\n')
1036
+ }
1037
+
1038
+ /** Render the hour histogram as a short readable line. */
1039
+ function hourBlock(hours) {
1040
+ const peak = hours.map((count, hour) => ({ hour, count })).filter(entry => entry.count > 0)
1041
+ if (peak.length === 0) return '(无数据)'
1042
+ return peak
1043
+ .sort((left, right) => right.count - left.count)
1044
+ .slice(0, 5)
1045
+ .map(entry => `${String(entry.hour).padStart(2, '0')}:00 有 ${entry.count} 条`)
1046
+ .join(';')
1047
+ }
1048
+
1049
+ /**
1050
+ * Analyse a whole group as a room: what it talks about, how it feels, who holds it up.
1051
+ *
1052
+ * Different question from {@link scorePerson}: a group has no single "other
1053
+ * person", so the interesting facts are the room's topics, mood, rhythm and the
1054
+ * few people who carry it.
1055
+ * @param {object} ctx
1056
+ * @param {import('./store.js').Store} store
1057
+ * @param {string} conversationId
1058
+ * @param {{ force?: boolean, signal?: AbortSignal }} [options]
1059
+ */
1060
+ export async function analyzeGroup(ctx, store, conversationId, options = {}) {
1061
+ const conversation = store.conversation(conversationId)
1062
+ if (conversation === undefined) throw new Error('找不到这个对话。')
1063
+ if (conversation.kind !== 'group') throw new Error('只有群聊才有群聊分析。')
1064
+ const rows = store.messages(conversationId).sort((a, b) => a.ts - b.ts)
1065
+ if (rows.length < 20) {
1066
+ throw new Error(`这个群只有 ${rows.length} 条记录,至少需要 20 条才能看出话题和氛围。`)
1067
+ }
1068
+
1069
+ const selfUin = String(store.state.settings.selfUin ?? '')
1070
+ const groupName = conversation.title === '' ? `群 ${conversation.groupUin}` : conversation.title
1071
+ const features = groupFeatures(rows, selfUin)
1072
+ features.selfUin = selfUin
1073
+ const fingerprint = fingerprintOf(rows)
1074
+ const previous = store.groupProfile(conversationId)
1075
+
1076
+ // Same evidence as last time: reuse the stored profile instead of paying twice.
1077
+ if (options.force !== true && previous !== undefined && previous.basedOn?.fingerprint === fingerprint) {
1078
+ return { ...previous, reused: true }
1079
+ }
1080
+
1081
+ const delta = options.force === true ? undefined : deltaRows(rows, previous)
1082
+ const usage = { inputTokens: 0, outputTokens: 0, calls: 0 }
1083
+ const incremental = delta !== undefined && delta.length > 0
1084
+ const window = incremental ? delta : rows
1085
+ // A room moves fast: cap the transcript harder than a two-person chat.
1086
+ const transcript = renderTranscript(window, { targetUin: '', targetName: '群友', maxChars: 9000 })
1087
+
1088
+ const parts = [
1089
+ `请分析这个 QQ 群「${groupName}」的聊天内容与氛围。`,
1090
+ ...(incremental ? ['', '【上次的群聊分析(供参考,只在新内容出现时修改)】', briefOfGroup(previous)] : []),
1091
+ '',
1092
+ '【群的基本统计】',
1093
+ `总消息 ${features.totalMessages} 条,说话的人 ${features.activeSpeakers} 个(说过 2 条以上),前三名占了 ${Math.round(features.topThreeShare * 100)}% 的发言`,
1094
+ `我(${selfUin === '' ? '未设置 QQ' : `QQ ${selfUin}`})在群里说了 ${features.myMessages} 条(占 ${Math.round(features.myShare * 100)}%),被 @ ${features.atMeMessages} 次`,
1095
+ `覆盖 ${features.spanDays} 天,活跃 ${features.activeDays} 天,平均每天 ${features.messagesPerActiveDay} 条`,
1096
+ `平均每条 ${features.avgChars} 字,提问率 ${Math.round(features.questionRatio * 100)}%,表情密度 ${features.decorationPerMessage},含链接比例 ${Math.round(features.linkShare * 100)}%`,
1097
+ `连续聊起来的段落 ${features.bursts} 段,最快的一次间隔 ${features.fastestReplySeconds} 秒`,
1098
+ `最活跃的时段:${hourBlock(features.hourHistogram)}`,
1099
+ '',
1100
+ '【说话人分布】',
1101
+ speakerBlock(features),
1102
+ '',
1103
+ incremental ? `【新增的 ${window.length} 条消息】` : '【对话样本(较近的部分)】',
1104
+ transcript.text === '' ? '(无)' : transcript.text,
1105
+ '',
1106
+ '【要回答的问题】',
1107
+ '1. 这个群主要在聊什么?给出 3-6 个话题,按占比从高到低,每个话题要说明依据(引用发言片段)。',
1108
+ '2. 氛围如何?用一句标签描述(例如「熟人局的日常碎碎念」「工作群但气氛松」),并从四个维度打分 0-100:',
1109
+ ' energy(热闹程度)、warmth(亲密度/放松程度)、order(话题有序还是东一句西一句)、seriousness(正经事占比)。',
1110
+ '3. 谁在撑住这个群?给出核心成员(最多 5 个),说明他们各自扮演什么角色(话题发起、气氛担当、信息提供、潜水)、以及证据。',
1111
+ '4. 群里的默契和雷区:有什么默认规矩(例如刷屏会被制止、深夜不聊工作)?',
1112
+ '5. 如果我要在这个群里说话,怎么开口更容易被接住?给 2-4 条具体建议。',
1113
+ '',
1114
+ '【输出格式】',
1115
+ JSON.stringify({
1116
+ summary: '一句话概括这个群',
1117
+ topics: [{ label: '话题名', share: 0.3, evidence: '引用一句原话' }],
1118
+ atmosphere: {
1119
+ label: '一句氛围标签',
1120
+ energy: 60,
1121
+ warmth: 55,
1122
+ order: 45,
1123
+ seriousness: 30,
1124
+ evidence: ['引用一句原话'],
1125
+ },
1126
+ coreMembers: [{ uin: '123456', name: '昵称', role: '话题发起', evidence: '引用一句原话' }],
1127
+ norms: ['群里的默认规矩'],
1128
+ cautions: ['在这个群说话要小心的点'],
1129
+ howToJoin: ['怎么开口更容易被接住'],
1130
+ confidence: 0.5,
1131
+ }, null, 2),
1132
+ '',
1133
+ '话题的 share 是占比(0-1,加起来接近 1)。核心成员的 uin 必须来自上面说话人列表里的 QQ 号,不要编造。',
1134
+ ]
1135
+
1136
+ const vision = await gatherVision(ctx, store, window, { who: 'both', limit: 3, signal: options.signal })
1137
+ parts.push(visionBlock(vision))
1138
+
1139
+ const parsed = await askForJson(ctx, {
1140
+ system: GROUP_SYSTEM,
1141
+ prompt: parts.join('\n'),
1142
+ images: vision.blocks,
1143
+ usage,
1144
+ maxTokens: 3000,
1145
+ temperature: 0.35,
1146
+ signal: options.signal,
1147
+ purpose: 'qq-affinity-group',
1148
+ })
1149
+
1150
+ const text = (value) => (typeof value === 'string' ? value.trim().slice(0, 400) : '')
1151
+ const listOf = (value, limit, slice = 200) => (Array.isArray(value)
1152
+ ? value.map(item => (typeof item === 'string' ? item.trim().slice(0, slice) : '')).filter(item => item !== '').slice(0, limit)
1153
+ : [])
1154
+ const topics = (Array.isArray(parsed.topics) ? parsed.topics : [])
1155
+ .filter(topic => topic !== null && typeof topic === 'object')
1156
+ .map(topic => ({
1157
+ label: text(topic.label).slice(0, 40),
1158
+ share: Math.round(clamp(Number(topic.share) || 0, 0, 1) * 100) / 100,
1159
+ evidence: text(topic.evidence),
1160
+ }))
1161
+ .filter(topic => topic.label !== '')
1162
+ .slice(0, 8)
1163
+ const atmosphereRaw = parsed.atmosphere !== null && typeof parsed.atmosphere === 'object' ? parsed.atmosphere : {}
1164
+ const members = (Array.isArray(parsed.coreMembers) ? parsed.coreMembers : [])
1165
+ .filter(member => member !== null && typeof member === 'object')
1166
+ .map(member => ({
1167
+ uin: String(member.uin ?? '').replace(/\D/g, ''),
1168
+ name: text(member.name).slice(0, 40),
1169
+ role: text(member.role).slice(0, 30),
1170
+ evidence: text(member.evidence),
1171
+ }))
1172
+ .filter(member => member.uin !== '' || member.name !== '')
1173
+ .slice(0, 5)
1174
+
1175
+ const result = {
1176
+ summary: text(parsed.summary),
1177
+ topics,
1178
+ atmosphere: {
1179
+ label: text(atmosphereRaw.label).slice(0, 40),
1180
+ energy: clampScore(atmosphereRaw.energy),
1181
+ warmth: clampScore(atmosphereRaw.warmth),
1182
+ order: clampScore(atmosphereRaw.order),
1183
+ seriousness: clampScore(atmosphereRaw.seriousness),
1184
+ evidence: listOf(atmosphereRaw.evidence, 4),
1185
+ },
1186
+ coreMembers: members,
1187
+ norms: listOf(parsed.norms, 6),
1188
+ cautions: listOf(parsed.cautions, 6),
1189
+ howToJoin: listOf(parsed.howToJoin, 4),
1190
+ confidence: Math.round(clamp(parsed.confidence ?? 0.5, 0, 1) * 100) / 100,
1191
+ usage: { inputTokens: usage.inputTokens, outputTokens: usage.outputTokens, calls: usage.calls },
1192
+ vision: { allowed: vision.allowed, available: vision.available, found: vision.found, used: vision.used, reason: vision.reason },
1193
+ basedOn: {
1194
+ totalMessages: features.totalMessages,
1195
+ speakers: features.activeSpeakers,
1196
+ myShare: features.myShare,
1197
+ fingerprint,
1198
+ lastTs: rows.length === 0 ? 0 : rows[rows.length - 1].ts,
1199
+ incremental,
1200
+ deltaMessages: incremental ? delta.length : 0,
1201
+ },
1202
+ }
1203
+ // Facts the model cannot count: keep them so the panel can show the room shape.
1204
+ result.stats = {
1205
+ activeSpeakers: features.activeSpeakers,
1206
+ topThreeShare: features.topThreeShare,
1207
+ myShare: features.myShare,
1208
+ atMeMessages: features.atMeMessages,
1209
+ messagesPerActiveDay: features.messagesPerActiveDay,
1210
+ activeDays: features.activeDays,
1211
+ spanDays: features.spanDays,
1212
+ peakHours: features.peakHours,
1213
+ hourHistogram: features.hourHistogram,
1214
+ avgChars: features.avgChars,
1215
+ questionRatio: features.questionRatio,
1216
+ bursts: features.bursts,
1217
+ speakers: features.speakers.slice(0, 12),
1218
+ }
1219
+ if (result.summary === '' && result.topics.length === 0) {
1220
+ throw new Error('模型没有给出可用的群聊分析内容,请重试。')
1221
+ }
1222
+ return store.saveGroupProfile(conversationId, result)
1223
+ }
1224
+
1225
+ /** Compact restatement of a stored group analysis, for an incremental run. */
1226
+ function briefOfGroup(previous) {
1227
+ if (previous === undefined) return '(无)'
1228
+ return [
1229
+ previous.summary === '' ? '' : `上次的一句话:${previous.summary}`,
1230
+ (previous.topics ?? []).length === 0 ? '' : `上次的话题:${previous.topics.map(topic => topic.label).join('、')}`,
1231
+ previous.atmosphere?.label === undefined ? '' : `上次的氛围:${previous.atmosphere.label}(热闹 ${previous.atmosphere.energy} / 温暖 ${previous.atmosphere.warmth} / 有序 ${previous.atmosphere.order} / 正经 ${previous.atmosphere.seriousness})`,
1232
+ (previous.coreMembers ?? []).length === 0 ? '' : `上次的核心成员:${previous.coreMembers.map(member => member.name || member.uin).join('、')}`,
1233
+ ].filter(text => text !== '').join('\n')
1234
+ }
1235
+