feat(chat): redesign chat UI with structured rendering and interactive action buttons
This commit is contained in:
@@ -98,7 +98,7 @@
|
||||
|
||||
case 'chat_update':
|
||||
if (msg.sessionId === sessionPanel.activeSessionId) {
|
||||
chatPanel.updateChat(msg.html);
|
||||
chatPanel.updateChat(msg.messages);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -129,6 +129,10 @@
|
||||
case 'screencast_stopped':
|
||||
break;
|
||||
|
||||
case 'action_clicked':
|
||||
// 서버에서의 확인 응답 (토스트는 이미 프론트엔드에서 표시)
|
||||
break;
|
||||
|
||||
case 'error':
|
||||
showToast(msg.message, 'error');
|
||||
break;
|
||||
@@ -164,6 +168,17 @@
|
||||
});
|
||||
};
|
||||
|
||||
chatPanel.onActionClick = (button) => {
|
||||
sendWs({
|
||||
type: 'click_action',
|
||||
sessionId: sessionPanel.activeSessionId,
|
||||
label: button.label,
|
||||
x: button.x,
|
||||
y: button.y,
|
||||
});
|
||||
showToast(`"${button.label}" 클릭`, 'success');
|
||||
};
|
||||
|
||||
// ─── 미러 패널 이벤트 ─────────────────────────────
|
||||
mirrorPanel.onStartScreencast = (sessionId) => {
|
||||
sendWs({ type: 'start_screencast', sessionId });
|
||||
|
||||
Reference in New Issue
Block a user