mirror of
https://github.com/VectifyAI/PageIndex.git
synced 2026-07-24 21:41:04 +02:00
The server's chat/completions agent identifies documents by doc_name (api.py:3108-3112), not doc_id. The local agent tools used UUID-based doc_id, forcing the LLM to copy opaque strings and making same-name documents indistinguishable. - Agent tools now take doc_name (doc_id accepted as fallback) - _resolve: name→id within scope, ambiguity returns candidates - _sanitize_doc_name: mirrors server sanitize_filename (NFKC, whitespace collapse, 180-byte truncation with md5 suffix) - _dedupe_doc_name: a.pdf → a_1.pdf on collision, matching the server's _find_unique_key suffix scheme - _defang_delimiters: also collapses whitespace to block newline injection in the <docs> prompt block - System prompts and wrap_with_doc_context updated to name-first |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| cloud.py | ||
| local.py | ||
| protocol.py | ||