File tree Expand file tree Collapse file tree
apps/frontend/app/components/chat/interface Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<script setup lang="ts">
22import type Lenis from ' lenis'
3+ import { useSidebar } from ' ~/lib/shadcn/components/ui/sidebar'
34
45const props = defineProps <{
56 nearTopBottom: Array <null | boolean | number >
@@ -14,6 +15,7 @@ const emit = defineEmits<{
1415const chatInput = defineModel <string >(' chatInput' , { required: true })
1516
1617const isDev = import .meta .dev
18+ const sidebarContext = useSidebar ()
1719const chatContext = useChatContext ()
1820const { t } = useI18n ()
1921
@@ -66,7 +68,12 @@ function handleSubmit({ confirmMultiStream = false }) {
6668 v-model =" chatInputTA"
6769 :placeholder =" chatPlaceholder"
6870 class =" min-h-12 resize-none bg-transparent outline-none placeholder-secondary-700/60 dark:placeholder-secondary-300/60"
69- @keydown.enter.exact.prevent =" handleSubmit({ })"
71+ @keydown.enter.exact =" (e) => {
72+ if (!sidebarContext.isMobile.value) {
73+ e.preventDefault()
74+ handleSubmit({ })
75+ }
76+ }"
7077 />
7178 <div class =" flex items-center justify-between" >
7279 <div class =" flex items-center" >
You can’t perform that action at this time.
0 commit comments