package cc.unitmesh.devins.ui.compose.agent.codereview import androidx.compose.foundation.layout.* import androidx.compose.material3.* import androidx.compose.runtime.* import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp import androidx.compose.ui.window.Dialog import androidx.compose.ui.window.DialogProperties import cc.unitmesh.devins.ui.compose.agent.FileViewerPanelWrapper /** * iOS implementation of file viewer dialog * Uses Dialog with FileViewerPanelWrapper * Note: Keyboard shortcuts may not work on iOS due to touch interface */ @Composable actual fun FileViewerDialog( filePath: String, onClose: () -> Unit, startLine: Int?, endLine: Int? ) { Dialog( onDismissRequest = onClose, properties = DialogProperties( dismissOnBackPress = true, dismissOnClickOutside = false, usePlatformDefaultWidth = false ) ) { Surface( modifier = Modifier .fillMaxWidth(0.9f) .fillMaxHeight(0.9f), shape = MaterialTheme.shapes.large, color = MaterialTheme.colorScheme.surface, tonalElevation = 6.dp ) { FileViewerPanelWrapper( filePath = filePath, onClose = onClose, modifier = Modifier.fillMaxSize() ) } } }