feat: add streaming unified review assistant

This commit is contained in:
leefer
2026-07-23 00:25:43 +08:00
parent 7d8d270e98
commit 0f4bed17c9
11 changed files with 638 additions and 1 deletions
+3 -1
View File
@@ -13,6 +13,7 @@ MEMBER_GET_PATHS = frozenset(
"/api/mentors/setup",
"/api/mentors/messages",
"/api/heaven/setup",
"/api/assistant/messages",
}
)
@@ -27,6 +28,7 @@ MEMBER_POST_PATHS = frozenset(
"/api/heaven/hexagram",
"/api/heaven/personal",
"/api/heaven/interpret",
"/api/assistant/chat",
}
)
@@ -54,7 +56,7 @@ def required_role(method: str, path: str) -> AccessRole:
if method == "DELETE":
if re.fullmatch(r"/api/heaven/sector-phases/.+", path):
return "admin"
if path == "/api/mentors/messages" or re.fullmatch(
if path in {"/api/mentors/messages", "/api/assistant/messages"} or re.fullmatch(
r"/api/screener/strategies/\d+", path
):
return "member"