mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-29 20:20:57 +00:00
feat: Open MCP docs if no MCPs are configured (#1325)
This commit is contained in:
parent
dc76bcc433
commit
fd58d3267e
2 changed files with 46 additions and 7 deletions
|
|
@ -291,11 +291,21 @@ export const useSlashCommandProcessor = (
|
|||
const serverNames = Object.keys(mcpServers);
|
||||
|
||||
if (serverNames.length === 0) {
|
||||
addMessage({
|
||||
type: MessageType.INFO,
|
||||
content: 'No MCP servers configured.',
|
||||
timestamp: new Date(),
|
||||
});
|
||||
const docsUrl = 'https://goo.gle/gemini-cli-docs-mcp';
|
||||
if (process.env.SANDBOX && process.env.SANDBOX !== 'sandbox-exec') {
|
||||
addMessage({
|
||||
type: MessageType.INFO,
|
||||
content: `No MCP servers configured. Please open the following URL in your browser to view documentation:\n${docsUrl}`,
|
||||
timestamp: new Date(),
|
||||
});
|
||||
} else {
|
||||
addMessage({
|
||||
type: MessageType.INFO,
|
||||
content: `No MCP servers configured. Opening documentation in your browser: ${docsUrl}`,
|
||||
timestamp: new Date(),
|
||||
});
|
||||
await open(docsUrl);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue