Improve project-local pi config (#6309)
* feat(coding-agent): improve config resource overrides * fix(coding-agent): simplify config resource overrides
This commit is contained in:
@@ -231,8 +231,8 @@ ${chalk.bold("Commands:")}
|
||||
${APP_NAME} uninstall <source> [-l] Alias for remove
|
||||
${APP_NAME} update [source|self|pi] Update pi (use --all for pi and extensions)
|
||||
${APP_NAME} list List installed extensions from settings
|
||||
${APP_NAME} config Open TUI to enable/disable package resources
|
||||
${APP_NAME} <command> --help Show help for install/remove/uninstall/update/list
|
||||
${APP_NAME} config [-l] Open TUI to enable/disable package resources (Tab switches scope)
|
||||
${APP_NAME} <command> --help Show help for install/remove/uninstall/update/list/config
|
||||
|
||||
${chalk.bold("Options:")}
|
||||
--provider <name> Provider name (default: google)
|
||||
|
||||
@@ -3,16 +3,17 @@
|
||||
*/
|
||||
|
||||
import { ProcessTerminal, TUI } from "@earendil-works/pi-tui";
|
||||
import type { ResolvedPaths } from "../core/package-manager.ts";
|
||||
import type { SettingsManager } from "../core/settings-manager.ts";
|
||||
import { ConfigSelectorComponent } from "../modes/interactive/components/config-selector.ts";
|
||||
import { ConfigSelectorComponent, type ScopedResolvedPaths } from "../modes/interactive/components/config-selector.ts";
|
||||
import { initTheme, stopThemeWatcher } from "../modes/interactive/theme/theme.ts";
|
||||
|
||||
export interface ConfigSelectorOptions {
|
||||
resolvedPaths: ResolvedPaths;
|
||||
resolvedPaths: ScopedResolvedPaths;
|
||||
settingsManager: SettingsManager;
|
||||
cwd: string;
|
||||
agentDir: string;
|
||||
writeScope: "global" | "project";
|
||||
projectModeAvailable: boolean;
|
||||
}
|
||||
|
||||
/** Show TUI config selector and return when closed */
|
||||
@@ -44,6 +45,8 @@ export async function selectConfig(options: ConfigSelectorOptions): Promise<void
|
||||
},
|
||||
() => ui.requestRender(),
|
||||
ui.terminal.rows,
|
||||
options.writeScope,
|
||||
options.projectModeAvailable,
|
||||
);
|
||||
|
||||
ui.addChild(selector);
|
||||
|
||||
Reference in New Issue
Block a user