mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-05 15:31:27 +00:00
refactor ui for stop hook and userPromptSubmit
This commit is contained in:
parent
3776825c2d
commit
a5c6084222
6 changed files with 346 additions and 6 deletions
|
|
@ -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>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue