fix(llm.gblib): Talk to data local db use fix.

This commit is contained in:
Rodrigo Rodriguez 2024-12-12 09:55:51 -03:00
parent 9cebd81a37
commit 1b40778d5e

View file

@ -1572,6 +1572,8 @@ export class KBService implements IGBKBService {
return filePath; // Return the saved file path
} else {
const parsedUrl = new URL(url);
// Get the last part of the URL path or default to 'index' if empty
const pathParts = parsedUrl.pathname.split('/').filter(Boolean); // Remove empty parts
const lastPath = pathParts.length > 0 ? pathParts[pathParts.length - 1] : 'index';