Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve chat initial experience #885

Merged
merged 13 commits into from
Sep 22, 2024
12 changes: 6 additions & 6 deletions app/lib/pages/chat/widgets/ai_message.dart
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ class _AIMessageState extends State<AIMessage> {
style: TextStyle(fontSize: 15.0, fontWeight: FontWeight.w500, color: Colors.grey.shade300),
)),
if (widget.message.id != 1) _getCopyButton(context), // RESTORE ME
// if (message.id == 1 && displayOptions) const SizedBox(height: 8),
// if (message.id == 1 && displayOptions) ..._getInitialOptions(context),
if (widget.displayOptions) const SizedBox(height: 8),
if (widget.displayOptions) ..._getInitialOptions(context),
Comment on lines +121 to +122

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image description Entelligence.AI

The changes made here are good for improving user engagement. The initial options are now displayed based on the displayOptions flag, which is more flexible than the previous hard-coded condition.

if (messageMemories.isNotEmpty) ...[
const SizedBox(height: 16),
for (var data in messageMemories.indexed) ...[
Expand Down Expand Up @@ -256,7 +256,7 @@ class _AIMessageState extends State<AIMessage> {
_getInitialOption(BuildContext context, String optionText) {
return GestureDetector(
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 12.0, vertical: 8),
padding: const EdgeInsets.symmetric(horizontal: 12.0, vertical: 10),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image description Entelligence.AI

The padding for the container has been increased from 8 to 10. This is a minor UI change and doesn't seem to introduce any issues.

-        padding: const EdgeInsets.symmetric(horizontal: 12.0, vertical: 8),
+        padding: const EdgeInsets.symmetric(horizontal: 12.0, vertical: 10),

width: double.maxFinite,
decoration: BoxDecoration(
color: Colors.grey.shade900,
Expand All @@ -273,11 +273,11 @@ class _AIMessageState extends State<AIMessage> {
_getInitialOptions(BuildContext context) {
return [
const SizedBox(height: 8),
_getInitialOption(context, 'What tasks do I have from yesterday?'),
_getInitialOption(context, 'What\'s been on my mind a lot?'),
const SizedBox(height: 8),
_getInitialOption(context, 'What conversations did I have with John?'),
_getInitialOption(context, 'Did I forget to follow up on something?'),
const SizedBox(height: 8),
_getInitialOption(context, 'What advise have I received about entrepreneurship?'),
_getInitialOption(context, 'What\'s the funniest thing I\'ve said lately?'),
Comment on lines +306 to +310

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image description Entelligence.AI

The text content of the initial options has been updated to be more engaging and interesting for the user. This is a good change for improving user experience.

];
}
}
Loading