feat: 智能体详情新增「最近对话」列表,完善推荐问题与任务深链配置
- 新增 AgentRecentChats 组件,在智能体详情面板底部按 agent_id 展示最近对话 - 调整问答/智能体侧边栏与最近对话列表展示逻辑 - 补充 dashboard-input、task-deeplink 相关配置与线程工具方法 - 后端推荐问题接口标签处理及 position_sync 微调,新增相关测试 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
16ba5deb0e
commit
32476c7ad4
18 files changed
+457
-60
No files matched your search
+11
-6
@@ -16,8 +16,11 @@ Resolution rule (per resource type):
|
||||
- ``scheduled_task`` → empty (no built-in tasks)
|
||||
- ``skill`` → empty (the 广场 still shows every visible skill;
|
||||
a position only *adds* its tagged skills to the member's "我的技能")
|
||||
- ``recommended_question`` → *unrestricted* (handled at query time, never
|
||||
materialized — see :meth:`resolve_visible`)
|
||||
- ``recommended_question`` → *untagged-only* (handled at query time, never
|
||||
materialized — see :meth:`resolve_visible`). The default set is the
|
||||
questions carrying **no** 标签; tagged questions surface only for a position
|
||||
that binds their tag. (The recommended-questions router interprets a
|
||||
``None`` from :meth:`resolve_visible` as "show only untagged".)
|
||||
|
||||
Materialization (``sync_user``) only ever touches rows it created itself
|
||||
(``origin='position'``), so a user's own favorites / subscriptions are never
|
||||
@@ -67,12 +70,14 @@ class PositionSyncService:
|
||||
return await self._positions.get_default_position_id()
|
||||
|
||||
async def resolve_visible(self, user_id: str, resource_type: str) -> set[str] | None:
|
||||
"""Return the set of visible ``resource_type`` ids, or ``None`` = unrestricted.
|
||||
"""Return the set of visible ``resource_type`` ids, or ``None`` = no tag binding.
|
||||
|
||||
Used by the recommended-questions filter (the only remaining query-time
|
||||
visibility type; skills are now *materialized*, not filtered). ``None``
|
||||
means "no position restriction → show everything"; a set means "restrict
|
||||
to exactly these ids".
|
||||
visibility type; skills are now *materialized*, not filtered). A set
|
||||
means "restrict to exactly these ids". ``None`` means the effective
|
||||
position binds no tag for this type — the recommended-questions router
|
||||
treats that as "默认岗位 → show only untagged questions" (see
|
||||
``app/gateway/routers/recommended_questions.py``).
|
||||
"""
|
||||
pid = await self._effective_position_id(user_id)
|
||||
if not pid:
|
||||
|
||||
Reference in new issue
Block a user