Skip to content

Add API config persistence, thumbnails, and task logging#2

Open
shensz2017 wants to merge 4 commits into
mainfrom
codex/add-api-key-save-button-feature
Open

Add API config persistence, thumbnails, and task logging#2
shensz2017 wants to merge 4 commits into
mainfrom
codex/add-api-key-save-button-feature

Conversation

@shensz2017

Copy link
Copy Markdown
Owner

Motivation

  • Persist API credentials locally so users don't need to re-enter API Key and Base URL every launch.
  • Improve UX by showing uploaded image thumbnails in the task list for easier identification.
  • Surface request and download outcomes in the UI via a task log instead of only printing to stdout.

Description

  • Added a config.json file path (self.config_path) and implemented load_api_config and save_api_config with a 💾 保存 API Key button to persist base_url and api_key to disk and load them at startup.
  • Introduced a read-only QTextEdit task log (self.log_output) and an append_log helper to write timestamped messages for load/save, submit, failures, and download completion.
  • Added thumbnail support by storing image_path on task create and rendering scaled QPixmap thumbnails in a new Image column in the tasks table, and adjusted the table from 6 to 7 columns and moved the action widgets accordingly.
  • Enhanced submit and polling flows to append relevant messages to the log (submit failures, request failures, task failures, and download successes) and to record task url and local_path as before.
  • Imported QPixmap and minor UI tweaks for row height and button wiring to support the new features.

Testing

  • No automated tests were run for this change (not run).
  • Manual code inspection and local commits were used to verify the UI changes compiled into the single modified file sora2.py.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant