Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions wework/src/lib/device-selection.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Control run for the Wework desktop cloud E2E. No behavior change.
import { isWeWorkExecutorVersionCompatible } from './device-capabilities'

export interface SelectableDevice {
Expand All @@ -22,9 +23,11 @@ export function isCloudDevice(device: SelectableDevice): boolean {
}

export function isWeWorkSelectableStandaloneDevice(device: SelectableDevice): boolean {
return isClaudeCodeDevice(device) &&
return (
isClaudeCodeDevice(device) &&
isOnlineDevice(device) &&
isWeWorkExecutorVersionCompatible(device.executor_version)
)
}

export function sortStandaloneDevices<T extends SelectableDevice>(devices: T[]): T[] {
Expand All @@ -47,7 +50,7 @@ export function sortStandaloneDevices<T extends SelectableDevice>(devices: T[]):

export function getPreferredStandaloneDeviceId(
devices: SelectableDevice[],
currentDeviceId?: string | null,
currentDeviceId?: string | null
): string | null {
const currentDevice = currentDeviceId
? devices.find(device => device.device_id === currentDeviceId)
Expand Down
Loading