Skip to content

Commit

Permalink
fix(ui): remove shortcuts for Answer Engine thread editing (#3387)
Browse files Browse the repository at this point in the history
  • Loading branch information
liangfung authored and wsxiaoys committed Nov 8, 2024
1 parent 37fc5e1 commit 0b2a7d2
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import * as z from 'zod'

import { MARKDOWN_CITATION_REGEX } from '@/lib/constants/regex'
import { MessageAttachmentCode } from '@/lib/gql/generates/graphql'
import { useEnterSubmit } from '@/lib/hooks/use-enter-submit'
import { AttachmentDocItem, RelevantCodeContext } from '@/lib/types'
import {
cn,
Expand Down Expand Up @@ -532,7 +531,6 @@ function MessageContentForm({
const { content } = form.watch()
const isEmptyContent = !content || isEmpty(content.trim())
const [draftMessage] = useState<ConversationMessage>(message)
const { formRef, onKeyDown } = useEnterSubmit()

const handleSubmit = async (values: z.infer<typeof formSchema>) => {
const errorMessage = await onSubmit({
Expand All @@ -546,7 +544,7 @@ function MessageContentForm({

return (
<Form {...form}>
<form ref={formRef} onSubmit={form.handleSubmit(handleSubmit)}>
<form onSubmit={form.handleSubmit(handleSubmit)}>
<FormField
control={form.control}
name="content"
Expand All @@ -558,7 +556,6 @@ function MessageContentForm({
minRows={2}
maxRows={20}
className="w-full rounded-lg border bg-background p-4 outline-ring"
onKeyDown={onKeyDown}
{...field}
/>
</FormControl>
Expand Down

0 comments on commit 0b2a7d2

Please sign in to comment.