(args: string)
| 2083 | argNames, |
| 2084 | source: 'mcp', |
| 2085 | async getPromptForCommand(args: string) { |
| 2086 | const argsArray = args.split(' ') |
| 2087 | try { |
| 2088 | const connectedClient = await ensureConnectedClient(client) |
| 2089 | const result = await connectedClient.client.getPrompt({ |
| 2090 | name: prompt.name, |
| 2091 | arguments: zipObject(argNames, argsArray), |
| 2092 | }) |
| 2093 | const transformed = await Promise.all( |
| 2094 | result.messages.map(message => |
| 2095 | transformResultContent(message.content, connectedClient.name), |
| 2096 | ), |
| 2097 | ) |
| 2098 | return transformed.flat() |
| 2099 | } catch (error) { |
| 2100 | logMCPError( |
| 2101 | client.name, |
| 2102 | `Error running command '${prompt.name}': ${errorMessage(error)}`, |
| 2103 | ) |
| 2104 | throw error |
| 2105 | } |
| 2106 | }, |
| 2107 | } |
| 2108 | }) |
| 2109 | } catch (error) { |
nothing calls this directly
no test coverage detected