fix: show undo/redo buttons when server restart error occurs
This commit is contained in:
@@ -1984,7 +1984,8 @@ function renderMessages(session) {
|
||||
|
||||
const isOpencodeMsg = msg.cli === 'opencode' || msg.phase === 'build';
|
||||
const isLatestMessage = latestMessage && latestMessage.id === msg.id;
|
||||
const shouldShowUndoRedo = isOpencodeMsg && isLatestMessage && (status === 'done' || status === 'error' || status === 'cancelled');
|
||||
const isServerRestartError = msg.error === 'Server restart took too long. Please refresh and try again.';
|
||||
const shouldShowUndoRedo = isLatestMessage && (status === 'done' || status === 'error' || status === 'cancelled') && (isOpencodeMsg || isServerRestartError);
|
||||
const shouldRenderAssistantCard = msg.reply || msg.error || (status === 'running' && msg.partialOutput) || shouldShowUndoRedo;
|
||||
|
||||
if (shouldRenderAssistantCard) {
|
||||
|
||||
Reference in New Issue
Block a user