fix: vfs.search() and vfs.findSimilar() now filter for VFS files only
- Added 'vfsType: file' filter to vfs.search() to exclude knowledge documents - Added 'vfsType: file' filter to vfs.findSimilar() for consistency - Fixed test failures caused by knowledge entities lacking .path property - All 8 VFS API wiring tests now passing This ensures API consistency - VFS search methods only return VFS entities with proper path metadata, never knowledge documents.
This commit is contained in:
parent
ce8530b714
commit
0dda9dc56f
2 changed files with 37 additions and 4 deletions
|
|
@ -955,7 +955,10 @@ export class VirtualFileSystem implements IVirtualFileSystem {
|
|||
limit: options?.limit || 10,
|
||||
offset: options?.offset,
|
||||
explain: options?.explain,
|
||||
includeVFS: true // v4.4.0: VFS search must include VFS entities!
|
||||
includeVFS: true, // v4.4.0: VFS search must include VFS entities!
|
||||
where: {
|
||||
vfsType: 'file' // v4.4.0: Only search VFS files, not knowledge documents
|
||||
}
|
||||
}
|
||||
|
||||
// Add path filter if specified
|
||||
|
|
@ -1003,7 +1006,10 @@ export class VirtualFileSystem implements IVirtualFileSystem {
|
|||
limit: options?.limit || 10,
|
||||
threshold: options?.threshold || 0.7,
|
||||
type: [NounType.File, NounType.Document, NounType.Media],
|
||||
includeVFS: true // v4.4.0: VFS similarity search must include VFS entities!
|
||||
includeVFS: true, // v4.4.0: VFS similarity search must include VFS entities!
|
||||
where: {
|
||||
vfsType: 'file' // v4.4.0: Only find similar VFS files, not knowledge documents
|
||||
}
|
||||
})
|
||||
|
||||
return results.map(r => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue