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