Commit 40f527a0 by Archer Committed by GitHub

4.8.12 test (#2936)

* system config tip

* perf: prompt editor code

* perf: cookie tip
parent 4aaf9bfe
......@@ -15,6 +15,7 @@ weight: 812
4. 新增 - Debug 模式支持输入全局变量
5. 新增 - chat openapi 文档
6. 新增 - wiki 搜索插件
7. 修复 - 文件后缀判断,去除 query 影响。
8. 修复 - AI 响应为空时,会造成 LLM 历史记录合并。
9. 修复 - 用户交互节点未阻塞流程。
7. 新增 - Cookie 隐私协议提示
8. 修复 - 文件后缀判断,去除 query 影响。
9. 修复 - AI 响应为空时,会造成 LLM 历史记录合并。
10. 修复 - 用户交互节点未阻塞流程。
{
"author": "",
"author": "silencezhang7",
"version": "486",
"name": "BI图表功能",
"avatar": "core/workflow/template/BI",
......
......@@ -243,7 +243,7 @@ const toolChoice = async (props: ActionProps) => {
const arg: Record<string, any> = (() => {
try {
return json5.parse(
response?.choices?.[0]?.message?.tool_calls?.[0]?.function?.arguments || '{}'
response?.choices?.[0]?.message?.tool_calls?.[0]?.function?.arguments || ''
);
} catch (error) {
console.log(agentFunction.parameters);
......
......@@ -6,7 +6,7 @@
*
*/
import { useState, useRef, useTransition, useCallback } from 'react';
import { useState, useTransition } from 'react';
import { LexicalComposer } from '@lexical/react/LexicalComposer';
import { PlainTextPlugin } from '@lexical/react/LexicalPlainTextPlugin';
import { ContentEditable } from '@lexical/react/LexicalContentEditable';
......
......@@ -25,7 +25,7 @@
"usedInExtractFields": true, // 是否用于内容提取(务必保证至少有一个为true)
"usedInToolCall": true, // 是否用于工具调用(务必保证至少有一个为true)
"usedInQueryExtension": true, // 是否用于问题优化(务必保证至少有一个为true)
"toolChoice": true, // 是否支持工具选择(分类,内容提取,工具调用会用到。目前只有gpt支持)
"toolChoice": true, // 是否支持工具选择(分类,内容提取,工具调用会用到。)
"functionCall": false, // 是否支持函数调用(分类,内容提取,工具调用会用到。会优先使用 toolChoice,如果为false,则使用 functionCall,如果仍为 false,则使用提示词模式)
"customCQPrompt": "", // 自定义文本分类提示词(不支持工具和函数调用的模型
"customExtractPrompt": "", // 自定义内容提取提示词
......
......@@ -123,7 +123,6 @@ export const getEditorVariables = ({
const sourceNodeVariables = !sourceNodes
? []
: sourceNodes
.reverse()
.map((node) => {
return node.outputs
.filter((output) => !!output.label)
......
......@@ -46,23 +46,15 @@ const Login = ({ ChineseRedirectUrl }: { ChineseRedirectUrl: string }) => {
const { setLastChatId, setLastChatAppId } = useChatStore();
const { isOpen, onOpen, onClose } = useDisclosure();
const { isPc } = useSystem();
const {
isOpen: isOpenRedirect,
onOpen: onOpenRedirect,
onClose: onCloseRedirect
} = useDisclosure();
const {
isOpen: isOpenCookiesDrawer,
onOpen: onOpenCookiesDrawer,
onClose: onCloseCookiesDrawer
} = useDisclosure();
const [showRedirect, setShowRedirect] = useLocalStorageState<boolean>('showRedirect', {
defaultValue: true
});
const cookieVersion = 1;
const cookieVersion = '1';
const [localCookieVersion, setLocalCookieVersion] =
useLocalStorageState<number>('localCookieVersion');
useLocalStorageState<string>('localCookieVersion');
const loginSuccess = useCallback(
(res: ResLogin) => {
......@@ -99,6 +91,14 @@ const Login = ({ ChineseRedirectUrl }: { ChineseRedirectUrl: string }) => {
);
}, [feConfigs.oauth]);
const {
isOpen: isOpenRedirect,
onOpen: onOpenRedirect,
onClose: onCloseRedirect
} = useDisclosure();
const [showRedirect, setShowRedirect] = useLocalStorageState<boolean>('showRedirect', {
defaultValue: true
});
const checkIpInChina = useCallback(async () => {
try {
const res = await GET<any>(ipDetectURL);
......@@ -116,9 +116,11 @@ const Login = ({ ChineseRedirectUrl }: { ChineseRedirectUrl: string }) => {
console.log(error);
}
}, [onOpenRedirect]);
useMount(() => {
clearToken();
router.prefetch('/app/list');
ChineseRedirectUrl && showRedirect && checkIpInChina();
localCookieVersion !== cookieVersion && onOpenCookiesDrawer();
});
......@@ -249,7 +251,6 @@ function RedirectDrawer({
function CookiesDrawer({ onClose, onAgree }: { onClose: () => void; onAgree: () => void }) {
const { t } = useTranslation();
const router = useRouter();
return (
<Drawer placement="bottom" size={'xs'} isOpen={true} onClose={onClose}>
......@@ -268,7 +269,7 @@ function CookiesDrawer({ onClose, onAgree }: { onClose: () => void; onAgree: ()
textDecorationLine={'underline'}
cursor={'pointer'}
w={'fit-content'}
onClick={() => router.push(getDocPath('/docs/agreement/privacy/'))}
onClick={() => window.open(getDocPath('/docs/agreement/privacy/'), '_blank')}
>
{t('login:privacy_policy')}
</Box>
......
......@@ -211,7 +211,7 @@ export const computedNodeInputReference = ({
};
findSourceNode(nodeId);
sourceNodes.unshift(
sourceNodes.push(
getGlobalVariableNode({
nodes,
t,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment