Skip to content

Commit f430445

Browse files
committed
fix(browser-session): preserve manual step selection on resume; stop launch auto-nav; open exact step from globe click
1 parent 99069c0 commit f430445

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

webview-ui/src/components/chat/BrowserActionRow.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,11 @@ const BrowserActionRow = memo(({ message, nextMessage, actionIndex, totalActions
183183
const isLaunchAction = browserAction?.action === "launch"
184184

185185
if (isLaunchAction) {
186-
// Launch action: navigate to step 0 (the launch)
186+
// Launch action: show panel but do NOT force navigation.
187+
// This preserves the user's manually selected step; BrowserSessionRow will only auto-advance
188+
// when the user is already on the most recent step.
187189
vscode.postMessage({
188190
type: "showBrowserSessionPanelAtStep",
189-
stepIndex: 0,
190191
isLaunchAction: true,
191192
})
192193
hasHandledAutoOpenRef.current = true
@@ -217,7 +218,7 @@ const BrowserActionRow = memo(({ message, nextMessage, actionIndex, totalActions
217218
style={headerStyle}
218219
className="cursor-pointer"
219220
onClick={() => {
220-
const idx = typeof actionIndex === "number" ? Math.max(0, actionIndex - 1) : 0
221+
const idx = typeof actionIndex === "number" ? actionIndex : 0
221222
vscode.postMessage({ type: "showBrowserSessionPanelAtStep", stepIndex: idx, forceShow: true })
222223
}}>
223224
<span

0 commit comments

Comments
 (0)