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

Sync state #272

Merged
merged 3 commits into from
Feb 21, 2025
Merged

Sync state #272

merged 3 commits into from
Feb 21, 2025

Conversation

nang-dev
Copy link

@nang-dev nang-dev commented Feb 20, 2025

trypear/pearai-app#189


Important

Renamed commands in package.json and commands.ts, and added error handling for sidebar focus in PearAI VSCode extension.

  • Command Renaming:
    • Rename pearai.focusCreatorView to pearai.focusAgentView in package.json and commands.ts.
    • Rename Focus PearAI Creator View to Focus PearAI Agent View in package.json.
    • Rename Focus PearAI Memory 0 View to Focus PearAI Memory View in package.json.
  • Command Implementation:
    • Update pearai.focusAgentView, pearai.focusPearAIMem0View, pearai.focusPearAISearchView, pearai.focusContinueInput, and pearai.focusContinueInputWithoutClear in commands.ts to include error handling for sidebar focus.
  • Misc:
    • Add error logging for failed sidebar focus attempts in commands.ts.

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

@nang-dev nang-dev marked this pull request as ready for review February 21, 2025 05:28
@nang-dev nang-dev requested review from Fryingpannn and a team as code owners February 21, 2025 05:28
@nang-dev nang-dev merged commit 4a2ea87 into main Feb 21, 2025
2 checks passed
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.

❌ Changes requested. Reviewed everything up to 5778293 in 3 minutes and 49 seconds

More details
  • Looked at 81 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 13 drafted comments based on config settings.
1. extensions/vscode/package.json:194
  • Draft comment:
    Rename updated to 'pearai.focusAgentView' and title accordingly. Verify consistency with other areas.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50%
    The comment is asking the PR author to verify consistency with other areas, which violates the rule against asking the author to double-check things. It does not provide a specific suggestion or point out a specific issue.
2. extensions/vscode/package.json:209
  • Draft comment:
    Title changed from 'Focus PearAI Memory 0 View' to 'Focus PearAI Memory View'. Confirm intended removal of reference '0'.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
3. extensions/vscode/src/commands.ts:398
  • Draft comment:
    Similarly, for 'pearai.focusPearAIMem0View', await the command execution to properly catch async errors.
  • Reason this comment was not posted:
    Comment was on unchanged code.
4. extensions/vscode/src/commands.ts:406
  • Draft comment:
    For the 'focusPearAISearchView' command, consider awaiting the vscode.commands.executeCommand call inside the try block.
  • Reason this comment was not posted:
    Comment was on unchanged code.
5. extensions/vscode/src/commands.ts:414
  • Draft comment:
    For 'pearai.focusContinueInput', consider awaiting the async command call in the try block to catch any errors.
  • Reason this comment was not posted:
    Marked as duplicate.
6. extensions/vscode/src/commands.ts:431
  • Draft comment:
    Similarly, in 'pearai.focusContinueInputWithoutClear', await the executeCommand inside try block.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
7. extensions/vscode/package.json:194
  • Draft comment:
    Renamed command from 'pearai.focusCreatorView' to 'pearai.focusAgentView'. Ensure all references (code & docs) reflect this change.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 0% vs. threshold = 50%
    This is a speculative comment asking the author to verify something. It's asking them to double-check their work rather than pointing out a specific issue. The comment starts with "Ensure that..." which is a red flag according to our rules. While updating references is important, we should only comment if we found an actual missed reference that needs updating.
    Maybe there are actual missed references in the codebase that need updating? The full context of other files could reveal places where this command name is still used.
    According to the rules, we should ignore cross-file issues and only comment if we see strong evidence of an actual problem. Asking authors to verify their work without pointing to specific issues is not helpful.
    This comment should be deleted as it's speculative and asks for verification without pointing to specific issues.
8. extensions/vscode/package.json:209
  • Draft comment:
    Updated Memory view title by removing the redundant '0'. This improves clarity.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50%
    This comment is purely informative and does not provide any actionable feedback or suggestions for improvement. It simply states what was changed without offering any insight or critique.
9. extensions/vscode/src/commands.ts:389
  • Draft comment:
    The executeCommand call inside the try-catch is not awaited. Since executeCommand returns a promise, consider awaiting it (or refactoring into a helper) to properly catch asynchronous errors.
  • Reason this comment was not posted:
    Marked as duplicate.
10. extensions/vscode/src/commands.ts:398
  • Draft comment:
    Similar try-catch blocks for focusing 'memory', 'search', and 'chat' views also lack 'await'. Consider consolidating this pattern (possibly via a helper) to ensure proper error handling for all asynchronous executeCommand calls.
  • Reason this comment was not posted:
    Marked as duplicate.
11. extensions/vscode/src/commands.ts:995
  • Draft comment:
    The WSL patch command uses shell command substitution ($(wslpath ...)). Verify that this syntax is compatible with the intended WSL shell environment, ensuring proper quoting and execution.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
12. extensions/vscode/package.json:210
  • Draft comment:
    There's an inconsistency between the command identifier and its title: the command remains as 'pearai.focusPearAIMem0View' while the displayed title is now 'Focus PearAI Memory View'. Consider renaming the command to something like 'pearai.focusPearAIMemoryView' for consistency.
  • Reason this comment was not posted:
    Comment was on unchanged code.
13. extensions/vscode/src/commands.ts:390
  • Draft comment:
    Typo alert: The error message 'Failed to focus pearai-roo-cline sidebar:' uses 'roo-cline' which appears to be an artifact from previous naming conventions. Consider updating it to match the new command nomenclature if needed.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 0% vs. threshold = 50%
    The comment assumes "roo-cline" is a typo or old artifact, but looking at the code, "pearai-roo-cline" is actually the intended command name being used. The error message correctly matches the command it's trying to execute. Therefore, this comment is incorrect in assuming it's a naming artifact that needs to be updated.
    Could there be some broader context where "roo-cline" really is an old name that should be updated everywhere, including in the new command name itself?
    Even if "roo-cline" is an old name, the error message must match the actual command name being used. The comment is wrong to suggest updating just the error message.
    The comment should be deleted because it incorrectly assumes "roo-cline" is a typo when it's actually the correct command name being referenced in the error message.

Workflow ID: wflow_v3KVzSWTOnDQK3IQ


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

} catch (e) {
console.error("Failed to focus pearai-roo-cline sidebar:", e);
}
vscode.commands.executeCommand("pearai-roo-cline.SidebarProvider.focus");
Copy link

Choose a reason for hiding this comment

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

Consider awaiting the executeCommand call inside try-catch so errors on promise rejection are caught.

Suggested change
vscode.commands.executeCommand("pearai-roo-cline.SidebarProvider.focus");
await vscode.commands.executeCommand("pearai-roo-cline.SidebarProvider.focus");

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.

1 participant