- Added a new modal for reporting bugs, including fields for describing the issue and attaching files. - Implemented backend API for creating bug reports, including rate limiting and metadata logging. - Introduced a new database table to track bug report submissions for auditing purposes. - Enhanced the frontend to capture screenshots automatically and allow manual file uploads. - Added error handling and user feedback for the bug reporting process. - Updated existing templates and scripts to integrate the new bug reporting functionality.
21 lines
705 B
Python
21 lines
705 B
Python
from typing import Any, Dict, List, Optional
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class BugReportPayload(BaseModel):
|
|
actual: str = Field(..., min_length=3, max_length=8000)
|
|
expected: str = Field(..., min_length=3, max_length=8000)
|
|
screenshot_base64: Optional[str] = Field(default=None, max_length=25_000_000)
|
|
metadata: Dict[str, Any] = Field(default_factory=dict)
|
|
logs: List[Dict[str, Any]] = Field(default_factory=list)
|
|
extra_file_name: Optional[str] = Field(default=None, max_length=255)
|
|
extra_file_base64: Optional[str] = Field(default=None, max_length=25_000_000)
|
|
|
|
|
|
class BugReportResult(BaseModel):
|
|
success: bool
|
|
sag_id: int
|
|
case_url: str
|
|
message: str
|