feat: 在MCPServerCommand和MCPStreamableHttpCommand中添加'promptx_dacp'参数映射,同时在DACPCommand中优化参数处理逻辑,以支持数组参数的正确解析。

This commit is contained in:
sean
2025-06-18 16:44:41 +08:00
parent 47582c56c9
commit 741c1f8f54
3 changed files with 9 additions and 3 deletions

View File

@ -139,8 +139,11 @@ class DACPCommand extends BasePouchCommand {
async getContent(args) {
try {
// 处理参数:如果是数组,取第一个元素;否则直接使用
const dacpArgs = Array.isArray(args) ? args[0] : args;
// 执行DACP调用
const result = await this.callDACPService(args);
const result = await this.callDACPService(dacpArgs);
// 格式化响应
if (result.success) {