fix: 修复前端 TypeScript 编译错误 #190

Merged
huanghaosheng merged 2 commits from develop into v2 2026-06-22 00:30:00 +08:00
2 changed files with 1 additions and 5 deletions

View File

@@ -240,9 +240,6 @@ function AppContent() {
}]);
}, [updateConfig, setMessages, tr]);
// 当前情景对象
const activeScenario = allScenarios.find((s) => s.id === (config.scenario || "free_chat")) || allScenarios[0];
// ---- 键盘快捷键 ----
useEffect(() => {
const handler = (e: KeyboardEvent) => {

View File

@@ -4,7 +4,7 @@
// 增强:空状态情景选择卡片、语音输入按钮
// ============================================================
import { ReactNode, useEffect, useRef, useState } from "react";
import { useEffect, useRef, useState, type ReactNode } from "react";
import { useI18n } from "../../lib/i18n";
import { scenarios } from "../../lib/scenarios";
import type { ChatMessage } from "../../types";
@@ -52,7 +52,6 @@ export function ChatPanel({
onSendText,
onToggleMic,
onSceneCard,
onSelectScenario,
}: ChatPanelProps) {
const bottomRef = useRef<HTMLDivElement>(null);
const containerRef = useRef<HTMLDivElement>(null);