dsh-line-bot 0.8.2 → 0.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.3
4
+ - 表情包提示詞更明確:貼圖只能從已安裝的 dsh-meme 圖庫挑選,不能自行產生、上傳、貼外部網址或捏造路徑;清單沒有合適的圖就不要硬挑,並告知使用者可到 dsh-meme 加入新圖。
5
+ - 模型被問到「貼圖哪裡來的」時,會照實回答 dsh-meme。
6
+
3
7
  ## 0.8.2
4
8
  - 送出的圖片改存到 `<DSH_HOME>/line-bot/media/`(含索引,保留 90 天),不再只放記憶體、不再 1 小時過期;LINE 之後才打開聊天室也能抓到。
5
9
  - 圖片回應改 `cache-control: public, max-age=31536000, immutable`,讓 LINE/CDN 快取。
package/lib/host.mjs CHANGED
@@ -43,7 +43,7 @@ const { createMemeSource } = memeSourceMod
43
43
  const { createStickerImages } = stickerImageMod
44
44
  const { chunkText, clip, inQuietWindow, jsonFail, jsonOk, maskSecret, readJsonBody, safeArray, sleep } = utilMod
45
45
 
46
- export const VERSION = '0.8.2'
46
+ export const VERSION = '0.8.3'
47
47
 
48
48
  // 環境變數提供的 Cloudflare API Token(方便用 shell 注入、不用把 token 寫進設定檔)。
49
49
  // 設定檔裡的 token 優先;兩者都沒有時才用環境變數。
@@ -1129,14 +1129,17 @@ export async function create({ ctx, config: pluginConfig, logger: upstream }) {
1129
1129
  const lines = (sample || []).filter((item) => String(item.caption || '').trim()).slice(0, 20)
1130
1130
  if (lines.length === 0) return ''
1131
1131
  return [
1132
- '【表情包】你的圖庫(dsh-meme)裡有這些圖,編號.情緒|描述:',
1132
+ '【表情包】你的貼圖只能從已安裝的 dsh-meme 外掛圖庫取得。下面是這一輪可用的清單(編號.情緒|描述):',
1133
1133
  lines.map((item, index) => `${index + 1}. ${item.tag || 'daily'}|${String(item.caption || '').trim()}`).join('\n'),
1134
1134
  '想配圖時,在回覆最後加上 [[meme:#編號]](例如 [[meme:#3]])。規則:',
1135
- '- 只能用 [[meme:#編號]]。不要呼叫 send_meme(LINE 沒有連到它,呼叫了也不會送出圖片),也不要寫 <meme#N> 或 [表情:…] 這種格式。',
1135
+ '- 只能挑上面清單裡的編號;不要自己產生圖片、不要上傳、不要貼外部圖片網址、不要捏造檔案路徑、不要用 markdown 圖片語法。',
1136
+ '- 清單裡沒有適合的圖就不要硬挑,改用文字;想新增圖片請主人到 dsh-meme 的設定/圖庫頁加入,你這邊不能新增圖庫內容。',
1137
+ '- 不要呼叫 send_meme(LINE 沒有連到它,呼叫了也不會送出圖片),也不要寫 <meme#N> 或 [表情:…] 這種格式。',
1136
1138
  '- 標記放最後;不要在旁邊解釋圖片內容,也不要說「我傳了貼圖」。',
1137
1139
  '- 只回圖也可以:整則回覆只放標記。',
1138
1140
  `- 一次最多 ${memeMaxPerReply()} 張,編號必須是 1–${lines.length}。`,
1139
1141
  '- 氣氛明顯(開心、無語、害羞、想睡、被逗笑)才用;一般聊天、正事、難過時不要用;對方明確要表情包時就用。',
1142
+ '- 如果主人問「你的貼圖哪裡來的」,照實說:從 dsh-meme 圖庫挑的。',
1140
1143
  publicBaseSync() ? '' : '(目前沒有公開網址,圖片暫時送不出去。)',
1141
1144
  ].filter(Boolean).join('\n')
1142
1145
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-line-bot",
3
- "version": "0.8.2",
3
+ "version": "0.8.3",
4
4
  "description": "把 LINE 官方帳號(Messaging API)接進 DeepSeek Harness 的插件:內建 Cloudflare Tunnel、人設選擇(大肥魚或插件自訂)、主動傳訊與完整設定面板。",
5
5
  "type": "module",
6
6
  "main": "index.js",