惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

L
LangChain Blog
有赞技术团队
有赞技术团队
博客园_首页
IT之家
IT之家
爱范儿
爱范儿
量子位
小众软件
小众软件
Jina AI
Jina AI
WordPress大学
WordPress大学
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 聂微东
The Cloudflare Blog
博客园 - 司徒正美
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
V2EX
大猫的无限游戏
大猫的无限游戏
月光博客
月光博客
雷峰网
雷峰网
V
Visual Studio Blog
博客园 - Franky
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
美团技术团队
Last Week in AI
Last Week in AI
S
SegmentFault 最新的问题

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(android): expand v2 model catalog groups · openclaw/o...
obviyus · 2026-05-20 · via Recent Commits to openclaw:main

@@ -42,6 +42,9 @@ import androidx.compose.runtime.Composable

4242

import androidx.compose.runtime.LaunchedEffect

4343

import androidx.compose.runtime.collectAsState

4444

import androidx.compose.runtime.getValue

45+

import androidx.compose.runtime.mutableStateOf

46+

import androidx.compose.runtime.saveable.rememberSaveable

47+

import androidx.compose.runtime.setValue

4548

import androidx.compose.ui.Alignment

4649

import androidx.compose.ui.Modifier

4750

import androidx.compose.ui.draw.clip

@@ -66,6 +69,7 @@ internal fun V2ProvidersModelsScreen(

6669

val providerRows = providerRows(providers = providers, models = models)

6770

val modelGroups = sortedModelGroups(models)

6871

val setupRows = providerSetupRows(providerRows)

72+

var expandedModelProviders by rememberSaveable { mutableStateOf(emptyList<String>()) }

69737074

LaunchedEffect(isConnected) {

7175

if (isConnected) {

@@ -149,7 +153,20 @@ internal fun V2ProvidersModelsScreen(

149153

}

150154

} else {

151155

items(modelGroups, key = { it.first }) { entry ->

152-

V2ModelGroup(provider = entry.first, models = entry.second)

156+

val expanded = expandedModelProviders.contains(entry.first)

157+

V2ModelGroup(

158+

provider = entry.first,

159+

models = entry.second,

160+

expanded = expanded,

161+

onToggle = {

162+

expandedModelProviders =

163+

if (expanded) {

164+

expandedModelProviders - entry.first

165+

} else {

166+

expandedModelProviders + entry.first

167+

}

168+

},

169+

)

153170

}

154171

}

155172

}

@@ -418,24 +435,33 @@ private fun V2ModelCatalogEmpty(

418435

private fun V2ModelGroup(

419436

provider: String,

420437

models: List<GatewayModelSummary>,

438+

expanded: Boolean,

439+

onToggle: () -> Unit,

421440

) {

422441

ClawPanel(contentPadding = PaddingValues(horizontal = 0.dp, vertical = 0.dp)) {

423442

Column {

424-

Row(modifier = Modifier.fillMaxWidth().heightIn(min = 52.dp).padding(horizontal = 10.dp, vertical = 6.dp), verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(10.dp)) {

425-

V2ProviderBadge(text = providerDisplayName(provider))

426-

Text(text = providerDisplayName(provider), style = ClawTheme.type.body, color = ClawTheme.colors.text, modifier = Modifier.weight(1f), maxLines = 1)

427-

V2ProviderMiniTag(text = "${models.size} models")

428-

Icon(imageVector = Icons.Default.KeyboardArrowDown, contentDescription = null, modifier = Modifier.size(13.dp), tint = ClawTheme.colors.textMuted)

443+

Surface(onClick = onToggle, color = Color.Transparent, contentColor = ClawTheme.colors.text) {

444+

Row(modifier = Modifier.fillMaxWidth().heightIn(min = 52.dp).padding(horizontal = 10.dp, vertical = 6.dp), verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(10.dp)) {

445+

V2ProviderBadge(text = providerDisplayName(provider))

446+

Text(text = providerDisplayName(provider), style = ClawTheme.type.body, color = ClawTheme.colors.text, modifier = Modifier.weight(1f), maxLines = 1)

447+

V2ProviderMiniTag(text = "${models.size} models")

448+

Icon(imageVector = if (expanded) Icons.Default.KeyboardArrowDown else Icons.AutoMirrored.Filled.KeyboardArrowRight, contentDescription = if (expanded) "Collapse ${providerDisplayName(provider)} models" else "Expand ${providerDisplayName(provider)} models", modifier = Modifier.size(14.dp), tint = ClawTheme.colors.textMuted)

449+

}

429450

}

430451

HorizontalDivider(color = ClawTheme.colors.border, thickness = 1.dp)

431-

models.take(3).forEach { model ->

452+

val visibleModels = if (expanded) models else models.take(3)

453+

visibleModels.forEachIndexed { index, model ->

432454

V2ModelRow(model)

433-

HorizontalDivider(color = ClawTheme.colors.border, thickness = 1.dp)

455+

if (index != visibleModels.lastIndex || models.size > visibleModels.size) {

456+

HorizontalDivider(color = ClawTheme.colors.border, thickness = 1.dp)

457+

}

434458

}

435-

if (models.size > 3) {

436-

Row(modifier = Modifier.fillMaxWidth().padding(horizontal = 10.dp, vertical = 6.dp), verticalAlignment = Alignment.CenterVertically) {

437-

Text(text = "View all models", style = ClawTheme.type.caption.copy(fontSize = 12.5.sp, lineHeight = 16.sp), color = ClawTheme.colors.textMuted, modifier = Modifier.weight(1f))

438-

Icon(imageVector = Icons.AutoMirrored.Filled.KeyboardArrowRight, contentDescription = null, modifier = Modifier.size(14.dp), tint = ClawTheme.colors.text)

459+

if (models.size > visibleModels.size) {

460+

Surface(onClick = onToggle, color = Color.Transparent, contentColor = ClawTheme.colors.text) {

461+

Row(modifier = Modifier.fillMaxWidth().padding(horizontal = 10.dp, vertical = 8.dp), verticalAlignment = Alignment.CenterVertically) {

462+

Text(text = "View all models", style = ClawTheme.type.caption.copy(fontSize = 12.5.sp, lineHeight = 16.sp), color = ClawTheme.colors.textMuted, modifier = Modifier.weight(1f))

463+

Icon(imageVector = Icons.AutoMirrored.Filled.KeyboardArrowRight, contentDescription = "View all models", modifier = Modifier.size(14.dp), tint = ClawTheme.colors.text)

464+

}

439465

}

440466

}

441467

}