pkg: restructure `data`'s packages
This commit is contained in:
parent
7c2e24b4fe
commit
33d1e24ac4
|
|
@ -1,13 +1,13 @@
|
|||
package com.example.llama.data.local
|
||||
package com.example.llama.data.db
|
||||
|
||||
import android.content.Context
|
||||
import androidx.room.Database
|
||||
import androidx.room.Room
|
||||
import androidx.room.RoomDatabase
|
||||
import com.example.llama.data.local.dao.ModelDao
|
||||
import com.example.llama.data.local.dao.SystemPromptDao
|
||||
import com.example.llama.data.local.entity.ModelEntity
|
||||
import com.example.llama.data.local.entity.SystemPromptEntity
|
||||
import com.example.llama.data.db.dao.ModelDao
|
||||
import com.example.llama.data.db.dao.SystemPromptDao
|
||||
import com.example.llama.data.db.entity.ModelEntity
|
||||
import com.example.llama.data.db.entity.SystemPromptEntity
|
||||
import javax.inject.Singleton
|
||||
|
||||
/**
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.data.local.converter
|
||||
package com.example.llama.data.db.converter
|
||||
|
||||
import androidx.room.TypeConverter
|
||||
import com.example.llama.data.model.GgufMetadata
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
package com.example.llama.data.local.dao
|
||||
package com.example.llama.data.db.dao
|
||||
|
||||
import androidx.room.Dao
|
||||
import androidx.room.Delete
|
||||
import androidx.room.Insert
|
||||
import androidx.room.OnConflictStrategy
|
||||
import androidx.room.Query
|
||||
import com.example.llama.data.local.entity.ModelEntity
|
||||
import com.example.llama.data.db.entity.ModelEntity
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
||||
@Dao
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
package com.example.llama.data.local.dao
|
||||
package com.example.llama.data.db.dao
|
||||
|
||||
import androidx.room.Dao
|
||||
import androidx.room.Delete
|
||||
import androidx.room.Insert
|
||||
import androidx.room.OnConflictStrategy
|
||||
import androidx.room.Query
|
||||
import com.example.llama.data.local.entity.SystemPromptEntity
|
||||
import com.example.llama.data.db.entity.SystemPromptEntity
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
||||
/**
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
package com.example.llama.data.local.entity
|
||||
package com.example.llama.data.db.entity
|
||||
|
||||
import androidx.room.Entity
|
||||
import androidx.room.PrimaryKey
|
||||
import androidx.room.TypeConverters
|
||||
import com.example.llama.data.local.converter.GgufMetadataConverters
|
||||
import com.example.llama.data.db.converter.GgufMetadataConverters
|
||||
import com.example.llama.data.model.ModelInfo
|
||||
import com.example.llama.data.model.GgufMetadata
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.data.local.entity
|
||||
package com.example.llama.data.db.entity
|
||||
|
||||
import androidx.room.Entity
|
||||
import androidx.room.PrimaryKey
|
||||
|
|
@ -1,19 +1,19 @@
|
|||
package com.example.llama.data.repository
|
||||
package com.example.llama.data.repo
|
||||
|
||||
import android.content.Context
|
||||
import android.llama.cpp.gguf.GgufMetadataReader
|
||||
import android.net.Uri
|
||||
import android.os.StatFs
|
||||
import android.util.Log
|
||||
import com.example.llama.data.local.dao.ModelDao
|
||||
import com.example.llama.data.local.entity.ModelEntity
|
||||
import com.example.llama.data.db.dao.ModelDao
|
||||
import com.example.llama.data.db.entity.ModelEntity
|
||||
import com.example.llama.data.model.GgufMetadata
|
||||
import com.example.llama.data.model.ModelInfo
|
||||
import com.example.llama.data.remote.HuggingFaceDownloadInfo
|
||||
import com.example.llama.data.remote.HuggingFaceModel
|
||||
import com.example.llama.data.remote.HuggingFaceModelDetails
|
||||
import com.example.llama.data.remote.HuggingFaceRemoteDataSource
|
||||
import com.example.llama.data.repository.ModelRepository.ImportProgressTracker
|
||||
import com.example.llama.data.source.remote.HuggingFaceDownloadInfo
|
||||
import com.example.llama.data.source.remote.HuggingFaceModel
|
||||
import com.example.llama.data.source.remote.HuggingFaceModelDetails
|
||||
import com.example.llama.data.source.remote.HuggingFaceRemoteDataSource
|
||||
import com.example.llama.data.repo.ModelRepository.ImportProgressTracker
|
||||
import com.example.llama.monitoring.StorageMetrics
|
||||
import com.example.llama.util.copyWithBuffer
|
||||
import com.example.llama.util.copyWithChannels
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package com.example.llama.data.repository
|
||||
package com.example.llama.data.repo
|
||||
|
||||
import com.example.llama.data.local.dao.SystemPromptDao
|
||||
import com.example.llama.data.local.entity.SystemPromptEntity
|
||||
import com.example.llama.data.db.dao.SystemPromptDao
|
||||
import com.example.llama.data.db.entity.SystemPromptEntity
|
||||
import com.example.llama.data.model.SystemPrompt
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.first
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.data.preferences
|
||||
package com.example.llama.data.source.prefs
|
||||
|
||||
import android.content.Context
|
||||
import androidx.datastore.core.DataStore
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.data.remote
|
||||
package com.example.llama.data.source.remote
|
||||
|
||||
import com.google.gson.JsonDeserializationContext
|
||||
import com.google.gson.JsonDeserializer
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.data.remote
|
||||
package com.example.llama.data.source.remote
|
||||
|
||||
import okhttp3.ResponseBody
|
||||
import retrofit2.Response
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.data.remote
|
||||
package com.example.llama.data.source.remote
|
||||
|
||||
import android.net.Uri
|
||||
import androidx.core.net.toUri
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.data.remote
|
||||
package com.example.llama.data.source.remote
|
||||
|
||||
import java.util.Date
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.llama.data.remote
|
||||
package com.example.llama.data.source.remote
|
||||
|
||||
import android.app.DownloadManager
|
||||
import android.content.Context
|
||||
|
|
@ -5,15 +5,15 @@ import android.llama.cpp.InferenceEngine
|
|||
import android.llama.cpp.KleidiLlama
|
||||
import android.llama.cpp.TierDetection
|
||||
import android.llama.cpp.gguf.GgufMetadataReader
|
||||
import com.example.llama.data.local.AppDatabase
|
||||
import com.example.llama.data.remote.GatedTypeAdapter
|
||||
import com.example.llama.data.remote.HuggingFaceApiService
|
||||
import com.example.llama.data.remote.HuggingFaceRemoteDataSource
|
||||
import com.example.llama.data.remote.HuggingFaceRemoteDataSourceImpl
|
||||
import com.example.llama.data.repository.ModelRepository
|
||||
import com.example.llama.data.repository.ModelRepositoryImpl
|
||||
import com.example.llama.data.repository.SystemPromptRepository
|
||||
import com.example.llama.data.repository.SystemPromptRepositoryImpl
|
||||
import com.example.llama.data.db.AppDatabase
|
||||
import com.example.llama.data.source.remote.GatedTypeAdapter
|
||||
import com.example.llama.data.source.remote.HuggingFaceApiService
|
||||
import com.example.llama.data.source.remote.HuggingFaceRemoteDataSource
|
||||
import com.example.llama.data.source.remote.HuggingFaceRemoteDataSourceImpl
|
||||
import com.example.llama.data.repo.ModelRepository
|
||||
import com.example.llama.data.repo.ModelRepositoryImpl
|
||||
import com.example.llama.data.repo.SystemPromptRepository
|
||||
import com.example.llama.data.repo.SystemPromptRepositoryImpl
|
||||
import com.example.llama.engine.BenchmarkService
|
||||
import com.example.llama.engine.ConversationService
|
||||
import com.example.llama.engine.InferenceService
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ import androidx.compose.ui.text.style.TextOverflow
|
|||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.window.DialogProperties
|
||||
import com.example.llama.data.model.ModelInfo
|
||||
import com.example.llama.data.remote.HuggingFaceModel
|
||||
import com.example.llama.data.source.remote.HuggingFaceModel
|
||||
import com.example.llama.ui.components.InfoView
|
||||
import com.example.llama.ui.components.ModelCardFullExpandable
|
||||
import com.example.llama.ui.scaffold.ScaffoldEvent
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ import androidx.compose.ui.platform.LocalContext
|
|||
import androidx.compose.ui.unit.dp
|
||||
import androidx.core.net.toUri
|
||||
import com.example.llama.APP_NAME
|
||||
import com.example.llama.data.preferences.UserPreferences
|
||||
import com.example.llama.data.source.prefs.UserPreferences
|
||||
import com.example.llama.ui.components.ArmFeaturesVisualizer
|
||||
import com.example.llama.viewmodel.SettingsViewModel
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import androidx.compose.ui.graphics.toArgb
|
|||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.platform.LocalView
|
||||
import androidx.core.view.WindowCompat
|
||||
import com.example.llama.data.preferences.UserPreferences
|
||||
import com.example.llama.data.source.prefs.UserPreferences
|
||||
import com.google.accompanist.systemuicontroller.rememberSystemUiController
|
||||
|
||||
// TODO-han.yin: support more / custom color palettes?
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ package com.example.llama.viewmodel
|
|||
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.example.llama.data.model.SystemPrompt
|
||||
import com.example.llama.data.repository.ModelRepository
|
||||
import com.example.llama.data.repository.SystemPromptRepository
|
||||
import com.example.llama.data.repo.ModelRepository
|
||||
import com.example.llama.data.repo.SystemPromptRepository
|
||||
import com.example.llama.engine.ModelLoadingMetrics
|
||||
import com.example.llama.engine.ModelLoadingService
|
||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import com.example.llama.data.model.ModelSortOrder
|
|||
import com.example.llama.data.model.filterBy
|
||||
import com.example.llama.data.model.queryBy
|
||||
import com.example.llama.data.model.sortByOrder
|
||||
import com.example.llama.data.repository.ModelRepository
|
||||
import com.example.llama.data.repo.ModelRepository
|
||||
import com.example.llama.engine.InferenceService
|
||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||
import kotlinx.coroutines.FlowPreview
|
||||
|
|
|
|||
|
|
@ -15,10 +15,10 @@ import com.example.llama.data.model.ModelInfo
|
|||
import com.example.llama.data.model.ModelSortOrder
|
||||
import com.example.llama.data.model.filterBy
|
||||
import com.example.llama.data.model.sortByOrder
|
||||
import com.example.llama.data.remote.HuggingFaceDownloadInfo
|
||||
import com.example.llama.data.remote.HuggingFaceModel
|
||||
import com.example.llama.data.repository.InsufficientStorageException
|
||||
import com.example.llama.data.repository.ModelRepository
|
||||
import com.example.llama.data.source.remote.HuggingFaceDownloadInfo
|
||||
import com.example.llama.data.source.remote.HuggingFaceModel
|
||||
import com.example.llama.data.repo.InsufficientStorageException
|
||||
import com.example.llama.data.repo.ModelRepository
|
||||
import com.example.llama.util.formatFileByteSize
|
||||
import com.example.llama.util.getFileNameFromUri
|
||||
import com.example.llama.util.getFileSizeFromUri
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import android.llama.cpp.LLamaTier
|
|||
import android.llama.cpp.TierDetection
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.example.llama.data.preferences.UserPreferences
|
||||
import com.example.llama.data.repository.ModelRepository
|
||||
import com.example.llama.data.source.prefs.UserPreferences
|
||||
import com.example.llama.data.repo.ModelRepository
|
||||
import com.example.llama.monitoring.BatteryMetrics
|
||||
import com.example.llama.monitoring.MemoryMetrics
|
||||
import com.example.llama.monitoring.PerformanceMonitor
|
||||
|
|
|
|||
Loading…
Reference in New Issue