fix: re-enable chat text message handler

- re-enable and update SEND_MESSAGE_CONTENT_TEXT event listener in ChatMainList
- simplify truthy length check for incoming text messages
- adjust padding and margin classes for LongTextGuideCardPreview component
- add debug log to openDetail function
This commit is contained in:
duanshuwen
2026-06-27 14:50:37 +08:00
parent e71dcad81a
commit df1a95f0c2
2 changed files with 9 additions and 8 deletions

View File

@@ -447,12 +447,12 @@ const addNoticeListener = () => {
// }, 200);
// });
// emitter.on(SEND_MESSAGE_CONTENT_TEXT, (value) => {
// console.log("SEND_MESSAGE_CONTENT_TEXT:", value);
// if (value && value.length > 0) {
// handleReplyText(value);
// }
// });
emitter.on(SEND_MESSAGE_CONTENT_TEXT, (value) => {
console.log("SEND_MESSAGE_CONTENT_TEXT:", value);
if (value && value.length) {
handleReplyText(value);
}
});
emitter.on(SEND_MESSAGE_COMMAND_TYPE, (item) => {
console.log("SEND_MESSAGE_COMMAND_TYPE:", item);

View File

@@ -1,9 +1,9 @@
<template>
<div
class="w-full bg-white overflow-hidden rounded-[20px] flex flex-col min-h-[178px] mb-4 border border-[rgba(15,23,42,0.04)] shadow-[0_12px_28px_rgba(15,23,42,0.04)] box-border transition-[transform,opacity] duration-150 ease-in-out active:scale-[0.985]">
class="w-full bg-white overflow-hidden rounded-[20px] flex flex-col min-h-[178px] my-4 border border-[rgba(15,23,42,0.04)] shadow-[0_12px_28px_rgba(15,23,42,0.04)] box-border transition-[transform,opacity] duration-150 ease-in-out active:scale-[0.985]">
<!-- 占位撑开 -->
<div class="w-full"></div>
<div class="flex flex-col px-[26px] pt-[28px] pb-[22px]" @click="openDetail(item)">
<div class="flex flex-col p-[16px]" @click="openDetail(item)">
<div
class="inline-flex w-fit items-center justify-center min-h-[26px] px-[10px] border rounded-full leading-[18px] text-[12px] font-bold"
@@ -90,6 +90,7 @@ const getBadgeClass = (tone) => {
};
const openDetail = (item) => {
console.log("🚀 ~ openDetail ~ item:", item)
const url = getLongTextGuideDetailRoute(item.type);
if (!url) {
showToast(t("home.longTextCards.missingDetail"));