chore: fix all ruff lint errors + format — 0 errors, 306 tests pass
This commit is contained in:
@@ -7,12 +7,11 @@ import uuid
|
||||
from fastapi import APIRouter, Depends, HTTPException, Query, status
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
from app.core.auth import check_permission
|
||||
from app.core.db import get_db
|
||||
from app.deps import get_current_user
|
||||
from app.schemas.ai_copilot import (
|
||||
CopilotQueryRequest,
|
||||
CopilotExecuteRequest,
|
||||
CopilotQueryRequest,
|
||||
)
|
||||
from app.services import ai_copilot_service
|
||||
|
||||
@@ -34,7 +33,9 @@ async def copilot_query(
|
||||
user_id = uuid.UUID(current_user["user_id"])
|
||||
|
||||
result = await ai_copilot_service.process_query(
|
||||
db, tenant_id, user_id,
|
||||
db,
|
||||
tenant_id,
|
||||
user_id,
|
||||
query=body.query,
|
||||
conversation_id=body.conversation_id,
|
||||
context=body.context,
|
||||
@@ -65,7 +66,10 @@ async def copilot_execute(
|
||||
role = current_user.get("role", "viewer")
|
||||
|
||||
result = await ai_copilot_service.execute_action(
|
||||
db, tenant_id, user_id, role,
|
||||
db,
|
||||
tenant_id,
|
||||
user_id,
|
||||
role,
|
||||
conversation_id=body.conversation_id,
|
||||
action=body.action.model_dump(),
|
||||
)
|
||||
@@ -97,6 +101,9 @@ async def copilot_history(
|
||||
user_id = uuid.UUID(current_user["user_id"])
|
||||
|
||||
return await ai_copilot_service.get_history(
|
||||
db, tenant_id, user_id,
|
||||
page=page, page_size=page_size,
|
||||
db,
|
||||
tenant_id,
|
||||
user_id,
|
||||
page=page,
|
||||
page_size=page_size,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user