-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix training on RunMe logs #110 * We need to allow Foyle to be configured with the directory of the RunMe logs * Add LearnerConfig to Foyle config with the logs directory * Fix a bug in analyze preventing BlockLogs from being updated with the executed block when using RunMe * The bug was that when looking for the last execution trace; we weren't considering RunMe traces * Update the RunMe developer guide * Update the docs
- Loading branch information
Showing
11 changed files
with
254 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Check the runme logs for an execution for the block 01HYZXS2Q5XYX7P3PT1KH5Q881 | ||
|
||
```sh {"id":"01HYZY4V5NNQN5Q2RDZ5G15JY8"} | ||
grep -r 01HYZXS2Q5XYX7P3PT1KH5Q881 "/Users/jlewi/Library/Application Support/runme/logs/" | ||
``` |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
--- | ||
runme: | ||
document: | ||
relativePath: runme.md | ||
session: | ||
id: 01HYZVHZ41CAN75B22CRC9D9J6 | ||
updated: 2024-05-28 14:57:56-07:00 | ||
--- | ||
|
||
# Developing the Runme Extension | ||
|
||
* The Runme extension is in the [vscode-runme](ht************************************me) repository | ||
* The service is defined in [runme/pkg/api/proto/runme/ai](ht**************************************************************ai) | ||
* Follow [RunMe's vscode contributing.md](ht**************************************************************md) | ||
* If you need nvm you can brew install it | ||
|
||
```sh {"id":"01HY2569DM0SR533BT4ZJTD2WV"} | ||
brew install nvm | ||
``` | ||
|
||
* The command inside Runme's contributing guide assumed vscode's binary was on the path; for me it wasn't so I had to execut | ||
the command using the full path. | ||
|
||
```sh {"id":"01HY2584G3Q0A89TK1NRWVH0ZN"} | ||
jq -r ".recommendations[]" .vscode/extensions.json | xargs -n 1 /Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code --force --install-extension | ||
``` | ||
|
||
## Building and installing the extension from source | ||
|
||
* [VSCode Extension Packaging & Publishing](ht**************************************************************************on) | ||
* It looks like the package has a `bundle` command that will build the extension and package it into a `.vsix` file | ||
|
||
```sh {"id":"01HY25HEG7CR7QCGJSERF3BB4K"} | ||
cd ~/git_vscode-runme | ||
npm run bundle | ||
``` | ||
|
||
```sh {"id":"01HY25KVHCN2P1W9NV0ECD1TW0"} | ||
ls -la ~/git_vscode-runme/ | ||
``` | ||
|
||
Now we can install the extension using the vscode binary | ||
|
||
* I had to uninstall the RunMe extension first before installing the new one | ||
* If you search for the extension in the extensions view, you can click on the arrow next to the update button and uncheck auto-update | ||
if you don't do that it may continue to auto update | ||
* The exact file will be named `runme-X.Y.Z.vsix` so it will change as the version changes | ||
* You can bump the version in `package.json` to something like `"version": "3.*******.0",` and then do the build and install | ||
* **Note**: Your version number should be higher than whats in the vscode marketplace otherwise vscode | ||
does some odd version magic | ||
* The advantage of this is that then you can tell which version of the extension you have installed | ||
* It also seemed like when I didn't bump the version I might have actually been using an old version of the extension | ||
|
||
```bash {"id":"01HYZVG8KZKYSTFS4R1RJZDS7P"} | ||
/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code --force --install-extension ~/gi************me/ru************ix | ||
``` | ||
|
||
```sh {"id":"01HY264KZTS4J9NHJASJT1GYJ7"} | ||
ls -la ~/git_vscode-runme/dist | ||
``` | ||
|
||
So it looks like my runme install is messed up | ||
Lets try installing and reinstalling it | ||
|
||
* Now everything is working; I can generate completions using Foyle | ||
|
||
```bash {"id":"01HY74YTEZDZVJYPMB0VMCE84S"} | ||
/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code --uninstall-extension stateful.runme | ||
|
||
``` | ||
|
||
```bash {"id":"01HY75KYKE3SFAM5EXMDAVJDTQ"} | ||
echo "hello world" | ||
``` | ||
|
||
## Debugging the Runme Extension in vscode | ||
|
||
* It seems like you may need to run `yarn build` for changes to get picked up; running `F5` doesn't always seem to work | ||
* Console logs will show up in the `debug console` in the development workspace; not the instance of vscode that gets launched to run | ||
your extension |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
--- | ||
runme: | ||
document: | ||
relativePath: runme.md | ||
session: | ||
id: 01HZ0KBGBKTSRH95B2E3TWH16S | ||
updated: 2024-05-28 14:57:56-07:00 | ||
--- | ||
|
||
# Developing the Runme Extension | ||
|
||
* The Runme extension is in the [vscode-runme](ht************************************me) repository | ||
* The service is defined in [runme/pkg/api/proto/runme/ai](ht**************************************************************ai) | ||
* Follow [RunMe's vscode contributing.md](ht**************************************************************md) | ||
* If you need nvm you can brew install it | ||
|
||
```sh {"id":"01HY2569DM0SR533BT4ZJTD2WV"} | ||
brew install nvm | ||
``` | ||
|
||
* The command inside Runme's contributing guide assumed vscode's binary was on the path; for me it wasn't so I had to execut | ||
the command using the full path. | ||
|
||
```sh {"id":"01HY2584G3Q0A89TK1NRWVH0ZN"} | ||
jq -r ".recommendations[]" .vscode/extensions.json | xargs -n 1 /Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code --force --install-extension | ||
``` | ||
|
||
## Building and installing the extension from source | ||
|
||
* [VSCode Extension Packaging & Publishing](ht**************************************************************************on) | ||
* It looks like the package has a `bundle` command that will build the extension and package it into a `.vsix` file | ||
|
||
```sh {"id":"01HY25HEG7CR7QCGJSERF3BB4K"} | ||
cd ~/git_vscode-runme | ||
npm run bundle | ||
``` | ||
|
||
```sh {"id":"01HY25KVHCN2P1W9NV0ECD1TW0"} | ||
ls -la ~/git_vscode-runme/ | ||
``` | ||
|
||
Now we can install the extension using the vscode binary | ||
|
||
* I had to uninstall the RunMe extension first before installing the new one | ||
* If you search for the extension in the extensions view, you can click on the arrow next to the update button and uncheck auto-update | ||
if you don't do that it may continue to auto update | ||
* The exact file will be named `runme-X.Y.Z.vsix` so it will change as the version changes | ||
* You can bump the version in `package.json` to something like `"version": "3.*******.0",` and then do the build and install | ||
* **Note**: Your version number should be higher than whats in the vscode marketplace otherwise vscode | ||
does some odd version magic | ||
* The advantage of this is that then you can tell which version of the extension you have installed | ||
* It also seemed like when I didn't bump the version I might have actually been using an old version of the extension | ||
|
||
```bash {"id":"01HYZVG8KZKYSTFS4R1RJZDS7P"} | ||
/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code --force --install-extension ~/gi************me/ru************ix | ||
``` | ||
|
||
```sh {"id":"01HY264KZTS4J9NHJASJT1GYJ7"} | ||
ls -la ~/git_vscode-runme/dist | ||
``` | ||
|
||
So it looks like my runme install is messed up | ||
Lets try installing and reinstalling it | ||
|
||
* Now everything is working; I can generate completions using Foyle | ||
|
||
```bash {"id":"01HY74YTEZDZVJYPMB0VMCE84S"} | ||
/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code --uninstall-extension stateful.runme | ||
|
||
``` | ||
|
||
```bash {"id":"01HY75KYKE3SFAM5EXMDAVJDTQ"} | ||
echo "hello world" | ||
``` | ||
|
||
## Debugging the Runme Extension in vscode | ||
|
||
* It seems like you may need to run `yarn build` for changes to get picked up; running `F5` doesn't always seem to work | ||
* Console logs will show up in the `debug console` in the development workspace; not the instance of vscode that gets launched to run | ||
your extension |
This file contains 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 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