agent-bridge-qwenwork 1.0.23 → 1.0.24
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.
|
@@ -10,7 +10,7 @@ const desktop_launch_1 = require("../desktop-launch");
|
|
|
10
10
|
const session_history_1 = require("./session-history");
|
|
11
11
|
exports.qwenworkManifest = {
|
|
12
12
|
id: "qwenwork",
|
|
13
|
-
version: "1.0.
|
|
13
|
+
version: "1.0.24",
|
|
14
14
|
displayName: "千问办公",
|
|
15
15
|
entry: "dist/index.js",
|
|
16
16
|
apiVersion: "1",
|
|
@@ -215,9 +215,10 @@ class QwenworkPlugin {
|
|
|
215
215
|
throw new Error("千问 CDP 已断开,等待空闲后自动恢复");
|
|
216
216
|
if (request.attachments?.length && (!this.client.attachmentInput || !this.client.complete))
|
|
217
217
|
throw new Error("千问当前客户端不支持附件输入");
|
|
218
|
+
const timeoutMs = request.timeoutMs ?? asNumber(this.context?.config.timeoutMs, 240_000);
|
|
218
219
|
const response = this.client.complete
|
|
219
|
-
? await this.client.complete(request.task,
|
|
220
|
-
: { text: await this.complete(request.task,
|
|
220
|
+
? await this.client.complete(request.task, timeoutMs, undefined, undefined, request.attachments, request.onMessage)
|
|
221
|
+
: { text: await this.complete(request.task, timeoutMs) };
|
|
221
222
|
if ((0, cdp_client_1.isQwenApiUnavailableReply)(response.text))
|
|
222
223
|
throw new agent_1.AgentOperationError("QWEN_REMOTE_ERROR", "等待千问办公回复", new Error("千问生成接口不可用;桌面未提供具体服务端错误码,CDP 仍连接,未重启或重新提交任务"));
|
|
223
224
|
this.failures = 0;
|
package/package.json
CHANGED