mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-27 17:56:25 +02:00
chore: ran linting
This commit is contained in:
parent
b8091114b5
commit
f38ea77940
14 changed files with 137 additions and 111 deletions
|
|
@ -91,9 +91,7 @@ class MemoryInjectionMiddleware(AgentMiddleware): # type: ignore[type-arg]
|
|||
|
||||
return {"messages": new_messages}
|
||||
|
||||
async def _load_user_memory(
|
||||
self, session: AsyncSession
|
||||
) -> tuple[str | None, bool]:
|
||||
async def _load_user_memory(self, session: AsyncSession) -> tuple[str | None, bool]:
|
||||
"""Return (memory_content, is_persisted).
|
||||
|
||||
When the user has no saved memory but has a display name, a seed
|
||||
|
|
@ -102,9 +100,7 @@ class MemoryInjectionMiddleware(AgentMiddleware): # type: ignore[type-arg]
|
|||
"""
|
||||
try:
|
||||
result = await session.execute(
|
||||
select(User.memory_md, User.display_name).where(
|
||||
User.id == self.user_id
|
||||
)
|
||||
select(User.memory_md, User.display_name).where(User.id == self.user_id)
|
||||
)
|
||||
row = result.one_or_none()
|
||||
if row is None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue