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
|
// 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) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue