@dcrays/dcgchat 0.4.8 → 0.4.9
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 +8 -0
package/package.json
CHANGED
package/src/bot.ts
CHANGED
|
@@ -191,6 +191,14 @@ export async function handleDcgchatMessage(msg: InboundMessage, accountId: strin
|
|
|
191
191
|
}
|
|
192
192
|
|
|
193
193
|
try {
|
|
194
|
+
if (msg.content.skills_scope.length > 0 && !msg.content?.agent_clone_code && !ignoreToolCommand.includes(text?.trim())) {
|
|
195
|
+
const workspaceDir = getWorkspaceDir()
|
|
196
|
+
const skill = msg.content.skills_scope[0]
|
|
197
|
+
const skillDir = `${workspaceDir}/skills/${skill.skill_code}`
|
|
198
|
+
const skillText = `用户选择使用此技能:"${skill.skill_code}",技能路径是:"${skillDir}",在目录下查找并`
|
|
199
|
+
text = skill.skill_code ? `${skillText} ${text}` : text
|
|
200
|
+
dcgLogger(`skill: text: ${text}`)
|
|
201
|
+
}
|
|
194
202
|
// 处理用户上传的文件
|
|
195
203
|
const files = msg.content.files ?? []
|
|
196
204
|
let mediaPayload: Record<string, unknown> = {}
|