mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-27 08:25:07 +00:00
4.8-preview fix (#1324)
* feishu app release (#85) * Revert "lafAccount add pat & re request when token invalid (#76)" (#77) This reverts commit 83d85dfe37adcaef4833385ea52ee79fd84720be. * perf: workflow ux * system config * feat: feishu app release * chore: sovle the conflicts files; fix the feishu entry * fix: rename Feishu interface to FeishuType * fix: fix type problem in app.ts * fix: type problem * fix: style problem --------- Co-authored-by: Archer <545436317@qq.com> * perf: publish channel code * change system variable position (#94) * perf: workflow context * perf: variable select * hide publish * perf: simple edit auto refresh * perf: simple edit data refresh * fix: target handle --------- Co-authored-by: Finley Ge <32237950+FinleyGe@users.noreply.github.com> Co-authored-by: heheer <71265218+newfish-cmyk@users.noreply.github.com>
This commit is contained in:
@@ -125,6 +125,7 @@ export const appWorkflow2Form = ({ nodes }: { nodes: StoreNodeItemType[] }) => {
|
||||
|
||||
defaultAppForm.selectedTools.push({
|
||||
id: node.pluginId,
|
||||
pluginId: node.pluginId,
|
||||
name: node.name,
|
||||
avatar: node.avatar,
|
||||
intro: node.intro || '',
|
||||
|
@@ -1,5 +1,6 @@
|
||||
export enum OutLinkTypeEnum {
|
||||
export enum PublishChannelEnum {
|
||||
share = 'share',
|
||||
iframe = 'iframe',
|
||||
apikey = 'apikey'
|
||||
apikey = 'apikey',
|
||||
feishu = 'feishu'
|
||||
}
|
||||
|
60
packages/global/support/outLink/type.d.ts
vendored
60
packages/global/support/outLink/type.d.ts
vendored
@@ -1,31 +1,79 @@
|
||||
import { AppSchema } from 'core/app/type';
|
||||
import { OutLinkTypeEnum } from './constant';
|
||||
import { PublishChannelEnum } from './constant';
|
||||
|
||||
export type OutLinkSchema = {
|
||||
// Feishu Config interface
|
||||
export interface FeishuType {
|
||||
appId: string;
|
||||
appSecret: string;
|
||||
// Encrypt config
|
||||
// refer to: https://open.feishu.cn/document/server-docs/event-subscription-guide/event-subscription-configure-/configure-encrypt-key
|
||||
encryptKey?: string; // no secret if null
|
||||
// Token Verification
|
||||
// refer to: https://open.feishu.cn/document/server-docs/event-subscription-guide/event-subscription-configure-/encrypt-key-encryption-configuration-case
|
||||
verificationToken: string;
|
||||
}
|
||||
|
||||
// TODO: Unused
|
||||
export interface WecomType {
|
||||
ReplyLimit: Boolean;
|
||||
defaultResponse: string;
|
||||
immediateResponse: boolean;
|
||||
WXWORK_TOKEN: string;
|
||||
WXWORK_AESKEY: string;
|
||||
WXWORK_SECRET: string;
|
||||
WXWORD_ID: string;
|
||||
}
|
||||
|
||||
export type OutLinkSchema<T = void> = {
|
||||
_id: string;
|
||||
shareId: string;
|
||||
teamId: string;
|
||||
tmbId: string;
|
||||
appId: string;
|
||||
// teamId: Schema.Types.ObjectId;
|
||||
// tmbId: Schema.Types.ObjectId;
|
||||
// appId: Schema.Types.ObjectId;
|
||||
name: string;
|
||||
usagePoints: number;
|
||||
lastTime: Date;
|
||||
type: `${OutLinkTypeEnum}`;
|
||||
type: PublishChannelEnum;
|
||||
|
||||
// whether the response content is detailed
|
||||
responseDetail: boolean;
|
||||
|
||||
// response when request
|
||||
immediateResponse?: string;
|
||||
// response when error or other situation
|
||||
defaultResponse?: string;
|
||||
|
||||
limit?: {
|
||||
expiredTime?: Date;
|
||||
// Questions per minute
|
||||
QPM: number;
|
||||
maxUsagePoints: number;
|
||||
// Verification message hook url
|
||||
hookUrl?: string;
|
||||
};
|
||||
|
||||
app?: T;
|
||||
};
|
||||
|
||||
// to handle MongoDB querying
|
||||
export type OutLinkWithAppType = Omit<OutLinkSchema, 'appId'> & {
|
||||
appId: AppSchema;
|
||||
};
|
||||
|
||||
export type OutLinkEditType = {
|
||||
// Edit the Outlink
|
||||
export type OutLinkEditType<T = void> = {
|
||||
_id?: string;
|
||||
name: string;
|
||||
responseDetail: OutLinkSchema['responseDetail'];
|
||||
limit: OutLinkSchema['limit'];
|
||||
responseDetail: OutLinkSchema<T>['responseDetail'];
|
||||
// response when request
|
||||
immediateResponse?: string;
|
||||
// response when error or other situation
|
||||
defaultResponse?: string;
|
||||
limit?: OutLinkSchema<T>['limit'];
|
||||
|
||||
// config for specific platform
|
||||
app?: T;
|
||||
};
|
||||
|
@@ -1,7 +1,6 @@
|
||||
import { connectionMongo, type Model } from '../../common/mongo';
|
||||
const { Schema, model, models } = connectionMongo;
|
||||
import { OutLinkSchema as SchemaType } from '@fastgpt/global/support/outLink/type';
|
||||
import { OutLinkTypeEnum } from '@fastgpt/global/support/outLink/constant';
|
||||
import {
|
||||
TeamCollectionName,
|
||||
TeamMemberCollectionName
|
||||
@@ -30,7 +29,7 @@ const OutLinkSchema = new Schema({
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: OutLinkTypeEnum.share
|
||||
required: true
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
@@ -62,6 +61,26 @@ const OutLinkSchema = new Schema({
|
||||
hookUrl: {
|
||||
type: String
|
||||
}
|
||||
},
|
||||
app: {
|
||||
appId: {
|
||||
type: String
|
||||
},
|
||||
appSecret: {
|
||||
type: String
|
||||
},
|
||||
encryptKey: {
|
||||
type: String
|
||||
},
|
||||
verificationToken: {
|
||||
type: String
|
||||
}
|
||||
},
|
||||
immediateResponse: {
|
||||
type: String
|
||||
},
|
||||
defaultResponse: {
|
||||
type: String
|
||||
}
|
||||
});
|
||||
|
||||
|
@@ -65,6 +65,7 @@ export const iconPaths = {
|
||||
'core/app/headphones': () => import('./icons/core/app/headphones.svg'),
|
||||
'core/app/logsLight': () => import('./icons/core/app/logsLight.svg'),
|
||||
'core/app/markLight': () => import('./icons/core/app/markLight.svg'),
|
||||
'core/app/publish/lark': () => import('./icons/core/app/publish/lark.svg'),
|
||||
'core/app/questionGuide': () => import('./icons/core/app/questionGuide.svg'),
|
||||
'core/app/schedulePlan': () => import('./icons/core/app/schedulePlan.svg'),
|
||||
'core/app/simpleMode/ai': () => import('./icons/core/app/simpleMode/ai.svg'),
|
||||
|
@@ -0,0 +1,12 @@
|
||||
<svg t="1714285522209" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5343"
|
||||
width="128" height="128">
|
||||
<path
|
||||
d="M891.318857 340.845714c4.900571 0 9.728 0.292571 14.628572 0.804572a409.965714 409.965714 0 0 1 108.836571 30.061714c10.093714 4.534857 12.580571 8.192 3.949714 17.334857-24.868571 26.624-45.494857 57.051429-61.001143 89.965714-16.822857 35.328-35.108571 69.851429-52.297142 105.033143a225.28 225.28 0 0 1-52.150858 69.412572c-53.613714 48.493714-116.150857 68.973714-187.538285 59.099428-81.92-11.337143-159.451429-38.985143-232.740572-75.483428a143.506286 143.506286 0 0 1-10.459428-5.485715 5.339429 5.339429 0 0 1 0.292571-9.216l5.12-2.706285c59.245714-31.670857 108.836571-75.849143 156.525714-122.294857 20.187429-19.529143 39.497143-40.009143 59.904-59.318858A345.014857 345.014857 0 0 1 804.571429 352.256c13.165714-3.218286 26.550857-5.778286 39.789714-8.630857h0.585143l28.233143-2.56"
|
||||
fill="#133C9A" p-id="5344"></path>
|
||||
<path
|
||||
d="M317.659429 913.846857c-8.996571-0.512-31.158857-3.584-33.865143-3.949714a536.429714 536.429714 0 0 1-165.083429-48.274286c-30.208-14.116571-59.245714-30.72-88.356571-46.957714-19.163429-10.678857-27.794286-27.282286-27.648-49.883429 0.585143-83.382857 0.585143-166.765714 0-250.148571C2.413714 461.019429 0.731429 407.405714 0 353.718857c0-4.754286 0.731429-9.508571 2.194286-13.897143 3.291429-9.728 9.947429-10.24 16.530285-3.949714 7.606857 7.314286 13.677714 16.237714 21.211429 23.405714 67.291429 66.413714 138.752 127.195429 218.770286 177.225143 45.056 28.891429 91.940571 54.710857 140.434285 77.385143 77.750857 35.328 157.549714 66.486857 241.078858 86.235429 73.874286 17.481143 145.627429 6.436571 205.458285-40.374858 18.285714-15.652571 27.282286-27.062857 48.932572-55.881142a359.862857 359.862857 0 0 1-37.376 72.850285c-13.897143 21.942857-45.348571 51.2-69.193143 74.093715-36.278857 35.108571-83.748571 63.561143-128.292572 87.552-48.566857 26.185143-99.035429 47.104-152.941714 58.514285-27.648 6.948571-67.584 14.848-81.334857 15.579429-2.413714-0.146286-10.678857 1.682286-14.848 1.389714-35.547429 2.633143-57.490286 3.657143-92.891429 0z"
|
||||
fill="#3370FF" p-id="5345"></path>
|
||||
<path
|
||||
d="M165.083429 110.518857a52.443429 52.443429 0 0 1 7.460571 0c152.649143 0 304.128 2.486857 456.630857 2.486857 0.292571 0 0.585143 0 0.731429 0.219429 14.189714 12.361143 27.282286 25.746286 39.277714 40.155428 34.450286 34.230857 60.123429 93.622857 77.677714 129.755429 8.777143 25.014857 21.942857 48.859429 28.16 76.8v0.438857c-15.579429 5.046857-30.72 11.190857-45.348571 18.505143-44.178286 22.381714-64.219429 38.765714-100.790857 74.752-19.968 19.529143-37.010286 37.083429-63.488 62.098286a563.346286 563.346286 0 0 1-29.769143 26.916571c-7.021714-12.434286-125.732571-244.589714-364.251429-427.300571"
|
||||
fill="#00D6B9" p-id="5346"></path>
|
||||
</svg>
|
After Width: | Height: | Size: 2.9 KiB |
@@ -1,5 +1,8 @@
|
||||
import { WorkflowIOValueTypeEnum } from '@fastgpt/global/core/workflow/constants';
|
||||
|
||||
export type EditorVariablePickerType = {
|
||||
key: string;
|
||||
label: string;
|
||||
icon?: string;
|
||||
valueType?: WorkflowIOValueTypeEnum;
|
||||
};
|
||||
|
@@ -8,8 +8,8 @@
|
||||
"@chakra-ui/react": "2.8.1",
|
||||
"@chakra-ui/styled-system": "2.9.1",
|
||||
"@chakra-ui/system": "2.6.1",
|
||||
"@emotion/react": "^11.11.1",
|
||||
"@emotion/styled": "^11.11.0",
|
||||
"@emotion/react": "11.11.1",
|
||||
"@emotion/styled": "11.11.0",
|
||||
"@fastgpt/global": "workspace:*",
|
||||
"@fingerprintjs/fingerprintjs": "^4.3.0",
|
||||
"@lexical/react": "0.12.6",
|
||||
|
Reference in New Issue
Block a user