Changesets · Branches · Tags · Compare
| Changeset | 256b0e1a670a072da5180306aee2012fe567a34353d0fa3bade1f0540a821ab4 |
|---|---|
| Author | Patrick Erichsen <patrick.a.erichsen@gmail.com> · 2025-05-20 20:55 -07:00 |
| Committer | Patrick Erichsen <patrick.a.erichsen@gmail.com> · 2025-05-20 20:55 -07:00 |
| Parents | e1bfdf0232be |
5 files changed
modified core/index.d.ts +5 −1
| @@ -842,7 +842,7 @@ | ||
| 842 | 842 | description: string; |
| 843 | 843 | prompt?: string; |
| 844 | 844 | params?: { [key: string]: any }; |
| 845 | - promptFile?: string | |
| 845 | + promptFile?: string; | |
| 846 | 846 | run: (sdk: ContinueSDK) => AsyncGenerator<string | undefined>; |
| 847 | 847 | } |
| 848 | 848 | |
| @@ -1253,6 +1253,10 @@ | ||
| 1253 | 1253 | streamId?: string; |
| 1254 | 1254 | } |
| 1255 | 1255 | |
| 1256 | +export interface ShowFilePayload { | |
| 1257 | + filepath: string; | |
| 1258 | +} | |
| 1259 | + | |
| 1256 | 1260 | export interface RangeInFileWithContents { |
| 1257 | 1261 | filepath: string; |
| 1258 | 1262 | range: { |
modified core/protocol/ideWebview.ts +2 −1
| @@ -8,6 +8,7 @@ | ||
| 8 | 8 | MessageContent, |
| 9 | 9 | RangeInFileWithContents, |
| 10 | 10 | AcceptOrRejectDiffPayload, |
| 11 | + ShowFilePayload, | |
| 11 | 12 | } from "../"; |
| 12 | 13 | |
| 13 | 14 | export type ToIdeFromWebviewProtocol = ToIdeFromWebviewOrCoreProtocol & { |
| @@ -23,7 +24,7 @@ | ||
| 23 | 24 | ]; |
| 24 | 25 | overwriteFile: [{ filepath: string; prevFileContent: string | null }, void]; |
| 25 | 26 | showTutorial: [undefined, void]; |
| 26 | - showFile: [{ filepath: string }, void]; | |
| 27 | + showFile: [ShowFilePayload, void]; | |
| 27 | 28 | toggleDevTools: [undefined, void]; |
| 28 | 29 | reloadWindow: [undefined, void]; |
| 29 | 30 | focusEditor: [undefined, void]; |
modified extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IdeProtocolClient.kt +11 −2
| @@ -91,6 +91,15 @@ | ||
| 91 | 91 | respond(jsonData) |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | + "showFile" -> { | |
| 95 | + val params = Gson().fromJson( | |
| 96 | + dataElement.toString(), | |
| 97 | + ShowFilePayload::class.java | |
| 98 | + ) | |
| 99 | + ide.openFile(params.filepath) | |
| 100 | + respond(null) | |
| 101 | + } | |
| 102 | + | |
| 94 | 103 | "getIdeSettings" -> { |
| 95 | 104 | val settings = ide.getIdeSettings() |
| 96 | 105 | respond(settings) |
| @@ -438,7 +447,7 @@ | ||
| 438 | 447 | "acceptDiff" -> { |
| 439 | 448 | val params = Gson().fromJson( |
| 440 | 449 | dataElement.toString(), |
| 441 | - AcceptDiffParams::class.java | |
| 450 | + AcceptOrRejectDiffPayload::class.java | |
| 442 | 451 | ) |
| 443 | 452 | val filepath = params.filepath; |
| 444 | 453 | |
| @@ -454,7 +463,7 @@ | ||
| 454 | 463 | "rejectDiff" -> { |
| 455 | 464 | val params = Gson().fromJson( |
| 456 | 465 | dataElement.toString(), |
| 457 | - RejectDiffParams::class.java | |
| 466 | + AcceptOrRejectDiffPayload::class.java | |
| 458 | 467 | ) |
| 459 | 468 | val filepath = params.filepath; |
| 460 | 469 |
modified extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/protocol/ideWebview.kt +0 −10
| @@ -15,16 +15,6 @@ | ||
| 15 | 15 | val toolCallId: String? |
| 16 | 16 | ) |
| 17 | 17 | |
| 18 | -data class AcceptDiffParams( | |
| 19 | - val filepath: String, | |
| 20 | - val streamId: String | |
| 21 | -) | |
| 22 | - | |
| 23 | -data class RejectDiffParams( | |
| 24 | - val filepath: String, | |
| 25 | - val streamId: String | |
| 26 | -) | |
| 27 | - | |
| 28 | 18 | data class InsertAtCursorParams( |
| 29 | 19 | val text: String |
| 30 | 20 | ) |
modified extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/types.kt +4 −0
| @@ -250,4 +250,8 @@ | ||
| 250 | 250 | data class AcceptOrRejectDiffPayload( |
| 251 | 251 | val filepath: String, |
| 252 | 252 | val streamId: String? = null |
| 253 | +) | |
| 254 | + | |
| 255 | +data class ShowFilePayload( | |
| 256 | + val filepath: String | |
| 253 | 257 | ) |
| No newline at the end of the file |