Spaces:
Sleeping
Sleeping
File size: 1,021 Bytes
0bb4dfa | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | import React from 'react';
import { Play } from 'lucide-react';
/**
* Inline banner shown when the orchestrator hits one of the two
* failsafes (60+20 messages, 100+50 orchestrator calls). User clicks
* Continue to grant another batch.
*/
export default function FailsafePauseBanner({ pause, onContinue }) {
if (!pause) return null;
const incLabel = pause.reason === 'messages' ? '+20 messages' : '+50 orchestrator calls';
const titleLabel = pause.reason === 'messages'
? 'Conversation paused (message cap)'
: 'Conversation paused (orchestrator call cap)';
return (
<div className="ccai-failsafe-banner">
<div>
<div className="ccai-failsafe-title">{titleLabel}</div>
<div className="ccai-failsafe-text">{pause.message}</div>
</div>
<button className="btn-primary" onClick={() => onContinue(pause.reason)}>
<Play size={14} style={{ verticalAlign: 'middle', marginRight: 4 }} />
Continue conversation ({incLabel})
</button>
</div>
);
}
|