@qwen-code/qwen-code 0.8.0-preview.1 → 0.8.0-preview.2

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 (3) hide show
  1. package/README.md +2 -0
  2. package/cli.js +68 -13
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -5,6 +5,8 @@
5
5
  [![Node.js Version](https://img.shields.io/badge/node-%3E%3D20.0.0-brightgreen.svg)](https://nodejs.org/)
6
6
  [![Downloads](https://img.shields.io/npm/dm/@qwen-code/qwen-code.svg)](https://www.npmjs.com/package/@qwen-code/qwen-code)
7
7
 
8
+ <a href="https://trendshift.io/repositories/15287" target="_blank"><img src="https://trendshift.io/api/badge/repositories/15287" alt="QwenLM%2Fqwen-code | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
9
+
8
10
  **An open-source AI agent that lives in your terminal.**
9
11
 
10
12
  <a href="https://qwenlm.github.io/qwen-code-docs/zh/users/overview">中文</a> |
package/cli.js CHANGED
@@ -155556,7 +155556,7 @@ __export(geminiContentGenerator_exports, {
155556
155556
  createGeminiContentGenerator: () => createGeminiContentGenerator
155557
155557
  });
155558
155558
  function createGeminiContentGenerator(config2, gcConfig) {
155559
- const version2 = "0.8.0-preview.1";
155559
+ const version2 = "0.8.0-preview.2";
155560
155560
  const userAgent2 = config2.userAgent || `QwenCode/${version2} (${process.platform}; ${process.arch})`;
155561
155561
  const baseHeaders = {
155562
155562
  "User-Agent": userAgent2
@@ -228930,7 +228930,7 @@ function getGitHubToken() {
228930
228930
  async function cloneFromGit(installMetadata, destination) {
228931
228931
  try {
228932
228932
  const git = simpleGit(destination);
228933
- let sourceUrl = installMetadata.source;
228933
+ let sourceUrl = installMetadata.type === "marketplace" && installMetadata.marketplace ? installMetadata.marketplace.marketplaceSource : installMetadata.source;
228934
228934
  const token2 = getGitHubToken();
228935
228935
  if (token2) {
228936
228936
  try {
@@ -237692,7 +237692,7 @@ function filterMcpConfig(original) {
237692
237692
  return Object.freeze(rest);
237693
237693
  }
237694
237694
  function getContextFileNames(config2) {
237695
- if (!config2.contextFileName) {
237695
+ if (!config2.contextFileName || config2.contextFileName.length === 0) {
237696
237696
  return ["QWEN.md"];
237697
237697
  } else if (!Array.isArray(config2.contextFileName)) {
237698
237698
  return [config2.contextFileName];
@@ -237755,8 +237755,8 @@ function hashValue(value) {
237755
237755
  return createHash7("sha256").update(value).digest("hex");
237756
237756
  }
237757
237757
  function validateName(name3) {
237758
- if (!/^[a-zA-Z0-9-]+$/.test(name3)) {
237759
- throw new Error(`Invalid extension name: "${name3}". Only letters (a-z, A-Z), numbers (0-9), and dashes (-) are allowed.`);
237758
+ if (!/^[a-zA-Z0-9-_.]+$/.test(name3)) {
237759
+ throw new Error(`Invalid extension name: "${name3}". Only letters (a-z, A-Z), numbers (0-9), underscores (_), dots (.), and dashes (-) are allowed.`);
237760
237760
  }
237761
237761
  }
237762
237762
  async function parseInstallSource(source2) {
@@ -361332,7 +361332,7 @@ async function getExtensionManager() {
361332
361332
  return extensionManager;
361333
361333
  }
361334
361334
  __name(getExtensionManager, "getExtensionManager");
361335
- function extensionToOutputString(extension, extensionManager, workspaceDir) {
361335
+ function extensionToOutputString(extension, extensionManager, workspaceDir, inline2 = false) {
361336
361336
  const cwd7 = workspaceDir;
361337
361337
  const userEnabled = extensionManager.isEnabled(
361338
361338
  extension.config.name,
@@ -361343,7 +361343,7 @@ function extensionToOutputString(extension, extensionManager, workspaceDir) {
361343
361343
  cwd7
361344
361344
  );
361345
361345
  const status = workspaceEnabled ? import_chalk5.default.green("\u2713") : import_chalk5.default.red("\u2717");
361346
- let output = `${status} ${extension.config.name} (${extension.config.version})`;
361346
+ let output = `${inline2 ? "" : status} ${extension.config.name} (${extension.config.version})`;
361347
361347
  output += `
361348
361348
  Path: ${extension.path}`;
361349
361349
  if (extension.installMetadata) {
@@ -367329,7 +367329,7 @@ __name(getPackageJson, "getPackageJson");
367329
367329
  // packages/cli/src/utils/version.ts
367330
367330
  async function getCliVersion() {
367331
367331
  const pkgJson = await getPackageJson();
367332
- return "0.8.0-preview.1";
367332
+ return "0.8.0-preview.2";
367333
367333
  }
367334
367334
  __name(getCliVersion, "getCliVersion");
367335
367335
 
@@ -367507,7 +367507,7 @@ __name(addMcpServer, "addMcpServer");
367507
367507
  var addCommand = {
367508
367508
  command: "add <name> <commandOrUrl> [args...]",
367509
367509
  describe: "Add a server",
367510
- builder: /* @__PURE__ */ __name((yargs) => yargs.usage("Usage: gemini mcp add [options] <name> <commandOrUrl> [args...]").parserConfiguration({
367510
+ builder: /* @__PURE__ */ __name((yargs) => yargs.usage("Usage: qwen mcp add [options] <name> <commandOrUrl> [args...]").parserConfiguration({
367511
367511
  "unknown-options-as-args": true,
367512
367512
  // Pass unknown options as server args
367513
367513
  "populate--": true
@@ -374949,7 +374949,7 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds) => {
374949
374949
 
374950
374950
  // packages/cli/src/generated/git-commit.ts
374951
374951
  init_esbuild_shims();
374952
- var GIT_COMMIT_INFO2 = "50226a2e";
374952
+ var GIT_COMMIT_INFO2 = "42dcc798";
374953
374953
 
374954
374954
  // packages/cli/src/utils/systemInfo.ts
374955
374955
  async function getNpmVersion() {
@@ -376167,6 +376167,51 @@ async function enableAction(context2, args) {
376167
376167
  }
376168
376168
  }
376169
376169
  __name(enableAction, "enableAction");
376170
+ async function detailAction(context2, args) {
376171
+ const extensionManager = context2.services.config?.getExtensionManager();
376172
+ if (!(extensionManager instanceof ExtensionManager)) {
376173
+ console.error(
376174
+ `Cannot ${context2.invocation?.name} extensions in this environment`
376175
+ );
376176
+ return;
376177
+ }
376178
+ const name3 = args.trim();
376179
+ if (!name3) {
376180
+ context2.ui.addItem(
376181
+ {
376182
+ type: "error" /* ERROR */,
376183
+ text: t4("Usage: /extensions detail <extension-name>")
376184
+ },
376185
+ Date.now()
376186
+ );
376187
+ return;
376188
+ }
376189
+ const extensions = context2.services.config.getExtensions();
376190
+ const extension = extensions.find((extension2) => extension2.name === name3);
376191
+ if (!extension) {
376192
+ context2.ui.addItem(
376193
+ {
376194
+ type: "error" /* ERROR */,
376195
+ text: t4('Extension "{{name}}" not found.', { name: name3 })
376196
+ },
376197
+ Date.now()
376198
+ );
376199
+ return;
376200
+ }
376201
+ context2.ui.addItem(
376202
+ {
376203
+ type: "info" /* INFO */,
376204
+ text: extensionToOutputString(
376205
+ extension,
376206
+ extensionManager,
376207
+ process.cwd(),
376208
+ true
376209
+ )
376210
+ },
376211
+ Date.now()
376212
+ );
376213
+ }
376214
+ __name(detailAction, "detailAction");
376170
376215
  async function completeExtensions(context2, partialArg) {
376171
376216
  let extensions = context2.services.config?.getExtensions() ?? [];
376172
376217
  if (context2.invocation?.name === "enable") {
@@ -376179,7 +376224,7 @@ async function completeExtensions(context2, partialArg) {
376179
376224
  const suggestions = extensionNames.filter(
376180
376225
  (name3) => name3.startsWith(partialArg)
376181
376226
  );
376182
- if (context2.invocation?.name !== "uninstall") {
376227
+ if (context2.invocation?.name !== "uninstall" && context2.invocation?.name !== "detail") {
376183
376228
  if ("--all".startsWith(partialArg) || "all".startsWith(partialArg)) {
376184
376229
  suggestions.unshift("--all");
376185
376230
  }
@@ -376263,6 +376308,15 @@ var uninstallCommand2 = {
376263
376308
  action: uninstallAction,
376264
376309
  completion: completeExtensions
376265
376310
  };
376311
+ var detailCommand = {
376312
+ name: "detail",
376313
+ get description() {
376314
+ return t4("Get detail of an extension");
376315
+ },
376316
+ kind: "built-in" /* BUILT_IN */,
376317
+ action: detailAction,
376318
+ completion: completeExtensions
376319
+ };
376266
376320
  var extensionsCommand2 = {
376267
376321
  name: "extensions",
376268
376322
  get description() {
@@ -376276,7 +376330,8 @@ var extensionsCommand2 = {
376276
376330
  enableCommand2,
376277
376331
  installCommand2,
376278
376332
  uninstallCommand2,
376279
- exploreExtensionsCommand
376333
+ exploreExtensionsCommand,
376334
+ detailCommand
376280
376335
  ],
376281
376336
  action: /* @__PURE__ */ __name((context2, args) => (
376282
376337
  // Default to list if no subcommand is provided
@@ -427873,7 +427928,7 @@ var GeminiAgent = class {
427873
427928
  name: APPROVAL_MODE_INFO[mode].name,
427874
427929
  description: APPROVAL_MODE_INFO[mode].description
427875
427930
  }));
427876
- const version2 = "0.8.0-preview.1";
427931
+ const version2 = "0.8.0-preview.2";
427877
427932
  return {
427878
427933
  protocolVersion: PROTOCOL_VERSION,
427879
427934
  agentInfo: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qwen-code/qwen-code",
3
- "version": "0.8.0-preview.1",
3
+ "version": "0.8.0-preview.2",
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.1"
23
+ "sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.8.0-preview.2"
24
24
  },
25
25
  "dependencies": {},
26
26
  "optionalDependencies": {