style: 完成所有文件的lint

This commit is contained in:
claude-code-best
2026-05-01 21:39:30 +08:00
parent d136872cc9
commit 6182015005
1333 changed files with 68255 additions and 77882 deletions

View File

@@ -1,30 +1,30 @@
import { useEffect, useRef } from 'react'
import { useNotifications } from 'src/context/notifications.js'
import { getModelDeprecationWarning } from 'src/utils/model/deprecation.js'
import { getIsRemoteMode } from '../../bootstrap/state.js'
import { useEffect, useRef } from 'react';
import { useNotifications } from 'src/context/notifications.js';
import { getModelDeprecationWarning } from 'src/utils/model/deprecation.js';
import { getIsRemoteMode } from '../../bootstrap/state.js';
export function useDeprecationWarningNotification(model: string): void {
const { addNotification } = useNotifications()
const lastWarningRef = useRef<string | null>(null)
const { addNotification } = useNotifications();
const lastWarningRef = useRef<string | null>(null);
useEffect(() => {
if (getIsRemoteMode()) return
const deprecationWarning = getModelDeprecationWarning(model)
if (getIsRemoteMode()) return;
const deprecationWarning = getModelDeprecationWarning(model);
// Show warning if model is deprecated and we haven't shown this exact warning yet
if (deprecationWarning && deprecationWarning !== lastWarningRef.current) {
lastWarningRef.current = deprecationWarning
lastWarningRef.current = deprecationWarning;
addNotification({
key: 'model-deprecation-warning',
text: deprecationWarning,
color: 'warning',
priority: 'high',
})
});
}
// Reset tracking if model changes to non-deprecated
if (!deprecationWarning) {
lastWarningRef.current = null
lastWarningRef.current = null;
}
}, [model, addNotification])
}, [model, addNotification]);
}