Refactor Application Structure & Add Session Management#15
Refactor Application Structure & Add Session Management#15google-labs-jules[bot] wants to merge 3 commits intomainfrom
Conversation
Bumps the pip group with 4 updates in the / directory: [requests](https://github.com/psf/requests), [certifi](https://github.com/certifi/python-certifi), [h11](https://github.com/python-hyper/h11) and [urllib3](https://github.com/urllib3/urllib3). Updates `requests` from 2.32.3 to 2.32.4 - [Release notes](https://github.com/psf/requests/releases) - [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md) - [Commits](psf/requests@v2.32.3...v2.32.4) Updates `certifi` from 2024.6.2 to 2024.7.4 - [Commits](certifi/python-certifi@2024.06.02...2024.07.04) Updates `h11` from 0.14.0 to 0.16.0 - [Commits](python-hyper/h11@v0.14.0...v0.16.0) Updates `urllib3` from 2.2.2 to 2.5.0 - [Release notes](https://github.com/urllib3/urllib3/releases) - [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst) - [Commits](urllib3/urllib3@2.2.2...2.5.0) --- updated-dependencies: - dependency-name: requests dependency-version: 2.32.4 dependency-type: direct:production dependency-group: pip - dependency-name: certifi dependency-version: 2024.7.4 dependency-type: indirect dependency-group: pip - dependency-name: h11 dependency-version: 0.16.0 dependency-type: indirect dependency-group: pip - dependency-name: urllib3 dependency-version: 2.5.0 dependency-type: indirect dependency-group: pip ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…12) Bumps the pip group with 1 update in the / directory: [urllib3](https://github.com/urllib3/urllib3). Updates `urllib3` from 2.5.0 to 2.6.0 - [Release notes](https://github.com/urllib3/urllib3/releases) - [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst) - [Commits](urllib3/urllib3@2.5.0...2.6.0) --- updated-dependencies: - dependency-name: urllib3 dependency-version: 2.6.0 dependency-type: indirect dependency-group: pip ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more at jules.google/docs. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e7b417ac7d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if not file_path: | ||
| return | ||
|
|
||
| filename = os.path.basename(file_path) |
There was a problem hiding this comment.
Save sessions to the chosen path
The save dialog returns a full file_path, but this code strips it down to basename before handing it to SessionManager, which always writes under its fixed sessions_dir. If a user chooses a different directory, the session will be saved somewhere else (and could overwrite a same‑named session in ./sessions), making the UI’s selected path misleading. This is most visible when the user navigates outside the default sessions folder in the save dialog.
Useful? React with 👍 / 👎.
| filename = os.path.basename(file_path) | ||
|
|
||
| success, result = self.conversation_manager.session_manager.load_session(filename) |
There was a problem hiding this comment.
Load sessions from the chosen path
The open dialog returns a full file_path, but only the basename is used when loading, so SessionManager always looks in ./sessions. If a user selects a JSON file outside that folder (or if there is a different file with the same name in ./sessions), the app will load the wrong session or fail with “file not found.” This happens specifically when the chosen file isn’t in the default sessions directory.
Useful? React with 👍 / 👎.
Refactored the monolithic
gui.pyandmain.pyinto a modular structure undersrc/.src/core: Business logic (ConversationManager,Worker,SessionManager).src/ui: GUI components broken down intomain_window,conversation_pane,control_panel,sidebar, andwidgets.src/services: API handling (llm_service,media_service,html_generator).src/utils: Helper functions.Added
SessionManagerto enable saving and loading conversation sessions to/from JSON files.Added
run.pyas the entry point.Cleaned up legacy files (
gui.py,main.py,shared_utils.py,config.py,command_parser.py).PR created automatically by Jules for task 6210710597527770413 started by @QRcode1337