diff --git a/scripts/deploy/_deploy_lib.sh b/scripts/deploy/_deploy_lib.sh index e69f4307..769138d2 100755 --- a/scripts/deploy/_deploy_lib.sh +++ b/scripts/deploy/_deploy_lib.sh @@ -2,7 +2,7 @@ # Git remote 名(在仓库根目录配置): # git remote add server root@8.166.137.51:/root/frontend/cozsweet -GIT_REMOTE="server" +GIT_REMOTE="test" # 推送指定分支到服务器 # 期望服务器端 post-receive hook 已就位;本脚本只做 git push,不负责构建/启动 diff --git a/src/app/chat/components/chat-area.module.css b/src/app/chat/components/chat-area.module.css index 44c7740c..41ad3f25 100644 --- a/src/app/chat/components/chat-area.module.css +++ b/src/app/chat/components/chat-area.module.css @@ -39,6 +39,7 @@ display: flex; flex-direction: row; align-items: flex-start; + align-self: flex-start; gap: var(--spacing-1, 4px); } diff --git a/src/app/chat/components/text-bubble.module.css b/src/app/chat/components/text-bubble.module.css index ede454a5..900d0d9c 100644 --- a/src/app/chat/components/text-bubble.module.css +++ b/src/app/chat/components/text-bubble.module.css @@ -17,8 +17,6 @@ background: #fff; color: var(--color-text-foreground, #000); border-top-left-radius: 0; - /* 气泡在头像侧的外侧留白 */ - /* margin-left: var(--spacing-4, 16px); */ } .bubbleUser { @@ -29,6 +27,4 @@ ); color: #fff; border-top-right-radius: 0; - /* 气泡在头像侧的外侧留白 */ - /* margin-right: var(--spacing-4, 16px); */ } diff --git a/src/stores/chat/chat-machine.ts b/src/stores/chat/chat-machine.ts index dc1b8872..950c649e 100644 --- a/src/stores/chat/chat-machine.ts +++ b/src/stores/chat/chat-machine.ts @@ -220,18 +220,6 @@ export const chatMachine = setup({ on: { ChatGuestLogin: "#chat.guestSession", ChatNonGuestLogin: "#chat.userSession", - ChatLoadMoreHistory: { - actions: [ - "logLoadMoreHistoryReceived", - ({ context }) => - console.log("[chat-machine] idle.ChatLoadMoreHistory received (but no UI dispatcher)", { - currentOffset: context.historyOffset, - hasMore: context.hasMore, - isLoadingMore: context.isLoadingMore, - }), - ], - target: "loadingMoreHistory", - }, }, }, @@ -522,72 +510,6 @@ export const chatMachine = setup({ }, }, }, - - loadingMoreHistory: { - entry: ({ context }) => - console.log("[chat-machine] → loadingMoreHistory (legacy)", { offset: context.historyOffset }), - invoke: { - src: "loadMoreHistory", - input: ({ context }) => ({ offset: context.historyOffset }), - onDone: { - target: "ready", - actions: [ - assign(({ context, event }) => ({ - messages: [...event.output.messages, ...context.messages], - isLoadingMore: false, - hasMore: event.output.hasMore, - historyOffset: event.output.newOffset, - })), - ({ event }) => - console.log("[chat-machine] loadingMoreHistory.onDone", { - newMessagesCount: event.output.messages.length, - newOffset: event.output.newOffset, - hasMore: event.output.hasMore, - }), - ], - }, - onError: { - target: "ready", - actions: [ - assign({ isLoadingMore: false }), - ({ event }) => - console.error("[chat-machine] loadingMoreHistory.onError", { - error: event.error instanceof Error ? event.error.message : String(event.error), - }), - ], - }, - }, - }, - - ready: { - on: { - ChatSendMessage: { - actions: ["logSendMessageReceived", "appendUserMessage"], - guard: ({ event }) => event.content.trim().length > 0, - }, - ChatSendImage: { - actions: ["logSendImageReceived", "appendUserImage"], - }, - ChatLoadMoreHistory: { - actions: [ - "logLoadMoreHistoryReceived", - ({ context }) => - console.log("[chat-machine] ready.ChatLoadMoreHistory received (legacy ready)", { - currentOffset: context.historyOffset, - hasMore: context.hasMore, - }), - ], - target: "loadingMoreHistory", - }, - ChatLogout: "#chat.idle", - ChatGuestLogin: "#chat.guestSession", - ChatNonGuestLogin: "#chat.userSession", - ChatAISentenceReceived: { actions: "appendOrUpdateAISentence" }, - ChatWebSocketError: { actions: "appendSocketErrorMessage" }, - ChatWebSocketConnected: { actions: "setWsConnected" }, - ChatQuotaExceeded: { actions: "incrementQuotaExceeded" }, - }, - }, }, });