Open
Conversation
This commit introduces a new 'Deep Thinking Panel' to the Gemini Desktop Agent.
Features:
- A new QTextEdit panel (`deep_thinking_panel`) is added to the UI, displayed alongside the main chat and context panels.
- The panel shows raw responses or detailed information from the Gemini API for both successful results and errors. This provides insight into the AI's processing.
- A toggle button ('Toggle Deep Thinking Panel') is added to the left panel, allowing users to show or hide this new panel as needed.
- Splitter sizes have been adjusted to accommodate the new panel.
- `handle_gemini_finished` and `handle_gemini_error` methods were updated to populate the deep thinking panel.
This commit introduces a multi-step deep thinking process for the Gemini Desktop Agent, allowing users to see the AI's reasoning process.
Features:
- Added a 'Enable Multi-Step Thinking' checkbox to the UI. When checked, Gemini will first generate initial thoughts and then a refined answer.
- `GeminiRunnable` now includes a `thinking_step` parameter.
- `process_gemini_query` is updated to:
- Check the multi-step thinking checkbox.
- Modify the initial prompt to ask for step-by-step thoughts if multi-step is enabled.
- Manage `thinking_step`, `max_thinking_steps`, and `accumulated_thoughts` in `current_iteration_data`.
- `handle_gemini_finished` is updated to:
- Display intermediate thoughts in the `deep_thinking_panel` for each step.
- Construct new prompts for refinement steps (e.g., "Previous thoughts: ... Now refine...").
- Trigger subsequent calls to `process_gemini_query` for each thinking step.
- Ensure plugin calls are handled within the context of the current thinking step.
- Display only the final refined answer in the main chat area when multi-step is enabled.
- `handle_gemini_error` now logs errors with thinking step information in the `deep_thinking_panel` and provides a user-facing error in the main chat.
- The `deep_thinking_panel` now clearly delineates between different thinking steps and displays full response objects for each stage.
- WorkerSignals and relevant slots updated to pass `thinking_step`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.