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.27k stars 1.66k forks source link

IntelliJ IDEA Code completion function is abnormal #1603

Open fkh186 opened 4 months ago

fkh186 commented 4 months ago

Before submitting your bug report

Relevant environment info

- OS:window
- Continue:0.0.49
- IDE:IntelliJ IDEA 2023.1.6 (Ultimate Edition)

Description

I am using the code completion feature, and occasionally the completion fails, and the completed code snippet remains in the interface.

To reproduce

No response

Log output

java.lang.RuntimeException: java.io.IOException: 管道正在被关闭。
    at com.intellij.util.ExceptionUtil.rethrow(ExceptionUtil.java:132)
    at com.intellij.util.EventDispatcher.throwExceptions(EventDispatcher.java:155)
    at com.intellij.util.EventDispatcher.dispatchVoidMethod(EventDispatcher.java:128)
    at com.intellij.util.EventDispatcher.lambda$createMulticaster$1(EventDispatcher.java:85)
    at jdk.proxy2/jdk.proxy2.$Proxy126.caretPositionChanged(Unknown Source)
    at com.intellij.openapi.editor.impl.CaretModelImpl.fireCaretPositionChanged(CaretModelImpl.java:543)
    at com.intellij.openapi.editor.impl.CaretImpl.doMoveToVisualPosition(CaretImpl.java:589)
    at com.intellij.openapi.editor.impl.CaretImpl.lambda$moveToVisualPosition$4(CaretImpl.java:527)
    at com.intellij.openapi.editor.impl.CaretModelImpl.doWithCaretMerging(CaretModelImpl.java:414)
    at com.intellij.openapi.editor.impl.CaretImpl.moveToVisualPosition(CaretImpl.java:527)
    at com.intellij.openapi.editor.impl.CaretImpl.moveToVisualPosition(CaretImpl.java:523)
    at com.intellij.openapi.editor.CaretModel.moveToVisualPosition(CaretModel.java:68)
    at com.intellij.openapi.editor.EditorModificationUtilEx.insertStringAtCaretNoScrolling(EditorModificationUtilEx.java:107)
    at com.intellij.openapi.editor.EditorModificationUtilEx.insertStringAtCaret(EditorModificationUtilEx.java:55)
    at com.intellij.openapi.editor.EditorModificationUtilEx.insertStringAtCaret(EditorModificationUtilEx.java:47)
    at com.intellij.codeInsight.editorActions.TypedHandler.type(TypedHandler.java:262)
    at com.intellij.codeInsight.editorActions.TypedHandler.lambda$doExecute$2(TypedHandler.java:204)
    at com.intellij.openapi.editor.impl.CaretModelImpl.lambda$runForEachCaret$3(CaretModelImpl.java:310)
    at com.intellij.openapi.editor.impl.CaretModelImpl.doWithCaretMerging(CaretModelImpl.java:419)
    at com.intellij.openapi.editor.impl.CaretModelImpl.runForEachCaret(CaretModelImpl.java:319)
    at com.intellij.openapi.editor.impl.CaretModelImpl.runForEachCaret(CaretModelImpl.java:296)
    at com.intellij.codeInsight.editorActions.TypedHandler.doExecute(TypedHandler.java:156)
    at com.intellij.codeInsight.editorActions.TypedHandler.lambda$execute$0(TypedHandler.java:135)
    at com.intellij.util.SlowOperations.allowSlowOperations(SlowOperations.java:194)
    at com.intellij.codeInsight.editorActions.TypedHandler.execute(TypedHandler.java:135)
    at com.intellij.codeInsight.lookup.impl.LookupTypedHandler.execute(LookupTypedHandler.java:73)
    at com.intellij.codeInsight.template.emmet.EmmetPreviewTypedHandler.execute(EmmetPreviewTypedHandler.java:39)
    at com.intellij.execution.impl.ConsoleViewImpl$MyTypedHandler.execute(ConsoleViewImpl.java:1161)
    at com.intellij.openapi.editor.impl.DefaultRawTypedHandler$1.run(DefaultRawTypedHandler.java:55)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:956)
    at com.intellij.openapi.editor.impl.DefaultRawTypedHandler.execute(DefaultRawTypedHandler.java:49)
    at com.intellij.openapi.editor.impl.EditorFactoryImpl$MyRawTypedHandler.execute(EditorFactoryImpl.java:317)
    at com.intellij.openapi.editor.actionSystem.TypedAction.lambda$actionPerformed$2(TypedAction.java:200)
    at com.intellij.reporting.FreezeLoggerImpl.runUnderPerformanceMonitor(FreezeLoggerImpl.java:28)
    at com.intellij.openapi.editor.actionSystem.TypedAction.lambda$actionPerformed$3(TypedAction.java:199)
    at com.intellij.util.SlowOperations.allowSlowOperations(SlowOperations.java:194)
    at com.intellij.openapi.editor.actionSystem.TypedAction.actionPerformed(TypedAction.java:199)
    at com.intellij.openapi.editor.impl.EditorImpl.processKeyTypedNormally(EditorImpl.java:1317)
    at com.intellij.openapi.editor.impl.EditorImpl.processKeyTyped(EditorImpl.java:1299)
    at com.intellij.openapi.editor.impl.EditorImpl.processKeyTyped(EditorImpl.java:3461)
    at com.intellij.openapi.editor.impl.EditorImpl$7.keyTyped(EditorImpl.java:1133)
    at java.desktop/java.awt.AWTEventMulticaster.keyTyped(AWTEventMulticaster.java:247)
    at java.desktop/java.awt.Component.processKeyEvent(Component.java:6611)
    at java.desktop/javax.swing.JComponent.processKeyEvent(JComponent.java:2892)
    at java.desktop/java.awt.Component.processEvent(Component.java:6433)
    at java.desktop/java.awt.Container.processEvent(Container.java:2266)
    at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5026)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854)
    at java.desktop/java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1953)
    at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:886)
    at java.desktop/java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1166)
    at java.desktop/java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:1023)
    at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:849)
    at com.intellij.ide.IdeKeyboardFocusManager.access$dispatchEvent$s1569605750(IdeKeyboardFocusManager.kt:18)
    at com.intellij.ide.IdeKeyboardFocusManager$dispatchEvent$1.invoke(IdeKeyboardFocusManager.kt:25)
    at com.intellij.ide.IdeKeyboardFocusManager$dispatchEvent$1.invoke(IdeKeyboardFocusManager.kt:25)
    at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:995)
    at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105)
    at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:995)
    at com.intellij.ide.IdeKeyboardFocusManager.dispatchEvent(IdeKeyboardFocusManager.kt:25)
    at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4903)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
    at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2804)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:793)
    at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:738)
    at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:730)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:765)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:763)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:762)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:667)
    at com.intellij.ide.IdeEventQueue.dispatchKeyEvent(IdeEventQueue.kt:602)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:569)
    at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:68)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:349)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:348)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:348)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:343)
    at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:995)
    at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:113)
    at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:995)
    at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$4(IdeEventQueue.kt:343)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:829)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:385)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
Caused by: java.io.IOException: 管道正在被关闭。
    at java.base/java.io.FileOutputStream.writeBytes(Native Method)
    at java.base/java.io.FileOutputStream.write(FileOutputStream.java:349)
    at java.base/java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:81)
    at java.base/java.io.BufferedOutputStream.flush(BufferedOutputStream.java:142)
    at java.base/sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:320)
    at java.base/sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:160)
    at java.base/java.io.OutputStreamWriter.flush(OutputStreamWriter.java:248)
    at com.github.continuedev.continueintellijextension.continue.CoreMessenger.write(CoreMessenger.kt:30)
    at com.github.continuedev.continueintellijextension.continue.CoreMessenger.request(CoreMessenger.kt:48)
    at com.github.continuedev.continueintellijextension.autocomplete.AutocompleteService.cancelCompletion(AutocompleteService.kt:120)
    at com.github.continuedev.continueintellijextension.autocomplete.AutocompleteService.clearCompletions(AutocompleteService.kt:125)
    at com.github.continuedev.continueintellijextension.autocomplete.AutocompleteCaretListener.caretPositionChanged(AutocompleteEditorListener.kt:23)
    at jdk.internal.reflect.GeneratedMethodAccessor113.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at com.intellij.util.EventDispatcher.dispatchVoidMethod(EventDispatcher.java:120)
    ... 94 more
fkh186 commented 4 months ago

55131A3F7FC07758D4FEACE6531425AC 8994D8DE1E98774E16D0B6DBB8B1AFE9 Add two screenshots

levdad commented 4 months ago

I have the same problem using rider and continue 0.0.50 and tabAutoComplete with codestral. It sometimes even freezes the ide completely.

sestinj commented 4 months ago

I believe this has been solved in changes in the dev branch, and is just waiting to be released early next week. Keep an eye out for version 0.0.53 when it's ready

fkh186 commented 4 months ago

I believe this has been solved in changes in the dev branch, and is just waiting to be released early next week. Keep an eye out for version 0.0.53 when it's ready

Thank you very much, looking forward to it,

levdad commented 4 months ago

I believe this has been solved in changes in the dev branch, and is just waiting to be released early next week. Keep an eye out for version 0.0.53 when it's ready

Hey @sestinj is there any ETA on the JetBrains release? Or a preview version? Thanks