-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
79b71a3
commit 18bd80a
Showing
23 changed files
with
731 additions
and
46 deletions.
There are no files selected for viewing
Binary file modified
BIN
+32 Bytes
(100%)
packages/superdeck/example/.superdeck/generated/thumbnail_RiJb4GGG.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,113 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_chat_ui/flutter_chat_ui.dart'; | ||
|
||
import '../helpers/extensions.dart'; | ||
|
||
final _baseTheme = DarkChatTheme(); | ||
|
||
ChatTheme buildChatTheme(BuildContext context) { | ||
return DarkChatTheme( | ||
backgroundColor: context.colorScheme.surface, | ||
inputSurfaceTintColor: Colors.black, | ||
dateDividerTextStyle: TextStyle( | ||
color: context.colorScheme.onSurface, | ||
fontSize: 12, | ||
fontWeight: FontWeight.w800, | ||
height: 1.333, | ||
), | ||
emptyChatPlaceholderTextStyle: TextStyle( | ||
color: context.colorScheme.onSurface.withOpacity(0.6), | ||
fontSize: 16, | ||
fontWeight: FontWeight.w500, | ||
height: 1.5, | ||
), | ||
errorColor: context.colorScheme.error, | ||
inputBackgroundColor: Colors.black, | ||
inputBorderRadius: BorderRadius.zero, | ||
inputTextColor: context.colorScheme.onSurface, | ||
primaryColor: context.colorScheme.primary, | ||
receivedMessageBodyTextStyle: TextStyle( | ||
color: context.colorScheme.onSecondary, | ||
fontSize: 16, | ||
fontWeight: FontWeight.w500, | ||
height: 1.5, | ||
), | ||
receivedMessageCaptionTextStyle: TextStyle( | ||
color: context.colorScheme.onSecondary.withOpacity(0.6), | ||
fontSize: 12, | ||
fontWeight: FontWeight.w500, | ||
height: 1.333, | ||
), | ||
receivedMessageDocumentIconColor: context.colorScheme.primary, | ||
receivedMessageLinkDescriptionTextStyle: TextStyle( | ||
color: context.colorScheme.onSecondary, | ||
fontSize: 14, | ||
fontWeight: FontWeight.w400, | ||
height: 1.428, | ||
), | ||
receivedMessageLinkTitleTextStyle: TextStyle( | ||
color: context.colorScheme.onSecondary, | ||
fontSize: 16, | ||
fontWeight: FontWeight.w800, | ||
height: 1.375, | ||
), | ||
secondaryColor: context.colorScheme.secondary, | ||
sentMessageBodyTextStyle: TextStyle( | ||
color: context.colorScheme.onPrimary, | ||
fontSize: 16, | ||
fontWeight: FontWeight.w500, | ||
height: 1.5, | ||
), | ||
sentMessageCaptionTextStyle: TextStyle( | ||
color: context.colorScheme.onPrimary.withOpacity(0.6), | ||
fontSize: 12, | ||
fontWeight: FontWeight.w500, | ||
height: 1.333, | ||
), | ||
sentMessageDocumentIconColor: context.colorScheme.onPrimary, | ||
sentMessageLinkDescriptionTextStyle: TextStyle( | ||
color: context.colorScheme.onPrimary, | ||
fontSize: 14, | ||
fontWeight: FontWeight.w400, | ||
height: 1.428, | ||
), | ||
sentMessageLinkTitleTextStyle: TextStyle( | ||
color: context.colorScheme.onPrimary, | ||
fontSize: 16, | ||
fontWeight: FontWeight.w800, | ||
height: 1.375, | ||
), | ||
// systemMessageTheme: SystemMessageTheme( | ||
// textStyle: TextStyle( | ||
// color: context.colorScheme.onSurface, | ||
// fontSize: 12, | ||
// fontWeight: FontWeight.w800, | ||
// height: 1.333, | ||
// ), | ||
// ), | ||
// typingIndicatorTheme: TypingIndicatorTheme( | ||
// animatedCirclesColor: context.colorScheme.onSurface, | ||
// bubbleColor: context.colorScheme.surface, | ||
// countTextColor: context.colorScheme.onPrimary, | ||
// animatedCircleSize: _baseTheme.typingIndicatorTheme.animatedCircleSize, | ||
// bubbleBorder: _baseTheme.typingIndicatorTheme.bubbleBorder, | ||
// countAvatarColor: context.colorScheme.primary, | ||
// multipleUserTextStyle: context.textTheme.bodySmall!, | ||
// ), | ||
unreadHeaderTheme: UnreadHeaderTheme( | ||
color: context.colorScheme.secondary, | ||
textStyle: TextStyle( | ||
color: context.colorScheme.onSecondary.withOpacity(0.6), | ||
fontSize: 12, | ||
fontWeight: FontWeight.w500, | ||
height: 1.333, | ||
), | ||
), | ||
userAvatarTextStyle: TextStyle( | ||
color: context.colorScheme.onPrimary, | ||
fontSize: 12, | ||
fontWeight: FontWeight.w800, | ||
height: 1.333, | ||
), | ||
); | ||
} |
66 changes: 66 additions & 0 deletions
66
packages/superdeck/lib/chat/components/typing_indicator.dart
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 |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import 'dart:async'; | ||
|
||
import 'package:flutter/material.dart'; | ||
|
||
class WaitingIndicator extends StatefulWidget { | ||
final bool isTyping; | ||
|
||
const WaitingIndicator({Key? key, required this.isTyping}) : super(key: key); | ||
|
||
@override | ||
State createState() => _WaitingIndicatorState(); | ||
} | ||
|
||
class _WaitingIndicatorState extends State<WaitingIndicator> { | ||
late Timer _timer; | ||
final List<double> _dotSizes = [6, 8, 10]; | ||
|
||
@override | ||
void initState() { | ||
super.initState(); | ||
_startTimer(); | ||
} | ||
|
||
@override | ||
void dispose() { | ||
_stopTimer(); | ||
super.dispose(); | ||
} | ||
|
||
void _startTimer() { | ||
_timer = Timer.periodic(const Duration(milliseconds: 500), (_) { | ||
setState(() { | ||
_dotSizes.insert(0, _dotSizes.removeLast()); | ||
}); | ||
}); | ||
} | ||
|
||
void _stopTimer() { | ||
_timer.cancel(); | ||
} | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return widget.isTyping | ||
? Row( | ||
mainAxisSize: MainAxisSize.min, | ||
children: [ | ||
for (final size in _dotSizes) | ||
Padding( | ||
padding: const EdgeInsets.only(right: 4), | ||
child: AnimatedContainer( | ||
duration: const Duration(milliseconds: 500), | ||
curve: Curves.easeInOut, | ||
height: size, | ||
width: size, | ||
decoration: BoxDecoration( | ||
shape: BoxShape.circle, | ||
color: Colors.grey[400], | ||
), | ||
), | ||
), | ||
], | ||
) | ||
: const SizedBox.shrink(); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,64 @@ | ||
final presentationAssistantPrompt = ''' | ||
**CONTEXT:** | ||
You are a markdown presentation assistance bot designed to help users create, refine, and optimize markdown-based slides. Users often use frontmatter to define styles, layouts, and various options within their presentations. Your task is to assist in adjusting these elements to improve the overall presentation while providing feedback and suggestions on specific slide numbers. | ||
**OBJECTIVE:** | ||
To guide users in enhancing their markdown presentations by suggesting improvements to the structure, layout, and style. When proposing changes, you should clearly reference the slide number where the change is suggested. Additionally, ensure that the user is aware of available frontmatter options that can be utilized for better customization. | ||
**STYLE:** | ||
Never change the frontmatter structure, or any of the image urls. | ||
Always focus on one specific slide and fixes before moving to the next changes. | ||
Provide feedback in a concise and instructional manner, ensuring that each suggestion is actionable. The feedback should focus on optimizing the presentation's readability, visual appeal, and effectiveness in conveying the intended message. | ||
**TONE:** | ||
Professional and supportive. Encourage the user by acknowledging their current efforts and offering constructive advice to elevate the presentation. | ||
**AUDIENCE:** | ||
The audience comprises users who are actively working on creating markdown-based presentations. They may have varying levels of experience with markdown and frontmatter customization, so explanations should be clear and accessible. | ||
**REQUIRED FORMAT:** | ||
The suggestions are always conversational, you should should not provide code snippets. | ||
Feedback and suggestions should be provided as text responses within the markdown file or as separate comments. Each suggestion must include a reference to the specific slide number being discussed. | ||
**STEP-BACK PROMPTING:** | ||
Before making specific suggestions, review the overall structure and style of the presentation. Consider the flow and coherence of the slides, as well as the effective use of frontmatter for layout and style consistency. Are there opportunities to better utilize frontmatter options to enhance the presentation's impact? | ||
**END RESULT PROMPTING:** | ||
Envision the final version of the markdown presentation after all suggested changes have been implemented. Describe how the presentation has improved in terms of clarity, visual appeal, and audience engagement. What specific changes have made the most significant impact, and how does the presentation now meet the user's original goals? | ||
'''; | ||
|
||
final provideMarkdownEdits = ''' | ||
CONTEXT: | ||
You need a finalized Markdown document incorporating all feedback and ready for immediate use, without extra lines or spaces, or extra content in the response. | ||
OBJECTIVE: | ||
Deliver a fully edited, complete Markdown file, ready to save and use with no further adjustments. | ||
STYLE: | ||
Clear, concise, and well-structured, with a focus on precision. | ||
TONE: | ||
Professional and straightforward, reflecting previous feedback. | ||
AUDIENCE: | ||
Intended for immediate use by professionals needing the finalized content. | ||
REQUIRED FORMAT: | ||
A complete and polished Markdown file, ready for saving. | ||
STEP-BACK PROMPTING: | ||
Review the Markdown file to ensure all feedback is integrated and the content is complete and aligned with clarity goals. | ||
END RESULT PROMPTING: | ||
Envision saving the file as the final version, reflecting all edits and ready for immediate use with no further modifications needed. | ||
'''; |
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
Oops, something went wrong.