This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| # Usage: ./opencode-setup.sh <vllm_base_url> | |
| # Example: ./opencode-setup.sh http://localhost:8000/v1 | |
| # | |
| # Optional env vars: | |
| # VLLM_API_KEY=your-key # optional; default is empty = no Authorization header | |
| # MODEL=exact/model/id # optional; auto-detected from /v1/models if omitted | |
| # AUTO_INSTALL_OPENCODE=1 # set to 0 to disable auto-install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apply plugin: 'com.android.application' | |
| android.applicationVariants.all { variant -> | |
| task "copyDependencies${variant.name.capitalize()}"() { | |
| outputs.upToDateWhen { false } | |
| doLast { | |
| println "Executing copyDependencies${variant.name.capitalize()}" | |
| variant.getCompileClasspath().each { fileDependency -> | |
| def sourcePath = fileDependency.absolutePath | |
| def destinationPath = project.projectDir.path + "/build/dependencies/${variant.name}/" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sealed class TabbedListState | |
| class InProgressState : TabbedListState() | |
| class FinishedState : TabbedListState() | |
| data class ErrorState(val errorMessage: String, | |
| val errorColor: Int) : TabbedListState() | |
| data class ListState(val listElements: List<Element>, | |
| val totalItems: Int, | |
| val currentTabId: Int, | |
| val tabs: List<TabElement>) : TabbedListState() | |
| data class OfflineState(val listElements: List<Element>) : TabbedListState() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| override fun onStart() { | |
| viewModel.tabbedListLiveData.observe(this, Observer { | |
| when (it) { | |
| is ErrorState -> { | |
| showProgress(false) | |
| showErrorView(it.errorMessage, it.errorColor) | |
| } | |
| is InProgressState -> showProgress(true) | |
| is OfflineState -> { |