Rename setups and add provider reauthentication
This commit is contained in:
1 parent
e9a0f1b9da
commit
7d9df5d572
36 files changed
+1866
-684
No files matched your search
@@ -1117,11 +1117,11 @@ fun SessionScreen(
|
||||
|
||||
// Only for the model picker, which a subagent does not have.
|
||||
if (!isSubagent) {
|
||||
LaunchedEffect(summary.setup, summary.provider) {
|
||||
LaunchedEffect(summary.machine, summary.provider) {
|
||||
val provider = runCatching {
|
||||
withContext(Dispatchers.IO) {
|
||||
fetchSetups(settings)
|
||||
.firstOrNull { it.id == summary.setup }
|
||||
fetchMachines(settings)
|
||||
.firstOrNull { it.id == summary.machine }
|
||||
?.providers
|
||||
?.firstOrNull { it.name == summary.provider }
|
||||
}
|
||||
@@ -1133,7 +1133,7 @@ fun SessionScreen(
|
||||
?.let {
|
||||
runCatching {
|
||||
withContext(Dispatchers.IO) {
|
||||
fetchProviderModels(settings, summary.setup, summary.provider)
|
||||
fetchProviderModels(settings, summary.machine, summary.provider)
|
||||
}
|
||||
}
|
||||
.getOrDefault(emptyList())
|
||||
@@ -1412,7 +1412,7 @@ fun SessionScreen(
|
||||
// to, and showing it twice means two things to keep in step -- they
|
||||
// disagreed for a moment on every model change.
|
||||
Text(
|
||||
"${summary.setupName} · ${summary.provider}",
|
||||
"${summary.machineName} · ${summary.provider}",
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
)
|
||||
@@ -2044,7 +2044,12 @@ fun SessionScreen(
|
||||
fullImage?.let { ref -> SessionImageViewer(settings, summary.id, ref) { fullImage = null } }
|
||||
if (usageOpen) {
|
||||
usageFeed?.let {
|
||||
UsageDialog(feed = it, session = summary, onDismiss = { usageOpen = false })
|
||||
UsageDialog(
|
||||
settings = settings,
|
||||
feed = it,
|
||||
session = summary,
|
||||
onDismiss = { usageOpen = false },
|
||||
)
|
||||
}
|
||||
}
|
||||
if (settingsOpen) {
|
||||
|
||||
Reference in new issue
Block a user