Remove assistant header copy from desktop conversation view
This commit is contained in:
parent
6c72bbdb67
commit
8c6d15bb81
@ -1754,8 +1754,6 @@ class _ConversationArea extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final palette = context.palette;
|
||||
final theme = Theme.of(context);
|
||||
final statusStyle = _pillStyleForStatus(context, currentTask.status);
|
||||
|
||||
return SurfaceCard(
|
||||
borderRadius: 0,
|
||||
@ -1768,47 +1766,7 @@ class _ConversationArea extends StatelessWidget {
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
currentTask.title,
|
||||
key: const Key('assistant-conversation-title'),
|
||||
style: theme.textTheme.titleLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Wrap(
|
||||
spacing: 6,
|
||||
runSpacing: 6,
|
||||
children: [
|
||||
_StatusPill(
|
||||
label: currentTask.draft
|
||||
? appText('草稿任务', 'Draft task')
|
||||
: _taskStatusLabel(currentTask.status),
|
||||
backgroundColor: statusStyle.backgroundColor,
|
||||
textColor: statusStyle.foregroundColor,
|
||||
),
|
||||
_MetaPill(
|
||||
label: currentTask.owner,
|
||||
icon: Icons.smart_toy_outlined,
|
||||
),
|
||||
_MetaPill(
|
||||
label: currentTask.surface,
|
||||
icon: Icons.forum_outlined,
|
||||
),
|
||||
_MetaPill(
|
||||
label: controller.currentSessionKey,
|
||||
icon: Icons.tag_rounded,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
const Spacer(),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
|
||||
@ -25,7 +25,7 @@ import '../test_support.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets(
|
||||
'AssistantPage desktop shows thread rail and creates draft thread',
|
||||
'AssistantPage desktop hides conversation header text and shows thread rail',
|
||||
(WidgetTester tester) async {
|
||||
final controller = await createTestController(tester);
|
||||
|
||||
@ -36,19 +36,11 @@ void main() {
|
||||
);
|
||||
|
||||
expect(find.byKey(const Key('assistant-task-rail')), findsOneWidget);
|
||||
|
||||
final titleBefore = tester.widget<Text>(
|
||||
expect(
|
||||
find.byKey(const Key('assistant-conversation-title')),
|
||||
findsNothing,
|
||||
);
|
||||
expect(titleBefore.data, '默认任务');
|
||||
|
||||
await tester.tap(find.byKey(const Key('assistant-new-task-button')));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
final titleAfter = tester.widget<Text>(
|
||||
find.byKey(const Key('assistant-conversation-title')),
|
||||
);
|
||||
expect(titleAfter.data, '新对话');
|
||||
expect(controller.currentSessionKey, 'main');
|
||||
},
|
||||
);
|
||||
|
||||
@ -132,6 +124,8 @@ void main() {
|
||||
);
|
||||
|
||||
expect(find.text('当前 0'), findsOneWidget);
|
||||
controller.dispose();
|
||||
await tester.pump();
|
||||
});
|
||||
|
||||
testWidgets('AssistantPage lets users rename task titles', (
|
||||
@ -167,12 +161,6 @@ void main() {
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('研发任务'), findsWidgets);
|
||||
expect(
|
||||
tester
|
||||
.widget<Text>(find.byKey(const Key('assistant-conversation-title')))
|
||||
.data,
|
||||
'研发任务',
|
||||
);
|
||||
expect(controller.settings.assistantCustomTaskTitles['main'], '研发任务');
|
||||
|
||||
await pumpPage(
|
||||
@ -362,7 +350,7 @@ void main() {
|
||||
|
||||
expect(find.byKey(const Key('assistant-task-rail')), findsNothing);
|
||||
expect(
|
||||
find.byKey(const Key('assistant-conversation-title')),
|
||||
find.byKey(const Key('assistant-conversation-shell')),
|
||||
findsOneWidget,
|
||||
);
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user