@@ -64,6 +64,7 @@ class AssistantService {
6464
6565 private const TASK_TYPE_PRIORITIES = [
6666 'chatty-llm ' => 1 ,
67+ 'assignments ' => 1 ,
6768 TextToText::ID => 2 ,
6869 'context_chat:context_chat ' => 3 ,
6970 'legacy:TextProcessing:OCA\ContextChat\TextProcessing\ContextChatTaskType ' => 3 ,
@@ -287,6 +288,9 @@ private function getCategory(string $typeId): array {
287288 if (str_starts_with ($ typeId , 'chatty ' )) {
288289 $ categoryId = 'chat ' ;
289290 $ categoryName = $ this ->l10n ->t ('Chat with AI ' );
291+ } elseif (str_starts_with ($ typeId , 'assignments ' )) {
292+ $ categoryId = 'assignments ' ;
293+ $ categoryName = $ this ->l10n ->t ('Scheduled tasks ' );
290294 } elseif (str_starts_with ($ typeId , 'context_chat ' )) {
291295 $ categoryId = 'context ' ;
292296 $ categoryName = $ this ->l10n ->t ('Context Chat ' );
@@ -435,6 +439,23 @@ public function getAvailableTaskTypes(): array {
435439 'priority ' => self ::TASK_TYPE_PRIORITIES ['chatty-llm ' ] ?? 1000 ,
436440 'preferredProviderName ' => $ preferredProviderName ,
437441 ];
442+ // add the chattyUI assignments virtual task type
443+ $ types [] = [
444+ 'id ' => 'assignments ' ,
445+ 'name ' => $ this ->l10n ->t ('Scheduled tasks ' ),
446+ 'description ' => $ this ->l10n ->t ('Scheduled tasks ' ),
447+ 'category ' => $ this ->getCategory ('assignments ' ),
448+ 'inputShape ' => [],
449+ 'inputShapeEnumValues ' => [],
450+ 'inputShapeDefaults ' => [],
451+ 'outputShape ' => [],
452+ 'optionalInputShape ' => [],
453+ 'optionalInputShapeEnumValues ' => [],
454+ 'optionalInputShapeDefaults ' => [],
455+ 'optionalOutputShape ' => [],
456+ 'priority ' => self ::TASK_TYPE_PRIORITIES ['assignments ' ] ?? 1000 ,
457+ 'preferredProviderName ' => $ preferredProviderName ,
458+ ];
438459 // do not add the raw TextToTextChat type
439460 if (!self ::DEBUG ) {
440461 continue ;
0 commit comments