(args: string)
| 2071 | argNames, |
| 2072 | source: 'mcp', |
| 2073 | async getPromptForCommand(args: string) { |
| 2074 | const argsArray = args.split(' ') |
| 2075 | try { |
| 2076 | const connectedClient = await ensureConnectedClient(client) |
| 2077 | const result = await connectedClient.client.getPrompt({ |
| 2078 | name: prompt.name, |
| 2079 | arguments: zipObject(argNames, argsArray), |
| 2080 | }) |
| 2081 | const transformed = await Promise.all( |
| 2082 | result.messages.map(message => |
| 2083 | transformResultContent(message.content, connectedClient.name), |
| 2084 | ), |
| 2085 | ) |
| 2086 | return transformed.flat() |
| 2087 | } catch (error) { |
| 2088 | logMCPError( |
| 2089 | client.name, |
| 2090 | `Error running command '${prompt.name}': ${errorMessage(error)}`, |
| 2091 | ) |
| 2092 | throw error |
| 2093 | } |
| 2094 | }, |
| 2095 | } |
| 2096 | }) |
| 2097 | } catch (error) { |
nothing calls this directly
no test coverage detected