Skip to content
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

[FIX] Current File Path Issue with Output Console #255

Conversation

charlwillia6
Copy link

@charlwillia6 charlwillia6 commented Jan 31, 2025

Description ✏️

Fixes an issue where the Current File would change to extension-output-pearai.pearai-#1-PearAI if you clicked on the output console or the output console tab.

image

This fix will make sure that only valid file paths are allowed and shown for the Current File feature.

Checklist ✅

  • I have added screenshots (if UI changes are present).
  • I have done a self-review of my code.
  • I have manually tested my code (if applicable).

Important

Fixes invalid current file path issue when interacting with VSCode output console by ensuring only valid file paths are set.

  • Behavior:
    • Fixes issue where clicking the output console changed the current file path to an invalid path in VsCodeIde class in ideProtocol.ts.
    • Ensures only valid file paths are set in setActiveFilePath in uiStateSlice.ts.
  • Code Changes:
    • Adds check for editor?.document.uri.scheme === 'file' in onDidChangeActiveTextEditor in ideProtocol.ts.
    • Updates setActiveFilePath to only set non-empty strings in uiStateSlice.ts.

This description was created by Ellipsis for 89fa444. It will automatically update as commits are pushed.

cwilliams and others added 26 commits October 27, 2024 20:28
Prevents invalid file paths from appearing in the Current File button when
clicking on non-file editors like Output panel or Terminal. Now checks
editor's URI scheme to ensure it's a valid file before updating the active
file path.
@charlwillia6 charlwillia6 requested review from nang-dev, Fryingpannn and a team as code owners January 31, 2025 16:22
Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Reviewed everything up to 89fa444 in 11 seconds

More details
  • Looked at 27 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. gui/src/redux/slices/uiStateSlice.ts:61
  • Draft comment:
    The comment can be improved for clarity. Consider changing it to: // Set active file path only if it's a non-empty string
  • Reason this comment was not posted:
    Confidence changes required: 10%
    The change in the setActiveFilePath reducer is correct, but the comment can be improved for clarity.

Workflow ID: wflow_gmd47qpwChcUcQbn


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@Himanshu-Singh-Chauhan Himanshu-Singh-Chauhan merged commit 47242a3 into trypear:main Jan 31, 2025
3 checks passed
nang-dev pushed a commit that referenced this pull request Feb 4, 2025
Prevents invalid file paths from appearing in the Current File button when
clicking on non-file editors like Output panel or Terminal. Now checks
editor's URI scheme to ensure it's a valid file before updating the active
file path.

Co-authored-by: cwilliams <[email protected]>
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.

2 participants