core: add explore agent for fast codebase navigation and improve task UI display

This commit is contained in:
Dax Raad
2025-11-28 21:13:07 -05:00
parent a4f3aecbaa
commit 813d287a09
5 changed files with 60 additions and 2 deletions

View File

@@ -677,6 +677,21 @@ export namespace Provider {
}
}
export async function closest(providerID: string, query: string[]) {
const s = await state()
const provider = s.providers[providerID]
if (!provider) return undefined
for (const item of query) {
for (const modelID of Object.keys(provider.info.models)) {
if (modelID.includes(item))
return {
providerID,
modelID,
}
}
}
}
export async function getSmallModel(providerID: string) {
const cfg = await Config.get()