continuedev / continue

⏩ Continue is the leading open-source AI code assistant. You can connect any models and any context to build custom autocomplete and chat experiences inside VS Code and JetBrains
https://docs.continue.dev/
Apache License 2.0
19.2k stars 1.65k forks source link

Cannot read properties of undefined (reading 'title') #2790

Open juanfcocontreras opened 1 week ago

juanfcocontreras commented 1 week ago

Before submitting your bug report

Relevant environment info

- OS: macOS
- Continue version: 0.8.55
- IDE version: VSCode 1.95.1
- config.json:

{
  "models": [
    {
      "model": "gpt-4o-mini",
      "contextLength": 128000,
      "title": "GPT-4o Mini",
      "systemMessage": "You are an expert software developer. You give helpful and concise responses. Always respond in English.",
      "provider": "openai",
      "apiKey": "xxx"
    }
  ],
  "customCommands": [
    {
      "name": "test",
      "prompt": "{{{ input }}}\n\nWrite a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated. Give the tests just as chat output, don't edit any file.",
      "description": "Write unit tests for highlighted code"
    }
  ],
  "allowAnonymousTelemetry": false,
  "contextProviders": [
    {
      "name": "code",
      "params": {}
    },
    {
      "name": "docs",
      "params": {}
    }
  ],
  "experimental": {
    "contextMenuPrompts": {
      "docstring": "Write a docstring for this code in English. Do not change anything about the code itself.",
      "comment": "Write comments for this code in English. Do not change anything about the code itself.",
      "fix": "Fix this code and explain the fixes in English.",
      "optimize": "Optimize this code and explain the optimizations in English.",
      "fixGrammar": "If there are any grammar or spelling mistakes in this writing, fix them and explain the corrections in English. Do not make other large changes to the writing."
    }
  },
  "docs": []
}

Description

Since version 0.8.53, whenever I click the continue button in the status bar, I get this message:

Cannot read properties of undefined (reading 'title').

I have checked that if I install earlier versions, I don't have this problem. Version 0.8.53 and later do.

To reproduce

  1. Go to Status Bar
  2. Click on "Continue" button
  3. See error: Cannot read properties of undefined (reading 'title').

Log output

No response

0xStuart commented 1 week ago

I'm a first time user, and I am getting the same on both vs code and jetbrains.

0xStuart commented 6 days ago

It's ok now that I completed setup by clicking on the icon on the left.

juanfcocontreras commented 6 days ago

It's ok now that I completed setup by clicking on the icon on the left.

What icon exactly?

0xStuart commented 6 days ago

image

(I moved it to the right)

juanfcocontreras commented 6 days ago

Ok, thanks. No change here, I still the error.

brucevoin commented 4 days ago

Just remove config.json , it will reset config.json, then you can reconfigure it , and the error should go

juanfcocontreras commented 4 days ago

Just remove config.json , it will reset config.json, then you can reconfigure it , and the error should go

But what is wrong with my configuration file? Because if I delete it and configure it exactly the same it will have the same error, right? I have attached the file in the first message.

brucevoin commented 4 days ago

Just remove config.json , it will reset config.json, then you can reconfigure it , and the error should go

But what is wrong with my configuration file? Because if I delete it and configure it exactly the same it will have the same error, right? I have attached the file in the first message.

For me, The reason may be that I deleted the 'tabAutocompleteModel' in json config.