COD-1331 Add action item to open the context on vscode notifications#451
Merged
meichend merged 3 commits intoJul 19, 2022
Merged
Conversation
COD-1331 Might be a good idea to add an action item to open the context here
Only handle context's & comments in this story. (Send to context details page) Change copy to 'Open' in those instances |
Contributor
Author
cpul
reviewed
Jul 19, 2022
| if (selection == OPEN) { | ||
| await vscode.commands.executeCommand("workbench.view.extension.codex-sidebar-view"); | ||
| const codexService = new CodexService(notification.codexNotificationObject.codexId, UserService.getInstance()); | ||
| const context: Context = ((await codexService.getContextService().getOneById(contextId)) as Context[])[0]; |
Contributor
There was a problem hiding this comment.
What happens if there's no context? You may get an error here trying to access something that may not exist.
cpul
approved these changes
Jul 19, 2022
Contributor
cpul
left a comment
There was a problem hiding this comment.
I'm good with this change and would leaving an approval so I don't block you.
I would like to see a quick update though where you guard against an index out of bounds error on the array access you're making that I left a comment on. Thanks!
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.

Description
When the notification is bout a context, make the action button go to the context.
Type of Change
How Has This Been Tested?
🤲
Test Configuration:
Checklist:
Screenshots: