'use client' import { useState, useRef } from 'react' import { UploadCloud, FileAudio, X } from 'lucide-react' import Link from 'next/link' import { AppShell } from '@/components/app-shell' import { cn } from '@/lib/utils' export default function UploadPage() { const [file, setFile] = useState(null) const [title, setTitle] = useState('') const [participants, setParticipants] = useState('') const [dragOver, setDragOver] = useState(false) const inputRef = useRef(null) const pickFile = (f: File | null | undefined) => { if (f) setFile(f) } const humanSize = (bytes: number) => { if (bytes < 1024 * 1024) return (bytes / 1024).toFixed(0) + ' KB' return (bytes / 1024 / 1024).toFixed(1) + ' MB' } return (

新建会议

把手机录好的音频文件拖进来,云端自动转写并生成总结

{/* Dropzone */} {!file ? (
{ e.preventDefault() setDragOver(true) }} onDragLeave={() => setDragOver(false)} onDrop={(e) => { e.preventDefault() setDragOver(false) pickFile(e.dataTransfer.files?.[0]) }} onClick={() => inputRef.current?.click()} className={cn( 'flex flex-col items-center justify-center rounded-2xl border-2 border-dashed px-6 py-16 transition-all cursor-pointer', dragOver ? 'border-primary bg-primary-subtle' : 'border-border bg-surface-elevated hover:border-primary/50 hover:bg-primary-subtle/50', )} >

拖拽音频文件到这里

或点击选择文件

支持 m4a · mp3 · wav · mp4 · opus · 单文件最大 500 MB

pickFile(e.target.files?.[0])} />
) : (

{file.name}

{humanSize(file.size)}

)} {/* Form */}
setTitle(e.target.value)} placeholder="例:与客户对齐定价" className="w-full rounded-xl border border-input bg-surface-elevated px-4 py-3 text-[14px] placeholder:text-muted-foreground/60 focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/20" />
setParticipants(e.target.value)} placeholder="张三, 李四, 客户王总" className="w-full rounded-xl border border-input bg-surface-elevated px-4 py-3 text-[14px] placeholder:text-muted-foreground/60 focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/20" />
{/* Actions */}
取消

上传后 Groq Whisper 转写 · Claude 自动生成要点 / 待办 / 决议

) }