mirror of
https://github.com/open-webui/oikb.git
synced 2026-11-05 01:27:25 +00:00
[GH-ISSUE #24] Directory structure flattens into KB _root despite OWUI 0.9.6 supporting nested directories #16
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-webui/oikb#16
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dvystrcil on GitHub (Jun 4, 2026).
Original GitHub issue: https://github.com/open-webui/oikb/issues/24
Summary
When syncing a GitHub source whose tree has subdirectories (e.g.
wiki/homelab/,wiki/one-ring/,wiki/fiction/), oikb uploads all files into the Knowledge Base's_rootdirectory instead of mirroring the source's structure.Repro
Create an OWUI Knowledge Base
Configure an oikb source against a GitHub repo with nested directories:
Run sync against a repo whose
wiki/tree contains:Observed
All files land in OWUI's KB
_root:OWUI's
GET /api/v1/knowledge/{kb_id}/dirsreturns one directory created by oikb (thedirs/createcall is visible in the daemon's request log), but the file→directory association doesn't follow.Expected
The KB should mirror the source structure:
This matters for the
ENABLE_KB_EXECfilesystem tool (added in OWUI 0.9.6) — once enabled, the LLM can runls one-ring/entities/to get a focused subset rather thanlsreturning 86 files in one bucket. Flattening defeats that.Logs
I see one
POST /api/v1/knowledge/{kb_id}/dirs/createcall early in the sync, then 86POST /api/v1/files/calls — but no per-file directory-attach calls. Possibly missing adirectory_idfield in the file-attach payload?Environment
knowledge_directorytable +ENABLE_KB_EXECfilesystem tool)Happy to help with a PR if pointed at the right place in the codebase — the file→directory association is presumably in the upload/sync diff handler.
@aprudnev commented on GitHub (Jun 5, 2026):
Interesting but when I sync local (network actually) directories OIKB creates directory structure.. SO maybe this bug was for wiki only.
Thanks for ENABLE_KB_EXEC information.