-
Notifications
You must be signed in to change notification settings - Fork 1k
feat: Enhance LLM logging and configuration options #979
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Updated `pyproject.toml` to modify PyQt5 version constraints and add PyQt5-Qt5 for Windows. - Introduced a logging mechanism for LLM requests and responses, including a new `request_logger.py` for managing logs. - Added a user interface for viewing LLM logs, allowing users to inspect request and response details. - Adjusted configuration settings to improve thread management and font options in the application. These changes improve the application's logging capabilities and user experience when interacting with LLM functionalities.
- Updated `pyproject.toml` to modify PyQt5 version constraints and add a Windows-specific dependency for PyQt5-Qt5. - Introduced a new logging mechanism for LLM requests, including a dedicated request logger to capture and store request and response details. - Added a user interface for viewing LLM logs, allowing users to inspect request details and responses. - Refined configuration settings, including adjustments to thread number limits and font settings for improved user experience. These enhancements improve the application's logging capabilities and provide users with better insights into LLM interactions.
- Updated `_get_video_info` function to return video resolution and duration, improving error handling for resolution extraction. - Refactored calls to `_get_video_info` in `render_rounded_video` to utilize the new duration data. - Streamlined code formatting for better readability across various functions in `rounded_renderer.py` and `subtitle_thread.py`. - Improved context handling in `SubtitleThread` for better subtitle optimization based on video file context. These changes enhance the functionality and maintainability of subtitle rendering and video processing features.
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on February 24
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
|
|
||
| # 如果没有已完成的,取第一个 | ||
| key = completed_key if completed_key else next(iter(_pending_requests)) | ||
| pending = _pending_requests.pop(key) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Race condition in concurrent LLM request logging
High Severity
The _pending_requests dictionary is accessed from multiple threads without synchronization. With concurrent LLM calls (via ThreadPoolExecutor with up to 50 threads), log_llm_response cannot correctly match responses to their originating requests—it simply picks any "completed" entry or the first one available. This causes incorrect request-response pairing in logs and potential dictionary modification errors during iteration.
Additional Locations (1)
| duration = 0.0 | ||
| if match := re.search(r"Duration:\s*(\d+):(\d+):(\d+(?:\.\d+)?)", result.stderr): | ||
| h, m, s = match.groups() | ||
| duration = int(h) * 3600 + int(m) * 60 + float(s) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing duration causes zero-length video output
High Severity
The _get_video_info function raises an error when resolution parsing fails but silently defaults duration to 0.0 when duration parsing fails. This value is then used in the ffmpeg command as -t 0.0, which truncates the output video to zero length. Videos without duration metadata or with unusual formats would produce corrupted zero-length output files with no error message.
Commits on Jan 26, 2026
feat: Enhance LLM logging and configuration options
@WEIFENG2333
WEIFENG2333 committed 2 days ago
Commits on Jan 28, 2026
feat: Enhance LLM logging and configuration options
@WEIFENG2333
WEIFENG2333 committed 39 minutes ago
feat: Enhance video information retrieval and subtitle rendering
@WEIFENG2333
WEIFENG2333 committed
Note
Introduces end-to-end LLM request logging with per-task context and a UI to inspect logs, plus stability improvements in subtitle rendering and task handling.
task_idacross the full flow; newllm.contextmanagestask_id/file/stagefor threadschat/completionsrequests/responses tollm_requests.jsonl; integrates response logging and caching; exposes a new "请求日志" page to view/search/paginate/copy logsSubtitleThread, prefixes custom prompts with file context, minor env/progress cleanups-t <duration>in ffmpeg overlay batches to prevent truncation; refactors video info parsing and command executionLXGW WenKai; translateThreadNummax reduced to 50SubtitleConfigand accepts externaltask_idPyQt5-Qt5(Windows) andfonttoolsWritten by Cursor Bugbot for commit 9d66d6a. This will update automatically on new commits. Configure here.