@dcrays/dcgchat-test 0.3.11 → 0.3.13

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.11",
3
+ "version": "0.3.13",
4
4
  "type": "module",
5
5
  "description": "OpenClaw channel plugin for 书灵墨宝 (WebSocket)",
6
6
  "main": "index.ts",
package/src/bot.ts CHANGED
@@ -302,6 +302,7 @@ export async function handleDcgchatMessage(msg: InboundMessage, accountId: strin
302
302
  })
303
303
  } else if (interruptCommand.includes(text?.trim())) {
304
304
  dcgLogger(`interrupt command: ${text}`)
305
+ safeSendFinal('abort')
305
306
  sendText('会话已终止', outboundCtx)
306
307
  sessionStreamSuppressed.add(effectiveSessionKey)
307
308
  const runId = activeRunIdBySessionKey.get(effectiveSessionKey)
package/src/channel.ts CHANGED
@@ -164,8 +164,9 @@ export const dcgchatPlugin: ChannelPlugin<ResolvedDcgchatAccount> = {
164
164
  dcgLogger(`channel sendText to ${ctx.to} ${ctx.text?.slice(0, 50)}`)
165
165
  } else {
166
166
  const sessionInfo = ctx.to.split(':')[1]
167
- const sessionId = sessionInfo.split('-')[0]
168
- const agentId = sessionInfo.split('-')[1]
167
+ const parts = sessionInfo.split('-')
168
+ const sessionId = parts.at(-1) ?? ''
169
+ const agentId = parts.at(-2) ?? ''
169
170
  const merged = mergeDefaultParams({
170
171
  agentId: agentId,
171
172
  sessionId: `${sessionId}`,