11import {
22 DesktopPreviewAnnotationThemeInputSchema ,
33 DesktopPreviewArtifactInputSchema ,
4- DesktopPreviewAutomationClickInputSchema ,
5- DesktopPreviewAutomationEvaluateInputSchema ,
6- DesktopPreviewAutomationPressInputSchema ,
7- DesktopPreviewAutomationScrollInputSchema ,
8- DesktopPreviewAutomationStatusSchema ,
9- DesktopPreviewAutomationTypeInputSchema ,
10- DesktopPreviewAutomationWaitForInputSchema ,
114 DesktopPreviewConfigInputSchema ,
125 DesktopPreviewNavigateInputSchema ,
136 DesktopPreviewRecordingArtifactSchema ,
@@ -16,6 +9,7 @@ import {
169 DesktopPreviewScreenshotArtifactSchema ,
1710 DesktopPreviewSetAudioMutedInputSchema ,
1811 DesktopPreviewSetColorSchemeInputSchema ,
12+ DesktopPreviewSetZoomFactorInputSchema ,
1913 BrowserImportResult ,
2014 BrowserImportSource ,
2115 DesktopPreviewClearDataInputSchema ,
@@ -24,7 +18,6 @@ import {
2418 DesktopPreviewTabInputSchema ,
2519 DesktopPreviewWebviewConfigSchema ,
2620 PreviewAnnotationSubmissionResultSchema ,
27- PreviewAutomationSnapshot ,
2821 DEFAULT_BROWSER_PROFILE_ID ,
2922 INCOGNITO_BROWSER_PROFILE_ID ,
3023} from "@t3tools/contracts" ;
@@ -68,9 +61,10 @@ export const createTab = DesktopIpc.makeIpcMethod({
6861 tabId,
6962 zoomFactor,
7063 colorScheme,
64+ serverTab,
7165 } ) {
7266 const manager = yield * PreviewManager . PreviewManager ;
73- yield * manager . createTab ( tabId , { zoomFactor, colorScheme } ) ;
67+ yield * manager . createTab ( tabId , { zoomFactor, colorScheme, serverTab } ) ;
7468 } ) ,
7569} ) ;
7670
@@ -157,6 +151,15 @@ export const hardReload = tabMethod(
157151 "desktop.ipc.preview.hardReload" ,
158152 ( manager , tabId ) => manager . hardReload ( tabId ) ,
159153) ;
154+ export const setZoomFactor = DesktopIpc . makeIpcMethod ( {
155+ channel : IpcChannels . PREVIEW_SET_ZOOM_FACTOR_CHANNEL ,
156+ payload : DesktopPreviewSetZoomFactorInputSchema ,
157+ result : Schema . Void ,
158+ handler : Effect . fn ( "desktop.ipc.preview.setZoomFactor" ) ( function * ( { tabId, zoomFactor } ) {
159+ const manager = yield * PreviewManager . PreviewManager ;
160+ yield * manager . setZoomFactor ( tabId , zoomFactor ) ;
161+ } ) ,
162+ } ) ;
160163export const setColorScheme = DesktopIpc . makeIpcMethod ( {
161164 channel : IpcChannels . PREVIEW_SET_COLOR_SCHEME_CHANNEL ,
162165 payload : DesktopPreviewSetColorSchemeInputSchema ,
@@ -392,86 +395,6 @@ export const copyArtifactToClipboard = DesktopIpc.makeIpcMethod({
392395 } ) ,
393396} ) ;
394397
395- export const automationStatus = DesktopIpc . makeIpcMethod ( {
396- channel : IpcChannels . PREVIEW_AUTOMATION_STATUS_CHANNEL ,
397- payload : DesktopPreviewTabInputSchema ,
398- result : DesktopPreviewAutomationStatusSchema ,
399- handler : Effect . fn ( "desktop.ipc.preview.automationStatus" ) ( function * ( { tabId } ) {
400- const manager = yield * PreviewManager . PreviewManager ;
401- return yield * manager . automationStatus ( tabId ) ;
402- } ) ,
403- } ) ;
404-
405- export const automationSnapshot = DesktopIpc . makeIpcMethod ( {
406- channel : IpcChannels . PREVIEW_AUTOMATION_SNAPSHOT_CHANNEL ,
407- payload : DesktopPreviewTabInputSchema ,
408- result : PreviewAutomationSnapshot ,
409- handler : Effect . fn ( "desktop.ipc.preview.automationSnapshot" ) ( function * ( { tabId } ) {
410- const manager = yield * PreviewManager . PreviewManager ;
411- return yield * manager . automationSnapshot ( tabId ) ;
412- } ) ,
413- } ) ;
414-
415- export const automationClick = DesktopIpc . makeIpcMethod ( {
416- channel : IpcChannels . PREVIEW_AUTOMATION_CLICK_CHANNEL ,
417- payload : DesktopPreviewAutomationClickInputSchema ,
418- result : Schema . Void ,
419- handler : Effect . fn ( "desktop.ipc.preview.automationClick" ) ( function * ( { tabId, input } ) {
420- const manager = yield * PreviewManager . PreviewManager ;
421- yield * manager . automationClick ( tabId , input ) ;
422- } ) ,
423- } ) ;
424-
425- export const automationType = DesktopIpc . makeIpcMethod ( {
426- channel : IpcChannels . PREVIEW_AUTOMATION_TYPE_CHANNEL ,
427- payload : DesktopPreviewAutomationTypeInputSchema ,
428- result : Schema . Void ,
429- handler : Effect . fn ( "desktop.ipc.preview.automationType" ) ( function * ( { tabId, input } ) {
430- const manager = yield * PreviewManager . PreviewManager ;
431- yield * manager . automationType ( tabId , input ) ;
432- } ) ,
433- } ) ;
434-
435- export const automationPress = DesktopIpc . makeIpcMethod ( {
436- channel : IpcChannels . PREVIEW_AUTOMATION_PRESS_CHANNEL ,
437- payload : DesktopPreviewAutomationPressInputSchema ,
438- result : Schema . Void ,
439- handler : Effect . fn ( "desktop.ipc.preview.automationPress" ) ( function * ( { tabId, input } ) {
440- const manager = yield * PreviewManager . PreviewManager ;
441- yield * manager . automationPress ( tabId , input ) ;
442- } ) ,
443- } ) ;
444-
445- export const automationScroll = DesktopIpc . makeIpcMethod ( {
446- channel : IpcChannels . PREVIEW_AUTOMATION_SCROLL_CHANNEL ,
447- payload : DesktopPreviewAutomationScrollInputSchema ,
448- result : Schema . Void ,
449- handler : Effect . fn ( "desktop.ipc.preview.automationScroll" ) ( function * ( { tabId, input } ) {
450- const manager = yield * PreviewManager . PreviewManager ;
451- yield * manager . automationScroll ( tabId , input ) ;
452- } ) ,
453- } ) ;
454-
455- export const automationEvaluate = DesktopIpc . makeIpcMethod ( {
456- channel : IpcChannels . PREVIEW_AUTOMATION_EVALUATE_CHANNEL ,
457- payload : DesktopPreviewAutomationEvaluateInputSchema ,
458- result : Schema . Unknown ,
459- handler : Effect . fn ( "desktop.ipc.preview.automationEvaluate" ) ( function * ( { tabId, input } ) {
460- const manager = yield * PreviewManager . PreviewManager ;
461- return yield * manager . automationEvaluate ( tabId , input ) ;
462- } ) ,
463- } ) ;
464-
465- export const automationWaitFor = DesktopIpc . makeIpcMethod ( {
466- channel : IpcChannels . PREVIEW_AUTOMATION_WAIT_FOR_CHANNEL ,
467- payload : DesktopPreviewAutomationWaitForInputSchema ,
468- result : Schema . Void ,
469- handler : Effect . fn ( "desktop.ipc.preview.automationWaitFor" ) ( function * ( { tabId, input } ) {
470- const manager = yield * PreviewManager . PreviewManager ;
471- yield * manager . automationWaitFor ( tabId , input ) ;
472- } ) ,
473- } ) ;
474-
475398export const saveRecording = DesktopIpc . makeIpcMethod ( {
476399 channel : IpcChannels . PREVIEW_RECORDING_SAVE_CHANNEL ,
477400 payload : DesktopPreviewRecordingSaveInputSchema ,
@@ -495,6 +418,7 @@ export const methods = [
495418 resetZoom ,
496419 hardReload ,
497420 setColorScheme ,
421+ setZoomFactor ,
498422 setAudioMuted ,
499423 openDevTools ,
500424 clearCookies ,
@@ -508,14 +432,6 @@ export const methods = [
508432 copyArtifactToClipboard ,
509433 openPictureInPicture ,
510434 closePictureInPicture ,
511- automationStatus ,
512- automationSnapshot ,
513- automationClick ,
514- automationType ,
515- automationPress ,
516- automationScroll ,
517- automationEvaluate ,
518- automationWaitFor ,
519435 startRecording ,
520436 stopRecording ,
521437 saveRecording ,
0 commit comments