-
Notifications
You must be signed in to change notification settings - Fork 5
ref: Use diagnostics channel for claude agent sdk wrapper #1678
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
stylistic nit, but personally I generally only allow arrow functions with body bracing for single-line functions in my own code. Honestly a bit surprised this isn't flagged by the linter. Do we want to allow multi-line arrow functions without braces?
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 believe this is prettier's default config. I don't care much about how to format things. The only thing I don't like is having red lines via LSP for formatting.
Would you have minded it here if the
state.proce...were in the same line as theonComplete:?Uh oh!
There was an error while loading. Please reload this page.
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 rest would not be though. My personal rule I use for my own projects is if the entire body fits on one line comfortably it can use expression form rather than block form. Otherwise, just stick to block form. I find it's too easy to not notice the missing braces and make future changes which need multiple lines then have it blow up because it's not valid anymore.
It's especially bad when you're assigning an arrow function to a variable because rather than invalid syntax errors like you'd get in this case when writing multiple lines, you might accidentally have statements added to the enclosing function unexpectedly.
That will call
cbin the opposite order of what you might expect at first glance, because the code is technically valid, but the second cb call gets raised to the enclosing function and so actually gets called first.Uh oh!
There was an error while loading. Please reload this page.
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.
Ok idk, we don't have this problem in this PR though. This is nothing new. Feel free to update prettier to wrap things in curlys! I personally have not knowingly run into this issue in the past 5 years or so.
I have a feeling this may look off to you here specifically because we're in in an object and there is no proper delimiting with
;.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.
It's fine. It's not important we address this, just thought I should bring it up as it was unexpected to me that the linter allowed this. 😅