scheduler improvements

frdel committed May 3, 2025 at 20:53 UTC 8f03b9ff42ef6c25ef28a577f1028d3b216ecea8
4 files changed +13
prompts/default/agent.system.tool.scheduler.md
+5
@@ -11,6 +11,11 @@ dedicated_context flag then the task will run in the chat it was created in incl
11 There are manual and automatically executed tasks.
12 Automatic execution happens by a schedule defined when creating the task.
13
14 +### Important instructions
15 +When a task is scheduled or planned, do not manually run it, if you have no more tasks, respond to user.
16 +Be careful not to create recursive prompt, do not send a message that would make the agent schedule more tasks, no need to mention the interval in message, just the objective.
17 +
18 +
19 ### Types of scheduler tasks
20 There are 3 types of scheduler tasks:
21
webui/index.css
+2
@@ -991,6 +991,8 @@ pre {
991 padding: 0.125rem 0.5rem;
992 -webkit-transition: all var(--transition-speed) ease-in-out;
993 transition: all var(--transition-speed) ease-in-out;
994 + width: 2rem;
995 + height: 2rem;
996 }
997
998 .edit-button:hover {
webui/index.html
+2
@@ -230,11 +230,13 @@
230 </button>
231 <button class="edit-button"
232 @click.stop="resetChat(task.id)"
233 + style="margin-right: 5px;"
234 title="Reset chat">
235 <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 122.88 121.1" fill="var(--color-primary)" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
236 <path d="M62.89,56.03c1.11-0.35,2.34-0.25,3.72,0.37l10.4,7.87c2.26,1.71,4.24,3.78,2.73,6.9 c-0.51,1.06-1.4,2.1-2.38,3.49l-0.53,0.75c-1.97,2.8-2.61,2-5.71,1.83c0.56,13.37,1.75,27.82-2.64,40.88 c-0.87,2.7-3.32,3.44-6.95,2.71l-6.1-2.03c4.11-6.14,6.16-13.85,6.44-22.89c-3.46,8.58-6.8,16.96-10.68,20.86l-6.28-2.08 c0.61-3.05,1.05-5.43,0.35-6.9l-4.07,4.24l-9.33-5.77c6.36-3.36,11.62-7.87,15.6-13.73c-6.69,5.01-12.76,8.1-18.14,8.99 c-2.75,0.83-4.49,0.35-5.16-1.53c-0.48-1.34-0.05-1.77,0.81-2.86c1.11-1.41,2.61-2.67,4.35-3.79c-3.13,1.1-4.64,0.95-6.37,1.51 c-4.9,1.59-9.94-1.86-8.26-6.9c1.07-3.23,3.54-3.09,6.67-4.07l5.42-1.69c-5.19,0.28-10.32,0.45-15.02-0.25 c-5.4-0.8-5.31-0.99-8.24-5.38c-3.94-5.91-6.25-11.45,2.52-9.16c16.73,3.18,33.56,5.34,51.25-0.98c-0.76-1.32-0.9-2.57-0.5-3.73 C57.37,60.94,61.13,56.58,62.89,56.03L62.89,56.03z M113.8,2.42L74.45,51.53c-4.71,6.68,3.2,11.91,8.39,5.64l39.2-49.27 C125.12,1.86,119.13-3.16,113.8,2.42L113.8,2.42z"/>
237 </svg>
238 </button>
239 + <button class="edit-button" @click.stop="deleteTaskGlobal(task.id)">X</button>
240
241 </div>
242 </div>
webui/js/scheduler.js
+4
@@ -1418,6 +1418,7 @@ const fullComponentImplementation = function() {
1418 };
1419 };
1420
1421 +
1422 // Only define the component if it doesn't already exist or extend the existing one
1423 if (!window.schedulerSettings) {
1424 console.log('Defining schedulerSettings component from scratch');
@@ -1464,6 +1465,9 @@ if (!window.schedulerSettings) {
1465 }
1466 });
1467
1468 + // hack to expose deleteTask
1469 + window.deleteTaskGlobal = this.deleteTask.bind(this);
1470 +
1471 // Make sure we have a filteredTasks array initialized
1472 this.filteredTasks = [];
1473