diff --git a/.github/workflows/build-with-cody.yml b/.github/workflows/build-with-cody.yml index 3d151d99cc..370d9da0b4 100644 --- a/.github/workflows/build-with-cody.yml +++ b/.github/workflows/build-with-cody.yml @@ -39,6 +39,8 @@ jobs: git fetch --prune --unshallow echo "RELEASE_VERSION=$(git describe --tags)-$CODY_COMMIT" >> $GITHUB_ENV - run: ./gradlew buildPlugin "-PpluginVersion=$RELEASE_VERSION" "-Pcody.commit=$CODY_COMMIT" + env: + GITHUB_TOKEN: ${{ secrets.CODY_GITHUB_TOKEN }} - run: ./gradlew --stop - name: Upload the plugin package uses: actions/upload-artifact@v4 diff --git a/.github/workflows/experimental-release.yml b/.github/workflows/experimental-release.yml index 0fe0d70633..1ab4bb00c0 100644 --- a/.github/workflows/experimental-release.yml +++ b/.github/workflows/experimental-release.yml @@ -33,3 +33,4 @@ jobs: ./gradlew "-PpluginVersion=${RELEASE_VERSION}" publishPlugin env: PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }} + GITHUB_TOKEN: ${{ secrets.CODY_GITHUB_TOKEN }} diff --git a/.github/workflows/nightly-release.yml b/.github/workflows/nightly-release.yml index 77cee59443..66dad3bc74 100644 --- a/.github/workflows/nightly-release.yml +++ b/.github/workflows/nightly-release.yml @@ -33,3 +33,4 @@ jobs: ./gradlew "-PpluginVersion=${RELEASE_VERSION}" publishPlugin env: PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }} + GITHUB_TOKEN: ${{ secrets.CODY_GITHUB_TOKEN }} diff --git a/.github/workflows/stable-release.yml b/.github/workflows/stable-release.yml index 5152749448..f6958e8386 100644 --- a/.github/workflows/stable-release.yml +++ b/.github/workflows/stable-release.yml @@ -29,3 +29,4 @@ jobs: - run: ./gradlew "-PpluginVersion=$RELEASE_VERSION" publishPlugin env: PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }} + GITHUB_TOKEN: ${{ secrets.CODY_GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8085cb26d6..e0e173bddf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,8 +44,24 @@ jobs: cache: gradle # Skip Code Search build in CI because it's slow, and we don't use it anyway for testing purposes. - run: echo "SKIP_CODE_SEARCH_BUILD=true" >> $GITHUB_ENV + # Checkout Cody and generate protocol files + - name: Checkout Cody + uses: actions/checkout@v4 + with: + repository: sourcegraph/cody + token: ${{ secrets.CODY_GITHUB_TOKEN }} + path: .cody-repo + - name: Install Cody Dependencies + run: | + cd .cody-repo + pnpm install --prefer-offline + - run: echo "CODY_DIR=${{ github.workspace }}/.cody-repo" >> $GITHUB_ENV - run: ./gradlew spotlessCheck + env: + GITHUB_TOKEN: ${{ secrets.CODY_GITHUB_TOKEN }} - run: ./gradlew check + env: + GITHUB_TOKEN: ${{ secrets.CODY_GITHUB_TOKEN }} - name: Upload the test report if: always() uses: actions/upload-artifact@v4 @@ -54,6 +70,8 @@ jobs: path: build/reports/tests/ compression-level: 9 - run: ./gradlew buildPlugin + env: + GITHUB_TOKEN: ${{ secrets.CODY_GITHUB_TOKEN }} - run: ./gradlew --stop - name: Upload the plugin package uses: actions/upload-artifact@v4 diff --git a/README.md b/README.md index 34b11505fb..74a0c76c94 100644 --- a/README.md +++ b/README.md @@ -129,7 +129,7 @@ The plugin works with all JetBrains IDEs, including: - To search with Sourcegraph, press Alt+S (⌥S on Mac). - To share a link to your code or search through the website, right-click in the editor, and choose an action under the `Sourcegraph` context menu item. -- To use your private Sourcegraph instance, open `Settings | Tools | Sourcegraph` and enter your URL and access token. +- To use your private Sourcegraph instance, ensure that you are logged in with Cody via your instance URL and access token (please ensure you use an access token during auth). ## Settings diff --git a/build.gradle.kts b/build.gradle.kts index f257c81542..620c71b5ff 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -185,7 +185,18 @@ fun download(url: String, output: File) { } println("Downloading... $url") assert(output.parentFile.mkdirs()) { output.parentFile } - Files.copy(URL(url).openStream(), output.toPath()) + + val githubToken = System.getenv("GITHUB_TOKEN") + if (url.contains("github.com") && !githubToken.isNullOrEmpty()) { + val connection = URL(url).openConnection() as java.net.HttpURLConnection + connection.setRequestProperty("Authorization", "token $githubToken") + connection.setRequestProperty("User-Agent", "Gradle-Build") + connection.instanceFollowRedirects = true + connection.connect() + Files.copy(connection.inputStream, output.toPath()) + } else { + Files.copy(URL(url).openStream(), output.toPath()) + } } fun copyRecursively(input: File, output: File) { @@ -383,7 +394,7 @@ tasks { } return Paths.get(pathString).toFile() } - val url = "https://github.com/sourcegraph/cody/archive/$codyCommit.zip" + val url = "https://api.github.com/repos/sourcegraph/cody/zipball/$codyCommit" val zipFile = githubArchiveCache.resolve("$codyCommit.zip") download(url, zipFile) val destination = githubArchiveCache.resolve("cody").resolve("cody-$codyCommit") @@ -492,7 +503,7 @@ tasks { register("copyProtocol") { copyProtocol() } register("buildCodeSearch") { buildCodeSearch() } - register("buildCody") { buildCody() } + register("buildCody") { doLast { buildCody() } } processResources { dependsOn(":buildCodeSearch") } @@ -508,13 +519,16 @@ tasks { buildPlugin { dependsOn(project.tasks.getByPath("buildCody")) composedJar.get().exclude("com/intellij/codeInsight/inline/completion/**") - from( - fileTree(buildCodyDir) { - include("*") - include("webviews/**") - }, - ) { - into("agent/") + + doFirst { + from( + fileTree(buildCodyDir) { + include("*") + include("webviews/**") + }, + ) { + into("agent/") + } } doLast { diff --git a/gradle.properties b/gradle.properties index a79bf62248..0b7180a16a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -25,4 +25,4 @@ org.gradle.jvmargs=-Xmx4g -Xms500m nodeBinaries.commit=8755ae4c05fd476cd23f2972049111ba436c86d4 nodeBinaries.version=v20.12.2 cody.autocomplete.enableFormatting=true -cody.commit=bb818530bd1200f6a1b26977d9f51ca38c04b3c1 +cody.commit=746c7172772dba3a73796842ebc87c0538235d85 diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ApiVersionId.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ApiVersionId.kt new file mode 100644 index 0000000000..f82a4829b5 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ApiVersionId.kt @@ -0,0 +1,10 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +typealias ApiVersionId = String // One of: + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Attribution_SearchParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Attribution_SearchParams.kt new file mode 100644 index 0000000000..81bd283668 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Attribution_SearchParams.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Attribution_SearchParams( + val id: String, + val snippet: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Attribution_SearchResult.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Attribution_SearchResult.kt new file mode 100644 index 0000000000..b94cc09c3d --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Attribution_SearchResult.kt @@ -0,0 +1,14 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Attribution_SearchResult( + val error: String? = null, + val repoNames: List, + val limitHit: Boolean, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/AutocompleteItem.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/AutocompleteItem.kt new file mode 100644 index 0000000000..581eab6986 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/AutocompleteItem.kt @@ -0,0 +1,14 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class AutocompleteItem( + val id: String, + val insertText: String, + val range: Range, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/AutocompleteParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/AutocompleteParams.kt new file mode 100644 index 0000000000..895f75ccba --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/AutocompleteParams.kt @@ -0,0 +1,24 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +import com.google.gson.annotations.SerializedName; + +data class AutocompleteParams( + val uri: String, + val filePath: String? = null, + val position: Position, + val triggerKind: TriggerKindEnum? = null, // Oneof: Automatic, Invoke + val selectedCompletionInfo: SelectedCompletionInfo? = null, +) { + + enum class TriggerKindEnum { + @SerializedName("Automatic") Automatic, + @SerializedName("Invoke") Invoke, + } +} + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/AutocompleteResult.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/AutocompleteResult.kt new file mode 100644 index 0000000000..4bdc82250a --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/AutocompleteResult.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class AutocompleteResult( + val items: List, + val completionEvent: CompletionBookkeepingEvent? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/BillingMetadataParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/BillingMetadataParams.kt new file mode 100644 index 0000000000..3475887aa4 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/BillingMetadataParams.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class BillingMetadataParams( + val product: String, + val category: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CancelParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CancelParams.kt new file mode 100644 index 0000000000..495d3984b4 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CancelParams.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class CancelParams( + val id: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ChatError.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ChatError.kt new file mode 100644 index 0000000000..bf2d13e6ef --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ChatError.kt @@ -0,0 +1,30 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +import com.google.gson.annotations.SerializedName; + +data class ChatError( + val kind: String? = null, + val name: String, + val message: String, + val retryAfter: String? = null, + val limit: Long? = null, + val userMessage: String? = null, + val retryAfterDate: Date? = null, + val retryAfterDateString: String? = null, + val retryMessage: String? = null, + val feature: String? = null, + val upgradeIsAvailable: Boolean? = null, + val isChatErrorGuard: IsChatErrorGuardEnum, // Oneof: isChatErrorGuard +) { + + enum class IsChatErrorGuardEnum { + @SerializedName("isChatErrorGuard") IsChatErrorGuard, + } +} + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ChatExportResult.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ChatExportResult.kt new file mode 100644 index 0000000000..c0a2fc8c36 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ChatExportResult.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class ChatExportResult( + val chatID: String, + val transcript: SerializedChatTranscript, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Chat_DeleteParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Chat_DeleteParams.kt new file mode 100644 index 0000000000..714a547d62 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Chat_DeleteParams.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Chat_DeleteParams( + val chatId: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Chat_ExportParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Chat_ExportParams.kt new file mode 100644 index 0000000000..8fbbd2c2ed --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Chat_ExportParams.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Chat_ExportParams( + val fullHistory: Boolean, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Chat_ImportParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Chat_ImportParams.kt new file mode 100644 index 0000000000..efa964fb1d --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Chat_ImportParams.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Chat_ImportParams( + val history: Map>, + val merge: Boolean, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Chat_ModelsParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Chat_ModelsParams.kt new file mode 100644 index 0000000000..7502c2bd54 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Chat_ModelsParams.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Chat_ModelsParams( + val modelUsage: ModelUsage, // Oneof: chat, edit, autocomplete +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Chat_ModelsResult.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Chat_ModelsResult.kt new file mode 100644 index 0000000000..e8d9354d0a --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Chat_ModelsResult.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Chat_ModelsResult( + val models: List, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Chat_SetModelParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Chat_SetModelParams.kt new file mode 100644 index 0000000000..325b6db209 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Chat_SetModelParams.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Chat_SetModelParams( + val id: String, + val model: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Chat_Sidebar_NewResult.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Chat_Sidebar_NewResult.kt new file mode 100644 index 0000000000..92e6cbf55f --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Chat_Sidebar_NewResult.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Chat_Sidebar_NewResult( + val panelId: String, + val chatId: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Chat_Web_NewResult.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Chat_Web_NewResult.kt new file mode 100644 index 0000000000..10fbed0921 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Chat_Web_NewResult.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Chat_Web_NewResult( + val panelId: String, + val chatId: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ClientCapabilities.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ClientCapabilities.kt new file mode 100644 index 0000000000..75a53ea1f9 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ClientCapabilities.kt @@ -0,0 +1,124 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +import com.google.gson.annotations.SerializedName; + +data class ClientCapabilities( + val authentication: AuthenticationEnum? = null, // Oneof: enabled, none + val completions: CompletionsEnum? = null, // Oneof: none + val chat: ChatEnum? = null, // Oneof: none, streaming + val git: GitEnum? = null, // Oneof: none, enabled + val progressBars: ProgressBarsEnum? = null, // Oneof: none, enabled + val edit: EditEnum? = null, // Oneof: none, enabled + val editWorkspace: EditWorkspaceEnum? = null, // Oneof: none, enabled + val untitledDocuments: UntitledDocumentsEnum? = null, // Oneof: none, enabled + val showDocument: ShowDocumentEnum? = null, // Oneof: none, enabled + val codeLenses: CodeLensesEnum? = null, // Oneof: none, enabled + val showWindowMessage: ShowWindowMessageEnum? = null, // Oneof: notification, request + val ignore: IgnoreEnum? = null, // Oneof: none, enabled + val codeActions: CodeActionsEnum? = null, // Oneof: none, enabled + val disabledMentionsProviders: List? = null, + val accountSwitchingInWebview: AccountSwitchingInWebviewEnum? = null, // Oneof: none, enabled + val webviewMessages: WebviewMessagesEnum? = null, // Oneof: object-encoded, string-encoded + val globalState: GlobalStateEnum? = null, // Oneof: stateless, server-managed, client-managed + val secrets: SecretsEnum? = null, // Oneof: stateless, client-managed + val webview: WebviewEnum? = null, // Oneof: agentic, native + val webviewNativeConfig: WebviewNativeConfig? = null, +) { + + enum class AuthenticationEnum { + @SerializedName("enabled") Enabled, + @SerializedName("none") None, + } + + enum class CompletionsEnum { + @SerializedName("none") None, + } + + enum class ChatEnum { + @SerializedName("none") None, + @SerializedName("streaming") Streaming, + } + + enum class GitEnum { + @SerializedName("none") None, + @SerializedName("enabled") Enabled, + } + + enum class ProgressBarsEnum { + @SerializedName("none") None, + @SerializedName("enabled") Enabled, + } + + enum class EditEnum { + @SerializedName("none") None, + @SerializedName("enabled") Enabled, + } + + enum class EditWorkspaceEnum { + @SerializedName("none") None, + @SerializedName("enabled") Enabled, + } + + enum class UntitledDocumentsEnum { + @SerializedName("none") None, + @SerializedName("enabled") Enabled, + } + + enum class ShowDocumentEnum { + @SerializedName("none") None, + @SerializedName("enabled") Enabled, + } + + enum class CodeLensesEnum { + @SerializedName("none") None, + @SerializedName("enabled") Enabled, + } + + enum class ShowWindowMessageEnum { + @SerializedName("notification") Notification, + @SerializedName("request") Request, + } + + enum class IgnoreEnum { + @SerializedName("none") None, + @SerializedName("enabled") Enabled, + } + + enum class CodeActionsEnum { + @SerializedName("none") None, + @SerializedName("enabled") Enabled, + } + + enum class AccountSwitchingInWebviewEnum { + @SerializedName("none") None, + @SerializedName("enabled") Enabled, + } + + enum class WebviewMessagesEnum { + @SerializedName("object-encoded") `Object-encoded`, + @SerializedName("string-encoded") `String-encoded`, + } + + enum class GlobalStateEnum { + @SerializedName("stateless") Stateless, + @SerializedName("server-managed") `Server-managed`, + @SerializedName("client-managed") `Client-managed`, + } + + enum class SecretsEnum { + @SerializedName("stateless") Stateless, + @SerializedName("client-managed") `Client-managed`, + } + + enum class WebviewEnum { + @SerializedName("agentic") Agentic, + @SerializedName("native") Native, + } +} + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ClientInfo.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ClientInfo.kt new file mode 100644 index 0000000000..d6430aa5c7 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ClientInfo.kt @@ -0,0 +1,20 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class ClientInfo( + val name: String, + val version: String, + val ideVersion: String? = null, + val workspaceRootUri: String, + val globalStateDir: String? = null, + val workspaceRootPath: String? = null, + val extensionConfiguration: ExtensionConfiguration? = null, + val capabilities: ClientCapabilities? = null, + val legacyNameForServerIdentification: String? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ClientSideConfig.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ClientSideConfig.kt new file mode 100644 index 0000000000..064937c76e --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ClientSideConfig.kt @@ -0,0 +1,15 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class ClientSideConfig( + val apiKey: String? = null, + val apiEndpoint: String? = null, + val openAICompatible: OpenAICompatible? = null, + val options: Map? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodeActionTriggerKind.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodeActionTriggerKind.kt new file mode 100644 index 0000000000..32d38e6b49 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodeActionTriggerKind.kt @@ -0,0 +1,10 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +typealias CodeActionTriggerKind = String // One of: Invoke, Automatic + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodeActions_ProvideParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodeActions_ProvideParams.kt new file mode 100644 index 0000000000..323448ab03 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodeActions_ProvideParams.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class CodeActions_ProvideParams( + val location: ProtocolLocation, + val triggerKind: CodeActionTriggerKind, // Oneof: Invoke, Automatic +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodeActions_ProvideResult.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodeActions_ProvideResult.kt new file mode 100644 index 0000000000..32b7a509c0 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodeActions_ProvideResult.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class CodeActions_ProvideResult( + val codeActions: List, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodeActions_TriggerParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodeActions_TriggerParams.kt new file mode 100644 index 0000000000..1f937a4f38 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodeActions_TriggerParams.kt @@ -0,0 +1,6 @@ +package com.sourcegraph.cody.agent.protocol_generated + +data class CodeActions_TriggerParams( + val uri: String, + val range: Range +) diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodyAgentClient.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodyAgentClient.kt new file mode 100644 index 0000000000..4bb42d0f6a --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodyAgentClient.kt @@ -0,0 +1,80 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "RedundantNullable") +package com.sourcegraph.cody.agent.protocol_generated; + +import org.eclipse.lsp4j.jsonrpc.services.JsonNotification; +import org.eclipse.lsp4j.jsonrpc.services.JsonRequest; +import java.util.concurrent.CompletableFuture; + +@Suppress("unused") +interface CodyAgentClient { + // ======== + // Requests + // ======== + @JsonRequest("window/showMessage") + fun window_showMessage(params: ShowWindowMessageParams): CompletableFuture + @JsonRequest("window/showSaveDialog") + fun window_showSaveDialog(params: SaveDialogOptionsParams): CompletableFuture + @JsonRequest("textDocument/edit") + fun textDocument_edit(params: TextDocumentEditParams): CompletableFuture + @JsonRequest("textDocument/openUntitledDocument") + fun textDocument_openUntitledDocument(params: UntitledTextDocument): CompletableFuture + @JsonRequest("textDocument/show") + fun textDocument_show(params: TextDocument_ShowParams): CompletableFuture + @JsonRequest("workspace/edit") + fun workspace_edit(params: WorkspaceEditParams): CompletableFuture + @JsonRequest("secrets/get") + fun secrets_get(params: Secrets_GetParams): CompletableFuture + @JsonRequest("secrets/store") + fun secrets_store(params: Secrets_StoreParams): CompletableFuture + @JsonRequest("secrets/delete") + fun secrets_delete(params: Secrets_DeleteParams): CompletableFuture + @JsonRequest("env/openExternal") + fun env_openExternal(params: Env_OpenExternalParams): CompletableFuture + + // ============= + // Notifications + // ============= + @JsonNotification("debug/message") + fun debug_message(params: DebugMessage) + @JsonNotification("editTask/didUpdate") + fun editTask_didUpdate(params: EditTask) + @JsonNotification("editTask/didDelete") + fun editTask_didDelete(params: EditTask) + @JsonNotification("codeLenses/display") + fun codeLenses_display(params: DisplayCodeLensParams) + @JsonNotification("ignore/didChange") + fun ignore_didChange(params: Null?) + @JsonNotification("webview/postMessageStringEncoded") + fun webview_postMessageStringEncoded(params: Webview_PostMessageStringEncodedParams) + @JsonNotification("progress/start") + fun progress_start(params: ProgressStartParams) + @JsonNotification("progress/report") + fun progress_report(params: ProgressReportParams) + @JsonNotification("progress/end") + fun progress_end(params: Progress_EndParams) + @JsonNotification("webview/registerWebviewViewProvider") + fun webview_registerWebviewViewProvider(params: Webview_RegisterWebviewViewProviderParams) + @JsonNotification("webview/createWebviewPanel") + fun webview_createWebviewPanel(params: Webview_CreateWebviewPanelParams) + @JsonNotification("webview/dispose") + fun webview_dispose(params: Webview_DisposeParams) + @JsonNotification("webview/reveal") + fun webview_reveal(params: Webview_RevealParams) + @JsonNotification("webview/setTitle") + fun webview_setTitle(params: Webview_SetTitleParams) + @JsonNotification("webview/setIconPath") + fun webview_setIconPath(params: Webview_SetIconPathParams) + @JsonNotification("webview/setOptions") + fun webview_setOptions(params: Webview_SetOptionsParams) + @JsonNotification("webview/setHtml") + fun webview_setHtml(params: Webview_SetHtmlParams) + @JsonNotification("window/didChangeContext") + fun window_didChangeContext(params: Window_DidChangeContextParams) + @JsonNotification("window/focusSidebar") + fun window_focusSidebar(params: Null?) +} diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodyAgentServer.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodyAgentServer.kt new file mode 100644 index 0000000000..200bd32708 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodyAgentServer.kt @@ -0,0 +1,190 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "RedundantNullable") +package com.sourcegraph.cody.agent.protocol_generated; + +import org.eclipse.lsp4j.jsonrpc.services.JsonNotification; +import org.eclipse.lsp4j.jsonrpc.services.JsonRequest; +import java.util.concurrent.CompletableFuture; + +@Suppress("unused") +interface CodyAgentServer { + // ======== + // Requests + // ======== + @JsonRequest("initialize") + fun initialize(params: ClientInfo): CompletableFuture + @JsonRequest("shutdown") + fun shutdown(params: Null?): CompletableFuture + @JsonRequest("chat/new") + fun chat_new(params: Null?): CompletableFuture + @JsonRequest("chat/web/new") + fun chat_web_new(params: Null?): CompletableFuture + @JsonRequest("chat/sidebar/new") + fun chat_sidebar_new(params: Null?): CompletableFuture + @JsonRequest("chat/delete") + fun chat_delete(params: Chat_DeleteParams): CompletableFuture> + @JsonRequest("chat/models") + fun chat_models(params: Chat_ModelsParams): CompletableFuture + @JsonRequest("chat/export") + fun chat_export(params: Chat_ExportParams?): CompletableFuture> + @JsonRequest("chat/import") + fun chat_import(params: Chat_ImportParams): CompletableFuture + @JsonRequest("chat/setModel") + fun chat_setModel(params: Chat_SetModelParams): CompletableFuture + @JsonRequest("commands/explain") + fun commands_explain(params: Null?): CompletableFuture + @JsonRequest("commands/smell") + fun commands_smell(params: Null?): CompletableFuture + @JsonRequest("commands/custom") + fun commands_custom(params: Commands_CustomParams): CompletableFuture + @JsonRequest("customCommands/list") + fun customCommands_list(params: Null?): CompletableFuture> + @JsonRequest("editCommands/code") + fun editCommands_code(params: EditCommands_CodeParams): CompletableFuture + @JsonRequest("editCommands/test") + fun editCommands_test(params: Null?): CompletableFuture + @JsonRequest("editCommands/document") + fun editCommands_document(params: Null?): CompletableFuture + @JsonRequest("editTask/accept") + fun editTask_accept(params: EditTask_AcceptParams): CompletableFuture + @JsonRequest("editTask/undo") + fun editTask_undo(params: EditTask_UndoParams): CompletableFuture + @JsonRequest("editTask/cancel") + fun editTask_cancel(params: EditTask_CancelParams): CompletableFuture + @JsonRequest("editTask/retry") + fun editTask_retry(params: EditTask_RetryParams): CompletableFuture + @JsonRequest("editTask/getTaskDetails") + fun editTask_getTaskDetails(params: EditTask_GetTaskDetailsParams): CompletableFuture + @JsonRequest("editTask/getFoldingRanges") + fun editTask_getFoldingRanges(params: GetFoldingRangeParams): CompletableFuture + @JsonRequest("command/execute") + fun command_execute(params: ExecuteCommandParams): CompletableFuture + @JsonRequest("codeActions/provide") + fun codeActions_provide(params: CodeActions_ProvideParams): CompletableFuture + @JsonRequest("codeActions/trigger") + fun codeActions_trigger(params: CodeActions_TriggerParams): CompletableFuture + @JsonRequest("autocomplete/execute") + fun autocomplete_execute(params: AutocompleteParams): CompletableFuture + @JsonRequest("graphql/getRepoIds") + fun graphql_getRepoIds(params: Graphql_GetRepoIdsParams): CompletableFuture + @JsonRequest("graphql/currentUserId") + fun graphql_currentUserId(params: Null?): CompletableFuture + @JsonRequest("graphql/currentUserIsPro") + fun graphql_currentUserIsPro(params: Null?): CompletableFuture + @JsonRequest("featureFlags/getFeatureFlag") + fun featureFlags_getFeatureFlag(params: FeatureFlags_GetFeatureFlagParams): CompletableFuture + @JsonRequest("graphql/getCurrentUserCodySubscription") + fun graphql_getCurrentUserCodySubscription(params: Null?): CompletableFuture + @JsonRequest("graphql/logEvent") + fun graphql_logEvent(params: Event): CompletableFuture + @JsonRequest("telemetry/recordEvent") + fun telemetry_recordEvent(params: TelemetryEvent): CompletableFuture + @JsonRequest("graphql/getRepoIdIfEmbeddingExists") + fun graphql_getRepoIdIfEmbeddingExists(params: Graphql_GetRepoIdIfEmbeddingExistsParams): CompletableFuture + @JsonRequest("graphql/getRepoId") + fun graphql_getRepoId(params: Graphql_GetRepoIdParams): CompletableFuture + @JsonRequest("git/codebaseName") + fun git_codebaseName(params: Git_CodebaseNameParams): CompletableFuture + @JsonRequest("webview/didDispose") + fun webview_didDispose(params: Webview_DidDisposeParams): CompletableFuture + @JsonRequest("webview/resolveWebviewView") + fun webview_resolveWebviewView(params: Webview_ResolveWebviewViewParams): CompletableFuture + @JsonRequest("webview/receiveMessageStringEncoded") + fun webview_receiveMessageStringEncoded(params: Webview_ReceiveMessageStringEncodedParams): CompletableFuture + @JsonRequest("diagnostics/publish") + fun diagnostics_publish(params: Diagnostics_PublishParams): CompletableFuture + @JsonRequest("testing/progress") + fun testing_progress(params: Testing_ProgressParams): CompletableFuture + @JsonRequest("testing/exportedTelemetryEvents") + fun testing_exportedTelemetryEvents(params: Null?): CompletableFuture + @JsonRequest("testing/networkRequests") + fun testing_networkRequests(params: Null?): CompletableFuture + @JsonRequest("testing/requestErrors") + fun testing_requestErrors(params: Null?): CompletableFuture + @JsonRequest("testing/closestPostData") + fun testing_closestPostData(params: Testing_ClosestPostDataParams): CompletableFuture + @JsonRequest("testing/memoryUsage") + fun testing_memoryUsage(params: Null?): CompletableFuture + @JsonRequest("testing/awaitPendingPromises") + fun testing_awaitPendingPromises(params: Null?): CompletableFuture + @JsonRequest("testing/workspaceDocuments") + fun testing_workspaceDocuments(params: GetDocumentsParams): CompletableFuture + @JsonRequest("testing/diagnostics") + fun testing_diagnostics(params: Testing_DiagnosticsParams): CompletableFuture + @JsonRequest("testing/progressCancelation") + fun testing_progressCancelation(params: Testing_ProgressCancelationParams): CompletableFuture + @JsonRequest("testing/reset") + fun testing_reset(params: Null?): CompletableFuture + @JsonRequest("testing/autocomplete/completionEvent") + fun testing_autocomplete_completionEvent(params: CompletionItemParams): CompletableFuture + @JsonRequest("testing/autocomplete/awaitPendingVisibilityTimeout") + fun testing_autocomplete_awaitPendingVisibilityTimeout(params: Null?): CompletableFuture + @JsonRequest("testing/autocomplete/setCompletionVisibilityDelay") + fun testing_autocomplete_setCompletionVisibilityDelay(params: Testing_Autocomplete_SetCompletionVisibilityDelayParams): CompletableFuture + @JsonRequest("testing/autocomplete/providerConfig") + fun testing_autocomplete_providerConfig(params: Null?): CompletableFuture + @JsonRequest("extensionConfiguration/change") + fun extensionConfiguration_change(params: ExtensionConfiguration): CompletableFuture + @JsonRequest("extensionConfiguration/status") + fun extensionConfiguration_status(params: Null?): CompletableFuture + @JsonRequest("extensionConfiguration/getSettingsSchema") + fun extensionConfiguration_getSettingsSchema(params: Null?): CompletableFuture + @JsonRequest("textDocument/change") + fun textDocument_change(params: ProtocolTextDocument): CompletableFuture + @JsonRequest("attribution/search") + fun attribution_search(params: Attribution_SearchParams): CompletableFuture + @JsonRequest("ignore/test") + fun ignore_test(params: Ignore_TestParams): CompletableFuture + @JsonRequest("testing/ignore/overridePolicy") + fun testing_ignore_overridePolicy(params: ContextFilters?): CompletableFuture + @JsonRequest("extension/reset") + fun extension_reset(params: Null?): CompletableFuture + + // ============= + // Notifications + // ============= + @JsonNotification("initialized") + fun initialized(params: Null?) + @JsonNotification("exit") + fun exit(params: Null?) + @JsonNotification("extensionConfiguration/didChange") + fun extensionConfiguration_didChange(params: ExtensionConfiguration) + @JsonNotification("workspaceFolder/didChange") + fun workspaceFolder_didChange(params: WorkspaceFolder_DidChangeParams) + @JsonNotification("textDocument/didOpen") + fun textDocument_didOpen(params: ProtocolTextDocument) + @JsonNotification("textDocument/didChange") + fun textDocument_didChange(params: ProtocolTextDocument) + @JsonNotification("textDocument/didFocus") + fun textDocument_didFocus(params: TextDocument_DidFocusParams) + @JsonNotification("textDocument/didSave") + fun textDocument_didSave(params: TextDocument_DidSaveParams) + @JsonNotification("textDocument/didClose") + fun textDocument_didClose(params: ProtocolTextDocument) + @JsonNotification("workspace/didDeleteFiles") + fun workspace_didDeleteFiles(params: DeleteFilesParams) + @JsonNotification("workspace/didCreateFiles") + fun workspace_didCreateFiles(params: CreateFilesParams) + @JsonNotification("workspace/didRenameFiles") + fun workspace_didRenameFiles(params: RenameFilesParams) + @JsonNotification("$/cancelRequest") + fun cancelRequest(params: CancelParams) + @JsonNotification("autocomplete/clearLastCandidate") + fun autocomplete_clearLastCandidate(params: Null?) + @JsonNotification("autocomplete/completionSuggested") + fun autocomplete_completionSuggested(params: CompletionItemParams) + @JsonNotification("autocomplete/completionAccepted") + fun autocomplete_completionAccepted(params: CompletionItemParams) + @JsonNotification("progress/cancel") + fun progress_cancel(params: Progress_CancelParams) + @JsonNotification("webview/didDisposeNative") + fun webview_didDisposeNative(params: Webview_DidDisposeNativeParams) + @JsonNotification("secrets/didChange") + fun secrets_didChange(params: Secrets_DidChangeParams) + @JsonNotification("window/didChangeFocus") + fun window_didChangeFocus(params: Window_DidChangeFocusParams) +} diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodyCommand.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodyCommand.kt new file mode 100644 index 0000000000..d3dfa00168 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodyCommand.kt @@ -0,0 +1,19 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class CodyCommand( + val slashCommand: String? = null, + val key: String, + val prompt: String, + val description: String? = null, + val context: CodyCommandContext? = null, + val type: CodyCommandType? = null, // Oneof: workspace, user, default, experimental, recently used + val mode: CodyCommandMode? = null, // Oneof: ask, edit, insert + val requestID: String? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodyCommandContext.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodyCommandContext.kt new file mode 100644 index 0000000000..03fc4b8748 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodyCommandContext.kt @@ -0,0 +1,20 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class CodyCommandContext( + val none: Boolean? = null, + val openTabs: Boolean? = null, + val currentDir: Boolean? = null, + val currentFile: Boolean? = null, + val selection: Boolean? = null, + val command: String? = null, + val filePath: String? = null, + val directoryPath: String? = null, + val codebase: Boolean? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodyCommandMode.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodyCommandMode.kt new file mode 100644 index 0000000000..bf4bd1cc5c --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodyCommandMode.kt @@ -0,0 +1,10 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +typealias CodyCommandMode = String // One of: ask, edit, insert + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodyCommandType.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodyCommandType.kt new file mode 100644 index 0000000000..4ce3260442 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodyCommandType.kt @@ -0,0 +1,10 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +typealias CodyCommandType = String // One of: workspace, user, default, experimental, recently used + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodyContextFilterItem.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodyContextFilterItem.kt new file mode 100644 index 0000000000..ab26dfcb1d --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodyContextFilterItem.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class CodyContextFilterItem( + val repoNamePattern: String, + val filePathPatterns: List? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodyError.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodyError.kt new file mode 100644 index 0000000000..8869f6e75c --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodyError.kt @@ -0,0 +1,14 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class CodyError( + val message: String, + val cause: CodyError? = null, + val stack: String? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodyTaskState.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodyTaskState.kt new file mode 100644 index 0000000000..ccd26419b6 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodyTaskState.kt @@ -0,0 +1,10 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +typealias CodyTaskState = String // One of: Idle, Working, Inserting, Applying, Applied, Finished, Error, Pending + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Commands_CustomParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Commands_CustomParams.kt new file mode 100644 index 0000000000..a3ffb9dd74 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Commands_CustomParams.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Commands_CustomParams( + val key: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CompletionBookkeepingEvent.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CompletionBookkeepingEvent.kt new file mode 100644 index 0000000000..4555589739 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CompletionBookkeepingEvent.kt @@ -0,0 +1,23 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class CompletionBookkeepingEvent( + val id: CompletionLogID, + val startedAt: Long, + val networkRequestStartedAt: Long? = null, + val startLoggedAt: Long? = null, + val loadedAt: Long? = null, + val suggestedAt: Long? = null, + val suggestionLoggedAt: Long? = null, + val suggestionAnalyticsLoggedAt: Long? = null, + val acceptedAt: Long? = null, + val items: List, + val loggedPartialAcceptedLength: Long, + val read: Boolean, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CompletionItemID.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CompletionItemID.kt new file mode 100644 index 0000000000..00e96c9292 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CompletionItemID.kt @@ -0,0 +1,10 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +typealias CompletionItemID = String // One of: + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CompletionItemInfo.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CompletionItemInfo.kt new file mode 100644 index 0000000000..72669585b3 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CompletionItemInfo.kt @@ -0,0 +1,28 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +import com.google.gson.annotations.SerializedName; + +data class CompletionItemInfo( + val parseErrorCount: Long? = null, + val lineTruncatedCount: Long? = null, + val truncatedWith: TruncatedWithEnum? = null, // Oneof: tree-sitter, indentation + val nodeTypes: NodeTypesParams? = null, + val nodeTypesWithCompletion: NodeTypesWithCompletionParams? = null, + val lineCount: Long, + val charCount: Long, + val insertText: String? = null, + val stopReason: String? = null, +) { + + enum class TruncatedWithEnum { + @SerializedName("tree-sitter") `Tree-sitter`, + @SerializedName("indentation") Indentation, + } +} + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CompletionItemParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CompletionItemParams.kt new file mode 100644 index 0000000000..a4ef36628e --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CompletionItemParams.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class CompletionItemParams( + val completionID: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CompletionLogID.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CompletionLogID.kt new file mode 100644 index 0000000000..178566b7f9 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CompletionLogID.kt @@ -0,0 +1,10 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +typealias CompletionLogID = String // One of: + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Constants.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Constants.kt new file mode 100644 index 0000000000..77b8fc7705 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Constants.kt @@ -0,0 +1,105 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("unused", "ConstPropertyName") +package com.sourcegraph.cody.agent.protocol_generated; + +object Constants { + const val Applied = "Applied" + const val Applying = "Applying" + const val Automatic = "Automatic" + const val Error = "Error" + const val Finished = "Finished" + const val IDEEXTENSION = "IDEEXTENSION" + const val Idle = "Idle" + const val Inserting = "Inserting" + const val Invoke = "Invoke" + const val Pending = "Pending" + const val Working = "Working" + const val agentic = "agentic" + const val ask = "ask" + const val assistant = "assistant" + const val authenticated = "authenticated" + const val autocomplete = "autocomplete" + const val balanced = "balanced" + const val byok = "byok" + const val chat = "chat" + const val `class` = "class" + const val `client-managed` = "client-managed" + const val `create-file` = "create-file" + const val debug = "debug" + const val default = "default" + const val delete = "delete" + const val `delete-file` = "delete-file" + const val deprecated = "deprecated" + const val dev = "dev" + const val `early-access` = "early-access" + const val edit = "edit" + const val `edit-file` = "edit-file" + const val editor = "editor" + const val enabled = "enabled" + const val enterprise = "enterprise" + const val error = "error" + const val experimental = "experimental" + const val file = "file" + const val free = "free" + const val function = "function" + const val gateway = "gateway" + const val history = "history" + const val human = "human" + const val ignore = "ignore" + const val indentation = "indentation" + const val info = "info" + const val information = "information" + const val initial = "initial" + const val insert = "insert" + const val internal = "internal" + const val isChatErrorGuard = "isChatErrorGuard" + const val local = "local" + const val method = "method" + const val multiple = "multiple" + const val native = "native" + const val none = "none" + const val notification = "notification" + const val `object-encoded` = "object-encoded" + const val ollama = "ollama" + const val `on-waitlist` = "on-waitlist" + const val openctx = "openctx" + const val other = "other" + const val power = "power" + const val priority = "priority" + const val pro = "pro" + const val `recently-used` = "recently used" + const val recommended = "recommended" + const val `rename-file` = "rename-file" + const val replace = "replace" + const val repository = "repository" + const val request = "request" + const val search = "search" + const val selection = "selection" + const val `server-managed` = "server-managed" + const val single = "single" + const val speed = "speed" + const val stateless = "stateless" + const val `stream-disabled` = "stream-disabled" + const val streaming = "streaming" + const val `string-encoded` = "string-encoded" + const val suggestion = "suggestion" + const val symbol = "symbol" + const val system = "system" + const val terminal = "terminal" + const val trace = "trace" + const val tree = "tree" + const val `tree-sitter` = "tree-sitter" + const val unauthenticated = "unauthenticated" + const val unified = "unified" + const val use = "use" + const val user = "user" + const val vision = "vision" + const val waitlist = "waitlist" + const val warn = "warn" + const val warning = "warning" + const val workspace = "workspace" +} diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ContextFilters.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ContextFilters.kt new file mode 100644 index 0000000000..51752f0302 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ContextFilters.kt @@ -0,0 +1,6 @@ +package com.sourcegraph.cody.agent.protocol_generated + +data class ContextFilters( + val include: List? = null, + val exclude: List? = null +) diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ContextItem.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ContextItem.kt new file mode 100644 index 0000000000..b5c6583e88 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ContextItem.kt @@ -0,0 +1,161 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +import com.google.gson.annotations.SerializedName; +import com.google.gson.Gson; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import java.lang.reflect.Type; + +sealed class ContextItem { + companion object { + val deserializer: JsonDeserializer = + JsonDeserializer { element: JsonElement, _: Type, context: JsonDeserializationContext -> + when (element.getAsJsonObject().get("type").getAsString()) { + "file" -> context.deserialize(element, ContextItemFile::class.java) + "repository" -> context.deserialize(element, ContextItemRepository::class.java) + "tree" -> context.deserialize(element, ContextItemTree::class.java) + "symbol" -> context.deserialize(element, ContextItemSymbol::class.java) + "openctx" -> context.deserialize(element, ContextItemOpenCtx::class.java) + else -> throw Exception("Unknown discriminator ${element}") + } + } + } +} + +data class ContextItemFile( + val uri: String, + val range: RangeData? = null, + val content: String? = null, + val repoName: String? = null, + val revision: String? = null, + val title: String? = null, + val description: String? = null, + val source: ContextItemSource? = null, // Oneof: user, editor, search, initial, priority, unified, selection, terminal, history, agentic + val size: Long? = null, + val isIgnored: Boolean? = null, + val isTooLarge: Boolean? = null, + val isTooLargeReason: String? = null, + val provider: String? = null, + val icon: String? = null, + val metadata: List? = null, + val type: TypeEnum, // Oneof: file + val remoteRepositoryName: String? = null, + val ranges: List? = null, +) : ContextItem() { + + enum class TypeEnum { + @SerializedName("file") File, + } +} + +data class ContextItemRepository( + val uri: String, + val range: RangeData? = null, + val content: String? = null, + val repoName: String? = null, + val revision: String? = null, + val title: String? = null, + val description: String? = null, + val source: ContextItemSource? = null, // Oneof: user, editor, search, initial, priority, unified, selection, terminal, history, agentic + val size: Long? = null, + val isIgnored: Boolean? = null, + val isTooLarge: Boolean? = null, + val isTooLargeReason: String? = null, + val provider: String? = null, + val icon: String? = null, + val metadata: List? = null, + val type: TypeEnum, // Oneof: repository + val repoID: String, +) : ContextItem() { + + enum class TypeEnum { + @SerializedName("repository") Repository, + } +} + +data class ContextItemTree( + val uri: String, + val range: RangeData? = null, + val content: String? = null, + val repoName: String? = null, + val revision: String? = null, + val title: String? = null, + val description: String? = null, + val source: ContextItemSource? = null, // Oneof: user, editor, search, initial, priority, unified, selection, terminal, history, agentic + val size: Long? = null, + val isIgnored: Boolean? = null, + val isTooLarge: Boolean? = null, + val isTooLargeReason: String? = null, + val provider: String? = null, + val icon: String? = null, + val metadata: List? = null, + val type: TypeEnum, // Oneof: tree + val isWorkspaceRoot: Boolean, + val name: String, +) : ContextItem() { + + enum class TypeEnum { + @SerializedName("tree") Tree, + } +} + +data class ContextItemSymbol( + val uri: String, + val range: RangeData? = null, + val content: String? = null, + val repoName: String? = null, + val revision: String? = null, + val title: String? = null, + val description: String? = null, + val source: ContextItemSource? = null, // Oneof: user, editor, search, initial, priority, unified, selection, terminal, history, agentic + val size: Long? = null, + val isIgnored: Boolean? = null, + val isTooLarge: Boolean? = null, + val isTooLargeReason: String? = null, + val provider: String? = null, + val icon: String? = null, + val metadata: List? = null, + val type: TypeEnum, // Oneof: symbol + val symbolName: String, + val kind: SymbolKind, // Oneof: class, function, method + val remoteRepositoryName: String? = null, +) : ContextItem() { + + enum class TypeEnum { + @SerializedName("symbol") Symbol, + } +} + +data class ContextItemOpenCtx( + val uri: String, + val range: RangeData? = null, + val content: String? = null, + val repoName: String? = null, + val revision: String? = null, + val title: String? = null, + val description: String? = null, + val source: ContextItemSource? = null, // Oneof: user, editor, search, initial, priority, unified, selection, terminal, history, agentic + val size: Long? = null, + val isIgnored: Boolean? = null, + val isTooLarge: Boolean? = null, + val isTooLargeReason: String? = null, + val provider: String? = null, + val icon: String? = null, + val metadata: List? = null, + val type: TypeEnum, // Oneof: openctx + val providerUri: String, + val mention: MentionParams? = null, +) : ContextItem() { + + enum class TypeEnum { + @SerializedName("openctx") Openctx, + } +} + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ContextItemSource.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ContextItemSource.kt new file mode 100644 index 0000000000..fbcee75ee4 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ContextItemSource.kt @@ -0,0 +1,10 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +typealias ContextItemSource = String // One of: user, editor, search, initial, priority, unified, selection, terminal, history, agentic + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ContextMentionProviderID.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ContextMentionProviderID.kt new file mode 100644 index 0000000000..e01662d59f --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ContextMentionProviderID.kt @@ -0,0 +1,10 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +typealias ContextMentionProviderID = String // One of: + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ContextParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ContextParams.kt new file mode 100644 index 0000000000..9cbbeae320 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ContextParams.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class ContextParams( + val user: Long? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CreateFilesParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CreateFilesParams.kt new file mode 100644 index 0000000000..0a28dbfb50 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CreateFilesParams.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class CreateFilesParams( + val files: List, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CurrentUserCodySubscription.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CurrentUserCodySubscription.kt new file mode 100644 index 0000000000..7181493fd0 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CurrentUserCodySubscription.kt @@ -0,0 +1,6 @@ +package com.sourcegraph.cody.agent.protocol_generated + +data class CurrentUserCodySubscription( + val plan: String?, + val status: String? +) diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CustomCommandResult.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CustomCommandResult.kt new file mode 100644 index 0000000000..f4b81d382f --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CustomCommandResult.kt @@ -0,0 +1,48 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +import com.google.gson.annotations.SerializedName; +import com.google.gson.Gson; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import java.lang.reflect.Type; + +sealed class CustomCommandResult { + companion object { + val deserializer: JsonDeserializer = + JsonDeserializer { element: JsonElement, _: Type, context: JsonDeserializationContext -> + when (element.getAsJsonObject().get("type").getAsString()) { + "chat" -> context.deserialize(element, CustomChatCommandResult::class.java) + "edit" -> context.deserialize(element, CustomEditCommandResult::class.java) + else -> throw Exception("Unknown discriminator ${element}") + } + } + } +} + +data class CustomChatCommandResult( + val type: TypeEnum, // Oneof: chat + val chatResult: String, +) : CustomCommandResult() { + + enum class TypeEnum { + @SerializedName("chat") Chat, + } +} + +data class CustomEditCommandResult( + val type: TypeEnum, // Oneof: edit + val editResult: EditTask, +) : CustomCommandResult() { + + enum class TypeEnum { + @SerializedName("edit") Edit, + } +} + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Date.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Date.kt new file mode 100644 index 0000000000..0e28832230 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Date.kt @@ -0,0 +1,10 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +typealias Date = String + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/DebugMessage.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/DebugMessage.kt new file mode 100644 index 0000000000..82ea4e8051 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/DebugMessage.kt @@ -0,0 +1,14 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class DebugMessage( + val channel: String, + val message: String, + val level: DebugMessageLogLevel? = null, // Oneof: trace, debug, info, warn, error +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/DebugMessageLogLevel.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/DebugMessageLogLevel.kt new file mode 100644 index 0000000000..bd694c7b28 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/DebugMessageLogLevel.kt @@ -0,0 +1,10 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +typealias DebugMessageLogLevel = String // One of: trace, debug, info, warn, error + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/DefiniteWebviewOptions.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/DefiniteWebviewOptions.kt new file mode 100644 index 0000000000..dad99df4f8 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/DefiniteWebviewOptions.kt @@ -0,0 +1,18 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class DefiniteWebviewOptions( + val enableScripts: Boolean, + val enableForms: Boolean, + val enableOnlyCommandUris: List? = null, + val localResourceRoots: List? = null, + val portMapping: List, + val enableFindWidget: Boolean, + val retainContextWhenHidden: Boolean, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/DeleteFileOperation.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/DeleteFileOperation.kt new file mode 100644 index 0000000000..b0b7ed387c --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/DeleteFileOperation.kt @@ -0,0 +1,5 @@ +package com.sourcegraph.cody.agent.protocol_generated + +data class DeleteFileOperation( + val uri: String +) diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/DeleteFilesParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/DeleteFilesParams.kt new file mode 100644 index 0000000000..a3b1ab93dd --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/DeleteFilesParams.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class DeleteFilesParams( + val files: List, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/DeleteOptionsParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/DeleteOptionsParams.kt new file mode 100644 index 0000000000..bf5b834a28 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/DeleteOptionsParams.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class DeleteOptionsParams( + val recursive: Boolean? = null, + val ignoreIfNotExists: Boolean? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/DiagnosticSeverity.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/DiagnosticSeverity.kt new file mode 100644 index 0000000000..0e81f8653a --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/DiagnosticSeverity.kt @@ -0,0 +1,10 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +typealias DiagnosticSeverity = String // One of: error, warning, info, suggestion + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Diagnostics_PublishParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Diagnostics_PublishParams.kt new file mode 100644 index 0000000000..fb8763dcbb --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Diagnostics_PublishParams.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Diagnostics_PublishParams( + val diagnostics: List, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/DisabledParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/DisabledParams.kt new file mode 100644 index 0000000000..42a2f26c23 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/DisabledParams.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class DisabledParams( + val reason: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/DisplayCodeLensParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/DisplayCodeLensParams.kt new file mode 100644 index 0000000000..14b438aa94 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/DisplayCodeLensParams.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class DisplayCodeLensParams( + val uri: String, + val codeLenses: List, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/EditCommands_CodeParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/EditCommands_CodeParams.kt new file mode 100644 index 0000000000..cfbcf5d16c --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/EditCommands_CodeParams.kt @@ -0,0 +1,6 @@ +package com.sourcegraph.cody.agent.protocol_generated + +data class EditCommands_CodeParams( + val instruction: String?, + val model: String? +) diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/EditTask.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/EditTask.kt new file mode 100644 index 0000000000..591ce04fdb --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/EditTask.kt @@ -0,0 +1,18 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class EditTask( + val id: String, + val state: CodyTaskState, // Oneof: Idle, Working, Inserting, Applying, Applied, Finished, Error, Pending + val error: CodyError? = null, + val selectionRange: Range, + val instruction: String? = null, + val model: String? = null, + val originalText: String? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/EditTask_AcceptParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/EditTask_AcceptParams.kt new file mode 100644 index 0000000000..358e1dfad9 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/EditTask_AcceptParams.kt @@ -0,0 +1,5 @@ +package com.sourcegraph.cody.agent.protocol_generated + +data class EditTask_AcceptParams( + val id: String +) diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/EditTask_CancelParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/EditTask_CancelParams.kt new file mode 100644 index 0000000000..a7f6ef3ff2 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/EditTask_CancelParams.kt @@ -0,0 +1,5 @@ +package com.sourcegraph.cody.agent.protocol_generated + +data class EditTask_CancelParams( + val id: String +) diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/EditTask_GetTaskDetailsParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/EditTask_GetTaskDetailsParams.kt new file mode 100644 index 0000000000..3dbee72672 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/EditTask_GetTaskDetailsParams.kt @@ -0,0 +1,5 @@ +package com.sourcegraph.cody.agent.protocol_generated + +data class EditTask_GetTaskDetailsParams( + val id: String +) diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/EditTask_RetryParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/EditTask_RetryParams.kt new file mode 100644 index 0000000000..f6da426300 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/EditTask_RetryParams.kt @@ -0,0 +1,5 @@ +package com.sourcegraph.cody.agent.protocol_generated + +data class EditTask_RetryParams( + val id: String +) diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/EditTask_UndoParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/EditTask_UndoParams.kt new file mode 100644 index 0000000000..b7e2aa7a30 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/EditTask_UndoParams.kt @@ -0,0 +1,5 @@ +package com.sourcegraph.cody.agent.protocol_generated + +data class EditTask_UndoParams( + val id: String +) diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/EndParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/EndParams.kt new file mode 100644 index 0000000000..8a9bd319a5 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/EndParams.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class EndParams( + val line: Long, + val character: Long, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Env_OpenExternalParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Env_OpenExternalParams.kt new file mode 100644 index 0000000000..3f7bb73d5f --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Env_OpenExternalParams.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Env_OpenExternalParams( + val uri: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Event.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Event.kt new file mode 100644 index 0000000000..77f9b48602 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Event.kt @@ -0,0 +1,20 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Event( + val event: String, + val userCookieID: String, + val url: String, + val source: String, + val argument: String? = null, + val publicArgument: String? = null, + val client: String, + val connectedSiteID: String? = null, + val hashedLicenseKey: String? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/EventProperties.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/EventProperties.kt new file mode 100644 index 0000000000..10a921d50d --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/EventProperties.kt @@ -0,0 +1,22 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +import com.google.gson.annotations.SerializedName; + +data class EventProperties( + val anonymousUserID: String, + val prefix: String, + val client: String, + val source: SourceEnum, // Oneof: IDEEXTENSION +) { + + enum class SourceEnum { + @SerializedName("IDEEXTENSION") IDEEXTENSION, + } +} + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ExecuteCommandParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ExecuteCommandParams.kt new file mode 100644 index 0000000000..ae3c7a8862 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ExecuteCommandParams.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class ExecuteCommandParams( + val command: String, + val arguments: List? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ExtensionConfiguration.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ExtensionConfiguration.kt new file mode 100644 index 0000000000..e442808d4f --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ExtensionConfiguration.kt @@ -0,0 +1,26 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class ExtensionConfiguration( + val serverEndpoint: String, + val proxy: String? = null, + val accessToken: String? = null, + val customHeaders: Map, + val anonymousUserID: String? = null, + val autocompleteAdvancedProvider: String? = null, + val autocompleteAdvancedModel: String? = null, + val debug: Boolean? = null, + val verboseDebug: Boolean? = null, + val telemetryClientName: String? = null, + val codebase: String? = null, + val eventProperties: EventProperties? = null, + val customConfiguration: Map? = null, + val customConfigurationJson: String? = null, + val baseGlobalState: Map? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/FeatureFlags_GetFeatureFlagParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/FeatureFlags_GetFeatureFlagParams.kt new file mode 100644 index 0000000000..8357da264d --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/FeatureFlags_GetFeatureFlagParams.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class FeatureFlags_GetFeatureFlagParams( + val flagName: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/FileIdentifier.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/FileIdentifier.kt new file mode 100644 index 0000000000..ece8e12043 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/FileIdentifier.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class FileIdentifier( + val uri: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/FixupTaskID.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/FixupTaskID.kt new file mode 100644 index 0000000000..e23c3e208e --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/FixupTaskID.kt @@ -0,0 +1,10 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +typealias FixupTaskID = String // One of: + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/GetDocumentsParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/GetDocumentsParams.kt new file mode 100644 index 0000000000..f0bf240661 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/GetDocumentsParams.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class GetDocumentsParams( + val uris: List? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/GetDocumentsResult.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/GetDocumentsResult.kt new file mode 100644 index 0000000000..6adec4e39d --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/GetDocumentsResult.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class GetDocumentsResult( + val documents: List, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/GetFoldingRangeParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/GetFoldingRangeParams.kt new file mode 100644 index 0000000000..e659f4496e --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/GetFoldingRangeParams.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class GetFoldingRangeParams( + val uri: String, + val range: Range, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/GetFoldingRangeResult.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/GetFoldingRangeResult.kt new file mode 100644 index 0000000000..8d89a2e173 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/GetFoldingRangeResult.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class GetFoldingRangeResult( + val range: Range, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Git_CodebaseNameParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Git_CodebaseNameParams.kt new file mode 100644 index 0000000000..d1f5874c98 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Git_CodebaseNameParams.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Git_CodebaseNameParams( + val url: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Graphql_GetRepoIdIfEmbeddingExistsParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Graphql_GetRepoIdIfEmbeddingExistsParams.kt new file mode 100644 index 0000000000..b6dde08284 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Graphql_GetRepoIdIfEmbeddingExistsParams.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Graphql_GetRepoIdIfEmbeddingExistsParams( + val repoName: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Graphql_GetRepoIdParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Graphql_GetRepoIdParams.kt new file mode 100644 index 0000000000..429be2df10 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Graphql_GetRepoIdParams.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Graphql_GetRepoIdParams( + val repoName: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Graphql_GetRepoIdsParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Graphql_GetRepoIdsParams.kt new file mode 100644 index 0000000000..53527b73a6 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Graphql_GetRepoIdsParams.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Graphql_GetRepoIdsParams( + val names: List, + val first: Long, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Graphql_GetRepoIdsResult.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Graphql_GetRepoIdsResult.kt new file mode 100644 index 0000000000..f9863b3aca --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Graphql_GetRepoIdsResult.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Graphql_GetRepoIdsResult( + val repos: List, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/IconsParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/IconsParams.kt new file mode 100644 index 0000000000..f2c7f66f99 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/IconsParams.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class IconsParams( + val value: String, + val position: Long, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Ignore_TestParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Ignore_TestParams.kt new file mode 100644 index 0000000000..84cc7a7172 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Ignore_TestParams.kt @@ -0,0 +1,6 @@ +package com.sourcegraph.cody.agent.protocol_generated + +data class Ignore_TestParams( + val uri: String, + val policy: String? = null +) diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Ignore_TestResult.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Ignore_TestResult.kt new file mode 100644 index 0000000000..19fdf1814b --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Ignore_TestResult.kt @@ -0,0 +1,5 @@ +package com.sourcegraph.cody.agent.protocol_generated + +data class Ignore_TestResult( + val policy: String? +) diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/MemoryUsage.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/MemoryUsage.kt new file mode 100644 index 0000000000..7f8861dd1e --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/MemoryUsage.kt @@ -0,0 +1,16 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class MemoryUsage( + val rss: Long, + val heapTotal: Long, + val heapUsed: Long, + val external: Long, + val arrayBuffers: Long, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/MentionParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/MentionParams.kt new file mode 100644 index 0000000000..3ce360af55 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/MentionParams.kt @@ -0,0 +1,14 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class MentionParams( + val uri: String, + val data: Any? = null, + val description: String? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/MessageOptions.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/MessageOptions.kt new file mode 100644 index 0000000000..7b222e8f72 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/MessageOptions.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class MessageOptions( + val modal: Boolean? = null, + val detail: String? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Model.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Model.kt new file mode 100644 index 0000000000..205ae8b4c9 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Model.kt @@ -0,0 +1,19 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Model( + val id: String, + val usage: List, + val contextWindow: ModelContextWindow, + val clientSideConfig: ClientSideConfig? = null, + val provider: String, + val title: String, + val tags: List? = null, + val modelRef: ModelRef? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ModelAvailabilityStatus.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ModelAvailabilityStatus.kt new file mode 100644 index 0000000000..d73c117222 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ModelAvailabilityStatus.kt @@ -0,0 +1,6 @@ +package com.sourcegraph.cody.agent.protocol_generated + +data class ModelAvailabilityStatus( + val model: Model, + val isModelAvailable: Boolean +) diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ModelContextWindow.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ModelContextWindow.kt new file mode 100644 index 0000000000..892a7528c0 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ModelContextWindow.kt @@ -0,0 +1,14 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class ModelContextWindow( + val input: Long, + val output: Long, + val context: ContextParams? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ModelId.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ModelId.kt new file mode 100644 index 0000000000..d3828a21bd --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ModelId.kt @@ -0,0 +1,10 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +typealias ModelId = String // One of: + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ModelRef.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ModelRef.kt new file mode 100644 index 0000000000..c40033b3a4 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ModelRef.kt @@ -0,0 +1,14 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class ModelRef( + val providerId: ProviderId, + val apiVersionId: ApiVersionId, + val modelId: ModelId, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ModelTag.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ModelTag.kt new file mode 100644 index 0000000000..9e9e767651 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ModelTag.kt @@ -0,0 +1,10 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +typealias ModelTag = String // One of: power, speed, balanced, other, recommended, deprecated, experimental, waitlist, on-waitlist, early-access, internal, pro, free, enterprise, gateway, byok, local, ollama, dev, stream-disabled, vision + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ModelUsage.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ModelUsage.kt new file mode 100644 index 0000000000..04723e47e8 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ModelUsage.kt @@ -0,0 +1,10 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +typealias ModelUsage = String // One of: chat, edit, autocomplete + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/NetworkRequest.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/NetworkRequest.kt new file mode 100644 index 0000000000..1faa0763cc --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/NetworkRequest.kt @@ -0,0 +1,14 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class NetworkRequest( + val url: String, + val body: String? = null, + val error: String? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/NodeTypesParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/NodeTypesParams.kt new file mode 100644 index 0000000000..c2a8c38553 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/NodeTypesParams.kt @@ -0,0 +1,16 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class NodeTypesParams( + val atCursor: String? = null, + val parent: String? = null, + val grandparent: String? = null, + val greatGrandparent: String? = null, + val lastAncestorOnTheSameLine: String? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/NodeTypesWithCompletionParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/NodeTypesWithCompletionParams.kt new file mode 100644 index 0000000000..d67b705562 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/NodeTypesWithCompletionParams.kt @@ -0,0 +1,16 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class NodeTypesWithCompletionParams( + val atCursor: String? = null, + val parent: String? = null, + val grandparent: String? = null, + val greatGrandparent: String? = null, + val lastAncestorOnTheSameLine: String? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Null.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Null.kt new file mode 100644 index 0000000000..0fb8cc3ae7 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Null.kt @@ -0,0 +1,8 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +package com.sourcegraph.cody.agent.protocol_generated; + +typealias Null = Void? diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/OpenAICompatible.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/OpenAICompatible.kt new file mode 100644 index 0000000000..d31f61d69a --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/OpenAICompatible.kt @@ -0,0 +1,33 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class OpenAICompatible( + val stopSequences: List? = null, + val endOfText: String? = null, + val contextSizeHintTotalCharacters: Long? = null, + val contextSizeHintPrefixCharacters: Long? = null, + val contextSizeHintSuffixCharacters: Long? = null, + val chatPreInstruction: String? = null, + val editPostInstruction: String? = null, + val autocompleteSinglelineTimeout: Long? = null, + val autocompleteMultilineTimeout: Long? = null, + val chatTopK: Long? = null, + val chatTopP: Long? = null, + val chatTemperature: Long? = null, + val chatMaxTokens: Long? = null, + val autoCompleteTopK: Long? = null, + val autoCompleteTopP: Long? = null, + val autoCompleteTemperature: Long? = null, + val autoCompleteSinglelineMaxTokens: Long? = null, + val autoCompleteMultilineMaxTokens: Long? = null, + val editTopK: Long? = null, + val editTopP: Long? = null, + val editTemperature: Long? = null, + val editMaxTokens: Long? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/OptionsParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/OptionsParams.kt new file mode 100644 index 0000000000..016a994bc8 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/OptionsParams.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class OptionsParams( + val undoStopBefore: Boolean, + val undoStopAfter: Boolean, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/OrganizationsParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/OrganizationsParams.kt new file mode 100644 index 0000000000..c790c7ffe7 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/OrganizationsParams.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class OrganizationsParams( + val name: String, + val id: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ParametersParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ParametersParams.kt new file mode 100644 index 0000000000..15d29389cd --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ParametersParams.kt @@ -0,0 +1,14 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class ParametersParams( + val metadata: Map? = null, + val privateMetadata: Map? = null, + val billingMetadata: BillingMetadataParams? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/PortMappingParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/PortMappingParams.kt new file mode 100644 index 0000000000..69c1e35c8b --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/PortMappingParams.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class PortMappingParams( + val webviewPort: Long, + val extensionHostPort: Long, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Position.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Position.kt new file mode 100644 index 0000000000..cc473462a2 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Position.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Position( + val line: Long, + val character: Long, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProgressOptions.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProgressOptions.kt new file mode 100644 index 0000000000..a0eb6b2c67 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProgressOptions.kt @@ -0,0 +1,15 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class ProgressOptions( + val title: String? = null, + val location: String? = null, + val locationViewId: String? = null, + val cancellable: Boolean? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProgressReportParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProgressReportParams.kt new file mode 100644 index 0000000000..5a5c6e9c63 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProgressReportParams.kt @@ -0,0 +1,14 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class ProgressReportParams( + val id: String, + val message: String? = null, + val increment: Long? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProgressStartParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProgressStartParams.kt new file mode 100644 index 0000000000..57f827e438 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProgressStartParams.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class ProgressStartParams( + val id: String, + val options: ProgressOptions, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Progress_CancelParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Progress_CancelParams.kt new file mode 100644 index 0000000000..3a7472dda3 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Progress_CancelParams.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Progress_CancelParams( + val id: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Progress_EndParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Progress_EndParams.kt new file mode 100644 index 0000000000..9350428872 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Progress_EndParams.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Progress_EndParams( + val id: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProtocolAuthStatus.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProtocolAuthStatus.kt new file mode 100644 index 0000000000..e917dca84c --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProtocolAuthStatus.kt @@ -0,0 +1,62 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +import com.google.gson.annotations.SerializedName; +import com.google.gson.Gson; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import java.lang.reflect.Type; + +sealed class ProtocolAuthStatus { + companion object { + val deserializer: JsonDeserializer = + JsonDeserializer { element: JsonElement, _: Type, context: JsonDeserializationContext -> + when (element.getAsJsonObject().get("status").getAsString()) { + "authenticated" -> context.deserialize(element, ProtocolAuthenticatedAuthStatus::class.java) + "unauthenticated" -> context.deserialize(element, ProtocolUnauthenticatedAuthStatus::class.java) + else -> throw Exception("Unknown discriminator ${element}") + } + } + } +} + +data class ProtocolAuthenticatedAuthStatus( + val status: StatusEnum, // Oneof: authenticated + val authenticated: Boolean, + val endpoint: String, + val username: String, + val isFireworksTracingEnabled: Boolean? = null, + val hasVerifiedEmail: Boolean? = null, + val requiresVerifiedEmail: Boolean? = null, + val primaryEmail: String? = null, + val displayName: String? = null, + val avatarURL: String? = null, + val pendingValidation: Boolean, + val organizations: List? = null, +) : ProtocolAuthStatus() { + + enum class StatusEnum { + @SerializedName("authenticated") Authenticated, + } +} + +data class ProtocolUnauthenticatedAuthStatus( + val status: StatusEnum, // Oneof: unauthenticated + val authenticated: Boolean, + val endpoint: String, + val showNetworkError: Boolean? = null, + val showInvalidAccessTokenError: Boolean? = null, + val pendingValidation: Boolean, +) : ProtocolAuthStatus() { + + enum class StatusEnum { + @SerializedName("unauthenticated") Unauthenticated, + } +} + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProtocolCodeAction.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProtocolCodeAction.kt new file mode 100644 index 0000000000..75aad510d6 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProtocolCodeAction.kt @@ -0,0 +1,18 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class ProtocolCodeAction( + val id: String, + val commandID: String? = null, + val title: String, + val diagnostics: List? = null, + val kind: String? = null, + val isPreferred: Boolean? = null, + val disabled: DisabledParams? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProtocolCodeLens.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProtocolCodeLens.kt new file mode 100644 index 0000000000..8e40c4003a --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProtocolCodeLens.kt @@ -0,0 +1,14 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class ProtocolCodeLens( + val range: Range, + val command: ProtocolCommand? = null, + val isResolved: Boolean, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProtocolCommand.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProtocolCommand.kt new file mode 100644 index 0000000000..f0c7ead866 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProtocolCommand.kt @@ -0,0 +1,15 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class ProtocolCommand( + val title: TitleParams, + val command: String, + val tooltip: String? = null, + val arguments: List? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProtocolDiagnostic.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProtocolDiagnostic.kt new file mode 100644 index 0000000000..83cb241a32 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProtocolDiagnostic.kt @@ -0,0 +1,17 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class ProtocolDiagnostic( + val location: ProtocolLocation, + val message: String, + val severity: DiagnosticSeverity, // Oneof: error, warning, info, suggestion + val code: String? = null, + val source: String? = null, + val relatedInformation: List? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProtocolLocation.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProtocolLocation.kt new file mode 100644 index 0000000000..1f3311d776 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProtocolLocation.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class ProtocolLocation( + val uri: String, + val range: Range, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProtocolRelatedInformationDiagnostic.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProtocolRelatedInformationDiagnostic.kt new file mode 100644 index 0000000000..2e797148ff --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProtocolRelatedInformationDiagnostic.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class ProtocolRelatedInformationDiagnostic( + val location: ProtocolLocation, + val message: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProtocolTextDocument.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProtocolTextDocument.kt new file mode 100644 index 0000000000..d17d801d58 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProtocolTextDocument.kt @@ -0,0 +1,18 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class ProtocolTextDocument( + val uri: String, + val filePath: String? = null, + val content: String? = null, + val selection: Range? = null, + val contentChanges: List? = null, + val visibleRange: Range? = null, + val testing: TestingParams? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProtocolTextDocumentContentChangeEvent.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProtocolTextDocumentContentChangeEvent.kt new file mode 100644 index 0000000000..71d5c6d8ba --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProtocolTextDocumentContentChangeEvent.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class ProtocolTextDocumentContentChangeEvent( + val range: Range, + val text: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProtocolTypeAdapters.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProtocolTypeAdapters.kt new file mode 100644 index 0000000000..9c428ed1f5 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProtocolTypeAdapters.kt @@ -0,0 +1,17 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("unused", "ConstPropertyName") +package com.sourcegraph.cody.agent.protocol_generated; + +object ProtocolTypeAdapters { + fun register(gson: com.google.gson.GsonBuilder) { + gson.registerTypeAdapter(ContextItem::class.java, ContextItem.deserializer) + gson.registerTypeAdapter(CustomCommandResult::class.java, CustomCommandResult.deserializer) + gson.registerTypeAdapter(ProtocolAuthStatus::class.java, ProtocolAuthStatus.deserializer) + gson.registerTypeAdapter(TextEdit::class.java, TextEdit.deserializer) + gson.registerTypeAdapter(WorkspaceEditOperation::class.java, WorkspaceEditOperation.deserializer) + } +} diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProviderId.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProviderId.kt new file mode 100644 index 0000000000..cd9089054b --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ProviderId.kt @@ -0,0 +1,10 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +typealias ProviderId = String // One of: + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Range.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Range.kt new file mode 100644 index 0000000000..26e33136d6 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Range.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Range( + val start: Position, + val end: Position, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/RangeData.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/RangeData.kt new file mode 100644 index 0000000000..8b973fd0fc --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/RangeData.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class RangeData( + val start: StartParams, + val end: EndParams, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/RenameFile.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/RenameFile.kt new file mode 100644 index 0000000000..3b083db629 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/RenameFile.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class RenameFile( + val oldUri: String, + val newUri: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/RenameFileOperation.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/RenameFileOperation.kt new file mode 100644 index 0000000000..660d12bb31 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/RenameFileOperation.kt @@ -0,0 +1,6 @@ +package com.sourcegraph.cody.agent.protocol_generated + +data class RenameFileOperation( + val oldUri: String, + val newUri: String +) diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/RenameFilesParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/RenameFilesParams.kt new file mode 100644 index 0000000000..114f66a147 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/RenameFilesParams.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class RenameFilesParams( + val files: List, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ReposParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ReposParams.kt new file mode 100644 index 0000000000..a8f7afbe16 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ReposParams.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class ReposParams( + val name: String, + val id: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/SaveDialogOptionsParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/SaveDialogOptionsParams.kt new file mode 100644 index 0000000000..7b766b2f3d --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/SaveDialogOptionsParams.kt @@ -0,0 +1,15 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class SaveDialogOptionsParams( + val defaultUri: String? = null, + val saveLabel: String? = null, + val filters: Map>? = null, + val title: String? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Secrets_DeleteParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Secrets_DeleteParams.kt new file mode 100644 index 0000000000..b233188929 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Secrets_DeleteParams.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Secrets_DeleteParams( + val key: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Secrets_DidChangeParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Secrets_DidChangeParams.kt new file mode 100644 index 0000000000..47676cce5c --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Secrets_DidChangeParams.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Secrets_DidChangeParams( + val key: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Secrets_GetParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Secrets_GetParams.kt new file mode 100644 index 0000000000..e28d04709c --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Secrets_GetParams.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Secrets_GetParams( + val key: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Secrets_StoreParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Secrets_StoreParams.kt new file mode 100644 index 0000000000..7ae74ef6f0 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Secrets_StoreParams.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Secrets_StoreParams( + val key: String, + val value: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/SelectedCompletionInfo.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/SelectedCompletionInfo.kt new file mode 100644 index 0000000000..ce3fbbdaf7 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/SelectedCompletionInfo.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class SelectedCompletionInfo( + val range: Range, + val text: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/SerializedChatInteraction.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/SerializedChatInteraction.kt new file mode 100644 index 0000000000..fc5d3e2017 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/SerializedChatInteraction.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class SerializedChatInteraction( + val humanMessage: SerializedChatMessage, + val assistantMessage: SerializedChatMessage? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/SerializedChatMessage.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/SerializedChatMessage.kt new file mode 100644 index 0000000000..a456c6700e --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/SerializedChatMessage.kt @@ -0,0 +1,34 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +import com.google.gson.annotations.SerializedName; + +data class SerializedChatMessage( + val contextFiles: List? = null, + val error: ChatError? = null, + val editorState: Any? = null, + val speaker: SpeakerEnum, // Oneof: human, assistant, system + val text: String? = null, + val model: String? = null, + val intent: IntentEnum? = null, // Oneof: search, chat, edit, insert +) { + + enum class SpeakerEnum { + @SerializedName("human") Human, + @SerializedName("assistant") Assistant, + @SerializedName("system") System, + } + + enum class IntentEnum { + @SerializedName("search") Search, + @SerializedName("chat") Chat, + @SerializedName("edit") Edit, + @SerializedName("insert") Insert, + } +} + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/SerializedChatTranscript.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/SerializedChatTranscript.kt new file mode 100644 index 0000000000..e2feb68b67 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/SerializedChatTranscript.kt @@ -0,0 +1,15 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class SerializedChatTranscript( + val id: String, + val chatTitle: String? = null, + val interactions: List, + val lastInteractionTimestamp: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ServerInfo.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ServerInfo.kt new file mode 100644 index 0000000000..bf39c49733 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ServerInfo.kt @@ -0,0 +1,14 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class ServerInfo( + val name: String, + val authenticated: Boolean? = null, + val authStatus: ProtocolAuthStatus? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ShowOptionsParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ShowOptionsParams.kt new file mode 100644 index 0000000000..b7c292e8af --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ShowOptionsParams.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class ShowOptionsParams( + val preserveFocus: Boolean, + val viewColumn: Long, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ShowWindowMessageParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ShowWindowMessageParams.kt new file mode 100644 index 0000000000..dbe1f0d5e1 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ShowWindowMessageParams.kt @@ -0,0 +1,24 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +import com.google.gson.annotations.SerializedName; + +data class ShowWindowMessageParams( + val severity: SeverityEnum, // Oneof: error, warning, information + val message: String, + val options: MessageOptions? = null, + val items: List? = null, +) { + + enum class SeverityEnum { + @SerializedName("error") Error, + @SerializedName("warning") Warning, + @SerializedName("information") Information, + } +} + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/SourceParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/SourceParams.kt new file mode 100644 index 0000000000..fc14ee9038 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/SourceParams.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class SourceParams( + val client: String, + val clientVersion: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/StartParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/StartParams.kt new file mode 100644 index 0000000000..ca1541f668 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/StartParams.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class StartParams( + val line: Long, + val character: Long, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/SymbolKind.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/SymbolKind.kt new file mode 100644 index 0000000000..9295e7abfa --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/SymbolKind.kt @@ -0,0 +1,10 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +typealias SymbolKind = String // One of: class, function, method + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/TelemetryEvent.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/TelemetryEvent.kt new file mode 100644 index 0000000000..ae6ad6c447 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/TelemetryEvent.kt @@ -0,0 +1,14 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class TelemetryEvent( + val feature: String, + val action: String, + val parameters: ParametersParams, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/TestingParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/TestingParams.kt new file mode 100644 index 0000000000..480d8399fc --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/TestingParams.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class TestingParams( + val selectedText: String? = null, + val sourceOfTruthDocument: ProtocolTextDocument? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/TestingTelemetryEvent.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/TestingTelemetryEvent.kt new file mode 100644 index 0000000000..642b97e03e --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/TestingTelemetryEvent.kt @@ -0,0 +1,17 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class TestingTelemetryEvent( + val feature: String, + val action: String, + val source: SourceParams, + val parameters: ParametersParams, + val timestamp: String, + val testOnlyAnonymousUserID: String? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_Autocomplete_ProviderConfigResult.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_Autocomplete_ProviderConfigResult.kt new file mode 100644 index 0000000000..09a8b033d8 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_Autocomplete_ProviderConfigResult.kt @@ -0,0 +1,14 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Testing_Autocomplete_ProviderConfigResult( + val id: String, + val legacyModel: String, + val configSource: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_Autocomplete_SetCompletionVisibilityDelayParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_Autocomplete_SetCompletionVisibilityDelayParams.kt new file mode 100644 index 0000000000..be6a976cff --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_Autocomplete_SetCompletionVisibilityDelayParams.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Testing_Autocomplete_SetCompletionVisibilityDelayParams( + val delay: Long, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_ClosestPostDataParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_ClosestPostDataParams.kt new file mode 100644 index 0000000000..a2c5ef60b5 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_ClosestPostDataParams.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Testing_ClosestPostDataParams( + val url: String, + val postData: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_ClosestPostDataResult.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_ClosestPostDataResult.kt new file mode 100644 index 0000000000..7d3aed4087 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_ClosestPostDataResult.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Testing_ClosestPostDataResult( + val closestBody: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_DiagnosticsParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_DiagnosticsParams.kt new file mode 100644 index 0000000000..1e4069f390 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_DiagnosticsParams.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Testing_DiagnosticsParams( + val uri: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_DiagnosticsResult.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_DiagnosticsResult.kt new file mode 100644 index 0000000000..08ab13edfb --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_DiagnosticsResult.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Testing_DiagnosticsResult( + val diagnostics: List, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_ExportedTelemetryEventsResult.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_ExportedTelemetryEventsResult.kt new file mode 100644 index 0000000000..223e33a01a --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_ExportedTelemetryEventsResult.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Testing_ExportedTelemetryEventsResult( + val events: List, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_MemoryUsageResult.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_MemoryUsageResult.kt new file mode 100644 index 0000000000..0775c452c5 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_MemoryUsageResult.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Testing_MemoryUsageResult( + val usage: MemoryUsage, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_NetworkRequestsResult.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_NetworkRequestsResult.kt new file mode 100644 index 0000000000..6926df21fc --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_NetworkRequestsResult.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Testing_NetworkRequestsResult( + val requests: List, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_ProgressCancelationParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_ProgressCancelationParams.kt new file mode 100644 index 0000000000..d2586e86f3 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_ProgressCancelationParams.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Testing_ProgressCancelationParams( + val title: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_ProgressCancelationResult.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_ProgressCancelationResult.kt new file mode 100644 index 0000000000..64e9bd087f --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_ProgressCancelationResult.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Testing_ProgressCancelationResult( + val result: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_ProgressParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_ProgressParams.kt new file mode 100644 index 0000000000..cfa4a6ca9d --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_ProgressParams.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Testing_ProgressParams( + val title: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_ProgressResult.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_ProgressResult.kt new file mode 100644 index 0000000000..bd177c49d1 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_ProgressResult.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Testing_ProgressResult( + val result: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_RequestErrorsResult.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_RequestErrorsResult.kt new file mode 100644 index 0000000000..83254db6f8 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Testing_RequestErrorsResult.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Testing_RequestErrorsResult( + val errors: List, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/TextDocumentEditParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/TextDocumentEditParams.kt new file mode 100644 index 0000000000..ab6c97eca4 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/TextDocumentEditParams.kt @@ -0,0 +1,14 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class TextDocumentEditParams( + val uri: String, + val edits: List, + val options: OptionsParams? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/TextDocumentShowOptionsParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/TextDocumentShowOptionsParams.kt new file mode 100644 index 0000000000..6be0689d45 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/TextDocumentShowOptionsParams.kt @@ -0,0 +1,14 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class TextDocumentShowOptionsParams( + val preserveFocus: Boolean? = null, + val preview: Boolean? = null, + val selection: Range? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/TextDocument_ChangeResult.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/TextDocument_ChangeResult.kt new file mode 100644 index 0000000000..a902f5e2af --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/TextDocument_ChangeResult.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class TextDocument_ChangeResult( + val success: Boolean, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/TextDocument_DidFocusParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/TextDocument_DidFocusParams.kt new file mode 100644 index 0000000000..2eb5f0b3ce --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/TextDocument_DidFocusParams.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class TextDocument_DidFocusParams( + val uri: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/TextDocument_DidSaveParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/TextDocument_DidSaveParams.kt new file mode 100644 index 0000000000..5cd15fb3f2 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/TextDocument_DidSaveParams.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class TextDocument_DidSaveParams( + val uri: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/TextDocument_ShowParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/TextDocument_ShowParams.kt new file mode 100644 index 0000000000..1782e93977 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/TextDocument_ShowParams.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class TextDocument_ShowParams( + val uri: String, + val options: TextDocumentShowOptionsParams? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/TextEdit.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/TextEdit.kt new file mode 100644 index 0000000000..c611330348 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/TextEdit.kt @@ -0,0 +1,64 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +import com.google.gson.annotations.SerializedName; +import com.google.gson.Gson; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import java.lang.reflect.Type; + +sealed class TextEdit { + companion object { + val deserializer: JsonDeserializer = + JsonDeserializer { element: JsonElement, _: Type, context: JsonDeserializationContext -> + when (element.getAsJsonObject().get("type").getAsString()) { + "replace" -> context.deserialize(element, ReplaceTextEdit::class.java) + "insert" -> context.deserialize(element, InsertTextEdit::class.java) + "delete" -> context.deserialize(element, DeleteTextEdit::class.java) + else -> throw Exception("Unknown discriminator ${element}") + } + } + } +} + +data class ReplaceTextEdit( + val type: TypeEnum, // Oneof: replace + val range: Range, + val value: String, + val metadata: WorkspaceEditEntryMetadata? = null, +) : TextEdit() { + + enum class TypeEnum { + @SerializedName("replace") Replace, + } +} + +data class InsertTextEdit( + val type: TypeEnum, // Oneof: insert + val position: Position, + val value: String, + val metadata: WorkspaceEditEntryMetadata? = null, +) : TextEdit() { + + enum class TypeEnum { + @SerializedName("insert") Insert, + } +} + +data class DeleteTextEdit( + val type: TypeEnum, // Oneof: delete + val range: Range, + val metadata: WorkspaceEditEntryMetadata? = null, +) : TextEdit() { + + enum class TypeEnum { + @SerializedName("delete") Delete, + } +} + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/TitleParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/TitleParams.kt new file mode 100644 index 0000000000..0f1493db98 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/TitleParams.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class TitleParams( + val text: String, + val icons: List, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/UntitledTextDocument.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/UntitledTextDocument.kt new file mode 100644 index 0000000000..48ec72896b --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/UntitledTextDocument.kt @@ -0,0 +1,6 @@ +package com.sourcegraph.cody.agent.protocol_generated + +data class UntitledTextDocument( + val uri: String, + val content: String? +) diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Uri.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Uri.kt new file mode 100644 index 0000000000..c4dd7b8491 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Uri.kt @@ -0,0 +1,17 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Uri( + val scheme: String, + val authority: String, + val path: String, + val query: String, + val fragment: String, + val fsPath: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/WebviewCreateWebviewPanelOptions.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/WebviewCreateWebviewPanelOptions.kt new file mode 100644 index 0000000000..6aa4518de0 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/WebviewCreateWebviewPanelOptions.kt @@ -0,0 +1,18 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class WebviewCreateWebviewPanelOptions( + val enableScripts: Boolean, + val enableForms: Boolean, + val enableOnlyCommandUris: List? = null, + val localResourceRoots: List? = null, + val portMapping: List, + val enableFindWidget: Boolean, + val retainContextWhenHidden: Boolean, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/WebviewNativeConfig.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/WebviewNativeConfig.kt new file mode 100644 index 0000000000..226f357d9d --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/WebviewNativeConfig.kt @@ -0,0 +1,25 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +import com.google.gson.annotations.SerializedName; + +data class WebviewNativeConfig( + val view: ViewEnum, // Oneof: multiple, single + val cspSource: String? = null, + val webviewBundleServingPrefix: String? = null, + val skipResourceRelativization: Boolean? = null, + val injectScript: String? = null, + val injectStyle: String? = null, +) { + + enum class ViewEnum { + @SerializedName("multiple") Multiple, + @SerializedName("single") Single, + } +} + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_CreateWebviewPanelParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_CreateWebviewPanelParams.kt new file mode 100644 index 0000000000..2723acd948 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_CreateWebviewPanelParams.kt @@ -0,0 +1,16 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Webview_CreateWebviewPanelParams( + val handle: String, + val viewType: String, + val title: String, + val showOptions: ShowOptionsParams, + val options: WebviewCreateWebviewPanelOptions, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_DidDisposeNativeParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_DidDisposeNativeParams.kt new file mode 100644 index 0000000000..aaefcef94b --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_DidDisposeNativeParams.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Webview_DidDisposeNativeParams( + val handle: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_DidDisposeParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_DidDisposeParams.kt new file mode 100644 index 0000000000..a114668a87 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_DidDisposeParams.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Webview_DidDisposeParams( + val id: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_DisposeParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_DisposeParams.kt new file mode 100644 index 0000000000..64153cfd4a --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_DisposeParams.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Webview_DisposeParams( + val handle: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_PostMessageStringEncodedParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_PostMessageStringEncodedParams.kt new file mode 100644 index 0000000000..4d7a39bb33 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_PostMessageStringEncodedParams.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Webview_PostMessageStringEncodedParams( + val id: String, + val stringEncodedMessage: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_ReceiveMessageStringEncodedParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_ReceiveMessageStringEncodedParams.kt new file mode 100644 index 0000000000..e825a3aeaa --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_ReceiveMessageStringEncodedParams.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Webview_ReceiveMessageStringEncodedParams( + val id: String, + val messageStringEncoded: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_RegisterWebviewViewProviderParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_RegisterWebviewViewProviderParams.kt new file mode 100644 index 0000000000..948ef63ef6 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_RegisterWebviewViewProviderParams.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Webview_RegisterWebviewViewProviderParams( + val viewId: String, + val retainContextWhenHidden: Boolean, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_ResolveWebviewViewParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_ResolveWebviewViewParams.kt new file mode 100644 index 0000000000..629418f015 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_ResolveWebviewViewParams.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Webview_ResolveWebviewViewParams( + val viewId: String, + val webviewHandle: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_RevealParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_RevealParams.kt new file mode 100644 index 0000000000..af0de7ce2e --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_RevealParams.kt @@ -0,0 +1,14 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Webview_RevealParams( + val handle: String, + val viewColumn: Long, + val preserveFocus: Boolean, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_SetHtmlParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_SetHtmlParams.kt new file mode 100644 index 0000000000..16bc0fe002 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_SetHtmlParams.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Webview_SetHtmlParams( + val handle: String, + val html: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_SetIconPathParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_SetIconPathParams.kt new file mode 100644 index 0000000000..4ec1cb662b --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_SetIconPathParams.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Webview_SetIconPathParams( + val handle: String, + val iconPathUri: String? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_SetOptionsParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_SetOptionsParams.kt new file mode 100644 index 0000000000..def4b78b02 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_SetOptionsParams.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Webview_SetOptionsParams( + val handle: String, + val options: DefiniteWebviewOptions, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_SetTitleParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_SetTitleParams.kt new file mode 100644 index 0000000000..3824f2b4e1 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_SetTitleParams.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Webview_SetTitleParams( + val handle: String, + val title: String, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Window_DidChangeContextParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Window_DidChangeContextParams.kt new file mode 100644 index 0000000000..93ee4b8b27 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Window_DidChangeContextParams.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Window_DidChangeContextParams( + val key: String, + val value: String? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Window_DidChangeFocusParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Window_DidChangeFocusParams.kt new file mode 100644 index 0000000000..9d269ca143 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Window_DidChangeFocusParams.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class Window_DidChangeFocusParams( + val focused: Boolean, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/WorkspaceEditEntryMetadata.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/WorkspaceEditEntryMetadata.kt new file mode 100644 index 0000000000..666a0b2718 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/WorkspaceEditEntryMetadata.kt @@ -0,0 +1,15 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class WorkspaceEditEntryMetadata( + val needsConfirmation: Boolean, + val label: String, + val description: String? = null, + val iconPath: Uri? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/WorkspaceEditMetadata.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/WorkspaceEditMetadata.kt new file mode 100644 index 0000000000..bff4a3fa7b --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/WorkspaceEditMetadata.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class WorkspaceEditMetadata( + val isRefactoring: Boolean? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/WorkspaceEditOperation.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/WorkspaceEditOperation.kt new file mode 100644 index 0000000000..27a2341619 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/WorkspaceEditOperation.kt @@ -0,0 +1,79 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +import com.google.gson.annotations.SerializedName; +import com.google.gson.Gson; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import java.lang.reflect.Type; + +sealed class WorkspaceEditOperation { + companion object { + val deserializer: JsonDeserializer = + JsonDeserializer { element: JsonElement, _: Type, context: JsonDeserializationContext -> + when (element.getAsJsonObject().get("type").getAsString()) { + "create-file" -> context.deserialize(element, CreateFileOperation::class.java) + "rename-file" -> context.deserialize(element, RenameFileOperation::class.java) + "delete-file" -> context.deserialize(element, DeleteFileOperation::class.java) + "edit-file" -> context.deserialize(element, EditFileOperation::class.java) + else -> throw Exception("Unknown discriminator ${element}") + } + } + } +} + +data class CreateFileOperation( + val type: TypeEnum, // Oneof: create-file + val uri: String, + val options: WriteFileOptions? = null, + val textContents: String, + val metadata: WorkspaceEditEntryMetadata? = null, +) : WorkspaceEditOperation() { + + enum class TypeEnum { + @SerializedName("create-file") `Create-file`, + } +} + +data class RenameFileOperation( + val type: TypeEnum, // Oneof: rename-file + val oldUri: String, + val newUri: String, + val options: WriteFileOptions? = null, + val metadata: WorkspaceEditEntryMetadata? = null, +) : WorkspaceEditOperation() { + + enum class TypeEnum { + @SerializedName("rename-file") `Rename-file`, + } +} + +data class DeleteFileOperation( + val type: TypeEnum, // Oneof: delete-file + val uri: String, + val deleteOptions: DeleteOptionsParams? = null, + val metadata: WorkspaceEditEntryMetadata? = null, +) : WorkspaceEditOperation() { + + enum class TypeEnum { + @SerializedName("delete-file") `Delete-file`, + } +} + +data class EditFileOperation( + val type: TypeEnum, // Oneof: edit-file + val uri: String, + val edits: List, +) : WorkspaceEditOperation() { + + enum class TypeEnum { + @SerializedName("edit-file") `Edit-file`, + } +} + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/WorkspaceEditParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/WorkspaceEditParams.kt new file mode 100644 index 0000000000..535567c12a --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/WorkspaceEditParams.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class WorkspaceEditParams( + val operations: List, + val metadata: WorkspaceEditMetadata? = null, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/WorkspaceFolder_DidChangeParams.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/WorkspaceFolder_DidChangeParams.kt new file mode 100644 index 0000000000..46c31b5b77 --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/WorkspaceFolder_DidChangeParams.kt @@ -0,0 +1,12 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class WorkspaceFolder_DidChangeParams( + val uris: List, +) + diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/WriteFileOptions.kt b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/WriteFileOptions.kt new file mode 100644 index 0000000000..1505ab319d --- /dev/null +++ b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/WriteFileOptions.kt @@ -0,0 +1,13 @@ +/* + * Generated file - DO NOT EDIT MANUALLY + * They are copied from the cody agent project using the copyProtocol gradle task. + * This is only a temporary solution before we fully migrate to generated protocol messages. + */ +@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") +package com.sourcegraph.cody.agent.protocol_generated; + +data class WriteFileOptions( + val overwrite: Boolean? = null, + val ignoreIfExists: Boolean? = null, +) +