Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

refactor: remove isMobile prop from Chat and TryToAsk components (#29319)

yyh022cfbd1862c
diff --git a/web/app/components/base/chat/chat-with-history/chat-wrapper.tsx b/web/app/components/base/chat/chat-with-history/chat-wrapper.tsx
index 302fb9a3c79..94c80687ede 100644
--- a/web/app/components/base/chat/chat-with-history/chat-wrapper.tsx
+++ b/web/app/components/base/chat/chat-with-history/chat-wrapper.tsx
@@ -284,7 +284,6 @@ const ChatWrapper = () => {
themeBuilder={themeBuilder}
switchSibling={siblingMessageId => setTargetMessageId(siblingMessageId)}
inputDisabled={inputDisabled}
- isMobile={isMobile}
sidebarCollapseState={sidebarCollapseState}
questionIcon={
initUserVariables?.avatar_url
diff --git a/web/app/components/base/chat/chat/index.tsx b/web/app/components/base/chat/chat/index.tsx
index 51b5df4f32b..0e947f81379 100644
--- a/web/app/components/base/chat/chat/index.tsx
+++ b/web/app/components/base/chat/chat/index.tsx
@@ -71,7 +71,6 @@ export type ChatProps = {
onFeatureBarClick?: (state: boolean) => void
noSpacing?: boolean
inputDisabled?: boolean
- isMobile?: boolean
sidebarCollapseState?: boolean
}
@@ -110,7 +109,6 @@ const Chat: FC<ChatProps> = ({
onFeatureBarClick,
noSpacing,
inputDisabled,
- isMobile,
sidebarCollapseState,
}) => {
const { t } = useTranslation()
@@ -321,7 +319,6 @@ const Chat: FC<ChatProps> = ({
<TryToAsk
suggestedQuestions={suggestedQuestions}
onSend={onSend}
- isMobile={isMobile}
/>
)
}
diff --git a/web/app/components/base/chat/chat/try-to-ask.tsx b/web/app/components/base/chat/chat/try-to-ask.tsx
index 3fc690361e2..665f7b3b13c 100644
--- a/web/app/components/base/chat/chat/try-to-ask.tsx
+++ b/web/app/components/base/chat/chat/try-to-ask.tsx
@@ -8,12 +8,10 @@ import Divider from '@/app/components/base/divider'
type TryToAskProps = {
suggestedQuestions: string[]
onSend: OnSend
- isMobile?: boolean
}
const TryToAsk: FC<TryToAskProps> = ({
suggestedQuestions,
onSend,
- isMobile,
}) => {
const { t } = useTranslation()
diff --git a/web/app/components/base/chat/embedded-chatbot/chat-wrapper.tsx b/web/app/components/base/chat/embedded-chatbot/chat-wrapper.tsx
index 5fba104d354..b0a880d78f3 100644
--- a/web/app/components/base/chat/embedded-chatbot/chat-wrapper.tsx
+++ b/web/app/components/base/chat/embedded-chatbot/chat-wrapper.tsx
@@ -262,7 +262,6 @@ const ChatWrapper = () => {
themeBuilder={themeBuilder}
switchSibling={siblingMessageId => setTargetMessageId(siblingMessageId)}
inputDisabled={inputDisabled}
- isMobile={isMobile}
questionIcon={
initUserVariables?.avatar_url
? <Avatar