@qwen-code/qwen-code 0.8.0-preview.3 → 0.8.0

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/cli.js +45 -10
  2. package/package.json +2 -2
package/cli.js CHANGED
@@ -155656,7 +155656,7 @@ __export(geminiContentGenerator_exports, {
155656
155656
  createGeminiContentGenerator: () => createGeminiContentGenerator
155657
155657
  });
155658
155658
  function createGeminiContentGenerator(config2, gcConfig) {
155659
- const version2 = "0.8.0-preview.3";
155659
+ const version2 = "0.8.0";
155660
155660
  const userAgent2 = config2.userAgent || `QwenCode/${version2} (${process.platform}; ${process.arch})`;
155661
155661
  const baseHeaders = {
155662
155662
  "User-Agent": userAgent2
@@ -367668,7 +367668,7 @@ __name(getPackageJson, "getPackageJson");
367668
367668
  // packages/cli/src/utils/version.ts
367669
367669
  async function getCliVersion() {
367670
367670
  const pkgJson = await getPackageJson();
367671
- return "0.8.0-preview.3";
367671
+ return "0.8.0";
367672
367672
  }
367673
367673
  __name(getCliVersion, "getCliVersion");
367674
367674
 
@@ -375288,7 +375288,7 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds) => {
375288
375288
 
375289
375289
  // packages/cli/src/generated/git-commit.ts
375290
375290
  init_esbuild_shims();
375291
- var GIT_COMMIT_INFO2 = "bc658046";
375291
+ var GIT_COMMIT_INFO2 = "67d54b16";
375292
375292
 
375293
375293
  // packages/cli/src/utils/systemInfo.ts
375294
375294
  async function getNpmVersion() {
@@ -382262,6 +382262,7 @@ var ControlContext = class {
382262
382262
  permissionMode;
382263
382263
  sdkMcpServers;
382264
382264
  mcpClients;
382265
+ inputClosed;
382265
382266
  onInterrupt;
382266
382267
  constructor(options2) {
382267
382268
  this.config = options2.config;
@@ -382272,6 +382273,7 @@ var ControlContext = class {
382272
382273
  this.permissionMode = options2.permissionMode || "default";
382273
382274
  this.sdkMcpServers = /* @__PURE__ */ new Set();
382274
382275
  this.mcpClients = /* @__PURE__ */ new Map();
382276
+ this.inputClosed = false;
382275
382277
  this.onInterrupt = options2.onInterrupt;
382276
382278
  }
382277
382279
  };
@@ -382337,6 +382339,9 @@ var BaseController = class {
382337
382339
  * Respects the provided AbortSignal for cancellation.
382338
382340
  */
382339
382341
  async sendControlRequest(payload, timeoutMs = DEFAULT_REQUEST_TIMEOUT_MS, signal) {
382342
+ if (this.context.inputClosed) {
382343
+ throw new Error("Input closed");
382344
+ }
382340
382345
  if (signal?.aborted) {
382341
382346
  throw new Error("Request aborted");
382342
382347
  }
@@ -383098,16 +383103,19 @@ var PermissionController = class extends BaseController {
383098
383103
  error2
383099
383104
  );
383100
383105
  }
383106
+ const errorMessage = error2 instanceof Error ? error2.message : String(error2);
383101
383107
  const confirmationType = toolCall.confirmationDetails.type;
383102
383108
  if (["edit", "exec", "mcp"].includes(confirmationType)) {
383103
383109
  const execOrMcpDetails = toolCall.confirmationDetails;
383104
- await execOrMcpDetails.onConfirm(
383105
- ToolConfirmationOutcome.Cancel,
383106
- void 0
383107
- );
383110
+ await execOrMcpDetails.onConfirm(ToolConfirmationOutcome.Cancel, {
383111
+ cancelMessage: `Error: ${errorMessage}`
383112
+ });
383108
383113
  } else {
383109
383114
  await toolCall.confirmationDetails.onConfirm(
383110
- ToolConfirmationOutcome.Cancel
383115
+ ToolConfirmationOutcome.Cancel,
383116
+ {
383117
+ cancelMessage: `Error: ${errorMessage}`
383118
+ }
383111
383119
  );
383112
383120
  }
383113
383121
  } finally {
@@ -383319,6 +383327,30 @@ var ControlDispatcher = class {
383319
383327
  }
383320
383328
  }
383321
383329
  }
383330
+ /**
383331
+ * Marks stdin as closed and rejects all pending outgoing requests.
383332
+ * After this is called, new outgoing requests will be rejected immediately.
383333
+ * This should be called when stdin closes to avoid waiting for responses.
383334
+ */
383335
+ markInputClosed() {
383336
+ if (this.context.inputClosed) {
383337
+ return;
383338
+ }
383339
+ this.context.inputClosed = true;
383340
+ const requestIds = Array.from(this.pendingOutgoingRequests.keys());
383341
+ if (this.context.debugMode) {
383342
+ console.error(
383343
+ `[ControlDispatcher] Input closed, rejecting ${requestIds.length} pending outgoing requests`
383344
+ );
383345
+ }
383346
+ for (const id of requestIds) {
383347
+ const pending = this.pendingOutgoingRequests.get(id);
383348
+ if (pending) {
383349
+ this.deregisterOutgoingRequest(id);
383350
+ pending.reject(new Error("Input closed"));
383351
+ }
383352
+ }
383353
+ }
383322
383354
  /**
383323
383355
  * Stops all pending requests and cleans up all controllers
383324
383356
  */
@@ -383347,7 +383379,7 @@ var ControlDispatcher = class {
383347
383379
  this.sdkMcpController.cleanup();
383348
383380
  }
383349
383381
  /**
383350
- * Registers an incoming request in the pending registry
383382
+ * Registers an incoming request in the pending registry.
383351
383383
  */
383352
383384
  registerIncomingRequest(requestId, controller, abortController, timeoutId) {
383353
383385
  this.pendingIncomingRequests.set(requestId, {
@@ -384132,6 +384164,9 @@ var Session2 = class {
384132
384164
  }
384133
384165
  throw streamError;
384134
384166
  }
384167
+ if (this.dispatcher) {
384168
+ this.dispatcher.markInputClosed();
384169
+ }
384135
384170
  await this.waitForAllPendingWork();
384136
384171
  await this.shutdown();
384137
384172
  } catch (error2) {
@@ -428537,7 +428572,7 @@ var GeminiAgent = class {
428537
428572
  name: APPROVAL_MODE_INFO[mode].name,
428538
428573
  description: APPROVAL_MODE_INFO[mode].description
428539
428574
  }));
428540
- const version2 = "0.8.0-preview.3";
428575
+ const version2 = "0.8.0";
428541
428576
  return {
428542
428577
  protocolVersion: PROTOCOL_VERSION,
428543
428578
  agentInfo: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qwen-code/qwen-code",
3
- "version": "0.8.0-preview.3",
3
+ "version": "0.8.0",
4
4
  "description": "Qwen Code - AI-powered coding assistant",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,7 +20,7 @@
20
20
  "locales"
21
21
  ],
22
22
  "config": {
23
- "sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.8.0-preview.3"
23
+ "sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.8.0"
24
24
  },
25
25
  "dependencies": {},
26
26
  "optionalDependencies": {