mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-01 05:00:46 +00:00
Merge pull request #1670 from QwenLM/fix/top-right-auth-not-updating
fix(ui): resolve auth not updating in top-right corner
This commit is contained in:
commit
1db0d0051a
2 changed files with 10 additions and 6 deletions
|
|
@ -30,6 +30,7 @@ export const useAuthCommand = (
|
|||
settings: LoadedSettings,
|
||||
config: Config,
|
||||
addItem: (item: Omit<HistoryItem, 'id'>, timestamp: number) => void,
|
||||
onAuthChange?: () => void,
|
||||
) => {
|
||||
const unAuthenticated = config.getAuthType() === undefined;
|
||||
|
||||
|
|
@ -136,11 +137,10 @@ export const useAuthCommand = (
|
|||
setIsAuthDialogOpen(false);
|
||||
setIsAuthenticating(false);
|
||||
|
||||
// Log authentication success
|
||||
const authEvent = new AuthEvent(authType, 'manual', 'success');
|
||||
logAuth(config, authEvent);
|
||||
// Trigger UI refresh to update header information
|
||||
onAuthChange?.();
|
||||
|
||||
// Show success message
|
||||
// Add success message to history
|
||||
addItem(
|
||||
{
|
||||
type: MessageType.INFO,
|
||||
|
|
@ -150,8 +150,12 @@ export const useAuthCommand = (
|
|||
},
|
||||
Date.now(),
|
||||
);
|
||||
|
||||
// Log authentication success
|
||||
const authEvent = new AuthEvent(authType, 'manual', 'success');
|
||||
logAuth(config, authEvent);
|
||||
},
|
||||
[settings, handleAuthFailure, config, addItem],
|
||||
[settings, handleAuthFailure, config, addItem, onAuthChange],
|
||||
);
|
||||
|
||||
const performAuth = useCallback(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue