mirror of
https://github.com/langgenius/dify.git
synced 2026-05-03 08:58:09 +08:00
Merge branch 'refs/heads/main' into feat/grouping-branching
This commit is contained in:
@ -222,11 +222,16 @@ const Chat: FC<ChatProps> = ({
|
||||
return () => container.removeEventListener('scroll', setUserScrolled)
|
||||
}, [])
|
||||
|
||||
// Reset user scroll state when a new chat starts (length <= 1)
|
||||
// Reset user scroll state when conversation changes or a new chat starts
|
||||
// Track the first message ID to detect conversation switches (fixes #29820)
|
||||
const prevFirstMessageIdRef = useRef<string | undefined>(undefined)
|
||||
useEffect(() => {
|
||||
if (chatList.length <= 1)
|
||||
const firstMessageId = chatList[0]?.id
|
||||
// Reset when: new chat (length <= 1) OR conversation switched (first message ID changed)
|
||||
if (chatList.length <= 1 || (firstMessageId && prevFirstMessageIdRef.current !== firstMessageId))
|
||||
userScrolledRef.current = false
|
||||
}, [chatList.length])
|
||||
prevFirstMessageIdRef.current = firstMessageId
|
||||
}, [chatList])
|
||||
|
||||
useEffect(() => {
|
||||
if (!sidebarCollapseState)
|
||||
|
||||
@ -116,7 +116,7 @@ const InviteModal = ({
|
||||
inputClassName='bg-transparent'
|
||||
onChange={setEmails}
|
||||
getLabel={(email, index, removeEmail) =>
|
||||
<div data-tag key={index} className={cn('bg-components-button-secondary-bg')}>
|
||||
<div data-tag key={index} className={cn('!bg-components-button-secondary-bg')}>
|
||||
<div data-tag-item>{email}</div>
|
||||
<span data-tag-handle onClick={() => removeEmail(index)}>
|
||||
×
|
||||
|
||||
@ -27,7 +27,7 @@ const EntryNodeContainer: FC<EntryNodeContainerProps> = ({
|
||||
|
||||
return (
|
||||
<div className="w-fit min-w-[242px] rounded-2xl bg-workflow-block-wrapper-bg-1 px-0 pb-0 pt-0.5">
|
||||
<div className="mb-0.5 flex items-center px-1.5 pt-0.5">
|
||||
<div className="mb-0.5 flex items-center px-2.5 pt-0.5">
|
||||
<span className="text-2xs font-semibold uppercase text-text-tertiary">
|
||||
{label}
|
||||
</span>
|
||||
|
||||
@ -31,7 +31,7 @@ export const extractReturnType = (code: string, language: CodeLanguage): OutputV
|
||||
if (returnIndex === -1)
|
||||
return {}
|
||||
|
||||
// return から始まる部分文字列を取得
|
||||
// Extract the substring starting with 'return'.
|
||||
const codeAfterReturn = codeWithoutComments.slice(returnIndex)
|
||||
|
||||
let bracketCount = 0
|
||||
|
||||
Reference in New Issue
Block a user