diff --git a/docs/users/extension/introduction.md b/docs/users/extension/introduction.md index 2717150db..a0f39d957 100644 --- a/docs/users/extension/introduction.md +++ b/docs/users/extension/introduction.md @@ -34,10 +34,20 @@ You can install an extension using `qwen extensions install` from multiple sourc #### From Claude Code Marketplace -Qwen Code also supports plugins from the [Claude Code Marketplace](https://claudemarketplaces.com/). Choose a marketplace and install a plugin from one marketplace through the format: +Qwen Code also supports plugins from the [Claude Code Marketplace](https://claudemarketplaces.com/). Install from a marketplace and choose a plugin: ```bash -qwen extensions install : +qwen extensions install +# or +qwen extensions install +``` + +If you want to install a specific pulgin, you can use the format with plugin name: + +```bash +qwen extensions install : +# or +qwen extensions install : ``` For example, to install the `prompts.chat` plugin from the [f/awesome-chatgpt-prompts](https://claudemarketplaces.com/plugins/f-awesome-chatgpt-prompts) marketplace: @@ -74,7 +84,9 @@ This command opens the respective marketplace in your default browser, allowing Qwen Code fully supports extensions from the [Gemini CLI Extensions Gallery](https://geminicli.com/extensions/). Simply install them using the git URL: ```bash -qwen extensions install +qwen extensions install +# or +qwen extensions install / ``` Gemini extensions are automatically converted to Qwen Code format during installation: diff --git a/packages/core/src/extension/claude-converter.ts b/packages/core/src/extension/claude-converter.ts index 7b927c64f..224a22b11 100644 --- a/packages/core/src/extension/claude-converter.ts +++ b/packages/core/src/extension/claude-converter.ts @@ -709,6 +709,12 @@ async function resolvePluginSource( throw new Error(`Plugin source not found at ${sourcePath}`); } + // If source path equals marketplace dir (source is '.' or ''), + // return marketplaceDir directly to avoid copying to subdirectory of self + if (path.resolve(sourcePath) === path.resolve(marketplaceDir)) { + return marketplaceDir; + } + // Copy to plugin directory await fs.promises.cp(sourcePath, pluginDir, { recursive: true }); return pluginDir;