Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d7a722a609 |
4
dev.md
4
dev.md
@ -99,10 +99,6 @@ export default staticContent;
|
|||||||
- Use the t(namespace:key) format to ensure consistent naming.
|
- Use the t(namespace:key) format to ensure consistent naming.
|
||||||
- Translation keys should use lowercase letters and underscores, e.g., common.close.
|
- Translation keys should use lowercase letters and underscores, e.g., common.close.
|
||||||
|
|
||||||
## audit
|
|
||||||
|
|
||||||
Please fill the OperationLogEventEnum and operationLog/audit function is added to the ts, and on the corresponding position to fill i18n, at the same time to add the location of the log using addOpearationLog function add function
|
|
||||||
|
|
||||||
## Build
|
## Build
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
|||||||
@ -645,7 +645,7 @@ data 为集合的 ID。
|
|||||||
{{< /tab >}}
|
{{< /tab >}}
|
||||||
{{< /tabs >}}
|
{{< /tabs >}}
|
||||||
|
|
||||||
### 创建一个外部文件库集合(弃用)
|
### 创建一个外部文件库集合(商业版)
|
||||||
|
|
||||||
{{< tabs tabTotal="3" >}}
|
{{< tabs tabTotal="3" >}}
|
||||||
{{< tab tabName="请求示例" >}}
|
{{< tab tabName="请求示例" >}}
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
export enum OperationLogEventEnum {
|
export enum OperationLogEventEnum {
|
||||||
//Team
|
|
||||||
LOGIN = 'LOGIN',
|
LOGIN = 'LOGIN',
|
||||||
CREATE_INVITATION_LINK = 'CREATE_INVITATION_LINK',
|
CREATE_INVITATION_LINK = 'CREATE_INVITATION_LINK',
|
||||||
JOIN_TEAM = 'JOIN_TEAM',
|
JOIN_TEAM = 'JOIN_TEAM',
|
||||||
@ -12,52 +11,5 @@ export enum OperationLogEventEnum {
|
|||||||
RELOCATE_DEPARTMENT = 'RELOCATE_DEPARTMENT',
|
RELOCATE_DEPARTMENT = 'RELOCATE_DEPARTMENT',
|
||||||
CREATE_GROUP = 'CREATE_GROUP',
|
CREATE_GROUP = 'CREATE_GROUP',
|
||||||
DELETE_GROUP = 'DELETE_GROUP',
|
DELETE_GROUP = 'DELETE_GROUP',
|
||||||
ASSIGN_PERMISSION = 'ASSIGN_PERMISSION',
|
ASSIGN_PERMISSION = 'ASSIGN_PERMISSION'
|
||||||
//APP
|
|
||||||
CREATE_APP = 'CREATE_APP',
|
|
||||||
UPDATE_APP_INFO = 'UPDATE_APP_INFO',
|
|
||||||
MOVE_APP = 'MOVE_APP',
|
|
||||||
DELETE_APP = 'DELETE_APP',
|
|
||||||
UPDATE_APP_COLLABORATOR = 'UPDATE_APP_COLLABORATOR',
|
|
||||||
DELETE_APP_COLLABORATOR = 'DELETE_APP_COLLABORATOR',
|
|
||||||
TRANSFER_APP_OWNERSHIP = 'TRANSFER_APP_OWNERSHIP',
|
|
||||||
CREATE_APP_COPY = 'CREATE_APP_COPY',
|
|
||||||
CREATE_APP_FOLDER = 'CREATE_APP_FOLDER',
|
|
||||||
UPDATE_PUBLISH_APP = 'UPDATE_PUBLISH_APP',
|
|
||||||
CREATE_APP_PUBLISH_CHANNEL = 'CREATE_APP_PUBLISH_CHANNEL',
|
|
||||||
UPDATE_APP_PUBLISH_CHANNEL = 'UPDATE_APP_PUBLISH_CHANNEL',
|
|
||||||
DELETE_APP_PUBLISH_CHANNEL = 'DELETE_APP_PUBLISH_CHANNEL',
|
|
||||||
EXPORT_APP_CHAT_LOG = 'EXPORT_APP_CHAT_LOG',
|
|
||||||
//Dataset
|
|
||||||
CREATE_DATASET = 'CREATE_DATASET',
|
|
||||||
UPDATE_DATASET = 'UPDATE_DATASET',
|
|
||||||
DELETE_DATASET = 'DELETE_DATASET',
|
|
||||||
MOVE_DATASET = 'MOVE_DATASET',
|
|
||||||
UPDATE_DATASET_COLLABORATOR = 'UPDATE_DATASET_COLLABORATOR',
|
|
||||||
DELETE_DATASET_COLLABORATOR = 'DELETE_DATASET_COLLABORATOR',
|
|
||||||
TRANSFER_DATASET_OWNERSHIP = 'TRANSFER_DATASET_OWNERSHIP',
|
|
||||||
EXPORT_DATASET = 'EXPORT_DATASET',
|
|
||||||
CREATE_DATASET_FOLDER = 'CREATE_DATASET_FOLDER',
|
|
||||||
//Collection
|
|
||||||
CREATE_COLLECTION = 'CREATE_COLLECTION',
|
|
||||||
UPDATE_COLLECTION = 'UPDATE_COLLECTION',
|
|
||||||
DELETE_COLLECTION = 'DELETE_COLLECTION',
|
|
||||||
RETRAIN_COLLECTION = 'RETRAIN_COLLECTION',
|
|
||||||
//Data
|
|
||||||
CREATE_DATA = 'CREATE_DATA',
|
|
||||||
UPDATE_DATA = 'UPDATE_DATA',
|
|
||||||
DELETE_DATA = 'DELETE_DATA',
|
|
||||||
//SearchTest
|
|
||||||
SEARCH_TEST = 'SEARCH_TEST',
|
|
||||||
//Account
|
|
||||||
CHANGE_PASSWORD = 'CHANGE_PASSWORD',
|
|
||||||
CHANGE_NOTIFICATION_SETTINGS = 'CHANGE_NOTIFICATION_SETTINGS',
|
|
||||||
CHANGE_MEMBER_NAME_ACCOUNT = 'CHANGE_MEMBER_NAME_ACCOUNT',
|
|
||||||
PURCHASE_PLAN = 'PURCHASE_PLAN',
|
|
||||||
EXPORT_BILL_RECORDS = 'EXPORT_BILL_RECORDS',
|
|
||||||
CREATE_INVOICE = 'CREATE_INVOICE',
|
|
||||||
SET_INVOICE_HEADER = 'SET_INVOICE_HEADER',
|
|
||||||
CREATE_API_KEY = 'CREATE_API_KEY',
|
|
||||||
UPDATE_API_KEY = 'UPDATE_API_KEY',
|
|
||||||
DELETE_API_KEY = 'DELETE_API_KEY'
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,7 +13,6 @@ const staticPluginList = [
|
|||||||
'WeWorkWebhook',
|
'WeWorkWebhook',
|
||||||
'google',
|
'google',
|
||||||
'bing',
|
'bing',
|
||||||
'bocha',
|
|
||||||
'delay'
|
'delay'
|
||||||
];
|
];
|
||||||
// Run in worker thread (Have npm packages)
|
// Run in worker thread (Have npm packages)
|
||||||
|
|||||||
@ -1,677 +0,0 @@
|
|||||||
{
|
|
||||||
"author": "",
|
|
||||||
"name": "博查搜索",
|
|
||||||
"avatar": "core/workflow/template/bocha",
|
|
||||||
"intro": "使用博查AI搜索引擎进行网络搜索。",
|
|
||||||
"showStatus": true,
|
|
||||||
"weight": 10,
|
|
||||||
"courseUrl": "",
|
|
||||||
"isTool": true,
|
|
||||||
"templateType": "search",
|
|
||||||
"workflow": {
|
|
||||||
"nodes": [
|
|
||||||
{
|
|
||||||
"nodeId": "pluginInput",
|
|
||||||
"name": "workflow:template.plugin_start",
|
|
||||||
"intro": "workflow:intro_plugin_input",
|
|
||||||
"avatar": "core/workflow/template/workflowStart",
|
|
||||||
"flowNodeType": "pluginInput",
|
|
||||||
"showStatus": false,
|
|
||||||
"position": {
|
|
||||||
"x": 636.3048409085379,
|
|
||||||
"y": -238.61714728578016
|
|
||||||
},
|
|
||||||
"version": "481",
|
|
||||||
"inputs": [
|
|
||||||
{
|
|
||||||
"renderTypeList": [
|
|
||||||
"input"
|
|
||||||
],
|
|
||||||
"selectedTypeIndex": 0,
|
|
||||||
"valueType": "string",
|
|
||||||
"canEdit": true,
|
|
||||||
"key": "apiKey",
|
|
||||||
"label": "apiKey",
|
|
||||||
"description": "博查API密钥",
|
|
||||||
"defaultValue": "",
|
|
||||||
"required": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"renderTypeList": [
|
|
||||||
"input",
|
|
||||||
"reference"
|
|
||||||
],
|
|
||||||
"selectedTypeIndex": 0,
|
|
||||||
"valueType": "string",
|
|
||||||
"canEdit": true,
|
|
||||||
"key": "query",
|
|
||||||
"label": "query",
|
|
||||||
"description": "搜索查询词",
|
|
||||||
"defaultValue": "",
|
|
||||||
"required": true,
|
|
||||||
"toolDescription": "搜索查询词"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"renderTypeList": [
|
|
||||||
"input",
|
|
||||||
"reference"
|
|
||||||
],
|
|
||||||
"selectedTypeIndex": 0,
|
|
||||||
"valueType": "string",
|
|
||||||
"canEdit": true,
|
|
||||||
"key": "freshness",
|
|
||||||
"label": "freshness",
|
|
||||||
"description": "搜索指定时间范围内的网页。可填值:oneDay(一天内)、oneWeek(一周内)、oneMonth(一个月内)、oneYear(一年内)、noLimit(不限,默认)、YYYY-MM-DD..YYYY-MM-DD(日期范围)、YYYY-MM-DD(指定日期)",
|
|
||||||
"defaultValue": "noLimit",
|
|
||||||
"required": false,
|
|
||||||
"toolDescription": "搜索时间范围"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"renderTypeList": [
|
|
||||||
"input",
|
|
||||||
"reference"
|
|
||||||
],
|
|
||||||
"selectedTypeIndex": 0,
|
|
||||||
"valueType": "boolean",
|
|
||||||
"canEdit": true,
|
|
||||||
"key": "summary",
|
|
||||||
"label": "summary",
|
|
||||||
"description": "是否显示文本摘要。true显示,false不显示(默认)",
|
|
||||||
"defaultValue": false,
|
|
||||||
"required": false,
|
|
||||||
"toolDescription": "是否显示文本摘要"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"renderTypeList": [
|
|
||||||
"input",
|
|
||||||
"reference"
|
|
||||||
],
|
|
||||||
"selectedTypeIndex": 0,
|
|
||||||
"valueType": "string",
|
|
||||||
"canEdit": true,
|
|
||||||
"key": "include",
|
|
||||||
"label": "include",
|
|
||||||
"description": "指定搜索的site范围。多个域名使用|或,分隔,最多20个。例如:qq.com|m.163.com",
|
|
||||||
"defaultValue": "",
|
|
||||||
"required": false,
|
|
||||||
"toolDescription": "指定搜索的site范围"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"renderTypeList": [
|
|
||||||
"input",
|
|
||||||
"reference"
|
|
||||||
],
|
|
||||||
"selectedTypeIndex": 0,
|
|
||||||
"valueType": "string",
|
|
||||||
"canEdit": true,
|
|
||||||
"key": "exclude",
|
|
||||||
"label": "exclude",
|
|
||||||
"description": "排除搜索的网站范围。多个域名使用|或,分隔,最多20个。例如:qq.com|m.163.com",
|
|
||||||
"defaultValue": "",
|
|
||||||
"required": false,
|
|
||||||
"toolDescription": "排除搜索的网站范围"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"renderTypeList": [
|
|
||||||
"input",
|
|
||||||
"reference"
|
|
||||||
],
|
|
||||||
"selectedTypeIndex": 0,
|
|
||||||
"valueType": "number",
|
|
||||||
"canEdit": true,
|
|
||||||
"key": "count",
|
|
||||||
"label": "count",
|
|
||||||
"description": "返回结果的条数。可填范围:1-50,默认为10",
|
|
||||||
"defaultValue": 10,
|
|
||||||
"required": false,
|
|
||||||
"min": 1,
|
|
||||||
"max": 50,
|
|
||||||
"toolDescription": "返回结果条数"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"id": "apiKey",
|
|
||||||
"valueType": "string",
|
|
||||||
"key": "apiKey",
|
|
||||||
"label": "apiKey",
|
|
||||||
"type": "hidden"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "query",
|
|
||||||
"valueType": "string",
|
|
||||||
"key": "query",
|
|
||||||
"label": "query",
|
|
||||||
"type": "hidden"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "freshness",
|
|
||||||
"valueType": "string",
|
|
||||||
"key": "freshness",
|
|
||||||
"label": "freshness",
|
|
||||||
"type": "hidden"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "summary",
|
|
||||||
"valueType": "boolean",
|
|
||||||
"key": "summary",
|
|
||||||
"label": "summary",
|
|
||||||
"type": "hidden"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "include",
|
|
||||||
"valueType": "string",
|
|
||||||
"key": "include",
|
|
||||||
"label": "include",
|
|
||||||
"type": "hidden"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "exclude",
|
|
||||||
"valueType": "string",
|
|
||||||
"key": "exclude",
|
|
||||||
"label": "exclude",
|
|
||||||
"type": "hidden"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "count",
|
|
||||||
"valueType": "number",
|
|
||||||
"key": "count",
|
|
||||||
"label": "count",
|
|
||||||
"type": "hidden"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nodeId": "pluginOutput",
|
|
||||||
"name": "common:core.module.template.self_output",
|
|
||||||
"intro": "workflow:intro_custom_plugin_output",
|
|
||||||
"avatar": "core/workflow/template/pluginOutput",
|
|
||||||
"flowNodeType": "pluginOutput",
|
|
||||||
"showStatus": false,
|
|
||||||
"position": {
|
|
||||||
"x": 2764.1105686698083,
|
|
||||||
"y": -30.617147285780163
|
|
||||||
},
|
|
||||||
"version": "481",
|
|
||||||
"inputs": [
|
|
||||||
{
|
|
||||||
"renderTypeList": [
|
|
||||||
"reference"
|
|
||||||
],
|
|
||||||
"valueType": "object",
|
|
||||||
"canEdit": true,
|
|
||||||
"key": "result",
|
|
||||||
"label": "result",
|
|
||||||
"isToolOutput": true,
|
|
||||||
"description": "",
|
|
||||||
"value": [
|
|
||||||
"nyA6oA8mF1iW",
|
|
||||||
"httpRawResponse"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"outputs": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nodeId": "pluginConfig",
|
|
||||||
"name": "common:core.module.template.system_config",
|
|
||||||
"intro": "",
|
|
||||||
"avatar": "core/workflow/template/systemConfig",
|
|
||||||
"flowNodeType": "pluginConfig",
|
|
||||||
"position": {
|
|
||||||
"x": 184.66337662472682,
|
|
||||||
"y": -216.05298493910115
|
|
||||||
},
|
|
||||||
"version": "4811",
|
|
||||||
"inputs": [],
|
|
||||||
"outputs": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nodeId": "nyA6oA8mF1iW",
|
|
||||||
"name": "HTTP 请求",
|
|
||||||
"intro": "调用博查搜索API",
|
|
||||||
"avatar": "core/workflow/template/httpRequest",
|
|
||||||
"flowNodeType": "httpRequest468",
|
|
||||||
"showStatus": true,
|
|
||||||
"position": {
|
|
||||||
"x": 1335.0647252518884,
|
|
||||||
"y": -455.9043948565971
|
|
||||||
},
|
|
||||||
"version": "481",
|
|
||||||
"inputs": [
|
|
||||||
{
|
|
||||||
"key": "system_addInputParam",
|
|
||||||
"renderTypeList": [
|
|
||||||
"addInputParam"
|
|
||||||
],
|
|
||||||
"valueType": "dynamic",
|
|
||||||
"label": "",
|
|
||||||
"required": false,
|
|
||||||
"description": "common:core.module.input.description.HTTP Dynamic Input",
|
|
||||||
"customInputConfig": {
|
|
||||||
"selectValueTypeList": [
|
|
||||||
"string",
|
|
||||||
"number",
|
|
||||||
"boolean",
|
|
||||||
"object",
|
|
||||||
"arrayString",
|
|
||||||
"arrayNumber",
|
|
||||||
"arrayBoolean",
|
|
||||||
"arrayObject",
|
|
||||||
"arrayAny",
|
|
||||||
"any",
|
|
||||||
"chatHistory",
|
|
||||||
"datasetQuote",
|
|
||||||
"dynamic",
|
|
||||||
"selectDataset",
|
|
||||||
"selectApp"
|
|
||||||
],
|
|
||||||
"showDescription": false,
|
|
||||||
"showDefaultValue": true
|
|
||||||
},
|
|
||||||
"debugLabel": "",
|
|
||||||
"toolDescription": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "system_httpMethod",
|
|
||||||
"renderTypeList": [
|
|
||||||
"custom"
|
|
||||||
],
|
|
||||||
"valueType": "string",
|
|
||||||
"label": "",
|
|
||||||
"value": "POST",
|
|
||||||
"required": true,
|
|
||||||
"debugLabel": "",
|
|
||||||
"toolDescription": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "system_httpTimeout",
|
|
||||||
"renderTypeList": [
|
|
||||||
"custom"
|
|
||||||
],
|
|
||||||
"valueType": "number",
|
|
||||||
"label": "",
|
|
||||||
"value": 30,
|
|
||||||
"min": 5,
|
|
||||||
"max": 600,
|
|
||||||
"required": true,
|
|
||||||
"debugLabel": "",
|
|
||||||
"toolDescription": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "system_httpReqUrl",
|
|
||||||
"renderTypeList": [
|
|
||||||
"hidden"
|
|
||||||
],
|
|
||||||
"valueType": "string",
|
|
||||||
"label": "",
|
|
||||||
"description": "common:core.module.input.description.Http Request Url",
|
|
||||||
"placeholder": "https://api.ai.com/getInventory",
|
|
||||||
"required": false,
|
|
||||||
"value": "https://api.bochaai.com/v1/web-search",
|
|
||||||
"debugLabel": "",
|
|
||||||
"toolDescription": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "system_httpHeader",
|
|
||||||
"renderTypeList": [
|
|
||||||
"custom"
|
|
||||||
],
|
|
||||||
"valueType": "any",
|
|
||||||
"value": [
|
|
||||||
{
|
|
||||||
"key": "Authorization",
|
|
||||||
"type": "string",
|
|
||||||
"value": "Bearer {{$pluginInput.apiKey$}}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "Content-Type",
|
|
||||||
"type": "string",
|
|
||||||
"value": "application/json"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"label": "",
|
|
||||||
"description": "common:core.module.input.description.Http Request Header",
|
|
||||||
"placeholder": "common:core.module.input.description.Http Request Header",
|
|
||||||
"required": false,
|
|
||||||
"debugLabel": "",
|
|
||||||
"toolDescription": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "system_httpParams",
|
|
||||||
"renderTypeList": [
|
|
||||||
"hidden"
|
|
||||||
],
|
|
||||||
"valueType": "any",
|
|
||||||
"value": [],
|
|
||||||
"label": "",
|
|
||||||
"required": false,
|
|
||||||
"debugLabel": "",
|
|
||||||
"toolDescription": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "system_httpJsonBody",
|
|
||||||
"renderTypeList": [
|
|
||||||
"hidden"
|
|
||||||
],
|
|
||||||
"valueType": "any",
|
|
||||||
"value": "{\n \"query\": \"{{query}}\",\n \"freshness\": \"{{freshness}}\",\n \"summary\": {{summary}},\n \"include\": \"{{include}}\",\n \"exclude\": \"{{exclude}}\",\n \"count\": {{count}}\n}",
|
|
||||||
"label": "",
|
|
||||||
"required": false,
|
|
||||||
"debugLabel": "",
|
|
||||||
"toolDescription": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "system_httpFormBody",
|
|
||||||
"renderTypeList": [
|
|
||||||
"hidden"
|
|
||||||
],
|
|
||||||
"valueType": "any",
|
|
||||||
"value": [],
|
|
||||||
"label": "",
|
|
||||||
"required": false,
|
|
||||||
"debugLabel": "",
|
|
||||||
"toolDescription": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "system_httpContentType",
|
|
||||||
"renderTypeList": [
|
|
||||||
"hidden"
|
|
||||||
],
|
|
||||||
"valueType": "string",
|
|
||||||
"value": "json",
|
|
||||||
"label": "",
|
|
||||||
"required": false,
|
|
||||||
"debugLabel": "",
|
|
||||||
"toolDescription": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"valueType": "string",
|
|
||||||
"renderTypeList": [
|
|
||||||
"reference"
|
|
||||||
],
|
|
||||||
"key": "query",
|
|
||||||
"label": "query",
|
|
||||||
"toolDescription": "博查搜索检索词",
|
|
||||||
"required": true,
|
|
||||||
"canEdit": true,
|
|
||||||
"editField": {
|
|
||||||
"key": true,
|
|
||||||
"description": true
|
|
||||||
},
|
|
||||||
"customInputConfig": {
|
|
||||||
"selectValueTypeList": [
|
|
||||||
"string",
|
|
||||||
"number",
|
|
||||||
"boolean",
|
|
||||||
"object",
|
|
||||||
"arrayString",
|
|
||||||
"arrayNumber",
|
|
||||||
"arrayBoolean",
|
|
||||||
"arrayObject",
|
|
||||||
"arrayAny",
|
|
||||||
"any",
|
|
||||||
"chatHistory",
|
|
||||||
"datasetQuote",
|
|
||||||
"dynamic",
|
|
||||||
"selectApp",
|
|
||||||
"selectDataset"
|
|
||||||
],
|
|
||||||
"showDescription": false,
|
|
||||||
"showDefaultValue": true
|
|
||||||
},
|
|
||||||
"value": [
|
|
||||||
"pluginInput",
|
|
||||||
"query"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"valueType": "string",
|
|
||||||
"renderTypeList": [
|
|
||||||
"reference"
|
|
||||||
],
|
|
||||||
"key": "freshness",
|
|
||||||
"label": "freshness",
|
|
||||||
"toolDescription": "搜索时间范围",
|
|
||||||
"required": false,
|
|
||||||
"canEdit": true,
|
|
||||||
"editField": {
|
|
||||||
"key": true,
|
|
||||||
"description": true
|
|
||||||
},
|
|
||||||
"customInputConfig": {
|
|
||||||
"selectValueTypeList": [
|
|
||||||
"string",
|
|
||||||
"number",
|
|
||||||
"boolean",
|
|
||||||
"object",
|
|
||||||
"arrayString",
|
|
||||||
"arrayNumber",
|
|
||||||
"arrayBoolean",
|
|
||||||
"arrayObject",
|
|
||||||
"arrayAny",
|
|
||||||
"any",
|
|
||||||
"chatHistory",
|
|
||||||
"datasetQuote",
|
|
||||||
"dynamic",
|
|
||||||
"selectApp",
|
|
||||||
"selectDataset"
|
|
||||||
],
|
|
||||||
"showDescription": false,
|
|
||||||
"showDefaultValue": true
|
|
||||||
},
|
|
||||||
"value": [
|
|
||||||
"pluginInput",
|
|
||||||
"freshness"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"valueType": "boolean",
|
|
||||||
"renderTypeList": [
|
|
||||||
"reference"
|
|
||||||
],
|
|
||||||
"key": "summary",
|
|
||||||
"label": "summary",
|
|
||||||
"toolDescription": "是否显示文本摘要",
|
|
||||||
"required": false,
|
|
||||||
"canEdit": true,
|
|
||||||
"editField": {
|
|
||||||
"key": true,
|
|
||||||
"description": true
|
|
||||||
},
|
|
||||||
"customInputConfig": {
|
|
||||||
"selectValueTypeList": [
|
|
||||||
"string",
|
|
||||||
"number",
|
|
||||||
"boolean",
|
|
||||||
"object",
|
|
||||||
"arrayString",
|
|
||||||
"arrayNumber",
|
|
||||||
"arrayBoolean",
|
|
||||||
"arrayObject",
|
|
||||||
"arrayAny",
|
|
||||||
"any",
|
|
||||||
"chatHistory",
|
|
||||||
"datasetQuote",
|
|
||||||
"dynamic",
|
|
||||||
"selectApp",
|
|
||||||
"selectDataset"
|
|
||||||
],
|
|
||||||
"showDescription": false,
|
|
||||||
"showDefaultValue": true
|
|
||||||
},
|
|
||||||
"value": [
|
|
||||||
"pluginInput",
|
|
||||||
"summary"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"valueType": "string",
|
|
||||||
"renderTypeList": [
|
|
||||||
"reference"
|
|
||||||
],
|
|
||||||
"key": "include",
|
|
||||||
"label": "include",
|
|
||||||
"toolDescription": "指定搜索的site范围",
|
|
||||||
"required": false,
|
|
||||||
"canEdit": true,
|
|
||||||
"editField": {
|
|
||||||
"key": true,
|
|
||||||
"description": true
|
|
||||||
},
|
|
||||||
"customInputConfig": {
|
|
||||||
"selectValueTypeList": [
|
|
||||||
"string",
|
|
||||||
"number",
|
|
||||||
"boolean",
|
|
||||||
"object",
|
|
||||||
"arrayString",
|
|
||||||
"arrayNumber",
|
|
||||||
"arrayBoolean",
|
|
||||||
"arrayObject",
|
|
||||||
"arrayAny",
|
|
||||||
"any",
|
|
||||||
"chatHistory",
|
|
||||||
"datasetQuote",
|
|
||||||
"dynamic",
|
|
||||||
"selectApp",
|
|
||||||
"selectDataset"
|
|
||||||
],
|
|
||||||
"showDescription": false,
|
|
||||||
"showDefaultValue": true
|
|
||||||
},
|
|
||||||
"value": [
|
|
||||||
"pluginInput",
|
|
||||||
"include"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"valueType": "string",
|
|
||||||
"renderTypeList": [
|
|
||||||
"reference"
|
|
||||||
],
|
|
||||||
"key": "exclude",
|
|
||||||
"label": "exclude",
|
|
||||||
"toolDescription": "排除搜索的网站范围",
|
|
||||||
"required": false,
|
|
||||||
"canEdit": true,
|
|
||||||
"editField": {
|
|
||||||
"key": true,
|
|
||||||
"description": true
|
|
||||||
},
|
|
||||||
"customInputConfig": {
|
|
||||||
"selectValueTypeList": [
|
|
||||||
"string",
|
|
||||||
"number",
|
|
||||||
"boolean",
|
|
||||||
"object",
|
|
||||||
"arrayString",
|
|
||||||
"arrayNumber",
|
|
||||||
"arrayBoolean",
|
|
||||||
"arrayObject",
|
|
||||||
"arrayAny",
|
|
||||||
"any",
|
|
||||||
"chatHistory",
|
|
||||||
"datasetQuote",
|
|
||||||
"dynamic",
|
|
||||||
"selectApp",
|
|
||||||
"selectDataset"
|
|
||||||
],
|
|
||||||
"showDescription": false,
|
|
||||||
"showDefaultValue": true
|
|
||||||
},
|
|
||||||
"value": [
|
|
||||||
"pluginInput",
|
|
||||||
"exclude"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"valueType": "number",
|
|
||||||
"renderTypeList": [
|
|
||||||
"reference"
|
|
||||||
],
|
|
||||||
"key": "count",
|
|
||||||
"label": "count",
|
|
||||||
"toolDescription": "返回结果条数",
|
|
||||||
"required": false,
|
|
||||||
"canEdit": true,
|
|
||||||
"editField": {
|
|
||||||
"key": true,
|
|
||||||
"description": true
|
|
||||||
},
|
|
||||||
"customInputConfig": {
|
|
||||||
"selectValueTypeList": [
|
|
||||||
"string",
|
|
||||||
"number",
|
|
||||||
"boolean",
|
|
||||||
"object",
|
|
||||||
"arrayString",
|
|
||||||
"arrayNumber",
|
|
||||||
"arrayBoolean",
|
|
||||||
"arrayObject",
|
|
||||||
"arrayAny",
|
|
||||||
"any",
|
|
||||||
"chatHistory",
|
|
||||||
"datasetQuote",
|
|
||||||
"dynamic",
|
|
||||||
"selectApp",
|
|
||||||
"selectDataset"
|
|
||||||
],
|
|
||||||
"showDescription": false,
|
|
||||||
"showDefaultValue": true
|
|
||||||
},
|
|
||||||
"value": [
|
|
||||||
"pluginInput",
|
|
||||||
"count"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"id": "error",
|
|
||||||
"key": "error",
|
|
||||||
"label": "workflow:request_error",
|
|
||||||
"description": "HTTP请求错误信息,成功时返回空",
|
|
||||||
"valueType": "object",
|
|
||||||
"type": "static"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "httpRawResponse",
|
|
||||||
"key": "httpRawResponse",
|
|
||||||
"required": true,
|
|
||||||
"label": "workflow:raw_response",
|
|
||||||
"description": "HTTP请求的原始响应。只能接受字符串或JSON类型响应数据。",
|
|
||||||
"valueType": "any",
|
|
||||||
"type": "static"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "system_addOutputParam",
|
|
||||||
"key": "system_addOutputParam",
|
|
||||||
"type": "dynamic",
|
|
||||||
"valueType": "dynamic",
|
|
||||||
"label": "",
|
|
||||||
"editField": {
|
|
||||||
"key": true,
|
|
||||||
"valueType": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"edges": [
|
|
||||||
{
|
|
||||||
"source": "pluginInput",
|
|
||||||
"target": "nyA6oA8mF1iW",
|
|
||||||
"sourceHandle": "pluginInput-source-right",
|
|
||||||
"targetHandle": "nyA6oA8mF1iW-target-left"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"source": "nyA6oA8mF1iW",
|
|
||||||
"target": "pluginOutput",
|
|
||||||
"sourceHandle": "nyA6oA8mF1iW-source-right",
|
|
||||||
"targetHandle": "pluginOutput-target-left"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"chatConfig": {}
|
|
||||||
}
|
|
||||||
@ -2,7 +2,6 @@ import { OperationLogEventEnum } from '@fastgpt/global/support/operationLog/cons
|
|||||||
import { i18nT } from '../../../web/i18n/utils';
|
import { i18nT } from '../../../web/i18n/utils';
|
||||||
|
|
||||||
export const operationLogMap = {
|
export const operationLogMap = {
|
||||||
//Team
|
|
||||||
[OperationLogEventEnum.LOGIN]: {
|
[OperationLogEventEnum.LOGIN]: {
|
||||||
content: i18nT('account_team:log_login'),
|
content: i18nT('account_team:log_login'),
|
||||||
typeLabel: i18nT('account_team:login'),
|
typeLabel: i18nT('account_team:login'),
|
||||||
@ -67,309 +66,6 @@ export const operationLogMap = {
|
|||||||
content: i18nT('account_team:log_assign_permission'),
|
content: i18nT('account_team:log_assign_permission'),
|
||||||
typeLabel: i18nT('account_team:assign_permission'),
|
typeLabel: i18nT('account_team:assign_permission'),
|
||||||
params: {} as { name?: string; objectName: string; permission: string }
|
params: {} as { name?: string; objectName: string; permission: string }
|
||||||
},
|
|
||||||
//APP
|
|
||||||
[OperationLogEventEnum.CREATE_APP]: {
|
|
||||||
content: i18nT('account_team:log_create_app'),
|
|
||||||
typeLabel: i18nT('account_team:create_app'),
|
|
||||||
params: {} as { name?: string; appName: string; appType: string }
|
|
||||||
},
|
|
||||||
[OperationLogEventEnum.UPDATE_APP_INFO]: {
|
|
||||||
content: i18nT('account_team:log_update_app_info'),
|
|
||||||
typeLabel: i18nT('account_team:update_app_info'),
|
|
||||||
params: {} as {
|
|
||||||
name?: string;
|
|
||||||
appName: string;
|
|
||||||
newItemNames: string[];
|
|
||||||
newItemValues: string[];
|
|
||||||
appType: string;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
[OperationLogEventEnum.MOVE_APP]: {
|
|
||||||
content: i18nT('account_team:log_move_app'),
|
|
||||||
typeLabel: i18nT('account_team:move_app'),
|
|
||||||
params: {} as { name?: string; appName: string; targetFolderName: string; appType: string }
|
|
||||||
},
|
|
||||||
[OperationLogEventEnum.DELETE_APP]: {
|
|
||||||
content: i18nT('account_team:log_delete_app'),
|
|
||||||
typeLabel: i18nT('account_team:delete_app'),
|
|
||||||
params: {} as { name?: string; appName: string; appType: string }
|
|
||||||
},
|
|
||||||
[OperationLogEventEnum.UPDATE_APP_COLLABORATOR]: {
|
|
||||||
content: i18nT('account_team:log_update_app_collaborator'),
|
|
||||||
typeLabel: i18nT('account_team:update_app_collaborator'),
|
|
||||||
params: {} as {
|
|
||||||
name?: string;
|
|
||||||
appName: string;
|
|
||||||
appType: string;
|
|
||||||
tmbList: string[];
|
|
||||||
groupList: string[];
|
|
||||||
orgList: string[];
|
|
||||||
permission: string;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
[OperationLogEventEnum.DELETE_APP_COLLABORATOR]: {
|
|
||||||
content: i18nT('account_team:log_delete_app_collaborator'),
|
|
||||||
typeLabel: i18nT('account_team:delete_app_collaborator'),
|
|
||||||
params: {} as {
|
|
||||||
name?: string;
|
|
||||||
appName: string;
|
|
||||||
appType: string;
|
|
||||||
itemName: string;
|
|
||||||
itemValueName: string;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
[OperationLogEventEnum.TRANSFER_APP_OWNERSHIP]: {
|
|
||||||
content: i18nT('account_team:log_transfer_app_ownership'),
|
|
||||||
typeLabel: i18nT('account_team:transfer_app_ownership'),
|
|
||||||
params: {} as {
|
|
||||||
name?: string;
|
|
||||||
appName: string;
|
|
||||||
appType: string;
|
|
||||||
oldOwnerName: string;
|
|
||||||
newOwnerName: string;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
[OperationLogEventEnum.CREATE_APP_COPY]: {
|
|
||||||
content: i18nT('account_team:log_create_app_copy'),
|
|
||||||
typeLabel: i18nT('account_team:create_app_copy'),
|
|
||||||
params: {} as { name?: string; appName: string; appType: string }
|
|
||||||
},
|
|
||||||
[OperationLogEventEnum.CREATE_APP_FOLDER]: {
|
|
||||||
content: i18nT('account_team:log_create_app_folder'),
|
|
||||||
typeLabel: i18nT('account_team:create_app_folder'),
|
|
||||||
params: {} as { name?: string; folderName: string }
|
|
||||||
},
|
|
||||||
[OperationLogEventEnum.UPDATE_PUBLISH_APP]: {
|
|
||||||
content: i18nT('account_team:log_update_publish_app'),
|
|
||||||
typeLabel: i18nT('account_team:update_publish_app'),
|
|
||||||
params: {} as {
|
|
||||||
name?: string;
|
|
||||||
operationName: string;
|
|
||||||
appName: string;
|
|
||||||
appId: string;
|
|
||||||
appType: string;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
[OperationLogEventEnum.CREATE_APP_PUBLISH_CHANNEL]: {
|
|
||||||
content: i18nT('account_team:log_create_app_publish_channel'),
|
|
||||||
typeLabel: i18nT('account_team:create_app_publish_channel'),
|
|
||||||
params: {} as { name?: string; appName: string; channelName: string; appType: string }
|
|
||||||
},
|
|
||||||
[OperationLogEventEnum.UPDATE_APP_PUBLISH_CHANNEL]: {
|
|
||||||
content: i18nT('account_team:log_update_app_publish_channel'),
|
|
||||||
typeLabel: i18nT('account_team:update_app_publish_channel'),
|
|
||||||
params: {} as { name?: string; appName: string; channelName: string; appType: string }
|
|
||||||
},
|
|
||||||
[OperationLogEventEnum.DELETE_APP_PUBLISH_CHANNEL]: {
|
|
||||||
content: i18nT('account_team:log_delete_app_publish_channel'),
|
|
||||||
typeLabel: i18nT('account_team:delete_app_publish_channel'),
|
|
||||||
params: {} as { name?: string; appName: string; channelName: string; appType: string }
|
|
||||||
},
|
|
||||||
[OperationLogEventEnum.EXPORT_APP_CHAT_LOG]: {
|
|
||||||
content: i18nT('account_team:log_export_app_chat_log'),
|
|
||||||
typeLabel: i18nT('account_team:export_app_chat_log'),
|
|
||||||
params: {} as { name?: string; appName: string; appType: string }
|
|
||||||
},
|
|
||||||
//Dataset
|
|
||||||
[OperationLogEventEnum.CREATE_DATASET]: {
|
|
||||||
content: i18nT('account_team:log_create_dataset'),
|
|
||||||
typeLabel: i18nT('account_team:create_dataset'),
|
|
||||||
params: {} as { name?: string; datasetName: string; datasetType: string }
|
|
||||||
},
|
|
||||||
[OperationLogEventEnum.UPDATE_DATASET]: {
|
|
||||||
content: i18nT('account_team:log_update_dataset'),
|
|
||||||
typeLabel: i18nT('account_team:update_dataset'),
|
|
||||||
params: {} as { name?: string; datasetName: string; datasetType: string }
|
|
||||||
},
|
|
||||||
[OperationLogEventEnum.DELETE_DATASET]: {
|
|
||||||
content: i18nT('account_team:log_delete_dataset'),
|
|
||||||
typeLabel: i18nT('account_team:delete_dataset'),
|
|
||||||
params: {} as { name?: string; datasetName: string; datasetType: string }
|
|
||||||
},
|
|
||||||
[OperationLogEventEnum.MOVE_DATASET]: {
|
|
||||||
content: i18nT('account_team:log_move_dataset'),
|
|
||||||
typeLabel: i18nT('account_team:move_dataset'),
|
|
||||||
params: {} as {
|
|
||||||
name?: string;
|
|
||||||
datasetName: string;
|
|
||||||
targetFolderName: string;
|
|
||||||
datasetType: string;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
[OperationLogEventEnum.UPDATE_DATASET_COLLABORATOR]: {
|
|
||||||
content: i18nT('account_team:log_update_dataset_collaborator'),
|
|
||||||
typeLabel: i18nT('account_team:update_dataset_collaborator'),
|
|
||||||
params: {} as {
|
|
||||||
name?: string;
|
|
||||||
datasetName: string;
|
|
||||||
datasetType: string;
|
|
||||||
tmbList: string[];
|
|
||||||
groupList: string[];
|
|
||||||
orgList: string[];
|
|
||||||
permission: string;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
[OperationLogEventEnum.DELETE_DATASET_COLLABORATOR]: {
|
|
||||||
content: i18nT('account_team:log_delete_dataset_collaborator'),
|
|
||||||
typeLabel: i18nT('account_team:delete_dataset_collaborator'),
|
|
||||||
params: {} as {
|
|
||||||
name?: string;
|
|
||||||
datasetName: string;
|
|
||||||
datasetType: string;
|
|
||||||
itemName: string;
|
|
||||||
itemValueName: string;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
[OperationLogEventEnum.TRANSFER_DATASET_OWNERSHIP]: {
|
|
||||||
content: i18nT('account_team:log_transfer_dataset_ownership'),
|
|
||||||
typeLabel: i18nT('account_team:transfer_dataset_ownership'),
|
|
||||||
params: {} as {
|
|
||||||
name?: string;
|
|
||||||
datasetName: string;
|
|
||||||
datasetType: string;
|
|
||||||
oldOwnerName: string;
|
|
||||||
newOwnerName: string;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
[OperationLogEventEnum.EXPORT_DATASET]: {
|
|
||||||
content: i18nT('account_team:log_export_dataset'),
|
|
||||||
typeLabel: i18nT('account_team:export_dataset'),
|
|
||||||
params: {} as { name?: string; datasetName: string; datasetType: string }
|
|
||||||
},
|
|
||||||
[OperationLogEventEnum.CREATE_DATASET_FOLDER]: {
|
|
||||||
content: i18nT('account_team:log_create_dataset_folder'),
|
|
||||||
typeLabel: i18nT('account_team:create_dataset_folder'),
|
|
||||||
params: {} as { name?: string; folderName: string }
|
|
||||||
},
|
|
||||||
//Collection
|
|
||||||
[OperationLogEventEnum.CREATE_COLLECTION]: {
|
|
||||||
content: i18nT('account_team:log_create_collection'),
|
|
||||||
typeLabel: i18nT('account_team:create_collection'),
|
|
||||||
params: {} as {
|
|
||||||
name?: string;
|
|
||||||
collectionName: string;
|
|
||||||
datasetName: string;
|
|
||||||
datasetType: string;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
[OperationLogEventEnum.UPDATE_COLLECTION]: {
|
|
||||||
content: i18nT('account_team:log_update_collection'),
|
|
||||||
typeLabel: i18nT('account_team:update_collection'),
|
|
||||||
params: {} as {
|
|
||||||
name?: string;
|
|
||||||
collectionName: string;
|
|
||||||
datasetName: string;
|
|
||||||
datasetType: string;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
[OperationLogEventEnum.DELETE_COLLECTION]: {
|
|
||||||
content: i18nT('account_team:log_delete_collection'),
|
|
||||||
typeLabel: i18nT('account_team:delete_collection'),
|
|
||||||
params: {} as {
|
|
||||||
name?: string;
|
|
||||||
collectionName: string;
|
|
||||||
datasetName: string;
|
|
||||||
datasetType: string;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
[OperationLogEventEnum.RETRAIN_COLLECTION]: {
|
|
||||||
content: i18nT('account_team:log_retrain_collection'),
|
|
||||||
typeLabel: i18nT('account_team:retrain_collection'),
|
|
||||||
params: {} as {
|
|
||||||
name?: string;
|
|
||||||
collectionName: string;
|
|
||||||
datasetName: string;
|
|
||||||
datasetType: string;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
//Data
|
|
||||||
[OperationLogEventEnum.CREATE_DATA]: {
|
|
||||||
content: i18nT('account_team:log_create_data'),
|
|
||||||
typeLabel: i18nT('account_team:create_data'),
|
|
||||||
params: {} as {
|
|
||||||
name?: string;
|
|
||||||
collectionName: string;
|
|
||||||
datasetName: string;
|
|
||||||
datasetType: string;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
[OperationLogEventEnum.UPDATE_DATA]: {
|
|
||||||
content: i18nT('account_team:log_update_data'),
|
|
||||||
typeLabel: i18nT('account_team:update_data'),
|
|
||||||
params: {} as {
|
|
||||||
name?: string;
|
|
||||||
collectionName: string;
|
|
||||||
datasetName: string;
|
|
||||||
datasetType: string;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
[OperationLogEventEnum.DELETE_DATA]: {
|
|
||||||
content: i18nT('account_team:log_delete_data'),
|
|
||||||
typeLabel: i18nT('account_team:delete_data'),
|
|
||||||
params: {} as {
|
|
||||||
name?: string;
|
|
||||||
collectionName: string;
|
|
||||||
datasetName: string;
|
|
||||||
datasetType: string;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
//SearchTest
|
|
||||||
[OperationLogEventEnum.SEARCH_TEST]: {
|
|
||||||
content: i18nT('account_team:log_search_test'),
|
|
||||||
typeLabel: i18nT('account_team:search_test'),
|
|
||||||
params: {} as { name?: string; datasetName: string; datasetType: string }
|
|
||||||
},
|
|
||||||
//Account
|
|
||||||
[OperationLogEventEnum.CHANGE_PASSWORD]: {
|
|
||||||
content: i18nT('account_team:log_change_password'),
|
|
||||||
typeLabel: i18nT('account_team:change_password'),
|
|
||||||
params: {} as { name?: string }
|
|
||||||
},
|
|
||||||
[OperationLogEventEnum.CHANGE_NOTIFICATION_SETTINGS]: {
|
|
||||||
content: i18nT('account_team:log_change_notification_settings'),
|
|
||||||
typeLabel: i18nT('account_team:change_notification_settings'),
|
|
||||||
params: {} as { name?: string }
|
|
||||||
},
|
|
||||||
[OperationLogEventEnum.CHANGE_MEMBER_NAME_ACCOUNT]: {
|
|
||||||
content: i18nT('account_team:log_change_member_name_self'),
|
|
||||||
typeLabel: i18nT('account_team:change_member_name_self'),
|
|
||||||
params: {} as { name?: string; oldName: string; newName: string }
|
|
||||||
},
|
|
||||||
[OperationLogEventEnum.PURCHASE_PLAN]: {
|
|
||||||
content: i18nT('account_team:log_purchase_plan'),
|
|
||||||
typeLabel: i18nT('account_team:purchase_plan'),
|
|
||||||
params: {} as { name?: string }
|
|
||||||
},
|
|
||||||
[OperationLogEventEnum.EXPORT_BILL_RECORDS]: {
|
|
||||||
content: i18nT('account_team:log_export_bill_records'),
|
|
||||||
typeLabel: i18nT('account_team:export_bill_records'),
|
|
||||||
params: {} as { name?: string }
|
|
||||||
},
|
|
||||||
[OperationLogEventEnum.CREATE_INVOICE]: {
|
|
||||||
content: i18nT('account_team:log_create_invoice'),
|
|
||||||
typeLabel: i18nT('account_team:create_invoice'),
|
|
||||||
params: {} as { name?: string }
|
|
||||||
},
|
|
||||||
[OperationLogEventEnum.SET_INVOICE_HEADER]: {
|
|
||||||
content: i18nT('account_team:log_set_invoice_header'),
|
|
||||||
typeLabel: i18nT('account_team:set_invoice_header'),
|
|
||||||
params: {} as { name?: string }
|
|
||||||
},
|
|
||||||
[OperationLogEventEnum.CREATE_API_KEY]: {
|
|
||||||
content: i18nT('account_team:log_create_api_key'),
|
|
||||||
typeLabel: i18nT('account_team:create_api_key'),
|
|
||||||
params: {} as { name?: string; keyName: string }
|
|
||||||
},
|
|
||||||
[OperationLogEventEnum.UPDATE_API_KEY]: {
|
|
||||||
content: i18nT('account_team:log_update_api_key'),
|
|
||||||
typeLabel: i18nT('account_team:update_api_key'),
|
|
||||||
params: {} as { name?: string; keyName: string }
|
|
||||||
},
|
|
||||||
[OperationLogEventEnum.DELETE_API_KEY]: {
|
|
||||||
content: i18nT('account_team:log_delete_api_key'),
|
|
||||||
typeLabel: i18nT('account_team:delete_api_key'),
|
|
||||||
params: {} as { name?: string; keyName: string }
|
|
||||||
}
|
}
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
|
|||||||
@ -1,36 +0,0 @@
|
|||||||
import { AppTypeEnum } from '@fastgpt/global/core/app/constants';
|
|
||||||
import { DatasetTypeEnum } from '@fastgpt/global/core/dataset/constants';
|
|
||||||
import { i18nT } from '../../../web/i18n/utils';
|
|
||||||
|
|
||||||
export function getI18nAppType(type: AppTypeEnum): string {
|
|
||||||
if (type === AppTypeEnum.folder) return i18nT('account_team:type.Folder');
|
|
||||||
if (type === AppTypeEnum.simple) return i18nT('account_team:type.Simple bot');
|
|
||||||
if (type === AppTypeEnum.workflow) return i18nT('account_team:type.Workflow bot');
|
|
||||||
if (type === AppTypeEnum.plugin) return i18nT('account_team:type.Plugin');
|
|
||||||
if (type === AppTypeEnum.httpPlugin) return i18nT('account_team:type.Http plugin');
|
|
||||||
if (type === AppTypeEnum.toolSet) return i18nT('account_team:type.Tool set');
|
|
||||||
if (type === AppTypeEnum.tool) return i18nT('account_team:type.Tool');
|
|
||||||
return i18nT('common:UnKnow');
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getI18nCollaboratorItemType(
|
|
||||||
tmbId: string | undefined,
|
|
||||||
groupId: string | undefined,
|
|
||||||
orgId: string | undefined
|
|
||||||
): string {
|
|
||||||
if (tmbId) return i18nT('account_team:member');
|
|
||||||
if (groupId) return i18nT('account_team:group');
|
|
||||||
if (orgId) return i18nT('account_team:department');
|
|
||||||
return i18nT('common:UnKnow');
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getI18nDatasetType(type: DatasetTypeEnum | string): string {
|
|
||||||
if (type === DatasetTypeEnum.folder) return i18nT('account_team:dataset.folder_dataset');
|
|
||||||
if (type === DatasetTypeEnum.dataset) return i18nT('account_team:dataset.common_dataset');
|
|
||||||
if (type === DatasetTypeEnum.websiteDataset) return i18nT('account_team:dataset.website_dataset');
|
|
||||||
if (type === DatasetTypeEnum.externalFile) return i18nT('account_team:dataset.external_file');
|
|
||||||
if (type === DatasetTypeEnum.apiDataset) return i18nT('account_team:dataset.api_file');
|
|
||||||
if (type === DatasetTypeEnum.feishu) return i18nT('account_team:dataset.feishu_dataset');
|
|
||||||
if (type === DatasetTypeEnum.yuque) return i18nT('account_team:dataset.yuque_dataset');
|
|
||||||
return i18nT('common:UnKnow');
|
|
||||||
}
|
|
||||||
@ -287,7 +287,6 @@ export const iconPaths = {
|
|||||||
'core/workflow/template/aiChat': () => import('./icons/core/workflow/template/aiChat.svg'),
|
'core/workflow/template/aiChat': () => import('./icons/core/workflow/template/aiChat.svg'),
|
||||||
'core/workflow/template/baseChart': () => import('./icons/core/workflow/template/baseChart.svg'),
|
'core/workflow/template/baseChart': () => import('./icons/core/workflow/template/baseChart.svg'),
|
||||||
'core/workflow/template/bing': () => import('./icons/core/workflow/template/bing.svg'),
|
'core/workflow/template/bing': () => import('./icons/core/workflow/template/bing.svg'),
|
||||||
'core/workflow/template/bocha': () => import('./icons/core/workflow/template/bocha.svg'),
|
|
||||||
'core/workflow/template/codeRun': () => import('./icons/core/workflow/template/codeRun.svg'),
|
'core/workflow/template/codeRun': () => import('./icons/core/workflow/template/codeRun.svg'),
|
||||||
'core/workflow/template/customFeedback': () =>
|
'core/workflow/template/customFeedback': () =>
|
||||||
import('./icons/core/workflow/template/customFeedback.svg'),
|
import('./icons/core/workflow/template/customFeedback.svg'),
|
||||||
|
|||||||
@ -1,5 +0,0 @@
|
|||||||
<svg width="113" height="97" viewBox="0 0 113 97" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path d="M0 31.7259C1.80046 29.9255 3.82784 28.3872 5.96621 27.1988C8.10469 26.0103 10.3126 25.1947 12.4634 24.7992C14.6143 24.4037 16.6664 24.4361 18.5022 24.8938C20.2678 25.334 21.7994 26.1604 23.0183 27.3272L23.021 27.3245L47.189 51.4924L33.4778 65.2037L0 31.7259Z" fill="#C4DEFE"/>
|
|
||||||
<path d="M9.15662 11.5625C11.3617 10.2893 13.7181 9.32825 16.0912 8.73374C18.4645 8.13923 20.8082 7.92284 22.9882 8.09751C25.1681 8.27217 27.1419 8.83457 28.7966 9.75182C30.3881 10.6341 31.6537 11.8287 32.529 13.2712L32.5316 13.2697L32.6082 13.4025C32.6162 13.4162 32.6251 13.4297 32.633 13.4435L49.886 43.3286L33.0941 53.0234L9.15662 11.5625Z" fill="#A6CBFF"/>
|
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M31.1377 0C33.6839 4.40811e-05 36.2052 0.345872 38.5576 1.01758C40.9099 1.68929 43.0472 2.67394 44.8477 3.91504C46.6482 5.15627 48.0773 6.63021 49.0518 8.25195C49.9888 9.81168 50.4867 11.4792 50.5234 13.166H50.5273V21.4072C56.6623 17.6586 63.874 15.498 71.5898 15.498C93.9304 15.4984 112.042 33.6087 112.042 55.9492C112.042 78.29 93.9305 96.401 71.5898 96.4014C49.3907 96.4014 31.3704 78.5193 31.1426 56.374H31.1377V0ZM71.9473 35.0439C60.1187 35.0441 50.5295 44.6334 50.5293 56.4619C50.5293 63.5338 53.9569 69.8057 59.2412 73.7061C66.4989 79.0625 76.5515 75.3841 85.3955 77.1592C92.613 78.608 97.2369 82.6827 98.3652 83.7686C97.3562 82.731 93.791 78.7138 92.2715 72.3291C89.8011 61.9479 94.8744 49.6043 87.5771 41.8184C83.6695 37.6493 78.1122 35.0441 71.9473 35.0439Z" fill="#006EFF"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.6 KiB |
@ -8,9 +8,6 @@
|
|||||||
"assign_permission": "Permission change",
|
"assign_permission": "Permission change",
|
||||||
"change_department_name": "Department Editor",
|
"change_department_name": "Department Editor",
|
||||||
"change_member_name": "Member name change",
|
"change_member_name": "Member name change",
|
||||||
"change_member_name_self": "Change member name",
|
|
||||||
"change_notification_settings": "Change the way to receive notifications",
|
|
||||||
"change_password": "change password",
|
|
||||||
"confirm_delete_from_org": "Confirm to move {{username}} out of the department?",
|
"confirm_delete_from_org": "Confirm to move {{username}} out of the department?",
|
||||||
"confirm_delete_from_team": "Confirm to move {{username}} out of the team?",
|
"confirm_delete_from_team": "Confirm to move {{username}} out of the team?",
|
||||||
"confirm_delete_group": "Confirm to delete group?",
|
"confirm_delete_group": "Confirm to delete group?",
|
||||||
@ -18,29 +15,12 @@
|
|||||||
"confirm_forbidden": "Confirm forbidden",
|
"confirm_forbidden": "Confirm forbidden",
|
||||||
"confirm_leave_team": "Confirmed to leave the team? \nAfter exiting, all your resources in the team are transferred to the team owner.",
|
"confirm_leave_team": "Confirmed to leave the team? \nAfter exiting, all your resources in the team are transferred to the team owner.",
|
||||||
"copy_link": "Copy link",
|
"copy_link": "Copy link",
|
||||||
"create_api_key": "Create API key",
|
|
||||||
"create_app": "Create an application",
|
|
||||||
"create_app_copy": "Create a copy of the application",
|
|
||||||
"create_app_folder": "Create an application folder",
|
|
||||||
"create_app_publish_channel": "Create a sharing channel",
|
|
||||||
"create_data": "Insert data",
|
|
||||||
"create_dataset": "Create a knowledge base",
|
|
||||||
"create_dataset_folder": "Create a Knowledge Base Folder",
|
|
||||||
"create_department": "Create a sub-department",
|
"create_department": "Create a sub-department",
|
||||||
"create_group": "Create group",
|
"create_group": "Create group",
|
||||||
"create_invitation_link": "Create Invitation Link",
|
"create_invitation_link": "Create Invitation Link",
|
||||||
"create_invoice": "Issuing invoices",
|
|
||||||
"create_org": "Create organization",
|
"create_org": "Create organization",
|
||||||
"create_sub_org": "Create sub-organization",
|
"create_sub_org": "Create sub-organization",
|
||||||
"delete": "delete",
|
"delete": "delete",
|
||||||
"delete_api_key": "Delete the API key",
|
|
||||||
"delete_app": "Delete the workbench application",
|
|
||||||
"delete_app_collaborator": "App permissions delete",
|
|
||||||
"delete_app_publish_channel": "Delete the publishing channel",
|
|
||||||
"delete_collection": "Delete a collection",
|
|
||||||
"delete_data": "Delete data",
|
|
||||||
"delete_dataset": "Delete the knowledge base",
|
|
||||||
"delete_dataset_collaborator": "Knowledge Base Permission Deletion",
|
|
||||||
"delete_department": "Delete sub-department",
|
"delete_department": "Delete sub-department",
|
||||||
"delete_from_org": "Move out of department",
|
"delete_from_org": "Move out of department",
|
||||||
"delete_from_team": "Move out of the team",
|
"delete_from_team": "Move out of the team",
|
||||||
@ -51,9 +31,6 @@
|
|||||||
"edit_member_tip": "Name",
|
"edit_member_tip": "Name",
|
||||||
"edit_org_info": "Edit organization information",
|
"edit_org_info": "Edit organization information",
|
||||||
"expires": "Expiration time",
|
"expires": "Expiration time",
|
||||||
"export_app_chat_log": "Export the app chat history",
|
|
||||||
"export_bill_records": "Export billing history",
|
|
||||||
"export_dataset": "Export knowledge base",
|
|
||||||
"export_members": "Export members",
|
"export_members": "Export members",
|
||||||
"forbid_hint": "After forbidden, this invitation link will become invalid. This action is irreversible. Are you sure you want to deactivate?",
|
"forbid_hint": "After forbidden, this invitation link will become invalid. This action is irreversible. Are you sure you want to deactivate?",
|
||||||
"forbid_success": "Forbid success",
|
"forbid_success": "Forbid success",
|
||||||
@ -79,69 +56,24 @@
|
|||||||
"log_assign_permission": "[{{name}}] Updated the permissions of [{{objectName}}]: [Application creation: [{{appCreate}}], Knowledge Base: [{{datasetCreate}}], API Key: [{{apiKeyCreate}}], Management: [{{manage}}]]",
|
"log_assign_permission": "[{{name}}] Updated the permissions of [{{objectName}}]: [Application creation: [{{appCreate}}], Knowledge Base: [{{datasetCreate}}], API Key: [{{apiKeyCreate}}], Management: [{{manage}}]]",
|
||||||
"log_change_department": "【{{name}}】Updated department【{{departmentName}}】",
|
"log_change_department": "【{{name}}】Updated department【{{departmentName}}】",
|
||||||
"log_change_member_name": "【{{name}}】Rename member [{{memberName}}] to 【{{newName}}】",
|
"log_change_member_name": "【{{name}}】Rename member [{{memberName}}] to 【{{newName}}】",
|
||||||
"log_change_member_name_self": "【{{name}}】Change your member name to 【{{newName}}】",
|
|
||||||
"log_change_notification_settings": "【{{name}}】A change notification receiving method operation was carried out",
|
|
||||||
"log_change_password": "【{{name}}】The password change operation was performed",
|
|
||||||
"log_create_api_key": "【{{name}}】Create an API key named [{{keyName}}]",
|
|
||||||
"log_create_app": "【{{name}}】Created [{{appType}}] named [{{appName}}]",
|
|
||||||
"log_create_app_copy": "【{{name}}] Created a copy of [{{appType}}] named [{{appName}}]",
|
|
||||||
"log_create_app_folder": "【{{name}}】Create a folder named [{{folderName}}]",
|
|
||||||
"log_create_app_publish_channel": "[{{name}}] Created a channel named [{{channelName}}] for [{{appType}}] called [{{appName}}].",
|
|
||||||
"log_create_collection": "[{{name}}] Create a collection named [{{collectionName}}] in [{{datasetType}}] called [{{datasetName}}].",
|
|
||||||
"log_create_data": "[{{name}}] Insert data into a collection named [{{datasetName}}] in [{{datasetType}}] called [{{datasetName}}] into a collection named [{{collectionName}}]",
|
|
||||||
"log_create_dataset": "【{{name}}】Created 【{{datasetType}}】 named 【{{datasetName}}】",
|
|
||||||
"log_create_dataset_folder": "【{{name}}】Created a folder named {{folderName}}】",
|
|
||||||
"log_create_department": "【{{name}}】Department【{{departmentName}}】",
|
"log_create_department": "【{{name}}】Department【{{departmentName}}】",
|
||||||
"log_create_group": "【{{name}}】Created group [{{groupName}}]",
|
"log_create_group": "【{{name}}】Created group [{{groupName}}]",
|
||||||
"log_create_invitation_link": "【{{name}}】Created invitation link【{{link}}】",
|
"log_create_invitation_link": "【{{name}}】Created invitation link【{{link}}】",
|
||||||
"log_create_invoice": "【{{name}}】Invoice operation was carried out",
|
|
||||||
"log_delete_api_key": "【{{name}}】Deleted the API key named [{{keyName}}]",
|
|
||||||
"log_delete_app": "【{{name}}】Delete the [{{appType}}] named [{{appName}}]",
|
|
||||||
"log_delete_app_collaborator": "【{{name}}】Delete the [itemName] permission named [itemValueName] in [{{appType}}] named [{{appName}}] delete the [itemName] permission named [{{appName}}] named [{{appName}}] named [{{appName}}] deleted the [{{itemName}}] permission named [{{itemValueName}}] named [{{appType}}] named [{{appName}}].",
|
|
||||||
"log_delete_app_publish_channel": "[{{name}}] [{{appType}}] named [{{appName}}] deleted the channel named [{{channelName}}]",
|
|
||||||
"log_delete_collection": "[{{name}}] Deleted a collection named [{{collectionName}}] in [{{datasetType}}] named [{{datasetName}}].",
|
|
||||||
"log_delete_data": "[{{name}}] Delete data in a collection named [{{datasetName}}] in a collection named [{{datasetName}}]",
|
|
||||||
"log_delete_dataset": "【{{name}}】Deleted 【{{datasetType}}】 named [{{datasetName}}]",
|
|
||||||
"log_delete_dataset_collaborator": "【{{name}}】Updated the collaborators of 【{{appType}}】 named 【{{appName}}】 to: Organization: 【{{orgList}}】, Group: 【{{groupList}}】, Member 【{{tmbList}}】; updated the permissions to: Read permission: 【{{readPermission}}】, Write permission: 【{{writePermission}}】, Administrator permission: 【{{managePermission}}】",
|
|
||||||
"log_delete_department": "{{name}} deleted department {{departmentName}}",
|
"log_delete_department": "{{name}} deleted department {{departmentName}}",
|
||||||
"log_delete_group": "{{name}} deleted group {{groupName}}",
|
"log_delete_group": "{{name}} deleted group {{groupName}}",
|
||||||
"log_details": "Details",
|
"log_details": "Details",
|
||||||
"log_export_app_chat_log": "【{{name}}】Export a chat history called [{{appName}}] called [{{appType}}]",
|
|
||||||
"log_export_bill_records": "【{{name}}】Export the billing record",
|
|
||||||
"log_export_dataset": "[{{name}}] Export [{{datasetType}}] called [{{datasetName}}]",
|
|
||||||
"log_join_team": "【{{name}}】Join the team through the invitation link 【{{link}}】",
|
"log_join_team": "【{{name}}】Join the team through the invitation link 【{{link}}】",
|
||||||
"log_kick_out_team": "{{name}} removed member {{memberName}}",
|
"log_kick_out_team": "{{name}} removed member {{memberName}}",
|
||||||
"log_login": "【{{name}}】Logined in the system",
|
"log_login": "【{{name}}】Logined in the system",
|
||||||
"log_move_app": "【{{name}}】Move [{{appType}}] named [{{appName}}] to [{{targetFolderName}}]",
|
|
||||||
"log_move_dataset": "【{{name}}】Move [{{datasetType}}] named [{{datasetName}}] to [{{targetFolderName}}]",
|
|
||||||
"log_recover_team_member": "【{{name}}】Restored member【{{memberName}}】",
|
"log_recover_team_member": "【{{name}}】Restored member【{{memberName}}】",
|
||||||
"log_relocate_department": "【{{name}}】Displayed department【{{departmentName}}】",
|
"log_relocate_department": "【{{name}}】Displayed department【{{departmentName}}】",
|
||||||
"log_retrain_collection": "[{{name}}] Retrained the collection named [{{collectionName}}] in [{{datasetType}}] called [{{datasetName}}].",
|
|
||||||
"log_search_test": "【{{name}}】Perform a search test operation on [{{datasetType}}] named [{{datasetName}}]",
|
|
||||||
"log_set_invoice_header": "【{{name}}】The invoice header operation was set up",
|
|
||||||
"log_time": "Operation time",
|
"log_time": "Operation time",
|
||||||
"log_transfer_app_ownership": "【{{name}}] Transfer ownership of [{{appType}}] named [{{appName}}] from [{oldOwnerName}}] to [{{newOwnerName}}]",
|
|
||||||
"log_transfer_dataset_ownership": "[{{name}}] Transfer ownership of [{{datasetType}}] named [{{datasetName}}] from [{oldOwnerName}}] to [{{newOwnerName}}]",
|
|
||||||
"log_type": "Operation Type",
|
"log_type": "Operation Type",
|
||||||
"log_update_api_key": "【{{name}}】Updated the API key named [{{keyName}}]",
|
|
||||||
"log_update_app_collaborator": "[{{name}}] Updated the collaborator named [{{appName}}] to: Organization: [{{orgList}}], Group: [{{groupList}}], Member [{{tmbList}}]; permissions updated to: Read permission: [{{readPermission}}], Write permission: [{{writePermission}}], Administrator permission: [{{managePermission}}]",
|
|
||||||
"log_update_app_info": "[{{name}}] updated [{{appType}}] named [{{appName}}]: [{{newItemNames}}] to [{{newItemValues}}]",
|
|
||||||
"log_update_app_publish_channel": "[{{name}}] Updated a channel named [{{channelName}}] for [{{appType}}] called [{{appName}}].",
|
|
||||||
"log_update_collection": "[{{name}}] Updated a collection named [{{collectionName}}] in [{{datasetType}}] called [{{datasetName}}].",
|
|
||||||
"log_update_data": "【{{name}}】Update data in a collection named 【{{datasetName}}】[{{datasetType}}] with [{{datasetType}}] with [{{collectionName}}]",
|
|
||||||
"log_update_dataset": "【{{name}}】Updated [{{datasetType}}] named [{{datasetName}}]",
|
|
||||||
"log_update_dataset_collaborator": "[{{name}}] Updated the collaborator named [{{datasetName}}] to: Organization: [{{orgList}}], Group: [{{groupList}}], Member [{{tmbList}}]; permissions updated to: [{{readPermission}}], [{{writePermission}}], [{{managePermission}}]",
|
|
||||||
"log_update_publish_app": "【{{name}}】【{{operationName}}】【{{appType}}】 named [{{appName}}】",
|
|
||||||
"log_user": "Operator",
|
"log_user": "Operator",
|
||||||
"login": "Log in",
|
"login": "Log in",
|
||||||
"manage_member": "Managing members",
|
"manage_member": "Managing members",
|
||||||
"member": "member",
|
"member": "member",
|
||||||
"department": "department",
|
|
||||||
"update": "update",
|
|
||||||
"save_and_publish": "save and publish",
|
|
||||||
"member_group": "Belonging to member group",
|
"member_group": "Belonging to member group",
|
||||||
"move_app": "App location movement",
|
|
||||||
"move_dataset": "Mobile Knowledge Base",
|
|
||||||
"move_member": "Move member",
|
"move_member": "Move member",
|
||||||
"move_org": "Move organization",
|
"move_org": "Move organization",
|
||||||
"notification_recieve": "Team notification reception",
|
"notification_recieve": "Team notification reception",
|
||||||
@ -160,7 +92,6 @@
|
|||||||
"permission_manage": "Admin",
|
"permission_manage": "Admin",
|
||||||
"permission_manage_tip": "Can manage members, create groups, manage all groups, and assign permissions to groups and members",
|
"permission_manage_tip": "Can manage members, create groups, manage all groups, and assign permissions to groups and members",
|
||||||
"please_bind_contact": "Please bind the contact information",
|
"please_bind_contact": "Please bind the contact information",
|
||||||
"purchase_plan": "Upgrade package",
|
|
||||||
"recover_team_member": "Member Recovery",
|
"recover_team_member": "Member Recovery",
|
||||||
"relocate_department": "Department Mobile",
|
"relocate_department": "Department Mobile",
|
||||||
"remark": "remark",
|
"remark": "remark",
|
||||||
@ -168,45 +99,17 @@
|
|||||||
"restore_tip": "Confirm to join the team {{username}}? \nOnly the availability and related permissions of this member account are restored, and the resources under the account cannot be restored.",
|
"restore_tip": "Confirm to join the team {{username}}? \nOnly the availability and related permissions of this member account are restored, and the resources under the account cannot be restored.",
|
||||||
"restore_tip_title": "Recovery confirmation",
|
"restore_tip_title": "Recovery confirmation",
|
||||||
"retain_admin_permissions": "Keep administrator rights",
|
"retain_admin_permissions": "Keep administrator rights",
|
||||||
"retrain_collection": "Retrain the set",
|
|
||||||
"search_log": "Search log",
|
"search_log": "Search log",
|
||||||
"search_member": "Search for members",
|
"search_member": "Search for members",
|
||||||
"search_member_group_name": "Search member/group name",
|
"search_member_group_name": "Search member/group name",
|
||||||
"search_org": "Search Department",
|
"search_org": "Search Department",
|
||||||
"search_test": "Search Test",
|
|
||||||
"set_invoice_header": "Set up invoice header",
|
|
||||||
"set_name_avatar": "Team avatar",
|
"set_name_avatar": "Team avatar",
|
||||||
"sync_immediately": "Synchronize now",
|
"sync_immediately": "Synchronize now",
|
||||||
"sync_member_failed": "Synchronization of members failed",
|
"sync_member_failed": "Synchronization of members failed",
|
||||||
"sync_member_success": "Synchronize members successfully",
|
"sync_member_success": "Synchronize members successfully",
|
||||||
"total_team_members": "Total {{amount}} members",
|
"total_team_members": "{{amount}} members in total",
|
||||||
"transfer_app_ownership": "Transfer app ownership",
|
"transfer_ownership": "transfer owner",
|
||||||
"transfer_dataset_ownership": "Transfer dataset ownership",
|
|
||||||
"transfer_ownership": "Transfer ownership",
|
|
||||||
"type.Folder": "Folder",
|
|
||||||
"type.Http plugin": "HTTP Plugin",
|
|
||||||
"type.Plugin": "Plugin",
|
|
||||||
"type.Simple bot": "Simple App",
|
|
||||||
"type.Tool": "Tool",
|
|
||||||
"type.Tool set": "Toolset",
|
|
||||||
"type.Workflow bot": "Workflow",
|
|
||||||
"dataset.folder_dataset": "Folder",
|
|
||||||
"dataset.common_dataset": "Dataset",
|
|
||||||
"dataset.website_dataset": "Website Sync",
|
|
||||||
"dataset.external_file": "External File",
|
|
||||||
"dataset.api_file": "API Import",
|
|
||||||
"dataset.feishu_dataset": "Feishu Spreadsheet",
|
|
||||||
"dataset.yuque_dataset": "Yuque Knowledge Base",
|
|
||||||
"unlimited": "Unlimited",
|
"unlimited": "Unlimited",
|
||||||
"update_api_key": "Update API key",
|
|
||||||
"update_app_collaborator": "Apply permission changes",
|
|
||||||
"update_app_info": "Application information modification",
|
|
||||||
"update_app_publish_channel": "Update the release channel",
|
|
||||||
"update_collection": "Update the collection",
|
|
||||||
"update_data": "Update data",
|
|
||||||
"update_dataset": "Update the knowledge base",
|
|
||||||
"update_dataset_collaborator": "Knowledge Base Permission Changes",
|
|
||||||
"update_publish_app": "Application update",
|
|
||||||
"used_times_limit": "Limit",
|
"used_times_limit": "Limit",
|
||||||
"user_name": "username",
|
"user_name": "username",
|
||||||
"user_team_invite_member": "Invite members",
|
"user_team_invite_member": "Invite members",
|
||||||
|
|||||||
@ -197,9 +197,6 @@
|
|||||||
"type.MCP tools": "MCP Toolset",
|
"type.MCP tools": "MCP Toolset",
|
||||||
"type.MCP_tools_url": "MCP Address",
|
"type.MCP_tools_url": "MCP Address",
|
||||||
"type.Plugin": "Plugin",
|
"type.Plugin": "Plugin",
|
||||||
"type.Folder": "Folder",
|
|
||||||
"type.Tool set": "Toolset",
|
|
||||||
"type.Tool": "Tool",
|
|
||||||
"type.Simple bot": "Simple App",
|
"type.Simple bot": "Simple App",
|
||||||
"type.Workflow bot": "Workflow",
|
"type.Workflow bot": "Workflow",
|
||||||
"type.error.Workflow data is empty": "No workflow data was obtained",
|
"type.error.Workflow data is empty": "No workflow data was obtained",
|
||||||
|
|||||||
@ -215,7 +215,6 @@
|
|||||||
"core.app.Interval timer run": "Scheduled Execution",
|
"core.app.Interval timer run": "Scheduled Execution",
|
||||||
"core.app.Interval timer tip": "Can Execute App on Schedule",
|
"core.app.Interval timer tip": "Can Execute App on Schedule",
|
||||||
"core.app.Make a brief introduction of your app": "Give Your AI App an Introduction",
|
"core.app.Make a brief introduction of your app": "Give Your AI App an Introduction",
|
||||||
"core.app.name": "name",
|
|
||||||
"core.app.Name and avatar": "Avatar & Name",
|
"core.app.Name and avatar": "Avatar & Name",
|
||||||
"core.app.Publish": "Publish",
|
"core.app.Publish": "Publish",
|
||||||
"core.app.Publish Confirm": "Confirm to Publish App? This Will Immediately Update the App Status on All Publishing Channels.",
|
"core.app.Publish Confirm": "Confirm to Publish App? This Will Immediately Update the App Status on All Publishing Channels.",
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
"account_team.delete_dataset": "删除知识库",
|
|
||||||
"active_model": "可用模型",
|
"active_model": "可用模型",
|
||||||
"add_default_model": "添加预设模型",
|
"add_default_model": "添加预设模型",
|
||||||
"api_key": "API 密钥",
|
"api_key": "API 密钥",
|
||||||
|
|||||||
@ -8,9 +8,6 @@
|
|||||||
"assign_permission": "权限变更",
|
"assign_permission": "权限变更",
|
||||||
"change_department_name": "部门编辑",
|
"change_department_name": "部门编辑",
|
||||||
"change_member_name": "成员改名",
|
"change_member_name": "成员改名",
|
||||||
"change_member_name_self": "变更成员名",
|
|
||||||
"change_notification_settings": "变更通知接收途径",
|
|
||||||
"change_password": "更改密码",
|
|
||||||
"confirm_delete_from_org": "确认将 {{username}} 移出部门?",
|
"confirm_delete_from_org": "确认将 {{username}} 移出部门?",
|
||||||
"confirm_delete_from_team": "确认将 {{username}} 移出团队?",
|
"confirm_delete_from_team": "确认将 {{username}} 移出团队?",
|
||||||
"confirm_delete_group": "确认删除群组?",
|
"confirm_delete_group": "确认删除群组?",
|
||||||
@ -18,30 +15,12 @@
|
|||||||
"confirm_forbidden": "确认停用",
|
"confirm_forbidden": "确认停用",
|
||||||
"confirm_leave_team": "确认离开该团队? \n退出后,您在该团队所有的资源均转让给团队所有者。",
|
"confirm_leave_team": "确认离开该团队? \n退出后,您在该团队所有的资源均转让给团队所有者。",
|
||||||
"copy_link": "复制链接",
|
"copy_link": "复制链接",
|
||||||
"create_api_key": "创建api密钥",
|
|
||||||
"create_app": "创建应用",
|
|
||||||
"create_app_copy": "创建应用副本",
|
|
||||||
"create_app_folder": "创建应用文件夹",
|
|
||||||
"create_app_publish_channel": "创建分享渠道",
|
|
||||||
"create_collection": "创建集合",
|
|
||||||
"create_data": "插入数据",
|
|
||||||
"create_dataset": "创建知识库",
|
|
||||||
"create_dataset_folder": "创建知识库文件夹",
|
|
||||||
"create_department": "创建子部门",
|
"create_department": "创建子部门",
|
||||||
"create_group": "创建群组",
|
"create_group": "创建群组",
|
||||||
"create_invitation_link": "创建邀请链接",
|
"create_invitation_link": "创建邀请链接",
|
||||||
"create_invoice": "开发票",
|
|
||||||
"create_org": "创建部门",
|
"create_org": "创建部门",
|
||||||
"create_sub_org": "创建子部门",
|
"create_sub_org": "创建子部门",
|
||||||
"delete": "删除",
|
"delete": "删除",
|
||||||
"delete_api_key": "删除api密钥",
|
|
||||||
"delete_app": "删除工作台应用",
|
|
||||||
"delete_app_collaborator": "应用权限删除",
|
|
||||||
"delete_app_publish_channel": "删除发布渠道",
|
|
||||||
"delete_collection": "删除集合",
|
|
||||||
"delete_data": "删除数据",
|
|
||||||
"delete_dataset": "删除知识库",
|
|
||||||
"delete_dataset_collaborator": "知识库权限删除",
|
|
||||||
"delete_department": "删除子部门",
|
"delete_department": "删除子部门",
|
||||||
"delete_from_org": "移出部门",
|
"delete_from_org": "移出部门",
|
||||||
"delete_from_team": "移出团队",
|
"delete_from_team": "移出团队",
|
||||||
@ -52,9 +31,6 @@
|
|||||||
"edit_member_tip": "成员名",
|
"edit_member_tip": "成员名",
|
||||||
"edit_org_info": "编辑部门信息",
|
"edit_org_info": "编辑部门信息",
|
||||||
"expires": "过期时间",
|
"expires": "过期时间",
|
||||||
"export_app_chat_log": "导出应用聊天记录",
|
|
||||||
"export_bill_records": "导出账单记录",
|
|
||||||
"export_dataset": "导出知识库",
|
|
||||||
"export_members": "导出成员",
|
"export_members": "导出成员",
|
||||||
"forbid_hint": "停用后,该邀请链接将失效。 该操作不可撤销,是否确认停用?",
|
"forbid_hint": "停用后,该邀请链接将失效。 该操作不可撤销,是否确认停用?",
|
||||||
"forbid_success": "停用成功",
|
"forbid_success": "停用成功",
|
||||||
@ -80,70 +56,24 @@
|
|||||||
"log_assign_permission": "【{{name}}】更新了【{{objectName}}】的权限:[应用创建:【{{appCreate}}】, 知识库:【{{datasetCreate}}】, API密钥:【{{apiKeyCreate}}】, 管理:【{{manage}}】]",
|
"log_assign_permission": "【{{name}}】更新了【{{objectName}}】的权限:[应用创建:【{{appCreate}}】, 知识库:【{{datasetCreate}}】, API密钥:【{{apiKeyCreate}}】, 管理:【{{manage}}】]",
|
||||||
"log_change_department": "【{{name}}】更新了部门【{{departmentName}}】",
|
"log_change_department": "【{{name}}】更新了部门【{{departmentName}}】",
|
||||||
"log_change_member_name": "【{{name}}】将成员【{{memberName}}】重命名为【{{newName}}】",
|
"log_change_member_name": "【{{name}}】将成员【{{memberName}}】重命名为【{{newName}}】",
|
||||||
"log_change_member_name_self": "【{{name}}】把自己的成员名从【{{oldName}}】变更为【{{newName}}】",
|
|
||||||
"log_change_notification_settings": "【{{name}}】进行了变更通知接收途径操作",
|
|
||||||
"log_change_password": "【{{name}}】进行了变更密码操作",
|
|
||||||
"log_create_api_key": "【{{name}}】创建了名为【{{keyName}}】的api密钥",
|
|
||||||
"log_create_app": "【{{name}}】创建了名为【{{appName}}】的【{{appType}}】",
|
|
||||||
"log_create_app_copy": "【{{name}}】给名为【{{appName}}】的【{{appType}}】创建了一个副本",
|
|
||||||
"log_create_app_folder": "【{{name}}】创建了名为【{{folderName}}】的文件夹",
|
|
||||||
"log_create_app_publish_channel": "【{{name}}】给名为【{{appName}}】的【{{appType}}】创建了名为【{{channelName}}】的渠道",
|
|
||||||
"log_create_collection": "【{{name}}】在名为【{{datasetName}}】的【{{datasetType}}】创建了名为【{{collectionName}}】的集合",
|
|
||||||
"log_create_data": "【{{name}}】在名为【{{datasetName}}】的【{{datasetType}}】往名为【{{collectionName}}】的集合插入数据",
|
|
||||||
"log_create_dataset": "【{{name}}】创建了名为【{{datasetName}}】的【{{datasetType}}】",
|
|
||||||
"log_create_dataset_folder": "【{{name}}】创建了名为{{folderName}}】的文件夹",
|
|
||||||
"log_create_department": "【{{name}}】创建了部门【{{departmentName}}】",
|
"log_create_department": "【{{name}}】创建了部门【{{departmentName}}】",
|
||||||
"log_create_group": "【{{name}}】创建了群组【{{groupName}}】",
|
"log_create_group": "【{{name}}】创建了群组【{{groupName}}】",
|
||||||
"log_create_invitation_link": "【{{name}}】创建了邀请链接【{{link}}】",
|
"log_create_invitation_link": "【{{name}}】创建了邀请链接【{{link}}】",
|
||||||
"log_create_invoice": "【{{name}}】进行了开发票操作",
|
|
||||||
"log_delete_api_key": "【{{name}}】删除了名为【{{keyName}}】的api密钥",
|
|
||||||
"log_delete_app": "【{{name}}】将名为【{{appName}}】的【{{appType}}】删除",
|
|
||||||
"log_delete_app_collaborator": "【{{name}}】将名为【{{appName}}】的【{{appType}}】中名为【{{itemValueName}}】的【{{itemName}}】权限删除",
|
|
||||||
"log_delete_app_publish_channel": "【{{name}}】名为【{{appName}}】的【{{appType}}】删除了名为【{{channelName}}】的渠道",
|
|
||||||
"log_delete_collection": "【{{name}}】在名为【{{datasetName}}】的【{{datasetType}}】删除了名为【{{collectionName}}】的集合",
|
|
||||||
"log_delete_data": "【{{name}}】在名为【{{datasetName}}】的【{{datasetType}}】在名为【{{collectionName}}】的集合删除数据",
|
|
||||||
"log_delete_dataset": "【{{name}}】删除了名为【{{datasetName}}】的【{{datasetType}}】",
|
|
||||||
"log_delete_dataset_collaborator": "【{{name}}】将名为【{{datasetName}}】的【{{datasetType}}】中名为【itemValueName】的【itemName】权限删除",
|
|
||||||
"log_delete_department": "【{{name}}】删除了部门【{{departmentName}}】",
|
"log_delete_department": "【{{name}}】删除了部门【{{departmentName}}】",
|
||||||
"log_delete_group": "【{{name}}】删除了群组【{{groupName}}】",
|
"log_delete_group": "【{{name}}】删除了群组【{{groupName}}】",
|
||||||
"log_details": "详情",
|
"log_details": "详情",
|
||||||
"log_export_app_chat_log": "【{{name}}】导出了名为【{{appName}}】的【{{appType}}】的聊天记录",
|
|
||||||
"log_export_bill_records": "【{{name}}】导出了账单记录",
|
|
||||||
"log_export_dataset": "【{{name}}】导出了名为【{{datasetName}}】的【{{datasetType}}】",
|
|
||||||
"log_join_team": "【{{name}}】通过邀请链接【{{link}}】加入团队",
|
"log_join_team": "【{{name}}】通过邀请链接【{{link}}】加入团队",
|
||||||
"log_kick_out_team": "【{{name}}】移除了成员【{{memberName}}】",
|
"log_kick_out_team": "【{{name}}】移除了成员【{{memberName}}】",
|
||||||
"log_login": "【{{name}}】登录了系统",
|
"log_login": "【{{name}}】登录了系统",
|
||||||
"log_move_app": "【{{name}}】将名为【{{appName}}】的【{{appType}}】移动到【{{targetFolderName}}】",
|
|
||||||
"log_move_dataset": "【{{name}}】将名为【{{datasetName}}】的【{{datasetType}}】移动到【{{targetFolderName}}】",
|
|
||||||
"log_purchase_plan": "【{{name}}】购买了套餐",
|
|
||||||
"log_recover_team_member": "【{{name}}】恢复了成员【{{memberName}}】",
|
"log_recover_team_member": "【{{name}}】恢复了成员【{{memberName}}】",
|
||||||
"log_relocate_department": "【{{name}}】移动了部门【{{departmentName}}】",
|
"log_relocate_department": "【{{name}}】移动了部门【{{departmentName}}】",
|
||||||
"log_retrain_collection": "【{{name}}】在名为【{{datasetName}}】的【{{datasetType}}】重新训练了名为【{{collectionName}}】的集合",
|
|
||||||
"log_search_test": "【{{name}}】在名为【{{datasetName}}】的【{{datasetType}}】执行搜索测试操作",
|
|
||||||
"log_set_invoice_header": "【{{name}}】进行了设置发票抬头操作",
|
|
||||||
"log_time": "操作时间",
|
"log_time": "操作时间",
|
||||||
"log_transfer_app_ownership": "【{{name}}】将名为【{{appName}}】的【{{appType}}】的所有权从【{{oldOwnerName}}】转移到【{{newOwnerName}}】",
|
|
||||||
"log_transfer_dataset_ownership": "【{{name}}】将名为【{{datasetName}}】的【{{datasetType}}】的所有权从【{{oldOwnerName}}】转移到【{{newOwnerName}}】",
|
|
||||||
"log_type": "操作类型",
|
"log_type": "操作类型",
|
||||||
"log_update_api_key": "【{{name}}】更新了名为【{{keyName}}】的api密钥",
|
|
||||||
"log_update_app_collaborator": "【{{name}}】将名为【{{appName}}】的【{{appType}}】的合作者更新为:组织:【{{orgList}}】,群组:【{{groupList}}】,成员【{{tmbList}}】;权限更新为:读权限:【{{readPermission}}】,写权限:【{{writePermission}}】,管理员权限:【{{managePermission}}】",
|
|
||||||
"log_update_app_info": "【{{name}}】更新了名为【{{appName}}】的【{{appType}}】:【{{newItemNames}}】为【{{newItemValues}}】",
|
|
||||||
"log_update_app_publish_channel": "【{{name}}】给名为【{{appName}}】的【{{appType}}】更新了名为【{{channelName}}】的渠道",
|
|
||||||
"log_update_collection": "【{{name}}】在名为【{{datasetName}}】的【{{datasetType}}】更新了名为【{{collectionName}}】的集合",
|
|
||||||
"log_update_data": "【{{name}}】在名为【{{datasetName}}】的【{{datasetType}}】在名为【{{collectionName}}】的集合更新数据",
|
|
||||||
"log_update_dataset": "【{{name}}】更新了名为【{{datasetName}}】的【{{datasetType}}】",
|
|
||||||
"log_update_dataset_collaborator": "【{{name}}】将名为【{{datasetName}}】的【{{datasetType}}】的合作者更新为:组织:【{{orgList}}】,群组:【{{groupList}}】,成员【{{tmbList}}】;权限更新为:【{{readPermission}}】,【{{writePermission}}】,【{{managePermission}}】",
|
|
||||||
"log_update_publish_app": "【{{name}}】【{{operationName}}】名为【{{appName}}】的【{{appType}}】",
|
|
||||||
"log_user": "操作人员",
|
"log_user": "操作人员",
|
||||||
"login": "登录",
|
"login": "登录",
|
||||||
"manage_member": "管理成员",
|
"manage_member": "管理成员",
|
||||||
"member": "成员",
|
"member": "成员",
|
||||||
"department": "部门",
|
|
||||||
"update": "更新",
|
|
||||||
"save_and_publish": "保存并发布",
|
|
||||||
"member_group": "所属群组",
|
"member_group": "所属群组",
|
||||||
"move_app": "应用位置移动",
|
|
||||||
"move_dataset": "移动知识库",
|
|
||||||
"move_member": "移动成员",
|
"move_member": "移动成员",
|
||||||
"move_org": "移动部门",
|
"move_org": "移动部门",
|
||||||
"notification_recieve": "团队通知接收",
|
"notification_recieve": "团队通知接收",
|
||||||
@ -162,7 +92,6 @@
|
|||||||
"permission_manage": "管理员",
|
"permission_manage": "管理员",
|
||||||
"permission_manage_tip": "可以管理成员、创建群组、管理所有群组、为群组和成员分配权限",
|
"permission_manage_tip": "可以管理成员、创建群组、管理所有群组、为群组和成员分配权限",
|
||||||
"please_bind_contact": "请绑定联系方式",
|
"please_bind_contact": "请绑定联系方式",
|
||||||
"purchase_plan": "升级套餐",
|
|
||||||
"recover_team_member": "成员恢复",
|
"recover_team_member": "成员恢复",
|
||||||
"relocate_department": "部门移动",
|
"relocate_department": "部门移动",
|
||||||
"remark": "备注",
|
"remark": "备注",
|
||||||
@ -170,45 +99,17 @@
|
|||||||
"restore_tip": "确认将 {{username}} 加入团队吗?仅恢复该成员账号可用性及相关权限,无法恢复账号下资源。",
|
"restore_tip": "确认将 {{username}} 加入团队吗?仅恢复该成员账号可用性及相关权限,无法恢复账号下资源。",
|
||||||
"restore_tip_title": "恢复确认",
|
"restore_tip_title": "恢复确认",
|
||||||
"retain_admin_permissions": "保留管理员权限",
|
"retain_admin_permissions": "保留管理员权限",
|
||||||
"retrain_collection": "重新训练集合",
|
|
||||||
"search_log": "搜索日志",
|
"search_log": "搜索日志",
|
||||||
"search_member": "搜索成员",
|
"search_member": "搜索成员",
|
||||||
"search_member_group_name": "搜索成员/群组名称",
|
"search_member_group_name": "搜索成员/群组名称",
|
||||||
"search_org": "搜索部门",
|
"search_org": "搜索部门",
|
||||||
"search_test": "搜索测试",
|
|
||||||
"set_invoice_header": "设置发票抬头",
|
|
||||||
"set_name_avatar": "团队头像 & 团队名",
|
"set_name_avatar": "团队头像 & 团队名",
|
||||||
"sync_immediately": "立即同步",
|
"sync_immediately": "立即同步",
|
||||||
"sync_member_failed": "同步成员失败",
|
"sync_member_failed": "同步成员失败",
|
||||||
"sync_member_success": "同步成员成功",
|
"sync_member_success": "同步成员成功",
|
||||||
"total_team_members": "共 {{amount}} 名成员",
|
"total_team_members": "共 {{amount}} 名成员",
|
||||||
"transfer_app_ownership": "转移应用所有权",
|
|
||||||
"transfer_dataset_ownership": "转移知识库所有权",
|
|
||||||
"transfer_ownership": "转让所有者",
|
"transfer_ownership": "转让所有者",
|
||||||
"type.Folder": "文件夹",
|
|
||||||
"type.Http plugin": "HTTP 插件",
|
|
||||||
"type.Plugin": "插件",
|
|
||||||
"type.Simple bot": "简易应用",
|
|
||||||
"type.Tool": "工具",
|
|
||||||
"type.Tool set": "工具集",
|
|
||||||
"type.Workflow bot": "工作流",
|
|
||||||
"dataset.folder_dataset": "文件夹",
|
|
||||||
"dataset.common_dataset": "知识库",
|
|
||||||
"dataset.website_dataset": "网站同步",
|
|
||||||
"dataset.external_file": "外部文件",
|
|
||||||
"dataset.api_file": "API导入",
|
|
||||||
"dataset.feishu_dataset": "飞书多维表格",
|
|
||||||
"dataset.yuque_dataset": "语雀知识库",
|
|
||||||
"unlimited": "无限制",
|
"unlimited": "无限制",
|
||||||
"update_api_key": "更新api密钥",
|
|
||||||
"update_app_collaborator": "应用权限更改",
|
|
||||||
"update_app_info": "应用信息修改",
|
|
||||||
"update_app_publish_channel": "更新发布渠道",
|
|
||||||
"update_collection": "更新集合",
|
|
||||||
"update_data": "更新数据",
|
|
||||||
"update_dataset": "更新知识库",
|
|
||||||
"update_dataset_collaborator": "知识库权限更改",
|
|
||||||
"update_publish_app": "应用更新",
|
|
||||||
"used_times_limit": "有效人数",
|
"used_times_limit": "有效人数",
|
||||||
"user_name": "用户名",
|
"user_name": "用户名",
|
||||||
"user_team_invite_member": "邀请成员",
|
"user_team_invite_member": "邀请成员",
|
||||||
|
|||||||
@ -189,7 +189,6 @@
|
|||||||
"type.Create simple bot tip": "通过填表单形式,创建简单的 AI 应用,适合新手",
|
"type.Create simple bot tip": "通过填表单形式,创建简单的 AI 应用,适合新手",
|
||||||
"type.Create workflow bot": "创建工作流",
|
"type.Create workflow bot": "创建工作流",
|
||||||
"type.Create workflow tip": "通过低代码的方式,构建逻辑复杂的多轮对话 AI 应用,推荐高级玩家使用",
|
"type.Create workflow tip": "通过低代码的方式,构建逻辑复杂的多轮对话 AI 应用,推荐高级玩家使用",
|
||||||
"type.Folder": "文件夹",
|
|
||||||
"type.Http plugin": "HTTP 插件",
|
"type.Http plugin": "HTTP 插件",
|
||||||
"type.Import from json": "导入 JSON 配置",
|
"type.Import from json": "导入 JSON 配置",
|
||||||
"type.Import from json tip": "通过 JSON 配置文件,直接创建应用",
|
"type.Import from json tip": "通过 JSON 配置文件,直接创建应用",
|
||||||
@ -199,8 +198,6 @@
|
|||||||
"type.MCP_tools_url": "MCP 地址",
|
"type.MCP_tools_url": "MCP 地址",
|
||||||
"type.Plugin": "插件",
|
"type.Plugin": "插件",
|
||||||
"type.Simple bot": "简易应用",
|
"type.Simple bot": "简易应用",
|
||||||
"type.Tool": "工具",
|
|
||||||
"type.Tool set": "工具集",
|
|
||||||
"type.Workflow bot": "工作流",
|
"type.Workflow bot": "工作流",
|
||||||
"type.error.Workflow data is empty": "没有获取到工作流数据",
|
"type.error.Workflow data is empty": "没有获取到工作流数据",
|
||||||
"type.error.workflowresponseempty": "响应内容为空",
|
"type.error.workflowresponseempty": "响应内容为空",
|
||||||
|
|||||||
@ -215,7 +215,6 @@
|
|||||||
"core.app.Interval timer run": "定时执行",
|
"core.app.Interval timer run": "定时执行",
|
||||||
"core.app.Interval timer tip": "可定时执行应用",
|
"core.app.Interval timer tip": "可定时执行应用",
|
||||||
"core.app.Make a brief introduction of your app": "给你的 AI 应用一个介绍",
|
"core.app.Make a brief introduction of your app": "给你的 AI 应用一个介绍",
|
||||||
"core.app.name": "名称",
|
|
||||||
"core.app.Name and avatar": "头像 & 名称",
|
"core.app.Name and avatar": "头像 & 名称",
|
||||||
"core.app.Publish": "发布",
|
"core.app.Publish": "发布",
|
||||||
"core.app.Publish Confirm": "确认发布应用?会立即更新所有发布渠道的应用状态。",
|
"core.app.Publish Confirm": "确认发布应用?会立即更新所有发布渠道的应用状态。",
|
||||||
|
|||||||
@ -8,9 +8,6 @@
|
|||||||
"assign_permission": "權限變更",
|
"assign_permission": "權限變更",
|
||||||
"change_department_name": "部門編輯",
|
"change_department_name": "部門編輯",
|
||||||
"change_member_name": "成員改名",
|
"change_member_name": "成員改名",
|
||||||
"change_member_name_self": "變更成員名",
|
|
||||||
"change_notification_settings": "變更通知接收途徑",
|
|
||||||
"change_password": "更改密碼",
|
|
||||||
"confirm_delete_from_org": "確認將 {{username}} 移出部門?",
|
"confirm_delete_from_org": "確認將 {{username}} 移出部門?",
|
||||||
"confirm_delete_from_team": "確認將 {{username}} 移出團隊?",
|
"confirm_delete_from_team": "確認將 {{username}} 移出團隊?",
|
||||||
"confirm_delete_group": "確認刪除群組?",
|
"confirm_delete_group": "確認刪除群組?",
|
||||||
@ -18,29 +15,12 @@
|
|||||||
"confirm_forbidden": "確認停用",
|
"confirm_forbidden": "確認停用",
|
||||||
"confirm_leave_team": "確認離開該團隊? \n結束後,您在該團隊所有的資源轉讓給團隊所有者。",
|
"confirm_leave_team": "確認離開該團隊? \n結束後,您在該團隊所有的資源轉讓給團隊所有者。",
|
||||||
"copy_link": "複製連結",
|
"copy_link": "複製連結",
|
||||||
"create_api_key": "創建api密鑰",
|
|
||||||
"create_app": "創建應用",
|
|
||||||
"create_app_copy": "創建應用副本",
|
|
||||||
"create_app_folder": "創建應用文件夾",
|
|
||||||
"create_app_publish_channel": "創建分享渠道",
|
|
||||||
"create_data": "插入數據",
|
|
||||||
"create_dataset": "創建知識庫",
|
|
||||||
"create_dataset_folder": "創建知識庫文件夾",
|
|
||||||
"create_department": "創建子部門",
|
"create_department": "創建子部門",
|
||||||
"create_group": "建立群組",
|
"create_group": "建立群組",
|
||||||
"create_invitation_link": "建立邀請連結",
|
"create_invitation_link": "建立邀請連結",
|
||||||
"create_invoice": "開發票",
|
|
||||||
"create_org": "建立部門",
|
"create_org": "建立部門",
|
||||||
"create_sub_org": "建立子部門",
|
"create_sub_org": "建立子部門",
|
||||||
"delete": "刪除",
|
"delete": "刪除",
|
||||||
"delete_api_key": "刪除api密鑰",
|
|
||||||
"delete_app": "刪除工作台應用",
|
|
||||||
"delete_app_collaborator": "應用權限刪除",
|
|
||||||
"delete_app_publish_channel": "刪除發布渠道",
|
|
||||||
"delete_collection": "刪除集合",
|
|
||||||
"delete_data": "刪除數據",
|
|
||||||
"delete_dataset": "刪除知識庫",
|
|
||||||
"delete_dataset_collaborator": "知識庫權限刪除",
|
|
||||||
"delete_department": "刪除子部門",
|
"delete_department": "刪除子部門",
|
||||||
"delete_from_org": "移出部門",
|
"delete_from_org": "移出部門",
|
||||||
"delete_from_team": "移出團隊",
|
"delete_from_team": "移出團隊",
|
||||||
@ -51,9 +31,6 @@
|
|||||||
"edit_member_tip": "成員名",
|
"edit_member_tip": "成員名",
|
||||||
"edit_org_info": "編輯部門資訊",
|
"edit_org_info": "編輯部門資訊",
|
||||||
"expires": "過期時間",
|
"expires": "過期時間",
|
||||||
"export_app_chat_log": "導出應用聊天記錄",
|
|
||||||
"export_bill_records": "導出賬單記錄",
|
|
||||||
"export_dataset": "導出知識庫",
|
|
||||||
"export_members": "導出成員",
|
"export_members": "導出成員",
|
||||||
"forbid_hint": "停用後,該邀請連結將失效。該操作不可撤銷,是否確認停用?",
|
"forbid_hint": "停用後,該邀請連結將失效。該操作不可撤銷,是否確認停用?",
|
||||||
"forbid_success": "停用成功",
|
"forbid_success": "停用成功",
|
||||||
@ -79,69 +56,24 @@
|
|||||||
"log_assign_permission": "【{{name}}】更新了【{{objectName}}】的權限:[應用創建:【{{appCreate}}】, 知識庫:【{{datasetCreate}}】, API密鑰:【{{apiKeyCreate}}】, 管理:【{{manage}}】]",
|
"log_assign_permission": "【{{name}}】更新了【{{objectName}}】的權限:[應用創建:【{{appCreate}}】, 知識庫:【{{datasetCreate}}】, API密鑰:【{{apiKeyCreate}}】, 管理:【{{manage}}】]",
|
||||||
"log_change_department": "【{{name}}】更新了部門【{{departmentName}}】",
|
"log_change_department": "【{{name}}】更新了部門【{{departmentName}}】",
|
||||||
"log_change_member_name": "【{{name}}】將成員【{{memberName}}】重命名為【{{newName}}】",
|
"log_change_member_name": "【{{name}}】將成員【{{memberName}}】重命名為【{{newName}}】",
|
||||||
"log_change_member_name_self": "【{{name}}】變更自己的成員名為【{{newName}}】",
|
|
||||||
"log_change_notification_settings": "【{{name}}】進行了變更通知接收途徑操作",
|
|
||||||
"log_change_password": "【{{name}}】進行了變更密碼操作",
|
|
||||||
"log_create_api_key": "【{{name}}】創建了名為【{{keyName}}】的api密鑰",
|
|
||||||
"log_create_app": "【{{name}}】創建了名為【{{appName}}】的【{{appType}}】",
|
|
||||||
"log_create_app_copy": "【{{name}}】給名為【{{appName}}】的【{{appType}}】創建了一個副本",
|
|
||||||
"log_create_app_folder": "【{{name}}】創建了名為【{{folderName}}】的文件夾",
|
|
||||||
"log_create_app_publish_channel": "【{{name}}】給名為【{{appName}}】的【{{appType}}】創建了名為【{{channelName}}】的渠道",
|
|
||||||
"log_create_collection": "【{{name}}】在名為【{{datasetName}}】的【{{datasetType}}】創建了名為【{{collectionName}}】的集合",
|
|
||||||
"log_create_data": "【{{name}}】在名為【{{datasetName}}】的【{{datasetType}}】往名為【{{collectionName}}】的集合插入數據",
|
|
||||||
"log_create_dataset": "【{{name}}】創建了名為【{{datasetName}}】的【{{datasetType}}】",
|
|
||||||
"log_create_dataset_folder": "【{{name}}】創建了名為{{folderName}}】的文件夾",
|
|
||||||
"log_create_department": "【{{name}}】創建了部門【{{departmentName}}】",
|
"log_create_department": "【{{name}}】創建了部門【{{departmentName}}】",
|
||||||
"log_create_group": "【{{name}}】創建了群組【{{groupName}}】",
|
"log_create_group": "【{{name}}】創建了群組【{{groupName}}】",
|
||||||
"log_create_invitation_link": "【{{name}}】創建了邀請鏈接【{{link}}】",
|
"log_create_invitation_link": "【{{name}}】創建了邀請鏈接【{{link}}】",
|
||||||
"log_create_invoice": "【{{name}}】進行了開發票操作",
|
|
||||||
"log_delete_api_key": "【{{name}}】刪除了名為【{{keyName}}】的api密鑰",
|
|
||||||
"log_delete_app": "【{{name}}】將名為【{{appName}}】的【{{appType}}】刪除",
|
|
||||||
"log_delete_app_collaborator": "【{{name}}】將名為【{{appName}}】的【{{appType}}】中名為【{{itemValueName}}】的【{{itemName}}】權限刪除",
|
|
||||||
"log_delete_app_publish_channel": "【{{name}}】名為【{{appName}}】的【{{appType}}】刪除了名為【{{channelName}}】的渠道",
|
|
||||||
"log_delete_collection": "【{{name}}】在名為【{{datasetName}}】的【{{datasetType}}】刪除了名為【{{collectionName}}】的集合",
|
|
||||||
"log_delete_data": "【{{name}}】在名為【{{datasetName}}】的【{{datasetType}}】在名為【{{collectionName}}】的集合刪除數據",
|
|
||||||
"log_delete_dataset": "【{{name}}】刪除了名為【{{datasetName}}】的【{{datasetType}}】",
|
|
||||||
"log_delete_dataset_collaborator": "【{{name}}】將名為【{{datasetName}}】的【{{datasetType}}】中名為【itemValueName】的【itemName】權限刪除",
|
|
||||||
"log_delete_department": "{{name}} 刪除了部門 {{departmentName}}",
|
"log_delete_department": "{{name}} 刪除了部門 {{departmentName}}",
|
||||||
"log_delete_group": "{{name}} 刪除了群組 {{groupName}}",
|
"log_delete_group": "{{name}} 刪除了群組 {{groupName}}",
|
||||||
"log_details": "詳情",
|
"log_details": "詳情",
|
||||||
"log_export_app_chat_log": "【{{name}}】導出了名為【{{appName}}】的【{{appType}}】的聊天記錄",
|
|
||||||
"log_export_bill_records": "【{{name}}】導出了賬單記錄",
|
|
||||||
"log_export_dataset": "【{{name}}】導出了名為【{{datasetName}}】的【{{datasetType}}】",
|
|
||||||
"log_join_team": "【{{name}}】通過邀請鏈接【{{link}}】加入團隊",
|
"log_join_team": "【{{name}}】通過邀請鏈接【{{link}}】加入團隊",
|
||||||
"log_kick_out_team": "{{name}} 移除了成員 {{memberName}}",
|
"log_kick_out_team": "{{name}} 移除了成員 {{memberName}}",
|
||||||
"log_login": "【{{name}}】登錄了系統",
|
"log_login": "【{{name}}】登錄了系統",
|
||||||
"log_move_app": "【{{name}}】將名為【{{appName}}】的【{{appType}}】移動到【{{targetFolderName}}】",
|
|
||||||
"log_move_dataset": "【{{name}}】將名為【{{datasetName}}】的【{{datasetType}}】移動到【{{targetFolderName}}】",
|
|
||||||
"log_recover_team_member": "【{{name}}】恢復了成員【{{memberName}}】",
|
"log_recover_team_member": "【{{name}}】恢復了成員【{{memberName}}】",
|
||||||
"log_relocate_department": "【{{name}}】移動了部門【{{departmentName}}】",
|
"log_relocate_department": "【{{name}}】移動了部門【{{departmentName}}】",
|
||||||
"log_retrain_collection": "【{{name}}】在名為【{{datasetName}}】的【{{datasetType}}】重新訓練了名為【{{collectionName}}】的集合",
|
|
||||||
"log_search_test": "【{{name}}】在名為【{{datasetName}}】的【{{datasetType}}】執行搜索測試操作",
|
|
||||||
"log_set_invoice_header": "【{{name}}】進行了設置發票抬頭操作",
|
|
||||||
"log_time": "操作時間",
|
"log_time": "操作時間",
|
||||||
"log_transfer_app_ownership": "【{{name}}】將名為【{{appName}}】的【{{appType}}】的所有權從【{{oldOwnerName}}】轉移到【{{newOwnerName}}】",
|
|
||||||
"log_transfer_dataset_ownership": "【{{name}}】將名為【{{datasetName}}】的【{{datasetType}}】的所有權從【{{oldOwnerName}}】轉移到【{{newOwnerName}}】",
|
|
||||||
"log_type": "操作類型",
|
"log_type": "操作類型",
|
||||||
"log_update_api_key": "【{{name}}】更新了名為【{{keyName}}】的api密鑰",
|
|
||||||
"log_update_app_collaborator": "【{{name}}】將名為【{{appName}}】的【{{appType}}】的合作者更新為:組織:【{{orgList}}】,群組:【{{groupList}}】,成員【{{tmbList}}】;權限更新為:讀權限:【{{readPermission}}】,寫權限:【{{writePermission}}】,管理員權限:【{{managePermission}}】",
|
|
||||||
"log_update_app_info": "【{{name}}】更新了名為【{{appName}}】的【{{appType}}】:【{{newItemNames}}】為【{{newItemValues}}】",
|
|
||||||
"log_update_app_publish_channel": "【{{name}}】給名為【{{appName}}】的【{{appType}}】更新了名為【{{channelName}}】的渠道",
|
|
||||||
"log_update_collection": "【{{name}}】在名為【{{datasetName}}】的【{{datasetType}}】更新了名為【{{collectionName}}】的集合",
|
|
||||||
"log_update_data": "【{{name}}】在名為【{{datasetName}}】的【{{datasetType}}】在名為【{{collectionName}}】的集合更新數據",
|
|
||||||
"log_update_dataset": "【{{name}}】更新了名為【{{datasetName}}】的【{{datasetType}}】",
|
|
||||||
"log_update_dataset_collaborator": "【{{name}}】將名為【{{datasetName}}】的【{{datasetType}}】的合作者更新為:組織:【{{orgList}}】,群組:【{{groupList}}】,成員【{{tmbList}}】;權限更新為:【{{readPermission}}】,【{{writePermission}}】,【{{managePermission}}】",
|
|
||||||
"log_update_publish_app": "【{{name}}】【{{operationName}}】名為【{{appName}}】的【{{appType}}】",
|
|
||||||
"log_user": "操作人員",
|
"log_user": "操作人員",
|
||||||
"login": "登入",
|
"login": "登入",
|
||||||
"manage_member": "管理成員",
|
"manage_member": "管理成員",
|
||||||
"member": "成員",
|
"member": "成員",
|
||||||
"department": "部門",
|
|
||||||
"update": "更新",
|
|
||||||
"save_and_publish": "儲存並發布",
|
|
||||||
"member_group": "所屬成員組",
|
"member_group": "所屬成員組",
|
||||||
"move_app": "應用位置移動",
|
|
||||||
"move_dataset": "移動知識庫",
|
|
||||||
"move_member": "移動成員",
|
"move_member": "移動成員",
|
||||||
"move_org": "行動部門",
|
"move_org": "行動部門",
|
||||||
"notification_recieve": "團隊通知接收",
|
"notification_recieve": "團隊通知接收",
|
||||||
@ -160,7 +92,6 @@
|
|||||||
"permission_manage": "管理員",
|
"permission_manage": "管理員",
|
||||||
"permission_manage_tip": "可以管理成員、建立群組、管理所有群組、為群組和成員分配權限",
|
"permission_manage_tip": "可以管理成員、建立群組、管理所有群組、為群組和成員分配權限",
|
||||||
"please_bind_contact": "請綁定聯繫方式",
|
"please_bind_contact": "請綁定聯繫方式",
|
||||||
"purchase_plan": "升級套餐",
|
|
||||||
"recover_team_member": "成員恢復",
|
"recover_team_member": "成員恢復",
|
||||||
"relocate_department": "部門移動",
|
"relocate_department": "部門移動",
|
||||||
"remark": "備註",
|
"remark": "備註",
|
||||||
@ -168,45 +99,17 @@
|
|||||||
"restore_tip": "確認將 {{username}} 加入團隊嗎?\n僅恢復該成員賬號可用性及相關權限,無法恢復賬號下資源。",
|
"restore_tip": "確認將 {{username}} 加入團隊嗎?\n僅恢復該成員賬號可用性及相關權限,無法恢復賬號下資源。",
|
||||||
"restore_tip_title": "恢復確認",
|
"restore_tip_title": "恢復確認",
|
||||||
"retain_admin_permissions": "保留管理員權限",
|
"retain_admin_permissions": "保留管理員權限",
|
||||||
"retrain_collection": "重新訓練集合",
|
|
||||||
"search_log": "搜索日誌",
|
"search_log": "搜索日誌",
|
||||||
"search_member": "搜索成員",
|
"search_member": "搜索成員",
|
||||||
"search_member_group_name": "搜尋成員/群組名稱",
|
"search_member_group_name": "搜尋成員/群組名稱",
|
||||||
"search_org": "搜索部門",
|
"search_org": "搜索部門",
|
||||||
"search_test": "搜索測試",
|
|
||||||
"set_invoice_header": "設置發票抬頭",
|
|
||||||
"set_name_avatar": "團隊頭像",
|
"set_name_avatar": "團隊頭像",
|
||||||
"sync_immediately": "立即同步",
|
"sync_immediately": "立即同步",
|
||||||
"sync_member_failed": "同步成員失敗",
|
"sync_member_failed": "同步成員失敗",
|
||||||
"sync_member_success": "同步成員成功",
|
"sync_member_success": "同步成員成功",
|
||||||
"total_team_members": "共 {{amount}} 名成員",
|
"total_team_members": "共 {{amount}} 名成員",
|
||||||
"transfer_app_ownership": "轉移應用程式所有權",
|
|
||||||
"transfer_dataset_ownership": "轉移知識庫所有權",
|
|
||||||
"transfer_ownership": "轉讓所有者",
|
"transfer_ownership": "轉讓所有者",
|
||||||
"type.Folder": "資料夾",
|
|
||||||
"type.Http plugin": "HTTP 外掛",
|
|
||||||
"type.Plugin": "外掛",
|
|
||||||
"type.Simple bot": "簡易應用程式",
|
|
||||||
"type.Tool": "工具",
|
|
||||||
"type.Tool set": "工具集",
|
|
||||||
"type.Workflow bot": "工作流程",
|
|
||||||
"dataset.folder_dataset": "資料夾",
|
|
||||||
"dataset.common_dataset": "知識庫",
|
|
||||||
"dataset.website_dataset": "網站同步",
|
|
||||||
"dataset.external_file": "外部文件",
|
|
||||||
"dataset.api_file": "API 匯入",
|
|
||||||
"dataset.feishu_dataset": "飛書多維表格",
|
|
||||||
"dataset.yuque_dataset": "語雀知識庫",
|
|
||||||
"unlimited": "無限制",
|
"unlimited": "無限制",
|
||||||
"update_api_key": "更新api密鑰",
|
|
||||||
"update_app_collaborator": "應用權限更改",
|
|
||||||
"update_app_info": "應用信息修改",
|
|
||||||
"update_app_publish_channel": "更新發布渠道",
|
|
||||||
"update_collection": "更新集合",
|
|
||||||
"update_data": "更新數據",
|
|
||||||
"update_dataset": "更新知識庫",
|
|
||||||
"update_dataset_collaborator": "知識庫權限更改",
|
|
||||||
"update_publish_app": "應用更新",
|
|
||||||
"used_times_limit": "有效人數",
|
"used_times_limit": "有效人數",
|
||||||
"user_name": "使用者名稱",
|
"user_name": "使用者名稱",
|
||||||
"user_team_invite_member": "邀請成員",
|
"user_team_invite_member": "邀請成員",
|
||||||
|
|||||||
@ -198,9 +198,6 @@
|
|||||||
"type.MCP_tools_url": "MCP 地址",
|
"type.MCP_tools_url": "MCP 地址",
|
||||||
"type.Plugin": "外掛",
|
"type.Plugin": "外掛",
|
||||||
"type.Simple bot": "簡易應用程式",
|
"type.Simple bot": "簡易應用程式",
|
||||||
"type.Folder": "資料夾",
|
|
||||||
"type.Tool set": "工具集",
|
|
||||||
"type.Tool": "工具",
|
|
||||||
"type.Workflow bot": "工作流程",
|
"type.Workflow bot": "工作流程",
|
||||||
"type.error.Workflow data is empty": "沒有獲取到工作流數據",
|
"type.error.Workflow data is empty": "沒有獲取到工作流數據",
|
||||||
"type.error.workflowresponseempty": "響應內容為空",
|
"type.error.workflowresponseempty": "響應內容為空",
|
||||||
|
|||||||
@ -215,7 +215,6 @@
|
|||||||
"core.app.Interval timer run": "排程執行",
|
"core.app.Interval timer run": "排程執行",
|
||||||
"core.app.Interval timer tip": "可排程執行應用程式",
|
"core.app.Interval timer tip": "可排程執行應用程式",
|
||||||
"core.app.Make a brief introduction of your app": "為您的 AI 應用程式寫一段介紹",
|
"core.app.Make a brief introduction of your app": "為您的 AI 應用程式寫一段介紹",
|
||||||
"core.app.name": "名稱",
|
|
||||||
"core.app.Name and avatar": "頭像與名稱",
|
"core.app.Name and avatar": "頭像與名稱",
|
||||||
"core.app.Publish": "發布",
|
"core.app.Publish": "發布",
|
||||||
"core.app.Publish Confirm": "確認發布應用程式?這將立即更新所有發布管道的應用程式狀態。",
|
"core.app.Publish Confirm": "確認發布應用程式?這將立即更新所有發布管道的應用程式狀態。",
|
||||||
|
|||||||
7
plugins/webcrawler/SPIDER/package-lock.json
generated
7
plugins/webcrawler/SPIDER/package-lock.json
generated
@ -4992,10 +4992,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/tar-fs": {
|
"node_modules/tar-fs": {
|
||||||
"version": "3.0.9",
|
"version": "3.0.8",
|
||||||
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.9.tgz",
|
"resolved": "https://registry.npmmirror.com/tar-fs/-/tar-fs-3.0.8.tgz",
|
||||||
"integrity": "sha512-XF4w9Xp+ZQgifKakjZYmFdkLoSWd34VGKcsTCwlNWM7QG3ZbaxnTsaBwnjFZqHRf/rROxaR8rXnbtwdvaDI+lA==",
|
"integrity": "sha512-ZoROL70jptorGAlgAYiLoBLItEKw/fUxg9BSYK/dF/GAGYFJOJJJMvjPAKDJraCXFwadD456FCuvLWgfhMsPwg==",
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"pump": "^3.0.0",
|
"pump": "^3.0.0",
|
||||||
"tar-stream": "^3.1.5"
|
"tar-stream": "^3.1.5"
|
||||||
|
|||||||
68
pnpm-lock.yaml
generated
68
pnpm-lock.yaml
generated
@ -46,7 +46,7 @@ importers:
|
|||||||
version: 10.1.4(socks@2.8.4)
|
version: 10.1.4(socks@2.8.4)
|
||||||
next-i18next:
|
next-i18next:
|
||||||
specifier: 15.4.2
|
specifier: 15.4.2
|
||||||
version: 15.4.2(i18next@23.16.8)(next@14.2.28(@babel/core@7.26.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.85.1))(react-i18next@14.1.2(i18next@23.16.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)
|
version: 15.4.2(i18next@23.16.8)(next@14.2.28(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.85.1))(react-i18next@14.1.2(i18next@23.16.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)
|
||||||
prettier:
|
prettier:
|
||||||
specifier: 3.2.4
|
specifier: 3.2.4
|
||||||
version: 3.2.4
|
version: 3.2.4
|
||||||
@ -343,7 +343,7 @@ importers:
|
|||||||
version: 2.1.1(@chakra-ui/system@2.6.1(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@emotion/styled@11.11.0(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@types/react@18.3.1)(react@18.3.1))(react@18.3.1))(react@18.3.1)
|
version: 2.1.1(@chakra-ui/system@2.6.1(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@emotion/styled@11.11.0(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@types/react@18.3.1)(react@18.3.1))(react@18.3.1))(react@18.3.1)
|
||||||
'@chakra-ui/next-js':
|
'@chakra-ui/next-js':
|
||||||
specifier: 2.4.2
|
specifier: 2.4.2
|
||||||
version: 2.4.2(@chakra-ui/react@2.10.7(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@emotion/styled@11.11.0(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@types/react@18.3.1)(react@18.3.1))(@types/react@18.3.1)(framer-motion@9.1.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(next@14.2.28(@babel/core@7.26.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.85.1))(react@18.3.1)
|
version: 2.4.2(@chakra-ui/react@2.10.7(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@emotion/styled@11.11.0(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@types/react@18.3.1)(react@18.3.1))(@types/react@18.3.1)(framer-motion@9.1.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(next@14.2.28(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.85.1))(react@18.3.1)
|
||||||
'@chakra-ui/react':
|
'@chakra-ui/react':
|
||||||
specifier: 2.10.7
|
specifier: 2.10.7
|
||||||
version: 2.10.7(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@emotion/styled@11.11.0(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@types/react@18.3.1)(react@18.3.1))(@types/react@18.3.1)(framer-motion@9.1.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
version: 2.10.7(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@emotion/styled@11.11.0(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@types/react@18.3.1)(react@18.3.1))(@types/react@18.3.1)(framer-motion@9.1.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
||||||
@ -406,7 +406,7 @@ importers:
|
|||||||
version: 4.17.21
|
version: 4.17.21
|
||||||
next-i18next:
|
next-i18next:
|
||||||
specifier: 15.4.2
|
specifier: 15.4.2
|
||||||
version: 15.4.2(i18next@23.16.8)(next@14.2.28(@babel/core@7.26.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.85.1))(react-i18next@14.1.2(i18next@23.16.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)
|
version: 15.4.2(i18next@23.16.8)(next@14.2.28(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.85.1))(react-i18next@14.1.2(i18next@23.16.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)
|
||||||
papaparse:
|
papaparse:
|
||||||
specifier: ^5.4.1
|
specifier: ^5.4.1
|
||||||
version: 5.4.1
|
version: 5.4.1
|
||||||
@ -467,7 +467,7 @@ importers:
|
|||||||
version: 2.1.1(@chakra-ui/system@2.6.1(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@emotion/styled@11.11.0(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@types/react@18.3.1)(react@18.3.1))(react@18.3.1))(react@18.3.1)
|
version: 2.1.1(@chakra-ui/system@2.6.1(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@emotion/styled@11.11.0(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@types/react@18.3.1)(react@18.3.1))(react@18.3.1))(react@18.3.1)
|
||||||
'@chakra-ui/next-js':
|
'@chakra-ui/next-js':
|
||||||
specifier: 2.4.2
|
specifier: 2.4.2
|
||||||
version: 2.4.2(@chakra-ui/react@2.10.7(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@emotion/styled@11.11.0(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@types/react@18.3.1)(react@18.3.1))(@types/react@18.3.1)(framer-motion@9.1.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(next@14.2.28(@babel/core@7.26.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.85.1))(react@18.3.1)
|
version: 2.4.2(@chakra-ui/react@2.10.7(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@emotion/styled@11.11.0(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@types/react@18.3.1)(react@18.3.1))(@types/react@18.3.1)(framer-motion@9.1.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(next@14.2.28(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.85.1))(react@18.3.1)
|
||||||
'@chakra-ui/react':
|
'@chakra-ui/react':
|
||||||
specifier: 2.10.7
|
specifier: 2.10.7
|
||||||
version: 2.10.7(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@emotion/styled@11.11.0(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@types/react@18.3.1)(react@18.3.1))(@types/react@18.3.1)(framer-motion@9.1.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
version: 2.10.7(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@emotion/styled@11.11.0(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@types/react@18.3.1)(react@18.3.1))(@types/react@18.3.1)(framer-motion@9.1.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
||||||
@ -569,7 +569,7 @@ importers:
|
|||||||
version: 14.2.28(@babel/core@7.26.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.85.1)
|
version: 14.2.28(@babel/core@7.26.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.85.1)
|
||||||
next-i18next:
|
next-i18next:
|
||||||
specifier: 15.4.2
|
specifier: 15.4.2
|
||||||
version: 15.4.2(i18next@23.16.8)(next@14.2.28(@babel/core@7.26.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.85.1))(react-i18next@14.1.2(i18next@23.16.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)
|
version: 15.4.2(i18next@23.16.8)(next@14.2.28(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.85.1))(react-i18next@14.1.2(i18next@23.16.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)
|
||||||
nprogress:
|
nprogress:
|
||||||
specifier: ^0.2.0
|
specifier: ^0.2.0
|
||||||
version: 0.2.0
|
version: 0.2.0
|
||||||
@ -612,6 +612,9 @@ importers:
|
|||||||
rehype-katex:
|
rehype-katex:
|
||||||
specifier: ^7.0.0
|
specifier: ^7.0.0
|
||||||
version: 7.0.1
|
version: 7.0.1
|
||||||
|
rehype-raw:
|
||||||
|
specifier: ^7.0.0
|
||||||
|
version: 7.0.0
|
||||||
remark-breaks:
|
remark-breaks:
|
||||||
specifier: ^4.0.0
|
specifier: ^4.0.0
|
||||||
version: 4.0.0
|
version: 4.0.0
|
||||||
@ -5879,9 +5882,15 @@ packages:
|
|||||||
hast-util-parse-selector@4.0.0:
|
hast-util-parse-selector@4.0.0:
|
||||||
resolution: {integrity: sha512-wkQCkSYoOGCRKERFWcxMVMOcYE2K1AaNLU8DXS9arxnLOUEWbOXKXiJUNzEpqZ3JOKpnha3jkFrumEjVliDe7A==}
|
resolution: {integrity: sha512-wkQCkSYoOGCRKERFWcxMVMOcYE2K1AaNLU8DXS9arxnLOUEWbOXKXiJUNzEpqZ3JOKpnha3jkFrumEjVliDe7A==}
|
||||||
|
|
||||||
|
hast-util-raw@9.1.0:
|
||||||
|
resolution: {integrity: sha512-Y8/SBAHkZGoNkpzqqfCldijcuUKh7/su31kEBp67cFY09Wy0mTRgtsLYsiIxMJxlu0f6AA5SUTbDR8K0rxnbUw==}
|
||||||
|
|
||||||
hast-util-to-jsx-runtime@2.3.6:
|
hast-util-to-jsx-runtime@2.3.6:
|
||||||
resolution: {integrity: sha512-zl6s8LwNyo1P9uw+XJGvZtdFF1GdAkOg8ujOw+4Pyb76874fLps4ueHXDhXWdk6YHQ6OgUtinliG7RsYvCbbBg==}
|
resolution: {integrity: sha512-zl6s8LwNyo1P9uw+XJGvZtdFF1GdAkOg8ujOw+4Pyb76874fLps4ueHXDhXWdk6YHQ6OgUtinliG7RsYvCbbBg==}
|
||||||
|
|
||||||
|
hast-util-to-parse5@8.0.0:
|
||||||
|
resolution: {integrity: sha512-3KKrV5ZVI8if87DVSi1vDeByYrkGzg4mEfeu4alwgmmIeARiBLKCZS2uw5Gb6nU9x9Yufyj3iudm6i7nl52PFw==}
|
||||||
|
|
||||||
hast-util-to-text@4.0.2:
|
hast-util-to-text@4.0.2:
|
||||||
resolution: {integrity: sha512-KK6y/BN8lbaq654j7JgBydev7wuNMcID54lkRav1P0CaE1e47P72AWWPiGKXTJU271ooYzcvTAn/Zt0REnvc7A==}
|
resolution: {integrity: sha512-KK6y/BN8lbaq654j7JgBydev7wuNMcID54lkRav1P0CaE1e47P72AWWPiGKXTJU271ooYzcvTAn/Zt0REnvc7A==}
|
||||||
|
|
||||||
@ -5919,6 +5928,9 @@ packages:
|
|||||||
html-url-attributes@3.0.1:
|
html-url-attributes@3.0.1:
|
||||||
resolution: {integrity: sha512-ol6UPyBWqsrO6EJySPz2O7ZSr856WDrEzM5zMqp+FJJLGMW35cLYmmZnl0vztAZxRUoNZJFTCohfjuIJ8I4QBQ==}
|
resolution: {integrity: sha512-ol6UPyBWqsrO6EJySPz2O7ZSr856WDrEzM5zMqp+FJJLGMW35cLYmmZnl0vztAZxRUoNZJFTCohfjuIJ8I4QBQ==}
|
||||||
|
|
||||||
|
html-void-elements@3.0.0:
|
||||||
|
resolution: {integrity: sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==}
|
||||||
|
|
||||||
htmlparser2@8.0.2:
|
htmlparser2@8.0.2:
|
||||||
resolution: {integrity: sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==}
|
resolution: {integrity: sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==}
|
||||||
|
|
||||||
@ -8026,6 +8038,9 @@ packages:
|
|||||||
property-information@5.6.0:
|
property-information@5.6.0:
|
||||||
resolution: {integrity: sha512-YUHSPk+A30YPv+0Qf8i9Mbfe/C0hdPXk1s1jPVToV8pk8BQtpw10ct89Eo7OWkutrwqvT0eicAxlOg3dOAu8JA==}
|
resolution: {integrity: sha512-YUHSPk+A30YPv+0Qf8i9Mbfe/C0hdPXk1s1jPVToV8pk8BQtpw10ct89Eo7OWkutrwqvT0eicAxlOg3dOAu8JA==}
|
||||||
|
|
||||||
|
property-information@6.5.0:
|
||||||
|
resolution: {integrity: sha512-PgTgs/BlvHxOu8QuEN7wi5A0OmXaBcHpmCSTehcs6Uuu9IkDIEo13Hy7n898RHfrQ49vKCoGeWZSaAK01nwVig==}
|
||||||
|
|
||||||
property-information@7.0.0:
|
property-information@7.0.0:
|
||||||
resolution: {integrity: sha512-7D/qOz/+Y4X/rzSB6jKxKUsQnphO046ei8qxG59mtM3RG3DHgTK81HrxrmoDVINJb8NKT5ZsRbwHvQ6B68Iyhg==}
|
resolution: {integrity: sha512-7D/qOz/+Y4X/rzSB6jKxKUsQnphO046ei8qxG59mtM3RG3DHgTK81HrxrmoDVINJb8NKT5ZsRbwHvQ6B68Iyhg==}
|
||||||
|
|
||||||
@ -8361,6 +8376,9 @@ packages:
|
|||||||
rehype-katex@7.0.1:
|
rehype-katex@7.0.1:
|
||||||
resolution: {integrity: sha512-OiM2wrZ/wuhKkigASodFoo8wimG3H12LWQaH8qSPVJn9apWKFSH3YOCtbKpBorTVw/eI7cuT21XBbvwEswbIOA==}
|
resolution: {integrity: sha512-OiM2wrZ/wuhKkigASodFoo8wimG3H12LWQaH8qSPVJn9apWKFSH3YOCtbKpBorTVw/eI7cuT21XBbvwEswbIOA==}
|
||||||
|
|
||||||
|
rehype-raw@7.0.0:
|
||||||
|
resolution: {integrity: sha512-/aE8hCfKlQeA8LmyeyQvQF3eBiLRGNlfBJEvWH7ivp9sBqs7TNqBL5X3v157rM4IFETqDnIOO+z5M/biZbo9Ww==}
|
||||||
|
|
||||||
remark-breaks@4.0.0:
|
remark-breaks@4.0.0:
|
||||||
resolution: {integrity: sha512-IjEjJOkH4FuJvHZVIW0QCDWxcG96kCq7An/KVH2NfJe6rKZU2AsHeB3OEjPNRxi4QC34Xdx7I2KGYn6IpT7gxQ==}
|
resolution: {integrity: sha512-IjEjJOkH4FuJvHZVIW0QCDWxcG96kCq7An/KVH2NfJe6rKZU2AsHeB3OEjPNRxi4QC34Xdx7I2KGYn6IpT7gxQ==}
|
||||||
|
|
||||||
@ -10969,7 +10987,7 @@ snapshots:
|
|||||||
'@chakra-ui/system': 2.6.1(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@emotion/styled@11.11.0(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@types/react@18.3.1)(react@18.3.1))(react@18.3.1)
|
'@chakra-ui/system': 2.6.1(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@emotion/styled@11.11.0(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@types/react@18.3.1)(react@18.3.1))(react@18.3.1)
|
||||||
react: 18.3.1
|
react: 18.3.1
|
||||||
|
|
||||||
'@chakra-ui/next-js@2.4.2(@chakra-ui/react@2.10.7(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@emotion/styled@11.11.0(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@types/react@18.3.1)(react@18.3.1))(@types/react@18.3.1)(framer-motion@9.1.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(next@14.2.28(@babel/core@7.26.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.85.1))(react@18.3.1)':
|
'@chakra-ui/next-js@2.4.2(@chakra-ui/react@2.10.7(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@emotion/styled@11.11.0(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@types/react@18.3.1)(react@18.3.1))(@types/react@18.3.1)(framer-motion@9.1.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(next@14.2.28(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.85.1))(react@18.3.1)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@chakra-ui/react': 2.10.7(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@emotion/styled@11.11.0(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@types/react@18.3.1)(react@18.3.1))(@types/react@18.3.1)(framer-motion@9.1.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
'@chakra-ui/react': 2.10.7(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@emotion/styled@11.11.0(@emotion/react@11.11.1(@types/react@18.3.1)(react@18.3.1))(@types/react@18.3.1)(react@18.3.1))(@types/react@18.3.1)(framer-motion@9.1.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
||||||
'@emotion/cache': 11.14.0
|
'@emotion/cache': 11.14.0
|
||||||
@ -16108,6 +16126,22 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@types/hast': 3.0.4
|
'@types/hast': 3.0.4
|
||||||
|
|
||||||
|
hast-util-raw@9.1.0:
|
||||||
|
dependencies:
|
||||||
|
'@types/hast': 3.0.4
|
||||||
|
'@types/unist': 3.0.3
|
||||||
|
'@ungap/structured-clone': 1.3.0
|
||||||
|
hast-util-from-parse5: 8.0.3
|
||||||
|
hast-util-to-parse5: 8.0.0
|
||||||
|
html-void-elements: 3.0.0
|
||||||
|
mdast-util-to-hast: 13.2.0
|
||||||
|
parse5: 7.2.1
|
||||||
|
unist-util-position: 5.0.0
|
||||||
|
unist-util-visit: 5.0.0
|
||||||
|
vfile: 6.0.3
|
||||||
|
web-namespaces: 2.0.1
|
||||||
|
zwitch: 2.0.4
|
||||||
|
|
||||||
hast-util-to-jsx-runtime@2.3.6:
|
hast-util-to-jsx-runtime@2.3.6:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/estree': 1.0.6
|
'@types/estree': 1.0.6
|
||||||
@ -16128,6 +16162,16 @@ snapshots:
|
|||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
|
hast-util-to-parse5@8.0.0:
|
||||||
|
dependencies:
|
||||||
|
'@types/hast': 3.0.4
|
||||||
|
comma-separated-tokens: 2.0.3
|
||||||
|
devlop: 1.1.0
|
||||||
|
property-information: 6.5.0
|
||||||
|
space-separated-tokens: 2.0.2
|
||||||
|
web-namespaces: 2.0.1
|
||||||
|
zwitch: 2.0.4
|
||||||
|
|
||||||
hast-util-to-text@4.0.2:
|
hast-util-to-text@4.0.2:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/hast': 3.0.4
|
'@types/hast': 3.0.4
|
||||||
@ -16175,6 +16219,8 @@ snapshots:
|
|||||||
|
|
||||||
html-url-attributes@3.0.1: {}
|
html-url-attributes@3.0.1: {}
|
||||||
|
|
||||||
|
html-void-elements@3.0.0: {}
|
||||||
|
|
||||||
htmlparser2@8.0.2:
|
htmlparser2@8.0.2:
|
||||||
dependencies:
|
dependencies:
|
||||||
domelementtype: 2.3.0
|
domelementtype: 2.3.0
|
||||||
@ -18238,7 +18284,7 @@ snapshots:
|
|||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
next-i18next@15.4.2(i18next@23.16.8)(next@14.2.28(@babel/core@7.26.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.85.1))(react-i18next@14.1.2(i18next@23.16.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1):
|
next-i18next@15.4.2(i18next@23.16.8)(next@14.2.28(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.85.1))(react-i18next@14.1.2(i18next@23.16.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/runtime': 7.26.10
|
'@babel/runtime': 7.26.10
|
||||||
'@types/hoist-non-react-statics': 3.3.6
|
'@types/hoist-non-react-statics': 3.3.6
|
||||||
@ -18873,6 +18919,8 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
xtend: 4.0.2
|
xtend: 4.0.2
|
||||||
|
|
||||||
|
property-information@6.5.0: {}
|
||||||
|
|
||||||
property-information@7.0.0: {}
|
property-information@7.0.0: {}
|
||||||
|
|
||||||
proto-list@1.2.4: {}
|
proto-list@1.2.4: {}
|
||||||
@ -19292,6 +19340,12 @@ snapshots:
|
|||||||
unist-util-visit-parents: 6.0.1
|
unist-util-visit-parents: 6.0.1
|
||||||
vfile: 6.0.3
|
vfile: 6.0.3
|
||||||
|
|
||||||
|
rehype-raw@7.0.0:
|
||||||
|
dependencies:
|
||||||
|
'@types/hast': 3.0.4
|
||||||
|
hast-util-raw: 9.1.0
|
||||||
|
vfile: 6.0.3
|
||||||
|
|
||||||
remark-breaks@4.0.0:
|
remark-breaks@4.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/mdast': 4.0.4
|
'@types/mdast': 4.0.4
|
||||||
|
|||||||
@ -85,10 +85,10 @@ RUN chown -R nextjs:nodejs /app/data
|
|||||||
|
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
ENV NEXT_TELEMETRY_DISABLED=1
|
ENV NEXT_TELEMETRY_DISABLED=1
|
||||||
ENV PORT=3001
|
ENV PORT=3000
|
||||||
ENV NEXT_PUBLIC_BASE_URL=$base_url
|
ENV NEXT_PUBLIC_BASE_URL=$base_url
|
||||||
|
|
||||||
EXPOSE 3001
|
EXPOSE 3000
|
||||||
|
|
||||||
USER nextjs
|
USER nextjs
|
||||||
|
|
||||||
|
|||||||
@ -2,9 +2,7 @@
|
|||||||
{
|
{
|
||||||
"feConfigs": {
|
"feConfigs": {
|
||||||
"lafEnv": "https://laf.dev", // laf环境。 https://laf.run (杭州阿里云) ,或者私有化的laf环境。如果使用 Laf openapi 功能,需要最新版的 laf 。
|
"lafEnv": "https://laf.dev", // laf环境。 https://laf.run (杭州阿里云) ,或者私有化的laf环境。如果使用 Laf openapi 功能,需要最新版的 laf 。
|
||||||
"mcpServerProxyEndpoint": "", // mcp server 代理地址,例如: http://localhost:3005
|
"mcpServerProxyEndpoint": "" // mcp server 代理地址,例如: http://localhost:3005
|
||||||
"show_git":false,
|
|
||||||
"system_Title":"Test"
|
|
||||||
},
|
},
|
||||||
"systemEnv": {
|
"systemEnv": {
|
||||||
"vectorMaxProcess": 10, // 向量处理线程数量
|
"vectorMaxProcess": 10, // 向量处理线程数量
|
||||||
|
|||||||
@ -1,38 +0,0 @@
|
|||||||
version: '3.3'
|
|
||||||
|
|
||||||
services:
|
|
||||||
martin-gpt:
|
|
||||||
image: martingpt:v4.8.1 # 个人构建的镜像
|
|
||||||
container_name: martin-fastgpt
|
|
||||||
ports:
|
|
||||||
- '3001:3001'
|
|
||||||
networks:
|
|
||||||
- q00k04kgc8wk4k8okwog8owc_fastgpt
|
|
||||||
restart: always
|
|
||||||
environment:
|
|
||||||
- FE_DOMAIN=
|
|
||||||
- DEFAULT_ROOT_PSW=Pllh@123
|
|
||||||
- 'AIPROXY_API_ENDPOINT=http://aiproxy:3000'
|
|
||||||
- AIPROXY_API_TOKEN=aiproxy
|
|
||||||
- DB_MAX_LINK=30
|
|
||||||
- TOKEN_KEY=any
|
|
||||||
- ROOT_KEY=root_key
|
|
||||||
- FILE_TOKEN_KEY=filetoken
|
|
||||||
- 'MONGODB_URI=mongodb://myusername:mypassword@mongo:27017/fastgpt?authSource=admin'
|
|
||||||
- 'PG_URL=postgresql://username:password@pg:5432/postgres'
|
|
||||||
- 'REDIS_URL=redis://default:mypassword@redis:6379'
|
|
||||||
- 'SANDBOX_URL=http://sandbox:3000'
|
|
||||||
- LOG_LEVEL=info
|
|
||||||
- STORE_LOG_LEVEL=warn
|
|
||||||
- WORKFLOW_MAX_RUN_TIMES=1000
|
|
||||||
- WORKFLOW_MAX_LOOP_TIMES=100
|
|
||||||
- ALLOWED_ORIGINS=
|
|
||||||
- USE_IP_LIMIT=false
|
|
||||||
- CHAT_FILE_EXPIRE_TIME=7
|
|
||||||
volumes:
|
|
||||||
- '/data/martingpt/config.json:/app/data/config.json'
|
|
||||||
|
|
||||||
networks:
|
|
||||||
q00k04kgc8wk4k8okwog8owc_fastgpt:
|
|
||||||
external: true # 声明使用外部网络
|
|
||||||
|
|
||||||
@ -11,6 +11,53 @@ const nextConfig = {
|
|||||||
output: 'standalone',
|
output: 'standalone',
|
||||||
reactStrictMode: isDev ? false : true,
|
reactStrictMode: isDev ? false : true,
|
||||||
compress: true,
|
compress: true,
|
||||||
|
|
||||||
|
headers: async () => {
|
||||||
|
const nonce = Buffer.from(crypto.randomUUID()).toString('base64');
|
||||||
|
const csp = `'nonce-${nonce}'`;
|
||||||
|
const scheme_source = 'data: mediastream: blob: filesystem:';
|
||||||
|
const NECESSARY_DOMAINS = [
|
||||||
|
'*.sentry.io',
|
||||||
|
'http://localhost:*',
|
||||||
|
'http://127.0.0.1:*',
|
||||||
|
'https://analytics.google.com',
|
||||||
|
'googletagmanager.com',
|
||||||
|
'*.googletagmanager.com',
|
||||||
|
'https://www.google-analytics.com',
|
||||||
|
'https://api.github.com'
|
||||||
|
].join(' ');
|
||||||
|
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
source: '/chat/(.*)',
|
||||||
|
headers: [
|
||||||
|
{ key: 'X-Frame-Options', value: 'DENY' },
|
||||||
|
{ key: 'X-Content-Type-Options', value: 'nosniff' },
|
||||||
|
{ key: 'X-XSS-Protection', value: '1; mode=block' },
|
||||||
|
{ key: 'Referrer-Policy', value: 'no-referrer' },
|
||||||
|
{
|
||||||
|
key: 'Content-Security-Policy',
|
||||||
|
value: [
|
||||||
|
`default-src 'self' ${scheme_source} ${NECESSARY_DOMAINS} ${csp}`,
|
||||||
|
`script-src 'self' 'unsafe-inline' 'unsafe-eval' ${csp} ${NECESSARY_DOMAINS}`,
|
||||||
|
`style-src 'self' 'unsafe-inline' ${csp} ${NECESSARY_DOMAINS}`,
|
||||||
|
`media-src 'self' http: ${scheme_source} ${NECESSARY_DOMAINS} ${csp}`,
|
||||||
|
`worker-src 'self' ${csp} ${NECESSARY_DOMAINS} ${scheme_source}`,
|
||||||
|
`img-src * data: blob:`,
|
||||||
|
`font-src 'self'`,
|
||||||
|
`connect-src 'self' wss: https: ${scheme_source} ${NECESSARY_DOMAINS} ${csp}`,
|
||||||
|
"object-src 'none'",
|
||||||
|
"form-action 'self'",
|
||||||
|
"base-uri 'self'",
|
||||||
|
"frame-src 'self' 'allow-scripts'",
|
||||||
|
'sandbox allow-scripts allow-same-origin allow-popups allow-forms',
|
||||||
|
'upgrade-insecure-requests'
|
||||||
|
].join('; ')
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
];
|
||||||
|
},
|
||||||
webpack(config, { isServer, nextRuntime }) {
|
webpack(config, { isServer, nextRuntime }) {
|
||||||
Object.assign(config.resolve.alias, {
|
Object.assign(config.resolve.alias, {
|
||||||
'@mongodb-js/zstd': false,
|
'@mongodb-js/zstd': false,
|
||||||
@ -85,7 +132,7 @@ const nextConfig = {
|
|||||||
'pg',
|
'pg',
|
||||||
'bullmq',
|
'bullmq',
|
||||||
'@zilliz/milvus2-sdk-node',
|
'@zilliz/milvus2-sdk-node',
|
||||||
"tiktoken",
|
'tiktoken'
|
||||||
],
|
],
|
||||||
outputFileTracingRoot: path.join(__dirname, '../../'),
|
outputFileTracingRoot: path.join(__dirname, '../../'),
|
||||||
instrumentationHook: true
|
instrumentationHook: true
|
||||||
|
|||||||
@ -3,9 +3,9 @@
|
|||||||
"version": "4.9.10",
|
"version": "4.9.10",
|
||||||
"private": false,
|
"private": false,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev -p 3001",
|
"dev": "next dev",
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
"start": "next start -p 3001",
|
"start": "next start",
|
||||||
"lint": "next lint"
|
"lint": "next lint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -60,6 +60,7 @@
|
|||||||
"recharts": "^2.15.0",
|
"recharts": "^2.15.0",
|
||||||
"rehype-external-links": "^3.0.0",
|
"rehype-external-links": "^3.0.0",
|
||||||
"rehype-katex": "^7.0.0",
|
"rehype-katex": "^7.0.0",
|
||||||
|
"rehype-raw": "^7.0.0",
|
||||||
"remark-breaks": "^4.0.0",
|
"remark-breaks": "^4.0.0",
|
||||||
"remark-gfm": "^4.0.0",
|
"remark-gfm": "^4.0.0",
|
||||||
"remark-math": "^6.0.0",
|
"remark-math": "^6.0.0",
|
||||||
|
|||||||
35
projects/app/src/components/Markdown/errorBoundry.tsx
Normal file
35
projects/app/src/components/Markdown/errorBoundry.tsx
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
interface ErrorBoundaryProps {
|
||||||
|
children: React.ReactNode;
|
||||||
|
fallback?: React.ReactNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ErrorBoundaryState {
|
||||||
|
hasError: boolean;
|
||||||
|
error: Error | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
||||||
|
constructor(props: ErrorBoundaryProps) {
|
||||||
|
super(props);
|
||||||
|
this.state = { hasError: false, error: null };
|
||||||
|
}
|
||||||
|
|
||||||
|
static getDerivedStateFromError(error: Error) {
|
||||||
|
return { hasError: true, error };
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidCatch(error: Error, errorInfo: React.ErrorInfo) {
|
||||||
|
console.error('ErrorBoundary caught an error:', error, errorInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
if (this.state.hasError) {
|
||||||
|
return this.props.fallback || <div>Something went wrong while rendering Markdown.</div>;
|
||||||
|
}
|
||||||
|
return this.props.children;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default ErrorBoundary;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
import React, { useCallback, useMemo } from 'react';
|
import React, { memo, useCallback, useMemo } from 'react';
|
||||||
import ReactMarkdown from 'react-markdown';
|
import ReactMarkdown from 'react-markdown';
|
||||||
import 'katex/dist/katex.min.css';
|
import 'katex/dist/katex.min.css';
|
||||||
import RemarkMath from 'remark-math'; // Math syntax
|
import RemarkMath from 'remark-math'; // Math syntax
|
||||||
@ -6,15 +6,15 @@ import RemarkBreaks from 'remark-breaks'; // Line break
|
|||||||
import RehypeKatex from 'rehype-katex'; // Math render
|
import RehypeKatex from 'rehype-katex'; // Math render
|
||||||
import RemarkGfm from 'remark-gfm'; // Special markdown syntax
|
import RemarkGfm from 'remark-gfm'; // Special markdown syntax
|
||||||
import RehypeExternalLinks from 'rehype-external-links';
|
import RehypeExternalLinks from 'rehype-external-links';
|
||||||
|
import RehypeRaw from 'rehype-raw';
|
||||||
import styles from './index.module.scss';
|
import styles from './index.module.scss';
|
||||||
import dynamic from 'next/dynamic';
|
import dynamic from 'next/dynamic';
|
||||||
|
|
||||||
import { Box } from '@chakra-ui/react';
|
import { Box } from '@chakra-ui/react';
|
||||||
import { CodeClassNameEnum, mdTextFormat } from './utils';
|
import { CodeClassNameEnum, mdTextFormat } from './utils';
|
||||||
|
import ErrorBoundary from './errorBoundry';
|
||||||
|
import SVGRenderer from './markdowSVG';
|
||||||
import { useCreation } from 'ahooks';
|
import { useCreation } from 'ahooks';
|
||||||
import type { AProps } from './A';
|
import type { AProps } from './A';
|
||||||
|
|
||||||
const CodeLight = dynamic(() => import('./codeBlock/CodeLight'), { ssr: false });
|
const CodeLight = dynamic(() => import('./codeBlock/CodeLight'), { ssr: false });
|
||||||
const MermaidCodeBlock = dynamic(() => import('./img/MermaidCodeBlock'), { ssr: false });
|
const MermaidCodeBlock = dynamic(() => import('./img/MermaidCodeBlock'), { ssr: false });
|
||||||
const MdImage = dynamic(() => import('./img/Image'), { ssr: false });
|
const MdImage = dynamic(() => import('./img/Image'), { ssr: false });
|
||||||
@ -26,7 +26,40 @@ const AudioBlock = dynamic(() => import('./codeBlock/Audio'), { ssr: false });
|
|||||||
|
|
||||||
const ChatGuide = dynamic(() => import('./chat/Guide'), { ssr: false });
|
const ChatGuide = dynamic(() => import('./chat/Guide'), { ssr: false });
|
||||||
const QuestionGuide = dynamic(() => import('./chat/QuestionGuide'), { ssr: false });
|
const QuestionGuide = dynamic(() => import('./chat/QuestionGuide'), { ssr: false });
|
||||||
const A = dynamic(() => import('./A'), { ssr: false });
|
|
||||||
|
function isSafeHref(href: string): boolean {
|
||||||
|
if (!href) return false;
|
||||||
|
// allow http(s), mailto, tel, relative paths, #, data:image/audio/video
|
||||||
|
return /^(https?:|mailto:|tel:|\/|#|data:(?:image|audio|video))/i.test(href.trim());
|
||||||
|
}
|
||||||
|
|
||||||
|
const SafeA = (props: any) => {
|
||||||
|
const href = props.href || '';
|
||||||
|
const safeHref = isSafeHref(href) ? href : '#';
|
||||||
|
|
||||||
|
const ALLOWED_A_ATTRS = new Set([
|
||||||
|
'href',
|
||||||
|
'target',
|
||||||
|
'rel',
|
||||||
|
'className',
|
||||||
|
'children',
|
||||||
|
'style',
|
||||||
|
'title'
|
||||||
|
]);
|
||||||
|
const safeProps = filterSafeProps(props, ALLOWED_A_ATTRS);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<a
|
||||||
|
{...safeProps}
|
||||||
|
href={safeHref}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
className="cursor-pointer underline !decoration-primary-700 decoration-dashed"
|
||||||
|
>
|
||||||
|
{props.children || 'Download'}
|
||||||
|
</a>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
source?: string;
|
source?: string;
|
||||||
@ -36,11 +69,9 @@ type Props = {
|
|||||||
} & AProps;
|
} & AProps;
|
||||||
const Markdown = (props: Props) => {
|
const Markdown = (props: Props) => {
|
||||||
const source = props.source || '';
|
const source = props.source || '';
|
||||||
|
|
||||||
if (source.length < 200000) {
|
if (source.length < 200000) {
|
||||||
return <MarkdownRender {...props} />;
|
return <MarkdownRender {...props} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
return <Box whiteSpace={'pre-wrap'}>{source}</Box>;
|
return <Box whiteSpace={'pre-wrap'}>{source}</Box>;
|
||||||
};
|
};
|
||||||
const MarkdownRender = ({
|
const MarkdownRender = ({
|
||||||
@ -48,7 +79,6 @@ const MarkdownRender = ({
|
|||||||
showAnimation,
|
showAnimation,
|
||||||
isDisabled,
|
isDisabled,
|
||||||
forbidZhFormat,
|
forbidZhFormat,
|
||||||
|
|
||||||
chatAuthData,
|
chatAuthData,
|
||||||
onOpenCiteModal
|
onOpenCiteModal
|
||||||
}: Props) => {
|
}: Props) => {
|
||||||
@ -57,54 +87,116 @@ const MarkdownRender = ({
|
|||||||
img: Image,
|
img: Image,
|
||||||
pre: RewritePre,
|
pre: RewritePre,
|
||||||
code: Code,
|
code: Code,
|
||||||
|
svg: SVGRenderer,
|
||||||
|
script: ScriptBlock,
|
||||||
a: (props: any) => (
|
a: (props: any) => (
|
||||||
<A
|
<SafeA
|
||||||
{...props}
|
{...props}
|
||||||
showAnimation={showAnimation}
|
|
||||||
chatAuthData={chatAuthData}
|
chatAuthData={chatAuthData}
|
||||||
onOpenCiteModal={onOpenCiteModal}
|
onOpenCiteModal={onOpenCiteModal}
|
||||||
|
showAnimation={showAnimation}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
}, [chatAuthData, onOpenCiteModal, showAnimation]);
|
}, [chatAuthData, onOpenCiteModal, showAnimation]);
|
||||||
|
|
||||||
const formatSource = useMemo(() => {
|
const formatSource = useMemo(() => {
|
||||||
if (showAnimation || forbidZhFormat) return source;
|
if (showAnimation || forbidZhFormat) return source;
|
||||||
return mdTextFormat(source);
|
return mdTextFormat(source);
|
||||||
}, [forbidZhFormat, showAnimation, source]);
|
}, [forbidZhFormat, showAnimation, source]);
|
||||||
|
|
||||||
const urlTransform = useCallback((val: string) => {
|
const urlTransform = useCallback((val: string) => val, []);
|
||||||
return val;
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box position={'relative'}>
|
<Box position={'relative'}>
|
||||||
|
<ErrorBoundary>
|
||||||
<ReactMarkdown
|
<ReactMarkdown
|
||||||
className={`markdown ${styles.markdown}
|
className={`markdown ${styles.markdown} ${
|
||||||
${showAnimation ? `${formatSource ? styles.waitingAnimation : styles.animation}` : ''}
|
showAnimation ? `${formatSource ? styles.waitingAnimation : styles.animation}` : ''
|
||||||
`}
|
}`}
|
||||||
remarkPlugins={[RemarkMath, [RemarkGfm, { singleTilde: false }], RemarkBreaks]}
|
remarkPlugins={[RemarkMath, [RemarkGfm, { singleTilde: false }], RemarkBreaks]}
|
||||||
rehypePlugins={[RehypeKatex, [RehypeExternalLinks, { target: '_blank' }]]}
|
rehypePlugins={[
|
||||||
|
RehypeKatex,
|
||||||
|
[RehypeExternalLinks, { target: '_blank', rel: ['noopener', 'noreferrer'] }],
|
||||||
|
RehypeRaw as any,
|
||||||
|
() => {
|
||||||
|
return (tree) => {
|
||||||
|
const iterate = (node: any) => {
|
||||||
|
if (node.type === 'element') {
|
||||||
|
// delete ref
|
||||||
|
if (node.properties?.ref) delete node.properties.ref;
|
||||||
|
|
||||||
|
// handle invalid tag name
|
||||||
|
if (!/^[a-z][a-z0-9]*$/i.test(node.tagName)) {
|
||||||
|
node.type = 'text';
|
||||||
|
node.value = `<${node.tagName}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
// handle properties, filter events
|
||||||
|
if (node.properties) {
|
||||||
|
Object.keys(node.properties).forEach((key) => {
|
||||||
|
const keyLower = key.toLowerCase();
|
||||||
|
// if event property (on开头)
|
||||||
|
if (keyLower.startsWith('on')) {
|
||||||
|
const value = node.properties[key];
|
||||||
|
// if event value is not a function or contains suspicious content, delete the event
|
||||||
|
if (
|
||||||
|
typeof value === 'string' || // delete event handler in string format
|
||||||
|
value === null ||
|
||||||
|
value === undefined ||
|
||||||
|
(typeof value === 'string' &&
|
||||||
|
(value.includes('javascript:') ||
|
||||||
|
value.includes('alert') ||
|
||||||
|
value.includes('eval') ||
|
||||||
|
value.includes('Function') ||
|
||||||
|
/[\(\)\[\]\{\}]/.test(value))) // flag for executable code containing parentheses, etc.
|
||||||
|
) {
|
||||||
|
delete node.properties[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// recursive handle child nodes
|
||||||
|
if (node.children) node.children.forEach(iterate);
|
||||||
|
};
|
||||||
|
tree.children.forEach(iterate);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
]}
|
||||||
|
disallowedElements={[
|
||||||
|
'iframe',
|
||||||
|
'head',
|
||||||
|
'html',
|
||||||
|
'meta',
|
||||||
|
'link',
|
||||||
|
'style',
|
||||||
|
'body',
|
||||||
|
'embed',
|
||||||
|
'object',
|
||||||
|
'param',
|
||||||
|
'applet',
|
||||||
|
'area',
|
||||||
|
'map',
|
||||||
|
'isindex'
|
||||||
|
]}
|
||||||
components={components}
|
components={components}
|
||||||
urlTransform={urlTransform}
|
urlTransform={urlTransform}
|
||||||
>
|
>
|
||||||
{formatSource}
|
{formatSource}
|
||||||
</ReactMarkdown>
|
</ReactMarkdown>
|
||||||
|
</ErrorBoundary>
|
||||||
{isDisabled && <Box position={'absolute'} top={0} right={0} left={0} bottom={0} />}
|
{isDisabled && <Box position={'absolute'} top={0} right={0} left={0} bottom={0} />}
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default React.memo(Markdown);
|
export default React.memo(Markdown);
|
||||||
|
|
||||||
/* Custom dom */
|
/* Custom dom */
|
||||||
function Code(e: any) {
|
function Code(e: any) {
|
||||||
const { className, codeBlock, children } = e;
|
const { className, codeBlock, children } = e;
|
||||||
const match = /language-(\w+)/.exec(className || '');
|
const match = /language-(\w+)/.exec(className || '');
|
||||||
const codeType = match?.[1]?.toLowerCase();
|
const codeType = match?.[1]?.toLowerCase();
|
||||||
|
|
||||||
const strChildren = String(children);
|
const strChildren = String(children);
|
||||||
|
|
||||||
const Component = useMemo(() => {
|
const Component = useMemo(() => {
|
||||||
if (codeType === CodeClassNameEnum.mermaid) {
|
if (codeType === CodeClassNameEnum.mermaid) {
|
||||||
return <MermaidCodeBlock code={strChildren} />;
|
return <MermaidCodeBlock code={strChildren} />;
|
||||||
@ -134,22 +226,61 @@ function Code(e: any) {
|
|||||||
if (codeType === CodeClassNameEnum.audio) {
|
if (codeType === CodeClassNameEnum.audio) {
|
||||||
return <AudioBlock code={strChildren} />;
|
return <AudioBlock code={strChildren} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<CodeLight className={className} codeBlock={codeBlock} match={match}>
|
<CodeLight className={className} codeBlock={codeBlock} match={match}>
|
||||||
{children}
|
{children}
|
||||||
</CodeLight>
|
</CodeLight>
|
||||||
);
|
);
|
||||||
}, [codeType, className, codeBlock, match, children, strChildren]);
|
}, [codeType, className, codeBlock, match, children, strChildren]);
|
||||||
|
|
||||||
return Component;
|
return Component;
|
||||||
}
|
}
|
||||||
|
|
||||||
function Image({ src }: { src?: string }) {
|
function sanitizeImageSrc(src?: string): string | undefined {
|
||||||
return <MdImage src={src} />;
|
if (!src) return undefined;
|
||||||
|
// remove leading and trailing spaces
|
||||||
|
const trimmed = src.trim();
|
||||||
|
// only allow http/https/data/blob protocols
|
||||||
|
if (/^(https?:|data:|blob:)/i.test(trimmed)) {
|
||||||
|
return trimmed;
|
||||||
|
}
|
||||||
|
// allow relative paths (not starting with javascript: or vbscript:)
|
||||||
|
if (
|
||||||
|
!/^(\w+:)/.test(trimmed) &&
|
||||||
|
!trimmed.startsWith('javascript:') &&
|
||||||
|
!trimmed.startsWith('vbscript:')
|
||||||
|
) {
|
||||||
|
return trimmed;
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
function RewritePre({ children }: any) {
|
const ALLOWED_IMG_ATTRS = new Set([
|
||||||
|
'alt',
|
||||||
|
'width',
|
||||||
|
'height',
|
||||||
|
'className',
|
||||||
|
'style',
|
||||||
|
'title',
|
||||||
|
'loading',
|
||||||
|
'decoding',
|
||||||
|
'crossOrigin',
|
||||||
|
'referrerPolicy'
|
||||||
|
]);
|
||||||
|
|
||||||
|
function Image({ src, ...rest }: { src?: string; [key: string]: any }) {
|
||||||
|
const safeSrc = sanitizeImageSrc(src);
|
||||||
|
if (!safeSrc) {
|
||||||
|
console.warn(`Blocked unsafe image src: ${src}`);
|
||||||
|
}
|
||||||
|
// only allow whitelist attributes, and remove all on* events
|
||||||
|
const safeProps = filterSafeProps(rest, ALLOWED_IMG_ATTRS);
|
||||||
|
return <MdImage src={safeSrc} {...safeProps} />;
|
||||||
|
}
|
||||||
|
|
||||||
|
function RewritePre({ children, ...rest }: any) {
|
||||||
|
// only allow className, style, etc. safe attributes
|
||||||
|
const ALLOWED_PRE_ATTRS = new Set(['className', 'style']);
|
||||||
|
const safeProps = filterSafeProps(rest, ALLOWED_PRE_ATTRS);
|
||||||
const modifiedChildren = React.Children.map(children, (child) => {
|
const modifiedChildren = React.Children.map(children, (child) => {
|
||||||
if (React.isValidElement(child)) {
|
if (React.isValidElement(child)) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
@ -157,6 +288,146 @@ function RewritePre({ children }: any) {
|
|||||||
}
|
}
|
||||||
return child;
|
return child;
|
||||||
});
|
});
|
||||||
|
return <pre {...safeProps}>{modifiedChildren}</pre>;
|
||||||
return <>{modifiedChildren}</>;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* general safe attribute filter
|
||||||
|
* @param props input props object
|
||||||
|
* @param allowedAttrs allowed attribute name Set
|
||||||
|
* @param eventTypeCheck whether to check event type (e.g. onClick must be a function)
|
||||||
|
*/
|
||||||
|
export function filterSafeProps(
|
||||||
|
props: Record<string, any>,
|
||||||
|
allowedAttrs: Set<string>,
|
||||||
|
eventTypeCheck: boolean = true
|
||||||
|
) {
|
||||||
|
// dangerous protocols
|
||||||
|
const DANGEROUS_PROTOCOLS =
|
||||||
|
/^(?:\s| | )*(?:javascript|vbscript|data(?!:(?:image|audio|video)))/i;
|
||||||
|
|
||||||
|
// dangerous event properties (including various possible ways)
|
||||||
|
const DANGEROUS_EVENTS =
|
||||||
|
/^(?:\s| | )*(?:on|formaction|data-|\[\[|\{\{|xlink:|href|src|action)/i;
|
||||||
|
|
||||||
|
// complete decode function
|
||||||
|
function fullDecode(input: string): string {
|
||||||
|
if (!input) return '';
|
||||||
|
|
||||||
|
let result = input;
|
||||||
|
let lastResult = '';
|
||||||
|
|
||||||
|
// continue decoding until no more decoding can be done
|
||||||
|
while (result !== lastResult) {
|
||||||
|
lastResult = result;
|
||||||
|
try {
|
||||||
|
// HTML entity decode
|
||||||
|
result = result.replace(/&(#?[\w\d]+);/g, (_, entity) => {
|
||||||
|
try {
|
||||||
|
const txt = document.createElement('textarea');
|
||||||
|
txt.innerHTML = `&${entity};`;
|
||||||
|
return txt.value;
|
||||||
|
} catch {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Unicode decode (\u0061 format)
|
||||||
|
result = result.replace(/(?:\\|%5C|%5c)u([0-9a-f]{4})/gi, (_, hex) =>
|
||||||
|
String.fromCharCode(parseInt(hex, 16))
|
||||||
|
);
|
||||||
|
|
||||||
|
// URL encode decode
|
||||||
|
result = result.replace(/%([0-9a-f]{2})/gi, (_, hex) =>
|
||||||
|
String.fromCharCode(parseInt(hex, 16))
|
||||||
|
);
|
||||||
|
|
||||||
|
// octal decode
|
||||||
|
result = result.replace(/\\([0-7]{3})/gi, (_, oct) =>
|
||||||
|
String.fromCharCode(parseInt(oct, 8))
|
||||||
|
);
|
||||||
|
|
||||||
|
// hexadecimal decode (\x61 format)
|
||||||
|
result = result.replace(/(?:\\|%5C|%5c)x([0-9a-f]{2})/gi, (_, hex) =>
|
||||||
|
String.fromCharCode(parseInt(hex, 16))
|
||||||
|
);
|
||||||
|
|
||||||
|
// handle whitespace and comments
|
||||||
|
result = result.replace(/(?:\s|\/\*.*?\*\/|<!--.*?-->)+/g, '');
|
||||||
|
} catch {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result.toLowerCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
// check if it contains dangerous content
|
||||||
|
function containsDangerousContent(value: string): boolean {
|
||||||
|
const decoded = fullDecode(value);
|
||||||
|
|
||||||
|
return (
|
||||||
|
// check dangerous protocol
|
||||||
|
DANGEROUS_PROTOCOLS.test(decoded) ||
|
||||||
|
// check dangerous event
|
||||||
|
DANGEROUS_EVENTS.test(decoded) ||
|
||||||
|
// check inline event
|
||||||
|
/on\w+\s*=/.test(decoded) ||
|
||||||
|
// check javascript: link
|
||||||
|
/javascript\s*:/.test(decoded) ||
|
||||||
|
// check other possible injections
|
||||||
|
/<\w+/i.test(decoded) ||
|
||||||
|
/\(\s*\)/i.test(decoded) ||
|
||||||
|
/\[\s*\]/i.test(decoded) ||
|
||||||
|
/\{\s*\}/i.test(decoded)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Object.fromEntries(
|
||||||
|
Object.entries(props).filter(([key, value]) => {
|
||||||
|
// 1. decode and check property name
|
||||||
|
const decodedKey = fullDecode(key);
|
||||||
|
|
||||||
|
// 2. intercept all event related properties
|
||||||
|
if (DANGEROUS_EVENTS.test(decodedKey)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. all properties not in the whitelist are rejected
|
||||||
|
if (!allowedAttrs.has(key)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4. check property value
|
||||||
|
if (typeof value === 'string') {
|
||||||
|
if (containsDangerousContent(value)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else if (typeof value === 'object' && value !== null) {
|
||||||
|
// only allow simple style objects
|
||||||
|
if (key !== 'style') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// check the value of the style object
|
||||||
|
for (const styleKey in value) {
|
||||||
|
if (containsDangerousContent(String(value[styleKey]))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (typeof value === 'function') {
|
||||||
|
// only allow specific function properties (e.g. onClick)
|
||||||
|
if (!eventTypeCheck || decodedKey !== 'onclick') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const ScriptBlock = memo(({ node }: any) => {
|
||||||
|
const scriptContent = node.children[0]?.value || '';
|
||||||
|
return `<script>${scriptContent}</script>`;
|
||||||
|
});
|
||||||
|
ScriptBlock.displayName = 'ScriptBlock';
|
||||||
|
|||||||
108
projects/app/src/components/Markdown/markdowSVG.tsx
Normal file
108
projects/app/src/components/Markdown/markdowSVG.tsx
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import ErrorBoundary from './errorBoundry';
|
||||||
|
import { filterSafeProps } from './index';
|
||||||
|
|
||||||
|
interface SVGProps {
|
||||||
|
children?: React.ReactNode;
|
||||||
|
className?: string;
|
||||||
|
style?: React.CSSProperties;
|
||||||
|
[key: string]: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
const SVG_ALLOWED_ATTRS = new Set([
|
||||||
|
'width',
|
||||||
|
'height',
|
||||||
|
'viewBox',
|
||||||
|
'fill',
|
||||||
|
'stroke',
|
||||||
|
'd',
|
||||||
|
'x',
|
||||||
|
'y',
|
||||||
|
'cx',
|
||||||
|
'cy',
|
||||||
|
'r',
|
||||||
|
'className',
|
||||||
|
'style'
|
||||||
|
]);
|
||||||
|
|
||||||
|
const SVGRenderer = ({ children, className, style, ...props }: SVGProps) => {
|
||||||
|
// filter props
|
||||||
|
const svgProps = { ...props, className, style };
|
||||||
|
const sanitizedProps = filterSafeProps(svgProps, SVG_ALLOWED_ATTRS, false);
|
||||||
|
|
||||||
|
const sanitizeSVGContent = (content: string | React.ReactNode): string => {
|
||||||
|
if (typeof content !== 'string') {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
let cleaned = content;
|
||||||
|
|
||||||
|
cleaned = cleaned.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, '');
|
||||||
|
cleaned = cleaned.replace(/<style\b[^<]*(?:(?!<\/style>)<[^<]*)*<\/style>/gi, '');
|
||||||
|
cleaned = cleaned.replace(
|
||||||
|
/<foreignObject\b[^<]*(?:(?!<\/foreignObject>)<[^<]*)*<\/foreignObject>/gi,
|
||||||
|
''
|
||||||
|
);
|
||||||
|
|
||||||
|
cleaned = cleaned.replace(/\son\w+="[^"]*"/gi, '');
|
||||||
|
cleaned = cleaned.replace(/\son\w+='[^']*'/gi, '');
|
||||||
|
cleaned = cleaned.replace(/url\s*\(\s*['"]?\s*javascript:[^)]+\)/gi, '');
|
||||||
|
cleaned = cleaned.replace(/\bhref="javascript:[^"]*"/gi, '');
|
||||||
|
cleaned = cleaned.replace(/\bhref='javascript:[^']*'/gi, '');
|
||||||
|
cleaned = cleaned.replace(/\bxlink:href="javascript:[^"]*"/gi, '');
|
||||||
|
cleaned = cleaned.replace(/\bxlink:href='javascript:[^']*'/gi, '');
|
||||||
|
cleaned = cleaned.replace(/\bxmlns(:xlink)?=['"]?javascript:[^"']*['"]?/gi, '');
|
||||||
|
cleaned = cleaned.replace(/style\s*=\s*(['"])(?:(?!\1).)*javascript:.*?\1/gi, '');
|
||||||
|
|
||||||
|
cleaned = cleaned.replace(/\bdata:[^,]*?;base64,[^"')]*["')]/gi, (match) => {
|
||||||
|
return match.toLowerCase().includes('javascript') ? '' : match;
|
||||||
|
});
|
||||||
|
|
||||||
|
const ALLOWED_ATTRS = new Set([
|
||||||
|
'width',
|
||||||
|
'height',
|
||||||
|
'viewBox',
|
||||||
|
'fill',
|
||||||
|
'stroke',
|
||||||
|
'd',
|
||||||
|
'x',
|
||||||
|
'y',
|
||||||
|
'cx',
|
||||||
|
'cy',
|
||||||
|
'r',
|
||||||
|
'class',
|
||||||
|
'style'
|
||||||
|
]);
|
||||||
|
cleaned = cleaned.replace(/\s(\w+)=['"][^'"]*['"]/gi, (match, attr) => {
|
||||||
|
return ALLOWED_ATTRS.has(attr.toLowerCase()) ? match : '';
|
||||||
|
});
|
||||||
|
|
||||||
|
cleaned = cleaned.replace(/<!--[\s\S]*?-->/g, '');
|
||||||
|
|
||||||
|
return cleaned;
|
||||||
|
};
|
||||||
|
|
||||||
|
const sanitizedContent = React.Children.map(children, (child) => {
|
||||||
|
if (typeof child === 'string') {
|
||||||
|
return sanitizeSVGContent(child);
|
||||||
|
}
|
||||||
|
return child;
|
||||||
|
});
|
||||||
|
|
||||||
|
return (
|
||||||
|
<ErrorBoundary fallback={<div>Something went wrong while rendering Markdown.</div>}>
|
||||||
|
<svg
|
||||||
|
{...sanitizedProps}
|
||||||
|
className={className}
|
||||||
|
style={style}
|
||||||
|
dangerouslySetInnerHTML={
|
||||||
|
typeof children === 'string' ? { __html: sanitizeSVGContent(children) } : undefined
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{typeof children !== 'string' && sanitizedContent}
|
||||||
|
</svg>
|
||||||
|
</ErrorBoundary>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default SVGRenderer;
|
||||||
@ -26,7 +26,6 @@ import MultipleSelect, {
|
|||||||
} from '@fastgpt/web/components/common/MySelect/MultipleSelect';
|
} from '@fastgpt/web/components/common/MySelect/MultipleSelect';
|
||||||
import Avatar from '@fastgpt/web/components/common/Avatar';
|
import Avatar from '@fastgpt/web/components/common/Avatar';
|
||||||
import { getTeamMembers } from '@/web/support/user/team/api';
|
import { getTeamMembers } from '@/web/support/user/team/api';
|
||||||
import { createMetadataProcessorMap, type MetadataProcessor } from './processors';
|
|
||||||
|
|
||||||
function OperationLogTable({ Tabs }: { Tabs: React.ReactNode }) {
|
function OperationLogTable({ Tabs }: { Tabs: React.ReactNode }) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@ -59,14 +58,6 @@ function OperationLogTable({ Tabs }: { Tabs: React.ReactNode }) {
|
|||||||
[t]
|
[t]
|
||||||
);
|
);
|
||||||
|
|
||||||
const processMetadataByEvent = useMemo(() => {
|
|
||||||
const metadataProcessorMap = createMetadataProcessorMap();
|
|
||||||
return (event: string, metadata: any) => {
|
|
||||||
const processor = metadataProcessorMap[event as OperationLogEventEnum];
|
|
||||||
return processor ? processor(metadata, t) : metadata;
|
|
||||||
};
|
|
||||||
}, [t]);
|
|
||||||
|
|
||||||
const {
|
const {
|
||||||
data: operationLogs = [],
|
data: operationLogs = [],
|
||||||
isLoading: loadingLogs,
|
isLoading: loadingLogs,
|
||||||
@ -168,7 +159,17 @@ function OperationLogTable({ Tabs }: { Tabs: React.ReactNode }) {
|
|||||||
<Tbody>
|
<Tbody>
|
||||||
{operationLogs?.map((log) => {
|
{operationLogs?.map((log) => {
|
||||||
const i18nData = operationLogMap[log.event];
|
const i18nData = operationLogMap[log.event];
|
||||||
const metadata = processMetadataByEvent(log.event, { ...log.metadata });
|
const metadata = { ...log.metadata };
|
||||||
|
|
||||||
|
if (log.event === OperationLogEventEnum.ASSIGN_PERMISSION) {
|
||||||
|
const permissionValue = parseInt(metadata.permission, 10);
|
||||||
|
|
||||||
|
const permission = new TeamPermission({ per: permissionValue });
|
||||||
|
metadata.appCreate = permission.hasAppCreatePer ? '✔' : '✘';
|
||||||
|
metadata.datasetCreate = permission.hasDatasetCreatePer ? '✔' : '✘';
|
||||||
|
metadata.apiKeyCreate = permission.hasApikeyCreatePer ? '✔' : '✘';
|
||||||
|
metadata.manage = permission.hasManagePer ? '✔' : '✘';
|
||||||
|
}
|
||||||
|
|
||||||
return i18nData ? (
|
return i18nData ? (
|
||||||
<Tr key={log._id} overflow={'unset'}>
|
<Tr key={log._id} overflow={'unset'}>
|
||||||
|
|||||||
@ -1,17 +0,0 @@
|
|||||||
import { AppPermission } from '@fastgpt/global/support/permission/app/controller';
|
|
||||||
import { createSpecialProcessor } from './commonProcessor';
|
|
||||||
|
|
||||||
export const processUpdateAppCollaboratorSpecific = (metadata: any) => {
|
|
||||||
const permissionValue = parseInt(metadata.permission, 10);
|
|
||||||
const permission = new AppPermission({ per: permissionValue });
|
|
||||||
return {
|
|
||||||
...metadata,
|
|
||||||
readPermission: permission.hasReadPer ? '✔' : '✘',
|
|
||||||
writePermission: permission.hasWritePer ? '✔' : '✘',
|
|
||||||
managePermission: permission.hasManagePer ? '✔' : '✘'
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
export const createAppProcessors = () => ({
|
|
||||||
UPDATE_APP_COLLABORATOR: createSpecialProcessor(processUpdateAppCollaboratorSpecific)
|
|
||||||
});
|
|
||||||
@ -1,43 +0,0 @@
|
|||||||
export interface CommonMetadataFields {
|
|
||||||
appType?: string;
|
|
||||||
datasetType?: string;
|
|
||||||
operationName?: string;
|
|
||||||
itemName?: string;
|
|
||||||
newItemNames?: string[] | string;
|
|
||||||
[key: string]: any;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const defaultMetadataProcessor = (metadata: CommonMetadataFields, t: any): any => {
|
|
||||||
const result = { ...metadata };
|
|
||||||
|
|
||||||
const translatableFields = ['appType', 'datasetType', 'operationName', 'itemName'];
|
|
||||||
|
|
||||||
Object.entries(metadata)
|
|
||||||
.filter(([key, value]) => translatableFields.includes(key) && value)
|
|
||||||
.forEach(([key, value]) => {
|
|
||||||
result[key] = t(value as any);
|
|
||||||
});
|
|
||||||
|
|
||||||
if (metadata.newItemNames) {
|
|
||||||
if (Array.isArray(metadata.newItemNames)) {
|
|
||||||
result.newItemNames = metadata.newItemNames
|
|
||||||
.map((itemName: string) => t(itemName as any))
|
|
||||||
.join(',');
|
|
||||||
} else if (typeof metadata.newItemNames === 'string') {
|
|
||||||
result.newItemNames = metadata.newItemNames
|
|
||||||
.split(',')
|
|
||||||
.map((itemName: string) => t(itemName as any))
|
|
||||||
.join(',');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const createSpecialProcessor = (specificProcessor: (metadata: any) => any) => {
|
|
||||||
return (metadata: any, t: any) => {
|
|
||||||
let processedMetadata = defaultMetadataProcessor(metadata, t);
|
|
||||||
processedMetadata = specificProcessor(processedMetadata);
|
|
||||||
return processedMetadata;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
import { DatasetPermission } from '@fastgpt/global/support/permission/dataset/controller';
|
|
||||||
import { createSpecialProcessor } from './commonProcessor';
|
|
||||||
|
|
||||||
export const processUpdateDatasetCollaboratorSpecific = (metadata: any) => {
|
|
||||||
const permissionValue = parseInt(metadata.permission, 10);
|
|
||||||
const permission = new DatasetPermission({ per: permissionValue });
|
|
||||||
return {
|
|
||||||
...metadata,
|
|
||||||
readPermission: permission.hasReadPer ? '✔' : '✘',
|
|
||||||
writePermission: permission.hasWritePer ? '✔' : '✘',
|
|
||||||
managePermission: permission.hasManagePer ? '✔' : '✘'
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
export const createDatasetProcessors = () => ({
|
|
||||||
UPDATE_DATASET_COLLABORATOR: createSpecialProcessor(processUpdateDatasetCollaboratorSpecific)
|
|
||||||
});
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
import { OperationLogEventEnum } from '@fastgpt/global/support/operationLog/constants';
|
|
||||||
import { defaultMetadataProcessor } from './commonProcessor';
|
|
||||||
import { createTeamProcessors } from './teamProcessors';
|
|
||||||
import { createAppProcessors } from './appProcessors';
|
|
||||||
import { createDatasetProcessors } from './datasetProcessors';
|
|
||||||
|
|
||||||
export type MetadataProcessor = (metadata: any, t: any) => any;
|
|
||||||
|
|
||||||
export const createMetadataProcessorMap = (): Record<OperationLogEventEnum, MetadataProcessor> => {
|
|
||||||
const specialProcessors: Partial<Record<OperationLogEventEnum, MetadataProcessor>> = {
|
|
||||||
...createTeamProcessors(),
|
|
||||||
...createAppProcessors(),
|
|
||||||
...createDatasetProcessors()
|
|
||||||
};
|
|
||||||
|
|
||||||
const processorMap = {} as Record<OperationLogEventEnum, MetadataProcessor>;
|
|
||||||
|
|
||||||
Object.values(OperationLogEventEnum).forEach((event) => {
|
|
||||||
processorMap[event] =
|
|
||||||
specialProcessors[event] ||
|
|
||||||
((metadata: any, t: any) => defaultMetadataProcessor(metadata, t));
|
|
||||||
});
|
|
||||||
|
|
||||||
return processorMap;
|
|
||||||
};
|
|
||||||
|
|
||||||
export * from './commonProcessor';
|
|
||||||
export * from './teamProcessors';
|
|
||||||
export * from './appProcessors';
|
|
||||||
export * from './datasetProcessors';
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
import { TeamPermission } from '@fastgpt/global/support/permission/user/controller';
|
|
||||||
import { createSpecialProcessor } from './commonProcessor';
|
|
||||||
|
|
||||||
export const processAssignPermissionSpecific = (metadata: any) => {
|
|
||||||
const permissionValue = parseInt(metadata.permission, 10);
|
|
||||||
const permission = new TeamPermission({ per: permissionValue });
|
|
||||||
|
|
||||||
return {
|
|
||||||
...metadata,
|
|
||||||
appCreate: permission.hasAppCreatePer ? '✔' : '✘',
|
|
||||||
datasetCreate: permission.hasDatasetCreatePer ? '✔' : '✘',
|
|
||||||
apiKeyCreate: permission.hasApikeyCreatePer ? '✔' : '✘',
|
|
||||||
manage: permission.hasManagePer ? '✔' : '✘'
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
export const createTeamProcessors = () => ({
|
|
||||||
ASSIGN_PERMISSION: createSpecialProcessor(processAssignPermissionSpecific)
|
|
||||||
});
|
|
||||||
@ -165,7 +165,7 @@ const FormLayout = ({ children, setPageType, pageType }: Props) => {
|
|||||||
<MyImage src={LOGO_ICON} w={['22.5px', '36px']} alt={'icon'} />
|
<MyImage src={LOGO_ICON} w={['22.5px', '36px']} alt={'icon'} />
|
||||||
</Flex>
|
</Flex>
|
||||||
<Box ml={[3, 5]} fontSize={['lg', 'xl']} fontWeight={'bold'} color={'myGray.900'}>
|
<Box ml={[3, 5]} fontSize={['lg', 'xl']} fontWeight={'bold'} color={'myGray.900'}>
|
||||||
测试FastGPT
|
{feConfigs?.systemTitle}
|
||||||
</Box>
|
</Box>
|
||||||
</Flex>
|
</Flex>
|
||||||
{!isPc && <I18nLngSelector />}
|
{!isPc && <I18nLngSelector />}
|
||||||
|
|||||||
@ -5,10 +5,7 @@ import { authApp } from '@fastgpt/service/support/permission/app/auth';
|
|||||||
import { authUserPer } from '@fastgpt/service/support/permission/user/auth';
|
import { authUserPer } from '@fastgpt/service/support/permission/user/auth';
|
||||||
import type { ApiRequestProps, ApiResponseType } from '@fastgpt/service/type/next';
|
import type { ApiRequestProps, ApiResponseType } from '@fastgpt/service/type/next';
|
||||||
import { onCreateApp } from './create';
|
import { onCreateApp } from './create';
|
||||||
import { addOperationLog } from '@fastgpt/service/support/operationLog/addOperationLog';
|
|
||||||
import { OperationLogEventEnum } from '@fastgpt/global/support/operationLog/constants';
|
|
||||||
import { AppTypeEnum } from '@fastgpt/global/core/app/constants';
|
|
||||||
import { getI18nAppType } from '@fastgpt/service/support/operationLog/util';
|
|
||||||
export type copyAppQuery = {};
|
export type copyAppQuery = {};
|
||||||
|
|
||||||
export type copyAppBody = { appId: string };
|
export type copyAppBody = { appId: string };
|
||||||
@ -21,7 +18,7 @@ async function handler(
|
|||||||
req: ApiRequestProps<copyAppBody, copyAppQuery>,
|
req: ApiRequestProps<copyAppBody, copyAppQuery>,
|
||||||
res: ApiResponseType<any>
|
res: ApiResponseType<any>
|
||||||
): Promise<copyAppResponse> {
|
): Promise<copyAppResponse> {
|
||||||
const { app, teamId } = await authApp({
|
const { app } = await authApp({
|
||||||
req,
|
req,
|
||||||
authToken: true,
|
authToken: true,
|
||||||
per: WritePermissionVal,
|
per: WritePermissionVal,
|
||||||
@ -45,17 +42,6 @@ async function handler(
|
|||||||
tmbId,
|
tmbId,
|
||||||
pluginData: app.pluginData
|
pluginData: app.pluginData
|
||||||
});
|
});
|
||||||
(async () => {
|
|
||||||
addOperationLog({
|
|
||||||
tmbId,
|
|
||||||
teamId,
|
|
||||||
event: OperationLogEventEnum.CREATE_APP_COPY,
|
|
||||||
params: {
|
|
||||||
appName: app.name,
|
|
||||||
appType: getI18nAppType(app.type)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
return { appId };
|
return { appId };
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,9 +19,6 @@ import { checkTeamAppLimit } from '@fastgpt/service/support/permission/teamLimit
|
|||||||
import { authUserPer } from '@fastgpt/service/support/permission/user/auth';
|
import { authUserPer } from '@fastgpt/service/support/permission/user/auth';
|
||||||
import { MongoTeamMember } from '@fastgpt/service/support/user/team/teamMemberSchema';
|
import { MongoTeamMember } from '@fastgpt/service/support/user/team/teamMemberSchema';
|
||||||
import { type ApiRequestProps } from '@fastgpt/service/type/next';
|
import { type ApiRequestProps } from '@fastgpt/service/type/next';
|
||||||
import { addOperationLog } from '@fastgpt/service/support/operationLog/addOperationLog';
|
|
||||||
import { OperationLogEventEnum } from '@fastgpt/global/support/operationLog/constants';
|
|
||||||
import { getI18nAppType } from '@fastgpt/service/support/operationLog/util';
|
|
||||||
|
|
||||||
export type CreateAppBody = {
|
export type CreateAppBody = {
|
||||||
parentId?: ParentIdType;
|
parentId?: ParentIdType;
|
||||||
@ -151,17 +148,6 @@ export const onCreateApp = async ({
|
|||||||
{ session, ordered: true }
|
{ session, ordered: true }
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
(async () => {
|
|
||||||
addOperationLog({
|
|
||||||
tmbId,
|
|
||||||
teamId,
|
|
||||||
event: OperationLogEventEnum.CREATE_APP,
|
|
||||||
params: {
|
|
||||||
appName: name!,
|
|
||||||
appType: getI18nAppType(type!)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
await refreshSourceAvatar(avatar, undefined, session);
|
await refreshSourceAvatar(avatar, undefined, session);
|
||||||
|
|
||||||
|
|||||||
@ -19,10 +19,7 @@ import { deleteChatFiles } from '@fastgpt/service/core/chat/controller';
|
|||||||
import { pushTrack } from '@fastgpt/service/common/middle/tracks/utils';
|
import { pushTrack } from '@fastgpt/service/common/middle/tracks/utils';
|
||||||
import { MongoOpenApi } from '@fastgpt/service/support/openapi/schema';
|
import { MongoOpenApi } from '@fastgpt/service/support/openapi/schema';
|
||||||
import { removeImageByPath } from '@fastgpt/service/common/file/image/controller';
|
import { removeImageByPath } from '@fastgpt/service/common/file/image/controller';
|
||||||
import { addOperationLog } from '@fastgpt/service/support/operationLog/addOperationLog';
|
|
||||||
import { OperationLogEventEnum } from '@fastgpt/global/support/operationLog/constants';
|
|
||||||
import { AppTypeEnum } from '@fastgpt/global/core/app/constants';
|
|
||||||
import { getI18nAppType } from '@fastgpt/service/support/operationLog/util';
|
|
||||||
async function handler(req: NextApiRequest, res: NextApiResponse<any>) {
|
async function handler(req: NextApiRequest, res: NextApiResponse<any>) {
|
||||||
const { appId } = req.query as { appId: string };
|
const { appId } = req.query as { appId: string };
|
||||||
|
|
||||||
@ -42,17 +39,6 @@ async function handler(req: NextApiRequest, res: NextApiResponse<any>) {
|
|||||||
teamId,
|
teamId,
|
||||||
appId
|
appId
|
||||||
});
|
});
|
||||||
(async () => {
|
|
||||||
addOperationLog({
|
|
||||||
tmbId,
|
|
||||||
teamId,
|
|
||||||
event: OperationLogEventEnum.DELETE_APP,
|
|
||||||
params: {
|
|
||||||
appName: app.name,
|
|
||||||
appType: getI18nAppType(app.type)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
// Tracks
|
// Tracks
|
||||||
pushTrack.countAppNodes({ teamId, tmbId, uid: userId, appId });
|
pushTrack.countAppNodes({ teamId, tmbId, uid: userId, appId });
|
||||||
|
|||||||
@ -18,8 +18,7 @@ import { syncCollaborators } from '@fastgpt/service/support/permission/inheritPe
|
|||||||
import { MongoResourcePermission } from '@fastgpt/service/support/permission/schema';
|
import { MongoResourcePermission } from '@fastgpt/service/support/permission/schema';
|
||||||
import { authUserPer } from '@fastgpt/service/support/permission/user/auth';
|
import { authUserPer } from '@fastgpt/service/support/permission/user/auth';
|
||||||
import { type ApiRequestProps } from '@fastgpt/service/type/next';
|
import { type ApiRequestProps } from '@fastgpt/service/type/next';
|
||||||
import { addOperationLog } from '@fastgpt/service/support/operationLog/addOperationLog';
|
|
||||||
import { OperationLogEventEnum } from '@fastgpt/global/support/operationLog/constants';
|
|
||||||
export type CreateAppFolderBody = {
|
export type CreateAppFolderBody = {
|
||||||
parentId?: ParentIdType;
|
parentId?: ParentIdType;
|
||||||
name: string;
|
name: string;
|
||||||
@ -84,16 +83,6 @@ async function handler(req: ApiRequestProps<CreateAppFolderBody>) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
(async () => {
|
|
||||||
addOperationLog({
|
|
||||||
tmbId,
|
|
||||||
teamId,
|
|
||||||
event: OperationLogEventEnum.CREATE_APP_FOLDER,
|
|
||||||
params: {
|
|
||||||
folderName: name
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default NextAPI(handler);
|
export default NextAPI(handler);
|
||||||
|
|||||||
@ -13,9 +13,6 @@ import { parsePaginationRequest } from '@fastgpt/service/common/api/pagination';
|
|||||||
import { type PaginationResponse } from '@fastgpt/web/common/fetch/type';
|
import { type PaginationResponse } from '@fastgpt/web/common/fetch/type';
|
||||||
import { addSourceMember } from '@fastgpt/service/support/user/utils';
|
import { addSourceMember } from '@fastgpt/service/support/user/utils';
|
||||||
import { replaceRegChars } from '@fastgpt/global/common/string/tools';
|
import { replaceRegChars } from '@fastgpt/global/common/string/tools';
|
||||||
import { addOperationLog } from '@fastgpt/service/support/operationLog/addOperationLog';
|
|
||||||
import { OperationLogEventEnum } from '@fastgpt/global/support/operationLog/constants';
|
|
||||||
import { getI18nAppType } from '@fastgpt/service/support/operationLog/util';
|
|
||||||
|
|
||||||
async function handler(
|
async function handler(
|
||||||
req: NextApiRequest,
|
req: NextApiRequest,
|
||||||
@ -36,12 +33,7 @@ async function handler(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 凭证校验
|
// 凭证校验
|
||||||
const { teamId, tmbId, app } = await authApp({
|
const { teamId } = await authApp({ req, authToken: true, appId, per: WritePermissionVal });
|
||||||
req,
|
|
||||||
authToken: true,
|
|
||||||
appId,
|
|
||||||
per: WritePermissionVal
|
|
||||||
});
|
|
||||||
|
|
||||||
const where = {
|
const where = {
|
||||||
teamId: new Types.ObjectId(teamId),
|
teamId: new Types.ObjectId(teamId),
|
||||||
@ -147,18 +139,6 @@ async function handler(
|
|||||||
|
|
||||||
const listWithoutTmbId = list.filter((item) => !item.tmbId);
|
const listWithoutTmbId = list.filter((item) => !item.tmbId);
|
||||||
|
|
||||||
(async () => {
|
|
||||||
addOperationLog({
|
|
||||||
tmbId,
|
|
||||||
teamId,
|
|
||||||
event: OperationLogEventEnum.EXPORT_APP_CHAT_LOG,
|
|
||||||
params: {
|
|
||||||
appName: app.name,
|
|
||||||
appType: getI18nAppType(app.type)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
list: listWithSourceMember.concat(listWithoutTmbId),
|
list: listWithSourceMember.concat(listWithoutTmbId),
|
||||||
total
|
total
|
||||||
|
|||||||
@ -24,10 +24,6 @@ import { TeamAppCreatePermissionVal } from '@fastgpt/global/support/permission/u
|
|||||||
import { AppErrEnum } from '@fastgpt/global/common/error/code/app';
|
import { AppErrEnum } from '@fastgpt/global/common/error/code/app';
|
||||||
import { refreshSourceAvatar } from '@fastgpt/service/common/file/image/controller';
|
import { refreshSourceAvatar } from '@fastgpt/service/common/file/image/controller';
|
||||||
import { MongoResourcePermission } from '@fastgpt/service/support/permission/schema';
|
import { MongoResourcePermission } from '@fastgpt/service/support/permission/schema';
|
||||||
import { addOperationLog } from '@fastgpt/service/support/operationLog/addOperationLog';
|
|
||||||
import { OperationLogEventEnum } from '@fastgpt/global/support/operationLog/constants';
|
|
||||||
import { getI18nAppType } from '@fastgpt/service/support/operationLog/util';
|
|
||||||
import { i18nT } from '@fastgpt/web/i18n/utils';
|
|
||||||
|
|
||||||
export type AppUpdateQuery = {
|
export type AppUpdateQuery = {
|
||||||
appId: string;
|
appId: string;
|
||||||
@ -58,7 +54,7 @@ async function handler(req: ApiRequestProps<AppUpdateBody, AppUpdateQuery>) {
|
|||||||
|
|
||||||
// this step is to get the app and its permission, and we will check the permission manually for
|
// this step is to get the app and its permission, and we will check the permission manually for
|
||||||
// different cases
|
// different cases
|
||||||
const { app, permission, teamId, tmbId } = await authApp({
|
const { app, permission } = await authApp({
|
||||||
req,
|
req,
|
||||||
authToken: true,
|
authToken: true,
|
||||||
appId,
|
appId,
|
||||||
@ -69,23 +65,11 @@ async function handler(req: ApiRequestProps<AppUpdateBody, AppUpdateQuery>) {
|
|||||||
Promise.reject(AppErrEnum.unExist);
|
Promise.reject(AppErrEnum.unExist);
|
||||||
}
|
}
|
||||||
|
|
||||||
let targetName = '';
|
|
||||||
|
|
||||||
if (isMove) {
|
if (isMove) {
|
||||||
if (parentId) {
|
if (parentId) {
|
||||||
// move to a folder, check the target folder's permission
|
// move to a folder, check the target folder's permission
|
||||||
const { app: targetApp } = await authApp({
|
await authApp({ req, authToken: true, appId: parentId, per: ManagePermissionVal });
|
||||||
req,
|
|
||||||
authToken: true,
|
|
||||||
appId: parentId,
|
|
||||||
per: ManagePermissionVal
|
|
||||||
});
|
|
||||||
|
|
||||||
targetName = targetApp.name;
|
|
||||||
} else {
|
|
||||||
targetName = 'root';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (app.parentId) {
|
if (app.parentId) {
|
||||||
// move from a folder, check the (old) folder's permission
|
// move from a folder, check the (old) folder's permission
|
||||||
await authApp({ req, authToken: true, appId: app.parentId, per: ManagePermissionVal });
|
await authApp({ req, authToken: true, appId: app.parentId, per: ManagePermissionVal });
|
||||||
@ -176,7 +160,6 @@ async function handler(req: ApiRequestProps<AppUpdateBody, AppUpdateQuery>) {
|
|||||||
session
|
session
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
logAppMove({ tmbId, teamId, app, targetName });
|
|
||||||
// Not folder, delete all clb
|
// Not folder, delete all clb
|
||||||
await MongoResourcePermission.deleteMany(
|
await MongoResourcePermission.deleteMany(
|
||||||
{ resourceType: PerResourceTypeEnum.app, teamId: app.teamId, resourceId: app._id },
|
{ resourceType: PerResourceTypeEnum.app, teamId: app.teamId, resourceId: app._id },
|
||||||
@ -186,85 +169,8 @@ async function handler(req: ApiRequestProps<AppUpdateBody, AppUpdateQuery>) {
|
|||||||
return onUpdate(session);
|
return onUpdate(session);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
logAppUpdate({ tmbId, teamId, app, name, intro });
|
|
||||||
|
|
||||||
return onUpdate();
|
return onUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default NextAPI(handler);
|
export default NextAPI(handler);
|
||||||
|
|
||||||
const logAppMove = ({
|
|
||||||
tmbId,
|
|
||||||
teamId,
|
|
||||||
app,
|
|
||||||
targetName
|
|
||||||
}: {
|
|
||||||
tmbId: string;
|
|
||||||
teamId: string;
|
|
||||||
app: any;
|
|
||||||
targetName: string;
|
|
||||||
}) => {
|
|
||||||
(async () => {
|
|
||||||
addOperationLog({
|
|
||||||
tmbId,
|
|
||||||
teamId,
|
|
||||||
event: OperationLogEventEnum.MOVE_APP,
|
|
||||||
params: {
|
|
||||||
appName: app.name,
|
|
||||||
targetFolderName: targetName,
|
|
||||||
appType: getI18nAppType(app.type)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
};
|
|
||||||
|
|
||||||
const logAppUpdate = ({
|
|
||||||
tmbId,
|
|
||||||
teamId,
|
|
||||||
app,
|
|
||||||
name,
|
|
||||||
intro
|
|
||||||
}: {
|
|
||||||
tmbId: string;
|
|
||||||
teamId: string;
|
|
||||||
app: any;
|
|
||||||
name?: string;
|
|
||||||
intro?: string;
|
|
||||||
}) => {
|
|
||||||
(async () => {
|
|
||||||
const getUpdateItems = () => {
|
|
||||||
const names: string[] = [];
|
|
||||||
const values: string[] = [];
|
|
||||||
|
|
||||||
if (name !== undefined) {
|
|
||||||
names.push(i18nT('common:core.app.name'));
|
|
||||||
values.push(name);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (intro !== undefined) {
|
|
||||||
names.push(i18nT('common:Intro'));
|
|
||||||
values.push(intro);
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
names,
|
|
||||||
values
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
const { names: newItemNames, values: newItemValues } = getUpdateItems();
|
|
||||||
|
|
||||||
addOperationLog({
|
|
||||||
tmbId,
|
|
||||||
teamId,
|
|
||||||
event: OperationLogEventEnum.UPDATE_APP_INFO,
|
|
||||||
params: {
|
|
||||||
appName: app.name,
|
|
||||||
newItemNames: newItemNames,
|
|
||||||
newItemValues: newItemValues,
|
|
||||||
appType: getI18nAppType(app.type)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
};
|
|
||||||
|
|||||||
@ -11,20 +11,12 @@ import { WritePermissionVal } from '@fastgpt/global/support/permission/constant'
|
|||||||
import { type ApiRequestProps } from '@fastgpt/service/type/next';
|
import { type ApiRequestProps } from '@fastgpt/service/type/next';
|
||||||
import { AppTypeEnum } from '@fastgpt/global/core/app/constants';
|
import { AppTypeEnum } from '@fastgpt/global/core/app/constants';
|
||||||
import { rewriteAppWorkflowToSimple } from '@fastgpt/service/core/app/utils';
|
import { rewriteAppWorkflowToSimple } from '@fastgpt/service/core/app/utils';
|
||||||
import { addOperationLog } from '@fastgpt/service/support/operationLog/addOperationLog';
|
|
||||||
import { OperationLogEventEnum } from '@fastgpt/global/support/operationLog/constants';
|
|
||||||
import { getI18nAppType } from '@fastgpt/service/support/operationLog/util';
|
|
||||||
import { i18nT } from '@fastgpt/web/i18n/utils';
|
|
||||||
async function handler(req: ApiRequestProps<PostPublishAppProps>, res: NextApiResponse<any>) {
|
async function handler(req: ApiRequestProps<PostPublishAppProps>, res: NextApiResponse<any>) {
|
||||||
const { appId } = req.query as { appId: string };
|
const { appId } = req.query as { appId: string };
|
||||||
const { nodes = [], edges = [], chatConfig, isPublish, versionName, autoSave } = req.body;
|
const { nodes = [], edges = [], chatConfig, isPublish, versionName, autoSave } = req.body;
|
||||||
|
|
||||||
const { app, tmbId, teamId } = await authApp({
|
const { app, tmbId } = await authApp({ appId, req, per: WritePermissionVal, authToken: true });
|
||||||
appId,
|
|
||||||
req,
|
|
||||||
per: WritePermissionVal,
|
|
||||||
authToken: true
|
|
||||||
});
|
|
||||||
|
|
||||||
const { nodes: formatNodes } = beforeUpdateAppFormat({
|
const { nodes: formatNodes } = beforeUpdateAppFormat({
|
||||||
nodes,
|
nodes,
|
||||||
@ -34,26 +26,12 @@ async function handler(req: ApiRequestProps<PostPublishAppProps>, res: NextApiRe
|
|||||||
await rewriteAppWorkflowToSimple(formatNodes);
|
await rewriteAppWorkflowToSimple(formatNodes);
|
||||||
|
|
||||||
if (autoSave) {
|
if (autoSave) {
|
||||||
await MongoApp.findByIdAndUpdate(appId, {
|
return MongoApp.findByIdAndUpdate(appId, {
|
||||||
modules: formatNodes,
|
modules: formatNodes,
|
||||||
edges,
|
edges,
|
||||||
chatConfig,
|
chatConfig,
|
||||||
updateTime: new Date()
|
updateTime: new Date()
|
||||||
});
|
});
|
||||||
|
|
||||||
addOperationLog({
|
|
||||||
tmbId,
|
|
||||||
teamId,
|
|
||||||
event: OperationLogEventEnum.UPDATE_PUBLISH_APP,
|
|
||||||
params: {
|
|
||||||
appName: app.name,
|
|
||||||
operationName: i18nT('account_team:update'),
|
|
||||||
appId,
|
|
||||||
appType: getI18nAppType(app.type)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
await mongoSessionRun(async (session) => {
|
await mongoSessionRun(async (session) => {
|
||||||
@ -101,22 +79,6 @@ async function handler(req: ApiRequestProps<PostPublishAppProps>, res: NextApiRe
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
(async () => {
|
|
||||||
addOperationLog({
|
|
||||||
tmbId,
|
|
||||||
teamId,
|
|
||||||
event: OperationLogEventEnum.UPDATE_PUBLISH_APP,
|
|
||||||
params: {
|
|
||||||
appName: app.name,
|
|
||||||
operationName: isPublish
|
|
||||||
? i18nT('account_team:save_and_publish')
|
|
||||||
: i18nT('account_team:update'),
|
|
||||||
appId,
|
|
||||||
appType: getI18nAppType(app.type)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default NextAPI(handler);
|
export default NextAPI(handler);
|
||||||
|
|||||||
@ -4,14 +4,11 @@ import { authDataset } from '@fastgpt/service/support/permission/dataset/auth';
|
|||||||
import { createOneCollection } from '@fastgpt/service/core/dataset/collection/controller';
|
import { createOneCollection } from '@fastgpt/service/core/dataset/collection/controller';
|
||||||
import { NextAPI } from '@/service/middleware/entry';
|
import { NextAPI } from '@/service/middleware/entry';
|
||||||
import { WritePermissionVal } from '@fastgpt/global/support/permission/constant';
|
import { WritePermissionVal } from '@fastgpt/global/support/permission/constant';
|
||||||
import { addOperationLog } from '@fastgpt/service/support/operationLog/addOperationLog';
|
|
||||||
import { OperationLogEventEnum } from '@fastgpt/global/support/operationLog/constants';
|
|
||||||
import { getI18nDatasetType } from '@fastgpt/service/support/operationLog/util';
|
|
||||||
|
|
||||||
async function handler(req: NextApiRequest) {
|
async function handler(req: NextApiRequest) {
|
||||||
const body = req.body as CreateDatasetCollectionParams;
|
const body = req.body as CreateDatasetCollectionParams;
|
||||||
|
|
||||||
const { teamId, tmbId, dataset } = await authDataset({
|
const { teamId, tmbId } = await authDataset({
|
||||||
req,
|
req,
|
||||||
authToken: true,
|
authToken: true,
|
||||||
authApiKey: true,
|
authApiKey: true,
|
||||||
@ -24,20 +21,6 @@ async function handler(req: NextApiRequest) {
|
|||||||
teamId,
|
teamId,
|
||||||
tmbId
|
tmbId
|
||||||
});
|
});
|
||||||
|
|
||||||
(async () => {
|
|
||||||
addOperationLog({
|
|
||||||
tmbId,
|
|
||||||
teamId,
|
|
||||||
event: OperationLogEventEnum.CREATE_COLLECTION,
|
|
||||||
params: {
|
|
||||||
collectionName: body.name,
|
|
||||||
datasetName: dataset.name,
|
|
||||||
datasetType: getI18nDatasetType(dataset.type)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
return _id;
|
return _id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -14,9 +14,6 @@ import { authDatasetCollection } from '@fastgpt/service/support/permission/datas
|
|||||||
import { CommonErrEnum } from '@fastgpt/global/common/error/code/common';
|
import { CommonErrEnum } from '@fastgpt/global/common/error/code/common';
|
||||||
import { i18nT } from '@fastgpt/web/i18n/utils';
|
import { i18nT } from '@fastgpt/web/i18n/utils';
|
||||||
import { WritePermissionVal } from '@fastgpt/global/support/permission/constant';
|
import { WritePermissionVal } from '@fastgpt/global/support/permission/constant';
|
||||||
import { addOperationLog } from '@fastgpt/service/support/operationLog/addOperationLog';
|
|
||||||
import { OperationLogEventEnum } from '@fastgpt/global/support/operationLog/constants';
|
|
||||||
import { getI18nDatasetType } from '@fastgpt/service/support/operationLog/util';
|
|
||||||
|
|
||||||
type RetrainingCollectionResponse = {
|
type RetrainingCollectionResponse = {
|
||||||
collectionId: string;
|
collectionId: string;
|
||||||
@ -127,19 +124,6 @@ async function handler(
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
(async () => {
|
|
||||||
addOperationLog({
|
|
||||||
tmbId,
|
|
||||||
teamId,
|
|
||||||
event: OperationLogEventEnum.RETRAIN_COLLECTION,
|
|
||||||
params: {
|
|
||||||
collectionName: collection.name,
|
|
||||||
datasetName: collection.dataset?.name || '',
|
|
||||||
datasetType: getI18nDatasetType(collection.dataset?.type || '')
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
return { collectionId };
|
return { collectionId };
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,9 +6,7 @@ import { mongoSessionRun } from '@fastgpt/service/common/mongo/sessionRun';
|
|||||||
import { NextAPI } from '@/service/middleware/entry';
|
import { NextAPI } from '@/service/middleware/entry';
|
||||||
import { WritePermissionVal } from '@fastgpt/global/support/permission/constant';
|
import { WritePermissionVal } from '@fastgpt/global/support/permission/constant';
|
||||||
import { CommonErrEnum } from '@fastgpt/global/common/error/code/common';
|
import { CommonErrEnum } from '@fastgpt/global/common/error/code/common';
|
||||||
import { addOperationLog } from '@fastgpt/service/support/operationLog/addOperationLog';
|
|
||||||
import { OperationLogEventEnum } from '@fastgpt/global/support/operationLog/constants';
|
|
||||||
import { getI18nDatasetType } from '@fastgpt/service/support/operationLog/util';
|
|
||||||
async function handler(req: NextApiRequest) {
|
async function handler(req: NextApiRequest) {
|
||||||
const { id: collectionId } = req.query as { id: string };
|
const { id: collectionId } = req.query as { id: string };
|
||||||
|
|
||||||
@ -16,7 +14,7 @@ async function handler(req: NextApiRequest) {
|
|||||||
return Promise.reject(CommonErrEnum.missingParams);
|
return Promise.reject(CommonErrEnum.missingParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
const { teamId, collection, tmbId } = await authDatasetCollection({
|
const { teamId, collection } = await authDatasetCollection({
|
||||||
req,
|
req,
|
||||||
authToken: true,
|
authToken: true,
|
||||||
authApiKey: true,
|
authApiKey: true,
|
||||||
@ -41,19 +39,6 @@ async function handler(req: NextApiRequest) {
|
|||||||
session
|
session
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
(async () => {
|
|
||||||
addOperationLog({
|
|
||||||
tmbId,
|
|
||||||
teamId,
|
|
||||||
event: OperationLogEventEnum.DELETE_COLLECTION,
|
|
||||||
params: {
|
|
||||||
collectionName: collection.name,
|
|
||||||
datasetName: collection.dataset?.name || '',
|
|
||||||
datasetType: getI18nDatasetType(collection.dataset?.type || '')
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default NextAPI(handler);
|
export default NextAPI(handler);
|
||||||
|
|||||||
@ -12,9 +12,7 @@ import { DatasetCollectionTypeEnum } from '@fastgpt/global/core/dataset/constant
|
|||||||
import { type ClientSession } from '@fastgpt/service/common/mongo';
|
import { type ClientSession } from '@fastgpt/service/common/mongo';
|
||||||
import { type CollectionWithDatasetType } from '@fastgpt/global/core/dataset/type';
|
import { type CollectionWithDatasetType } from '@fastgpt/global/core/dataset/type';
|
||||||
import { mongoSessionRun } from '@fastgpt/service/common/mongo/sessionRun';
|
import { mongoSessionRun } from '@fastgpt/service/common/mongo/sessionRun';
|
||||||
import { addOperationLog } from '@fastgpt/service/support/operationLog/addOperationLog';
|
|
||||||
import { OperationLogEventEnum } from '@fastgpt/global/support/operationLog/constants';
|
|
||||||
import { getI18nDatasetType } from '@fastgpt/service/support/operationLog/util';
|
|
||||||
export type UpdateDatasetCollectionParams = {
|
export type UpdateDatasetCollectionParams = {
|
||||||
id?: string;
|
id?: string;
|
||||||
parentId?: string;
|
parentId?: string;
|
||||||
@ -90,7 +88,7 @@ async function handler(req: ApiRequestProps<UpdateDatasetCollectionParams>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 凭证校验
|
// 凭证校验
|
||||||
const { collection, teamId, tmbId } = await authDatasetCollection({
|
const { collection, teamId } = await authDatasetCollection({
|
||||||
req,
|
req,
|
||||||
authToken: true,
|
authToken: true,
|
||||||
authApiKey: true,
|
authApiKey: true,
|
||||||
@ -133,19 +131,6 @@ async function handler(req: ApiRequestProps<UpdateDatasetCollectionParams>) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
(async () => {
|
|
||||||
addOperationLog({
|
|
||||||
tmbId,
|
|
||||||
teamId,
|
|
||||||
event: OperationLogEventEnum.UPDATE_COLLECTION,
|
|
||||||
params: {
|
|
||||||
collectionName: collection.name,
|
|
||||||
datasetName: collection.dataset?.name || '',
|
|
||||||
datasetType: getI18nDatasetType(collection.dataset?.type || '')
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default NextAPI(handler);
|
export default NextAPI(handler);
|
||||||
|
|||||||
@ -18,9 +18,6 @@ import { authDataset } from '@fastgpt/service/support/permission/dataset/auth';
|
|||||||
import { checkTeamDatasetLimit } from '@fastgpt/service/support/permission/teamLimit';
|
import { checkTeamDatasetLimit } from '@fastgpt/service/support/permission/teamLimit';
|
||||||
import { authUserPer } from '@fastgpt/service/support/permission/user/auth';
|
import { authUserPer } from '@fastgpt/service/support/permission/user/auth';
|
||||||
import type { ApiRequestProps } from '@fastgpt/service/type/next';
|
import type { ApiRequestProps } from '@fastgpt/service/type/next';
|
||||||
import { addOperationLog } from '@fastgpt/service/support/operationLog/addOperationLog';
|
|
||||||
import { OperationLogEventEnum } from '@fastgpt/global/support/operationLog/constants';
|
|
||||||
import { getI18nDatasetType } from '@fastgpt/service/support/operationLog/util';
|
|
||||||
|
|
||||||
export type DatasetCreateQuery = {};
|
export type DatasetCreateQuery = {};
|
||||||
export type DatasetCreateBody = CreateDatasetParams;
|
export type DatasetCreateBody = CreateDatasetParams;
|
||||||
@ -105,18 +102,6 @@ async function handler(
|
|||||||
uid: userId
|
uid: userId
|
||||||
});
|
});
|
||||||
|
|
||||||
(async () => {
|
|
||||||
addOperationLog({
|
|
||||||
tmbId,
|
|
||||||
teamId,
|
|
||||||
event: OperationLogEventEnum.CREATE_DATASET,
|
|
||||||
params: {
|
|
||||||
datasetName: name,
|
|
||||||
datasetType: getI18nDatasetType(type)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
return datasetId;
|
return datasetId;
|
||||||
}
|
}
|
||||||
export default NextAPI(handler);
|
export default NextAPI(handler);
|
||||||
|
|||||||
@ -4,9 +4,7 @@ import { deleteDatasetData } from '@/service/core/dataset/data/controller';
|
|||||||
import { NextAPI } from '@/service/middleware/entry';
|
import { NextAPI } from '@/service/middleware/entry';
|
||||||
import { WritePermissionVal } from '@fastgpt/global/support/permission/constant';
|
import { WritePermissionVal } from '@fastgpt/global/support/permission/constant';
|
||||||
import { CommonErrEnum } from '@fastgpt/global/common/error/code/common';
|
import { CommonErrEnum } from '@fastgpt/global/common/error/code/common';
|
||||||
import { addOperationLog } from '@fastgpt/service/support/operationLog/addOperationLog';
|
|
||||||
import { OperationLogEventEnum } from '@fastgpt/global/support/operationLog/constants';
|
|
||||||
import { getI18nDatasetType } from '@fastgpt/service/support/operationLog/util';
|
|
||||||
async function handler(req: NextApiRequest) {
|
async function handler(req: NextApiRequest) {
|
||||||
const { id: dataId } = req.query as {
|
const { id: dataId } = req.query as {
|
||||||
id: string;
|
id: string;
|
||||||
@ -17,7 +15,7 @@ async function handler(req: NextApiRequest) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 凭证校验
|
// 凭证校验
|
||||||
const { datasetData, tmbId, teamId, collection } = await authDatasetData({
|
const { datasetData } = await authDatasetData({
|
||||||
req,
|
req,
|
||||||
authToken: true,
|
authToken: true,
|
||||||
authApiKey: true,
|
authApiKey: true,
|
||||||
@ -26,18 +24,7 @@ async function handler(req: NextApiRequest) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
await deleteDatasetData(datasetData);
|
await deleteDatasetData(datasetData);
|
||||||
(async () => {
|
|
||||||
addOperationLog({
|
|
||||||
tmbId,
|
|
||||||
teamId,
|
|
||||||
event: OperationLogEventEnum.DELETE_DATA,
|
|
||||||
params: {
|
|
||||||
collectionName: collection.name,
|
|
||||||
datasetName: collection.dataset?.name || '',
|
|
||||||
datasetType: getI18nDatasetType(collection.dataset?.type || '')
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
return 'success';
|
return 'success';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -17,9 +17,6 @@ import { NextAPI } from '@/service/middleware/entry';
|
|||||||
import { WritePermissionVal } from '@fastgpt/global/support/permission/constant';
|
import { WritePermissionVal } from '@fastgpt/global/support/permission/constant';
|
||||||
import { CommonErrEnum } from '@fastgpt/global/common/error/code/common';
|
import { CommonErrEnum } from '@fastgpt/global/common/error/code/common';
|
||||||
import { getLLMMaxChunkSize } from '@fastgpt/global/core/dataset/training/utils';
|
import { getLLMMaxChunkSize } from '@fastgpt/global/core/dataset/training/utils';
|
||||||
import { addOperationLog } from '@fastgpt/service/support/operationLog/addOperationLog';
|
|
||||||
import { OperationLogEventEnum } from '@fastgpt/global/support/operationLog/constants';
|
|
||||||
import { getI18nDatasetType } from '@fastgpt/service/support/operationLog/util';
|
|
||||||
|
|
||||||
async function handler(req: NextApiRequest) {
|
async function handler(req: NextApiRequest) {
|
||||||
const { collectionId, q, a, indexes } = req.body as InsertOneDatasetDataProps;
|
const { collectionId, q, a, indexes } = req.body as InsertOneDatasetDataProps;
|
||||||
@ -33,7 +30,7 @@ async function handler(req: NextApiRequest) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 凭证校验
|
// 凭证校验
|
||||||
const { teamId, tmbId, collection } = await authDatasetCollection({
|
const { teamId, tmbId } = await authDatasetCollection({
|
||||||
req,
|
req,
|
||||||
authToken: true,
|
authToken: true,
|
||||||
authApiKey: true,
|
authApiKey: true,
|
||||||
@ -99,18 +96,6 @@ async function handler(req: NextApiRequest) {
|
|||||||
model: vectorModelData.model
|
model: vectorModelData.model
|
||||||
});
|
});
|
||||||
|
|
||||||
(async () => {
|
|
||||||
addOperationLog({
|
|
||||||
tmbId,
|
|
||||||
teamId,
|
|
||||||
event: OperationLogEventEnum.CREATE_DATA,
|
|
||||||
params: {
|
|
||||||
collectionName: collection.name,
|
|
||||||
datasetName: collection.dataset?.name || '',
|
|
||||||
datasetType: getI18nDatasetType(collection.dataset?.type || '')
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
return insertId;
|
return insertId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5,9 +5,7 @@ import { NextAPI } from '@/service/middleware/entry';
|
|||||||
import { WritePermissionVal } from '@fastgpt/global/support/permission/constant';
|
import { WritePermissionVal } from '@fastgpt/global/support/permission/constant';
|
||||||
import { authDatasetData } from '@fastgpt/service/support/permission/dataset/auth';
|
import { authDatasetData } from '@fastgpt/service/support/permission/dataset/auth';
|
||||||
import { type ApiRequestProps } from '@fastgpt/service/type/next';
|
import { type ApiRequestProps } from '@fastgpt/service/type/next';
|
||||||
import { addOperationLog } from '@fastgpt/service/support/operationLog/addOperationLog';
|
|
||||||
import { OperationLogEventEnum } from '@fastgpt/global/support/operationLog/constants';
|
|
||||||
import { getI18nDatasetType } from '@fastgpt/service/support/operationLog/util';
|
|
||||||
async function handler(req: ApiRequestProps<UpdateDatasetDataProps>) {
|
async function handler(req: ApiRequestProps<UpdateDatasetDataProps>) {
|
||||||
const { dataId, q, a, indexes = [] } = req.body;
|
const { dataId, q, a, indexes = [] } = req.body;
|
||||||
|
|
||||||
@ -17,8 +15,7 @@ async function handler(req: ApiRequestProps<UpdateDatasetDataProps>) {
|
|||||||
dataset: { vectorModel }
|
dataset: { vectorModel }
|
||||||
},
|
},
|
||||||
teamId,
|
teamId,
|
||||||
tmbId,
|
tmbId
|
||||||
collection
|
|
||||||
} = await authDatasetData({
|
} = await authDatasetData({
|
||||||
req,
|
req,
|
||||||
authToken: true,
|
authToken: true,
|
||||||
@ -42,19 +39,6 @@ async function handler(req: ApiRequestProps<UpdateDatasetDataProps>) {
|
|||||||
inputTokens: tokens,
|
inputTokens: tokens,
|
||||||
model: vectorModel
|
model: vectorModel
|
||||||
});
|
});
|
||||||
|
|
||||||
(async () => {
|
|
||||||
addOperationLog({
|
|
||||||
tmbId,
|
|
||||||
teamId,
|
|
||||||
event: OperationLogEventEnum.UPDATE_DATA,
|
|
||||||
params: {
|
|
||||||
collectionName: collection.name,
|
|
||||||
datasetName: collection.dataset?.name || '',
|
|
||||||
datasetType: getI18nDatasetType(collection.dataset?.type || '')
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
} else {
|
} else {
|
||||||
// await MongoDatasetData.findByIdAndUpdate(dataId, {
|
// await MongoDatasetData.findByIdAndUpdate(dataId, {
|
||||||
// ...(forbid !== undefined && { forbid })
|
// ...(forbid !== undefined && { forbid })
|
||||||
|
|||||||
@ -11,9 +11,6 @@ import { MongoDatasetCollectionTags } from '@fastgpt/service/core/dataset/tag/sc
|
|||||||
import { removeImageByPath } from '@fastgpt/service/common/file/image/controller';
|
import { removeImageByPath } from '@fastgpt/service/common/file/image/controller';
|
||||||
import { DatasetTypeEnum } from '@fastgpt/global/core/dataset/constants';
|
import { DatasetTypeEnum } from '@fastgpt/global/core/dataset/constants';
|
||||||
import { removeWebsiteSyncJobScheduler } from '@fastgpt/service/core/dataset/websiteSync';
|
import { removeWebsiteSyncJobScheduler } from '@fastgpt/service/core/dataset/websiteSync';
|
||||||
import { addOperationLog } from '@fastgpt/service/support/operationLog/addOperationLog';
|
|
||||||
import { OperationLogEventEnum } from '@fastgpt/global/support/operationLog/constants';
|
|
||||||
import { getI18nDatasetType } from '@fastgpt/service/support/operationLog/util';
|
|
||||||
|
|
||||||
async function handler(req: NextApiRequest) {
|
async function handler(req: NextApiRequest) {
|
||||||
const { id: datasetId } = req.query as {
|
const { id: datasetId } = req.query as {
|
||||||
@ -25,7 +22,7 @@ async function handler(req: NextApiRequest) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// auth owner
|
// auth owner
|
||||||
const { teamId, tmbId, dataset } = await authDataset({
|
const { teamId } = await authDataset({
|
||||||
req,
|
req,
|
||||||
authToken: true,
|
authToken: true,
|
||||||
authApiKey: true,
|
authApiKey: true,
|
||||||
@ -69,18 +66,6 @@ async function handler(req: NextApiRequest) {
|
|||||||
await removeImageByPath(dataset.avatar, session);
|
await removeImageByPath(dataset.avatar, session);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
(async () => {
|
|
||||||
addOperationLog({
|
|
||||||
tmbId,
|
|
||||||
teamId,
|
|
||||||
event: OperationLogEventEnum.DELETE_DATASET,
|
|
||||||
params: {
|
|
||||||
datasetName: dataset.name,
|
|
||||||
datasetType: getI18nDatasetType(dataset.type)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default NextAPI(handler);
|
export default NextAPI(handler);
|
||||||
|
|||||||
@ -17,8 +17,6 @@ import { syncCollaborators } from '@fastgpt/service/support/permission/inheritPe
|
|||||||
import { MongoResourcePermission } from '@fastgpt/service/support/permission/schema';
|
import { MongoResourcePermission } from '@fastgpt/service/support/permission/schema';
|
||||||
import { authUserPer } from '@fastgpt/service/support/permission/user/auth';
|
import { authUserPer } from '@fastgpt/service/support/permission/user/auth';
|
||||||
import type { ApiRequestProps, ApiResponseType } from '@fastgpt/service/type/next';
|
import type { ApiRequestProps, ApiResponseType } from '@fastgpt/service/type/next';
|
||||||
import { addOperationLog } from '@fastgpt/service/support/operationLog/addOperationLog';
|
|
||||||
import { OperationLogEventEnum } from '@fastgpt/global/support/operationLog/constants';
|
|
||||||
export type DatasetFolderCreateQuery = {};
|
export type DatasetFolderCreateQuery = {};
|
||||||
export type DatasetFolderCreateBody = {
|
export type DatasetFolderCreateBody = {
|
||||||
parentId?: string;
|
parentId?: string;
|
||||||
@ -94,16 +92,6 @@ async function handler(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
(async () => {
|
|
||||||
addOperationLog({
|
|
||||||
tmbId,
|
|
||||||
teamId,
|
|
||||||
event: OperationLogEventEnum.CREATE_DATASET_FOLDER,
|
|
||||||
params: {
|
|
||||||
folderName: name
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,9 +14,7 @@ import { CommonErrEnum } from '@fastgpt/global/common/error/code/common';
|
|||||||
import { useIPFrequencyLimit } from '@fastgpt/service/common/middle/reqFrequencyLimit';
|
import { useIPFrequencyLimit } from '@fastgpt/service/common/middle/reqFrequencyLimit';
|
||||||
import { type ApiRequestProps } from '@fastgpt/service/type/next';
|
import { type ApiRequestProps } from '@fastgpt/service/type/next';
|
||||||
import { getRerankModel } from '@fastgpt/service/core/ai/model';
|
import { getRerankModel } from '@fastgpt/service/core/ai/model';
|
||||||
import { addOperationLog } from '@fastgpt/service/support/operationLog/addOperationLog';
|
|
||||||
import { OperationLogEventEnum } from '@fastgpt/global/support/operationLog/constants';
|
|
||||||
import { getI18nDatasetType } from '@fastgpt/service/support/operationLog/util';
|
|
||||||
async function handler(req: ApiRequestProps<SearchTestProps>): Promise<SearchTestResponse> {
|
async function handler(req: ApiRequestProps<SearchTestProps>): Promise<SearchTestResponse> {
|
||||||
const {
|
const {
|
||||||
datasetId,
|
datasetId,
|
||||||
@ -132,17 +130,6 @@ async function handler(req: ApiRequestProps<SearchTestProps>): Promise<SearchTes
|
|||||||
totalPoints: embeddingTotalPoints + reRankTotalPoints
|
totalPoints: embeddingTotalPoints + reRankTotalPoints
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
(async () => {
|
|
||||||
addOperationLog({
|
|
||||||
tmbId,
|
|
||||||
teamId,
|
|
||||||
event: OperationLogEventEnum.SEARCH_TEST,
|
|
||||||
params: {
|
|
||||||
datasetName: dataset.name,
|
|
||||||
datasetType: getI18nDatasetType(dataset.type)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
list: searchRes,
|
list: searchRes,
|
||||||
|
|||||||
@ -37,9 +37,6 @@ import {
|
|||||||
} from '@fastgpt/service/core/dataset/websiteSync';
|
} from '@fastgpt/service/core/dataset/websiteSync';
|
||||||
import { delDatasetRelevantData } from '@fastgpt/service/core/dataset/controller';
|
import { delDatasetRelevantData } from '@fastgpt/service/core/dataset/controller';
|
||||||
import { isEqual } from 'lodash';
|
import { isEqual } from 'lodash';
|
||||||
import { addOperationLog } from '@fastgpt/service/support/operationLog/addOperationLog';
|
|
||||||
import { OperationLogEventEnum } from '@fastgpt/global/support/operationLog/constants';
|
|
||||||
import { getI18nDatasetType } from '@fastgpt/service/support/operationLog/util';
|
|
||||||
|
|
||||||
export type DatasetUpdateQuery = {};
|
export type DatasetUpdateQuery = {};
|
||||||
export type DatasetUpdateResponse = any;
|
export type DatasetUpdateResponse = any;
|
||||||
@ -82,27 +79,16 @@ async function handler(
|
|||||||
|
|
||||||
const isMove = parentId !== undefined;
|
const isMove = parentId !== undefined;
|
||||||
|
|
||||||
const { dataset, permission, tmbId, teamId } = await authDataset({
|
const { dataset, permission } = await authDataset({
|
||||||
req,
|
req,
|
||||||
authToken: true,
|
authToken: true,
|
||||||
datasetId: id,
|
datasetId: id,
|
||||||
per: ReadPermissionVal
|
per: ReadPermissionVal
|
||||||
});
|
});
|
||||||
|
|
||||||
let targetName = '';
|
|
||||||
|
|
||||||
if (isMove) {
|
if (isMove) {
|
||||||
if (parentId) {
|
if (parentId) {
|
||||||
// move to a folder, check the target folder's permission
|
// move to a folder, check the target folder's permission
|
||||||
const { dataset: targetDataset } = await authDataset({
|
await authDataset({ req, authToken: true, datasetId: parentId, per: ManagePermissionVal });
|
||||||
req,
|
|
||||||
authToken: true,
|
|
||||||
datasetId: parentId,
|
|
||||||
per: ManagePermissionVal
|
|
||||||
});
|
|
||||||
targetName = targetDataset.name;
|
|
||||||
} else {
|
|
||||||
targetName = 'root';
|
|
||||||
}
|
}
|
||||||
if (dataset.parentId) {
|
if (dataset.parentId) {
|
||||||
// move from a folder, check the (old) folder's permission
|
// move from a folder, check the (old) folder's permission
|
||||||
@ -235,9 +221,7 @@ async function handler(
|
|||||||
collaborators: parentClbsAndGroups,
|
collaborators: parentClbsAndGroups,
|
||||||
session
|
session
|
||||||
});
|
});
|
||||||
logDatasetMove({ tmbId, teamId, dataset, targetName });
|
|
||||||
} else {
|
} else {
|
||||||
logDatasetMove({ tmbId, teamId, dataset, targetName });
|
|
||||||
// Not folder, delete all clb
|
// Not folder, delete all clb
|
||||||
await MongoResourcePermission.deleteMany(
|
await MongoResourcePermission.deleteMany(
|
||||||
{ resourceId: id, teamId: dataset.teamId, resourceType: PerResourceTypeEnum.dataset },
|
{ resourceId: id, teamId: dataset.teamId, resourceType: PerResourceTypeEnum.dataset },
|
||||||
@ -246,7 +230,6 @@ async function handler(
|
|||||||
}
|
}
|
||||||
return onUpdate(session);
|
return onUpdate(session);
|
||||||
} else {
|
} else {
|
||||||
logDatasetUpdate({ tmbId, teamId, dataset });
|
|
||||||
return onUpdate(session);
|
return onUpdate(session);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -332,50 +315,3 @@ const updateSyncSchedule = async ({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const logDatasetMove = ({
|
|
||||||
tmbId,
|
|
||||||
teamId,
|
|
||||||
dataset,
|
|
||||||
targetName
|
|
||||||
}: {
|
|
||||||
tmbId: string;
|
|
||||||
teamId: string;
|
|
||||||
dataset: any;
|
|
||||||
targetName: string;
|
|
||||||
}) => {
|
|
||||||
(async () => {
|
|
||||||
addOperationLog({
|
|
||||||
tmbId,
|
|
||||||
teamId,
|
|
||||||
event: OperationLogEventEnum.MOVE_DATASET,
|
|
||||||
params: {
|
|
||||||
datasetName: dataset.name,
|
|
||||||
targetFolderName: targetName,
|
|
||||||
datasetType: getI18nDatasetType(dataset.type)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
};
|
|
||||||
|
|
||||||
const logDatasetUpdate = ({
|
|
||||||
tmbId,
|
|
||||||
teamId,
|
|
||||||
dataset
|
|
||||||
}: {
|
|
||||||
tmbId: string;
|
|
||||||
teamId: string;
|
|
||||||
dataset: any;
|
|
||||||
}) => {
|
|
||||||
(async () => {
|
|
||||||
addOperationLog({
|
|
||||||
tmbId,
|
|
||||||
teamId,
|
|
||||||
event: OperationLogEventEnum.UPDATE_DATASET,
|
|
||||||
params: {
|
|
||||||
datasetName: dataset.name,
|
|
||||||
datasetType: getI18nDatasetType(dataset.type)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
};
|
|
||||||
|
|||||||
@ -8,8 +8,7 @@ import { ManagePermissionVal } from '@fastgpt/global/support/permission/constant
|
|||||||
import { authApp } from '@fastgpt/service/support/permission/app/auth';
|
import { authApp } from '@fastgpt/service/support/permission/app/auth';
|
||||||
import { OpenApiErrEnum } from '@fastgpt/global/common/error/code/openapi';
|
import { OpenApiErrEnum } from '@fastgpt/global/common/error/code/openapi';
|
||||||
import { TeamApikeyCreatePermissionVal } from '@fastgpt/global/support/permission/user/constant';
|
import { TeamApikeyCreatePermissionVal } from '@fastgpt/global/support/permission/user/constant';
|
||||||
import { addOperationLog } from '@fastgpt/service/support/operationLog/addOperationLog';
|
|
||||||
import { OperationLogEventEnum } from '@fastgpt/global/support/operationLog/constants';
|
|
||||||
async function handler(req: ApiRequestProps<EditApiKeyProps>): Promise<string> {
|
async function handler(req: ApiRequestProps<EditApiKeyProps>): Promise<string> {
|
||||||
const { appId, name, limit } = req.body;
|
const { appId, name, limit } = req.body;
|
||||||
const { tmbId, teamId } = await (async () => {
|
const { tmbId, teamId } = await (async () => {
|
||||||
@ -49,18 +48,6 @@ async function handler(req: ApiRequestProps<EditApiKeyProps>): Promise<string> {
|
|||||||
name,
|
name,
|
||||||
limit
|
limit
|
||||||
});
|
});
|
||||||
|
|
||||||
(async () => {
|
|
||||||
addOperationLog({
|
|
||||||
tmbId,
|
|
||||||
teamId,
|
|
||||||
event: OperationLogEventEnum.CREATE_API_KEY,
|
|
||||||
params: {
|
|
||||||
keyName: name
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
return apiKey;
|
return apiKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4,8 +4,7 @@ import { OwnerPermissionVal } from '@fastgpt/global/support/permission/constant'
|
|||||||
import { CommonErrEnum } from '@fastgpt/global/common/error/code/common';
|
import { CommonErrEnum } from '@fastgpt/global/common/error/code/common';
|
||||||
import type { ApiRequestProps, ApiResponseType } from '@fastgpt/service/type/next';
|
import type { ApiRequestProps, ApiResponseType } from '@fastgpt/service/type/next';
|
||||||
import { NextAPI } from '@/service/middleware/entry';
|
import { NextAPI } from '@/service/middleware/entry';
|
||||||
import { addOperationLog } from '@fastgpt/service/support/operationLog/addOperationLog';
|
|
||||||
import { OperationLogEventEnum } from '@fastgpt/global/support/operationLog/constants';
|
|
||||||
export type OpenAPIDeleteQuery = { id: string };
|
export type OpenAPIDeleteQuery = { id: string };
|
||||||
export type OpenAPIDeleteBody = {};
|
export type OpenAPIDeleteBody = {};
|
||||||
export type OpenAPIDeleteResponse = {};
|
export type OpenAPIDeleteResponse = {};
|
||||||
@ -20,26 +19,9 @@ async function handler(
|
|||||||
return Promise.reject(CommonErrEnum.missingParams);
|
return Promise.reject(CommonErrEnum.missingParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
const { tmbId, teamId, openapi } = await authOpenApiKeyCrud({
|
await authOpenApiKeyCrud({ req, authToken: true, id, per: OwnerPermissionVal });
|
||||||
req,
|
|
||||||
authToken: true,
|
|
||||||
id,
|
|
||||||
per: OwnerPermissionVal
|
|
||||||
});
|
|
||||||
|
|
||||||
(async () => {
|
|
||||||
addOperationLog({
|
|
||||||
tmbId,
|
|
||||||
teamId,
|
|
||||||
event: OperationLogEventEnum.DELETE_API_KEY,
|
|
||||||
params: {
|
|
||||||
keyName: openapi.name
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
await MongoOpenApi.deleteOne({ _id: id });
|
await MongoOpenApi.deleteOne({ _id: id });
|
||||||
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4,28 +4,11 @@ import { authOpenApiKeyCrud } from '@fastgpt/service/support/permission/auth/ope
|
|||||||
import { OwnerPermissionVal } from '@fastgpt/global/support/permission/constant';
|
import { OwnerPermissionVal } from '@fastgpt/global/support/permission/constant';
|
||||||
import type { ApiRequestProps } from '@fastgpt/service/type/next';
|
import type { ApiRequestProps } from '@fastgpt/service/type/next';
|
||||||
import { NextAPI } from '@/service/middleware/entry';
|
import { NextAPI } from '@/service/middleware/entry';
|
||||||
import { addOperationLog } from '@fastgpt/service/support/operationLog/addOperationLog';
|
|
||||||
import { OperationLogEventEnum } from '@fastgpt/global/support/operationLog/constants';
|
|
||||||
async function handler(req: ApiRequestProps<EditApiKeyProps & { _id: string }>): Promise<void> {
|
async function handler(req: ApiRequestProps<EditApiKeyProps & { _id: string }>): Promise<void> {
|
||||||
const { _id, name, limit } = req.body;
|
const { _id, name, limit } = req.body;
|
||||||
|
|
||||||
const { tmbId, teamId } = await authOpenApiKeyCrud({
|
await authOpenApiKeyCrud({ req, authToken: true, id: _id, per: OwnerPermissionVal });
|
||||||
req,
|
|
||||||
authToken: true,
|
|
||||||
id: _id,
|
|
||||||
per: OwnerPermissionVal
|
|
||||||
});
|
|
||||||
|
|
||||||
(async () => {
|
|
||||||
addOperationLog({
|
|
||||||
tmbId,
|
|
||||||
teamId,
|
|
||||||
event: OperationLogEventEnum.UPDATE_API_KEY,
|
|
||||||
params: {
|
|
||||||
keyName: name
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
await MongoOpenApi.findByIdAndUpdate(_id, {
|
await MongoOpenApi.findByIdAndUpdate(_id, {
|
||||||
...(name && { name }),
|
...(name && { name }),
|
||||||
|
|||||||
@ -6,9 +6,7 @@ import type { PublishChannelEnum } from '@fastgpt/global/support/outLink/constan
|
|||||||
import { ManagePermissionVal } from '@fastgpt/global/support/permission/constant';
|
import { ManagePermissionVal } from '@fastgpt/global/support/permission/constant';
|
||||||
import type { ApiRequestProps } from '@fastgpt/service/type/next';
|
import type { ApiRequestProps } from '@fastgpt/service/type/next';
|
||||||
import { NextAPI } from '@/service/middleware/entry';
|
import { NextAPI } from '@/service/middleware/entry';
|
||||||
import { addOperationLog } from '@fastgpt/service/support/operationLog/addOperationLog';
|
|
||||||
import { OperationLogEventEnum } from '@fastgpt/global/support/operationLog/constants';
|
|
||||||
import { getI18nAppType } from '@fastgpt/service/support/operationLog/util';
|
|
||||||
/* create a shareChat */
|
/* create a shareChat */
|
||||||
const nanoid = customAlphabet('abcdefghijklmnopqrstuvwxyz1234567890', 24);
|
const nanoid = customAlphabet('abcdefghijklmnopqrstuvwxyz1234567890', 24);
|
||||||
|
|
||||||
@ -25,7 +23,7 @@ async function handler(
|
|||||||
): Promise<OutLinkCreateResponse> {
|
): Promise<OutLinkCreateResponse> {
|
||||||
const { appId, ...props } = req.body;
|
const { appId, ...props } = req.body;
|
||||||
|
|
||||||
const { teamId, tmbId, app } = await authApp({
|
const { teamId, tmbId } = await authApp({
|
||||||
req,
|
req,
|
||||||
authToken: true,
|
authToken: true,
|
||||||
appId,
|
appId,
|
||||||
@ -41,19 +39,6 @@ async function handler(
|
|||||||
...props
|
...props
|
||||||
});
|
});
|
||||||
|
|
||||||
(async () => {
|
|
||||||
addOperationLog({
|
|
||||||
tmbId,
|
|
||||||
teamId,
|
|
||||||
event: OperationLogEventEnum.CREATE_APP_PUBLISH_CHANNEL,
|
|
||||||
params: {
|
|
||||||
appName: app.name,
|
|
||||||
channelName: props.name,
|
|
||||||
appType: getI18nAppType(app.type)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
return shareId;
|
return shareId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,9 +3,6 @@ import { authOutLinkCrud } from '@fastgpt/service/support/permission/publish/aut
|
|||||||
import { OwnerPermissionVal } from '@fastgpt/global/support/permission/constant';
|
import { OwnerPermissionVal } from '@fastgpt/global/support/permission/constant';
|
||||||
import type { ApiRequestProps } from '@fastgpt/service/type/next';
|
import type { ApiRequestProps } from '@fastgpt/service/type/next';
|
||||||
import { NextAPI } from '@/service/middleware/entry';
|
import { NextAPI } from '@/service/middleware/entry';
|
||||||
import { addOperationLog } from '@fastgpt/service/support/operationLog/addOperationLog';
|
|
||||||
import { OperationLogEventEnum } from '@fastgpt/global/support/operationLog/constants';
|
|
||||||
import { getI18nAppType } from '@fastgpt/service/support/operationLog/util';
|
|
||||||
|
|
||||||
export type OutLinkDeleteQuery = {
|
export type OutLinkDeleteQuery = {
|
||||||
id: string;
|
id: string;
|
||||||
@ -18,28 +15,8 @@ async function handler(
|
|||||||
req: ApiRequestProps<OutLinkDeleteBody, OutLinkDeleteQuery>
|
req: ApiRequestProps<OutLinkDeleteBody, OutLinkDeleteQuery>
|
||||||
): Promise<OutLinkDeleteResponse> {
|
): Promise<OutLinkDeleteResponse> {
|
||||||
const { id } = req.query;
|
const { id } = req.query;
|
||||||
const { tmbId, teamId, outLink, app } = await authOutLinkCrud({
|
await authOutLinkCrud({ req, outLinkId: id, authToken: true, per: OwnerPermissionVal });
|
||||||
req,
|
|
||||||
outLinkId: id,
|
|
||||||
authToken: true,
|
|
||||||
per: OwnerPermissionVal
|
|
||||||
});
|
|
||||||
|
|
||||||
await MongoOutLink.findByIdAndDelete(id);
|
await MongoOutLink.findByIdAndDelete(id);
|
||||||
|
|
||||||
(async () => {
|
|
||||||
addOperationLog({
|
|
||||||
tmbId,
|
|
||||||
teamId,
|
|
||||||
event: OperationLogEventEnum.DELETE_APP_PUBLISH_CHANNEL,
|
|
||||||
params: {
|
|
||||||
appName: app.name,
|
|
||||||
channelName: outLink.name,
|
|
||||||
appType: getI18nAppType(app.type)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5,9 +5,7 @@ import { ManagePermissionVal } from '@fastgpt/global/support/permission/constant
|
|||||||
import type { ApiRequestProps } from '@fastgpt/service/type/next';
|
import type { ApiRequestProps } from '@fastgpt/service/type/next';
|
||||||
import { NextAPI } from '@/service/middleware/entry';
|
import { NextAPI } from '@/service/middleware/entry';
|
||||||
import { CommonErrEnum } from '@fastgpt/global/common/error/code/common';
|
import { CommonErrEnum } from '@fastgpt/global/common/error/code/common';
|
||||||
import { addOperationLog } from '@fastgpt/service/support/operationLog/addOperationLog';
|
|
||||||
import { OperationLogEventEnum } from '@fastgpt/global/support/operationLog/constants';
|
|
||||||
import { getI18nAppType } from '@fastgpt/service/support/operationLog/util';
|
|
||||||
export type OutLinkUpdateQuery = {};
|
export type OutLinkUpdateQuery = {};
|
||||||
|
|
||||||
// {
|
// {
|
||||||
@ -32,17 +30,7 @@ async function handler(
|
|||||||
return Promise.reject(CommonErrEnum.missingParams);
|
return Promise.reject(CommonErrEnum.missingParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
const {
|
await authOutLinkCrud({ req, outLinkId: _id, authToken: true, per: ManagePermissionVal });
|
||||||
tmbId,
|
|
||||||
teamId,
|
|
||||||
outLink,
|
|
||||||
app: logApp
|
|
||||||
} = await authOutLinkCrud({
|
|
||||||
req,
|
|
||||||
outLinkId: _id,
|
|
||||||
authToken: true,
|
|
||||||
per: ManagePermissionVal
|
|
||||||
});
|
|
||||||
|
|
||||||
await MongoOutLink.findByIdAndUpdate(_id, {
|
await MongoOutLink.findByIdAndUpdate(_id, {
|
||||||
name,
|
name,
|
||||||
@ -53,19 +41,6 @@ async function handler(
|
|||||||
limit,
|
limit,
|
||||||
app
|
app
|
||||||
});
|
});
|
||||||
|
|
||||||
(async () => {
|
|
||||||
addOperationLog({
|
|
||||||
tmbId,
|
|
||||||
teamId,
|
|
||||||
event: OperationLogEventEnum.UPDATE_APP_PUBLISH_CHANNEL,
|
|
||||||
params: {
|
|
||||||
appName: logApp.name,
|
|
||||||
channelName: outLink.name,
|
|
||||||
appType: getI18nAppType(logApp.type)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
export default NextAPI(handler);
|
export default NextAPI(handler);
|
||||||
|
|||||||
@ -5,8 +5,7 @@ import { MongoUser } from '@fastgpt/service/support/user/schema';
|
|||||||
import { MongoTeamMember } from '@fastgpt/service/support/user/team/teamMemberSchema';
|
import { MongoTeamMember } from '@fastgpt/service/support/user/team/teamMemberSchema';
|
||||||
import { i18nT } from '@fastgpt/web/i18n/utils';
|
import { i18nT } from '@fastgpt/web/i18n/utils';
|
||||||
import { NextAPI } from '@/service/middleware/entry';
|
import { NextAPI } from '@/service/middleware/entry';
|
||||||
import { addOperationLog } from '@fastgpt/service/support/operationLog/addOperationLog';
|
|
||||||
import { OperationLogEventEnum } from '@fastgpt/global/support/operationLog/constants';
|
|
||||||
async function handler(req: NextApiRequest, res: NextApiResponse<any>) {
|
async function handler(req: NextApiRequest, res: NextApiResponse<any>) {
|
||||||
const { oldPsw, newPsw } = req.body as { oldPsw: string; newPsw: string };
|
const { oldPsw, newPsw } = req.body as { oldPsw: string; newPsw: string };
|
||||||
|
|
||||||
@ -14,7 +13,7 @@ async function handler(req: NextApiRequest, res: NextApiResponse<any>) {
|
|||||||
return Promise.reject('Params is missing');
|
return Promise.reject('Params is missing');
|
||||||
}
|
}
|
||||||
|
|
||||||
const { tmbId, teamId } = await authCert({ req, authToken: true });
|
const { tmbId } = await authCert({ req, authToken: true });
|
||||||
const tmb = await MongoTeamMember.findById(tmbId);
|
const tmb = await MongoTeamMember.findById(tmbId);
|
||||||
if (!tmb) {
|
if (!tmb) {
|
||||||
return Promise.reject('can not find it');
|
return Promise.reject('can not find it');
|
||||||
@ -40,14 +39,6 @@ async function handler(req: NextApiRequest, res: NextApiResponse<any>) {
|
|||||||
passwordUpdateTime: new Date()
|
passwordUpdateTime: new Date()
|
||||||
});
|
});
|
||||||
|
|
||||||
(async () => {
|
|
||||||
addOperationLog({
|
|
||||||
tmbId,
|
|
||||||
teamId,
|
|
||||||
event: OperationLogEventEnum.CHANGE_PASSWORD,
|
|
||||||
params: {}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
return user;
|
return user;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,9 +3,6 @@ import { authDataset } from '@fastgpt/service/support/permission/dataset/auth';
|
|||||||
import { checkExportDatasetLimit } from '@fastgpt/service/support/user/utils';
|
import { checkExportDatasetLimit } from '@fastgpt/service/support/user/utils';
|
||||||
import { NextAPI } from '@/service/middleware/entry';
|
import { NextAPI } from '@/service/middleware/entry';
|
||||||
import { WritePermissionVal } from '@fastgpt/global/support/permission/constant';
|
import { WritePermissionVal } from '@fastgpt/global/support/permission/constant';
|
||||||
import { addOperationLog } from '@fastgpt/service/support/operationLog/addOperationLog';
|
|
||||||
import { OperationLogEventEnum } from '@fastgpt/global/support/operationLog/constants';
|
|
||||||
import { getI18nDatasetType } from '@fastgpt/service/support/operationLog/util';
|
|
||||||
|
|
||||||
async function handler(req: NextApiRequest) {
|
async function handler(req: NextApiRequest) {
|
||||||
const { datasetId } = req.query as {
|
const { datasetId } = req.query as {
|
||||||
@ -17,7 +14,7 @@ async function handler(req: NextApiRequest) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 凭证校验
|
// 凭证校验
|
||||||
const { teamId, tmbId, dataset } = await authDataset({
|
const { teamId } = await authDataset({
|
||||||
req,
|
req,
|
||||||
authToken: true,
|
authToken: true,
|
||||||
datasetId,
|
datasetId,
|
||||||
@ -28,18 +25,6 @@ async function handler(req: NextApiRequest) {
|
|||||||
teamId,
|
teamId,
|
||||||
limitMinutes: global.feConfigs?.limit?.exportDatasetLimitMinutes
|
limitMinutes: global.feConfigs?.limit?.exportDatasetLimitMinutes
|
||||||
});
|
});
|
||||||
|
|
||||||
(async () => {
|
|
||||||
addOperationLog({
|
|
||||||
tmbId,
|
|
||||||
teamId,
|
|
||||||
event: OperationLogEventEnum.EXPORT_DATASET,
|
|
||||||
params: {
|
|
||||||
datasetName: dataset.name,
|
|
||||||
datasetType: getI18nDatasetType(dataset.type)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default NextAPI(handler);
|
export default NextAPI(handler);
|
||||||
|
|||||||
35
个人记录.md
35
个人记录.md
@ -1,35 +0,0 @@
|
|||||||
# 格式化查看容器网络
|
|
||||||
|
|
||||||
方便测试网络的联通性,主要重启网络就会变,暂时先手动完成这一步
|
|
||||||
|
|
||||||
docker ps -q | xargs -n 1 docker inspect --format '容器ID: {{.Id}}
|
|
||||||
容器名称: {{.Name}}
|
|
||||||
状态: {{.State.Status}}
|
|
||||||
{{range $net, $settings := .NetworkSettings.Networks}}网络名称: {{$net}}
|
|
||||||
- IP地址: {{$settings.IPAddress}}
|
|
||||||
- 别名: {{printf "%v" $settings.Aliases}}
|
|
||||||
{{end}}
|
|
||||||
------------------------------------'
|
|
||||||
|
|
||||||
# 更改项
|
|
||||||
将app的port更改为3001(之前为3000),修改了包括dockerfile、package.json
|
|
||||||
# 构建一个镜像
|
|
||||||
构建时间(服务器端2核8g)需要20分钟左右
|
|
||||||
|
|
||||||
## 官方构建命令
|
|
||||||
docker build -f ./projects/app/Dockerfile -t registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.1 . --build-arg name=app
|
|
||||||
|
|
||||||
## 自定义命令
|
|
||||||
docker build -f ./projects/app/Dockerfile -t martingpt:v4.8.1 . --build-arg name=app
|
|
||||||
构建标签为martingpt版本为v4.8.1的images
|
|
||||||
可以通过docker images命令查看,在未构建该镜像时系统已经有如下镜像了:
|
|
||||||
【
|
|
||||||
registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt v4.9.10-fix2 6ab06da546ca 9 days ago 380MB
|
|
||||||
registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-mcp_server v4.9.10-fix2 ebfa023a0fde 9 days ago 181MB
|
|
||||||
registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox v4.9.10-fix2 cd3e0ac636f6 9 days ago 543MB
|
|
||||||
stirlingtools/stirling-pdf latest 48aebce79e99 2 weeks ago 1.88GB
|
|
||||||
registry.cn-hangzhou.aliyuncs.com/labring/aiproxy v0.1.7 ebeaca8b63cd 8 weeks ago 199MB
|
|
||||||
registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector v0.8.0-pg15 b3993e95063f 7 months ago 429MB
|
|
||||||
traefik v3.1 075808f3fdf7 7 months ago 178MB
|
|
||||||
registry.cn-hangzhou.aliyuncs.com/fastgpt/mongo 5.0.18 021e1bd71d92 2 years ago 662MB
|
|
||||||
】
|
|
||||||
Loading…
x
Reference in New Issue
Block a user