MCPcopy Create free account
hub / github.com/Seanium/ChatMap / handleKeyDown

Function handleKeyDown

components/chat-interface.tsx:416–425  ·  view source on GitHub ↗
(e: KeyboardEvent<HTMLTextAreaElement>)

Source from the content-addressed store, hash-verified

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">

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected