stateful / vscode-runme

DevOps Workflows Built with Markdown for VS Code
https://runme.dev
Apache License 2.0
186 stars 13 forks source link

Generate cells using Foyle AI #1356

Closed jlewi closed 3 months ago

jlewi commented 3 months ago

Related to stateful/runme#574

jlewi commented 3 months ago

@sourishkrout Would you PTAL? The code is a bit rough (lots of lint errors); however I had some questions about how various things should be done and I thought you might be able to provide some pointers?

FWIW the code does work; I was able to run it and get suggestions provided by Foyle

jlewi commented 3 months ago

@sourishkrout Sorry about that. I think its fixed.

sourishkrout commented 3 months ago

One of the unit tests failed which is an easy fix. registerCommand is called an additional time for the Foyle/AI cmd.

@jlewi the fix is to increment it to 40.

 FAIL  tests/extension/extension.test.ts > initializes all providers
AssertionError: expected "spy" to be called 39 times, but got 40 times
 ❯ tests/extension/extension.test.ts:102:36
    100|   expect(notebooks.registerNotebookCellStatusBarItemProvider).toBeCall…
    101|   expect(workspace.registerNotebookSerializer).toBeCalledTimes(1)
    102|   expect(commands.registerCommand).toBeCalledTimes(39)
       |                                    ^
    103|   expect(window.registerTreeDataProvider).toBeCalledTimes(1)
    104|   expect(window.registerUriHandler).toBeCalledTimes(1)

Error: AssertionError: expected "spy" to be called 39 times, but got 40 times
 ❯ tests/extension/extension.test.ts:102:36
jlewi commented 3 months ago

Thank you @sourishkrout ; I fixed the test.

sourishkrout commented 3 months ago

Merging. - The e2e integration test's failing because GitHub Actions are being finicky and have been under the weather with outages the last few days. It's not broken.