feat: add delete_task tool + expose delete tools to AI gateway
Shira can now delete tasks, meetings, and calls when they're no longer needed. delete_meeting and delete_call handlers already existed but weren't exposed to the AI. SmartAssistant v2.5.2 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -44,6 +44,7 @@ class ActionExecutor
|
|||||||
'create_call' => $this->createCall($params, $caseId, $userId),
|
'create_call' => $this->createCall($params, $caseId, $userId),
|
||||||
'delete_meeting' => $this->deleteMeeting($params),
|
'delete_meeting' => $this->deleteMeeting($params),
|
||||||
'delete_call' => $this->deleteCall($params),
|
'delete_call' => $this->deleteCall($params),
|
||||||
|
'delete_task' => $this->deleteTask($params),
|
||||||
'delete_note' => $this->deleteNote($params),
|
'delete_note' => $this->deleteNote($params),
|
||||||
'schedule_hearing' => $this->scheduleHearing($params, $caseId, $userId),
|
'schedule_hearing' => $this->scheduleHearing($params, $caseId, $userId),
|
||||||
'list_documents' => $this->listDocuments($caseId),
|
'list_documents' => $this->listDocuments($caseId),
|
||||||
@@ -288,6 +289,29 @@ class ActionExecutor
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function deleteTask(array $params): array
|
||||||
|
{
|
||||||
|
$entityId = $params['entityId'] ?? null;
|
||||||
|
if (!$entityId) {
|
||||||
|
throw new Error('entityId parameter is required.');
|
||||||
|
}
|
||||||
|
|
||||||
|
$entity = $this->entityManager->getEntityById('Task', $entityId);
|
||||||
|
if (!$entity) {
|
||||||
|
throw new NotFound("Task {$entityId} not found.");
|
||||||
|
}
|
||||||
|
|
||||||
|
$name = $entity->get('name') ?? '';
|
||||||
|
$this->entityManager->removeEntity($entity);
|
||||||
|
|
||||||
|
return [
|
||||||
|
'success' => true,
|
||||||
|
'message' => "✅ משימה \"{$name}\" נמחקה בהצלחה",
|
||||||
|
'entityType' => 'Task',
|
||||||
|
'entityId' => $entityId,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
private function scheduleHearing(array $params, ?string $caseId, string $userId): array
|
private function scheduleHearing(array $params, ?string $caseId, string $userId): array
|
||||||
{
|
{
|
||||||
$case = $this->entityManager->getEntityById('Case', $caseId);
|
$case = $this->entityManager->getEntityById('Case', $caseId);
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
"module": "SmartAssistant",
|
"module": "SmartAssistant",
|
||||||
"description": "Unified AI Assistant for Legal CRM — floating chat with case memory, office alerts, and AI Gateway integration",
|
"description": "Unified AI Assistant for Legal CRM — floating chat with case memory, office alerts, and AI Gateway integration",
|
||||||
"author": "klear",
|
"author": "klear",
|
||||||
"version": "2.5.1",
|
"version": "2.5.2",
|
||||||
"acceptableVersions": [
|
"acceptableVersions": [
|
||||||
">=8.0.0"
|
">=8.0.0"
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user