mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-30 20:50:34 +00:00
add back addItem
This commit is contained in:
parent
8fab26d1a3
commit
c2d6c05f12
1 changed files with 13 additions and 2 deletions
|
|
@ -20,7 +20,7 @@ import type { LoadedSettings } from '../../config/settings.js';
|
|||
import { getPersistScopeForModelSelection } from '../../config/modelProvidersScope.js';
|
||||
import type { OpenAICredentials } from '../components/OpenAIKeyPrompt.js';
|
||||
import { useQwenAuth } from '../hooks/useQwenAuth.js';
|
||||
import { AuthState } from '../types.js';
|
||||
import { AuthState, MessageType } from '../types.js';
|
||||
import type { HistoryItem } from '../types.js';
|
||||
import { t } from '../../i18n/index.js';
|
||||
|
||||
|
|
@ -140,11 +140,22 @@ export const useAuthCommand = (
|
|||
// Trigger UI refresh to update header information
|
||||
onAuthChange?.();
|
||||
|
||||
// Add success message to history
|
||||
addItem(
|
||||
{
|
||||
type: MessageType.INFO,
|
||||
text: t('Authenticated successfully with {{authType}} credentials.', {
|
||||
authType,
|
||||
}),
|
||||
},
|
||||
Date.now(),
|
||||
);
|
||||
|
||||
// Log authentication success
|
||||
const authEvent = new AuthEvent(authType, 'manual', 'success');
|
||||
logAuth(config, authEvent);
|
||||
},
|
||||
[settings, handleAuthFailure, config, onAuthChange],
|
||||
[settings, handleAuthFailure, config, addItem, onAuthChange],
|
||||
);
|
||||
|
||||
const performAuth = useCallback(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue