Giter VIP home page Giter VIP logo

Comments (14)

cheuk-cheng avatar cheuk-cheng commented on June 2, 2024 1

I did see the little paintbrush icon before I entered "/edit ...". Please see the following screenshot. However, I did not see any output after I toggle developer tools (before I entered "/edit ...").
screenshot 2023-09-26 at 16 20 57@2x

from continue.

cheuk-cheng avatar cheuk-cheng commented on June 2, 2024 1

I highlighted the same source lines, pressed cmd-shift-m, then entered "@Terminal" and continue would explain the highlighted code fine. When I entered "/edit ..." it failed with the same timeout error like before.

from continue.

sestinj avatar sestinj commented on June 2, 2024

@cheuk-cheng When you type /edit does it show up in the dropdown like this?

Screen Shot 2023-09-24 at 10 43 02 AM

And then once you press enter, does it display the loading box like this?
Screen Shot 2023-09-24 at 10 44 37 AM

from continue.

happy15 avatar happy15 commented on June 2, 2024

@cheuk-cheng When you type /edit does it show up in the dropdown like this?

Screen Shot 2023-09-24 at 10 43 02 AM And then once you press enter, does it display the loading box like this? Screen Shot 2023-09-24 at 10 44 37 AM

For me, both the file name and line numbers of the highlighted don't show, i.e. settings.json (14-19) in the example.

from continue.

cheuk-cheng avatar cheuk-cheng commented on June 2, 2024

Thanks @sestinj. After I upgraded continue extension in Visual Studio Code this morning, I can see the list of available options after I enter "/edit". Normal chat without using "/edit ..." works fine. However, I am still seeing the following without any available log. Also, unlike previous versions of continue, if I simply highlight some source lines in Visual Studio Code, continue will not add it to the context. I can only press -m or -shift-m to add source lines to the context.

screenshot 2023-09-25 at 09 11 28@2x

from continue.

brandonbiggs avatar brandonbiggs commented on June 2, 2024

I'm also having this issue. That was working last week for me, but isn't today when I try to use it.

from continue.

sestinj avatar sestinj commented on June 2, 2024

@cheuk-cheng It is intentional that you have to use cmd+m to select new code - this makes it easier to select multiple ranges, and avoids situations where clicking around in files adds a ton of selected ranges to Continue. I realize this is a pretty fundamental change, and we're open to feedback if you feel strongly one way or the other

I do notice that there is no code currently selected here above the input box - if you give another try after 1. highlighting code, 2. using cmd+shift+m, 3. entering that same input, do you see the same error?

I also notice the private/var/tmp folder where the file is located. From my understanding, this is a folder with special privileges, which would cause the inability to select code or make an edit (access to those files might require 'sudo' access). In other folders does /edit seem to work?

from continue.

cheuk-cheng avatar cheuk-cheng commented on June 2, 2024

Thanks @sestinj. I cp test.py to ~/Downloads then highlighted the source lines shown below, pressed -m, entered "/edit Optimize this Python code" and still saw the same thing (with no logs). Same error when trying to /edit "Optmize this Python code" with $HOME/test.py. No error without using "/edit".
screenshot 2023-09-26 at 13 34 42@2x

from continue.

sestinj avatar sestinj commented on June 2, 2024

Ok, a couple of last questions to help me further investigate: when you highlight code, press cmd+m, and then type /edit, do you see a little paintbrush icon like this above the selected range?

Screen Shot 2023-09-26 at 2 27 05 PM

And then more importantly if you open the console logs with cmd+shift+p, "Toggle Developer Tools", do you see any error messages related to Continue being unable to read a file? I think that the cause of the timeout should show up there

from continue.

sestinj avatar sestinj commented on June 2, 2024

Ok, the paintbrush is a good thing. What I'll do is improve the error logging here and then it should spit out exactly the error whenever it happens. I'll share an update soon

from continue.

sestinj avatar sestinj commented on June 2, 2024

A few observations and a few updates in the latest version:

  • It makes sense that this is only happening for /edit since normal chat doesn't use the sdk.ide.readFile websockets request
  • Given that you are able to chat, I think it's probably not a fundamental problem with the websockets connection (the best way to confirm this would be to try to use the @ terminal context provider, because it makes a similar request of the IDE
  • So my instinct is that there is an error on the VS Code side when readFile is being called. The extension was already setup in previous version so that this would cause an error to be displayed like the below image, but if you weren't seeing this popup in the bottom right, then it's possible there was an error during error handling.
  • I've added an additional console log (that would show up in developer tools console), and tried to avoid other sources of error so that the popup would definitely show up
Screen Shot 2023-09-27 at 9 20 33 PM

So my follow-up question (I wish I could instead be offering a fix, but alas) is:
Can you try this again on the newest version and then:
a) look for the popup
b) click the little icon in the thread next to "IDE Protocol _receive_json time out..." and check the details of the message there. This will show what the request data was and maybe shed light on the problem
c) If the popup doesn't show up, check the developer console logs again. I'd expect the error to show here

from continue.

cheuk-cheng avatar cheuk-cheng commented on June 2, 2024

Thanks @sestinj. I updated all my installed extensions in Visual Studio Code and I only saw the following after I ran "/edit ...". I did not see any popups. By the way, I am running Ollama v0.0.21 in maOS 13.
screenshot 2023-09-28 at 09 35 04@2x

from continue.

sestinj avatar sestinj commented on June 2, 2024

This is very odd...can you try using @ terminal? If it shows a similar timeout error, then it will be certain that there's a deeper bug

If the "Terminal" option doesn't already show when you type '@' you'll have to add it to config.py like

from continuedev.src.continuedev.plugins.context_providers.terminal import TerminalContextProvider

config=ContinueConfig(
  ...
  context_providers=[TerminalContextProvider()]
)

from continue.

sestinj avatar sestinj commented on June 2, 2024

@cheuk-cheng Since this last comment we've made a number of fixes that have solved the timeout error. I'm going to close this issue on account of that, but if you're somehow still seeing the same thing feel free to re-open

from continue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.