fix: Increase maximum read limit in read_file_content function

This commit is contained in:
Slipstream 2025-05-28 15:59:29 -06:00
parent cec4c6c60b
commit 2ad0855e52
Signed by: slipstream
GPG Key ID: 13E498CE010AC6FD

View File

@ -940,7 +940,7 @@ async def read_file_content(cog: commands.Cog, file_path: str) -> Dict[str, Any]
return f.read()
content = await asyncio.to_thread(sync_read)
max_len = 10000 # Increased limit for potentially larger reads
max_len = 1000000 # Increased limit for potentially larger reads
content_trunc = content[:max_len] + ('...' if len(content) > max_len else '')
print(f"--- UNSAFE READ: Successfully read {len(content)} bytes from {file_path}. Returning {len(content_trunc)} bytes. ---")
return {"status": "success", "file_path": file_path, "content": content_trunc}