continue icon indicating copy to clipboard operation
continue copied to clipboard

`URI scheme is not "file"` when try to edit a prompt

Open vldF opened this issue 5 months ago • 5 comments

Before submitting your bug report

Relevant environment info

- OS: macos
- Continue version: 1.0.30
- IDE version: IJ 2025.1

Description

When I click on a pencil button near the prompt, I get the notification with Error handling message of type openFile: java.lang.IllegalArgumentException: URI scheme is not "file" error

To reproduce

  1. Open 'Prompts`
  2. Click on pencil icon

Log output

2025-08-05 13:06:01,526 [ 267487]   WARN - #com.github.continuedev.continueintellijextension.error.ContinueSentryService - Exception sent to Sentry: Error handling message of type openFile: java.lang.IllegalArgumentException: URI scheme is not "file"
java.lang.IllegalArgumentException: URI scheme is not "file"
	at java.base/java.io.File.<init>(File.java:423)
	at com.github.continuedev.continueintellijextension.continue.UriUtils.uriToFile(UriUtils.kt:37)
	at com.github.continuedev.continueintellijextension.continue.IntelliJIDE.openFile(IntelliJIde.kt:201)
	at com.github.continuedev.continueintellijextension.continue.IdeProtocolClient$handleMessage$1.invokeSuspend(IdeProtocolClient.kt:315)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
	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)

vldF avatar Aug 05 '25 10:08 vldF

It seems the exception is being thrown because of the protocol between core and IJ plugin. builtin isn't right scheme

Image

vldF avatar Aug 05 '25 10:08 vldF

As far as I can see here https://github.com/continuedev/continue/pull/6233, the init.prompt is a virtual fake file and we can't locate it in the FS. So, it seems we should disable an ability to edit it

vldF avatar Aug 05 '25 10:08 vldF

I believe you don't mind if I fix it

vldF avatar Aug 06 '25 08:08 vldF

@tingwai, can we close it as far as the #7011 is merged?

vldF avatar Aug 12 '25 07:08 vldF

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 Nov 11 '25 02:11 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 Nov 23 '25 02:11 github-actions[bot]