Code Monkey home page Code Monkey logo

refact-intellij's People

Contributors

jegernoutt avatar klink avatar olegklimov avatar oxyplay avatar reymondzzzz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

refact-intellij's Issues

[refact-1.2.1-lsp-9-bf376f1a] Chat (gpt-3.5-turbo) is not answering - invalid status code: 401 Unauthorized

image

Plugin version refact-1.2.1-lsp-9-bf376f1a
IDE version: PyCharm 2023.2.3 (Community Edition) Build #PC-232.10072.31, built on October 12, 2023

Logs:

2023-10-25T08:44:17.009794Z  INFO refact_lsp::http_server:253: 127.0.0.1:45138 POST /v1/chat body_bytes=152
2023-10-25T08:44:17.009821Z  INFO refact_lsp::scratchpads::chat_passthrough:59: chat passthrough 1 messages -> 1 messages after applying limits and possibly adding the default system message
2023-10-25T08:44:17.009829Z  INFO refact_lsp::http_server:182: chat prompt 9.243µs
2023-10-25T08:44:17.009839Z  INFO refact_lsp::http_server:288: /v1/chat completed in 52.108µs
2023-10-25T08:44:17.430641Z ERROR refact_lsp::restream:228: restream error: Invalid status code: 401 Unauthorized
InvalidStatusCode(401)
2023-10-25T08:44:17.431561Z  INFO refact_lsp::http_server:253: 127.0.0.1:45142 POST /v1/telemetry-network body_bytes=114
2023-10-25T08:44:17.431581Z  INFO refact_lsp::http_server:288: /v1/telemetry-network completed in 36.489µs

[JB plugin] Internal error: Default]

An internal error happened in the IDE plugin.

Message: *** exception class was changed or removed

Stack trace

  Unhandled exception in [CoroutineName(com.smallcloud.refactai.Initializer), StandaloneCoroutine{Cancelling}@8920189, Dispatchers.Default]
  
  java.nio.file.AccessDeniedException: C:\Users\Asimut\.refact\bin\refact-lsp.exe
at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:89)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
at java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:275)
at java.base/sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:110)
at java.base/java.nio.file.Files.deleteIfExists(Files.java:1191)
at java.base/java.nio.file.Files.copy(Files.java:3148)
at com.smallcloud.refactai.lsp.LSPProcessHolder.startup(LSPProcessHolder.kt:101)
at com.smallcloud.refactai.Initializer.initialize(Initializer.kt:55)
at com.smallcloud.refactai.Initializer.execute(Initializer.kt:25)
at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1$1.invokeSuspend(StartupManagerImpl.kt:534)
at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1$1.invoke(StartupManagerImpl.kt)
at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1$1.invoke(StartupManagerImpl.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:167)
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1.invokeSuspend(StartupManagerImpl.kt:532)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [CoroutineName(com.smallcloud.refactai.Initializer), StandaloneCoroutine{Cancelled}@8920189, Dispatchers.Default]

Environment

  • Plugin version: 1.2.3
  • IDE: IntelliJ IDEA 2023.2.5 Build #IU-232.10227.8
  • JDK: 17.0.9; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
  • OS: Windows 10.0
  • MODE: Cloud

Additional information

[JB plugin] Internal error: UninitializedPropertyAccessException

An internal error happened in the IDE plugin.

Message: Unhandled exception in [CoroutineName(run activity), run activity, StandaloneCoroutine{Cancelling}@208b764e, Dispatchers.Default]

Stack trace

kotlin.UninitializedPropertyAccessException: lateinit property instance has not been initialized
	at com.smallcloud.refactai.listeners.LastEditorGetterListener$Companion.getInstance(LastEditorGetterListener.kt:85)
	at com.smallcloud.refactai.Initializer.initialize(Initializer.kt:28)
	at com.smallcloud.refactai.Initializer.execute(Initializer.kt:25)
	at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1.invokeSuspend(StartupManagerImpl.kt:482)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
	Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [CoroutineName(run activity), run activity, StandaloneCoroutine{Cancelled}@208b764e, Dispatchers.Default]

Environment

  • Plugin version: 1.2.3
  • IDE: JetBrains Rider 2023.3 EAP 8 Build #RD-233.11799.49
  • JDK: 17.0.9; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
  • OS: Windows 10.0
  • MODE: Cloud

Additional information

Better monospace font in chat

image

Now looks like this: "%0.4f" doesn't even look like a different font. We want it more visible, highlighted in some way:

image

BLOCKER Unable to open project

java.lang.RuntimeException: Cannot invoke (class=LastEditorGetterListener, method=fileOpened, topic=FileEditorManagerListener)
at com.intellij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:657)
at com.intellij.util.messages.impl.MessageBusImplKt.deliverMessage(MessageBusImpl.kt:415)
at com.intellij.util.messages.impl.MessageBusImplKt.pumpWaiting(MessageBusImpl.kt:394)
at com.intellij.util.messages.impl.MessageBusImplKt.access$pumpWaiting(MessageBusImpl.kt:1)
at com.intellij.util.messages.impl.MessagePublisher.invoke(MessageBusImpl.kt:454)
at jdk.proxy2/jdk.proxy2.$Proxy71.fileOpened(Unknown Source)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl$doOpenInEdtImpl$2.invoke(FileEditorManagerImpl.kt:1124)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl$doOpenInEdtImpl$2.invoke(FileEditorManagerImpl.kt:1122)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl$openFileOnStartup$2.invokeSuspend(FileEditorManagerImpl.kt:2047)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at com.intellij.openapi.application.impl.DispatchedRunnable.run(DispatchedRunnable.kt:35)
at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:209)
at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:21)
at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:191)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:829)
at com.intellij.openapi.application.impl.ApplicationImpl$3.run(ApplicationImpl.java:454)
at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:79)
at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:122)
at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:41)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:788)
at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739)
at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:731)
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:758)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:667)
at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$7(IdeEventQueue.kt:571)
at com.intellij.openapi.application.impl.ApplicationImpl.withoutImplicitRead(ApplicationImpl.java:1444)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:571)
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:105)
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.util.NoSuchElementException: Array contains no element matching the predicate.
at com.smallcloud.refactai.listeners.LastEditorGetterListener.fileOpened(LastEditorGetterListener.kt:97)
at com.intellij.util.messages.impl.MessageBusImplKt.invokeMethod(MessageBusImpl.kt:680)
at com.intellij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:644)
... 48 more
2023-11-01 14:23:22,550 [ 14822] SEVERE - #c.i.o.p.i.ProjectManagerImpl - WebStorm 2023.1.4 Build #WS-231.9225.18
2023-11-01 14:23:22,550 [ 14822] SEVERE - #c.i.o.p.i.ProjectManagerImpl - JDK: 17.0.7; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
2023-11-01 14:23:22,551 [ 14823] SEVERE - #c.i.o.p.i.ProjectManagerImpl - OS: Linux
2023-11-01 14:23:22,551 [ 14823] SEVERE - #c.i.o.p.i.ProjectManagerImpl - Plugin to blame: Refact.ai version: 1.1.54

Keyboard Shortcuts

Button in Settings -> Keymap, filter Refact.ai
Rename Manual so it's searchable by "Refact" string

[JB plugin] Internal error: Default]

An internal error happened in the IDE plugin.

Message: *** exception class was changed or removed

Stack trace

   Unhandled exception in [CoroutineName(com.smallcloud.refactai.Initializer), StandaloneCoroutine{Cancelling}@253df4f1, Dispatchers.Default]
   
   com.intellij.execution.process.ProcessNotCreatedException: Cannot run program "/Users/adamnickle-mbp/.refact/bin/refact-lsp": error=13, Permission denied
	at com.intellij.execution.configurations.GeneralCommandLine.createProcess(GeneralCommandLine.java:356)
	at com.smallcloud.refactai.lsp.LSPProcessHolder.startProcess(LSPProcessHolder.kt:163)
	at com.smallcloud.refactai.lsp.LSPProcessHolder.settingsChanged(LSPProcessHolder.kt:136)
	at com.smallcloud.refactai.lsp.LSPProcessHolder.startup(LSPProcessHolder.kt:107)
	at com.smallcloud.refactai.Initializer.initialize(Initializer.kt:52)
	at com.smallcloud.refactai.Initializer.execute(Initializer.kt:25)
	at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1$1.invokeSuspend(StartupManagerImpl.kt:534)
	at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1$1.invoke(StartupManagerImpl.kt)
	at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1$1.invoke(StartupManagerImpl.kt)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:167)
	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
	at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1.invokeSuspend(StartupManagerImpl.kt:532)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
	Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [CoroutineName(com.smallcloud.refactai.Initializer), StandaloneCoroutine{Cancelled}@253df4f1, Dispatchers.Default]
Caused by: java.io.IOException: Cannot run program "/Users/adamnickle-mbp/.refact/bin/refact-lsp": error=13, Permission denied
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
	at com.intellij.execution.configurations.GeneralCommandLine.startProcess(GeneralCommandLine.java:432)
	at com.intellij.execution.configurations.GeneralCommandLine.createProcess(GeneralCommandLine.java:346)
	... 18 more
Caused by: java.io.IOException: error=13, Permission denied
	at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
	at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:314)
	at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:244)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
	... 21 more

Environment

  • Plugin version: 1.2.4
  • IDE: PyCharm 2023.2 Build #PY-232.8660.197
  • JDK: 17.0.7; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
  • OS: macOS 14.1
  • ARCH: aarch64
  • MODE: Cloud

Additional information

[JB plugin] High CPU usage and Internal error: Throwable

An internal error happened in the IDE plugin.

Message: (no message)

Stack trace

java.lang.Throwable: Assert: must be called on EDT
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:370)
	at com.intellij.util.ui.EDT.assertIsEdt(EDT.java:68)
	at com.intellij.codeInsight.hint.LocalHintManager.getHintPosition(LocalHintManager.java:346)
	at com.intellij.codeInsight.hint.HintManagerImpl.showInformationHint(HintManagerImpl.java:486)
	at com.intellij.codeInsight.hint.HintManagerImpl.showInformationHint(HintManagerImpl.java:460)
	at com.intellij.codeInsight.hint.HintManagerImpl.showInformationHint(HintManagerImpl.java:452)
	at com.intellij.openapi.editor.EditorModificationUtil.checkModificationAllowed(EditorModificationUtil.java:148)
	at com.smallcloud.refactai.modes.completion.CompletionMode.shouldIgnoreChange(CompletionMode.kt:322)
	at com.smallcloud.refactai.modes.completion.CompletionMode.onTextChange(CompletionMode.kt:93)
	at com.smallcloud.refactai.modes.ModeProvider.checkAndSendEvents(ModeProvider.kt:97)
	at com.smallcloud.refactai.modes.ModeProvider._init_$lambda$0(ModeProvider.kt:71)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
	at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:275)
	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:249)
	at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:31)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.executeFirstTaskAndHelpQueue(BoundedTaskExecutor.java:227)
	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:218)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:215)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:840)

Environment

  • Plugin version: 1.2.4
  • IDE: IntelliJ IDEA 2023.2.5 Build #IU-232.10227.8
  • JDK: 17.0.9; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
  • OS: macOS 14.1.1
  • ARCH: aarch64
  • MODE: Cloud

Additional information

This exception is thrown when closing on of the open projects.
In addition, CPU usage for the plugin is usually high.

image IntelliJ was 99% idling during this time: image

On freshly started IntelliJ cpu usage is <1%

[chat] Attaching invalid content

When I have an active console:
Screenshot from 2023-09-02 01-57-27

following buttons:
Screenshot from 2023-09-02 01-57-55

are considering console as a context source.

So, instead of sending an opened file you're sending a console output

[FIM] wierd replacement mode

Here it tries to replace my type "Fignya" with List[Point2d] and change other things, in existing text. The cursor is on grey line.

image

Any kind of replacement of the current code should work only for the current line, right of the cursor. It's there only to leave ")" "]" alone when completing the current line.

Related bug: if completion exactly matches the next function, user will see nothing. A copy of the existing function should appear, because that's what the model has added.

[completion] A problem with `\n` in the beginning of completion

When a completion text starts with \n, the plugin just ignores this

An example:

def quick_sort(arr):

You have to put the cursor to the end of the line and press force completion keys combination
You're going to receive such tokens:

-- 3389597 -- 20230902 02:08:02 MODEL   30.0ms "\n   "
-- 3389597 -- 20230902 02:08:02 MODEL   37.7ms " if"
-- 3389597 -- 20230902 02:08:02 MODEL   43.7ms " len"
-- 3389597 -- 20230902 02:08:02 MODEL   50.2ms "("
-- 3389597 -- 20230902 02:08:02 MODEL   56.3ms "arr"
-- 3389597 -- 20230902 02:08:02 MODEL   62.9ms ")"
-- 3389597 -- 20230902 02:08:02 MODEL   69.5ms " <="
-- 3389597 -- 20230902 02:08:02 MODEL   75.5ms " "
-- 3389597 -- 20230902 02:08:02 MODEL   81.9ms "1"
-- 3389597 -- 20230902 02:08:02 MODEL   88.8ms ":"
-- 3389597 -- 20230902 02:08:02 MODEL   94.8ms "\n       "
-- 3389597 -- 20230902 02:08:02 MODEL  101.4ms " return"
.....

But the plugin will never render them

Renewing connection to refact-self-hosting

WME, only tested with the Docker version of refact-self-hosting.

  1. Start your favorite IntelliJ IDEA with the local refact-self-hosting turned off
  2. Start your local refact-self-hosting
  3. Absolutely nothing works in the plugin
  4. Close and reopen the window (note, you don't need to restart the IDEA, just reopen the window)
  5. Now it works

Ideally, you shouldn't need to close and reopen the window. Not a deal breaker for using the products, but a bad experience for someone trying it out since nothing appears to be working and no error message is shown.

[JB plugin] Internal error: Default]

An internal error happened in the IDE plugin.

Message: *** exception class was changed or removed

Stack trace

  Unhandled exception in [CoroutineName(com.smallcloud.refactai.Initializer), StandaloneCoroutine{Cancelling}@774a301f, Dispatchers.Default]
  
  java.nio.file.AccessDeniedException: C:\Users\exon\.refact\bin\refact-lsp.exe
at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:89)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
at java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:275)
at java.base/sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:110)
at java.base/java.nio.file.Files.deleteIfExists(Files.java:1191)
at java.base/java.nio.file.Files.copy(Files.java:3148)
at com.smallcloud.refactai.lsp.LSPProcessHolder.startup(LSPProcessHolder.kt:101)
at com.smallcloud.refactai.Initializer.initialize(Initializer.kt:52)
at com.smallcloud.refactai.Initializer.execute(Initializer.kt:25)
at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1$1.invokeSuspend(StartupManagerImpl.kt:534)
at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1$1.invoke(StartupManagerImpl.kt)
at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1$1.invoke(StartupManagerImpl.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:167)
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1.invokeSuspend(StartupManagerImpl.kt:532)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [CoroutineName(com.smallcloud.refactai.Initializer), StandaloneCoroutine{Cancelled}@774a301f, Dispatchers.Default]

Environment

  • Plugin version: 1.2.4
  • IDE: WebStorm 2023.2.5 Build #WS-232.10227.9
  • JDK: 17.0.9; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
  • OS: Windows 10.0
  • ARCH: amd64
  • MODE: Cloud

Additional information

[FIM] Does not delete spaces on the left of the cursor

Example to reproduce:

def random_points_in_square(N: int = 100, square_size: float = 1):
    """
    Square is center [-square_size/2, square_size/2]
    """
    points = []
    for a in range(N):
        x = random.random() * square_size - square_size / 2
        y = random.random() * square_size - square_size / 2
        points.append(Point2d(x, y))
・・|

2-3 spaces at the end. After hitting Space:

image

Tab does not delete spaces to the left.

[JB plugin] Internal error: SocketTimeoutException

An internal error happened in the IDE plugin.

Message: (no message)

Stack trace

java.net.SocketTimeoutException: Connect timed out
	at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:551)
	at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:602)
	at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
	at java.base/java.net.Socket.connect(Socket.java:633)
	at java.base/sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:304)
	at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:178)
	at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:533)
	at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:638)
	at java.base/sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:266)
	at java.base/sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:380)
	at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:193)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1287)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1128)
	at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:179)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1430)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1401)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:220)
	at com.intellij.util.io.HttpRequests$Request.write(HttpRequests.java:118)
	at com.intellij.util.io.HttpRequests$Request.write(HttpRequests.java:112)
	at com.smallcloud.refactai.UpdateChecker.checkNewVersion$lambda$1(UpdateChecker.kt:59)
	at com.intellij.util.io.HttpRequests.doProcess(HttpRequests.java:524)
	at com.intellij.util.io.HttpRequests.process(HttpRequests.java:506)
	at com.intellij.util.io.HttpRequests$RequestBuilderImpl.connect(HttpRequests.java:335)
	at com.smallcloud.refactai.UpdateChecker.checkNewVersion(UpdateChecker.kt:58)
	at com.smallcloud.refactai.UpdateChecker._init_$lambda$0(UpdateChecker.kt:33)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
	at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:275)
	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:249)
	at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:31)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.executeFirstTaskAndHelpQueue(BoundedTaskExecutor.java:227)
	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:218)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:215)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:840)

Environment

  • Plugin version: 1.2.4
  • IDE: WebStorm 2023.2.5 Build #WS-232.10227.9
  • JDK: 17.0.9; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
  • OS: macOS 14.1.1
  • ARCH: aarch64
  • MODE: Cloud

Additional information

"Add Privacy Rule" in context menu

File context menu -> Add Privacy Rule: Turn Off
File context menu -> Add Privacy Rule: Level 1
File context menu -> Add Privacy Rule: Level 2

File context menu --> Privacy Rules

[JB plugin] Internal error: Default]

An internal error happened in the IDE plugin.

Message: *** exception class was changed or removed

Stack trace

  Unhandled exception in [CoroutineName(com.smallcloud.refactai.Initializer), StandaloneCoroutine{Cancelling}@289e8a47, Dispatchers.Default]
  
  java.nio.file.AccessDeniedException: C:\Users\macou\.refact\bin\refact-lsp.exe
at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:89)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
at java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:275)
at java.base/sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:110)
at java.base/java.nio.file.Files.deleteIfExists(Files.java:1191)
at java.base/java.nio.file.Files.copy(Files.java:3148)
at com.smallcloud.refactai.lsp.LSPProcessHolder.startup(LSPProcessHolder.kt:101)
at com.smallcloud.refactai.Initializer.initialize(Initializer.kt:52)
at com.smallcloud.refactai.Initializer.execute(Initializer.kt:25)
at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1$1.invokeSuspend(StartupManagerImpl.kt:534)
at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1$1.invoke(StartupManagerImpl.kt)
at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1$1.invoke(StartupManagerImpl.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:167)
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1.invokeSuspend(StartupManagerImpl.kt:532)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [CoroutineName(com.smallcloud.refactai.Initializer), StandaloneCoroutine{Cancelled}@289e8a47, Dispatchers.Default]

Environment

  • Plugin version: 1.2.4
  • IDE: IntelliJ IDEA 2023.2.5 Build #IU-232.10227.8
  • JDK: 17.0.9; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
  • OS: Windows 11.0
  • ARCH: amd64
  • MODE: Cloud

Additional information

[JB plugin] Internal error: Default]

An internal error happened in the IDE plugin.

Message: *** exception class was changed or removed

Stack trace

  Unhandled exception in [CoroutineName(com.smallcloud.refactai.Initializer), StandaloneCoroutine{Cancelling}@2454fde6, Dispatchers.Default]
  
  java.nio.file.AccessDeniedException: C:\Users\gunde\.refact\bin\refact-lsp.exe
at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:89)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
at java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:275)
at java.base/sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:110)
at java.base/java.nio.file.Files.deleteIfExists(Files.java:1191)
at java.base/java.nio.file.Files.copy(Files.java:3148)
at com.smallcloud.refactai.lsp.LSPProcessHolder.startup(LSPProcessHolder.kt:101)
at com.smallcloud.refactai.Initializer.initialize(Initializer.kt:52)
at com.smallcloud.refactai.Initializer.execute(Initializer.kt:25)
at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1$1.invokeSuspend(StartupManagerImpl.kt:534)
at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1$1.invoke(StartupManagerImpl.kt)
at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1$1.invoke(StartupManagerImpl.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:167)
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1.invokeSuspend(StartupManagerImpl.kt:532)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [CoroutineName(com.smallcloud.refactai.Initializer), StandaloneCoroutine{Cancelled}@2454fde6, Dispatchers.Default]

Environment

  • Plugin version: 1.2.4
  • IDE: PyCharm 2023.2.1 Build #PC-232.9559.58
  • JDK: 17.0.8; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
  • OS: Windows 11.0
  • ARCH: amd64
  • MODE: Cloud

Additional information

[JB plugin] Internal error: Exception

An internal error happened in the IDE plugin.

Message: (no message)

Stack trace

java.lang.Exception: test
	at com.smallcloud.refactai.Initializer.initialize(Initializer.kt:54)
	at com.smallcloud.refactai.Initializer.runActivity(Initializer.kt:25)
	at com.intellij.ide.startup.impl.StartupManagerImpl.runActivityAndMeasureDuration(StartupManagerImpl.kt:327)
	at com.intellij.ide.startup.impl.StartupManagerImpl.access$runActivityAndMeasureDuration(StartupManagerImpl.kt:72)
	at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$4$1$1.invoke(StartupManagerImpl.kt:264)
	at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$4$1$1.invoke(StartupManagerImpl.kt:263)
	at com.intellij.openapi.progress.CoroutinesKt.blockingContext(coroutines.kt:248)
	at com.intellij.openapi.progress.CoroutinesKt.blockingContext(coroutines.kt:199)
	at com.intellij.ide.startup.impl.StartupManagerImpl.runPostStartupActivities(StartupManagerImpl.kt:263)
	at com.intellij.ide.startup.impl.StartupManagerImpl.access$runPostStartupActivities(StartupManagerImpl.kt:72)
	at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$2.invokeSuspend(StartupManagerImpl.kt:181)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)

Environment

  • Plugin version: 1.2.1-lsp-9-bf376f1a
  • IDE: PyCharm 2023.2.1 Build #PC-232.9559.58
  • JDK: 17.0.8; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
  • OS: macOS 14.0

Additional information

Extra characters after completion

Completion uses 'mid' as a string to insert:

image

Equivalent transformation:

mid += orig[-tail]
tail -= 1

maybe the plugin should do it until end-of-line is reached?

A similar behavior might be there for the cursor position.

[JB plugin] Internal error: UninitializedPropertyAccessException

An internal error happened in the IDE plugin.

Message: Unhandled exception in [CoroutineName(run activity), run activity, StandaloneCoroutine{Cancelling}@3f21a2cf, Dispatchers.Default]

Stack trace

kotlin.UninitializedPropertyAccessException: lateinit property instance has not been initialized
	at com.smallcloud.refactai.listeners.LastEditorGetterListener$Companion.getInstance(LastEditorGetterListener.kt:85)
	at com.smallcloud.refactai.Initializer.initialize(Initializer.kt:28)
	at com.smallcloud.refactai.Initializer.execute(Initializer.kt:25)
	at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1.invokeSuspend(StartupManagerImpl.kt:482)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
	Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [CoroutineName(run activity), run activity, StandaloneCoroutine{Cancelled}@3f21a2cf, Dispatchers.Default]

Environment

  • Plugin version: 1.2.3
  • IDE: CLion 2023.3 EAP Build #CL-233.11868
  • JDK: 17.0.9; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
  • OS: Windows 11.0
  • MODE: Cloud

Additional information

trailing quoutes and brackets

How to reproduce:
Model tries to make a suggestion within existing quotes, brackets, etc. Model puts the symbol it generated in the right place and shifts the existing symbol up to the end of the suggestion. Here are few examples of it:

[JB plugin] Internal error: Default]

An internal error happened in the IDE plugin.

Message: *** exception class was changed or removed

Stack trace

  Unhandled exception in [CoroutineName(com.smallcloud.refactai.Initializer), StandaloneCoroutine{Cancelling}@91bed, Dispatchers.Default]
  
  java.nio.file.AccessDeniedException: C:\Users\exon\.refact\bin\refact-lsp.exe
at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:89)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
at java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:275)
at java.base/sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:110)
at java.base/java.nio.file.Files.deleteIfExists(Files.java:1191)
at java.base/java.nio.file.Files.copy(Files.java:3148)
at com.smallcloud.refactai.lsp.LSPProcessHolder.startup(LSPProcessHolder.kt:101)
at com.smallcloud.refactai.Initializer.initialize(Initializer.kt:52)
at com.smallcloud.refactai.Initializer.execute(Initializer.kt:25)
at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1$1.invokeSuspend(StartupManagerImpl.kt:534)
at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1$1.invoke(StartupManagerImpl.kt)
at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1$1.invoke(StartupManagerImpl.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:167)
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1.invokeSuspend(StartupManagerImpl.kt:532)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [CoroutineName(com.smallcloud.refactai.Initializer), StandaloneCoroutine{Cancelled}@91bed, Dispatchers.Default]

Environment

  • Plugin version: 1.2.4
  • IDE: WebStorm 2023.2.5 Build #WS-232.10227.9
  • JDK: 17.0.9; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
  • OS: Windows 10.0
  • ARCH: amd64
  • MODE: Cloud

Additional information

[QUESTION] Supporting IDE versions

Hi,

Thanks for the great work. I tried installing the plugin for both PyCharm and IntelliJ, but I received an error message for both versions. Even after updating PyCharm to the latest version, I still get the same error. Could you please provide an idea of the supported versions of the IDEs required to use this plugin?

Screen Shot 2023-04-06 at 11 18 56 AM

Can't login with JetBrains plugin

Upon clicking login I am redirected to https://codify.smallcloud.ai/authentication?token= -- where:

  1. The SSL cert is wrong/expired
  2. Even if I click through that I'm presented with a 404 from nginx

Code suggestions and completions don`t work

IntelliJ IDEA 2023.2.2 (Ultimate Edition)
Build #IU-232.9921.47, built on September 13, 2023

Runtime version: 17.0.8+7-b1000.22 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.

I discovered the problem a long time ago, but didn’t have time to report it.
Regardless of the programming language, the plugin does not offer its code and its auto-input at all. In fact, at the moment, only the chat is working normally for me and that’s it.

Changing the license account does NOT help, reinstalling the plugin does the same.

Also, when specifying a model in the plugin settings, this does not change the “chat provider” from gpt3.5 to the specified model.

  • Plugin version: 1.2.4
  • IDE: IntelliJ IDEA 2023.2.2 Build #IU-232.9921.47
  • JDK: 17.0.8; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
  • OS: Windows 10.0
  • ARCH: amd64
  • MODE: Cloud

[FIM] Adds odd number of spaces on Tab

Code to reproduce:

def random_points_in_square(N: int = 100, square_size: float = 1):
    """
    Square is center [-square_size/2, square_size/2]
    """
    points = []
    for k in range(N):

image

[JB plugin] Internal error: Default]

An internal error happened in the IDE plugin.

Message: *** exception class was changed or removed

Stack trace

  Unhandled exception in [CoroutineName(com.smallcloud.refactai.Initializer), StandaloneCoroutine{Cancelling}@271031ac, Dispatchers.Default]
  
  java.nio.file.AccessDeniedException: C:\Users\robin\.refact\bin\refact-lsp.exe
at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:89)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
at java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:275)
at java.base/sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:110)
at java.base/java.nio.file.Files.deleteIfExists(Files.java:1191)
at java.base/java.nio.file.Files.copy(Files.java:3148)
at com.smallcloud.refactai.lsp.LSPProcessHolder.startup(LSPProcessHolder.kt:101)
at com.smallcloud.refactai.Initializer.initialize(Initializer.kt:55)
at com.smallcloud.refactai.Initializer.execute(Initializer.kt:25)
at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1$1.invokeSuspend(StartupManagerImpl.kt:534)
at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1$1.invoke(StartupManagerImpl.kt)
at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1$1.invoke(StartupManagerImpl.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:167)
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1.invokeSuspend(StartupManagerImpl.kt:532)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [CoroutineName(com.smallcloud.refactai.Initializer), StandaloneCoroutine{Cancelled}@271031ac, Dispatchers.Default]

Environment

  • Plugin version: 1.2.3
  • IDE: PyCharm 2023.2.2 Build #PC-232.9921.89
  • JDK: 17.0.8; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
  • OS: Windows 11.0
  • MODE: Cloud

Additional information

[chat] Messages stripping

What I see in the chat
image

And here is what I see in the request
image

There is another example:
image

Looks like the plugin just randomly strips the messages

[JB plugin] Internal error: Default]

An internal error happened in the IDE plugin.

Message: *** exception class was changed or removed

Stack trace

  Unhandled exception in [CoroutineName(com.smallcloud.refactai.Initializer), StandaloneCoroutine{Cancelling}@5fbb50fe, Dispatchers.Default]
  
  java.nio.file.AccessDeniedException: C:\Users\Asimut\.refact\bin\refact-lsp.exe
at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:89)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
at java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:275)
at java.base/sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:110)
at java.base/java.nio.file.Files.deleteIfExists(Files.java:1191)
at java.base/java.nio.file.Files.copy(Files.java:3148)
at com.smallcloud.refactai.lsp.LSPProcessHolder.startup(LSPProcessHolder.kt:101)
at com.smallcloud.refactai.Initializer.initialize(Initializer.kt:55)
at com.smallcloud.refactai.Initializer.execute(Initializer.kt:25)
at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1$1.invokeSuspend(StartupManagerImpl.kt:534)
at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1$1.invoke(StartupManagerImpl.kt)
at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1$1.invoke(StartupManagerImpl.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:167)
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
at com.intellij.ide.startup.impl.StartupManagerImplKt$launchActivity$1.invokeSuspend(StartupManagerImpl.kt:532)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [CoroutineName(com.smallcloud.refactai.Initializer), StandaloneCoroutine{Cancelled}@5fbb50fe, Dispatchers.Default]

Environment

  • Plugin version: 1.2.3
  • IDE: IntelliJ IDEA 2023.2.5 Build #IU-232.10227.8
  • JDK: 17.0.9; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
  • OS: Windows 10.0
  • MODE: Cloud

Additional information

[UI] Icon and tooltip text do not change when selecting files with different privacy level

Precondition:
Two files, file0 with Privacy Rule Level 0 and file1 with Privacy Rule Level 1

Steps:

  1. Open file1 and check the Refact icon and tooltip text
  2. Attempt to use autocompletion in file1
  3. Open file0 and check the Refact icon and tooltip text
  4. Attempt to use autocompletion in file0

Expected results:

  1. Icon and tooltip text for file1 should reflect that the privacy level is not zero and display Refact icon
  2. Autocompletion should work
  3. Icon and tooltip text for file1 should reflect that the privacy level is zero and display "hand" icon
  4. Autocompletion should not work

Actual result:

  1. Icon and text are displayed for last selected Privacy Rule. This may or may not be correct depending on the last selected Privacy Rule.
  2. Autocompletion is working
  3. Icon and text are displayed for last selected Privacy Rule. This may or may not be correct depending on the last selected Privacy Rule.
  4. Autocompletion is not working
Screencast.from.03-08-23.04.14.12.webm

[chat] Ctrl+Shift+C is unusable

  1. It does not open a new chat (moves focus to an existing chat instead).
  2. It does not check "Send selected text".

It's impossible to select text, press Ctrl+Shift+C and tell the model to change the text.

Self-hosted version ask user to login and provide API key. Completion/chat not working.

There is several problems.
1.
Self-hosted version trying to login and check API key even if Inference URL set to http://127.0.0.1:8008/)
This messages are repeated in the log:

2023-09-08 01:49:25,452 [ 451242]   WARN - check_login - call
2023-09-08 01:49:25,526 [ 451316]   WARN - check_login - recall: {
    "retcode": "FAILED",
    "human_readable_message": "The API key is not recognized (1)."
}

Steps to reproduce:

  1. Install Refact plugin.
  2. Click to login to RefactAI.
  3. Click to Settings
  4. Set Advanced - Inference URL to http://127.0.0.1:8008/ and save settings.
    5 Try completion - it works. Try open chat - No chats availiable

Workaround: login to cloud, then delete API key and set Inference URL for self-hosted.

Sometimes you are not logged as self-hosted but logged as null. In this case completion and chat not working.
Steps to reproduce: First installation?

Plugin version 1.1.53

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.