fix: build error

This commit is contained in:
imeepos 2025-07-21 23:47:20 +08:00
parent 343688af56
commit f467b215b5
4 changed files with 1 additions and 30 deletions

View File

@ -2,7 +2,6 @@ import React, { useState, useCallback, useRef, useEffect } from 'react';
import {
MessageCircle,
Send,
Trash2,
Bot,
User,
AlertCircle,
@ -437,11 +436,6 @@ export const ChatInterface: React.FC<ChatInterfaceProps> = ({
}
}, [handleSendMessage]);
// 清除聊天历史
const handleClearChat = useCallback(() => {
setMessages([]);
setError(null);
}, []);
// 重试最后一条消息
const handleRetry = useCallback(() => {

View File

@ -1,12 +1,9 @@
import React, { useState, useEffect } from 'react';
import {
ArrowLeft,
MessageCircle,
Settings,
Info,
Zap
} from 'lucide-react';
import { useNavigate } from 'react-router-dom';
import { ChatInterface } from '../../components/ChatInterface';
import { testRagGroundingConnection, getRagGroundingConfig } from '../../services/ragGroundingService';
import { RagGroundingConfigInfo } from '../../types/ragGrounding';
@ -16,7 +13,6 @@ import { RagGroundingConfigInfo } from '../../types/ragGrounding';
* Tauri UI/UX
*/
const ChatTool: React.FC = () => {
const navigate = useNavigate();
const [connectionStatus, setConnectionStatus] = useState<'checking' | 'connected' | 'error'>('checking');
const [configInfo, setConfigInfo] = useState<RagGroundingConfigInfo | null>(null);
const [showSettings, setShowSettings] = useState(false);
@ -44,11 +40,6 @@ const ChatTool: React.FC = () => {
checkConnection();
}, []);
// 返回工具列表
const handleBack = () => {
navigate('/tools');
};
// 重新连接
const handleReconnect = async () => {
setConnectionStatus('checking');

View File

@ -7,8 +7,6 @@ import {
RagGroundingQueryOptions,
RagGroundingQueryResult,
RagGroundingServiceStatus,
RagGroundingError,
RagGroundingErrorType,
RagGroundingStats,
DEFAULT_RAG_GROUNDING_CONFIG,
} from '../types/ragGrounding';
@ -250,18 +248,6 @@ export class RagGroundingService {
}
return JSON.stringify(error);
}
/**
* RAG Grounding
*/
private createError(type: RagGroundingErrorType, message: string, details?: any): RagGroundingError {
return {
type,
message,
details,
timestamp: new Date(),
};
}
}
/**

View File

@ -8,7 +8,7 @@ import { queryRagGrounding, testRagGroundingConnection, getRagGroundingConfig }
/**
*
*/
class ConsoleLogger {
export class ConsoleLogger {
static logChatResponse(userInput: string, response: any, totalTime: number) {
console.group('🎯 聊天回复详情');
console.log('📝 用户输入:', userInput);