Fix: ignore all-day conflicts, verify chat credits

- Ganztägige Konflikt-Prüfung: EventPlannerService hatte bereits
  ->where('is_all_day', false) in hasConflict() + hasMultiDayConflict()
  AgentActionService delegiert dorthin — kein zusätzlicher Fix nötig
- Chat-Credits: immer 5 Credits pauschal (vorher: nur 1. Nachricht einer
  Session, Follow-ups = 0 + kein Log)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main
boban 2026-04-19 07:36:01 +02:00
parent 68aa62db6f
commit e205186465
1 changed files with 6 additions and 10 deletions

View File

@ -175,12 +175,10 @@ class AgentChatController extends Controller
} }
// Credits berechnen — Flat-Rate-Logik // Credits berechnen — Flat-Rate-Logik
// - Aktionen: tokenbasiert (wie bisher) // - Aktionen: tokenbasiert, nur bei Erfolg
// - Erster Chat einer Session (history leer): pauschal 5 Credits // - Chat (type = 'chat'): immer pauschal 5 Credits
// - Folge-Chat-Nachrichten: 0 Credits, kein Log
$type = $parsed['type'] ?? 'chat'; $type = $parsed['type'] ?? 'chat';
$isAction = $type !== 'chat'; $isAction = $type !== 'chat';
$historyCount = count($request->input('conversation_history', []));
$shouldLog = true; $shouldLog = true;
if ($isAction) { if ($isAction) {
@ -194,11 +192,9 @@ class AgentChatController extends Controller
} else { } else {
$credits = $this->calculateCredits($usage, $aiConfig, $type); $credits = $this->calculateCredits($usage, $aiConfig, $type);
} }
} elseif ($historyCount === 0) {
$credits = 5;
} else { } else {
$credits = 0; // Chat: immer 5 Credits pauschal
$shouldLog = false; $credits = 5;
} }
if ($shouldLog) { if ($shouldLog) {