refactor: 统一 Playground 上下文目录与引用路径

This commit is contained in:
zhanjunhao
2026-10-27 17:25:25 +08:00
parent 3ffba4ac6c
commit f9dd9297b8
7 changed files with 10 additions and 16 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ import {
selectFilter,
countRounds,
} from '../../helpers';
import { usePlayground } from '../../contexts/PlaygroundContext';
import { usePlayground } from '../../context/Playground';
import { StatusContext } from '../../context/Status';
const ChatArea = ({
@@ -35,7 +35,7 @@ import {
} from 'lucide-react';
import { useSpeechRecognition } from '../../hooks/playground/useSpeechRecognition';
import { useTranslation } from 'react-i18next';
import { usePlayground } from '../../contexts/PlaygroundContext';
import { usePlayground } from '../../context/Playground';
import {
getExperienceCenterBool,
getExperienceCenterPositiveInt,
+1 -1
View File
@@ -41,7 +41,7 @@ import { useTranslation } from 'react-i18next';
// 同名遮蔽在 Vite/terser 生产构建里会把两者缩成同一个变量名,触发 TDZ 错误:
// "Cannot access 'Oe' before initialization"
// 本地函数签名是 (content) 而非 helpers 里的 (message),调用时记得传 message.content。
import { usePlayground } from '../../contexts/PlaygroundContext';
import { usePlayground } from '../../context/Playground';
import { useSpeechSynthesis } from '../../hooks/playground/useSpeechSynthesis';
const MessageContent = ({