Package-level declarations

Types

Link copied to clipboard
data class ExtraItemUi(val type: ExtraType, val key: String, val name: String, val alias: String?, val isApplied: Boolean, val value: String? = null)

Carries ExtraItemUi data through the SDAI presentation layer.

Link copied to clipboard
sealed interface ExtrasEffect : MviEffect

Defines the ExtrasEffect contract for the SDAI presentation layer.

Link copied to clipboard
sealed interface ExtrasIntent : MviIntent

Defines the ExtrasIntent contract for the SDAI presentation layer.

Link copied to clipboard
data class ExtrasState(val loading: Boolean = true, val source: ServerSource = ServerSource.AUTOMATIC1111, val error: ErrorState = ErrorState.None, val prompt: String = "", val negativePrompt: String = "", val type: ExtraType = ExtraType.Lora, val loras: List<ExtraItemUi> = emptyList()) : MviState

Carries ExtrasState data through the SDAI presentation layer.

Link copied to clipboard
class ExtrasViewModel(val dispatchersProvider: DispatchersProvider, val fetchAndGetLorasUseCase: FetchAndGetLorasUseCase, val fetchAndGetHyperNetworksUseCase: FetchAndGetHyperNetworksUseCase, val preferenceManager: PreferenceManager, prompt: String, negativePrompt: String, type: ExtraType, val onError: (Throwable) -> Unit = {}) : BaseMviViewModel<ExtrasState, ExtrasIntent, ExtrasEffect>

Coordinates ExtrasViewModel behavior in the SDAI presentation layer.

Functions

Link copied to clipboard

Renders the ExtrasEmptyState UI for the SDAI presentation layer.

Link copied to clipboard
private fun ExtrasItemComposable(modifier: Modifier = Modifier, item: ExtraItemUi, onLoraSelected: (ExtraItemUi) -> Unit)

Renders the ExtrasItemComposable UI for the SDAI presentation layer.

Link copied to clipboard
fun ExtrasScreen(prompt: String, negativePrompt: String, type: ExtraType, onNewPrompts: (String, String) -> Unit, onClose: () -> Unit)

Renders the ExtrasScreen UI for the SDAI presentation layer.

Link copied to clipboard
private fun ScreenContent(modifier: Modifier = Modifier, state: ExtrasState, processIntent: (ExtrasIntent) -> Unit = {})

Renders the ScreenContent UI for the SDAI presentation layer.