refactor: 重构聊天模块支持 SSE 断线重连及用户上下文隔离

This commit is contained in:
zl-q
2026-03-30 09:06:10 +08:00
parent 1aac62f39e
commit 4285b4ec80
28 changed files with 1624 additions and 658 deletions
@@ -77,7 +77,7 @@ def test_create_schedule_item_returns_201() -> None:
source_type=ScheduleItemSourceType.MANUAL,
created_at=datetime(2026, 2, 27, 10, 0, 0, tzinfo=timezone.utc),
updated_at=datetime(2026, 2, 27, 10, 0, 0, tzinfo=timezone.utc),
permission=7,
permission=15,
is_owner=True,
)
@@ -110,7 +110,7 @@ def test_list_schedule_items_returns_200() -> None:
source_type=ScheduleItemSourceType.MANUAL,
created_at=datetime(2026, 2, 27, 10, 0, 0, tzinfo=timezone.utc),
updated_at=datetime(2026, 2, 27, 10, 0, 0, tzinfo=timezone.utc),
permission=7,
permission=15,
is_owner=True,
)
@@ -145,7 +145,7 @@ def test_get_schedule_item_returns_200() -> None:
source_type=ScheduleItemSourceType.MANUAL,
created_at=datetime(2026, 2, 27, 10, 0, 0, tzinfo=timezone.utc),
updated_at=datetime(2026, 2, 27, 10, 0, 0, tzinfo=timezone.utc),
permission=7,
permission=15,
is_owner=True,
)
@@ -173,7 +173,7 @@ def test_update_schedule_item_returns_200() -> None:
source_type=ScheduleItemSourceType.MANUAL,
created_at=datetime(2026, 2, 27, 10, 0, 0, tzinfo=timezone.utc),
updated_at=datetime(2026, 2, 27, 10, 0, 0, tzinfo=timezone.utc),
permission=7,
permission=15,
is_owner=True,
)
@@ -204,7 +204,7 @@ def test_delete_schedule_item_returns_204() -> None:
source_type=ScheduleItemSourceType.MANUAL,
created_at=datetime(2026, 2, 27, 10, 0, 0, tzinfo=timezone.utc),
updated_at=datetime(2026, 2, 27, 10, 0, 0, tzinfo=timezone.utc),
permission=7,
permission=15,
is_owner=True,
)