🐛 Bug fixes
This commit is contained in:
@@ -46,7 +46,6 @@ class _FunctionCallsSectionState extends State<FunctionCallsSection> {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Gap(12),
|
||||
Container(
|
||||
padding: const EdgeInsets.all(8),
|
||||
decoration: BoxDecoration(
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
||||
|
||||
class ProposalsSection extends StatelessWidget {
|
||||
@@ -21,7 +20,6 @@ class ProposalsSection extends StatelessWidget {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Gap(12),
|
||||
Wrap(
|
||||
spacing: 8,
|
||||
runSpacing: 8,
|
||||
|
||||
@@ -17,7 +17,6 @@ class ReasoningSection extends StatelessWidget {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Gap(12),
|
||||
Container(
|
||||
padding: const EdgeInsets.all(8),
|
||||
decoration: BoxDecoration(
|
||||
|
||||
@@ -24,12 +24,20 @@ class ThoughtContent extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(
|
||||
child: SelectableText(
|
||||
streamingText,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).colorScheme.onSurface,
|
||||
height: 1.4,
|
||||
child: MarkdownTextContent(
|
||||
isSelectable: true,
|
||||
content: streamingText,
|
||||
extraBlockSyntaxList: [ProposalBlockSyntax()],
|
||||
textStyle: Theme.of(context).textTheme.bodyMedium,
|
||||
extraGenerators: [
|
||||
ProposalGenerator(
|
||||
backgroundColor:
|
||||
Theme.of(context).colorScheme.secondaryContainer,
|
||||
foregroundColor:
|
||||
Theme.of(context).colorScheme.onSecondaryContainer,
|
||||
borderColor: Theme.of(context).colorScheme.outline,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
|
||||
@@ -13,7 +13,6 @@ 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(
|
||||
@@ -237,6 +236,7 @@ class ThoughtItem extends StatelessWidget {
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
spacing: 8,
|
||||
children: [
|
||||
// Main content
|
||||
ThoughtContent(
|
||||
@@ -246,9 +246,16 @@ class ThoughtItem extends StatelessWidget {
|
||||
),
|
||||
|
||||
// Reasoning chunks (streaming only)
|
||||
if (reasoningChunks.isNotEmpty)
|
||||
ReasoningSection(reasoningChunks: reasoningChunks),
|
||||
|
||||
// Function calls
|
||||
if (streamingFunctionCalls.isNotEmpty ||
|
||||
(thought?.chunks.isNotEmpty ?? false) &&
|
||||
thought!.chunks.any(
|
||||
(chunk) =>
|
||||
chunk.type == ThinkingChunkType.functionCall,
|
||||
))
|
||||
FunctionCallsSection(
|
||||
isStreaming: isStreaming,
|
||||
streamingFunctionCalls: streamingFunctionCalls,
|
||||
@@ -266,10 +273,7 @@ class ThoughtItem extends StatelessWidget {
|
||||
onProposalAction: _handleProposalAction,
|
||||
),
|
||||
|
||||
if (isStreaming && isAI)
|
||||
LinearProgressIndicator().padding(
|
||||
top: streamingText.isNotEmpty ? 8 : 0,
|
||||
),
|
||||
if (isStreaming && isAI) LinearProgressIndicator(),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -17,7 +17,6 @@ class TokenInfo extends StatelessWidget {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Gap(8),
|
||||
Row(
|
||||
children: [
|
||||
if (thought.modelName != null) ...[
|
||||
|
||||
Reference in New Issue
Block a user