mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-26 11:44:28 +08:00
refactor: streamline argument handling in MCPService activation method
- Updated the MCPService's activate method to handle server arguments more efficiently by using a fallback to an empty array if no arguments are provided. - This change improves the clarity and robustness of the argument management within the service.
This commit is contained in:
parent
aed4655488
commit
5a3485c71e
@ -309,7 +309,8 @@ export default class MCPService extends EventEmitter {
|
||||
public async activate(server: MCPServer): Promise<void> {
|
||||
await this.ensureInitialized()
|
||||
|
||||
const { name, baseUrl, command, args, env } = server
|
||||
const { name, baseUrl, command, env } = server
|
||||
const args = [...(server.args || [])]
|
||||
|
||||
// Skip if already running
|
||||
if (this.clients[name]) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user