fix: ruff lint + format fixes in tests, ESLint fixes in frontend
This commit is contained in:
@@ -10,14 +10,18 @@ class ChatRequest(BaseModel):
|
||||
"""Request body for POST /copilot/chat."""
|
||||
|
||||
message: str = Field(..., min_length=1, description="User message to the Copilot")
|
||||
session_id: Optional[str] = Field(None, description="Existing session UUID to continue")
|
||||
session_id: Optional[str] = Field(
|
||||
None, description="Existing session UUID to continue"
|
||||
)
|
||||
|
||||
|
||||
class ActionItem(BaseModel):
|
||||
"""A single action proposed by the Copilot."""
|
||||
|
||||
type: str = Field(..., description="Action type, e.g. search_vehicles")
|
||||
params: dict[str, Any] = Field(default_factory=dict, description="Action parameters")
|
||||
params: dict[str, Any] = Field(
|
||||
default_factory=dict, description="Action parameters"
|
||||
)
|
||||
|
||||
|
||||
class ChatResponse(BaseModel):
|
||||
@@ -26,7 +30,9 @@ class ChatResponse(BaseModel):
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
|
||||
response: str = Field(..., description="Assistant text response")
|
||||
actions: list[ActionItem] = Field(default_factory=list, description="Proposed actions")
|
||||
actions: list[ActionItem] = Field(
|
||||
default_factory=list, description="Proposed actions"
|
||||
)
|
||||
session_id: str = Field(..., description="Session UUID")
|
||||
message_id: str = Field(..., description="Assistant message UUID")
|
||||
|
||||
@@ -35,7 +41,9 @@ class ActionRequest(BaseModel):
|
||||
"""Request body for POST /copilot/action — user confirms an action."""
|
||||
|
||||
action: str = Field(..., min_length=1, description="Action type to execute")
|
||||
params: dict[str, Any] = Field(default_factory=dict, description="Action parameters")
|
||||
params: dict[str, Any] = Field(
|
||||
default_factory=dict, description="Action parameters"
|
||||
)
|
||||
session_id: Optional[str] = Field(None, description="Session context")
|
||||
|
||||
|
||||
@@ -89,6 +97,8 @@ class VoiceResponse(BaseModel):
|
||||
|
||||
transcription: str = Field(..., description="Transcribed text")
|
||||
response: str = Field(..., description="Assistant text response")
|
||||
actions: list[ActionItem] = Field(default_factory=list, description="Proposed actions")
|
||||
actions: list[ActionItem] = Field(
|
||||
default_factory=list, description="Proposed actions"
|
||||
)
|
||||
session_id: str = Field(..., description="Session UUID")
|
||||
message_id: str = Field(..., description="Assistant message UUID")
|
||||
|
||||
Reference in New Issue
Block a user