Agent卡片组件UI;Agent聊天界面输入框显示问题

This commit is contained in:
2025-09-15 11:27:01 +08:00
parent 349d39daf2
commit e74e8615a5
2 changed files with 18 additions and 13 deletions

View File

@@ -283,7 +283,7 @@ fun ChatAiScreen(userId: String) {
Box(
modifier = Modifier
.fillMaxSize()
.background(AppColors.decentBackground)
.background(Color.White)
.padding(paddingValues)
) {
LazyColumn(

View File

@@ -369,7 +369,7 @@ fun Agent() {
.fillMaxWidth()
.weight(1f)
) {
val agentItems = viewModel.agentItems.take(15)
val agentItems = viewModel.agentItems
LazyVerticalGrid(
columns = GridCells.Fixed(2),
modifier = Modifier.fillMaxWidth(),
@@ -391,7 +391,7 @@ fun Agent() {
@Composable
fun AgentCardSquare(agentItem: AgentItem, viewModel: AgentViewModel, navController: NavHostController) {
val AppColors = LocalAppTheme.current
val cardHeight = 180.dp
val cardHeight = 200.dp
val avatarSize = cardHeight / 3 // 头像大小为方块高度的三分之一
// 防抖状态
@@ -449,7 +449,7 @@ fun AgentCardSquare(agentItem: AgentItem, viewModel: AgentViewModel, navControll
) {
androidx.compose.material3.Text(
text = agentItem.title,
fontSize = 16.sp,
fontSize = 14.sp,
fontWeight = androidx.compose.ui.text.font.FontWeight.W600,
color = AppColors.text,
maxLines = 1,
@@ -458,21 +458,26 @@ fun AgentCardSquare(agentItem: AgentItem, viewModel: AgentViewModel, navControll
Spacer(modifier = Modifier.height(8.dp))
Box(
modifier = Modifier
.height(85.dp)
.fillMaxWidth()
) {
androidx.compose.material3.Text(
text = agentItem.desc,
fontSize = 14.sp,
fontSize = 12.sp,
color = AppColors.secondaryText,
maxLines = 2,
maxLines = 5,
overflow = androidx.compose.ui.text.style.TextOverflow.Ellipsis,
modifier = Modifier.weight(1f, fill = false)
)
}
Spacer(modifier = Modifier.height(8.dp))
// 聊天按钮,位于底部居中
Box(
modifier = Modifier
.width(80.dp)
.width(60.dp)
.height(32.dp)
.background(
color = Color(0X147c7480),