@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 +1 -1
- package/src/bot.ts +1 -0
- package/src/channel.ts +3 -2
package/package.json
CHANGED
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
|
|
168
|
-
const
|
|
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}`,
|