Default bootstrap query when none is provided

This commit is contained in:
Paco POR-CORREO 2026-04-06 19:00:27 +02:00
parent 02798085b1
commit 3f38fe1d6c

View file

@ -93,6 +93,15 @@ function rankItems(query: string, items: RetrieveResponse["items"]): RetrieveRes
function buildBootstrapQueries(query: string): string[] { function buildBootstrapQueries(query: string): string[] {
const cleaned = normalizeQuery(query); const cleaned = normalizeQuery(query);
if (!cleaned) {
return [
"dame un mapa inicial del dominio y sus ideas principales",
"documentacion principal y estructura general",
"temas base y puntos importantes a tener presentes",
"referencias principales para profundizar despues"
];
}
return unique([ return unique([
cleaned, cleaned,
`${cleaned} mapa general`, `${cleaned} mapa general`,