@@ -60,7 +60,8 @@ import {
6060} from './desktopExtensionGrants'
6161import { partitionForWorkspace , viewerBrowserManager } from './viewerBrowser'
6262import { viewerTerminalManager } from './viewerTerminal'
63- import { browserUseManager , type BrowserUseApprovalResponsePayload } from './browserUseManager'
63+ import { browserUseManager } from './browserUseManager'
64+ import type { BrowserUseApprovalResponsePayload } from '../shared/viewer/types'
6465import {
6566 checkChromeSetup ,
6667 installChromeNativeHost ,
@@ -79,11 +80,11 @@ import {
7980import type { QrUpdatePayload } from './qrWatcher'
8081import type {
8182 WorkspaceSetupRequest ,
82- WorkspaceSetupResult ,
8383 WorkspaceStatusPayload ,
8484 WorkspaceSetupModelListRequest ,
8585 WorkspaceSetupModelListResult
86- } from './workspaceSetup'
86+ } from '../shared/workspaceSetup'
87+ import type { WorkspaceSetupResult } from './workspaceSetup'
8788import { normalizeRemoteHosts , type RemoteHost , type RemoteStack } from '../shared/remoteServers'
8889import { translate , normalizeLocale , DEFAULT_LOCALE , type AppLocale } from '../shared/locales'
8990import { parseJsonObjectConfig } from '../shared/jsonConfig'
@@ -112,46 +113,22 @@ import { sendDesktopAppServerRequest } from './desktopRuntimeThreadTools'
112113import { resolveBundledBuiltInPluginRoot } from './ripgrepRuntime'
113114import type { WorkspaceProjectsPayload } from '../shared/workspaceProjects'
114115import type { AppServerRequestMethod } from '../shared/appServerBoundary'
116+ import type {
117+ ConnectionStatusPayload ,
118+ RetryConnectionRequest
119+ } from '../shared/connectionStatus'
115120
116121interface WindowVisibilityState {
117122 minimized : boolean
118123 visible : boolean
119124 focused : boolean
120125}
121126
122- export type ConnectionStatus = 'connecting' | 'connected' | 'disconnected' | 'error'
123-
124- export type ConnectionErrorType = 'binary-not-found' | 'handshake-timeout' | 'crash' | 'remote-config-invalid'
125-
126- export interface ConnectionStatusPayload {
127- status : ConnectionStatus
128- serverInfo ?: {
129- name : string
130- version : string
131- protocolVersion ?: string
132- }
133- capabilities ?: Record < string , unknown >
134- /** DashBoard URL when the server hosts it (initialize). */
135- dashboardUrl ?: string
136- errorMessage ?: string
137- errorType ?: ConnectionErrorType
138- binarySource ?: BinarySource
139- }
140-
141- export interface RetryConnectionRequest {
142- restartManaged ?: boolean
143- }
144-
145127export interface ResolvedBinaryRequest {
146128 binarySource ?: BinarySource
147129 binaryPath ?: string
148130}
149131
150- export interface ResolvedBinaryPayload {
151- source : BinarySource
152- path : string | null
153- }
154-
155132interface ModulesRescanSummaryPayload {
156133 addedModuleIds : string [ ]
157134 removedModuleIds : string [ ]
0 commit comments