continue icon indicating copy to clipboard operation
continue copied to clipboard

Feature Request: Add 'Accepted' Field to dev_data in JetBrains IDEA Plugin for Consistency with VSCode Plugin

Open loufigoGo opened this issue 1 year ago • 9 comments

Validations

  • [ ] I believe this is a way to improve. I'll try to join the Continue Discord for questions
  • [X] I'm not able to find an open issue that requests the same enhancement

Problem

In the JetBrains IDEA plugin, the locally generated ~/.continue/dev_data/devdata.sqlite only contains the tokens_generated table and lacks the accepted field, unlike the VSCode plugin. It is crucial for the IDEA plugin to also include the accepted field in the local dev_data.

Solution

No response

loufigoGo avatar Sep 20 '24 11:09 loufigoGo

Thanks for flagging this @loufigoGo , I wasn't aware that we aren't logging the accepted field in the VS Code plugin.

We handle autocomplete dev data logging for at the core level here: https://github.com/continuedev/continue/blob/bc9ab739519f696c6ab77ff5c3b5e7913bd0232c/core/autocomplete/completionProvider.ts#L206-L207

And for the JetBrains plugin, I believe this is where we are logging autocomplete acceptance: https://github.com/continuedev/continue/blob/bc9ab739519f696c6ab77ff5c3b5e7913bd0232c/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/autocomplete/AcceptAutocompleteAction.kt#L14-L15

For VS Code, it's here: https://github.com/continuedev/continue/blob/bc9ab739519f696c6ab77ff5c3b5e7913bd0232c/extensions/vscode/src/commands.ts#L565-L566

It looks like we aren't passing the completionId argument on JetBrains.

We're doing a lot of enhancements/bugfixes on JetBrains right now and will make sure to get this pulled in.

Patrick-Erichsen avatar Sep 20 '24 19:09 Patrick-Erichsen

Thank you for the response @Patrick-Erichsen . I'm really looking forward to JetBrains' dev_data including completion and accepted fields, and I hope vscode's dev_data can add timestamps too. Could you please let me know when the version update might be available ?

loufigoGo avatar Sep 23 '24 08:09 loufigoGo

We've got a decent backlog of JetBrains related enhancements/fixes so I can't give a good estimate but I've made sure to include this in the list.

Curious what your usecase for the timestamps are?

Patrick-Erichsen avatar Sep 23 '24 19:09 Patrick-Erichsen

@loufigoGo we fixed this here: https://github.com/continuedev/continue/pull/2394

Will be available in next pre-release!

Also, I should have mentioned this previously, but autocomplete logs are not written to ~/.continue/dev_data/devdata.sqlite. They are written to ~/.continue/dev_data/autocomplete.jsonl.

Patrick-Erichsen avatar Sep 25 '24 21:09 Patrick-Erichsen

Great, but I noticed that my .continue/dev_data still hasn't updated the autocomplete.jsonl with jetBrains-IDE. I have used the dev branch for packaging and compiling .

loufigoGo avatar Sep 26 '24 04:09 loufigoGo

In autocomplete.jsonl, I need the timestamps field to understand when users use autocomplete for easier filtering. Otherwise, I would have to check devdata.sqlite at the same time, which is quite inconvenient.

loufigoGo avatar Sep 26 '24 04:09 loufigoGo

fun accept() {
        val completion = pendingCompletion ?: return
        val text = completion.text ?: return
        val editor = completion.editor
        val offset = completion.offset
        editor.document.insertString(offset, text)
        editor.caretModel.moveToOffset(offset + text.length)
        val input = mapOf(
            "completionId" to completion.completionId
        )
        project.service<ContinuePluginService>().coreMessenger?.request("autocomplete/accept", input, null, ({}))
        invokeLater {
            clearCompletions(editor)
        }
    } 

it looks like need add a completion.completionId input with mapOf() to autocomplete/accept request ? is that right ? @Patrick-Erichsen

loufigoGo avatar Sep 29 '24 01:09 loufigoGo

Hello, We need timestamps as well. Our team uses this feature to evaluate how many autocomplete code suggestions generated and how many accepted each month.

glm1024 avatar Oct 10 '24 00:10 glm1024

I have update continue to 0.0.75. But I noticed that my .continue/dev_data still hasn't updated the autocomplete.jsonl with jetBrains-IDE too. @Patrick-Erichsen

glm1024 avatar Oct 10 '24 01:10 glm1024

Thanks for the confirmation here @glm1024 - timestamps are a relatively easy add on to the logs as well. I'll plan to take a second look at this later this week.

Patrick-Erichsen avatar Oct 14 '24 18:10 Patrick-Erichsen

Copy that. Thanks so much for the response. Besides, I wonder if I can become a contributor to this project ? @Patrick-Erichsen

glm1024 avatar Oct 15 '24 01:10 glm1024

@glm1024 definitely! If you're interested in adding the timestamps to the autocomplete logs that would actually be great.

Here are a few resources to get you started:

  • Contributing docs: https://github.com/continuedev/continue/blob/dev/CONTRIBUTING.md
  • JetBrains specific contributing docs: https://github.com/continuedev/continue/blob/dev/extensions/intellij/CONTRIBUTING.md
  • My previous comment mentioning the specific places we do autocomplete logging: https://github.com/continuedev/continue/issues/2335#issuecomment-2364528513

Feel free to follow up here if you have any questions/issues getting started.

Patrick-Erichsen avatar Oct 17 '24 17:10 Patrick-Erichsen

Okay,I will have a try : ) @Patrick-Erichsen

glm1024 avatar Oct 18 '24 03:10 glm1024

Great, but I noticed that my .continue/dev_data still hasn't updated the autocomplete.jsonl with jetBrains-IDE. I have used the dev branch for packaging and compiling .

This issue has been fixed. Please note it for the next release. @loufigoGo

glm1024 avatar Nov 03 '24 10:11 glm1024

In autocomplete.jsonl, I need the timestamps field to understand when users use autocomplete for easier filtering. Otherwise, I would have to check devdata.sqlite at the same time, which is quite inconvenient.

Timestamp has been added either. @loufigoGo

glm1024 avatar Nov 03 '24 10:11 glm1024

Validations

  • [ ] I believe this is a way to improve. I'll try to join the Continue Discord for questions
  • [x] I'm not able to find an open issue that requests the same enhancement

Problem

In the JetBrains IDEA plugin, the locally generated ~/.continue/dev_data/devdata.sqlite only contains the tokens_generated table and lacks the accepted field, unlike the VSCode plugin. It is crucial for the IDEA plugin to also include the accepted field in the local dev_data.

Solution

No response

This may be a little difficult, cause I found that the data is recorded when LLM generates the response, not when user press the tab key. How about useing autocomplete.jsonl instead ? @loufigoGo

glm1024 avatar Nov 03 '24 10:11 glm1024

Okay,I will have a try : ) @Patrick-Erichsen

I have fixed the issue, Mr. Patrick, and Mr. Nate has merged the code. @Patrick-Erichsen

glm1024 avatar Nov 03 '24 10:11 glm1024

Validations

  • [ ] I believe this is a way to improve. I'll try to join the Continue Discord for questions
  • [x] I'm not able to find an open issue that requests the same enhancement

Problem

In the JetBrains IDEA plugin, the locally generated ~/.continue/dev_data/devdata.sqlite only contains the tokens_generated table and lacks the accepted field, unlike the VSCode plugin. It is crucial for the IDEA plugin to also include the accepted field in the local dev_data.

Solution

No response

This may be a little difficult, cause I found that the data is recorded when LLM generates the response, not when user press the tab key. How about useing autocomplete.jsonl instead ? @loufigoGo

@glm1024 great ! very thanks to you !

loufigoGo avatar Nov 13 '24 02:11 loufigoGo

The latest version still has a problem. Every accepted attribute in the file autocomplete.jsonl is set to true. I have given feedback to the Continue. We still need to wait. @loufigoGo

glm1024 avatar Nov 17 '24 07:11 glm1024

This issue hasn't been updated in 90 days and will be closed after an additional 10 days without activity. If it's still important, please leave a comment and share any new information that would help us address the issue.

github-actions[bot] avatar Mar 03 '25 04:03 github-actions[bot]

This issue was closed because it wasn't updated for 10 days after being marked stale. If it's still important, please reopen + comment and we'll gladly take another look!

github-actions[bot] avatar Mar 15 '25 02:03 github-actions[bot]