Skip to content

Commit 91b6053

Browse files
authored
fix(tarko): move StrategySwitch after ScreenshotDisplay to prevent flicker (#1321)
1 parent 5c38936 commit 91b6053

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

multimodal/tarko/agent-web-ui/src/standalone/workspace/renderers/BrowserControlRenderer.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,6 @@ export const BrowserControlRenderer: React.FC<BrowserControlRendererProps> = ({
6565

6666
return (
6767
<div className="space-y-3">
68-
{/* Strategy Switch Controls */}
69-
{guiAgentConfig.enableScreenshotRenderStrategySwitch && (
70-
<StrategySwitch currentStrategy={currentStrategy} onStrategyChange={setCurrentStrategy} />
71-
)}
72-
7368
{/* Screenshot section */}
7469
<ScreenshotDisplay
7570
strategy={currentStrategy}
@@ -84,6 +79,11 @@ export const BrowserControlRenderer: React.FC<BrowserControlRendererProps> = ({
8479
action={action}
8580
/>
8681

82+
{/* Strategy Switch Controls */}
83+
{guiAgentConfig.enableScreenshotRenderStrategySwitch && (
84+
<StrategySwitch currentStrategy={currentStrategy} onStrategyChange={setCurrentStrategy} />
85+
)}
86+
8787
{/* Visual operation details card */}
8888
{guiAgentConfig.renderGUIAction && (
8989
<OperationDetailsCard thought={thought} step={step} action={action} status={status} />

multimodal/tarko/agent-web-ui/src/standalone/workspace/renderers/browser-control/StrategySwitch.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export const StrategySwitch: React.FC<StrategySwitchProps> = ({
3737
const tooltipProps = getTooltipProps('bottom');
3838

3939
return (
40-
<div className="flex items-center justify-center mt-4">
40+
<div className="flex items-center justify-center">
4141
<div className="inline-flex rounded-md" role="group">
4242
{strategies.map((strategy, index) => {
4343
const config = strategyConfig[strategy];

0 commit comments

Comments
 (0)