mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-29 06:20:06 +00:00
fix(settings): stabilize websearch and quota checks
This commit is contained in:
@@ -180,14 +180,11 @@ export function getCliInstallHints(): string[] {
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get WebSearch readiness status for display.
|
||||
*/
|
||||
export function getWebSearchReadiness(): WebSearchStatus {
|
||||
const wsConfig = getWebSearchConfig();
|
||||
const providers = getWebSearchCliProviders();
|
||||
|
||||
if (!wsConfig.enabled) {
|
||||
export function buildWebSearchReadiness(
|
||||
enabled: boolean,
|
||||
providers: WebSearchCliInfo[]
|
||||
): WebSearchStatus {
|
||||
if (!enabled) {
|
||||
return {
|
||||
readiness: 'unavailable',
|
||||
message: 'Disabled in config',
|
||||
@@ -223,6 +220,15 @@ export function getWebSearchReadiness(): WebSearchStatus {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Get WebSearch readiness status for display.
|
||||
*/
|
||||
export function getWebSearchReadiness(): WebSearchStatus {
|
||||
const wsConfig = getWebSearchConfig();
|
||||
const providers = getWebSearchCliProviders();
|
||||
return buildWebSearchReadiness(wsConfig.enabled, providers);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display WebSearch status (single line, equilibrium UX).
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user