saoudrizwan / claude-dev

Autonomous coding agent right in your IDE, capable of creating/editing files, executing commands, and more with your permission every step of the way.
https://marketplace.visualstudio.com/items?itemName=saoudrizwan.claude-dev
MIT License
4.51k stars 427 forks source link

Web ui has import issues #198

Closed Cally99 closed 2 weeks ago

Cally99 commented 2 weeks ago

Hi, Great extension actually. Kind of mind blowing you can use it on a large stack and it follows your design pattern around your project helping you in many ways.

I've got an issue as I'm trying to add a few more LLM api's since the ones listed I've trialled even with paid subscriptions break down with rate limiting.

I've added Llama three but it won't take my api key from the provider. I've never worked with vscode extensions before and I had to create a visc file and manually add my fork to test. Is the web ui for debugging? It's got some import errors due to two src folders and I don't know much about vs code plugins.

Can you update the documentation of how to debug the vscode ui? Thanks,

saoudrizwan commented 2 weeks ago

You'll need to run npm run install:all to install all the dependencies including in the webview-ui. There's instructions you can look at under the Contribute secton on the readme for more specifics. What API are you trying to add? If you're running into rate limits I suggest open router, they should have prompt caching soon which will significantly reduce costs.

Cally99 commented 2 weeks ago

@saoudrizwan I'm trying to add AWANLLM, https://www.awanllm.com/pricing It's cheap and cheerful and offers LLAMA models. When I run the web ui I get this issue. To be honest I've never debugged a vscode plugin and I've been playing about turning it into a package and adding it manually. Not ideal.

`

Compiled with problems:
×
ERROR in ./src/components/ApiOptions.tsx 7:0-201
Module not found: Error: You attempted to import ../../../src/shared/api which falls outside of the project src/ directory. Relative imports outside of src/ are not supported.
You can either move it inside src/, or add a symlink to it from project's node_modules/.
ERROR in ./src/components/ChatRow.tsx 8:0-84
Module not found: Error: You attempted to import ../../../src/shared/combineCommandSequences which falls outside of the project src/ directory. Relative imports outside of src/ are not supported.
You can either move it inside src/, or add a symlink to it from project's node_modules/.
ERROR in ./src/components/ChatView.tsx 11:0-76
Module not found: Error: You attempted to import ../../../src/shared/combineApiRequests which falls outside of the project src/ directory. Relative imports outside of src/ are not supported.
You can either move it inside src/, or add a symlink to it from project's node_modules/.
ERROR in ./src/components/ChatView.tsx 12:0-86
Module not found: Error: You attempted to import ../../../src/shared/combineCommandSequences which falls outside of the project src/ directory. Relative imports outside of src/ are not supported.
You can either move it inside src/, or add a symlink to it from project's node_modules/.
ERROR in ./src/components/ChatView.tsx 13:0-66
Module not found: Error: You attempted to import ../../../src/shared/getApiMetrics which falls outside of the project src/ directory. Relative imports outside of src/ are not supported.
You can either move it inside src/, or add a symlink to it from project's node_modules/.

`

AnsonLai commented 2 weeks ago

I had the same issues running it locally on Windows 11. I just resorted to copying the shared folder over and redoing the imports. Not ideal but it's an easy fix.

saoudrizwan commented 2 weeks ago

Ah I see my webpack script wasn't working for you guys on windows. I just updated it, pls pull the latest and let me know if you still run into issues https://github.com/saoudrizwan/claude-dev/commit/81fa5a67a45e289dc66cdc93aaf7982a78d89a97

AnsonLai commented 2 weeks ago

Seems like it should work, I'm not sure why I'm still running into issues. That said, instead of moving things around with the shared folder, I am able to fix it just by running "npm run build:webview" manually once, which your code clearly does. Maybe it's out of order. Weird, but if anyone is running into the same issue, try building it independently.