forked from sourcegraph/cody
-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(codegen): Adds special cases for
AuthStatus
to re-enable codegen (
sourcegraph#5854) Adds a ProtocolAuthStatus type to get around issues of using a boolean as a discriminator. Also refactors the code generation into separate classes for each language type and leaves all SCIP logic in Codegen. ## Test plan Regenerated all three language types and verified that code changes were just due to updates in the underlying types since disabling.
- Loading branch information
1 parent
f91ce0f
commit 9632649
Showing
27 changed files
with
1,518 additions
and
910 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Please post in #team-cody-clients if you need help getting this CI check to pass. | ||
# Worst-case: feel free to disable this workflow here https://github.com/sourcegraph/cody/actions/workflows/agent-bindings.yml | ||
name: agent-bindings | ||
on: | ||
|
||
pull_request: | ||
paths: | ||
- '**.ts' | ||
- '**.tsx' | ||
- '**.js' | ||
|
||
jobs: | ||
kotlin: | ||
if: github.repository == 'sourcegraph/cody' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # SECURITY: pin third-party action hashes | ||
id: pnpm-install | ||
with: | ||
version: 8.6.7 | ||
run_install: false | ||
- name: Get pnpm store directory | ||
id: pnpm-cache | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
- uses: actions/cache@v3 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- run: pnpm install --frozen-lockfile | ||
- run: pnpm generate-agent-kotlin-bindings | ||
- run: ./agent/scripts/error-if-diff.sh | ||
- run: ./agent/scripts/compile-bindings-if-diff.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 0 additions & 14 deletions
14
...src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodyLLMSiteConfiguration.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 3 additions & 4 deletions
7
.../protocol_generated/Chat_RestoreParams.kt → ...protocol_generated/OrganizationsParams.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") | ||
package com.sourcegraph.cody.agent.protocol_generated; | ||
|
||
data class Chat_RestoreParams( | ||
val modelID: String? = null, | ||
val messages: List<SerializedChatMessage>, | ||
val chatID: String, | ||
data class OrganizationsParams( | ||
val name: String, | ||
val id: String, | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
...om/sourcegraph/cody/agent/protocol_generated/Testing_Autocomplete_ProviderConfigResult.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
@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, | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.