fix: qwen vscode extension

This commit is contained in:
tanzhenxin
2025-08-19 18:20:40 +08:00
parent a19db16485
commit 303b6999f4
14 changed files with 72 additions and 70 deletions

View File

@@ -1,23 +1,23 @@
# Gemini CLI Extensions
# Qwen Code Extensions
Gemini CLI supports extensions that can be used to configure and extend its functionality.
Qwen Code supports extensions that can be used to configure and extend its functionality.
## How it works
On startup, Gemini CLI looks for extensions in two locations:
On startup, Qwen Code looks for extensions in two locations:
1. `<workspace>/.gemini/extensions`
2. `<home>/.gemini/extensions`
1. `<workspace>/.qwen/extensions`
2. `<home>/.qwen/extensions`
Gemini CLI loads all extensions from both locations. If an extension with the same name exists in both locations, the extension in the workspace directory takes precedence.
Qwen Code loads all extensions from both locations. If an extension with the same name exists in both locations, the extension in the workspace directory takes precedence.
Within each location, individual extensions exist as a directory that contains a `gemini-extension.json` file. For example:
Within each location, individual extensions exist as a directory that contains a `qwen-extension.json` file. For example:
`<workspace>/.gemini/extensions/my-extension/gemini-extension.json`
`<workspace>/.qwen/extensions/my-extension/qwen-extension.json`
### `gemini-extension.json`
### `qwen-extension.json`
The `gemini-extension.json` file contains the configuration for the extension. The file has the following structure:
The `qwen-extension.json` file contains the configuration for the extension. The file has the following structure:
```json
{
@@ -39,7 +39,7 @@ The `gemini-extension.json` file contains the configuration for the extension. T
- `contextFileName`: The name of the file that contains the context for the extension. This will be used to load the context from the workspace. If this property is not used but a `QWEN.md` file is present in your extension directory, then that file will be loaded.
- `excludeTools`: An array of tool names to exclude from the model. You can also specify command-specific restrictions for tools that support it, like the `run_shell_command` tool. For example, `"excludeTools": ["run_shell_command(rm -rf)"]` will block the `rm -rf` command.
When Gemini CLI starts, it loads all the extensions and merges their configurations. If there are any conflicts, the workspace configuration takes precedence.
When Qwen Code starts, it loads all the extensions and merges their configurations. If there are any conflicts, the workspace configuration takes precedence.
## Extension Commands
@@ -50,8 +50,8 @@ Extensions can provide [custom commands](./cli/commands.md#custom-commands) by p
An extension named `gcp` with the following structure:
```
.gemini/extensions/gcp/
├── gemini-extension.json
.qwen/extensions/gcp/
├── qwen-extension.json
└── commands/
├── deploy.toml
└── gcs/