fix: scope Reset All button visibility to current tab's data

Show the button only when the active tab has data, preventing
the empty-list-with-button scenario on the Variables tab when
only artifacts exist.
This commit is contained in:
yyh
2026-02-05 11:43:54 +08:00
parent aad15a0777
commit eb87512122

View File

@ -37,7 +37,7 @@ const VariablesPanel: FC<{ onClose: () => void }> = ({ onClose }) => {
setCurrentFocusNodeId('')
}, [deleteAllInspectorVars, setCurrentFocusNodeId])
const hasData = !isVariablesEmpty || hasArtifacts
const hasData = resolvedTab === InspectTab.Variables ? !isVariablesEmpty : hasArtifacts
const headerActions = hasData
? (
<Button variant="ghost" size="small" onClick={handleClear}>