-
Notifications
You must be signed in to change notification settings - Fork 183
agent overlay init #221
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
base: main
Are you sure you want to change the base?
agent overlay init #221
Conversation
There was a problem hiding this 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 01c1647 in 3 minutes and 4 seconds
More details
- Looked at
900
lines of code in6
files - Skipped
0
files when reviewing. - Skipped posting
13
drafted comments based on config settings.
1. src/vs/workbench/browser/parts/overlayAgent/agentOverlayPart.ts:3
- Draft comment:
Update or remove outdated comments referencing 'pearai' and design issues; rename CSS classes and variables to match the new agent overlay naming for clarity and consistency. - 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 has two parts: 1) Renaming pearai identifiers which seems reasonable since this is a new file for agent overlay, 2) Removing design comments. The renaming suggestion is actionable and clear. The design comments actually seem current and relevant - they're discussing issues with this exact overlay implementation. They shouldn't be removed.
The comment assumes the design comments are outdated without evidence. It also bundles two separate concerns (renaming and comment removal) into one comment.
While the renaming suggestion has merit, I should not recommend removing seemingly relevant design comments. The comment would be better focused just on the naming consistency issue.
The comment should be rejected as written since it incorrectly suggests removing relevant design comments. A new focused comment about renaming pearai identifiers could be valuable.
2. src/vs/workbench/browser/workbench.ts:357
- Draft comment:
Agent overlay service initialization is correctly invoked. Verify that similar initialization patterns are applied consistently. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
3. src/vs/workbench/services/layout/browser/layoutService.ts:31
- Draft comment:
Addition of AGENTOVERLAY_PART to the Parts enum appears correct. No further action needed. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
4. src/vs/workbench/browser/parts/overlayAgent/agentOverlayActions.ts:1
- Draft comment:
Remove or clarify unused commented‐out action code. If these actions are deprecated, delete them or add a TODO comment. - Reason this comment was not posted:
Marked as duplicate.
5. src/vs/workbench/browser/parts/overlayAgent/agentOverlayPart.ts:353
- Draft comment:
Replace 'PearAI' in log messages with a name consistent with Agent Overlay to avoid confusion. - Reason this comment was not posted:
Marked as duplicate.
6. src/vs/workbench/browser/parts/overlayAgent/agentOverlayPart.ts:309
- Draft comment:
Avoid attaching a click event listener on fullScreenOverlay each time open() is called. Consider registering the listener once during initialization to prevent multiple listeners accumulating. - Reason this comment was not posted:
Marked as duplicate.
7. src/vs/workbench/browser/parts/overlayAgent/agentOverlayService.ts:25
- Draft comment:
Update documentation and command identifiers to refer to 'Agent Overlay' rather than 'PearAI'. The current docs and command IDs (e.g. pearai.showAgentOverlay) are inconsistent with the new naming. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
This comment is purely informative, suggesting an update to documentation and command identifiers to reflect a naming change. It doesn't provide a specific code suggestion or ask for a test to be written. It doesn't align with the rules for good comments.
8. src/vs/workbench/browser/layout.ts:1524
- Draft comment:
Typo: The agent overlay container is assigned the class 'pearoverlay-part-container'. This appears to be a copy-paste error; it should likely use a class name such as 'agentoverlay-part-container' to avoid confusion. - Reason this comment was not posted:
Marked as duplicate.
9. src/vs/workbench/browser/parts/overlayAgent/agentOverlayPart.ts:4
- Draft comment:
Typographical error: Consider changing "its not maintainable and iterable." to "it's not maintainable and iterable." for improved clarity. - 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 very minor grammatical fix in a comment. The comment block appears to be an informal TODO list or note to another developer (addressed to "@Himanshu"). The grammatical error doesn't impact code functionality or readability. Comments are typically more informal and don't need perfect grammar. This seems like unnecessary nitpicking.
The grammatical error could be seen as unprofessional, and fixing it would improve code quality in a small way. Some teams do care about comment quality.
While professional quality is important, this comment block is clearly an informal TODO/note between developers. The grammatical fix is too minor to warrant a PR comment, especially given the informal nature of the block.
Delete this comment. Fixing grammar in an informal TODO comment is too minor and not worth a PR comment.
10. src/vs/workbench/browser/parts/overlayAgent/agentOverlayPart.ts:5
- Draft comment:
Typographical error: Consider correcting "Simplyfy this." to "Simplify this.". - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50%
While the spelling error exists, this is in what appears to be an informal TODO comment block. These comments seem to be internal notes rather than public documentation. Correcting spelling in informal internal notes/TODOs doesn't provide meaningful value. The comment also doesn't affect any actual code functionality.
Perhaps maintaining consistent professional spelling even in internal comments helps with code quality and readability? Maybe this sets a good standard for the codebase?
While professional standards are important, nitpicking spelling in informal TODO comments creates noise and distracts from more substantive code review feedback. The meaning is still clear despite the typo.
This comment should be deleted as it provides minimal value by correcting spelling in an informal internal comment block.
11. src/vs/workbench/browser/workbench.ts:49
- Draft comment:
Typo: 'setProgressAcccessibilitySignalScheduler' appears to have an extra 'c'. Consider renaming it to 'setProgressAccessibilitySignalScheduler' for clarity. - 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. src/vs/workbench/browser/workbench.ts:244
- Draft comment:
Typo: The comments use 'loosing' where 'losing' is intended. Please change phrases like 'the chance of loosing any state' and 'window loosing focus' to use 'losing'. - 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.
13. src/vs/workbench/services/layout/browser/layoutService.ts:268
- Draft comment:
Typo in comment: 'alignement' should be spelled 'alignment'. - 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.
Workflow ID: wflow_1fWH1BDpf09zdiuF
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.
@@ -0,0 +1,147 @@ | |||
// import { registerAction2, Action2 } from "../../../../platform/actions/common/actions.js"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All code is commented out. Remove or clean up these commented-out action definitions if they are not needed.
this.loadingOverlay.style.display = "flex"; | ||
} | ||
|
||
this.fullScreenOverlay?.addEventListener("click", () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the open()
method, an event listener is added on each call. Consider ensuring that the click listener is added only once to prevent multiple handler instances.
}, | ||
extension: extensionDescription, | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider refactoring redundant style assignments and use CSS classes instead of inline styles to improve maintainability.
|
||
// Focus the active editor | ||
this._editorGroupsService.activeGroup.focus(); | ||
}, 20); // 20ms matches the animation duration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The setTimeout
delay of 20ms in close()
is much shorter than the 0.2s fade-out animation. Adjust the timeout to match the animation duration for smoother transitions.
}, 20); // 20ms matches the animation duration | |
}, 200); // 200ms matches the animation duration |
|
||
private async initialize() { | ||
// Only set initial state to open if it's first launch | ||
console.log("I AM HERE", this.isFirstLaunch); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove or update the debug log 'I AM HERE' to avoid unnecessary console output in production.
console.log("I AM HERE", this.isFirstLaunch); |
agentOverlayPartContainer.style.right = "0"; | ||
agentOverlayPartContainer.style.bottom = "0"; | ||
agentOverlayPartContainer.style.zIndex = "-10"; | ||
agentOverlayPartContainer.style.display = "absolute"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: The display
property of agentOverlayPartContainer
is set to absolute
, which is not a valid CSS display value. Consider using block
(or another appropriate value) instead.
agentOverlayPartContainer.style.display = "absolute"; | |
agentOverlayPartContainer.style.display = "block"; |
readonly _serviceBrand: undefined; | ||
|
||
/** | ||
* Returns the PearOverlayPart instance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typographical Inconsistency: The JSDoc comments refer to PearOverlayPart
(line 25) and PearAI popup
(lines 30-60) whereas the actual implementation and naming in the file use AgentOverlayPart
and AgentOverlayService
. Please standardize the naming to avoid confusion.
* Returns the PearOverlayPart instance. | |
* Returns the AgentOverlayPart instance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 I can't imagine my review would be terribly useful, but I saw nothing that stood out to me as being bad!
// extract out the styles into css files. | ||
// fullscreen? container? webview? popupAreaOverlay? should be just one thing. | ||
// display, opacity, z-index, transition, etc. | ||
// this should be just skeleton, full control should be inside submodule for layout. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not too familiar with the best way to handle these overlays in the vscode fork but it does seem quite complicated to add in a new overlay
Important
Add
AgentOverlayPart
andAgentOverlayService
to manage a new overlay in the workbench layout.AgentOverlayPart
tolayout.ts
andworkbench.ts
for managing a new overlay in the workbench.AgentOverlayPart
with visibility and state management, including first launch behavior.AgentOverlayService
to manage overlay actions like show, hide, toggle, and lock.IAgentOverlayService
andAgentOverlayService
inagentOverlayService.ts
for overlay management.AgentOverlayService
.agentOverlayPart.ts
to define the overlay's layout and behavior.layout.ts
andworkbench.ts
.AGENTOVERLAY_PART
toParts
enum inlayoutService.ts
.agentOverlayActions.ts
(commented out).This description was created by
for 01c1647. It will automatically update as commits are pushed.