From 1b79f973dafe6f19b0b7b910f1df728103414ea1 Mon Sep 17 00:00:00 2001 From: pingchuan <1259732256@qq.com> Date: Fri, 6 Jun 2025 15:07:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0AI=E8=81=8A=E5=A4=A9=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/chat/chat-input.tsx | 35 +- app/components/chat/chat-message.tsx | 385 +- app/components/chat/index.tsx | 1141 +-- app/components/chat/markdown.tsx | 329 +- app/components/chat/sidebar.tsx | 7 +- app/hooks/use-chat-message.ts | 1194 +-- app/routes/api.chat-messages.tsx | 26 +- app/routes/chat-with-llm._index.tsx | 89 +- app/services/api.client.ts | 1234 +-- app/services/dify-client.server.ts | 22 + .../components/chat-with-llm/chat-input.css | 105 +- .../components/chat-with-llm/chat-message.css | 313 +- app/styles/components/chat-with-llm/index.css | 492 +- .../components/chat-with-llm/markdown.css | 435 +- .../components/chat-with-llm/sidebar.css | 137 +- package-lock.json | 8119 ++++++++++++++++- package.json | 7 + 17 files changed, 11257 insertions(+), 2813 deletions(-) diff --git a/app/components/chat/chat-input.tsx b/app/components/chat/chat-input.tsx index 7f7d276..70ca555 100644 --- a/app/components/chat/chat-input.tsx +++ b/app/components/chat/chat-input.tsx @@ -1,6 +1,6 @@ import React, { useState, useRef, useCallback, useEffect } from 'react'; import { Input, Button, Upload, Tooltip, message as antdMessage, Space } from 'antd'; -import { SendOutlined, StopOutlined, PaperClipOutlined, PictureOutlined } from '@ant-design/icons'; +import { StopOutlined, PictureOutlined, CommentOutlined } from '@ant-design/icons'; import type { VisionFile } from '../../types/dify_chat'; import '../../styles/components/chat-with-llm/chat-input.css'; @@ -184,7 +184,8 @@ export default function ChatInput({ icon={} size="small" disabled={isDisabled} - className="text-gray-500 hover:text-blue-500" + className="chat-upload-button" + shape="circle" /> @@ -192,21 +193,19 @@ export default function ChatInput({ }; return ( -
+
{/* 文件预览 */} {renderFilePreview()} - {/* 输入区域 */} -
-
+ {/* 输入区域 - 方块容器 */} +
+
{/* 上传按钮 */} -
- {renderUploadButton()} -
+ {renderUploadButton()} {/* 文本输入 */} -
+