Package-level declarations

Types

Link copied to clipboard
sealed interface InputHistoryIntent : MviIntent

Defines the InputHistoryIntent contract for the SDAI presentation layer.

Link copied to clipboard
data class InputHistoryItemUi(val generationResult: AiGenerationResult, val image: ImageBitmap? = null)

Carries InputHistoryItemUi data through the SDAI presentation layer.

Link copied to clipboard
data class InputHistoryState(val loading: Boolean = true, val loadingNextPage: Boolean = false, val items: List<InputHistoryItemUi> = emptyList(), val nextPage: Int = 0, val canLoadMore: Boolean = true, val error: String? = null) : MviState

Carries InputHistoryState data through the SDAI presentation layer.

Link copied to clipboard
class InputHistoryViewModel(val dispatchersProvider: DispatchersProvider, val getGenerationResultPagedUseCase: GetGenerationResultPagedUseCase, val onError: (Throwable) -> Unit = {}) : BaseMviViewModel<InputHistoryState, InputHistoryIntent, EmptyEffect>

Coordinates InputHistoryViewModel behavior in the SDAI presentation layer.

Properties

Link copied to clipboard
private const val INPUT_HISTORY_FIRST_PAGE: Int = 0

Exposes the INPUT_HISTORY_FIRST_PAGE value used by the SDAI presentation layer.

Link copied to clipboard
private const val INPUT_HISTORY_PAGE_SIZE: Int = 1000

Exposes the INPUT_HISTORY_PAGE_SIZE value used by the SDAI presentation layer.

Functions

Link copied to clipboard
fun InputHistoryBottomSheet(onClose: () -> Unit, onGenerationSelected: (AiGenerationResult) -> Unit, modifier: Modifier = Modifier)

Renders the InputHistoryBottomSheet UI for the SDAI presentation layer.

Link copied to clipboard
private fun InputHistoryError(message: String, processIntent: (InputHistoryIntent) -> Unit)

Renders the InputHistoryError UI for the SDAI presentation layer.

Link copied to clipboard
private fun InputHistoryItem(modifier: Modifier = Modifier, item: InputHistoryItemUi, onClick: (InputHistoryItemUi) -> Unit = {})

Renders the InputHistoryItem UI for the SDAI presentation layer.

Link copied to clipboard
fun InputHistoryScreen(modifier: Modifier = Modifier, onGenerationSelected: (AiGenerationResult) -> Unit = {})

Renders the InputHistoryScreen UI for the SDAI presentation layer.

Link copied to clipboard
private fun ScreenContent(modifier: Modifier = Modifier, state: InputHistoryState, processIntent: (InputHistoryIntent) -> Unit = {}, onGenerationSelected: (AiGenerationResult) -> Unit = {})

Renders the ScreenContent UI for the SDAI presentation layer.