Center camera text and bind text with state

This commit is contained in:
Xin Wang
2026-06-02 09:55:38 +08:00
parent 21f6c17388
commit 6cf31c7062
2 changed files with 4 additions and 7 deletions

View File

@@ -263,12 +263,6 @@ function syncCameraDrawer(value) {
setCameraButtonEnabled();
}
function updateCameraQuestion(text) {
const value = typeof text === "string" ? text.trim() : "";
if (!state.cameraState || !value) return;
els.cameraQuestion.textContent = value;
}
function addBubble(role, text) {
if (els.chatLog.querySelector(".chat__empty")) {
els.chatLog.innerHTML = "";
@@ -1139,7 +1133,6 @@ function handleAssistantFinal(text, interrupted) {
if (interrupted) {
state.currentAssistantBubble.classList.add("bubble--interrupted");
}
updateCameraQuestion(text);
state.currentAssistantBubble = null;
scrollChatToBottom();
}

View File

@@ -277,6 +277,10 @@ body {
.camera-drawer__source {
flex: 1 1 auto;
display: inline-flex;
align-items: center;
justify-content: center;
text-align: center;
min-height: 38px;
font-size: 13px;
font-weight: 600;