💄 Optimize UI and UX for thought

This commit is contained in:
2025-10-27 01:40:35 +08:00
parent 08091d51bf
commit f74cca8464
8 changed files with 302 additions and 214 deletions

View File

@@ -13,6 +13,7 @@ import 'package:island/widgets/thought/thought_content.dart';
import 'package:island/widgets/thought/thought_header.dart';
import 'package:island/widgets/thought/token_info.dart';
import 'package:material_symbols_icons/material_symbols_icons.dart';
import 'package:styled_widget/styled_widget.dart';
List<Map<String, String>> _extractProposals(String content) {
final proposalRegex = RegExp(
@@ -81,18 +82,12 @@ class ThoughtInput extends HookWidget {
'attachments-${attachedMessages?.length ?? 0}-${attachedPosts?.length ?? 0}',
),
padding: const EdgeInsets.symmetric(
horizontal: 8,
vertical: 4,
),
margin: const EdgeInsets.only(
left: 4,
right: 4,
top: 4,
bottom: 4,
horizontal: 16,
vertical: 8,
),
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surfaceContainerHigh,
borderRadius: BorderRadius.circular(16),
borderRadius: BorderRadius.circular(24),
border: Border.all(
color: Theme.of(
context,
@@ -100,6 +95,12 @@ class ThoughtInput extends HookWidget {
width: 1,
),
),
margin: const EdgeInsets.only(
left: 8,
right: 8,
top: 8,
bottom: 4,
),
child: Row(
mainAxisSize: MainAxisSize.max,
children: [
@@ -264,6 +265,11 @@ class ThoughtItem extends StatelessWidget {
proposals: proposals,
onProposalAction: _handleProposalAction,
),
if (isStreaming && isAI)
LinearProgressIndicator().padding(
top: streamingText.isNotEmpty ? 8 : 0,
),
],
),
),