fix: update offline backend llmwiki support

This commit is contained in:
吉鑫升 committed 2026-08-13 11:17:11 +08:00
1 parent a4a1e73b8e
commit 4809ee7db3
9 files changed
+160 -9

No files matched your search

@@ -890,6 +890,28 @@ def test_weknora_iframe_proxy_is_fallback_after_deerflow_api_routes() -> None:
assert _first_gateway_match("GET", "/platform/knowledge-bases/remote-kb") == "/platform/{proxied_path:path}"
def test_weknora_iframe_hides_current_outer_sidebar_shell() -> None:
from app.gateway.routers import llmwiki as llmwiki_router
ctx = llmwiki_router.WeKnoraEmbedContext(
mapping_id="local-kb",
weknora_id="remote-kb",
user_id="user-a",
is_admin=False,
can_write=False,
exp=4_102_444_800,
)
injection = llmwiki_router._weknora_embed_injection(
allowed_path="/platform/knowledge-bases/remote-kb",
tab="wiki",
session={},
ctx=ctx,
)
assert "#app > .main > .aside_box" in injection
assert '".main > .aside_box"' in injection
def test_weknora_iframe_filters_kb_list_to_current_mapping() -> None:
from app.gateway.routers import llmwiki as llmwiki_router