fix(cli): applied search provider settings
Initialized standalone search commands with configured web-search provider globals before resolving the implicit provider chain. Fixes #3793
This commit is contained in:
@@ -4,8 +4,10 @@
|
||||
* Handles `omp q`/`omp web-search` subcommands for testing web search providers.
|
||||
*/
|
||||
|
||||
import { APP_NAME } from "@oh-my-pi/pi-utils";
|
||||
import { APP_NAME, getProjectDir } from "@oh-my-pi/pi-utils";
|
||||
import chalk from "chalk";
|
||||
import { applyProviderGlobalsFromSettings } from "../config/provider-globals";
|
||||
import { Settings } from "../config/settings";
|
||||
import { initTheme, theme } from "../modes/theme/theme";
|
||||
import { runSearchQuery, type SearchQueryParams } from "../web/search/index";
|
||||
import { SEARCH_PROVIDER_ORDER } from "../web/search/provider";
|
||||
@@ -85,6 +87,9 @@ export async function runSearchCommand(cmd: SearchCommandArgs): Promise<void> {
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const settings = await Settings.init({ cwd: getProjectDir() });
|
||||
applyProviderGlobalsFromSettings(settings);
|
||||
|
||||
await initTheme();
|
||||
|
||||
const params: SearchQueryParams = {
|
||||
|
||||
Reference in New Issue
Block a user