mirror of
https://github.com/langgenius/dify.git
synced 2026-02-09 15:10:13 -05:00
Merge remote-tracking branch 'origin/feat/support-agent-sandbox' into pre-align-hitl-frontend
This commit is contained in:
@@ -23,6 +23,7 @@ const FileTabs = () => {
|
||||
const { data: nodeMap } = useSkillAssetNodeMap()
|
||||
|
||||
const isStartTabActive = activeTabId === START_TAB_ID
|
||||
const isStartTabOnly = openTabIds.length === 0
|
||||
|
||||
const handleStartTabClick = useCallback(() => {
|
||||
storeApi.getState().activateTab(START_TAB_ID)
|
||||
@@ -69,11 +70,15 @@ const FileTabs = () => {
|
||||
<>
|
||||
<div
|
||||
className={cn(
|
||||
'flex items-center overflow-hidden rounded-t-lg border-b border-components-panel-border-subtle bg-components-panel-bg-alt',
|
||||
'flex items-center overflow-hidden rounded-t-lg',
|
||||
isStartTabOnly
|
||||
? 'bg-components-panel-bg'
|
||||
: 'border-b border-components-panel-border-subtle bg-components-panel-bg-alt',
|
||||
)}
|
||||
>
|
||||
<StartTabItem
|
||||
isActive={isStartTabActive}
|
||||
isOnly={isStartTabOnly}
|
||||
onClick={handleStartTabClick}
|
||||
/>
|
||||
{openTabIds.map((fileId) => {
|
||||
|
||||
@@ -8,6 +8,7 @@ const createProps = (overrides: Partial<StartTabItemProps> = {}) => {
|
||||
const onClick = vi.fn()
|
||||
const props: StartTabItemProps = {
|
||||
isActive: false,
|
||||
isOnly: false,
|
||||
onClick,
|
||||
...overrides,
|
||||
}
|
||||
|
||||
@@ -7,11 +7,13 @@ import { cn } from '@/utils/classnames'
|
||||
|
||||
type StartTabItemProps = {
|
||||
isActive: boolean
|
||||
isOnly: boolean
|
||||
onClick: () => void
|
||||
}
|
||||
|
||||
const StartTabItem = ({
|
||||
isActive,
|
||||
isOnly,
|
||||
onClick,
|
||||
}: StartTabItemProps) => {
|
||||
const { t } = useTranslation('workflow')
|
||||
@@ -19,7 +21,8 @@ const StartTabItem = ({
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
'relative flex shrink-0 items-center border-r border-components-panel-border-subtle',
|
||||
'relative flex shrink-0 items-center',
|
||||
!isOnly && 'border-r border-components-panel-border-subtle',
|
||||
isActive ? 'bg-components-panel-bg' : 'bg-transparent hover:bg-state-base-hover',
|
||||
)}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user