fix(coding-agent): support configurable npm wrapper command closes #2072

This commit is contained in:
Mario Zechner
2026-03-14 04:38:01 +01:00
parent ad32089f0c
commit 7ddaf150d6
7 changed files with 127 additions and 9 deletions

View File

@@ -76,6 +76,7 @@ export interface Settings {
shellPath?: string; // Custom shell path (e.g., for Cygwin users on Windows)
quietStartup?: boolean;
shellCommandPrefix?: string; // Prefix prepended to every bash command (e.g., "shopt -s expand_aliases" for alias support)
npmCommand?: string[]; // Command used for npm package lookup/install operations, argv-style (e.g., ["mise", "exec", "node@20", "--", "npm"])
collapseChangelog?: boolean; // Show condensed changelog after update (use /changelog for full)
packages?: PackageSource[]; // Array of npm/git package sources (string or object with filtering)
extensions?: string[]; // Array of local extension file paths or directories
@@ -709,6 +710,16 @@ export class SettingsManager {
this.save();
}
getNpmCommand(): string[] | undefined {
return this.settings.npmCommand ? [...this.settings.npmCommand] : undefined;
}
setNpmCommand(command: string[] | undefined): void {
this.globalSettings.npmCommand = command ? [...command] : undefined;
this.markModified("npmCommand");
this.save();
}
getCollapseChangelog(): boolean {
return this.settings.collapseChangelog ?? false;
}