refactor ui for stop hook and userPromptSubmit

This commit is contained in:
DennisYu07 2026-03-25 20:44:55 +08:00
parent 3776825c2d
commit a5c6084222
6 changed files with 346 additions and 6 deletions

View file

@ -230,6 +230,16 @@ const HistoryItemDisplayComponent: React.FC<HistoryItemDisplayProps> = ({
{itemForDisplay.type === 'btw' && itemForDisplay.btw && (
<BtwMessage btw={itemForDisplay.btw} />
)}
{itemForDisplay.type === 'user_prompt_submit_blocked' && (
<ErrorMessage
text={`UserPromptSubmit operation blocked by hook:\n${itemForDisplay.reason}\n\nOriginal prompt: ${itemForDisplay.originalPrompt}`}
/>
)}
{itemForDisplay.type === 'stop_hook_loop' && (
<InfoMessage
text={`Ran ${itemForDisplay.iterationCount} stop hooks\n ⎿ Stop hook reason: ${itemForDisplay.reasons[itemForDisplay.reasons.length - 1]}`}
/>
)}
</Box>
);
};