Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
package io.askimo.ui.common.ui

import androidx.compose.foundation.text.selection.SelectionContainer
import androidx.compose.material3.LocalContentColor
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
Expand Down Expand Up @@ -34,7 +33,7 @@ fun selectableText(
) {
Text(
text = text,
color = if (color == Color.Unspecified) LocalContentColor.current else color,
color = color,
style = style,
fontWeight = fontWeight,
fontFamily = fontFamily,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,48 +183,22 @@ private fun agenticContent(
.fillMaxWidth()
.padding(start = 24.dp, end = 36.dp, top = 24.dp, bottom = 24.dp),
) {
val runtimes = ExternalAgentLoader.displayNames()
val runtimesLabel = runtimes.mapIndexed { i, r ->
if (i == runtimes.lastIndex) "or $r" else r
}.joinToString(", ")

// ── Title row: page title + toolbar actions ────────────────
Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.Top,
verticalAlignment = Alignment.CenterVertically,
) {
Column(modifier = Modifier.weight(1f)) {
Text(
text = stringResource("skills.view.title"),
style = AppTextStyles.pageTitle,
)
val runtimes = ExternalAgentLoader.displayNames()
val runtimesLabel = runtimes.mapIndexed { i, r ->
if (i == runtimes.lastIndex) "or $r" else r
}.joinToString(", ")
Spacer(modifier = Modifier.height(4.dp))
Text(
text = stringResource("settings.skills.description", runtimesLabel),
style = AppTextStyles.bodySecondary,
)
Spacer(modifier = Modifier.height(8.dp))
Row(
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(8.dp),
) {
Text(
text = stringResource("settings.skills.runtimes"),
style = AppTextStyles.caption,
)
runtimes.forEach { runtime ->
Surface(
shape = MaterialTheme.shapes.small,
color = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.08f),
) {
Text(
text = runtime,
style = AppTextStyles.hint,
modifier = Modifier.padding(horizontal = 8.dp, vertical = 3.dp),
)
}
}
}
}
Text(
text = stringResource("skills.view.title"),
style = AppTextStyles.pageTitle,
modifier = Modifier.weight(1f),
)
Row(verticalAlignment = Alignment.CenterVertically) {
// Mode toggle — Agentic is active; clicking Manual switches sub-view
skillsModeToggle(agenticMode = true, onToggle = { if (!it) onSwitchToManual() })
Expand Down Expand Up @@ -272,6 +246,36 @@ private fun agenticContent(
}
}
}

// ── Description + runtimes: full width below the title row ─
Spacer(modifier = Modifier.height(4.dp))
Text(
text = stringResource("settings.skills.description", runtimesLabel),
style = AppTextStyles.bodySecondary,
modifier = Modifier.fillMaxWidth(),
)
Spacer(modifier = Modifier.height(8.dp))
Row(
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(8.dp),
) {
Text(
text = stringResource("settings.skills.runtimes"),
style = AppTextStyles.caption,
)
runtimes.forEach { runtime ->
Surface(
shape = MaterialTheme.shapes.small,
color = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.08f),
) {
Text(
text = runtime,
style = AppTextStyles.hint,
modifier = Modifier.padding(horizontal = 8.dp, vertical = 3.dp),
)
}
}
}
}

// ── Agentic execution area ─────────────────────────────────────
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/
package io.askimo.ui.skills

import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.core.animateDpAsState
import androidx.compose.animation.core.tween
import androidx.compose.animation.slideInHorizontally
Expand Down Expand Up @@ -187,7 +188,7 @@ internal fun manualSkillsView(
),
)
}
androidx.compose.animation.AnimatedVisibility(
AnimatedVisibility(
visible = showOverlayPanel,
enter = slideInHorizontally(initialOffsetX = { it }),
exit = slideOutHorizontally(targetOffsetX = { it }),
Expand Down Expand Up @@ -229,48 +230,22 @@ private fun manualContent(
.fillMaxWidth()
.padding(start = 24.dp, end = 36.dp, top = 24.dp, bottom = 24.dp),
) {
val runtimes = ExternalAgentLoader.displayNames()
val runtimesLabel = runtimes.mapIndexed { i, r ->
if (i == runtimes.lastIndex) "or $r" else r
}.joinToString(", ")

// ── Title row: page title + toolbar actions ────────────────
Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.Top,
verticalAlignment = Alignment.CenterVertically,
) {
Column(modifier = Modifier.weight(1f)) {
Text(
text = stringResource("skills.view.title"),
style = AppTextStyles.pageTitle,
)
val runtimes = ExternalAgentLoader.displayNames()
val runtimesLabel = runtimes.mapIndexed { i, r ->
if (i == runtimes.lastIndex) "or $r" else r
}.joinToString(", ")
Spacer(modifier = Modifier.height(4.dp))
Text(
text = stringResource("settings.skills.description", runtimesLabel),
style = AppTextStyles.bodySecondary,
)
Spacer(modifier = Modifier.height(8.dp))
Row(
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(8.dp),
) {
Text(
text = stringResource("settings.skills.runtimes"),
style = AppTextStyles.caption,
)
runtimes.forEach { runtime ->
Surface(
shape = MaterialTheme.shapes.small,
color = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.08f),
) {
Text(
text = runtime,
style = AppTextStyles.hint,
modifier = Modifier.padding(horizontal = 8.dp, vertical = 3.dp),
)
}
}
}
}
Text(
text = stringResource("skills.view.title"),
style = AppTextStyles.pageTitle,
modifier = Modifier.weight(1f),
)
// Toolbar actions
Row(verticalAlignment = Alignment.CenterVertically) {
skillsModeToggle(agenticMode = false, onToggle = { if (it) onSwitchToAgentic() })
Expand Down Expand Up @@ -317,6 +292,36 @@ private fun manualContent(
}
}

// ── Description + runtimes: full width below the title row ─
Spacer(modifier = Modifier.height(4.dp))
Text(
text = stringResource("settings.skills.description", runtimesLabel),
style = AppTextStyles.bodySecondary,
modifier = Modifier.fillMaxWidth(),
)
Spacer(modifier = Modifier.height(8.dp))
Row(
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(8.dp),
) {
Text(
text = stringResource("settings.skills.runtimes"),
style = AppTextStyles.caption,
)
runtimes.forEach { runtime ->
Surface(
shape = MaterialTheme.shapes.small,
color = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.08f),
) {
Text(
text = runtime,
style = AppTextStyles.hint,
modifier = Modifier.padding(horizontal = 8.dp, vertical = 3.dp),
)
}
}
}

// ── Selected skill header ──────────────────────────────────
if (selectedSkill != null) {
Spacer(modifier = Modifier.height(12.dp))
Expand Down