diff --git a/tools/cli/installers/lib/ide/_base-ide.js b/tools/cli/installers/lib/ide/_base-ide.js index fb392bd82..1950f32d7 100644 --- a/tools/cli/installers/lib/ide/_base-ide.js +++ b/tools/cli/installers/lib/ide/_base-ide.js @@ -157,7 +157,7 @@ class BaseIdeSetup { icon: '📋', slug: agentName.split('-')[0], }; - } catch (error) { + } catch { // Fallback metadata on error const agentName = path.basename(filePath, '.md'); return { @@ -177,7 +177,7 @@ class BaseIdeSetup { */ formatAgentLauncher(agentName, agentPath) { const relativePath = path.relative(process.cwd(), agentPath) - .replace(/\\/g, '/'); // Convert Windows paths to forward slashes + .replaceAll('\\', '/'); // Convert Windows paths to forward slashes return ` diff --git a/tools/cli/installers/lib/ide/gemini.js b/tools/cli/installers/lib/ide/gemini.js index fc94ade98..cf9c978b8 100644 --- a/tools/cli/installers/lib/ide/gemini.js +++ b/tools/cli/installers/lib/ide/gemini.js @@ -33,7 +33,7 @@ class GeminiSetup extends BaseIdeSetup { metadata.description || 'WDS Agent'; // Escape content for TOML multi-line string - const escapedContent = content.replace(/"""/g, '\\"\\"\\"'); + const escapedContent = content.replaceAll('"""', String.raw`\"\"\"`); return `description = "${description}" diff --git a/tools/cli/installers/lib/ide/qwen.js b/tools/cli/installers/lib/ide/qwen.js index b21103e20..6ef487c50 100644 --- a/tools/cli/installers/lib/ide/qwen.js +++ b/tools/cli/installers/lib/ide/qwen.js @@ -33,7 +33,7 @@ class QwenSetup extends BaseIdeSetup { metadata.description || 'WDS Agent'; // Escape content for TOML multi-line string - const escapedContent = content.replace(/"""/g, '\\"\\"\\"'); + const escapedContent = content.replaceAll('"""', String.raw`\"\"\"`); return `description = "${description}" diff --git a/tools/cli/lib/installer.js b/tools/cli/lib/installer.js index 99e7606da..b7d20c898 100644 --- a/tools/cli/lib/installer.js +++ b/tools/cli/lib/installer.js @@ -210,7 +210,7 @@ class Installer { // Get user name from git or system const getUserName = () => { try { - const { execSync } = require('child_process'); + const { execSync } = require('node:child_process'); const gitName = execSync('git config user.name', { encoding: 'utf8' }).trim(); return gitName || 'Designer'; } catch {