(e: KeyboardEvent<HTMLTextAreaElement>)
| 414 | } |
| 415 | |
| 416 | const handleKeyDown = (e: KeyboardEvent<HTMLTextAreaElement>) => { |
| 417 | // 如果按下Enter键且没有按住Shift键,则提交表单 |
| 418 | if (e.key === "Enter" && !e.shiftKey) { |
| 419 | e.preventDefault() |
| 420 | const form = document.getElementById("chat-form") as HTMLFormElement |
| 421 | if (form && !isStreaming && !isExtractingInfo && !isUpdatingMap) { |
| 422 | form.requestSubmit() |
| 423 | } |
| 424 | } |
| 425 | } |
| 426 | |
| 427 | return ( |
| 428 | <div className="w-full md:w-[450px] border-l flex flex-col h-full"> |
nothing calls this directly
no outgoing calls
no test coverage detected