Compare commits

..

2 Commits

Author SHA1 Message Date
2881941be6 Merge pull request 'fix: 修复前端 TypeScript 编译错误' (#189) from fix/frontend into develop
Reviewed-on: http://8.161.227.145:3000/XEngineers/CamTalk/pulls/189
2026-06-22 00:29:42 +08:00
hhs
1b99d24fc1 fix: 修复前端 TypeScript 编译错误
- 移除 App.tsx 中未使用的 activeScenario 变量
- 修复 ChatPanel 中 ReactNode 的 type-only import
- 移除 ChatPanel 中未使用的 onSelectScenario 参数

修复 CI 构建失败问题
2026-06-22 00:28:59 +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);