feat: Implement initial backend indexer for vaults, supporting file system scanning, markdown parsing, and in-memory metadata indexing.
This commit is contained in:
parent
d76ad89f09
commit
d6ae501f51
@ -304,7 +304,8 @@ async def build_index(progress_callback=None) -> None:
|
|||||||
Notifies progress via the provided callback.
|
Notifies progress via the provided callback.
|
||||||
"""
|
"""
|
||||||
global index, vault_config
|
global index, vault_config
|
||||||
vault_config = load_vault_config()
|
vault_config.clear()
|
||||||
|
vault_config.update(load_vault_config())
|
||||||
|
|
||||||
global _index_generation
|
global _index_generation
|
||||||
with _index_lock:
|
with _index_lock:
|
||||||
|
|||||||
@ -604,7 +604,7 @@ async def api_vaults(current_user=Depends(require_auth)):
|
|||||||
result = []
|
result = []
|
||||||
for name, data in index.items():
|
for name, data in index.items():
|
||||||
if "*" in user_vaults or name in user_vaults:
|
if "*" in user_vaults or name in user_vaults:
|
||||||
v_type = vault_config.get(name, {}).get("type", "VAULT")
|
v_type = data.get("config", {}).get("type", "VAULT")
|
||||||
result.append({
|
result.append({
|
||||||
"name": name,
|
"name": name,
|
||||||
"file_count": len(data["files"]),
|
"file_count": len(data["files"]),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user