mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-03 13:38:00 +00:00
perf: btn color (#423)
This commit is contained in:
@@ -5,6 +5,7 @@ import { authUser } from '@fastgpt/service/support/user/auth';
|
||||
import { App } from '@/service/models/app';
|
||||
import type { AppUpdateParams } from '@/types/app';
|
||||
import { authApp } from '@/service/utils/auth';
|
||||
import { SystemOutputEnum } from '@/constants/app';
|
||||
|
||||
/* 获取我的模型 */
|
||||
export default async function handler(req: NextApiRequest, res: NextApiResponse<any>) {
|
||||
@@ -40,7 +41,17 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse<
|
||||
'share.isShare': share.isShare,
|
||||
'share.isShareDetail': share.isShareDetail
|
||||
}),
|
||||
...(modules && { modules })
|
||||
...(modules && {
|
||||
modules: modules.map((modules) => ({
|
||||
...modules,
|
||||
outputs: modules.outputs.sort((a, b) => {
|
||||
// finish output always at last
|
||||
if (a.key === SystemOutputEnum.finish) return 1;
|
||||
if (b.key === SystemOutputEnum.finish) return -1;
|
||||
return 0;
|
||||
})
|
||||
}))
|
||||
})
|
||||
}
|
||||
);
|
||||
|
||||
|
@@ -29,7 +29,7 @@ import { pushChatBill } from '@/service/common/bill/push';
|
||||
import { BillSourceEnum } from '@/constants/user';
|
||||
import { ChatHistoryItemResType } from '@/types/chat';
|
||||
import type { UserModelSchema } from '@fastgpt/global/support/user/type';
|
||||
import { SystemInputEnum } from '@/constants/app';
|
||||
import { SystemInputEnum, SystemOutputEnum } from '@/constants/app';
|
||||
import { getSystemTime } from '@fastgpt/global/common/time/timezone';
|
||||
import { authOutLinkChat } from '@fastgpt/service/support/outLink/auth';
|
||||
import { pushResult2Remote, updateOutLinkUsage } from '@fastgpt/service/support/outLink/tools';
|
||||
@@ -431,7 +431,7 @@ export async function dispatchModules({
|
||||
inputs: params
|
||||
};
|
||||
|
||||
const dispatchRes = await (async () => {
|
||||
const dispatchRes: Record<string, any> = await (async () => {
|
||||
const callbackMap: Record<string, Function> = {
|
||||
[FlowModuleTypeEnum.historyNode]: dispatchHistory,
|
||||
[FlowModuleTypeEnum.questionInput]: dispatchChatInput,
|
||||
@@ -449,7 +449,10 @@ export async function dispatchModules({
|
||||
return {};
|
||||
})();
|
||||
|
||||
return moduleOutput(module, dispatchRes);
|
||||
return moduleOutput(module, {
|
||||
[SystemOutputEnum.finish]: true,
|
||||
...dispatchRes
|
||||
});
|
||||
}
|
||||
|
||||
// start process width initInput
|
||||
|
Reference in New Issue
Block a user