fix(chat): enable in-place subtask navigation in embedded session-chat iframe (#2138)

This commit is contained in:
Andrey Meshkov
2026-07-13 08:32:18 +03:00
committed by GitHub
parent 3362ebbfa3
commit 7888dd65b3
10 changed files with 316 additions and 26 deletions
+7 -3
View File
@@ -1,4 +1,5 @@
import type { MainTab } from '@/stores/useUIStore';
import { isEmbeddedSessionChat } from '@/components/layout/contextPanelEmbeddedChat';
import { ROUTE_PARAMS } from './types';
/**
@@ -100,7 +101,8 @@ function routeMatchesURL(state: AppRouteState): boolean {
/**
* Update the browser URL using pushState or replaceState.
* Does nothing if URL already matches or in VS Code context.
* Does nothing if URL already matches, in VS Code context, or in the
* embedded session-chat iframe (whose URL identity is fixed at mount).
*/
export function updateBrowserURL(
state: AppRouteState,
@@ -110,8 +112,10 @@ export function updateBrowserURL(
return;
}
// Skip URL updates in VS Code webview
if (isVSCodeContext()) {
// Both VS Code webviews and embedded session-chat iframes carry session
// identity outside the route params (`__VSCODE_CONFIG__` / `?ocPanel=…`).
// Rebuilding the URL here would strip those params, so skip entirely.
if (isVSCodeContext() || isEmbeddedSessionChat()) {
return;
}