2 Commits

Author SHA1 Message Date
Bingxi Zhao (Frank)
2739a28871 fix(knowledge): keep same-named documents instead of dropping one
Builds on #899, which stopped a linked folder's subdirectories from
collapsing into raw/'s top level. Preserving structure removes most name
clashes but not the one #866 actually hit: a folder too large to sync at
once is added one subfolder at a time, and each batch roots at its own
folder, so `cli/README.md` and `events/README.md` both want raw/README.md.
The second was skipped as a "filename collision" — a document the user
asked to index, dropped with nothing in the response to say so.

A clash between different bytes now stages under a free sibling name.
Identical bytes still recover the staged copy, and content-level dedup via
file_hashes is untouched, so a repeated sync neither duplicates nor churns.
The staging log also reports the path a file actually landed at rather than
its source basename, which is no longer the same thing.
2026-08-20 00:56:34 +08:00
Amir Fathi
3c20bb9251 fix(knowledge): preserve source-relative directory structure when syncing linked folders (#899)
Fixes #866. DocumentAdder staged every externally-sourced file at raw/<basename>, collapsing a linked folder's subdirectories and colliding same-named files. Pass the sync root through so each file stages at its path relative to it.
2026-08-19 23:37:33 +08:00