Merge remote-tracking branch 'origin/feat/support-agent-sandbox' into pre-align-hitl-frontend

This commit is contained in:
yyh
2026-02-08 14:03:29 +08:00
3 changed files with 11 additions and 2 deletions

View File

@@ -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) => {

View File

@@ -8,6 +8,7 @@ const createProps = (overrides: Partial<StartTabItemProps> = {}) => {
const onClick = vi.fn()
const props: StartTabItemProps = {
isActive: false,
isOnly: false,
onClick,
...overrides,
}

View File

@@ -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',
)}
>