@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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/bot.ts +8 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcrays/dcgchat",
3
- "version": "0.4.8",
3
+ "version": "0.4.9",
4
4
  "type": "module",
5
5
  "description": "OpenClaw channel plugin for 书灵墨宝 (WebSocket)",
6
6
  "main": "index.ts",
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> = {}