Compare commits

...
3 changed files with 25 additions and 13 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"claude-dev": patch
---
Fix bug where Cline account users logged in with invalid token would not be shown as logged out in webview presentation layer
+10 -9
View File
@@ -188,20 +188,21 @@ export class AuthService {
}
getInfo(): AuthState {
let userInfo = null
// TODO: this logic should be cleaner, but this will determine the authentication state for the webview -- if a user object is returned then the webview assumes authenticated, otherwise it assumes logged out (we previously returned a UserInfo object with empty fields, and this represented a broken logged in state)
let user: any = null
if (this._clineAuthInfo && this._authenticated) {
userInfo = this._clineAuthInfo.userInfo
}
// TODO: create proto for new user info type
return AuthState.create({
user: UserInfo.create({
const userInfo = this._clineAuthInfo.userInfo
user = UserInfo.create({
// TODO: create proto for new user info type
uid: userInfo?.id,
displayName: userInfo?.displayName,
email: userInfo?.email,
photoUrl: undefined,
}),
})
}
return AuthState.create({
user: user,
})
}
+10 -4
View File
@@ -185,7 +185,7 @@ export const ChatRowContent = memo(
sendMessageFromChatRow,
onSetQuote,
}: ChatRowContentProps) => {
const { handleSignIn } = useClineAuth()
const { handleSignIn, clineUser } = useClineAuth()
const { mcpServers, mcpMarketplaceCatalog, onRelinquishControl, apiConfiguration } = useExtensionState()
const [seeNewChangesDisabled, setSeeNewChangesDisabled] = useState(false)
const [quoteButtonState, setQuoteButtonState] = useState<QuoteButtonState>({
@@ -1014,9 +1014,15 @@ export const ChatRowContent = memo(
<>
<br />
<br />
<VSCodeButton onClick={handleSignIn} className="w-full mb-4">
Sign in to Cline
</VSCodeButton>
{clineUser ? (
<span style={{ color: "var(--vscode-descriptionForeground)" }}>
(Click "Retry" below)
</span>
) : (
<VSCodeButton onClick={handleSignIn} className="w-full mb-4">
Sign in to Cline
</VSCodeButton>
)}
</>
)}
</p>