Package-level declarations

Types

Link copied to clipboard
data class EngineSelectionIntent(val value: String) : MviIntent

Carries EngineSelectionIntent data through the SDAI presentation layer.

Link copied to clipboard
data class EngineSelectionState(val loading: Boolean = true, val mode: ServerSource = ServerSource.AUTOMATIC1111, val sdModels: List<String> = emptyList(), val selectedSdModel: String = "", val swarmModels: List<String> = emptyList(), val selectedSwarmModel: String = "", val hfModels: List<String> = emptyList(), val selectedHfModel: String = "", val stEngines: List<String> = emptyList(), val selectedStEngine: String = "", val localAiModels: List<LocalAiModel> = emptyList(), val selectedLocalAiModelId: String = "") : MviState

Carries EngineSelectionState data through the SDAI presentation layer.

Link copied to clipboard
class EngineSelectionViewModel(val dispatchersProvider: DispatchersProvider, val fetchAndGetSwarmUiModelsUseCase: FetchAndGetSwarmUiModelsUseCase, val observeLocalOnnxModelsUseCase: ObserveLocalOnnxModelsUseCase, val fetchAndGetStabilityAiEnginesUseCase: FetchAndGetStabilityAiEnginesUseCase, val getHuggingFaceModelsUseCase: FetchHuggingFaceModelsUseCase, val preferenceManager: PreferenceManager, val getConfigurationUseCase: GetConfigurationUseCase, val selectStableDiffusionModelUseCase: SelectStableDiffusionModelUseCase, val getStableDiffusionModelsUseCase: GetStableDiffusionModelsUseCase, val onError: (Throwable) -> Unit = {}) : BaseMviViewModel<EngineSelectionState, EngineSelectionIntent, EmptyEffect>

Coordinates EngineSelectionViewModel behavior in the SDAI presentation layer.

Link copied to clipboard
private data class RemoteOptions(val config: Configuration, val sdModels: List<Pair<StableDiffusionModel, Boolean>> = emptyList(), val swarmModels: List<SwarmUiModel> = emptyList(), val hfModels: List<HuggingFaceModel> = emptyList(), val stEngines: List<StabilityAiEngine> = emptyList())

Carries RemoteOptions data through the SDAI presentation layer.

Properties

Link copied to clipboard

Exposes the REMOTE_OPTIONS_TIMEOUT_MILLIS value used by the SDAI presentation layer.

Functions

Link copied to clipboard
private fun <T : Any> DropdownTextField(modifier: Modifier = Modifier, loading: Boolean = false, label: String, value: T?, items: List<T> = emptyList(), onItemSelected: (T) -> Unit = {}, displayDelegate: (T) -> String = { it.toString() })

Renders the DropdownTextField UI for the SDAI presentation layer.

Link copied to clipboard
fun EngineSelectionComponent(modifier: Modifier = Modifier)

Renders the EngineSelectionComponent UI for the SDAI presentation layer.

Link copied to clipboard
fun EngineSelectionContent(state: EngineSelectionState, processIntent: (EngineSelectionIntent) -> Unit, modifier: Modifier = Modifier)

Renders the EngineSelectionContent UI for the SDAI presentation layer.

Link copied to clipboard

Executes the hasA1111Endpoint step in the SDAI presentation layer.

Link copied to clipboard

Executes the hasSwarmEndpoint step in the SDAI presentation layer.

Link copied to clipboard

Executes the isMobileRemoteEndpoint step in the SDAI presentation layer.

Link copied to clipboard

Executes the safeHuggingFaceModelAlias step in the SDAI presentation layer.