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
parent
68aa62db6f
commit
e205186465
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue