refactor(phase-10): complete type safety enhancement
- Add types/api-responses.ts with ApiResponse<T>, PaginatedResponse<T> - Add types/errors.ts with comprehensive error type hierarchy - Replace all any usage (53 → 0, 100% reduction) - Add RawAPI response interfaces for type-safe mapping - Update catch blocks to use unknown with type narrowing - Add getState mock to chatStore tests Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { useEffect, useMemo, useState } from 'react';
|
||||
import { motion } from 'framer-motion';
|
||||
import { getStoredGatewayUrl } from '../lib/gateway-client';
|
||||
import { useGatewayStore } from '../store/gatewayStore';
|
||||
import { useGatewayStore, type PluginStatus } from '../store/gatewayStore';
|
||||
import { toChatAgent, useChatStore } from '../store/chatStore';
|
||||
import {
|
||||
Wifi, WifiOff, Bot, BarChart3, Plug, RefreshCw,
|
||||
@@ -533,7 +533,7 @@ export function RightPanel() {
|
||||
插件 ({pluginStatus.length})
|
||||
</h3>
|
||||
<div className="space-y-1 text-xs">
|
||||
{pluginStatus.map((p: any, i: number) => (
|
||||
{pluginStatus.map((p: PluginStatus, i: number) => (
|
||||
<div key={i} className="flex justify-between">
|
||||
<span className="text-gray-600 truncate">{p.name || p.id}</span>
|
||||
<span className={p.status === 'active' ? 'text-green-600' : 'text-gray-500'}>
|
||||
|
||||
Reference in New Issue
Block a user