Skip to content

Commit

Permalink
chore: 细节优化
Browse files Browse the repository at this point in the history
  • Loading branch information
weaigc committed Sep 1, 2023
1 parent 6a47d04 commit 2303241
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/chat-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { ChatImage } from './chat-image'
import { ChatAttachments } from './chat-attachments'
import { SVG } from './ui/svg'
import { ChatPrompts } from './chat-prompts'
import { debug } from '@/lib/isomorphic'

export interface ChatPanelProps
extends Pick<
Expand Down Expand Up @@ -72,6 +73,7 @@ export function ChatPanel({
await sendMessage(input)
}, [generating, input, sendMessage, setInput])
const onSubmit = useCallback(async (event: KeyboardEvent<HTMLTextAreaElement>) => {
debug('event key', event.key)
if (
event.shiftKey ||
event.ctrlKey ||
Expand All @@ -83,7 +85,7 @@ export function ChatPanel({
event.preventDefault()

onSend()
}, [attachmentList])
}, [generating, attachmentList])

const setBlur = useCallback(() => {
clearTimeout(tid)
Expand Down

0 comments on commit 2303241

Please sign in to comment.