Browse Source

增加渲染切片条件

李富豪 6 tháng trước cách đây
mục cha
commit
832aa30ecb
1 tập tin đã thay đổi với 7 bổ sung0 xóa
  1. 7 0
      app/components/chat.tsx

+ 7 - 0
app/components/chat.tsx

@@ -1757,6 +1757,7 @@ function _Chat() {
           messages.length > 1 ?
             <>
               {messages.map((message, i) => {
+                console.log(message.sliceInfo, 'sliceInfo');
                 const isUser = message.role === "user";
                 const isContext = i < context.length;
                 const showActions =
@@ -1865,6 +1866,12 @@ function _Chat() {
                               }
                             </div>
                         }
+                        {
+                          message.sliceInfo &&
+                          <div>
+                            {/* 渲染切片 */}
+                          </div>
+                        }
                         <div className={styles["chat-message-item"]}>
                           <Markdown
                             key={message.streaming ? "loading" : "done"}