4.8.10 test (#2539)

* fix: i18n

* fix: null value

* fix: workflow refresh variables

* perf: copy data

* doc

* perf: run app code

* perf: variable store

* update doc

* perf: pay ui

* fix: log header ui

* fix: log header ui
This commit is contained in:
Archer
2024-08-27 19:48:42 +08:00
committed by GitHub
parent 454a479fd8
commit c9bb39d802
20 changed files with 87 additions and 118 deletions

View File

@@ -45,8 +45,7 @@ const systemNodes: FlowNodeTemplateType[] = [
LafModule,
IfElseNode,
VariableUpdateNode,
CodeNode,
RunAppModule
CodeNode
];
/* app flow module templates */
export const appSystemModuleTemplates: FlowNodeTemplateType[] = [
@@ -72,5 +71,6 @@ export const moduleTemplatesFlat: FlowNodeTemplateType[] = [
),
EmptyNode,
RunPluginModule,
RunAppPluginModule
RunAppPluginModule,
RunAppModule
];

View File

@@ -72,15 +72,3 @@ export const standardSubLevelMap = {
weight: 5
}
};
export enum PackageChangeStatusEnum {
buy = 'buy',
renewal = 'renewal',
upgrade = 'upgrade'
}
export const packagePayTextMap = {
[PackageChangeStatusEnum.buy]: i18nT('common:pay.package_tip.buy'),
[PackageChangeStatusEnum.renewal]: i18nT('common:pay.package_tip.renewal'),
[PackageChangeStatusEnum.upgrade]: i18nT('common:pay.package_tip.upgrade')
};

View File

@@ -5,7 +5,6 @@ import { ChatItemValueTypeEnum, ChatRoleEnum } from '@fastgpt/global/core/chat/c
import { delFileByFileIdList, getGFSCollection } from '../../common/file/gridfs/controller';
import { BucketNameEnum } from '@fastgpt/global/common/file/constants';
import { MongoChat } from './chatSchema';
import { ChatSchema as ChatType } from '@fastgpt/global/core/chat/type.d';
export async function getChatItems({
appId,
@@ -37,24 +36,6 @@ export async function getChatItems({
return { histories };
}
export async function getChat({
appId,
chatId,
field
}: {
appId: string;
chatId?: string;
field: string;
}): Promise<{ chat: ChatType | null }> {
if (!chatId) {
return { chat: null };
}
const chat = await MongoChat.findOne({ appId, chatId }, field).lean();
return { chat };
}
/* Temporary adaptation for old conversation records */
export const adaptStringValue = (value: any): ChatItemValueItemType[] => {
if (typeof value === 'string') {

View File

@@ -357,7 +357,7 @@ async function streamResponse({
const responseChoice = part.choices?.[0]?.delta;
// console.log(responseChoice, '---===');
if (responseChoice.content) {
if (responseChoice?.content) {
const content = responseChoice?.content || '';
textAnswer += content;

View File

@@ -44,7 +44,7 @@ const MyMenu = ({
iconSize = '1rem',
Button,
menuList,
iconRadius = 'sm',
iconRadius,
placement = 'bottom-start'
}: Props) => {
const typeMapStyle: Record<MenuItemType, MenuItemProps> = {

View File

@@ -126,6 +126,7 @@
"Confirm to leave the page": "Confirm to leave the page?",
"Copy": "Copy",
"Copy Successful": "Copy Successful",
"Copy_failed": "Copy failed, please copy manually",
"Create Failed": "Create Failed",
"Create New": "Create New",
"Create Success": "Create Success",
@@ -1430,7 +1431,7 @@
"Quote Content Tip": "You can customize the structure of the quote content to better adapt to different scenarios. You can use some variables for template configuration:\n{{q}} - search content, {{a}} - expected content, {{source}} - source, {{sourceId}} - source file name, {{index}} - the nth quote, they are all optional, here are the default values:\n{{default}}",
"Quote Prompt Tip": "You can use {{quote}} to insert the quote content template, and use {{question}} to insert the question. Here are the default values:\n{{default}}"
},
"textarea_variable_picker_tip": "Input / to select variables",
"textarea_variable_picker_tip": "Input '/' to select variables",
"tool_field": "Tool field parameter configuration",
"undefined_var": "An undefined variable is referenced. Is it automatically added?",
"unit": {

View File

@@ -128,6 +128,7 @@
"Confirm to leave the page": "确认离开该页面?",
"Copy": "复制",
"Copy Successful": "复制成功",
"Copy_failed": "复制失败,请手动复制",
"Create Failed": "创建异常",
"Create New": "新建",
"Create Success": "创建成功",
@@ -637,7 +638,8 @@
"success": "开始同步"
}
},
"training": {}
"training": {
}
},
"data": {
"Auxiliary Data": "辅助数据",
@@ -1429,7 +1431,7 @@
"Quote Content Tip": "可以自定义引用内容的结构,以更好的适配不同场景。可以使用一些变量来进行模板配置:\n{{q}} - 检索内容,{{a}} - 预期内容,{{source}} - 来源,{{sourceId}} - 来源文件名,{{index}} - 第 n 个引用,他们都是可选的,下面是默认值:\n{{default}}",
"Quote Prompt Tip": "可以用 {{quote}} 来插入引用内容模板,使用 {{question}} 来插入问题。下面是默认值:\n{{default}}"
},
"textarea_variable_picker_tip": "输入 / 可选择变量",
"textarea_variable_picker_tip": "输入\"/\"可选择变量",
"tool_field": "工具字段参数配置",
"undefined_var": "引用了未定义的变量,是否自动添加?",
"unit": {