Skip to content

Commit

Permalink
Remove logging related to #125
Browse files Browse the repository at this point in the history
  • Loading branch information
jlewi committed May 28, 2024
1 parent 8cb6e0c commit bc35b80
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 17 deletions.
8 changes: 0 additions & 8 deletions app/pkg/runme/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,5 @@ func (p *Proxy) GenerateCells(ctx context.Context, req *aiv1alpha1.GenerateCells
Cells: cells,
}

// DO NOT COMMIT
for _, cell := range resp.Cells {
cell.LanguageId = "sh"
log.Info("Runme.Generate cell", "cell", cell)
}

// N.B. resp won't be logged in protojson format because we don't generate a zap marshal function for that proto.
log.Info("Runme.Generate completed", "response", resp)
return resp, nil
}
12 changes: 6 additions & 6 deletions developer_guides/runme-01HYZVHZ41CAN75B22CRC9D9J6.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ runme:
relativePath: runme.md
session:
id: 01HYZVHZ41CAN75B22CRC9D9J6
updated: 2024-05-28 08:08:32-07:00
updated: 2024-05-28 14:57:56-07:00
---

# Developing the Runme Extension
Expand Down Expand Up @@ -37,8 +37,6 @@ npm run bundle

```sh {"id":"01HY25KVHCN2P1W9NV0ECD1TW0"}
ls -la ~/git_vscode-runme/

# Ran on 2024-05-28 08:08:13-07:00 for 18.946s exited with 0
```

Now we can install the extension using the vscode binary
Expand All @@ -47,9 +45,11 @@ Now we can install the extension using the vscode binary
* 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` and then do the build and install
* 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
* 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
Expand Down
80 changes: 80 additions & 0 deletions developer_guides/runme-01HZ0KBGBKTSRH95B2E3TWH16S.md
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
8 changes: 5 additions & 3 deletions developer_guides/runme.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@ Now we can install the extension using the vscode binary
* 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` and then do the build and install
* 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
* You can bump the version in `package.json` to something like `"version": "3.5.7-dev.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 ~/git_vscode-runme/runme-3.5.9.vsix
Expand Down

0 comments on commit bc35b80

Please sign in to comment.