feat(agent): choose the reasoning effort in the Agent tab (#2507)

* feat(agent): choose the reasoning effort in the Agent tab; agent processes survive Steam session cleanup; sdkmanager license step tolerates SIGPIPE

* docs(agent): on-device build and commit pitfalls for the agent
This commit is contained in:
Kurt Himebauch authored and GitHub committed 2026-11-12 10:23:38 -05:00
1 parent c8dec0a8bc
commit 3b1366f85c
6 files changed
+41 -4

No files matched your search

@@ -121,7 +121,7 @@ private fun AgentHeader(panel: AgentPanel, onPanel: (AgentPanel) -> Unit, onSetu
verticalAlignment = Alignment.CenterVertically,
modifier = Modifier.clip(Shape12).clickable { onPanel(AgentPanel.MODEL) }.padding(vertical = 2.dp).testTag("agent-model"),
) {
val parts = listOfNotNull(AgentHost.harness.name, model, stringResource(R.string.agent_plan_short).takeIf { AgentHost.plan && AgentHost.harness.plans })
val parts = listOfNotNull(AgentHost.harness.name, model, AgentHost.effort, stringResource(R.string.agent_plan_short).takeIf { AgentHost.plan && AgentHost.harness.plans })
Text(parts.joinToString(" · "), fontSize = 13.sp, color = if (panel == AgentPanel.MODEL) pal.primary else pal.onSurfaceVariant)
Icon(Icons.Outlined.ExpandMore, null, tint = pal.onSurfaceVariant, modifier = Modifier.size(16.dp))
}
@@ -48,7 +48,7 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.delay
import kotlinx.coroutines.withContext
/** The model and plan mode for the next turns; a conversation keeps going with whatever is chosen. */
/** The model, reasoning effort and plan mode for the next turns; a conversation keeps going with whatever is chosen. */
@Composable
internal fun AgentModelPicker() {
val context = LocalContext.current
@@ -63,6 +63,16 @@ internal fun AgentModelPicker() {
else SecondaryButton(choice.label, compact = true) { AgentHost.chooseModel(context, id) }
}
}
if (AgentHost.harness.efforts.isNotEmpty()) Column(verticalArrangement = Arrangement.spacedBy(6.dp)) {
Text(stringResource(R.string.agent_effort), fontSize = 15.sp, fontWeight = FontWeight.SemiBold, color = MaterialTheme.colorScheme.onBackground, modifier = Modifier.padding(horizontal = 2.dp))
Row(horizontalArrangement = Arrangement.spacedBy(8.dp), modifier = Modifier.horizontalScroll(rememberScrollState())) {
for (level in listOf<String?>(null) + AgentHost.harness.efforts) {
val label = level ?: stringResource(R.string.agent_model_default)
if (level == AgentHost.effort) PrimaryButton(label, compact = true) {}
else SecondaryButton(label, compact = true) { AgentHost.chooseEffort(context, level) }
}
}
}
if (AgentHost.harness.plans) Row(verticalAlignment = Alignment.CenterVertically, modifier = Modifier.fillMaxWidth().padding(horizontal = 2.dp)) {
Column(Modifier.weight(1f)) {
Text(stringResource(R.string.agent_plan), fontSize = 15.sp, fontWeight = FontWeight.SemiBold, color = MaterialTheme.colorScheme.onBackground)