Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle customer proxy re-auth response by retrying, not prompting user for different token #6652

Merged
merged 10 commits into from
Feb 20, 2025
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport")
package com.sourcegraph.cody.agent.protocol_generated;

data class AuthError(
val name: String,
val message: String,
val stack: String? = null,
val title: String,
val content: String,
val showTryAgain: Boolean,
)

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ object Constants {
const val agentic = "agentic"
const val ask = "ask"
const val assistant = "assistant"
const val `auth-config-error` = "auth-config-error"
const val authenticated = "authenticated"
const val autocomplete = "autocomplete"
const val balanced = "balanced"
Expand All @@ -43,10 +42,8 @@ object Constants {
const val editor = "editor"
const val enabled = "enabled"
const val enterprise = "enterprise"
const val `enterprise-user-logged-into-dotcom` = "enterprise-user-logged-into-dotcom"
const val error = "error"
const val experimental = "experimental"
const val `external-auth-provider-error` = "external-auth-provider-error"
const val file = "file"
const val free = "free"
const val function = "function"
Expand All @@ -60,13 +57,11 @@ object Constants {
const val initial = "initial"
const val insert = "insert"
const val internal = "internal"
const val `invalid-access-token` = "invalid-access-token"
const val isChatErrorGuard = "isChatErrorGuard"
const val local = "local"
const val method = "method"
const val multiple = "multiple"
const val native = "native"
const val `network-error` = "network-error"
const val none = "none"
const val notification = "notification"
const val `object-encoded` = "object-encoded"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ data class ProtocolUnauthenticatedAuthStatus(
val status: StatusEnum, // Oneof: unauthenticated
val authenticated: Boolean,
val endpoint: String,
val error: AuthenticationError? = null,
val error: AuthError? = null,
val pendingValidation: Boolean,
) : ProtocolAuthStatus() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package com.sourcegraph.cody.agent.protocol_generated;

object ProtocolTypeAdapters {
fun register(gson: com.google.gson.GsonBuilder) {
gson.registerTypeAdapter(AuthenticationError::class.java, AuthenticationError.deserializer)
gson.registerTypeAdapter(ContextItem::class.java, ContextItem.deserializer)
gson.registerTypeAdapter(CustomCommandResult::class.java, CustomCommandResult.deserializer)
gson.registerTypeAdapter(ProtocolAuthStatus::class.java, ProtocolAuthStatus.deserializer)
Expand Down
Loading
Loading