-
Notifications
You must be signed in to change notification settings - Fork 163
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
Display advice in empty editor to use Mito AI #1368
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
This is super sweet! I love this. It's a great touch.
Pass custom keybinding Place the advice after the cursor
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.
Just a little bit of cleanup and then LGTM without another review. Nice work! The tests aren't going to pass on a forked PR, so we'll see them pass on the CI after merging. And in the future, now that you have write access, you can open cloned PRs and the tests should run + pass there :)
}); | ||
|
||
/** | ||
* A facet that stores the chat shortcut. |
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.
My understanding is that when there are multiple code mirror extensions in one code mirror editor, this combine
function is used to figure out how to reconcile them. So here, we are saying something like: If there are multiple chatShorcut decorations set, use the last one.
Is this needed in order to update the decorations displayed? ie: If instead of returning the last value, we instead returned the first one, would we always display the placeholder text?
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.
Actually this apply only for the Facet
that is storing configuration information. Using the latest value is usually the best option if we don't know better.
It is unlikely to happen in this case.
await page.notebook.setCell(0, 'code', 'print("Hello, World!")'); | ||
|
||
await expect | ||
.soft((await page.notebook.getCellLocator(0))!.getByRole('textbox')) |
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.
ooo cool! I didn't know this soft assertion was a thing. This is great for letting us test each of the different permutations in one test. I like it.
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.
Yep and it is recommended as best practice: https://playwright.dev/docs/best-practices#use-soft-assertions
Description
Display advice to trigger the chat panel in empty cells
Testing
Work out of the box
Added an integration test for the feature
advice_.mp4
Latest version looks like that:
Documentation
N/A