* fix: chat module link

* fix: url fetch check

* fix: import file ui

* feat: app logs

* perf: iframe icon

* imgs cdn

* perf: click range and pg
This commit is contained in:
Archer
2023-08-24 21:08:49 +08:00
committed by GitHub
parent 2b50dac0e7
commit 9415e22de9
30 changed files with 506 additions and 63 deletions

View File

@@ -1,7 +1,8 @@
### Fast GPT V4.1
### Fast GPT V4.2
1. 新增 - 高级编排导入导出功能
2. 优化对话存储结构
3. 优化日志存储
4. [点击查看高级编排介绍文档](https://doc.fastgpt.run/docs/workflow)
5. 填写个人 OpenAI 账号后,分享和 API 功能也不会走平台余额扣费。
1. 新增 - 应用日志初版,可观测到所有对话记录
2. 新增 - 好友邀请链接,[点击查看](/account?currentTab=promotion)
3. 新增 - Iframe 嵌入页面图标可拖拽
4. 优化 - 知识库搜索提示词
5. 优化 - [使用文档](https://doc.fastgpt.run/docs/intro/)
6. [点击查看高级编排介绍文档](https://doc.fastgpt.run/docs/workflow)

View File

@@ -20,11 +20,9 @@ async function embedChatbot() {
const ChatBtn = document.createElement('div');
ChatBtn.id = chatBtnId;
ChatBtn.style.cssText =
'position: fixed; bottom: 1rem; right: 1rem; width: 40px; height: 40px; cursor: pointer; z-index: 2147483647; ';
'position: fixed; bottom: 1rem; right: 1rem; width: 40px; height: 40px; cursor: pointer; z-index: 2147483647; transition: 0;';
const ChatBtnDiv = document.createElement('div');
ChatBtnDiv.style.cssText =
'transition: all 0.2s ease-in-out 0s; left: unset; transform: scale(1); :hover {transform: scale(1.1);} display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; z-index: 9999;';
ChatBtnDiv.innerHTML = MessageIcon;
const iframe = document.createElement('iframe');
@@ -38,7 +36,15 @@ async function embedChatbot() {
document.body.appendChild(iframe);
let chatBtnDragged = false;
let chatBtnDown = false;
let chatBtnMouseX;
let chatBtnMouseY;
ChatBtn.addEventListener('click', function () {
if (chatBtnDragged) {
chatBtnDragged = false;
return;
}
const chatWindow = document.getElementById(chatWindowId);
if (!chatWindow) return;
@@ -52,6 +58,31 @@ async function embedChatbot() {
}
});
ChatBtn.addEventListener('mousedown', (e) => {
if (!chatBtnMouseX && !chatBtnMouseY) {
chatBtnMouseX = e.clientX;
chatBtnMouseY = e.clientY;
}
chatBtnDown = true;
});
ChatBtn.addEventListener('mousemove', (e) => {
if (!chatBtnDown) return;
chatBtnDragged = true;
const transformX = e.clientX - chatBtnMouseX;
const transformY = e.clientY - chatBtnMouseY;
ChatBtn.style.transform = `translate3d(${transformX}px, ${transformY}px, 0)`;
e.stopPropagation();
});
ChatBtn.addEventListener('mouseup', (e) => {
chatBtnDown = false;
});
ChatBtn.addEventListener('mouseleave', (e) => {
chatBtnDown = false;
});
ChatBtn.appendChild(ChatBtnDiv);
document.body.appendChild(ChatBtn);
}

View File

@@ -4,9 +4,12 @@
"Confirm": "Yes",
"Running": "Running",
"Warning": "Warning",
"UnKnow": "UnKnow",
"app": {
"Advance App TestTip": "The current application is advanced editing mode \n. If you need to switch to [simple mode], please click the save button on the left",
"App Detail": "App Detail",
"Chat Logs Tips": "Logs record the app's online, shared, and API conversations",
"Chat logs": "Chat Logs",
"Confirm Del App Tip": "Confirm to delete the app and all its chats",
"Confirm Save App Tip": "The application may be in advanced orchestration mode, and the advanced orchestration configuration will be overwritten after saving, please confirm!",
"Connection is invalid": "Connecting is invalid",
@@ -18,6 +21,11 @@
"Import Config Failed": "Failed to import the configuration, please ensure that the configuration is normal!",
"Import Configs": "Import Configs",
"Input Field Settings": "Input Field Settings",
"Logs Empty": "Logs is empty",
"Logs Message Total": "Message Count",
"Logs Source": "Source",
"Logs Time": "Time",
"Logs Title": "Title",
"My Apps": "My Apps",
"Output Field Settings": "Output Field Settings",
"Paste Config": "Paste Config"
@@ -28,7 +36,13 @@
"Exit Chat": "Exit",
"History": "History",
"New Chat": "New Chat",
"You need to a chat app": "You need to a chat app"
"You need to a chat app": "You need to a chat app",
"logs": {
"api": "API",
"online": "Online Chat",
"share": "Share",
"test": "Test Chat "
}
},
"commom": {
"Password inconsistency": "Password inconsistency"
@@ -149,6 +163,10 @@
"Update Password": "Update Password",
"Update password failed": "Update password failed",
"Update password succseful": "Update password succseful",
"Usage Record": "Usage"
"Usage Record": "Usage",
"promotion": {
"pay": "",
"register": ""
}
}
}

View File

@@ -4,9 +4,12 @@
"Confirm": "确认",
"Running": "运行中",
"Warning": "提示",
"UnKnow": "未知",
"app": {
"Advance App TestTip": "当前应用为高级编排模式\n如需切换为【简易模式】请点击左侧保存按键",
"App Detail": "应用详情",
"Chat Logs Tips": "日志会记录该应用的在线、分享和 API 对话记录",
"Chat logs": "对话日志",
"Confirm Del App Tip": "确认删除该应用及其所有聊天记录?",
"Confirm Save App Tip": "该应用可能为高级编排模式,保存后将会覆盖高级编排配置,请确认!",
"Connection is invalid": "连接无效",
@@ -18,6 +21,11 @@
"Import Config Failed": "导入配置失败,请确保配置正常!",
"Import Configs": "导入配置",
"Input Field Settings": "输入字段编辑",
"Logs Empty": "还没有日志噢~",
"Logs Message Total": "消息总数",
"Logs Source": "来源",
"Logs Time": "时间",
"Logs Title": "标题",
"My Apps": "我的应用",
"Output Field Settings": "输出字段编辑",
"Paste Config": "粘贴配置"
@@ -28,7 +36,13 @@
"Exit Chat": "退出聊天",
"History": "记录",
"New Chat": "新对话",
"You need to a chat app": "你需要创建一个应用"
"You need to a chat app": "你需要创建一个应用",
"logs": {
"api": "API 调用",
"online": "在线使用",
"share": "外部链接调用",
"test": "测试"
}
},
"commom": {
"Password inconsistency": "两次密码不一致"
@@ -151,8 +165,8 @@
"Update password succseful": "修改密码成功",
"Usage Record": "使用记录",
"promotion": {
"register": "好友注册",
"pay": "好友充值"
"pay": "好友充值",
"register": "好友注册"
}
}
}