The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 23:30 UTC
fix(web): project actions auto-open Preview in web clients (#34048)
Julius Marminge committed
Nov 11, 2026 at 01:06 UTC
1bdf470328bceb4cf41c734a91fcc8a443880aa0
1 file changed
+6
-2
apps/web/src/components/chat/useChatTerminalActions.ts
+6
-2
@@ -28,8 +28,8 @@ import {
28
type RightPanelSurface,
29
useRightPanelStore,
30
} from "../../rightPanelStore";
31
-import { isPreviewSupportedInRuntime } from "../../previewStateStore";
31
import { openUrlInPreview } from "../../browser/openFileInPreview";
32
+import { isPreviewAvailableFor } from "../../browser/previewRuntime";
33
import { resolveDiscoveredServerUrl } from "../../browser/browserTargetResolver";
34
import { stackedThreadToast, toastManager } from "../ui/toast";
35
import { confirmTerminalClose } from "../../lib/terminalCloseConfirm";
@@ -290,7 +290,11 @@ export function useChatTerminalActions(input: ChatTerminalActionsInput) {
290
}
291
return;
292
}
293
- if (script.autoOpenPreview && script.previewUrl && isPreviewSupportedInRuntime()) {
293
+ if (
294
+ script.autoOpenPreview &&
295
+ script.previewUrl &&
296
+ isPreviewAvailableFor(activeThreadRef.environmentId)
297
+ ) {
298
const previewResult = await openUrlInPreview({
299
threadRef: activeThreadRef,
300
url: resolveDiscoveredServerUrl(activeThreadRef.environmentId, script.previewUrl),