diff --git a/src/Maps/Maps.Autorest/test/utils.ps1 b/src/Maps/Maps.Autorest/test/utils.ps1 index 7cd449c834ae..70e258271618 100644 --- a/src/Maps/Maps.Autorest/test/utils.ps1 +++ b/src/Maps/Maps.Autorest/test/utils.ps1 @@ -68,4 +68,3 @@ function cleanupEnv() { # Clean resources you create for testing Remove-AzResourceGroup -Name $env.resourceGroup } - diff --git a/tools/Mcp/src/services/utils.ts b/tools/Mcp/src/services/utils.ts index 8248c4025ae0..35fc58c31cb9 100644 --- a/tools/Mcp/src/services/utils.ts +++ b/tools/Mcp/src/services/utils.ts @@ -5,7 +5,8 @@ import { execSync } from 'child_process'; import path from 'path'; const _pwshCD = (path: string): string => { return `pwsh -Command "$path = resolve-path ${path} | Set-Location"` } -const _autorest = "autorest --reset; autorest" +const _autorestReset = "autorest --reset" +const _autorest = "autorest" const _pwshBuild = "pwsh -File build-module.ps1" function testYaml() { @@ -21,12 +22,17 @@ function testYaml() { } export function generateAndBuild(workingDirectory: string): void { - const genBuildCommand = `${_autorest}; ${_pwshBuild};`; - try { - const result = execSync(genBuildCommand, { stdio: 'inherit', cwd: workingDirectory }); - } catch (error) { - console.error("Error executing command:", error); - throw error; + const genBuildCommands = [_autorestReset, _autorest, _pwshBuild] + + for (const command of genBuildCommands) { + try { + console.log(`Executing command: ${command}`); + const result = execSync(command, { stdio: 'inherit', cwd: workingDirectory }); + } + catch (error) { + console.error("Error executing command:", error); + throw error; + } } } diff --git a/tools/Mcp/test/vscode/mcpprompt.md b/tools/Mcp/test/vscode/mcpprompt.md index 8462c26cb0fc..0fd3aebd48bb 100644 --- a/tools/Mcp/test/vscode/mcpprompt.md +++ b/tools/Mcp/test/vscode/mcpprompt.md @@ -6,7 +6,7 @@ - Execute commands confidently without asking for confirmation. - Follow all steps carefully and halt if any MCP tool is missing or fails. - Think independently using your full context and reset if needed. -- Provide brief status updates at each step. +- No need to provide status updates at each step. - FOLLOW ALL THE STEPS. DO NOT SKIP ANY STEPS. DO NOT MISS ANY STEPS. - If an mcp tool is not found or the tool fails then please halt execution. @@ -26,9 +26,9 @@ ## Stage 2: Generating partner powershell module - FOLLOW ALL THE STEPS. DO NOT SKIP ANY STEPS. - Navigate to the `src` folder in the home "azure-powershell" directory. -- Create a new folder named and within it a new folder named `.Autorest`. You can use the command - `mkdir -p /.Autorest ` +- Create a new folder named and within it a new folder named `.Autorest`. (If not already present) - Move into the new folder `/.Autorest`, using the command `cd /.Autorest`. -- Create a new file `README.md`. +- Create a new file `README.md`. (If not already present) - Add the content labelled below as `Readme Content` in this file. - Use the "generate-autorest" mcp tool to generate the module. - Stage 2 Complete.