diff --git a/.npmrc b/.npmrc
new file mode 100644
index 000000000000..b82e07751d5b
--- /dev/null
+++ b/.npmrc
@@ -0,0 +1 @@
+public-hoist-pattern[]=*tiktoken*
diff --git a/.vscode/i18n-ally-custom-framework.yml b/.vscode/i18n-ally-custom-framework.yml
index 5582ce8dc19e..be5e4e7df927 100644
--- a/.vscode/i18n-ally-custom-framework.yml
+++ b/.vscode/i18n-ally-custom-framework.yml
@@ -23,6 +23,9 @@ usageMatchRegex:
- "[^\\w\\d]datasetT\\(['\"`]({key})['\"`]"
- "[^\\w\\d]fileT\\(['\"`]({key})['\"`]"
- "[^\\w\\d]publishT\\(['\"`]({key})['\"`]"
+ - "[^\\w\\d]workflowT\\(['\"`]({key})['\"`]"
+ - "[^\\w\\d]userT\\(['\"`]({key})['\"`]"
+ - "[^\\w\\d]chatT\\(['\"`]({key})['\"`]"
# A RegEx to set a custom scope range. This scope will be used as a prefix when detecting keys
# and works like how the i18next framework identifies the namespace scope from the
diff --git a/.vscode/nextapi.code-snippets b/.vscode/nextapi.code-snippets
new file mode 100644
index 000000000000..088ed3b3f8e3
--- /dev/null
+++ b/.vscode/nextapi.code-snippets
@@ -0,0 +1,52 @@
+{
+ // Place your FastGPT 工作区 snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
+ // description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
+ // is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
+ // used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
+ // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
+ // Placeholders with the same ids are connected.
+ // Example:
+ "Next api template": {
+ "scope": "javascript,typescript",
+ "prefix": "nextapi",
+ "body": [
+ "import type { ApiRequestProps, ApiResponseType } from '@fastgpt/service/type/next';",
+ "import { NextAPI } from '@/service/middleware/entry';",
+ "",
+ "export type ${TM_FILENAME_BASE}Query = {};",
+ "",
+ "export type ${TM_FILENAME_BASE}Body = {};",
+ "",
+ "export type ${TM_FILENAME_BASE}Response = {};",
+ "",
+ "async function handler(",
+ " req: ApiRequestProps<${TM_FILENAME_BASE}Body, ${TM_FILENAME_BASE}Query>,",
+ " res: ApiResponseType
{t('common.Username')} | -{t('user.team.Role')} | -{t('common.Status')} | -- |
---|---|---|---|
- |
- {t(TeamMemberRoleMap[item.role]?.label || '')} | -- {t(TeamMemberStatusMap[item.status]?.label || '')} - | -
- {userInfo?.team?.role === TeamMemberRoleEnum.owner &&
- item.role !== TeamMemberRoleEnum.owner && (
- |
-
{datasetT('External url')} | +{datasetT('External id')} | +{datasetT('filename')} | ++ |
---|---|---|---|
+ + | ++ + | ++ + | +
+ |
+