()
| 4479 | } |
| 4480 | |
| 4481 | async function loadRemoteExecutionSkillContext() { |
| 4482 | const skill = state.remoteExecution.skill; |
| 4483 | if (!skill || skill === "none") return ""; |
| 4484 | const path = getRemoteExecutionSkillRegistry()[skill]; |
| 4485 | if (!path) return ""; |
| 4486 | try { |
| 4487 | const body = await readFile(path, "utf8"); |
| 4488 | return [ |
| 4489 | `以下是远程执行模式当前启用的 skill:${skill}`, |
| 4490 | body.slice(0, 16000) |
| 4491 | ].join("\n"); |
| 4492 | } catch (error) { |
| 4493 | return `当前设置的 skill ${skill} 读取失败:${error.message}`; |
| 4494 | } |
| 4495 | } |
| 4496 | |
| 4497 | async function buildIMessagePrivateReply(event, unifiedMemoryContext = "", options = {}) { |
| 4498 | const id = crypto.randomUUID(); |
no test coverage detected