feat: Implement AI Chat Agent, Email Notifications, and UI enhancements
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
+10
-6
@@ -31,17 +31,21 @@ export const parseTaskInput = (input: string): ParsedTask => {
|
||||
const tomorrow = new Date(today);
|
||||
tomorrow.setDate(tomorrow.getDate() + 1);
|
||||
|
||||
if (title.match(/\btomorrow\b/i)) {
|
||||
const matchTomorrow = title.match(/\b(tomorrow|morgen)\b/i);
|
||||
const matchToday = title.match(/\b(today|heute)\b/i);
|
||||
const matchNextWeek = title.match(/\b(next week|nächste woche)\b/i);
|
||||
|
||||
if (matchTomorrow) {
|
||||
dueDate = tomorrow;
|
||||
title = title.replace(/\btomorrow\b/i, '').trim();
|
||||
} else if (title.match(/\btoday\b/i)) {
|
||||
title = title.replace(matchTomorrow[0], '').trim();
|
||||
} else if (matchToday) {
|
||||
dueDate = today;
|
||||
title = title.replace(/\btoday\b/i, '').trim();
|
||||
} else if (title.match(/\bnext week\b/i)) {
|
||||
title = title.replace(matchToday[0], '').trim();
|
||||
} else if (matchNextWeek) {
|
||||
const nextWeek = new Date(today);
|
||||
nextWeek.setDate(today.getDate() + 7);
|
||||
dueDate = nextWeek;
|
||||
title = title.replace(/\bnext week\b/i, '').trim();
|
||||
title = title.replace(matchNextWeek[0], '').trim();
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user