mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-07 05:40:17 +00:00
Fix logic for setting and sending the initial chat message from the home page
- Load agents only once when the page loads, rather than triggering constant re-renders
This commit is contained in:
@@ -85,7 +85,6 @@ function getEveryBlahFromCron(cron: string) {
|
||||
|
||||
function getDayOfWeekFromCron(cron: string) {
|
||||
const cronParts = cron.split(' ');
|
||||
console.log(cronParts);
|
||||
if (cronParts[3] === '*' && cronParts[4] !== '*') {
|
||||
return Number(cronParts[4]);
|
||||
}
|
||||
@@ -248,7 +247,6 @@ function AutomationsCard(props: AutomationsCardProps) {
|
||||
setTimeRecurrence(getTimeRecurrenceFromCron(automationData.crontime));
|
||||
const frequency = getEveryBlahFromCron(automationData.crontime);
|
||||
|
||||
console.log('frequency', frequency);
|
||||
if (frequency === 'Day') {
|
||||
setIntervalString('Daily');
|
||||
} else if (frequency === 'Week') {
|
||||
|
||||
Reference in New Issue
Block a user