This commit is contained in:
parent
65c3719707
commit
379313dde9
|
|
@ -22,9 +22,15 @@ import {
|
|||
validateChatSettings
|
||||
} from "../chat-helpers"
|
||||
|
||||
import { usePathname } from "next/navigation"
|
||||
|
||||
export const useChatHandler = () => {
|
||||
const pathname = usePathname() // 获取当前路径
|
||||
const router = useRouter()
|
||||
|
||||
// 提取当前路径中的 locale 部分
|
||||
const locale = pathname.split("/")[1] || "en"
|
||||
|
||||
const {
|
||||
userInput,
|
||||
chatFiles,
|
||||
|
|
@ -175,7 +181,7 @@ export const useChatHandler = () => {
|
|||
// })
|
||||
}
|
||||
|
||||
return router.push(`/${selectedWorkspace.id}/chat`)
|
||||
return router.push(`/${locale}/${selectedWorkspace.id}/chat`)
|
||||
}
|
||||
|
||||
const handleFocusChatInput = () => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue