add discussion topic and keywords min max lines with max length
This commit is contained in:
parent
2f905f86b7
commit
0ae37cba93
6 changed files with 10 additions and 199 deletions
|
|
@ -4020,7 +4020,7 @@
|
|||
"conversationBotDiscussionZone_discussionKeywordsHintText": "Comma separated list of keywords to guide the discussion",
|
||||
"conversationBotDiscussionZone_discussionTriggerScheduleEnabledLabel": "Send discussion prompt on a schedule",
|
||||
"conversationBotDiscussionZone_discussionTriggerScheduleHourIntervalLabel": "Hours between discussion prompts",
|
||||
"conversationBotDiscussionZone_discussionTriggerReactionEnabledLabel": "Send discussion prompt when user reacts ⏩ to bot message",
|
||||
"conversationBotDiscussionZone_discussionTriggerReactionEnabledLabel": "Responds on ⏩ reaction",
|
||||
"conversationBotDiscussionZone_discussionTriggerReactionKeyLabel": "Reaction to send discussion prompt",
|
||||
"studentAnalyticsNotAvailable": "Student data not currently available",
|
||||
"roomDataMissing": "Some data may be missing from rooms in which you are not a member.",
|
||||
|
|
|
|||
|
|
@ -4648,7 +4648,7 @@
|
|||
"conversationBotDiscussionZone_discussionKeywordsHintText": "Lista de palabras clave separadas por comas para orientar el debate",
|
||||
"conversationBotDiscussionZone_discussionTriggerScheduleEnabledLabel": "Enviar mensajes de debate según un calendario",
|
||||
"conversationBotDiscussionZone_discussionTriggerScheduleHourIntervalLabel": "Horas entre temas de debate",
|
||||
"conversationBotDiscussionZone_discussionTriggerReactionEnabledLabel": "Enviar aviso de discusión cuando el usuario reacciona ⏩ al mensaje del bot.",
|
||||
"conversationBotDiscussionZone_discussionTriggerReactionEnabledLabel": "Responde a la reacción de ⏩",
|
||||
"conversationBotDiscussionZone_discussionTriggerReactionKeyLabel": "Reacción al envío del aviso de debate",
|
||||
"studentAnalyticsNotAvailable": "Datos de los estudiantes no disponibles actualmente",
|
||||
"roomDataMissing": "Es posible que falten algunos datos de las salas de las que no es miembro.",
|
||||
|
|
|
|||
|
|
@ -30,6 +30,9 @@ class ConversationBotDiscussionKeywordsInput extends StatelessWidget {
|
|||
.conversationBotDiscussionZone_discussionKeywordsLabel,
|
||||
),
|
||||
content: TextField(
|
||||
minLines: 1,
|
||||
maxLines: 10,
|
||||
maxLength: 1000,
|
||||
controller: textFieldController,
|
||||
onChanged: (value) {
|
||||
discussionKeywords = value;
|
||||
|
|
|
|||
|
|
@ -30,6 +30,9 @@ class ConversationBotDiscussionTopicInput extends StatelessWidget {
|
|||
.conversationBotDiscussionZone_discussionTopicLabel,
|
||||
),
|
||||
content: TextField(
|
||||
minLines: 1,
|
||||
maxLines: 10,
|
||||
maxLength: 1000,
|
||||
controller: textFieldController,
|
||||
onChanged: (value) {
|
||||
discussionTopic = value;
|
||||
|
|
|
|||
|
|
@ -17,14 +17,6 @@ class ConversationBotDiscussionZone extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final String discussionTopic = initialBotOptions.discussionTopic ?? "";
|
||||
final String discussionKeywords =
|
||||
initialBotOptions.discussionKeywords ?? "";
|
||||
// int discussionTriggerScheduleHourInterval =
|
||||
// initialBotOptions.discussionTriggerScheduleHourInterval ?? 24;
|
||||
// String discussionTriggerReactionKey =
|
||||
// initialBotOptions.discussionTriggerReactionKey ?? "⏩";
|
||||
// List<String> reactionKeyOptions = ["⏩"];
|
||||
return Column(
|
||||
children: [
|
||||
const SizedBox(height: 12),
|
||||
|
|
@ -84,56 +76,12 @@ class ConversationBotDiscussionZone extends StatelessWidget {
|
|||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
// CheckboxListTile(
|
||||
// title: Text(
|
||||
// L10n.of(context)!
|
||||
// .conversationBotDiscussionZone_discussionTriggerScheduleEnabledLabel,
|
||||
// ),
|
||||
// value: initialBotOptions.discussionTriggerScheduleEnabled ?? false,
|
||||
// onChanged: (value) {
|
||||
// initialBotOptions.discussionTriggerScheduleEnabled = value ?? false;
|
||||
// onChanged?.call(initialBotOptions);
|
||||
// },
|
||||
// ),
|
||||
// if (initialBotOptions.discussionTriggerScheduleEnabled == true)
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.all(8),
|
||||
// child: TextField(
|
||||
// keyboardType: TextInputType.number,
|
||||
// controller: TextEditingController(
|
||||
// text: discussionTriggerScheduleHourInterval.toString(),
|
||||
// ),
|
||||
// onChanged: (value) {
|
||||
// discussionTriggerScheduleHourInterval =
|
||||
// int.tryParse(value) ?? 0;
|
||||
// },
|
||||
// decoration: InputDecoration(
|
||||
// labelText: L10n.of(context)!
|
||||
// .conversationBotDiscussionZone_discussionTriggerScheduleHourIntervalLabel,
|
||||
// floatingLabelBehavior: FloatingLabelBehavior.auto,
|
||||
// suffixIcon: IconButton(
|
||||
// icon: const Icon(Icons.check),
|
||||
// onPressed: () {
|
||||
// if (discussionTriggerScheduleHourInterval !=
|
||||
// initialBotOptions
|
||||
// .discussionTriggerScheduleHourInterval) {
|
||||
// initialBotOptions.discussionTriggerScheduleHourInterval =
|
||||
// discussionTriggerScheduleHourInterval;
|
||||
// onChanged?.call(
|
||||
// initialBotOptions,
|
||||
// );
|
||||
// }
|
||||
// },
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// const SizedBox(height: 12),
|
||||
CheckboxListTile(
|
||||
title: Text(
|
||||
L10n.of(context)!
|
||||
.conversationBotDiscussionZone_discussionTriggerReactionEnabledLabel,
|
||||
),
|
||||
enabled: false,
|
||||
value: initialBotOptions.discussionTriggerReactionEnabled ?? false,
|
||||
onChanged: (value) {
|
||||
initialBotOptions.discussionTriggerReactionEnabled = value ?? false;
|
||||
|
|
@ -141,83 +89,8 @@ class ConversationBotDiscussionZone extends StatelessWidget {
|
|||
"⏩"; // hard code this for now
|
||||
onChanged.call(initialBotOptions);
|
||||
},
|
||||
// make this input disabled always
|
||||
),
|
||||
// if (initialBotOptions.discussionTriggerReactionEnabled == true)
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.all(8),
|
||||
// child: Column(
|
||||
// children: [
|
||||
// Text(
|
||||
// L10n.of(context)!
|
||||
// .conversationBotDiscussionZone_discussionTriggerReactionKeyLabel,
|
||||
// style: TextStyle(
|
||||
// color: Theme.of(context).colorScheme.secondary,
|
||||
// fontWeight: FontWeight.bold,
|
||||
// ),
|
||||
// textAlign: TextAlign.left,
|
||||
// ),
|
||||
// Container(
|
||||
// decoration: BoxDecoration(
|
||||
// border: Border.all(
|
||||
// color: Theme.of(context).colorScheme.secondary,
|
||||
// width: 0.5,
|
||||
// ),
|
||||
// borderRadius: const BorderRadius.all(Radius.circular(10)),
|
||||
// ),
|
||||
// child: DropdownButton(
|
||||
// // Initial Value
|
||||
// hint: Padding(
|
||||
// padding: const EdgeInsets.only(left: 15),
|
||||
// child: Text(
|
||||
// reactionKeyOptions[0],
|
||||
// style: const TextStyle().copyWith(
|
||||
// color: Theme.of(context).textTheme.bodyLarge!.color,
|
||||
// fontSize: 14,
|
||||
// ),
|
||||
// overflow: TextOverflow.clip,
|
||||
// textAlign: TextAlign.center,
|
||||
// ),
|
||||
// ),
|
||||
// isExpanded: true,
|
||||
// underline: Container(),
|
||||
// // Down Arrow Icon
|
||||
// icon: const Icon(Icons.keyboard_arrow_down),
|
||||
// // Array list of items
|
||||
// items: [
|
||||
// for (final entry in reactionKeyOptions)
|
||||
// DropdownMenuItem(
|
||||
// value: entry,
|
||||
// child: Padding(
|
||||
// padding: const EdgeInsets.only(left: 15),
|
||||
// child: Text(
|
||||
// entry,
|
||||
// style: const TextStyle().copyWith(
|
||||
// color: Theme.of(context)
|
||||
// .textTheme
|
||||
// .bodyLarge!
|
||||
// .color,
|
||||
// fontSize: 14,
|
||||
// ),
|
||||
// overflow: TextOverflow.clip,
|
||||
// textAlign: TextAlign.center,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// onChanged: (String? value) {
|
||||
// if (value !=
|
||||
// initialBotOptions.discussionTriggerReactionKey) {
|
||||
// initialBotOptions.discussionTriggerReactionKey = value;
|
||||
// onChanged?.call(
|
||||
// initialBotOptions,
|
||||
// );
|
||||
// }
|
||||
// },
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
const SizedBox(height: 12),
|
||||
],
|
||||
);
|
||||
|
|
|
|||
|
|
@ -156,74 +156,6 @@ class ConversationBotSettingsState extends State<ConversationBotSettings> {
|
|||
),
|
||||
),
|
||||
if (addBot) ...[
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.only(left: 16),
|
||||
// child: ListTile(
|
||||
// onTap: () async {
|
||||
// final topic = await showTextInputDialog(
|
||||
// context: context,
|
||||
// textFields: [
|
||||
// DialogTextField(
|
||||
// initialText: botOptions.topic.isEmpty
|
||||
// ? ""
|
||||
// : botOptions.topic,
|
||||
// hintText:
|
||||
// L10n.of(context)!.enterAConversationTopic,
|
||||
// ),
|
||||
// ],
|
||||
// title: L10n.of(context)!.conversationTopic,
|
||||
// );
|
||||
// if (topic == null) return;
|
||||
// updateBotOption(() {
|
||||
// botOptions.topic = topic.single;
|
||||
// });
|
||||
// },
|
||||
// leading: CircleAvatar(
|
||||
// backgroundColor:
|
||||
// Theme.of(context).scaffoldBackgroundColor,
|
||||
// foregroundColor:
|
||||
// Theme.of(context).textTheme.bodyLarge!.color,
|
||||
// child: const Icon(Icons.topic_outlined),
|
||||
// ),
|
||||
// subtitle: Text(
|
||||
// botOptions.topic.isEmpty
|
||||
// ? L10n.of(context)!.enterAConversationTopic
|
||||
// : botOptions.topic,
|
||||
// ),
|
||||
// title: Text(
|
||||
// L10n.of(context)!.conversationTopic,
|
||||
// style: TextStyle(
|
||||
// color: Theme.of(context).colorScheme.secondary,
|
||||
// fontWeight: FontWeight.bold,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.only(left: 16),
|
||||
// child: SwitchListTile.adaptive(
|
||||
// title: Text(
|
||||
// L10n.of(context)!.enableModeration,
|
||||
// style: TextStyle(
|
||||
// color: Theme.of(context).colorScheme.secondary,
|
||||
// fontWeight: FontWeight.bold,
|
||||
// ),
|
||||
// ),
|
||||
// subtitle: Text(L10n.of(context)!.enableModerationDesc),
|
||||
// secondary: CircleAvatar(
|
||||
// backgroundColor:
|
||||
// Theme.of(context).scaffoldBackgroundColor,
|
||||
// foregroundColor:
|
||||
// Theme.of(context).textTheme.bodyLarge!.color,
|
||||
// child: const Icon(Icons.shield_outlined),
|
||||
// ),
|
||||
// activeColor: AppConfig.activeToggleColor,
|
||||
// value: botOptions.safetyModeration,
|
||||
// onChanged: (bool newValue) => updateBotOption(() {
|
||||
// botOptions.safetyModeration = newValue;
|
||||
// }),
|
||||
// ),
|
||||
// ),
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(32, 16, 0, 0),
|
||||
child: Text(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue