-
Notifications
You must be signed in to change notification settings - Fork 471
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
Changes from 1 commit
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
a8e4ed8
show initial messages
mdmohsin7 22fbf89
clear chat func in backend
mdmohsin7 a280ead
clear chat func on frontend
mdmohsin7 eb1b0aa
delete messages using firebase batch on backend
mdmohsin7 9cbb312
improve experience
mdmohsin7 83c747d
fetch messages early
mdmohsin7 2c52e5b
improve ux by showing cached messages while fetching messages in bg
mdmohsin7 4c4fdae
animated mini banner widget
mdmohsin7 f38bd58
improve memory in chat loading speed by only fetching it if it does n…
mdmohsin7 5250c23
Merge branch 'main' into chat-improvements
mdmohsin7 f945d41
minor ui improvements
mdmohsin7 8be59e4
show delete and refresh on scroll
mdmohsin7 47e8f15
soft delete messages
mdmohsin7 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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), | ||
if (messageMemories.isNotEmpty) ...[ | ||
const SizedBox(height: 16), | ||
for (var data in messageMemories.indexed) ...[ | ||
|
@@ -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), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
width: double.maxFinite, | ||
decoration: BoxDecoration( | ||
color: Colors.grey.shade900, | ||
|
@@ -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
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
]; | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.