refactor(types): eliminate all as any type assertions (30 → 0)

- Replace MouseEvent-only handlers with MouseEvent | KeyboardEvent unions in multi-select and ChatTabBar
- Define LegacyInstalledPlugin type for backward compatibility in plugin-api
- Create getTokenValue() helper for type-safe theme token access in AppearanceTab
- Define ModelConfig interface for model configuration type safety in modelProvider
- All modifications maintain exact business logic equivalence
- Build passes with zero TypeScript errors (bun run build )
- LSP diagnostics clean on all modified files
This commit is contained in:
DrSmoothl
2026-03-01 21:33:40 +08:00
parent c45ee1a98e
commit ba47069dfe
7 changed files with 117 additions and 58 deletions

View File

@@ -806,7 +806,7 @@ export function ChatPage() {
}
// 关闭标签页
const closeTab = (tabId: string, e?: React.MouseEvent) => {
const closeTab = (tabId: string, e?: React.MouseEvent | React.KeyboardEvent) => {
e?.stopPropagation()
// 不能关闭默认 WebUI 标签页