Skip to content

Conversation

@eli-bans
Copy link


name: Pull Request
about: Propose a change to the codebase

Summary of Changes

This pull request fixes the ask window toggle behavior and adds improved follow-up question functionality. The main changes include:

  • Fixed toggle behavior: When the ask window is already open, Ctrl+Enter now properly shows the text input for follow-up questions instead of doing nothing
  • Added close shortcut: New Ctrl+Escape shortcut to close the ask window
  • Enhanced follow-up functionality: After receiving an answer, users can easily ask follow-up questions using the same shortcut, maintaining context from the previous conversation
  • Updated UI components: Settings view now shows the new "Close Ask Window" shortcut

Related Issue

Contributor's Self-Review Checklist

Please check the boxes that apply. This is a reminder of what we look for in a good pull request.

  • I have read the CONTRIBUTING.md document.
  • My code follows the project's coding style and architectural patterns.
  • I have added or updated relevant tests for my changes.
  • I have updated the documentation to reflect my changes (if applicable).
  • My changes have been tested locally and are working as expected.

Technical Details

Files Modified:

  1. src/electron/windowManager.js:

    • Fixed ask window toggle logic to handle existing responses properly
    • Added closeAsk shortcut to default keybinds
    • Added shortcut handler for closing ask window
  2. src/features/ask/AskView.js:

    • Enhanced IPC message handling for improved functionality
    • Added new event listeners for better user experience
    • Improved text input behavior for follow-up questions
  3. src/features/settings/SettingsView.js:

    • Added "Close Ask Window" to main shortcuts display
  4. src/features/settings/ShortCutSettingsView.js:

    • Added closeAsk to display name map

Key Features:

  • Ctrl+Enter (Ask Anything):

    • If ask window is closed → Opens window and shows text input
    • If ask window is open with response → Shows text input for follow-up
    • If ask window is open without response → Shows text input for new question
  • Ctrl+Escape (Close Ask Window): Closes the ask window when it's open

  • Follow-up Questions: After receiving an answer, users can press Ctrl+Enter to show the text input and continue the conversation with context maintained

Additional Context

The implementation maintains backward compatibility and doesn't delete any existing functionality. All changes are additive and improve the user experience for iterative AI interactions. The ask window now provides a much better user experience for natural conversations with the AI about screen content and audio.

Testing

The changes have been tested locally and all functionality works as expected:

  • Toggle behavior works correctly in all scenarios
  • New close shortcut functions properly
  • Follow-up questions maintain context
  • Settings UI properly displays the new shortcut

@eli-bans eli-bans changed the title Attempt to fix issue #114 fix/ask window toggle behavior & improved follow-up question functionality Jul 11, 2025
@samtiz
Copy link
Contributor

samtiz commented Jul 11, 2025

Hi @eli-bans thank for contribution!

I did a quick test, and got stuck on ask UI not returning the message. Only loading indicator appears. But I'll bet the ai response actually came, because I got log
[AskService] DB: Saved assistant response to session
which only appears when it got full response from the server.

Could you look into it? Really appreciate for your effort.

P.S. recommend to merge with main first before dive into the work.

Screenshot 2025-07-11 at 6 02 17 PM

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adding a close shortcut for the ask window .

2 participants