@dcrays/dcgchat-test 0.3.10 → 0.3.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcrays/dcgchat-test",
3
- "version": "0.3.10",
3
+ "version": "0.3.12",
4
4
  "type": "module",
5
5
  "description": "OpenClaw channel plugin for 书灵墨宝 (WebSocket)",
6
6
  "main": "index.ts",
package/src/bot.ts CHANGED
@@ -301,8 +301,8 @@ export async function handleDcgchatMessage(msg: InboundMessage, accountId: strin
301
301
  }
302
302
  })
303
303
  } else if (interruptCommand.includes(text?.trim())) {
304
- safeSendFinal('abort')
305
304
  dcgLogger(`interrupt command: ${text}`)
305
+ safeSendFinal('abort')
306
306
  sendText('会话已终止', outboundCtx)
307
307
  sessionStreamSuppressed.add(effectiveSessionKey)
308
308
  const runId = activeRunIdBySessionKey.get(effectiveSessionKey)
package/src/channel.ts CHANGED
@@ -183,9 +183,9 @@ export const dcgchatPlugin: ChannelPlugin<ResolvedDcgchatAccount> = {
183
183
  }
184
184
  },
185
185
  sendMedia: async (ctx) => {
186
- const sk = getCurrentSessionKey()
187
- const msgCtx = getEffectiveMsgParams('sk')
188
- await sendDcgchatMedia({ sessionKey: sk ?? '', mediaUrl: ctx.mediaUrl ?? '' })
186
+ const msgCtx = getEffectiveMsgParams(ctx.to)
187
+ dcgLogger(`channel sendMedia to ${ctx.to} ${ctx.mediaUrl?.slice(0, 50)}`)
188
+ await sendDcgchatMedia({ sessionKey: ctx.to ?? '', mediaUrl: ctx.mediaUrl ?? '' })
189
189
  return {
190
190
  channel: "dcgchat-test",
191
191
  messageId: `dcg-${Date.now()}`,