Commit d571c768 by Archer Committed by GitHub

V4.14.1 feature (#5880)

* feat: app split (#5858)

* feat: app split script

* fix: app split

* chore: app split script try-catch

* adjust dashborad page (#5872)

* create page

* create page

* create button

* router name

* bot

* template

* create page

* mobile

* toolfolder

* fix

* fix

* fix build

* split tool select

* img

* doc

* rename enum

* fix page adjust (#5883)

* fix page adjust

* fix ad store

* fix: initv4141 (#5886)

* fix: create app

* doc

* hide api

* doc

* feat: payment pause interactive (#5892)

* fix: copy clbs (#5889)

* fix: copy clbs

* fix: copy clbs

* fix: http protocol handling in baseURL (#5890)

* fix: http protocol handling in baseURL

* ui fix

* auto saved version

* fix

* auto save

* fix: model permission modal (#5895)

* folder

* fix: del app

* navbar

* fix: plugin file selector (#5893)

* fix: plugin file selector

* fix: plugin file selector

* workflow tool inputform

* pick

---------

Co-authored-by: archer <545436317@qq.com>

* fix: workflow tool time

* doc

* fix workorder button (#5896)

* add inform track (#5897)

* remove invalid track

* comment

* feat: marketplace refresh api (#5884)

* marketplace refresh

* fix: helper bot menu button (#5898)

---------

Co-authored-by: Finley Ge <32237950+FinleyGe@users.noreply.github.com>
Co-authored-by: heheer <heheer@sealos.io>
Co-authored-by: 伍闲犬 <whoeverimf5@gmail.com>
parent 74e16204
# FastGPT i18n 客户端化优化实施计划
# FastGPT i18n 客户端化优化实施计划
......@@ -133,7 +133,7 @@ export default i18n;
export const pageNamespaces: Record<string, string[]> = {
// 应用相关
'/app/detail': ['app', 'chat', 'workflow', 'publish', 'file'],
'/dashboard/apps': ['app'],
'/dashboard/agent': ['app'],
// 数据集相关
'/dataset/list': ['dataset'],
......@@ -583,7 +583,7 @@ P0 - 高频访问页面 (优先迁移):
- /app/detail (应用编辑页)
- /dataset/list (数据集列表)
- /dataset/detail (数据集详情)
- /dashboard/apps (应用列表)
- /dashboard/agent (应用列表)
P1 - 中频访问页面:
- /account/setting (账户设置)
......@@ -810,7 +810,7 @@ import { test, expect } from '@playwright/test';
test.describe('i18n Performance', () => {
test('should load translations within 200ms', async ({ page }) => {
await page.goto('http://localhost:3000/dashboard/apps');
await page.goto('http://localhost:3000/dashboard/agent');
const startTime = Date.now();
......@@ -826,7 +826,7 @@ test.describe('i18n Performance', () => {
});
test('should switch routes without translation flash', async ({ page }) => {
await page.goto('http://localhost:3000/dashboard/apps');
await page.goto('http://localhost:3000/dashboard/agent');
await page.waitForLoadState('networkidle');
// 点击链接切换路由
......
# FastGPT Next.js 14 Page Router 路由性能诊断报告
# FastGPT Next.js 14 Page Router 路由性能诊断报告
......@@ -82,7 +82,7 @@ export async function getServerSideProps(content: any) {
};
}
// projects/app/src/pages/dashboard/apps/index.tsx:344
// projects/app/src/pages/dashboard/agent/index.tsx:344
export async function getServerSideProps(content: any) {
return {
props: {
......@@ -317,7 +317,7 @@ const { loading: loadingApp, runAsync: reloadApp } = useRequest2(
refreshDeps: [appId],
errorToast: t('common:core.app.error.Get app failed'),
onError(err: any) {
router.replace('/dashboard/apps');
router.replace('/dashboard/agent');
},
onSuccess(res) {
setAppDetail(res);
......@@ -585,7 +585,7 @@ import i18n from './client';
const pageNamespaces = {
'/app/detail': ['app', 'chat', 'workflow'],
'/dataset/list': ['dataset'],
'/dashboard/apps': ['app'],
'/dashboard/agent': ['app'],
// ... 更多映射
};
......@@ -1321,7 +1321,7 @@ import { test, expect } from '@playwright/test';
test.describe('Route Switching Performance', () => {
test('should switch routes within 500ms', async ({ page }) => {
await page.goto('http://localhost:3000/dashboard/apps');
await page.goto('http://localhost:3000/dashboard/agent');
// 等待页面完全加载
await page.waitForLoadState('networkidle');
......
---
name: your-skill-name
description: Brief description of what this skill does and when to activate it. Include trigger keywords and scenarios where this skill should be used.
---
# Your Skill Title
> Brief one-line summary of what this skill accomplishes
## When to Use This Skill
- User asks to [specific action or task]
- User mentions keywords like "[keyword1]", "[keyword2]", or "[keyword3]"
- User is working with [specific technology/framework/tool]
- User needs to [specific outcome or goal]
## Quick Start
```bash
# Basic usage example
command-to-run --option value
```
## How It Works
1. **Step 1**: Brief description of first step
- Detail about what happens
- Any prerequisites or conditions
2. **Step 2**: Brief description of second step
- Key actions taken
- Expected outputs
3. **Step 3**: Brief description of final step
- Validation or verification
- Success criteria
## Examples
### Example 1: Basic Usage
**User Request**: "Example of what user might say"
**Action**: What Claude does in response
**Output**:
```
Expected output or result
```
### Example 2: Advanced Usage
**User Request**: "More complex user request"
**Action**:
1. First action taken
2. Second action taken
3. Final action
**Output**:
```
Expected output showing more complex results
```
## Best Practices
- ✅ Do this for best results
- ✅ Follow this pattern
- ❌ Avoid this common mistake
- ❌ Don't do this
## Troubleshooting
### Common Issue 1
**Problem**: Description of the problem
**Solution**: How to fix it
### Common Issue 2
**Problem**: Description of another problem
**Solution**: Steps to resolve
## References
- [Related Documentation](link-to-docs)
- [Official Guide](link-to-guide)
- [Additional Resources](link-to-resources)
---
**Version**: 1.0
**Last Updated**: YYYY-MM-DD
\ No newline at end of file
---
name: your-workflow-skill
description: Guides Claude through a multi-step workflow for [specific task]. Activates when user needs to [trigger scenario] or mentions [key terms].
---
# Your Workflow Skill Title
> Automates a complex multi-step process with decision points and validation
## When to Use This Skill
- User needs to execute a multi-step workflow
- User asks to "[workflow trigger phrase]"
- User is working on [specific type of project or task]
- Task requires validation and error handling at each step
## Workflow Overview
```
┌─────────────┐
│ Start │
└──────┬──────┘
│
▼
┌─────────────────┐
│ Preparation │
│ & Validation │
└────────┬────────┘
│
┌────▼────┐
│ Step 1 │
└────┬────┘
│
┌────▼────┐
│ Step 2 │──┐
└────┬────┘ │ (Loop if needed)
│ │
└───────┘
│
┌────▼────┐
│ Step 3 │
└────┬────┘
│
▼
┌─────────────┐
│ Complete │
│ & Report │
└─────────────┘
```
## Detailed Workflow
### Preparation Phase
Before starting the main workflow:
- [ ] Check prerequisite 1
- [ ] Validate prerequisite 2
- [ ] Ensure prerequisite 3 is met
If any prerequisite fails:
- Stop execution
- Report which prerequisite failed
- Provide remediation steps
### Step 1: [Step Name]
**Purpose**: What this step accomplishes
**Actions**:
1. Action 1
2. Action 2
3. Action 3
**Validation**:
- Check condition 1
- Verify condition 2
**On Success**: → Proceed to Step 2
**On Failure**: → [Error handling procedure]
### Step 2: [Step Name]
**Purpose**: What this step accomplishes
**Actions**:
1. Action 1
2. Action 2
**Decision Point**:
- If condition A: → Action X
- If condition B: → Action Y
- Otherwise: → Default action
**Validation**:
- Verify expected output
- Check for errors
**On Success**: → Proceed to Step 3
**On Failure**: → [Error handling procedure]
### Step 3: [Step Name]
**Purpose**: Final actions and cleanup
**Actions**:
1. Finalize changes
2. Run validation tests
3. Generate summary report
**Success Criteria**:
- All tests pass
- No errors in logs
- Expected artifacts created
## Examples
### Example 1: Standard Workflow Execution
**User Request**: "Run the [workflow name]"
**Execution**:
**Preparation Phase** ✓
```
✓ Prerequisite 1 met
✓ Prerequisite 2 validated
✓ Ready to begin
```
**Step 1: [Step Name]** ✓
```
→ Action 1 completed
→ Action 2 completed
→ Validation passed
```
**Step 2: [Step Name]** ✓
```
→ Decision: Condition A detected
→ Executing Action X
→ Validation passed
```
**Step 3: [Step Name]** ✓
```
→ Finalization complete
→ All tests passed
→ Summary generated
```
**Result**: Workflow completed successfully
### Example 2: Workflow with Error Recovery
**User Request**: "Execute [workflow name]"
**Execution**:
**Step 1** ✓
```
→ Completed successfully
```
**Step 2** ⚠️
```
→ Action 1 completed
→ Action 2 failed: [Error message]
```
**Error Recovery**:
1. Identified root cause: [Explanation]
2. Applied fix: [Fix description]
3. Retrying Step 2...
**Step 2 (Retry)** ✓
```
→ Completed after fix
```
**Step 3** ✓
```
→ Completed successfully
```
**Result**: Workflow completed with 1 retry
## Error Handling
### Error Categories
| Category | Action |
|----------|--------|
| **Recoverable** | Attempt automatic fix, retry up to 3 times |
| **User Input Needed** | Pause workflow, ask user for guidance |
| **Critical** | Stop workflow, rollback changes if possible |
### Common Errors
**Error 1: [Error Name]**
- **Cause**: What causes this error
- **Detection**: How to identify it
- **Recovery**: Steps to fix
1. Recovery action 1
2. Recovery action 2
3. Retry from failed step
**Error 2: [Error Name]**
- **Cause**: What causes this error
- **Detection**: How to identify it
- **Recovery**: Manual intervention required
- Ask user: "[Question to ask]"
- Wait for user input
- Apply user's guidance
- Resume workflow
## Rollback Procedure
If the workflow fails critically:
1. **Identify last successful step**
- Step 1: ✓ Completed
- Step 2: ❌ Failed at action 3
2. **Undo changes from failed step**
- Revert action 1
- Revert action 2
- Clean up partial state
3. **Verify system state**
- Confirm rollback successful
- Check for side effects
4. **Report to user**
```
Workflow failed at Step 2, action 3
Reason: [Error message]
All changes have been rolled back
System is back to pre-workflow state
```
## Workflow Variations
### Variation 1: Quick Mode
**When to use**: User needs faster execution, can accept lower validation
**Changes**:
- Skip optional validations
- Use cached data where available
- Reduce logging verbosity
**Trade-offs**:
- ⚡ 50% faster
- ⚠️ Less detailed error messages
### Variation 2: Strict Mode
**When to use**: Production deployments, critical changes
**Changes**:
- Enable all validations
- Require explicit user confirmation at each step
- Generate detailed audit logs
**Trade-offs**:
- 🛡️ Maximum safety
- 🐢 Slower execution
## Monitoring and Logging
Throughout the workflow:
```
[TIMESTAMP] [STEP] [STATUS] Message
[2025-01-31 14:30:01] [PREP] [INFO] Starting preparation phase
[2025-01-31 14:30:02] [PREP] [OK] All prerequisites met
[2025-01-31 14:30:03] [STEP1] [INFO] Beginning Step 1
[2025-01-31 14:30:05] [STEP1] [OK] Step 1 completed successfully
[2025-01-31 14:30:06] [STEP2] [INFO] Beginning Step 2
[2025-01-31 14:30:08] [STEP2] [WARN] Condition B detected, using fallback
[2025-01-31 14:30:10] [STEP2] [OK] Step 2 completed with warnings
[2025-01-31 14:30:11] [STEP3] [INFO] Beginning Step 3
[2025-01-31 14:30:15] [STEP3] [OK] Step 3 completed successfully
[2025-01-31 14:30:16] [COMPLETE] [OK] Workflow finished successfully
```
## Post-Workflow Report
After completion, generate a summary:
```markdown
# Workflow Execution Report
**Workflow**: [Workflow Name]
**Started**: 2025-01-31 14:30:01
**Completed**: 2025-01-31 14:30:16
**Duration**: 15 seconds
**Status**: ✓ Success
## Steps Executed
1. ✓ Preparation Phase (1s)
2. ✓ Step 1: [Step Name] (2s)
3. ✓ Step 2: [Step Name] (4s) - 1 warning
4. ✓ Step 3: [Step Name] (4s)
## Warnings
- Step 2: Condition B detected, used fallback action
## Artifacts Generated
- `/path/to/output1.txt`
- `/path/to/output2.json`
- `/path/to/report.html`
## Next Steps
- Review generated artifacts
- Deploy to production (if applicable)
- Archive logs to `/logs/workflow-20250131-143001.log`
```
## Best Practices
### Do
- ✅ Validate inputs before starting workflow
- ✅ Provide clear progress updates at each step
- ✅ Log all decisions and actions
- ✅ Handle errors gracefully with recovery options
- ✅ Generate summary report at completion
### Don't
- ❌ Skip validation steps to save time
- ❌ Continue after critical errors
- ❌ Assume prerequisites are met without checking
- ❌ Lose partial progress on failure
- ❌ Leave system in inconsistent state
## Advanced Features
### Parallel Execution
Some steps can run in parallel:
```
Step 1 ─┬─→ Step 2A ─┐
│ ├─→ Step 3
└─→ Step 2B ─┘
```
**Requirements**:
- Steps 2A and 2B must be independent
- Both must complete before Step 3
**Implementation**:
1. Start Step 2A in background
2. Start Step 2B in background
3. Wait for both to complete
4. Verify both succeeded
5. Proceed to Step 3
### Conditional Branching
```
Step 1 → Decision
├─→ [Condition A] → Path A → Step 3
├─→ [Condition B] → Path B → Step 3
└─→ [Default] → Path C → Step 3
```
## Testing This Workflow
To test the workflow without side effects:
1. Use `--dry-run` flag to simulate execution
2. Check that all steps are logged correctly
3. Verify error handling with intentional failures
4. Confirm rollback procedure works
Example:
```bash
workflow-runner --dry-run --inject-error step2
```
Expected output:
```
[DRY RUN] Step 1: Would execute [actions]
[DRY RUN] Step 2: Injected error as requested
[DRY RUN] Error Recovery: Would attempt fix
[DRY RUN] Rollback: Would undo Step 1 changes
```
---
**Version**: 1.0
**Last Updated**: YYYY-MM-DD
**Maintainer**: Team Name
\ No newline at end of file
......@@ -155,7 +155,7 @@ FastGPT 商业版共包含了2个应用(fastgpt, fastgpt-plus)和2个数据
SYSTEM_NAME=FastGPT
SYSTEM_DESCRIPTION=
SYSTEM_FAVICON=/favicon.ico
HOME_URL=/dashboard/apps
HOME_URL=/dashboard/agent
```
SYSTEM_FAVICON 可以是一个网络地址
......
......@@ -3,15 +3,34 @@ title: 'V4.14.1(进行中)'
description: 'FastGPT V4.14.1 更新说明'
---
## 更新指南
### 1. 更新镜像:
### 2. 执行升级脚本
仅需使用过自定义系统工具的商业版用户操作。
从任意终端,发起 1 个 HTTP 请求。其中 `{{rootkey}}` 替换成环境变量里的 `rootkey`;`{{host}}` 替换成**FastGPT 域名**。
```bash
curl --location --request POST 'https://{{host}}/api/admin/initv4141' \
--header 'rootkey: {{rootkey}}' \
--header 'Content-Type: application/json'
```
复制一份原应用目录给工具使用。
## 🚀 新增内容
1. 新工作台交互。
2. 工作流运行欠费后提供继续运行按键,无需从头开始。
## ⚙️ 优化
1. 在同一轮对话中,MCP Client 会持久化实例,不会销毁。
2. 模型重载时候,不会把全局模型配置清空再添加,从而导致重载阶段模型调用错误。
3. 自动保存,增加一条团队云端保存记录。
## 🐛 修复
......@@ -19,3 +38,9 @@ description: 'FastGPT V4.14.1 更新说明'
2. 富文本编辑器 tab 空格未对齐。
3. 嵌套运行 Agent 时候,跳过节点队列未初始化,导致无法正常运行。
4. 判断器右侧是 number 引用时,会出现报错。
5. 工作流工具入参为文件选择时,未出现选择框。
6. HTTP 插件无法正确处理 http 协议(非 https)接口请求。
7. 文本类型的全局变量,默认值编辑框 UI。
8. 代码节点行数超过 100 行时显示重叠。
9. 删除应用,未把目录内的删除。
10. 浏览器未传递实时日期至服务器。
......@@ -39,7 +39,7 @@
"document/content/docs/introduction/development/proxy/http_proxy.mdx": "2025-07-23T21:35:03+08:00",
"document/content/docs/introduction/development/proxy/nginx.mdx": "2025-07-23T21:35:03+08:00",
"document/content/docs/introduction/development/quick-start.mdx": "2025-10-21T11:58:25+08:00",
"document/content/docs/introduction/development/sealos.mdx": "2025-09-29T11:52:39+08:00",
"document/content/docs/introduction/development/sealos.mdx": "2025-11-07T12:06:28+08:00",
"document/content/docs/introduction/development/signoz.mdx": "2025-09-17T22:29:56+08:00",
"document/content/docs/introduction/guide/DialogBoxes/htmlRendering.mdx": "2025-07-23T21:35:03+08:00",
"document/content/docs/introduction/guide/DialogBoxes/quoteList.mdx": "2025-07-23T21:35:03+08:00",
......@@ -115,7 +115,7 @@
"document/content/docs/upgrading/4-13/4131.mdx": "2025-09-30T15:47:06+08:00",
"document/content/docs/upgrading/4-13/4132.mdx": "2025-10-21T11:46:53+08:00",
"document/content/docs/upgrading/4-14/4140.mdx": "2025-11-06T15:43:00+08:00",
"document/content/docs/upgrading/4-14/4141.mdx": "2025-11-07T10:56:20+08:00",
"document/content/docs/upgrading/4-14/4141.mdx": "2025-11-10T22:52:46+08:00",
"document/content/docs/upgrading/4-8/40.mdx": "2025-08-02T19:38:37+08:00",
"document/content/docs/upgrading/4-8/41.mdx": "2025-08-02T19:38:37+08:00",
"document/content/docs/upgrading/4-8/42.mdx": "2025-08-02T19:38:37+08:00",
......
......@@ -59,7 +59,11 @@ export const parseUrlToFileType = (url: string): UserChatItemFileItemType | unde
const parseUrl = new URL(url, 'http://localhost:3000');
// Get filename from URL
const filename = parseUrl.searchParams.get('filename') || parseUrl.pathname.split('/').pop();
const filename = (() => {
// Here is a S3 Object Key
if (url.startsWith('chat/')) return url.split('/').pop()?.split('-')[1];
return parseUrl.searchParams.get('filename') || parseUrl.pathname.split('/').pop();
})();
const extension = filename?.split('.').pop()?.toLowerCase() || '';
// If it's a document type, return as file, otherwise treat as image
......
......@@ -6,5 +6,8 @@ export enum TrackEnum {
createDataset = 'createDataset',
appNodes = 'appNodes',
runSystemTool = 'runSystemTool',
datasetSearch = 'datasetSearch'
datasetSearch = 'datasetSearch',
readSystemAnnouncement = 'readSystemAnnouncement',
clickOperationalAd = 'clickOperationalAd',
closeOperationalAd = 'closeOperationalAd'
}
......@@ -2,7 +2,8 @@ export enum SystemConfigsTypeEnum {
fastgpt = 'fastgpt',
fastgptPro = 'fastgptPro',
systemMsgModal = 'systemMsgModal',
license = 'license'
license = 'license',
operationalAd = 'operationalAd'
}
export const SystemConfigsTypeMap = {
......@@ -17,5 +18,8 @@ export const SystemConfigsTypeMap = {
},
[SystemConfigsTypeEnum.license]: {
label: 'license'
},
[SystemConfigsTypeEnum.operationalAd]: {
label: 'operationalAd'
}
};
......@@ -53,6 +53,7 @@ export type FastGPTFeConfigsType = {
googleClientVerKey?: string;
mcpServerProxyEndpoint?: string;
chineseRedirectUrl?: string;
botIframeUrl?: string;
show_emptyChat?: boolean;
show_appStore?: boolean;
......
......@@ -8,19 +8,32 @@ import {
export enum AppTypeEnum {
folder = 'folder',
toolFolder = 'toolFolder',
simple = 'simple',
agent = 'agent',
workflow = 'advanced',
plugin = 'plugin',
toolSet = 'toolSet', // 'mcp'
workflowTool = 'plugin',
mcpToolSet = 'toolSet', // 'mcp'
httpToolSet = 'httpToolSet',
tool = 'tool',
hidden = 'hidden',
// deprecated
tool = 'tool',
httpPlugin = 'httpPlugin'
}
export const AppFolderTypeList = [AppTypeEnum.folder, AppTypeEnum.httpPlugin];
export const AppFolderTypeList = [
AppTypeEnum.folder,
AppTypeEnum.toolFolder,
AppTypeEnum.httpPlugin
];
export const ToolTypeList = [
AppTypeEnum.mcpToolSet,
AppTypeEnum.httpToolSet,
AppTypeEnum.workflowTool
];
export const AppTypeList = [AppTypeEnum.simple, AppTypeEnum.agent, AppTypeEnum.workflow];
export const defaultTTSConfig: AppTTSConfigType = { type: 'web' };
......
......@@ -185,7 +185,7 @@ export const getAppType = (config?: WorkflowTemplateBasicType | AppSimpleEditFor
return AppTypeEnum.workflow;
}
if (config.nodes.some((node) => node.flowNodeType === 'pluginInput')) {
return AppTypeEnum.plugin;
return AppTypeEnum.workflowTool;
}
return '';
};
......
......@@ -12,6 +12,7 @@ export type AppVersionSchemaType = {
edges: AppSchema['edges'];
chatConfig: AppSchema['chatConfig'];
isPublish?: boolean;
isAutoSave?: boolean;
versionName: string;
tmbId: string;
};
......
......@@ -200,6 +200,10 @@ export const getLastInteractiveValue = (
if (lastValue.interactive.type === 'userInput' && !lastValue.interactive.params.submitted) {
return lastValue.interactive;
}
if (lastValue.interactive.type === 'paymentPause' && !lastValue.interactive.params.continue) {
return lastValue.interactive;
}
}
return;
......
......@@ -31,6 +31,7 @@ type ChildrenInteractive = InteractiveNodeType & {
};
};
// Loop bode
type LoopInteractive = InteractiveNodeType & {
type: 'loopInteractive';
params: {
......@@ -80,10 +81,20 @@ type UserInputInteractive = InteractiveNodeType & {
};
};
// 欠费暂停交互
export type PaymentPauseInteractive = InteractiveNodeType & {
type: 'paymentPause';
params: {
description?: string;
continue?: boolean;
};
};
export type InteractiveNodeResponseType =
| UserSelectInteractive
| UserInputInteractive
| ChildrenInteractive
| LoopInteractive;
| LoopInteractive
| PaymentPauseInteractive;
export type WorkflowInteractiveResponseType = InteractiveBasicType & InteractiveNodeResponseType;
......@@ -50,7 +50,7 @@ export type WorkflowTemplateType = {
// template market
export type TemplateMarketItemType = WorkflowTemplateType & {
tags: string[];
type: AppTypeEnum.simple | AppTypeEnum.workflow | AppTypeEnum.plugin;
type: AppTypeEnum.simple | AppTypeEnum.workflow | AppTypeEnum.workflowTool;
};
// template market list
export type TemplateMarketListItemType = {
......@@ -59,6 +59,6 @@ export type TemplateMarketListItemType = {
intro?: string;
author?: string;
tags: string[];
type: AppTypeEnum.simple | AppTypeEnum.workflow | AppTypeEnum.plugin;
type: AppTypeEnum.simple | AppTypeEnum.workflow | AppTypeEnum.workflowTool;
avatar: string;
};
......@@ -8,6 +8,10 @@ import { addHours } from 'date-fns';
import { imageFileType } from '@fastgpt/global/common/file/constants';
import { retryFn } from '@fastgpt/global/common/system/utils';
import { UserError } from '@fastgpt/global/common/error/utils';
import { S3Sources } from '../../s3/type';
import { getS3AvatarSource } from '../../s3/sources/avatar';
import path from 'path';
import { getNanoid } from '@fastgpt/global/common/string/tools';
export const maxImgSize = 1024 * 1024 * 12;
const base64MimeRegex = /data:image\/([^\)]+);base64/;
......@@ -56,60 +60,67 @@ export async function uploadMongoImg({
return `${process.env.NEXT_PUBLIC_BASE_URL || ''}${imageBaseUrl}${String(_id)}.${extension}`;
}
export const copyImage = async ({
export const copyAvatarImage = async ({
teamId,
imageUrl,
ttl,
session
}: {
teamId: string;
imageUrl: string;
ttl: boolean;
session?: ClientSession;
}) => {
const imageId = getIdFromPath(imageUrl);
if (!imageId) return imageUrl;
if (!imageUrl) return;
// S3
if (imageUrl.startsWith(`${imageBaseUrl}/${S3Sources.avatar}`)) {
const extendName = path.extname(imageUrl);
const key = await getS3AvatarSource().copyAvatar({
sourceKey: imageUrl.slice(imageBaseUrl.length),
targetKey: `${S3Sources.avatar}/${teamId}/${getNanoid(6)}${extendName}`,
ttl
});
return key;
}
const image = await MongoImage.findOne(
{
_id: imageId,
teamId
},
undefined,
{
session
}
);
if (!image) return imageUrl;
const paths = imageUrl.split('/');
const name = paths[paths.length - 1];
const id = name.split('.')[0];
const [newImage] = await MongoImage.create(
[
// Mongo
if (id && Types.ObjectId.isValid(id)) {
const image = await MongoImage.findOne(
{
_id: id,
teamId
},
undefined,
{
teamId,
binary: image.binary,
metadata: image.metadata
session
}
],
{
session,
ordered: true
}
);
);
if (!image) return imageUrl;
const [newImage] = await MongoImage.create(
[
{
teamId,
binary: image.binary,
metadata: image.metadata
}
],
{
session,
ordered: true
}
);
return `${process.env.NEXT_PUBLIC_BASE_URL || ''}${imageBaseUrl}${String(newImage._id)}.${image.metadata?.mime?.split('/')[1]}`;
}
return `${process.env.NEXT_PUBLIC_BASE_URL || ''}${imageBaseUrl}${String(newImage._id)}.${image.metadata?.mime?.split('/')[1]}`;
return imageUrl;
};
const getIdFromPath = (path?: string) => {
if (!path) return;
const paths = path.split('/');
const name = paths[paths.length - 1];
if (!name) return;
const id = name.split('.')[0];
if (!id || !Types.ObjectId.isValid(id)) return;
return id;
};
export const removeImageByPath = (path?: string, session?: ClientSession) => {
if (!path) return;
......
......@@ -79,7 +79,24 @@ export class S3BaseBucket {
return this.delete(src);
}
copy(src: string, dst: string, options?: CopyConditions): ReturnType<Client['copyObject']> {
async copy({
src,
dst,
ttl,
options
}: {
src: string;
dst: string;
ttl: boolean;
options?: CopyConditions;
}): ReturnType<Client['copyObject']> {
if (ttl) {
await MongoS3TTL.create({
minioKey: dst,
bucketName: this.name,
expiredTime: addHours(new Date(), 24)
});
}
return this.client.copyObject(this.name, src, dst, options);
}
......
......@@ -66,6 +66,23 @@ class S3AvatarSource {
await this.deleteAvatar(oldAvatar, session);
}
}
async copyAvatar({
sourceKey,
targetKey,
ttl
}: {
sourceKey: string;
targetKey: string;
ttl: boolean;
}) {
await this.bucket.copy({
src: sourceKey,
dst: targetKey,
ttl
});
return targetKey;
}
}
export function getS3AvatarSource() {
......
......@@ -22,6 +22,10 @@ class S3ChatSource {
return (this.instance ??= new S3ChatSource());
}
static isChatFileKey(key?: string): key is `${typeof S3Sources.chat}/${string}` {
return key?.startsWith(`${S3Sources.chat}/`) ?? false;
}
async createGetChatFileURL(params: { key: string; expiredHours?: number; external: boolean }) {
const { key, expiredHours = 1, external = false } = params; // 默认一个小时
......
......@@ -4,7 +4,7 @@ import {
FlowNodeInputTypeEnum,
FlowNodeTypeEnum
} from '@fastgpt/global/core/workflow/node/constant';
import { AppTypeEnum } from '@fastgpt/global/core/app/constants';
import { AppFolderTypeList } from '@fastgpt/global/core/app/constants';
import { MongoApp } from './schema';
import type { StoreNodeItemType } from '@fastgpt/global/core/workflow/type/node';
import { encryptSecretValue, storeSecretValue } from '../../common/secret/utils';
......@@ -153,7 +153,7 @@ export const onDelOneApp = async ({
});
const deletedAppIds = apps
.filter((app) => app.type !== AppTypeEnum.folder)
.filter((app) => !AppFolderTypeList.includes(app.type))
.map((app) => String(app._id));
// Remove eval job
......@@ -217,6 +217,7 @@ export const onDelOneApp = async ({
{ session }
);
// Delete avatar
await removeImageByPath(app.avatar, session);
};
......@@ -239,10 +240,10 @@ export const onDelOneApp = async ({
for await (const app of apps) {
if (session) {
await del(app, session);
return deletedAppIds;
}
await mongoSessionRun((session) => del(app, session));
return deletedAppIds;
}
return deletedAppIds;
};
......@@ -148,7 +148,10 @@ export const runHTTPTool = async ({
const { data } = await axios({
method: method.toUpperCase(),
baseURL: baseUrl.startsWith('https://') ? baseUrl : `https://${baseUrl}`,
baseURL:
baseUrl.startsWith('http://') || baseUrl.startsWith('https://')
? baseUrl
: `https://${baseUrl}`,
url: toolPath,
headers,
data: body,
......
......@@ -238,7 +238,7 @@ export async function getChildAppPreviewNode({
})
: true;
if (item.type === AppTypeEnum.toolSet) {
if (item.type === AppTypeEnum.mcpToolSet) {
const children = await getMCPChildren(item);
version.nodes[0].toolConfig = {
mcpToolSet: {
......
......@@ -71,6 +71,19 @@ export const serverGetWorkflowToolRunUserQuery = ({
if (input.renderTypeList.includes(FlowNodeInputTypeEnum.password)) {
value = encryptSecretValue(value);
} else if (
input.renderTypeList.includes(FlowNodeInputTypeEnum.fileSelect) &&
Array.isArray(value)
) {
value = value.map((item) => {
return {
id: item.id,
key: item.key,
name: item.name,
type: item.type,
url: item.key ? undefined : item.url
};
});
}
return {
......
......@@ -34,6 +34,7 @@ const AppVersionSchema = new Schema(
type: chatConfigType
},
isPublish: Boolean,
isAutoSave: Boolean,
versionName: String
},
{
......@@ -41,7 +42,7 @@ const AppVersionSchema = new Schema(
}
);
AppVersionSchema.index({ appId: 1, _id: -1 });
AppVersionSchema.index({ appId: 1, time: -1 });
export const MongoAppVersion = getMongoModel<AppVersionSchemaType>(
AppVersionCollectionName,
......
......@@ -389,6 +389,8 @@ export const updateInteractiveChat = async (props: Props) => {
: item;
});
finalInteractive.params.submitted = true;
} else if (finalInteractive.type === 'paymentPause') {
chatItem.value.pop();
}
if (aiResponse.customFeedbacks) {
......
import { ChatItemValueTypeEnum } from '@fastgpt/global/core/chat/constants';
import { ChatItemValueTypeEnum, ChatRoleEnum } from '@fastgpt/global/core/chat/constants';
import type { ChatItemType } from '@fastgpt/global/core/chat/type';
import { getS3ChatSource } from '../../common/s3/sources/chat';
import type { FlowNodeInputItemType } from '@fastgpt/global/core/workflow/type/io';
import { FlowNodeInputTypeEnum } from '@fastgpt/global/core/workflow/node/constant';
export const addPreviewUrlToChatItems = async (histories: ChatItemType[]) => {
// Presign file urls
const s3ChatSource = getS3ChatSource();
for await (const item of histories) {
export const addPreviewUrlToChatItems = async (
histories: ChatItemType[],
type: 'chatFlow' | 'workflowTool'
) => {
async function addToChatflow(item: ChatItemType) {
for await (const value of item.value) {
if (value.type === ChatItemValueTypeEnum.file && value.file && value.file.key) {
value.file.url = await s3ChatSource.createGetChatFileURL({
......@@ -15,4 +18,46 @@ export const addPreviewUrlToChatItems = async (histories: ChatItemType[]) => {
}
}
}
async function addToWorkflowTool(item: ChatItemType) {
if (item.obj !== ChatRoleEnum.Human || !Array.isArray(item.value)) return;
for (let j = 0; j < item.value.length; j++) {
const value = item.value[j];
if (value.type !== ChatItemValueTypeEnum.text) continue;
const inputValueString = value.text?.content || '';
const parsedInputValue = JSON.parse(inputValueString) as FlowNodeInputItemType[];
for (const input of parsedInputValue) {
if (
input.renderTypeList[0] !== FlowNodeInputTypeEnum.fileSelect ||
!Array.isArray(input.value)
)
continue;
for (const file of input.value) {
if (!file.key) continue;
const url = await getS3ChatSource().createGetChatFileURL({
key: file.key,
external: true
});
file.url = url;
}
}
item.value[j].text = {
...value.text,
content: JSON.stringify(parsedInputValue)
};
}
}
// Presign file urls
const s3ChatSource = getS3ChatSource();
for await (const item of histories) {
if (type === 'chatFlow') {
await addToChatflow(item);
} else if (type === 'workflowTool') {
await addToWorkflowTool(item);
}
}
};
......@@ -55,6 +55,8 @@ import type { RequireOnlyOne } from '@fastgpt/global/common/type/utils';
import { getS3ChatSource } from '../../../common/s3/sources/chat';
import { addPreviewUrlToChatItems } from '../../chat/utils';
import type { MCPClient } from '../../app/mcp';
import { TeamErrEnum } from '@fastgpt/global/common/error/code/team';
import { i18nT } from '../../../../web/i18n/utils';
type Props = Omit<ChatDispatchProps, 'workflowDispatchDeep' | 'timezone' | 'externalProvider'> & {
runtimeNodes: RuntimeNodeItemType[];
......@@ -132,7 +134,7 @@ export async function dispatchWorkFlow({
}
// Add preview url to chat items
await addPreviewUrlToChatItems(histories);
await addPreviewUrlToChatItems(histories, 'chatFlow');
for (const item of query) {
if (item.type !== ChatItemValueTypeEnum.file || !item.file?.key) continue;
item.file.url = await getS3ChatSource().createGetChatFileURL({
......@@ -620,6 +622,23 @@ export const runWorkflow = async (data: RunWorkflowProps): Promise<DispatchFlowR
}
};
}
private async checkTeamBlance(): Promise<NodeResponseCompleteType | undefined> {
try {
await checkTeamAIPoints(data.runningUserInfo.teamId);
} catch (error) {
// Next time you enter the system, you will still start from the current node(Current check team blance node).
if (error === TeamErrEnum.aiPointsNotEnough) {
return {
[DispatchNodeResponseKeyEnum.interactive]: {
type: 'paymentPause',
params: {
description: i18nT('chat:balance_not_enough_pause')
}
}
};
}
}
}
/* Check node run/skip or wait */
private async checkNodeCanRun(
node: RuntimeNodeItemType,
......@@ -652,6 +671,7 @@ export const runWorkflow = async (data: RunWorkflowProps): Promise<DispatchFlowR
this.chatResponses.push(responseData);
}
// Push usage in real time. Avoid a workflow usage a large number of points
if (nodeDispatchUsages) {
if (usageId) {
pushChatItemUsage({
......@@ -763,6 +783,7 @@ export const runWorkflow = async (data: RunWorkflowProps): Promise<DispatchFlowR
};
};
// Check queue status
if (data.maxRunTimes <= 0) {
addLog.error('Max run times is 0', {
appId: data.runningAppInfo.id
......@@ -790,8 +811,17 @@ export const runWorkflow = async (data: RunWorkflowProps): Promise<DispatchFlowR
runtimeEdges
});
const nodeRunResult = await (() => {
const nodeRunResult = await (async () => {
if (status === 'run') {
const blanceCheckResult = await this.checkTeamBlance();
if (blanceCheckResult) {
return {
node,
runStatus: 'pause' as const,
result: blanceCheckResult
};
}
// All source edges status to waiting
runtimeEdges.forEach((item) => {
if (item.target === node.nodeId) {
......@@ -870,10 +900,21 @@ export const runWorkflow = async (data: RunWorkflowProps): Promise<DispatchFlowR
this.debugNextStepRunNodes = this.debugNextStepRunNodes.concat([nodeRunResult.node]);
}
this.nodeInteractiveResponse = {
entryNodeIds: [nodeRunResult.node.nodeId],
interactiveResponse
};
// For the pause interactive response, there may be multiple nodes triggered at the same time, so multiple entry nodes need to be recorded.
// For other interactive nodes, only one will be triggered at the same time.
if (interactiveResponse.type === 'paymentPause') {
this.nodeInteractiveResponse = {
entryNodeIds: this.nodeInteractiveResponse?.entryNodeIds
? this.nodeInteractiveResponse.entryNodeIds.concat(nodeRunResult.node.nodeId)
: [nodeRunResult.node.nodeId],
interactiveResponse
};
} else {
this.nodeInteractiveResponse = {
entryNodeIds: [nodeRunResult.node.nodeId],
interactiveResponse
};
}
return;
} else if (isDebugMode) {
// Debug 模式下一步时候,会自己增加 activeNode
......
......@@ -6,6 +6,7 @@ import type {
DispatchNodeResultType,
ModuleDispatchProps
} from '@fastgpt/global/core/workflow/runtime/type';
import { getS3ChatSource } from '../../../../common/s3/sources/chat';
export type PluginInputProps = ModuleDispatchProps<{
[key: string]: any;
......@@ -21,12 +22,12 @@ export const dispatchPluginInput = async (
const { params, query } = props;
const { files } = chatValue2RuntimePrompt(query);
/*
/*
对 params 中文件类型数据进行处理
* 插件单独运行时,这里会是一个特殊的数组
* 插件调用的话,这个参数是一个 string[] 不会进行处理
* 硬性要求:API 单独调用插件时,要避免这种特殊类型冲突
TODO: 需要 filter max files
*/
for (const key in params) {
......@@ -37,6 +38,17 @@ export const dispatchPluginInput = async (
(item) => item.type === ChatFileTypeEnum.file || item.type === ChatFileTypeEnum.image
)
) {
// 为文件对象重新签发 URL(如果有 key 但没有 url)
for (let i = 0; i < val.length; i++) {
const fileItem = val[i];
if (fileItem.key && !fileItem.url) {
val[i].url = await getS3ChatSource().createGetChatFileURL({
key: fileItem.key,
external: true,
expiredHours: 1
});
}
}
params[key] = val.map((item) => item.url);
}
}
......
......@@ -49,8 +49,8 @@ export const checkTeamAppLimit = async (teamId: string, amount = 1) => {
$in: [
AppTypeEnum.simple,
AppTypeEnum.workflow,
AppTypeEnum.plugin,
AppTypeEnum.toolSet,
AppTypeEnum.workflowTool,
AppTypeEnum.mcpToolSet,
AppTypeEnum.httpToolSet
]
}
......@@ -65,7 +65,12 @@ export const checkTeamAppLimit = async (teamId: string, amount = 1) => {
if (global?.licenseData?.maxApps && typeof global?.licenseData?.maxApps === 'number') {
const totalApps = await MongoApp.countDocuments({
type: {
$in: [AppTypeEnum.simple, AppTypeEnum.workflow, AppTypeEnum.plugin, AppTypeEnum.toolSet]
$in: [
AppTypeEnum.simple,
AppTypeEnum.workflow,
AppTypeEnum.workflowTool,
AppTypeEnum.mcpToolSet
]
}
});
if (totalApps >= global.licenseData.maxApps) {
......
......@@ -12,13 +12,13 @@ import { retryFn } from '@fastgpt/global/common/system/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.simple) return i18nT('app:type.Chat_Agent');
if (type === AppTypeEnum.workflow) return i18nT('account_team:type.Workflow bot');
if (type === AppTypeEnum.plugin) return i18nT('account_team:type.Plugin');
if (type === AppTypeEnum.workflowTool) return i18nT('app:toolType_workflow');
if (type === AppTypeEnum.httpPlugin) return i18nT('account_team:type.Http plugin');
if (type === AppTypeEnum.httpToolSet) return i18nT('account_team:type.Http tool set');
if (type === AppTypeEnum.toolSet) return i18nT('account_team:type.Tool set');
if (type === AppTypeEnum.tool) return i18nT('account_team:type.Tool');
if (type === AppTypeEnum.httpToolSet) return i18nT('app:toolType_http');
if (type === AppTypeEnum.mcpToolSet) return i18nT('app:toolType_mcp');
if (type === AppTypeEnum.tool) return i18nT('app:toolType_mcp');
return i18nT('common:UnKnow');
}
......
......@@ -93,12 +93,14 @@ export const iconPaths = {
'common/playFill': () => import('./icons/common/playFill.svg'),
'common/playLight': () => import('./icons/common/playLight.svg'),
'common/publishFill': () => import('./icons/common/publishFill.svg'),
'common/refresh': () => import('./icons/common/refresh.svg'),
'common/refreshLight': () => import('./icons/common/refreshLight.svg'),
'common/resultLight': () => import('./icons/common/resultLight.svg'),
'common/retryLight': () => import('./icons/common/retryLight.svg'),
'common/rightArrow': () => import('./icons/common/rightArrow.svg'),
'common/rightArrowFill': () => import('./icons/common/rightArrowFill.svg'),
'common/rightArrowLight': () => import('./icons/common/rightArrowLight.svg'),
'common/rocket': () => import('./icons/common/rocket.svg'),
'common/routePushLight': () => import('./icons/common/routePushLight.svg'),
'common/running': () => import('./icons/common/running.svg'),
'common/saveFill': () => import('./icons/common/saveFill.svg'),
......@@ -115,7 +117,7 @@ export const iconPaths = {
'common/text/t': () => import('./icons/common/text/t.svg'),
'common/thirdParty': () => import('./icons/common/thirdParty.svg'),
'common/tickFill': () => import('./icons/common/tickFill.svg'),
'common/plugin': () => import('./icons/common/toolkit.svg'),
'common/toolkit': () => import('./icons/common/toolkit.svg'),
'common/trash': () => import('./icons/common/trash.svg'),
'common/upRightArrowLight': () => import('./icons/common/upRightArrowLight.svg'),
'common/uploadFileFill': () => import('./icons/common/uploadFileFill.svg'),
......@@ -131,10 +133,13 @@ export const iconPaths = {
'common/wecom': () => import('./icons/common/wecom.svg'),
configmap: () => import('./icons/configmap.svg'),
copy: () => import('./icons/copy.svg'),
'core/app/agent': () => import('./icons/core/app/agent.svg'),
'core/app/aiAgent': () => import('./icons/core/app/aiAgent.svg'),
'core/app/aiFill': () => import('./icons/core/app/aiFill.svg'),
'core/app/aiLight': () => import('./icons/core/app/aiLight.svg'),
'core/app/aiLightSmall': () => import('./icons/core/app/aiLightSmall.svg'),
'core/app/appApiLight': () => import('./icons/core/app/appApiLight.svg'),
'core/app/create': () => import('./icons/core/app/create.svg'),
'core/app/customFeedback': () => import('./icons/core/app/customFeedback.svg'),
'core/app/headphones': () => import('./icons/core/app/headphones.svg'),
'core/app/inputGuides': () => import('./icons/core/app/inputGuides.svg'),
......
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<path d="M6.43516 14.6379C5.14766 14.2761 4.09766 13.5683 3.28516 12.5144C2.47266 11.4605 2.06641 10.2472 2.06641 8.87441C2.06641 8.16334 2.18516 7.48644 2.42266 6.84373C2.66016 6.20101 2.99766 5.61169 3.43516 5.07576C3.57266 4.92606 3.74141 4.84797 3.94141 4.84148C4.14141 4.835 4.32266 4.91309 4.48516 5.07576C4.62266 5.21299 4.69466 5.3814 4.70116 5.581C4.70766 5.7806 4.64191 5.96773 4.50391 6.14238C4.20391 6.52911 3.97266 6.95326 3.81016 7.41483C3.64766 7.87641 3.56641 8.36294 3.56641 8.87441C3.56641 9.88489 3.86341 10.7863 4.45741 11.5788C5.05141 12.3712 5.81691 12.9106 6.75391 13.197C6.91641 13.2469 7.05066 13.3405 7.15666 13.4777C7.26266 13.6149 7.31591 13.7646 7.31641 13.9268C7.31641 14.1763 7.22891 14.3729 7.05391 14.5166C6.87891 14.6603 6.67266 14.7008 6.43516 14.6379ZM9.69766 14.6379C9.46016 14.7003 9.25391 14.6566 9.07891 14.5069C8.90391 14.3572 8.81641 14.1576 8.81641 13.9081C8.81641 13.7584 8.86966 13.6149 8.97616 13.4777C9.08266 13.3405 9.21691 13.2469 9.37891 13.197C10.3164 12.8976 11.0822 12.3549 11.6762 11.569C12.2702 10.7831 12.5669 9.88489 12.5664 8.87441C12.5664 7.62691 12.1289 6.56653 11.2539 5.69328C10.3789 4.82003 9.31641 4.3834 8.06641 4.3834H8.01016L8.31016 4.6828C8.44766 4.82003 8.51641 4.99468 8.51641 5.20675C8.51641 5.41883 8.44766 5.59348 8.31016 5.7307C8.17266 5.86793 7.99766 5.93654 7.78516 5.93654C7.57266 5.93654 7.39766 5.86793 7.26016 5.7307L5.68516 4.15885C5.61016 4.084 5.55716 4.00291 5.52616 3.91559C5.49516 3.82826 5.47941 3.7347 5.47891 3.6349C5.47891 3.5351 5.49466 3.44153 5.52616 3.35421C5.55766 3.26688 5.61066 3.1858 5.68516 3.11095L7.26016 1.53909C7.39766 1.40186 7.57266 1.33325 7.78516 1.33325C7.99766 1.33325 8.17266 1.40186 8.31016 1.53909C8.44766 1.67632 8.51641 1.85097 8.51641 2.06304C8.51641 2.27512 8.44766 2.44977 8.31016 2.58699L8.01016 2.88639H8.06641C9.74141 2.88639 11.1602 3.46648 12.3227 4.62666C13.4852 5.78684 14.0664 7.20276 14.0664 8.87441C14.0664 10.2342 13.6602 11.4443 12.8477 12.5047C12.0352 13.565 10.9852 14.2761 9.69766 14.6379Z" />
</svg>
\ No newline at end of file
<svg viewBox="0 0 12 12" >
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.5601 1.43999C10.2903 1.16967 9.81371 1.10289 9.45364 1.0532L9.3174 1.03611C8.75317 0.975457 8.18333 0.991271 7.62332 1.08312C6.22735 1.30964 4.56158 2.05277 3.27192 3.91941C3.12685 3.93345 2.97873 3.92826 2.83004 3.92304L2.81782 3.92262L2.70028 3.91888C2.50475 3.91353 2.31029 3.91674 2.1233 3.97016C1.7707 4.07167 1.53831 4.43335 1.37163 4.77099L1.29309 4.93661L1.19853 5.1503L1.13976 5.29669C0.995519 5.67493 0.894547 6.12957 1.19372 6.42821C1.31044 6.54518 1.46088 6.63384 1.62632 6.70668C1.80998 6.78755 2.01213 6.84894 2.20718 6.90796L2.35516 6.95337C2.41459 6.97136 2.47362 6.99067 2.53219 7.01126L2.53739 7.01309C2.56921 7.02432 2.60089 7.03594 2.63244 7.04793L2.66663 7.06182L2.62389 7.10296C2.61703 7.10981 2.61026 7.11679 2.60356 7.12389L2.60007 7.1276C2.42841 7.3112 2.30691 7.57232 2.22107 7.78946C2.198 7.84739 2.17563 7.90715 2.154 7.96803C2.08347 8.16652 2.02074 8.37691 1.96677 8.57479L1.91655 8.76712L1.85031 9.03959L1.76803 9.41249L1.72209 9.64274C1.71347 9.68929 1.71105 9.73659 1.71474 9.78343C1.71788 9.82321 1.72543 9.86265 1.73736 9.90104C1.76332 9.98462 1.80922 10.0606 1.87111 10.1225C1.933 10.1844 2.00901 10.2303 2.0926 10.2563C2.13306 10.2688 2.1747 10.2766 2.21666 10.2794C2.26139 10.2824 2.30649 10.2798 2.35089 10.2715L2.52345 10.2379L2.79965 10.1791L3.03045 10.1257L3.28528 10.0621L3.41831 10.0269C3.6447 9.96525 3.88704 9.8922 4.10961 9.80952C4.14176 9.79758 4.17349 9.78544 4.20471 9.7731C4.2313 9.7625 4.25857 9.75137 4.28627 9.73968C4.49458 9.65182 4.728 9.53242 4.89068 9.36975C4.92883 9.33153 4.96502 9.29141 4.99913 9.24954C5.03011 9.32968 5.05896 9.40928 5.08567 9.48728C5.09721 9.52383 5.10823 9.56053 5.11872 9.59738L5.11888 9.59795C5.14732 9.6979 5.17188 9.79892 5.19252 9.90078L5.21763 10.0114C5.24404 10.1264 5.2728 10.2416 5.31005 10.3514C5.3685 10.5237 5.44785 10.6827 5.57183 10.8063C5.91001 11.145 6.44959 10.9709 6.84921 10.801L7.0629 10.707L7.22852 10.6284C7.56669 10.4617 7.92838 10.2293 8.02988 9.87674C8.09504 9.64975 8.08651 9.4167 8.07796 9.1833L8.07262 9.03157C8.07048 8.93007 8.07102 8.82856 8.08117 8.72812C9.94727 7.43846 10.6904 5.7727 10.9169 4.37672C11.0318 3.66938 11.0142 3.03257 10.9468 2.54641L10.9169 2.34019C10.8662 2.01965 10.7812 1.66064 10.5601 1.43999ZM9.90077 2.49469C9.87921 2.35981 9.85706 2.26275 9.83255 2.19292C9.83014 2.18602 9.82785 2.17987 9.82574 2.17442C9.80977 2.16822 9.78749 2.16047 9.75759 2.1519C9.64214 2.11882 9.50597 2.09801 9.31935 2.07222L9.19888 2.0571C8.72948 2.00743 8.25551 2.02097 7.78968 2.09738L7.78795 2.09766C6.62727 2.286 5.22615 2.89904 4.11754 4.50364L3.84615 4.89645L3.37093 4.94244C3.15604 4.96323 2.94629 4.9557 2.80832 4.95074L2.78348 4.94985L2.67004 4.94624C2.56367 4.94339 2.49942 4.94563 2.45939 4.94947C2.41623 5.00139 2.36185 5.08781 2.29659 5.21921L2.22754 5.36482L2.14567 5.54984L2.0972 5.67059C2.0829 5.70845 2.07089 5.74304 2.06103 5.77454C3.63164 6.01918 4.61274 6.63139 5.22691 7.34254L5.22763 7.34165L5.24167 7.35972C5.36992 7.50999 5.48194 7.66456 5.57981 7.82091C6.08637 8.63012 6.19798 9.47007 6.25502 9.89931L6.25885 9.92812C6.3146 9.90925 6.37514 9.88557 6.44149 9.85747L6.63566 9.77204L6.78063 9.7033C6.91298 9.63769 6.99973 9.58304 7.05154 9.53979C7.05669 9.48812 7.05741 9.40016 7.05084 9.2209L7.05079 9.21947L7.04519 9.06047L7.04504 9.0532C7.0426 8.93729 7.04216 8.78712 7.05857 8.62477L7.1063 8.15247L7.49682 7.88259C9.10096 6.77397 9.71406 5.37269 9.90241 4.21198C9.99913 3.61632 9.98339 3.08421 9.92917 2.69043L9.90077 2.49469ZM4.11243 8.63464C4.1202 8.62816 4.12781 8.62157 4.13526 8.61486C4.22678 8.52339 4.28199 8.40181 4.29064 8.2727C4.29928 8.14359 4.26078 8.01573 4.18227 7.91287L4.13846 7.86265L4.12564 7.85036L4.07542 7.80762C3.99134 7.74539 3.89085 7.70918 3.7864 7.70348C3.68194 7.69779 3.57811 7.72285 3.48776 7.77557L3.42899 7.8151L3.37931 7.85944L3.31253 7.94385C3.23476 8.05631 3.17575 8.19288 3.12809 8.33688L3.12664 8.34126C3.08983 8.45313 3.05981 8.56937 3.03312 8.68218L2.97542 8.9322L2.94817 9.046L3.05021 9.02142L3.27353 8.97013C3.42049 8.93581 3.57507 8.89664 3.71943 8.84457L3.7262 8.84212C3.87184 8.78906 4.00674 8.72268 4.11243 8.63464ZM7.1083 6C7.7196 6 8.21515 5.50445 8.21515 4.89315C8.21515 4.28185 7.7196 3.7863 7.1083 3.7863C6.497 3.7863 6.00145 4.28185 6.00145 4.89315C6.00145 5.50445 6.497 6 7.1083 6Z" />
</svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 23 22" fill="none">
<path d="M18.5 21C18.5 21.5523 18.0523 22 17.5 22C16.9477 22 16.5 21.5523 16.5 21C16.5 20.4477 16.9477 20 17.5 20C18.0523 20 18.5 20.4477 18.5 21Z" fill="url(#paint0_linear_26760_132520)"/>
<path d="M22.5 17C22.5 17.5523 22.0523 18 21.5 18C20.9477 18 20.5 17.5523 20.5 17C20.5 16.4477 20.9477 16 21.5 16C22.0523 16 22.5 16.4477 22.5 17Z" fill="url(#paint1_linear_26760_132520)"/>
<path d="M2.5 5C2.5 5.55228 2.05228 6 1.5 6C0.947715 6 0.5 5.55228 0.5 5C0.5 4.44772 0.947715 4 1.5 4C2.05228 4 2.5 4.44772 2.5 5Z" fill="url(#paint2_linear_26760_132520)"/>
<path d="M6.5 1C6.5 1.55228 6.05228 2 5.5 2C4.94772 2 4.5 1.55228 4.5 1C4.5 0.447715 4.94772 0 5.5 0C6.05228 0 6.5 0.447715 6.5 1Z" fill="url(#paint3_linear_26760_132520)"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.5 5.48292L10.8478 8.17257C10.5871 9.24768 9.74768 10.0871 8.67257 10.3478L5.98292 11L8.67257 11.6522C9.74768 11.9129 10.5871 12.7523 10.8478 13.8274L11.5 16.5171L12.1522 13.8274C12.4129 12.7523 13.2523 11.9129 14.3274 11.6522L17.0171 11L14.3274 10.3478C13.2523 10.0871 12.4129 9.24768 12.1522 8.17257L11.5 5.48292ZM12.8052 4.02656C12.4733 2.65781 10.5267 2.65781 10.1948 4.02656L9.28151 7.79277C9.16301 8.28146 8.78146 8.66301 8.29277 8.78151L4.52656 9.69476C3.15781 10.0267 3.15781 11.9733 4.52656 12.3052L8.29277 13.2185C8.78146 13.337 9.16301 13.7185 9.28151 14.2072L10.1948 17.9734C10.5267 19.3422 12.4733 19.3422 12.8052 17.9734L13.7185 14.2072C13.837 13.7185 14.2185 13.337 14.7072 13.2185L18.4734 12.3052C19.8422 11.9733 19.8422 10.0267 18.4734 9.69476L14.7072 8.78151C14.2185 8.66301 13.837 8.28146 13.7185 7.79277L12.8052 4.02656Z" fill="url(#paint4_linear_26760_132520)"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.50462 21.3147C8.33081 21.7804 7.81241 22.017 7.34673 21.8432C4.3303 20.7173 1.90732 18.3801 0.669734 15.4228C0.477847 14.9643 0.694 14.4371 1.15252 14.2452C1.61105 14.0533 2.13831 14.2694 2.3302 14.728C3.3762 17.2274 5.42654 19.2052 7.97615 20.1568C8.44183 20.3306 8.67843 20.849 8.50462 21.3147Z" fill="url(#paint5_linear_26760_132520)"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M21.8153 8.02077C21.3498 8.19493 20.8312 7.95873 20.657 7.49319C19.6979 4.92954 17.6971 2.87072 15.1693 1.83251C14.7095 1.64366 14.4899 1.11784 14.6787 0.658056C14.8676 0.198271 15.3934 -0.0213681 15.8532 0.167478C18.8427 1.39533 21.2076 3.82798 22.3429 6.86246C22.5171 7.32801 22.2809 7.8466 21.8153 8.02077Z" fill="url(#paint6_linear_26760_132520)"/>
<defs>
<linearGradient id="paint0_linear_26760_132520" x1="4.21974e-07" y1="-2.5" x2="22" y2="24.5" gradientUnits="userSpaceOnUse">
<stop stop-color="#659BFF"/>
<stop offset="1" stop-color="#5E3EFF"/>
</linearGradient>
<linearGradient id="paint1_linear_26760_132520" x1="4.21974e-07" y1="-2.5" x2="22" y2="24.5" gradientUnits="userSpaceOnUse">
<stop stop-color="#659BFF"/>
<stop offset="1" stop-color="#5E3EFF"/>
</linearGradient>
<linearGradient id="paint2_linear_26760_132520" x1="4.21974e-07" y1="-2.5" x2="22" y2="24.5" gradientUnits="userSpaceOnUse">
<stop stop-color="#659BFF"/>
<stop offset="1" stop-color="#5E3EFF"/>
</linearGradient>
<linearGradient id="paint3_linear_26760_132520" x1="4.21974e-07" y1="-2.5" x2="22" y2="24.5" gradientUnits="userSpaceOnUse">
<stop stop-color="#659BFF"/>
<stop offset="1" stop-color="#5E3EFF"/>
</linearGradient>
<linearGradient id="paint4_linear_26760_132520" x1="4.21974e-07" y1="-2.5" x2="22" y2="24.5" gradientUnits="userSpaceOnUse">
<stop stop-color="#659BFF"/>
<stop offset="1" stop-color="#5E3EFF"/>
</linearGradient>
<linearGradient id="paint5_linear_26760_132520" x1="4.21974e-07" y1="-2.5" x2="22" y2="24.5" gradientUnits="userSpaceOnUse">
<stop stop-color="#659BFF"/>
<stop offset="1" stop-color="#5E3EFF"/>
</linearGradient>
<linearGradient id="paint6_linear_26760_132520" x1="4.21974e-07" y1="-2.5" x2="22" y2="24.5" gradientUnits="userSpaceOnUse">
<stop stop-color="#659BFF"/>
<stop offset="1" stop-color="#5E3EFF"/>
</linearGradient>
</defs>
</svg>
\ No newline at end of file
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_26760_132256)">
<g filter="url(#filter0_if_26760_132256)">
<circle cx="12.5" cy="12.5" r="16.5" fill="url(#paint0_radial_26760_132256)"/>
</g>
<g filter="url(#filter1_d_26760_132256)">
<path d="M10.2593 6.586C10.7078 5.2735 12.5213 5.23375 13.053 6.46675L13.098 6.58675L13.7033 8.35675C13.842 8.76267 14.0661 9.13413 14.3606 9.44607C14.6551 9.758 15.013 10.0032 15.4103 10.165L15.573 10.2257L17.343 10.8303C18.6555 11.2788 18.6953 13.0922 17.463 13.624L17.343 13.669L15.573 14.2743C15.167 14.4129 14.7954 14.637 14.4833 14.9314C14.1712 15.2259 13.926 15.5839 13.764 15.9813L13.7033 16.1432L13.0988 17.914C12.6503 19.2265 10.8368 19.2662 10.3058 18.034L10.2593 17.914L9.65478 16.144C9.51617 15.7379 9.29206 15.3663 8.99759 15.0543C8.70312 14.7422 8.34513 14.4969 7.94778 14.335L7.78578 14.2743L6.01578 13.6698C4.70253 13.2212 4.66278 11.4077 5.89578 10.8767L6.01578 10.8303L7.78578 10.2257C8.19171 10.087 8.56317 9.8629 8.8751 9.56843C9.18704 9.27396 9.43219 8.91602 9.59403 8.51875L9.65478 8.35675L10.2593 6.586ZM17.679 4C17.8193 4 17.9568 4.03936 18.0759 4.1136C18.195 4.18785 18.2908 4.294 18.3525 4.42L18.3885 4.50775L18.651 5.27725L19.4213 5.53975C19.5619 5.58752 19.6852 5.67596 19.7755 5.79386C19.8658 5.91176 19.919 6.05381 19.9285 6.20202C19.938 6.35022 19.9032 6.4979 19.8287 6.62634C19.7542 6.75478 19.6432 6.8582 19.5098 6.9235L19.4213 6.9595L18.6518 7.222L18.3893 7.99225C18.3414 8.13282 18.2529 8.25602 18.135 8.34624C18.017 8.43647 17.875 8.48964 17.7268 8.49904C17.5786 8.50844 17.4309 8.47363 17.3025 8.39903C17.1741 8.32443 17.0708 8.2134 17.0055 8.08L16.9695 7.99225L16.707 7.22275L15.9368 6.96025C15.7962 6.91248 15.6729 6.82404 15.5826 6.70614C15.4923 6.58824 15.4391 6.44619 15.4296 6.29798C15.4201 6.14978 15.4548 6.0021 15.5294 5.87366C15.6039 5.74522 15.7149 5.6418 15.8483 5.5765L15.9368 5.5405L16.7063 5.278L16.9688 4.50775C17.0194 4.35957 17.115 4.23093 17.2424 4.13987C17.3698 4.04882 17.5225 3.99991 17.679 4Z" fill="white"/>
</g>
</g>
<defs>
<filter id="filter0_if_26760_132256" x="-7" y="-7" width="39" height="39" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dx="1" dy="1"/>
<feGaussianBlur stdDeviation="0.4"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_26760_132256"/>
<feGaussianBlur stdDeviation="1.5" result="effect2_foregroundBlur_26760_132256"/>
</filter>
<filter id="filter1_d_26760_132256" x="-6" y="-7" width="36.9301" height="36.9292" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="5.5"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_26760_132256"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_26760_132256" result="shape"/>
</filter>
<radialGradient id="paint0_radial_26760_132256" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(23 0.499999) rotate(133.069) scale(31.4841)">
<stop stop-color="#FF00F0"/>
<stop offset="0.372517" stop-color="#DF8856"/>
<stop offset="0.453773" stop-color="#FACB66"/>
<stop offset="0.507813" stop-color="white"/>
<stop offset="0.61055" stop-color="#6CCF94"/>
<stop offset="0.678775" stop-color="#2397E5"/>
<stop offset="0.893417" stop-color="#2C009C"/>
</radialGradient>
<clipPath id="clip0_26760_132256">
<rect width="24" height="24" rx="4" fill="white"/>
</clipPath>
</defs>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 33 33" fill="none">
<path d="M13.9446 6.46076C14.2193 5.34828 15.8008 5.34828 16.0754 6.46076C17.2477 11.2094 20.9555 14.9171 25.7041 16.0893C26.8167 16.3639 26.8167 17.9455 25.7041 18.2201C20.9555 19.3924 17.2477 23.1 16.0754 27.8487C15.8008 28.9611 14.2193 28.9611 13.9446 27.8487C12.7723 23.1 9.06455 19.3924 4.31589 18.2201C3.20337 17.9455 3.20337 16.3639 4.31589 16.0893C9.06455 14.9171 12.7723 11.2094 13.9446 6.46076Z" fill="url(#paint0_linear_29084_178923)"/>
<path d="M25.654 1.74675C25.7652 1.29646 26.4053 1.29646 26.5165 1.74675C26.991 3.66882 28.4917 5.16953 30.4138 5.64401C30.8641 5.75517 30.8641 6.39533 30.4138 6.50649C28.4917 6.98097 26.991 8.48169 26.5165 10.4038C26.4053 10.854 25.7652 10.854 25.654 10.4038C25.1795 8.48169 23.6787 6.98097 21.7567 6.50649C21.3064 6.39533 21.3064 5.75518 21.7567 5.64401C23.6787 5.16953 25.1795 3.66882 25.654 1.74675Z" fill="url(#paint1_linear_29084_178923)"/>
<defs>
<linearGradient id="paint0_linear_29084_178923" x1="15.01" y1="2.14526" x2="15.01" y2="32.1642" gradientUnits="userSpaceOnUse">
<stop stop-color="#B38FFF"/>
<stop offset="1" stop-color="#6780FE"/>
</linearGradient>
<linearGradient id="paint1_linear_29084_178923" x1="26.0852" y1="0" x2="26.0852" y2="12.1505" gradientUnits="userSpaceOnUse">
<stop stop-color="#B38FFF"/>
<stop offset="1" stop-color="#6780FE"/>
</linearGradient>
</defs>
</svg>
\ No newline at end of file
<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="32" height="32" rx="5.9541" fill="url(#paint0_linear_5533_28322)" />
<path
d="M15.1466 6.22388C15.593 5.96615 16.3168 5.96615 16.7632 6.22388L23.5846 10.1622C24.4774 10.6776 24.4774 11.5134 23.5846 12.0288L16.853 15.9153C16.4066 16.1731 15.6828 16.1731 15.2364 15.9153L8.41507 11.977C7.52225 11.4616 7.52225 10.6258 8.41506 10.1104L15.1466 6.22388Z"
fill="white" />
<path
d="M7.18506 14.3387C7.18506 13.617 7.6917 13.3245 8.31667 13.6853L14.6222 17.3258C14.9793 17.532 15.2688 18.0335 15.2688 18.4458V25.1119C15.2688 25.8336 14.7622 26.1261 14.1372 25.7653L7.83169 22.1248C7.47457 21.9186 7.18506 21.4172 7.18506 21.0048V14.3387Z"
fill="white" />
<path
d="M16.7302 18.4962C16.7302 18.0838 17.0197 17.5823 17.3768 17.3762L23.6833 13.7351C24.3083 13.3742 24.8149 13.6668 24.8149 14.3884V21.0537C24.8149 21.4661 24.5254 21.9675 24.1683 22.1737L17.8618 25.8148C17.2368 26.1756 16.7302 25.8831 16.7302 25.1614V18.4962Z"
fill="white" />
<defs>
<linearGradient id="paint0_linear_5533_28322" x1="16" y1="0" x2="4.88889" y2="29.3333"
gradientUnits="userSpaceOnUse">
<stop stop-color="#67BFFF" />
<stop offset="1" stop-color="#5BA6FF" />
</linearGradient>
</defs>
</svg>
\ No newline at end of file
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="24" height="24" rx="4" fill="url(#paint0_linear_28962_6379)"/>
<path d="M11.3599 4.66817C11.6947 4.47487 12.2375 4.47487 12.5723 4.66817L17.6883 7.62189C18.3579 8.00849 18.3579 8.6353 17.6883 9.0219L12.6396 11.9368C12.3048 12.1301 11.762 12.1301 11.4272 11.9368L6.31118 8.98302C5.64157 8.59643 5.64157 7.96962 6.31118 7.58302L11.3599 4.66817Z" fill="white"/>
<path d="M5.38867 10.7543C5.38867 10.213 5.76865 9.99365 6.23738 10.2643L10.9665 12.9946C11.2344 13.1493 11.4515 13.5254 11.4515 13.8346V18.8342C11.4515 19.3755 11.0715 19.5948 10.6028 19.3242L5.87365 16.5938C5.6058 16.4392 5.38867 16.0631 5.38867 15.7538V10.7543Z" fill="white"/>
<path d="M12.5475 13.8724C12.5475 13.5631 12.7646 13.187 13.0325 13.0324L17.7624 10.3016C18.2311 10.0309 18.6111 10.2503 18.6111 10.7916V15.7905C18.6111 16.0998 18.3939 16.4759 18.1261 16.6305L13.3962 19.3613C12.9275 19.632 12.5475 19.4126 12.5475 18.8713V13.8724Z" fill="white"/>
<defs>
<linearGradient id="paint0_linear_28962_6379" x1="12" y1="0" x2="3.66667" y2="22" gradientUnits="userSpaceOnUse">
<stop stop-color="#67BFFF"/>
<stop offset="1" stop-color="#5BA6FF"/>
</linearGradient>
</defs>
</svg>
......@@ -38,7 +38,7 @@ const options = {
horizontalScrollbarSize: 8,
alwaysConsumeMouseWheel: false
},
lineNumbersMinChars: 0,
lineNumbersMinChars: 4,
fontSize: 14,
scrollBeyondLastLine: false,
folding: true,
......@@ -129,7 +129,6 @@ const MyEditor = ({
py={1}
height={height}
position={'relative'}
pl={2}
{...props}
>
<Editor
......
......@@ -91,7 +91,7 @@ const ToolTagFilterBox = ({
>
{t('common:All')}
</Box>
<Box mx={2} h={'20px'} w={'1px'} bg={'myGray.200'} />
<Box mx={2} h={'20px'} w={'1px'} bg={'myGray.200'} flexShrink={0} />
<Box flex={1}>
<Flex gap={2} flexWrap="nowrap">
{tags.map((tag) => {
......
......@@ -12,6 +12,7 @@
"custom_model": "custom model",
"default_model": "Default model",
"default_model_config": "Default model configuration",
"language": "Language and time zone",
"logout": "Sign out",
"model.active": "Active",
"model.alias": "Alias",
......
......@@ -51,18 +51,21 @@
"app.version_past": "Previously Published",
"app.version_publish_tips": "This version will be saved to the team cloud, synchronized with the entire team, and update the app version on all release channels.",
"app_detail": "Application Details",
"app_name_placeholder": "Enter app name",
"apply_code": "Apply",
"apply_code_failed": "Failed to apply code",
"auto_execute": "Automatic execution",
"auto_execute_default_prompt_placeholder": "Default questions sent when executing automatically",
"auto_execute_tip": "After turning it on, the workflow will be automatically triggered when the user enters the conversation interface. \nExecution order: 1. Dialogue starter; 2. Global variables; 3. Automatic execution.",
"auto_save": "Auto save",
"change_app_type": "Change App Type",
"chat_debug": "Chat Preview",
"chat_logs": "Logs",
"chat_logs_tips": "Logs will record the online, shared, and API (requires chatId) conversation records of this app.",
"click_to_config": "Go to configuration",
"code_applied_successfully": "Code applied successfully",
"code_function_describe": "Describe your code function, enter \"/\" to select the variable",
"collapse_tool_create": "close",
"config_ai_model_params": "Click to configure AI model related properties",
"config_file_upload": "Click to Configure File Upload Rules",
"config_question_guide": "Configuration guess you want to ask",
......@@ -78,16 +81,20 @@
"core.module.template.System Tools": "System Tools",
"core.workflow.Copilot": "AI Generation",
"create_by_curl": "By CURL",
"create_by_template": "By template",
"create_by_template": "Create by template",
"create_copy_success": "Duplicate Created Successfully",
"create_empty_app": "Create Default App",
"create_empty_plugin": "Create Default Plugin",
"create_empty_workflow": "Create Default Workflow",
"create_from_template": "Create from template",
"create_http_toolset": "Create HTTP Toolset",
"create_your_first_agent": "Create your first Agent",
"create_your_first_tool": "Create your first tool",
"cron.every_day": "Run Daily",
"cron.every_month": "Run Monthly",
"cron.every_week": "Run Weekly",
"cron.interval": "Run at Intervals",
"current_package": "Current package: ",
"custom_plugin": "Custom Plugin",
"custom_plugin_associated_plugin_label": "Associated Plugin",
"custom_plugin_associated_plugin_placeholder": "Enter plugin name or appId to search",
......@@ -130,6 +137,7 @@
"edit_info": "Edit",
"empty_tool_tips": "Please add tools on the left side",
"execute_time": "Execution Time",
"expand_tool_create": "Expand MCP/Http create",
"export_config_successful": "Configuration copied, some sensitive information automatically filtered. Please check for any remaining sensitive data.",
"export_configs": "Export",
"fastgpt_marketplace": "FastGPT plug-in market",
......@@ -142,6 +150,8 @@
"find_more_tools": "Explore more",
"go_to_chat": "Go to Conversation",
"go_to_run": "Go to Execution",
"has_no_create_per": "You do not have permission to create in the current directory.",
"hide_templates": "Collapse",
"http_toolset_add_tips": "Click the \"Add\" button to add tools",
"http_toolset_config_tips": "Click \"Start Configuration\" to add tools",
"image": "picture",
......@@ -259,6 +269,7 @@
"plugin_cost_by_token": "Charged based on token usage",
"plugin_cost_folder_tip": "This tool set contains subordinate tools, and the call points are determined based on the actual calling tool",
"plugin_cost_per_times": "{{cost}} points/time",
"plugin_db": "Plugins",
"plugin_dispatch": "Plugin Invocation",
"plugin_dispatch_tip": "Adds extra capabilities to the model. The specific plugins to be invoked will be autonomously decided by the model.\nIf a plugin is selected, the Dataset invocation will automatically be treated as a special plugin.",
"plugin_offline_tips": "Your system does not have direct access to plugin market data,\n\nPlease manually copy the URL and go to get more plugins",
......@@ -274,16 +285,22 @@
"publish_success": "Publish Successful",
"question_guide_tip": "After the conversation, 3 guiding questions will be generated for you.",
"reasoning_response": "Output thinking",
"recharge": "Go to recharge",
"reference_variable": "Reference variables",
"refresh_templates": "Refresh",
"remaining_points": "Reaming points: ",
"request_headers": "Request header",
"response_format": "Response format",
"save_team_app_log_keys": "Save as team configuration",
"saved_success": "Saved successfully! \nTo use this version externally, click Save and Publish",
"search_agent": "Search Agent",
"search_app": "Search apps",
"search_tool": "Search Tools",
"secret_get_course": "Course",
"select_app_type": "Select App Type",
"setting_app": "Workflow",
"setting_plugin": "Workflow",
"show_templates": "Expand",
"show_top_p_tip": "An alternative method of temperature sampling, called Nucleus sampling, the model considers the results of tokens with TOP_P probability mass quality. \nTherefore, 0.1 means that only tokens containing the highest probability quality are considered. \nThe default is 1.",
"simple_tool_tips": "This plugin contains special inputs and is not currently supported for invocation by simple applications.",
"source_updateTime": "Update time",
......@@ -326,6 +343,9 @@
"time_type": "Time Type",
"time_zone": "Time Zone",
"too_to_active": "Active",
"toolType_http": "HTTP tools",
"toolType_mcp": "MCP tools",
"toolType_workflow": "Workflow tools",
"tool_active_manual_config_desc": "The temporary key is saved in this application and is only for use by this application.",
"tool_active_system_config_desc": "Use the system configured key",
"tool_active_system_config_price_desc": "Additional payment for key price ({{price}} points/time)",
......@@ -339,7 +359,6 @@
"tool_soon_offset_tips": "This tool will be offline in the future. For the sake of your business stability, please replace it as soon as possible.",
"tool_tip": "When executed as a tool, is this field used as a tool response result?",
"tool_type_tools": "tool",
"plugin_db": "Plugins",
"toolkit_activation_label": "Key Activation",
"toolkit_activation_not_required": "No Activation",
"toolkit_activation_required": "Activation Required",
......@@ -411,6 +430,7 @@
"tts_browser": "Browser's own (free)",
"tts_close": "Close",
"type.All": "All",
"type.Chat_Agent": "Dialogue Agent",
"type.Create http plugin tip": "Batch create plugins through OpenAPI Schema, compatible with GPTs format.",
"type.Create mcp tools tip": "Automatically parse and batch create callable MCP tools by entering the MCP address",
"type.Create one plugin tip": "Customizable input and output workflows, usually used to encapsulate reusable workflows.",
......@@ -441,8 +461,17 @@
"type.error.Workflow data is empty": "No workflow data was obtained",
"type.error.workflowresponseempty": "Response content is empty",
"type.hidden": "Hide app",
"type_http_tool_set_intro": "Batch import API tool",
"type_mcp_intro": "Connect to MCP service",
"type_not_recognized": "App type not recognized",
"type_plugin_description": "Output the specified results with one click.",
"type_plugin_intro": "Commonly used to encapsulate workflow",
"type_simple_description": "The most basic conversation application, no complicated configuration is required, and it can be created and used quickly.",
"type_simple_intro": "Quickly create conversation agents",
"type_workflow_description": "Memory-enabled complex multi-turn conversational workflows.",
"type_workflow_intro": "Drag and drop arrangement and multiple rounds of dialogue",
"un_auth": "No permission",
"unnamed_app": "Unnamed",
"upload_file_exists_filtered": "Duplicate files have been automatically filtered.",
"upload_file_extension_type_canSelectAudio": "Audio",
"upload_file_extension_type_canSelectCustomFileExtension": "Custom file extension type",
......@@ -455,6 +484,7 @@
"upload_file_max_amount_tip": "Maximum number of files uploaded in a single round of conversation",
"upload_method": "Upload method",
"url_upload": "File link",
"used_points": "Used point: ",
"variable.internal_type_desc": "Use only inside the workflow and will not appear in the dialog box",
"variable.select type_desc": "The input box will be displayed in the site conversation and run preview, and this variable will not be displayed in the sharing link.",
"variable.textarea_type_desc": "Allows users to input up to 4000 characters in the dialogue box.",
......
......@@ -4,6 +4,7 @@
"LLM_model_response_empty": "The model flow response is empty, please check whether the model flow output is normal.",
"ai_reasoning": "Thinking process",
"back_to_text": "Text input",
"balance_not_enough_pause": "Workflow paused due to insufficient AI points",
"chat.quote.No Data": "The file cannot be found",
"chat.quote.deleted": "This data has been deleted ~",
"chat.waiting_for_response": "Please wait for the conversation to complete",
......@@ -11,6 +12,7 @@
"chat_input_guide_lexicon_is_empty": "Lexicon not configured yet",
"chat_test_app": "Debug-{{name}}",
"citations": "{{num}} References",
"clear_input_value": "Clear input",
"click_contextual_preview": "Click to see contextual preview",
"click_to_add_url": "Click to add link",
"completion_finish_close": "Disconnection",
......@@ -24,10 +26,12 @@
"config_input_guide": "Set Up Input Guide",
"config_input_guide_lexicon": "Set Up Lexicon",
"config_input_guide_lexicon_title": "Set Up Lexicon",
"confirm_clear_input_value": "Are you sure to clear the form content? \nDefault values ​​will be restored!",
"confirm_to_clear_share_chat_history": "Are you sure you want to clear all chat history?",
"content_empty": "No Content",
"contextual": "{{num}} Contexts",
"contextual_preview": "Contextual Preview {{num}} Items",
"continue_run": "continue running",
"core.chat.moveCancel": "Swipe to Cancel",
"core.chat.shortSpeak": "Speaking Time is Too Short",
"csv_input_lexicon_tip": "Only CSV batch import is supported, click to download the template",
......@@ -161,6 +165,7 @@
"source_cronJob": "Scheduled execution",
"start_chat": "Start",
"stream_output": "Stream Output",
"task_has_continued": "Task has continued running",
"unsupported_file_type": "Unsupported file types",
"upload": "Upload",
"variable_invisable_in_share": "External variables are not visible in login-free links",
......
......@@ -13,6 +13,7 @@
"Confirm": "Confirm",
"Continue_Adding": "Continue adding",
"Copy": "Copy",
"Create": "create",
"Creating": "Creating",
"Delete": "Delete",
"Detail": "Detail",
......@@ -99,7 +100,9 @@
"all_quotes": "All quotes",
"all_result": "Full Results",
"app_evaluation": "App Evaluation(Beta)",
"app_icon_and_name": "icon",
"app_not_version": "This application has not been published, please publish it first",
"app_type": "Application Type",
"auth_config": "Authentication",
"auth_type": "Authentication type",
"auth_type.Custom": "Customize",
......@@ -754,6 +757,7 @@
"core.workflow.tool.Select Tool": "Select Tool",
"core.workflow.variable": "Variable",
"create": "Create",
"create_app": "Create an application",
"create_failed": "Create failed",
"create_success": "Created Successfully",
"create_time": "Creation Time",
......@@ -919,8 +923,8 @@
"name": "name",
"name_is_empty": "Name Cannot Be Empty",
"navbar.Account": "Account",
"navbar.Chat": "Chat",
"navbar.Config": "administrator",
"navbar.Chat": "portal",
"navbar.Config": "admini",
"navbar.Datasets": "Dataset",
"navbar.Studio": "Studio",
"navbar.Toolkit": "Toolkit",
......
......@@ -17,6 +17,7 @@
"bill.valid_time": "Effective Time",
"bill.you_can_convert": "You can convert",
"bill.yuan": "Yuan",
"current_package": "Current package: ",
"delete.admin_failed": "Failed to Delete Admin",
"delete.admin_success": "Admin Deleted Successfully",
"delete.failed": "Delete failed",
......@@ -87,6 +88,7 @@
"team.add_writer": "Add writable members",
"team.avatar_and_name": "avatar",
"team.belong_to_group": "Member group",
"team.collaborator.added": "Added",
"team.group.avatar": "Group avatar",
"team.group.create": "Create group",
"team.group.create_failed": "Failed to create group",
......@@ -110,6 +112,5 @@
"team.manage_collaborators": "Manage Collaborators",
"team.no_collaborators": "No Collaborators",
"team.org.org": "Organization",
"team.write_role_member": "Write Permission",
"team.collaborator.added": "Added"
"team.write_role_member": "Write Permission"
}
......@@ -12,6 +12,7 @@
"custom_model": "自定义模型",
"default_model": "预设模型",
"default_model_config": "默认模型配置",
"language": "语言与时区",
"logout": "登出",
"model.active": "启用",
"model.alias": "别名",
......
......@@ -53,18 +53,21 @@
"app.version_past": "发布过",
"app.version_publish_tips": "该版本将被保存至团队云端,同步给整个团队,同时更新所有发布渠道的应用版本",
"app_detail": "应用详情",
"app_name_placeholder": "请输入应用名称",
"apply_code": "应用",
"apply_code_failed": "应用代码失败",
"auto_execute": "自动执行",
"auto_execute_default_prompt_placeholder": "自动执行时,发送的默认问题",
"auto_execute_tip": "开启后,用户进入对话界面将自动触发工作流。执行顺序:1、对话开场白;2、全局变量;3、自动执行。",
"auto_save": "自动保存",
"change_app_type": "更改应用类型",
"chat_debug": "调试预览",
"chat_logs": "对话日志",
"chat_logs_tips": "日志会记录该应用的在线、分享和 API(需填写 chatId)对话记录",
"click_to_config": "去配置",
"code_applied_successfully": "代码应用成功",
"code_function_describe": "描述你的代码功能,输入“/”可选择变量",
"collapse_tool_create": "收起",
"config_ai_model_params": "点击配置 AI 模型相关属性",
"config_file_upload": "点击配置文件上传规则",
"config_question_guide": "配置猜你想问",
......@@ -80,16 +83,20 @@
"core.module.template.System Tools": "系统工具",
"core.workflow.Copilot": "AI 生成",
"create_by_curl": "从 CURL 创建",
"create_by_template": "从模板选择",
"create_by_template": "从模板创建",
"create_copy_success": "创建副本成功",
"create_empty_app": "创建空白应用",
"create_empty_plugin": "创建空白插件",
"create_empty_workflow": "创建空白工作流",
"create_from_template": "从模板新建",
"create_http_toolset": "创建 HTTP 工具集",
"create_your_first_agent": "创建你的第一个 Agent",
"create_your_first_tool": "创建你的第一个工具",
"cron.every_day": "每天执行",
"cron.every_month": "每月执行",
"cron.every_week": "每周执行",
"cron.interval": "间隔执行",
"current_package": "当前套餐:",
"custom_plugin": "自定义插件",
"custom_plugin_associated_plugin_label": "关联插件",
"custom_plugin_associated_plugin_placeholder": "输入插件名或 appId 查找插件",
......@@ -134,6 +141,7 @@
"edit_param": "编辑参数",
"empty_tool_tips": "请在左侧添加工具",
"execute_time": "执行时间",
"expand_tool_create": "展开MCP、Http创建",
"export_config_successful": "已复制配置,自动过滤部分敏感信息,请注意检查是否仍有敏感数据",
"export_configs": "导出配置",
"fastgpt_marketplace": "FastGPT 插件市场",
......@@ -146,6 +154,8 @@
"find_more_tools": "探索更多",
"go_to_chat": "去对话",
"go_to_run": "去运行",
"has_no_create_per": "当前目录您无新建权限",
"hide_templates": "隐藏模板",
"http_toolset_add_tips": "点击添加按钮来添加工具",
"http_toolset_config_tips": "点击开始配置来添加工具",
"image": "图片",
......@@ -268,6 +278,7 @@
"permission.des.write": "可查看和编辑应用",
"permission.name.read": "仅对话",
"permission.name.readChatLog": "查看对话日志",
"plugin": "资源库",
"plugin.Instructions": "使用说明",
"plugin_cost_by_token": "依据 token 消耗计费",
"plugin_cost_folder_tip": "该工具集包含下属工具,调用积分依据实际调用工具决定",
......@@ -287,16 +298,22 @@
"publish_success": "发布成功",
"question_guide_tip": "对话结束后,会为你生成 3 个引导性问题。",
"reasoning_response": "输出思考",
"recharge": "去充值",
"reference_variable": "引用变量",
"refresh_templates": "换一批",
"remaining_points": "剩余积分:",
"request_headers": "请求头",
"response_format": "回复格式",
"save_team_app_log_keys": "保存为团队配置",
"saved_success": "保存成功!如需在外部使用该版本,请点击“保存并发布”",
"search_agent": "搜索 Agent",
"search_app": "搜索应用",
"search_tool": "搜索工具",
"secret_get_course": "教程",
"select_app_type": "选择应用类型",
"setting_app": "应用配置",
"setting_plugin": "插件配置",
"show_templates": "显示模板",
"show_top_p_tip": "用温度采样的替代方法,称为Nucleus采样,该模型考虑了具有TOP_P概率质量质量的令牌的结果。因此,0.1表示仅考虑包含最高概率质量的令牌。默认为 1。",
"simple_tool_tips": "该插件含有特殊输入,暂不支持被简易应用调用",
"source_updateTime": "更新时间",
......@@ -343,6 +360,9 @@
"time_type": "时间类型",
"time_zone": "时区",
"too_to_active": "去激活",
"toolType_http": "HTTP 工具",
"toolType_mcp": "MCP 工具",
"toolType_workflow": "工作流工具",
"tool_active_manual_config_desc": "临时密钥保存在本应用中,仅供该应用使用",
"tool_active_system_config_desc": "使用系统已配置好的密钥",
"tool_active_system_config_price_desc": "需额外支付密钥价格( {{price}} 积分/次)",
......@@ -356,7 +376,6 @@
"tool_soon_offset_tips": "该工具将在后续下线,为了您的业务稳定,请尽快替换",
"tool_tip": "作为工具执行时,该字段是否作为工具响应结果",
"tool_type_tools": "工具",
"plugin": "资源库",
"toolkit_activation_label": "密钥激活",
"toolkit_activation_not_required": "免激活",
"toolkit_activation_required": "需要激活",
......@@ -428,6 +447,7 @@
"tts_browser": "浏览器自带(免费)",
"tts_close": "关闭",
"type.All": "全部",
"type.Chat_Agent": "对话 Agent",
"type.Create http plugin tip": "通过 OpenAPI Schema 批量创建工具(兼容GPTs)、通过curl或手动创建工具",
"type.Create http toolset tip": "通过 OpenAPI Schema 批量创建工具(兼容GPTs)",
"type.Create mcp tools tip": "通过输入 MCP 地址,自动解析并批量创建可调用的 MCP 工具",
......@@ -459,8 +479,18 @@
"type.error.Workflow data is empty": "没有获取到工作流数据",
"type.error.workflowresponseempty": "响应内容为空",
"type.hidden": "隐藏应用",
"type_http_tool_set_intro": "批量导入 API 工具",
"type_mcp_intro": "连接 MCP 服务",
"type_not_recognized": "未识别到应用类型",
"type_plugin_description": "一键输出指定结果。",
"type_plugin_intro": "常用于封装工作流",
"type_simple_description": "最基础的对话应用,无需复杂配置,快速创建和使用。",
"type_simple_intro": "快速创建对话 Agent",
"type_workflow_description": "支持记忆的复杂多轮对话工作流。",
"type_workflow_intro": "拖拽编排与多轮对话",
"un_auth": "无权限",
"unnamed_app": "未命名",
"upgrade": "去升级",
"upload_file_exists_filtered": "已自动过滤重复文件",
"upload_file_extension_type_canSelectAudio": "音频",
"upload_file_extension_type_canSelectCustomFileExtension": "自定义文件扩展类型",
......@@ -473,6 +503,7 @@
"upload_file_max_amount_tip": "单轮对话中最大上传文件数量",
"upload_method": "上传方式",
"url_upload": "文件链接",
"used_points": "积分用量:",
"variable.internal_type_desc": "仅在工作流内部使用,不会出现在对话框中",
"variable.select type_desc": "会在站内对话和运行预览中显示输入框,在分享链接中不会显示此变量",
"variable.textarea_type_desc": "允许用户最多输入4000字的对话框。",
......
......@@ -4,6 +4,7 @@
"LLM_model_response_empty": "模型流响应为空,请检查模型流输出是否正常",
"ai_reasoning": "思考过程",
"back_to_text": "返回输入",
"balance_not_enough_pause": "由于 AI 积分不足,暂停运行工作流",
"chat.quote.No Data": "找不到该文件",
"chat.quote.deleted": "该数据已被删除~",
"chat.waiting_for_response": "请等待对话完成",
......@@ -11,6 +12,7 @@
"chat_input_guide_lexicon_is_empty": "还没有配置词库",
"chat_test_app": "调试-{{name}}",
"citations": "{{num}}条引用",
"clear_input_value": "清空输入",
"click_contextual_preview": "点击查看上下文预览",
"click_to_add_url": "点击添加链接",
"completion_finish_close": "连接断开",
......@@ -24,10 +26,12 @@
"config_input_guide": "配置输入引导",
"config_input_guide_lexicon": "配置词库",
"config_input_guide_lexicon_title": "配置词库",
"confirm_clear_input_value": "确认清空表单内容?将会恢复默认值!",
"confirm_to_clear_share_chat_history": "确认清空所有聊天记录?",
"content_empty": "内容为空",
"contextual": "{{num}}条上下文",
"contextual_preview": "上下文预览 {{num}} 条",
"continue_run": "继续运行",
"core.chat.moveCancel": "上滑取消",
"core.chat.shortSpeak": "说话时间太短",
"csv_input_lexicon_tip": "仅支持 CSV 批量导入,点击下载模板",
......@@ -164,6 +168,7 @@
"source_cronJob": "定时执行",
"start_chat": "开始对话",
"stream_output": "流输出",
"task_has_continued": "任务已继续运行",
"unsupported_file_type": "不支持的文件类型",
"upload": "上传",
"variable_invisable_in_share": "外部变量在免登录链接中不可见",
......
......@@ -13,6 +13,7 @@
"Confirm": "确认",
"Continue_Adding": "继续添加",
"Copy": "复制",
"Create": "创建",
"Creating": "创建中",
"Delete": "删除",
"Detail": "详情",
......@@ -98,8 +99,10 @@
"add_success": "添加成功",
"all_quotes": "全部引用",
"all_result": "完整结果",
"app_evaluation": "应用评测(Beta)",
"app_evaluation": "Agent 评测(Beta)",
"app_icon_and_name": "图标 & 名称",
"app_not_version": " 该应用未发布过,请先发布应用",
"app_type": "应用类型",
"auth_config": "鉴权配置",
"auth_type": "鉴权类型",
"auth_type.Custom": "自定义",
......@@ -671,6 +674,7 @@
"core.module.template.ai_chat_intro": "AI 大模型对话",
"core.module.template.all_team_app": "全部",
"core.module.template.config_params": "可以配置应用的系统参数",
"core.module.template.empty_agent": "空白 Agent",
"core.module.template.empty_plugin": "空白插件",
"core.module.template.empty_workflow": "空白工作流",
"core.module.template.self_input": "插件输入",
......@@ -756,6 +760,7 @@
"core.workflow.tool.Select Tool": "选择工具",
"core.workflow.variable": "变量",
"create": "去创建",
"create_app": "创建应用",
"create_failed": "创建失败",
"create_success": "创建成功",
"create_time": "创建时间",
......@@ -921,12 +926,12 @@
"name": "名称",
"name_is_empty": "名称不能为空",
"navbar.Account": "账号",
"navbar.Chat": "聊天",
"navbar.Chat": "门户",
"navbar.Config": "管理员",
"navbar.Datasets": "知识库",
"navbar.Studio": "工作台",
"navbar.Toolkit": "工具箱",
"navbar.Tools": "工具",
"navbar.Tools": "我的工具",
"navbar.plugin": "插件库",
"new_create": "新建",
"next_step": "下一步",
......
......@@ -17,6 +17,8 @@
"bill.valid_time": "生效时间",
"bill.you_can_convert": "您可兑换",
"bill.yuan": "元",
"common.current_package": "当前套餐",
"current_package": "当前套餐:",
"delete.admin_failed": "删除管理员失败",
"delete.admin_success": "删除管理员成功",
"delete.failed": "删除失败",
......
......@@ -12,6 +12,7 @@
"custom_model": "自訂模型",
"default_model": "預設模型",
"default_model_config": "預設模型設定",
"language": "語言與時區",
"logout": "登出",
"model.active": "啟用",
"model.alias": "別名",
......
......@@ -51,18 +51,21 @@
"app.version_past": "已發布過",
"app.version_publish_tips": "此版本將儲存至團隊雲端,同步給整個團隊,同時更新所有發布通道的應用程式版本",
"app_detail": "應用程式詳細資訊",
"app_name_placeholder": "請輸入應用名稱",
"apply_code": "應用",
"apply_code_failed": "應用代碼失敗",
"auto_execute": "自動執行",
"auto_execute_default_prompt_placeholder": "自動執行時,傳送的預設問題",
"auto_execute_tip": "開啟後,使用者進入對話式介面將自動觸發工作流程。\n執行順序:1、對話開場白;2、全域變數;3、自動執行。",
"auto_save": "自動儲存",
"change_app_type": "更改應用程式類型",
"chat_debug": "聊天預覽",
"chat_logs": "對話紀錄",
"chat_logs_tips": "紀錄會記錄此應用程式的線上、分享和 API(需填寫 chatId)對話紀錄",
"click_to_config": "去配置",
"code_applied_successfully": "代碼應用成功",
"code_function_describe": "描述你的代碼功能,輸入“/”可選擇變量",
"collapse_tool_create": "收起",
"config_ai_model_params": "點選設定 AI 模型相關屬性",
"config_file_upload": "點選設定檔案上傳規則",
"config_question_guide": "設定猜你想問",
......@@ -83,11 +86,14 @@
"create_empty_app": "建立空白應用程式",
"create_empty_plugin": "建立空白外掛",
"create_empty_workflow": "建立空白工作流程",
"create_from_template": "從模板新建",
"create_http_toolset": "創建 HTTP 工具集",
"create_your_first_agent": "創建你的第一個 Agent",
"cron.every_day": "每天執行",
"cron.every_month": "每月執行",
"cron.every_week": "每週執行",
"cron.interval": "間隔執行",
"current_package": "當前套餐:",
"custom_plugin": "自訂外掛",
"custom_plugin_associated_plugin_label": "關聯外掛",
"custom_plugin_associated_plugin_placeholder": "輸入外掛名稱或 appId 尋找外掛",
......@@ -130,6 +136,7 @@
"edit_info": "編輯資訊",
"empty_tool_tips": "請在左側添加工具",
"execute_time": "執行時間",
"expand_tool_create": "展開 MCP、Http 創建",
"export_config_successful": "已複製設定,自動過濾部分敏感資訊,請注意檢查是否仍有敏感資料",
"export_configs": "匯出設定",
"fastgpt_marketplace": "FastGPT 插件市場",
......@@ -142,6 +149,8 @@
"find_more_tools": "探索更多",
"go_to_chat": "前往對話",
"go_to_run": "前往執行",
"has_no_create_per": "當前目錄您無新建權限",
"hide_templates": "隱藏模板",
"http_toolset_add_tips": "點擊添加按鈕來添加工具",
"http_toolset_config_tips": "點擊開始配置來添加工具",
"image": "圖片",
......@@ -259,6 +268,7 @@
"plugin_cost_by_token": "根據 token 消耗計費",
"plugin_cost_folder_tip": "該工具集包含下屬工具,調用積分依據實際調用工具決定",
"plugin_cost_per_times": "{{cost}} 積分/次",
"plugin_db": "資源庫",
"plugin_dispatch": "外掛呼叫",
"plugin_dispatch_tip": "賦予模型取得外部資料的能力,具體呼叫哪些外掛,將由模型自主決定,所有外掛都將以非串流模式執行。\n若選擇了外掛,知識庫呼叫將自動作為一個特殊的外掛。",
"plugin_offline_tips": "您的系統無法直接訪問插件市場數據,\n請手動複製網址並前往,以獲得更多插件",
......@@ -274,16 +284,22 @@
"publish_success": "發布成功",
"question_guide_tip": "對話結束後,會為你產生 3 個引導性問題。",
"reasoning_response": "輸出思考",
"recharge": "去充值",
"reference_variable": "引用變量",
"refresh_templates": "換一批",
"remaining_points": "剩餘積分:",
"request_headers": "請求頭",
"response_format": "回覆格式",
"save_team_app_log_keys": "保存為團隊配置",
"saved_success": "儲存成功!\n如需在外部使用該版本,請點選“儲存並發布”",
"search_agent": "搜索 Agent",
"search_app": "搜尋應用程式",
"search_tool": "搜索工具",
"secret_get_course": "教程",
"select_app_type": "選擇應用程式類型",
"setting_app": "應用程式設定",
"setting_plugin": "外掛設定",
"show_templates": "顯示模板",
"show_top_p_tip": "用溫度取樣的替代方法,稱為 Nucleus 取樣,該模型考慮了具有 TOP_P 機率質量質量的令牌的結果。\n因此,0.1 表示僅考慮包含最高機率質量的令牌。\n預設為 1。",
"simple_tool_tips": "該外掛含有特殊輸入,暫不支援被簡易應用呼叫",
"source_updateTime": "更新時間",
......@@ -326,6 +342,9 @@
"time_type": "時間類型",
"time_zone": "時區",
"too_to_active": "去激活",
"toolType_http": "HTTP 工具",
"toolType_mcp": "MCP 工具",
"toolType_workflow": "工作流工具",
"tool_active_manual_config_desc": "臨時密鑰保存在本應用中,僅供該應用使用",
"tool_active_system_config_desc": "使用系統已配置好的密鑰",
"tool_active_system_config_price_desc": "需額外支付密鑰價格( {{price}} 積分/次)",
......@@ -339,7 +358,6 @@
"tool_soon_offset_tips": "該工具將在後續下線,為了您的業務穩定,請盡快替換",
"tool_tip": "作為工具執行時,該字段是否作為工具響應結果",
"tool_type_tools": "工具",
"plugin_db": "資源庫",
"toolkit_activation_label": "密鑰激活",
"toolkit_activation_not_required": "免激活",
"toolkit_activation_required": "需要激活",
......@@ -440,8 +458,18 @@
"type.error.Workflow data is empty": "沒有獲取到工作流數據",
"type.error.workflowresponseempty": "響應內容為空",
"type.hidden": "隱藏應用",
"type_http_tool_set_intro": "批量導入 API 工具",
"type_mcp_intro": "連接 MCP 服務",
"type_not_recognized": "未識別到應用程式類型",
"type_plugin_description": "一鍵輸出指定結果。",
"type_plugin_intro": "常用於封裝工作流",
"type_simple_description": "最基礎的對話應用,無需複雜配置,快速創建和使用。",
"type_simple_intro": "快速創建對話 Agent",
"type_workflow_description": "支持記憶的複雜多輪對話工作流。",
"type_workflow_intro": "拖拽編排與多輪對話",
"un_auth": "無權限",
"unnamed_app": "未命名",
"upgrade": "去升級",
"upload_file_exists_filtered": "已自動過濾重複檔案",
"upload_file_extension_type_canSelectAudio": "音頻",
"upload_file_extension_type_canSelectCustomFileExtension": "自定義文件擴展類型",
......@@ -454,6 +482,7 @@
"upload_file_max_amount_tip": "單輪對話中最大上傳檔案數量",
"upload_method": "上傳方式",
"url_upload": "文件鏈接",
"used_points": "積分用量:",
"variable.internal_type_desc": "僅在工作流內部使用,不會出現在對話框中",
"variable.select type_desc": "會在站內對話和運行預覽中顯示輸入框,在分享鏈接中不會顯示此變量",
"variable.textarea_type_desc": "允許使用者最多輸入 4000 字的對話框。",
......
......@@ -4,6 +4,7 @@
"LLM_model_response_empty": "模型流程回應為空,請檢查模型流程輸出是否正常",
"ai_reasoning": "思考過程",
"back_to_text": "返回輸入",
"balance_not_enough_pause": "由於 AI 積分不足,暫停運行工作流",
"chat.quote.No Data": "找不到該文件",
"chat.quote.deleted": "該資料已被刪除~",
"chat.waiting_for_response": "請等待對話完成",
......@@ -11,6 +12,7 @@
"chat_input_guide_lexicon_is_empty": "尚未設定詞彙庫",
"chat_test_app": "除錯-{{name}}",
"citations": "{{num}} 筆引用",
"clear_input_value": "清空輸入",
"click_contextual_preview": "點選檢視上下文預覽",
"click_to_add_url": "點擊添加鏈接",
"completion_finish_close": "連接斷開",
......@@ -24,10 +26,12 @@
"config_input_guide": "設定輸入導引",
"config_input_guide_lexicon": "設定詞彙庫",
"config_input_guide_lexicon_title": "設定詞彙庫",
"confirm_clear_input_value": "確認清空表單內容?\n將會恢復默認值!",
"confirm_to_clear_share_chat_history": "確認清空所有聊天記錄?",
"content_empty": "無內容",
"contextual": "{{num}} 筆上下文",
"contextual_preview": "上下文預覽 {{num}} 筆",
"continue_run": "繼續運行",
"core.chat.moveCancel": "上滑取消",
"core.chat.shortSpeak": "說話時間太短",
"csv_input_lexicon_tip": "僅支援 CSV 批次匯入,點選下載範本",
......@@ -161,6 +165,7 @@
"source_cronJob": "定時執行",
"start_chat": "開始對話",
"stream_output": "串流輸出",
"task_has_continued": "任務已繼續運行",
"unsupported_file_type": "不支援的檔案類型",
"upload": "上傳",
"variable_invisable_in_share": "外部變量在免登錄鏈接中不可見",
......
......@@ -13,6 +13,7 @@
"Confirm": "確認",
"Continue_Adding": "繼續新增",
"Copy": "複製",
"Create": "創建",
"Creating": "建立中",
"Delete": "刪除",
"Detail": "詳細資料",
......@@ -99,7 +100,9 @@
"all_quotes": "全部引用",
"all_result": "完整結果",
"app_evaluation": "應用評測(Beta)",
"app_icon_and_name": "圖示",
"app_not_version": "該應用未發布過,請先發布應用",
"app_type": "應用類型",
"auth_config": "鑑權配置",
"auth_type": "鑑權類型",
"auth_type.Custom": "自定義",
......@@ -753,6 +756,7 @@
"core.workflow.tool.Select Tool": "選擇工具",
"core.workflow.variable": "變數",
"create": "建立",
"create_app": "創建應用",
"create_failed": "建立失敗",
"create_success": "建立成功",
"create_time": "建立時間",
......@@ -918,11 +922,11 @@
"name": "名稱",
"name_is_empty": "名稱不能為空",
"navbar.Account": "帳戶",
"navbar.Chat": "對話",
"navbar.Chat": "門戶",
"navbar.Datasets": "知識庫",
"navbar.Studio": "工作區",
"navbar.Toolkit": "工具箱",
"navbar.Tools": "工具",
"navbar.Tools": "我的工具",
"navbar.plugin": "插件庫",
"new_create": "建立新項目",
"next_step": "下一步",
......
......@@ -17,6 +17,7 @@
"bill.valid_time": "生效時間",
"bill.you_can_convert": "您可兌換",
"bill.yuan": "元",
"current_package": "當前套餐:",
"delete.admin_failed": "刪除管理員失敗",
"delete.admin_success": "刪除管理員成功",
"delete.failed": "刪除失敗",
......@@ -87,6 +88,7 @@
"team.add_writer": "新增可寫入成員",
"team.avatar_and_name": "頭像與名稱",
"team.belong_to_group": "所屬成員群組",
"team.collaborator.added": "已新增",
"team.group.avatar": "群組頭像",
"team.group.create": "建立群組",
"team.group.create_failed": "建立群組失敗",
......@@ -110,6 +112,5 @@
"team.manage_collaborators": "管理協作者",
"team.no_collaborators": "目前沒有協作者",
"team.org.org": "組織",
"team.write_role_member": "可寫入權限",
"team.collaborator.added": "已新增"
"team.write_role_member": "可寫入權限"
}
<svg width="696" height="680" viewBox="0 0 696 680" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="696" height="680" rx="12" fill="white"/>
<g opacity="0.6">
<g filter="url(#filter0_n_27471_96779)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M387.655 270.364C376.937 259.925 359.559 259.925 348.841 270.364L245.332 371.171C241.76 374.651 235.967 374.651 232.394 371.171C228.821 367.692 228.821 362.05 232.394 358.57L335.902 257.763C353.766 240.365 382.73 240.365 400.594 257.763C411.175 268.068 415.489 282.165 413.536 295.563C427.292 293.66 441.767 297.861 452.349 308.166L452.354 308.171L452.887 308.692C470.75 326.09 470.751 354.298 452.887 371.696L359.274 462.868C358.084 464.028 358.083 465.908 359.274 467.067L378.496 485.789C382.069 489.269 382.069 494.911 378.496 498.39C374.923 501.87 369.13 501.87 365.557 498.39L346.336 479.669C337.999 471.549 337.999 458.386 346.336 450.267L439.949 359.095C450.667 348.656 450.668 331.732 439.949 321.293L439.944 321.288L439.411 320.768C428.692 310.33 411.313 310.329 400.594 320.768L323.502 395.849L323.455 395.895L322.424 396.898C318.852 400.378 313.058 400.378 309.486 396.898C305.913 393.419 305.913 387.777 309.485 384.297L387.655 308.167C398.374 297.728 398.374 280.803 387.655 270.364ZM374.718 295.566C378.29 292.086 378.29 286.445 374.718 282.965C371.145 279.485 365.352 279.485 361.779 282.965L285.226 357.52C267.362 374.919 267.362 403.126 285.226 420.525C303.09 437.922 332.054 437.922 349.919 420.525L426.471 345.969C430.044 342.49 430.044 336.848 426.471 333.368C422.898 329.889 417.106 329.889 413.533 333.368L336.981 407.924C326.262 418.362 308.883 418.362 298.165 407.925C287.446 397.485 287.446 380.56 298.165 370.121L374.718 295.566Z" fill="url(#paint0_linear_27471_96779)"/>
</g>
</g>
<g opacity="0.02">
<g filter="url(#filter1_n_27471_96779)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M531.414 331.539C515.22 315.767 488.964 315.767 472.77 331.539L316.383 483.846C310.984 489.104 302.232 489.104 296.834 483.846C291.436 478.588 291.436 470.065 296.834 464.807L453.221 312.501C480.211 286.214 523.972 286.214 550.962 312.5C566.949 328.07 573.467 349.37 570.516 369.611C591.3 366.736 613.17 373.084 629.157 388.653L629.165 388.661L629.97 389.447C656.959 415.734 656.961 458.353 629.97 484.639L488.534 622.388C486.735 624.14 486.734 626.98 488.533 628.732L517.576 657.018C522.973 662.276 522.973 670.8 517.575 676.057C512.177 681.314 503.425 681.314 498.027 676.057L468.985 647.771C456.39 635.504 456.39 615.616 468.985 603.349L610.423 465.6C626.617 449.829 626.618 424.258 610.423 408.486L610.415 408.479L609.609 407.693C593.414 391.923 567.157 391.921 550.962 407.693L434.487 521.13L434.415 521.2L432.858 522.716C427.46 527.974 418.708 527.974 413.31 522.716C407.912 517.458 407.912 508.935 413.309 503.677L531.414 388.654C547.609 372.883 547.609 347.31 531.414 331.539ZM511.867 369.616C517.264 364.358 517.264 355.835 511.867 350.577C506.469 345.32 497.717 345.32 492.318 350.577L376.657 463.221C349.666 489.507 349.667 532.125 376.656 558.413C403.647 584.698 447.408 584.698 474.398 558.413L590.06 445.769C595.457 440.511 595.457 431.988 590.06 426.73C584.662 421.473 575.91 421.474 570.512 426.73L454.851 539.375C438.656 555.145 412.4 555.145 396.205 539.376C380.01 523.602 380.011 498.031 396.205 482.259L511.867 369.616Z" fill="url(#paint1_linear_27471_96779)"/>
</g>
</g>
<defs>
<filter id="filter0_n_27471_96779" x="229.714" y="244.714" width="236.57" height="256.286" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feTurbulence type="fractalNoise" baseFrequency="1.1111111640930176 1.1111111640930176" stitchTiles="stitch" numOctaves="3" result="noise" seed="2688" />
<feColorMatrix in="noise" type="luminanceToAlpha" result="alphaNoise" />
<feComponentTransfer in="alphaNoise" result="coloredNoise1">
<feFuncA type="discrete" tableValues="1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 "/>
</feComponentTransfer>
<feComposite operator="in" in2="shape" in="coloredNoise1" result="noise1Clipped" />
<feFlood flood-color="rgba(0, 0, 0, 0.25)" result="color1Flood" />
<feComposite operator="in" in2="noise1Clipped" in="color1Flood" result="color1" />
<feMerge result="effect1_noise_27471_96779">
<feMergeNode in="shape" />
<feMergeNode in="color1" />
</feMerge>
</filter>
<filter id="filter1_n_27471_96779" x="292.786" y="292.786" width="357.427" height="387.214" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feTurbulence type="fractalNoise" baseFrequency="1.1111111640930176 1.1111111640930176" stitchTiles="stitch" numOctaves="3" result="noise" seed="2688" />
<feColorMatrix in="noise" type="luminanceToAlpha" result="alphaNoise" />
<feComponentTransfer in="alphaNoise" result="coloredNoise1">
<feFuncA type="discrete" tableValues="1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 "/>
</feComponentTransfer>
<feComposite operator="in" in2="shape" in="coloredNoise1" result="noise1Clipped" />
<feFlood flood-color="rgba(0, 0, 0, 0.25)" result="color1Flood" />
<feComposite operator="in" in2="noise1Clipped" in="color1Flood" result="color1" />
<feMerge result="effect1_noise_27471_96779">
<feMergeNode in="shape" />
<feMergeNode in="color1" />
</feMerge>
</filter>
<linearGradient id="paint0_linear_27471_96779" x1="229.714" y1="501" x2="513.72" y2="335.727" gradientUnits="userSpaceOnUse">
<stop offset="0.201923" stop-color="#454D5D"/>
<stop offset="1" stop-color="#BAC2CE"/>
</linearGradient>
<linearGradient id="paint1_linear_27471_96779" x1="292.786" y1="680" x2="721.881" y2="430.293" gradientUnits="userSpaceOnUse">
<stop offset="0.201923" stop-color="#454D5D"/>
<stop offset="1" stop-color="#BAC2CE"/>
</linearGradient>
</defs>
</svg>
<svg width="696" height="680" viewBox="0 0 696 680" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="696" height="680" rx="12" fill="white"/>
<g opacity="0.6" clip-path="url(#clip0_28888_156915)">
<g filter="url(#filter0_n_28888_156915)">
<path d="M337.49 229.401C342.99 226.225 351.908 226.225 357.408 229.401L441.457 277.926C452.458 284.278 452.458 294.575 441.457 300.926L358.514 348.813C353.014 351.989 344.096 351.989 338.596 348.813L254.547 300.288C243.546 293.937 243.546 283.639 254.547 277.288L337.49 229.401Z" fill="url(#paint0_linear_28888_156915)"/>
<path d="M239.392 329.387C239.392 320.495 245.634 316.891 253.335 321.337L331.028 366.193C335.428 368.733 338.995 374.912 338.995 379.993V462.129C338.995 471.021 332.752 474.625 325.052 470.179L247.359 425.323C242.959 422.782 239.392 416.604 239.392 411.523V329.387Z" fill="url(#paint1_linear_28888_156915)"/>
<path d="M357.001 380.613C357.001 375.532 360.568 369.353 364.968 366.813L442.674 321.95C450.374 317.504 456.617 321.108 456.617 329.999V412.125C456.617 417.206 453.05 423.385 448.649 425.925L370.944 470.789C363.243 475.235 357.001 471.631 357.001 462.739V380.613Z" fill="url(#paint2_linear_28888_156915)"/>
</g>
</g>
<g opacity="0.04">
<g filter="url(#filter1_n_28888_156915)">
<path d="M460.991 365.937C466.491 362.761 475.409 362.761 480.909 365.937L564.958 414.462C575.959 420.813 575.959 431.111 564.958 437.462L482.015 485.349C476.515 488.525 467.597 488.525 462.097 485.349L378.048 436.824C367.047 430.472 367.047 420.175 378.048 413.824L460.991 365.937Z" fill="url(#paint3_linear_28888_156915)"/>
<path d="M362.893 465.923C362.893 457.031 369.135 453.427 376.836 457.873L454.529 502.729C458.929 505.269 462.496 511.448 462.496 516.529V598.665C462.496 607.556 456.253 611.16 448.553 606.715L370.86 561.858C366.46 559.318 362.893 553.14 362.893 548.058V465.923Z" fill="url(#paint4_linear_28888_156915)"/>
<path d="M480.502 517.149C480.502 512.068 484.069 505.889 488.469 503.349L566.175 458.485C573.875 454.039 580.118 457.643 580.118 466.535V548.661C580.118 553.742 576.551 559.921 572.15 562.461L494.445 607.325C486.744 611.77 480.502 608.166 480.502 599.275V517.149Z" fill="url(#paint5_linear_28888_156915)"/>
</g>
</g>
<defs>
<filter id="filter0_n_28888_156915" x="209.999" y="211.857" width="276" height="276" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feTurbulence type="fractalNoise" baseFrequency="1.1111115217208862 1.1111115217208862" stitchTiles="stitch" numOctaves="3" result="noise" seed="2688" />
<feColorMatrix in="noise" type="luminanceToAlpha" result="alphaNoise" />
<feComponentTransfer in="alphaNoise" result="coloredNoise1">
<feFuncA type="discrete" tableValues="1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 "/>
</feComponentTransfer>
<feComposite operator="in" in2="shape" in="coloredNoise1" result="noise1Clipped" />
<feFlood flood-color="rgba(206, 188, 255, 0.25)" result="color1Flood" />
<feComposite operator="in" in2="noise1Clipped" in="color1Flood" result="color1" />
<feMerge result="effect1_noise_28888_156915">
<feMergeNode in="shape" />
<feMergeNode in="color1" />
</feMerge>
</filter>
<filter id="filter1_n_28888_156915" x="333.5" y="348.393" width="276" height="276" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feTurbulence type="fractalNoise" baseFrequency="1.1111115217208862 1.1111115217208862" stitchTiles="stitch" numOctaves="3" result="noise" seed="2688" />
<feColorMatrix in="noise" type="luminanceToAlpha" result="alphaNoise" />
<feComponentTransfer in="alphaNoise" result="coloredNoise1">
<feFuncA type="discrete" tableValues="1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 "/>
</feComponentTransfer>
<feComposite operator="in" in2="shape" in="coloredNoise1" result="noise1Clipped" />
<feFlood flood-color="rgba(206, 188, 255, 0.25)" result="color1Flood" />
<feComposite operator="in" in2="noise1Clipped" in="color1Flood" result="color1" />
<feMerge result="effect1_noise_28888_156915">
<feMergeNode in="shape" />
<feMergeNode in="color1" />
</feMerge>
</filter>
<linearGradient id="paint0_linear_28888_156915" x1="348.004" y1="227.019" x2="254.793" y2="444.601" gradientUnits="userSpaceOnUse">
<stop stop-color="#67BFFF"/>
<stop offset="1" stop-color="#285FC4"/>
</linearGradient>
<linearGradient id="paint1_linear_28888_156915" x1="348.004" y1="227.019" x2="254.793" y2="444.601" gradientUnits="userSpaceOnUse">
<stop stop-color="#67BFFF"/>
<stop offset="1" stop-color="#285FC4"/>
</linearGradient>
<linearGradient id="paint2_linear_28888_156915" x1="348.004" y1="227.019" x2="254.793" y2="444.601" gradientUnits="userSpaceOnUse">
<stop stop-color="#67BFFF"/>
<stop offset="1" stop-color="#285FC4"/>
</linearGradient>
<linearGradient id="paint3_linear_28888_156915" x1="471.505" y1="363.555" x2="378.294" y2="581.137" gradientUnits="userSpaceOnUse">
<stop stop-color="#67BFFF"/>
<stop offset="1" stop-color="#285FC4"/>
</linearGradient>
<linearGradient id="paint4_linear_28888_156915" x1="471.505" y1="363.555" x2="378.294" y2="581.137" gradientUnits="userSpaceOnUse">
<stop stop-color="#67BFFF"/>
<stop offset="1" stop-color="#285FC4"/>
</linearGradient>
<linearGradient id="paint5_linear_28888_156915" x1="471.505" y1="363.555" x2="378.294" y2="581.137" gradientUnits="userSpaceOnUse">
<stop stop-color="#67BFFF"/>
<stop offset="1" stop-color="#285FC4"/>
</linearGradient>
<clipPath id="clip0_28888_156915">
<rect width="276" height="276" fill="white" transform="translate(210 202)"/>
</clipPath>
</defs>
</svg>
<svg width="60" height="60" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_29251_101416)">
<g filter="url(#filter0_d_29251_101416)">
<path d="M0 30C0 13.4315 13.4315 0 30 0V0C46.5685 0 60 13.4315 60 30V30C60 46.5685 46.5685 60 30 60V60C13.4315 60 0 46.5685 0 30V30Z" fill="white"/>
<path d="M0 30C0 13.4315 13.4315 0 30 0V0C46.5685 0 60 13.4315 60 30V30C60 46.5685 46.5685 60 30 60V60C13.4315 60 0 46.5685 0 30V30Z" fill="url(#paint0_radial_29251_101416)" fill-opacity="0.5"/>
<path d="M0 30C0 13.4315 13.4315 0 30 0V0C46.5685 0 60 13.4315 60 30V30C60 46.5685 46.5685 60 30 60V60C13.4315 60 0 46.5685 0 30V30Z" fill="url(#paint1_radial_29251_101416)" fill-opacity="0.5"/>
<path d="M0 30C0 13.4315 13.4315 0 30 0V0C46.5685 0 60 13.4315 60 30V30C60 46.5685 46.5685 60 30 60V60C13.4315 60 0 46.5685 0 30V30Z" fill="url(#paint2_radial_29251_101416)" fill-opacity="0.5"/>
<path d="M0 30C0 13.4315 13.4315 0 30 0V0C46.5685 0 60 13.4315 60 30V30C60 46.5685 46.5685 60 30 60V60C13.4315 60 0 46.5685 0 30V30Z" fill="url(#paint3_radial_29251_101416)" fill-opacity="0.5"/>
</g>
<ellipse cx="17" cy="26" rx="2" ry="4" fill="url(#paint4_linear_29251_101416)"/>
<ellipse cx="31" cy="26" rx="2" ry="4" fill="url(#paint5_linear_29251_101416)"/>
</g>
<defs>
<filter id="filter0_d_29251_101416" x="-6.7" y="0" width="79.4" height="94.7" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dx="3" dy="25"/>
<feGaussianBlur stdDeviation="4.85"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.243137 0 0 0 0 0.317647 0 0 0 0 0.694118 0 0 0 0.05 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_29251_101416"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_29251_101416" result="shape"/>
</filter>
<radialGradient id="paint0_radial_29251_101416" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(19.5 20.5) rotate(59.7436) scale(20.8387 48.9822)">
<stop stop-color="#653AFF"/>
<stop offset="1" stop-color="#653AFF" stop-opacity="0"/>
</radialGradient>
<radialGradient id="paint1_radial_29251_101416" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(40 42.5) rotate(-128.66) scale(16.0078 16.5318)">
<stop stop-color="#84FFE2" stop-opacity="0"/>
<stop offset="1" stop-color="#84FFE2" stop-opacity="0.33"/>
</radialGradient>
<radialGradient id="paint2_radial_29251_101416" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(48.5 24) rotate(126.209) scale(34.7023 20.8951)">
<stop stop-color="#FF34FF"/>
<stop offset="1" stop-color="#FF34FF" stop-opacity="0"/>
</radialGradient>
<radialGradient id="paint3_radial_29251_101416" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(24.5 34.5) rotate(49.0283) scale(25.1645 21.8308)">
<stop stop-color="#40FFE2" stop-opacity="0.91"/>
<stop offset="1" stop-color="#40FFE2" stop-opacity="0"/>
</radialGradient>
<linearGradient id="paint4_linear_29251_101416" x1="17" y1="22" x2="17" y2="30" gradientUnits="userSpaceOnUse">
<stop stop-color="#1631FF"/>
<stop offset="1" stop-color="#596F99"/>
</linearGradient>
<linearGradient id="paint5_linear_29251_101416" x1="31" y1="22" x2="31" y2="30" gradientUnits="userSpaceOnUse">
<stop stop-color="#1631FF"/>
<stop offset="1" stop-color="#596F99"/>
</linearGradient>
<clipPath id="clip0_29251_101416">
<path d="M0 30C0 13.4315 13.4315 0 30 0C46.5685 0 60 13.4315 60 30C60 46.5685 46.5685 60 30 60C13.4315 60 0 46.5685 0 30Z" fill="white"/>
</clipPath>
</defs>
</svg>
<svg width="60" height="60" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_29251_101629)">
<path d="M0 30C0 13.4315 13.4315 0 30 0V0C46.5685 0 60 13.4315 60 30V30C60 46.5685 46.5685 60 30 60V60C13.4315 60 0 46.5685 0 30V30Z" fill="white"/>
<path d="M0 30C0 13.4315 13.4315 0 30 0V0C46.5685 0 60 13.4315 60 30V30C60 46.5685 46.5685 60 30 60V60C13.4315 60 0 46.5685 0 30V30Z" fill="url(#paint0_radial_29251_101629)" fill-opacity="0.5"/>
<path d="M0 30C0 13.4315 13.4315 0 30 0V0C46.5685 0 60 13.4315 60 30V30C60 46.5685 46.5685 60 30 60V60C13.4315 60 0 46.5685 0 30V30Z" fill="url(#paint1_radial_29251_101629)" fill-opacity="0.5"/>
<path d="M0 30C0 13.4315 13.4315 0 30 0V0C46.5685 0 60 13.4315 60 30V30C60 46.5685 46.5685 60 30 60V60C13.4315 60 0 46.5685 0 30V30Z" fill="url(#paint2_radial_29251_101629)" fill-opacity="0.5"/>
<path d="M0 30C0 13.4315 13.4315 0 30 0V0C46.5685 0 60 13.4315 60 30V30C60 46.5685 46.5685 60 30 60V60C13.4315 60 0 46.5685 0 30V30Z" fill="url(#paint3_radial_29251_101629)" fill-opacity="0.5"/>
<path d="M16 25.5C16.6667 26.2546 18.4 27.3111 20 25.5" stroke="#1631FF" stroke-width="2" stroke-linecap="round"/>
<path d="M30 25.5C30.6667 26.2546 32.4 27.3111 34 25.5" stroke="#1631FF" stroke-width="2" stroke-linecap="round"/>
</g>
<defs>
<radialGradient id="paint0_radial_29251_101629" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(19.5 20.5) rotate(59.7436) scale(20.8387 48.9822)">
<stop stop-color="#653AFF"/>
<stop offset="1" stop-color="#653AFF" stop-opacity="0"/>
</radialGradient>
<radialGradient id="paint1_radial_29251_101629" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(40 42.5) rotate(-128.66) scale(16.0078 16.5318)">
<stop stop-color="#84FFE2" stop-opacity="0"/>
<stop offset="1" stop-color="#84FFE2" stop-opacity="0.33"/>
</radialGradient>
<radialGradient id="paint2_radial_29251_101629" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(48.5 24) rotate(126.209) scale(34.7023 20.8951)">
<stop stop-color="#FF34FF"/>
<stop offset="1" stop-color="#FF34FF" stop-opacity="0"/>
</radialGradient>
<radialGradient id="paint3_radial_29251_101629" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(24.5 34.5) rotate(49.0283) scale(25.1645 21.8308)">
<stop stop-color="#40FFE2" stop-opacity="0.91"/>
<stop offset="1" stop-color="#40FFE2" stop-opacity="0"/>
</radialGradient>
<clipPath id="clip0_29251_101629">
<rect width="60" height="60" fill="white"/>
</clipPath>
</defs>
</svg>
import { Box, Flex, Spinner, Center } from '@chakra-ui/react';
import { getWebReqUrl } from '@fastgpt/web/common/system/utils';
import MyIcon from '@fastgpt/web/components/common/Icon';
import { useToggle } from 'ahooks';
import { useRouter } from 'next/router';
import { useState, useEffect, useMemo } from 'react';
import { useSystemStore } from '@/web/common/system/useSystemStore';
import { useUserStore } from '@/web/support/user/useUserStore';
import { StandardSubLevelEnum } from '@fastgpt/global/support/wallet/sub/constants';
import { useTranslation } from 'next-i18next';
import { getWorkorderURL } from '@/web/common/workorder/api';
const BotShowRouter: { [key: string]: boolean } = {
'/dashboard/agent': true,
'/dashboard/tool': true,
'/dashboard/systemTool': true,
'/dashboard/templateMarket': true,
'/dashboard/mcpServer': true,
'/dashboard/evaluation': true,
'/dataset/list': true,
'/account/info': true
};
const HelperBot = () => {
const router = useRouter();
const { i18n } = useTranslation();
const [open, setOpen] = useToggle(true);
const [showChat, setShowChat] = useToggle(false);
const [isLoading, setIsLoading] = useState(true);
const { feConfigs, subPlans } = useSystemStore();
const { teamPlanStatus } = useUserStore();
const isPlanUser = useMemo(() => {
if (!teamPlanStatus) return false;
if (teamPlanStatus.standard?.currentSubLevel !== StandardSubLevelEnum.free) return true;
if (teamPlanStatus.datasetMaxSize !== subPlans?.standard?.free?.maxDatasetSize) return true;
if (teamPlanStatus.totalPoints !== subPlans?.standard?.free?.totalPoints) return true;
return false;
}, [
subPlans?.standard?.free?.maxDatasetSize,
subPlans?.standard?.free?.totalPoints,
teamPlanStatus
]);
const showWorkorder = feConfigs?.show_workorder && isPlanUser;
const botIframeUrl = feConfigs?.botIframeUrl;
useEffect(() => {
if (showChat) {
setIsLoading(true);
}
}, [showChat]);
useEffect(() => {
const handleMessage = async (event: MessageEvent) => {
if (event.data?.type === 'workorderRequest') {
try {
const data = await getWorkorderURL();
if (data?.redirectUrl) {
window.open(data.redirectUrl);
}
} catch (error) {
console.error('Failed to create workorder:', error);
}
}
};
window.addEventListener('message', handleMessage);
return () => window.removeEventListener('message', handleMessage);
}, []);
if (!botIframeUrl || !BotShowRouter[router.pathname]) {
return null;
}
return (
<>
{showChat && open && (
<Box
position={'fixed'}
right={3}
bottom={'calc(10% + 80px)'}
top={'50px'}
w={'400px'}
maxH={'790px'}
bg={'white'}
borderRadius={'lg'}
boxShadow={'0px 4px 20px rgba(0, 0, 0, 0.15)'}
zIndex={99}
overflow={'hidden'}
>
{isLoading && (
<Center
position={'absolute'}
top={0}
left={0}
right={0}
bottom={0}
bg={'white'}
zIndex={2}
>
<Flex direction={'column'} alignItems={'center'} gap={3}>
<Spinner size={'lg'} color={'primary.500'} thickness="3px" speed="0.8s" />
</Flex>
</Center>
)}
<Box
position={'absolute'}
right={2}
top={2}
p={1}
rounded={'md'}
zIndex={1}
_hover={{
cursor: 'pointer',
bgColor: 'myGray.200'
}}
onClick={() => setShowChat.set(false)}
>
<MyIcon name="close" w={6} />
</Box>
{/* iframe */}
<Box
as="iframe"
src={`${botIframeUrl}&showWorkorder=${showWorkorder ? '1' : '0'}`}
w={'100%'}
h={'100%'}
border={'none'}
onLoad={() => setIsLoading(false)}
/>
</Box>
)}
<Flex
position={'fixed'}
right={3}
bottom={'10%'}
zIndex={100}
transform={open ? 'none' : 'translateX(32px)'}
transition={'transform 0.2s ease-in-out'}
>
{open && (
<>
<Box
zIndex={10}
position={'absolute'}
right={-2}
top={-2}
w={4}
h={4}
borderRadius={'full'}
_hover={{
cursor: 'pointer',
bgColor: 'myGray.200'
}}
onClick={(e) => {
e.stopPropagation();
setOpen.set(false);
setShowChat.set(false);
}}
>
<MyIcon name="close" />
</Box>
{!showChat && (
<Box
position={'absolute'}
left={'-40px'}
top={'-30px'}
w={'80px'}
h={'80px'}
zIndex={-10}
>
{i18n.language === 'zh-CN' ? (
<Box bgImage={getWebReqUrl('/imgs/botTextCN.svg')} w={'100%'} h={'100%'} />
) : (
<Box bgImage={getWebReqUrl('/imgs/botTextEn.svg')} w={'100%'} h={'100%'} />
)}
</Box>
)}
</>
)}
<Box
bgImage={getWebReqUrl(open ? '/imgs/bot.svg' : '/imgs/botClosed.svg')}
w={'60px'}
h={'60px'}
rounded={'full'}
boxShadow={'3px 25px 9.7px 0 rgba(62, 81, 177, 0.05)'}
_hover={{
cursor: 'pointer'
}}
onClick={() => {
if (open) {
setShowChat.toggle();
} else {
setOpen.set(true);
}
}}
/>
</Flex>
</>
);
};
export default HelperBot;
import { useSystemStore } from '@/web/common/system/useSystemStore';
import { getWorkorderURL } from '@/web/common/workorder/api';
import { useUserStore } from '@/web/support/user/useUserStore';
import { Box, Flex } from '@chakra-ui/react';
import { StandardSubLevelEnum } from '@fastgpt/global/support/wallet/sub/constants';
import Icon from '@fastgpt/web/components/common/Icon';
import { useRequest2 } from '@fastgpt/web/hooks/useRequest';
import { useSystem } from '@fastgpt/web/hooks/useSystem';
import { useToggle } from 'ahooks';
import { useTranslation } from 'next-i18next';
import { useRouter } from 'next/router';
import { useMemo } from 'react';
const WorkOrderShowRouter: { [key: string]: boolean } = {
'/dashboard/apps': true,
'/dataset/list': true,
'/plugin': true
};
function WorkorderButton() {
const router = useRouter();
const [open, setOpen] = useToggle(true);
const { t } = useTranslation();
const { feConfigs, subPlans } = useSystemStore();
const { teamPlanStatus } = useUserStore();
const { isPc } = useSystem();
const { runAsync: onFeedback } = useRequest2(getWorkorderURL, {
manual: true,
onSuccess(data) {
if (data) {
window.open(data.redirectUrl);
}
}
});
const showWorkorder = WorkOrderShowRouter[router.pathname];
const isPlanUser = useMemo(() => {
if (!teamPlanStatus) return false;
if (teamPlanStatus.standard?.currentSubLevel !== StandardSubLevelEnum.free) return true;
if (teamPlanStatus.datasetMaxSize !== subPlans?.standard?.free?.maxDatasetSize) return true;
if (teamPlanStatus.totalPoints !== subPlans?.standard?.free?.totalPoints) return true;
return false;
}, [
subPlans?.standard?.free?.maxDatasetSize,
subPlans?.standard?.free?.totalPoints,
teamPlanStatus
]);
return showWorkorder && feConfigs?.show_workorder && isPlanUser && isPc ? (
<>
{open ? (
<Flex
position="fixed"
bottom="10%"
right="0"
height="56px"
width="56px"
zIndex={100}
boxShadow="0px 12px 32px -4px #00175633"
alignItems="center"
justifyContent="center"
direction="column"
borderTopLeftRadius="8px"
borderBottomLeftRadius="8px"
border={'1px'}
borderColor={'#DFE6F2'}
>
<Box
zIndex={10}
width="1rem"
height="1rem"
position="absolute"
left="-6px"
top="-6px"
borderRadius="full"
background="white"
border="1px"
borderColor={'myGray.100'}
bgColor="myGray.25"
_hover={{
cursor: 'pointer',
bgColor: 'myGray.100'
}}
onClick={() => setOpen.set(false)}
>
<Icon name="close" />
</Box>
<Flex
alignItems="center"
justifyContent="center"
direction="column"
bgColor="myGray.25"
_hover={{
cursor: 'pointer',
bgColor: 'myGray.100'
}}
width="100%"
height="100%"
borderTopLeftRadius="8px"
borderBottomLeftRadius="8px"
onClick={onFeedback}
>
<Icon name="feedback" width="24px" height="24px" />
<Box fontSize="xs" fontWeight="500">
{t('common:question_feedback')}
</Box>
</Flex>
</Flex>
) : (
<Flex
position="fixed"
bottom="10%"
right="0"
height="44px"
width="19px"
bgColor="myGray.25"
borderTopLeftRadius="8px"
borderBottomLeftRadius="8px"
border={'1px'}
borderColor={'#DFE6F2'}
zIndex={100}
boxShadow="0px 12px 32px -4px #00175633"
alignItems="center"
justifyContent="center"
direction="column"
_hover={{
cursor: 'pointer',
bgColor: 'myGray.100'
}}
onClick={() => setOpen.set(true)}
>
<Icon name="core/chat/chevronLeft" width="16px" height="16px" />
</Flex>
)}
</>
) : null;
}
export default WorkorderButton;
......@@ -14,8 +14,8 @@ import { useSystem } from '@fastgpt/web/hooks/useSystem';
import { useDebounceEffect, useMount } from 'ahooks';
import { useTranslation } from 'next-i18next';
import { useToast } from '@fastgpt/web/hooks/useToast';
import WorkorderButton from './WorkorderButton';
import { useCheckCoupon } from './hooks/checkCoupon';
import HelperBot from './HelperBot';
const Navbar = dynamic(() => import('./navbar'));
const NavbarPhone = dynamic(() => import('./navbarPhone'));
......@@ -176,7 +176,7 @@ const Layout = ({ children }: { children: JSX.Element }) => {
<ImportantInform informs={importantInforms} refetch={refetchUnRead} />
)}
<ResetExpiredPswModal />
<WorkorderButton />
<HelperBot />
</>
)}
......
......@@ -11,6 +11,8 @@ import { useTranslation } from 'next-i18next';
import { useSystemStore } from '@/web/common/system/useSystemStore';
import MyTooltip from '@fastgpt/web/components/common/MyTooltip';
import { getWebReqUrl } from '@fastgpt/web/common/system/utils';
import MyImage from '@fastgpt/web/components/common/Image/MyImage';
import { LOGO_ICON } from '@fastgpt/global/common/system/constants';
export enum NavbarTypeEnum {
normal = 'normal',
......@@ -55,12 +57,14 @@ const Navbar = ({ unread }: { unread: number }) => {
label: t('common:navbar.Studio'),
icon: 'navbar/dashboardLight',
activeIcon: 'navbar/dashboardFill',
link: `/dashboard/apps`,
link: `/dashboard/agent`,
activeLink: [
'/dashboard/apps',
'/dashboard/agent',
'/dashboard/create',
'/app/detail',
'/dashboard/tool',
'/dashboard/systemTool',
'/dashboard/templateMarket',
'/dashboard/[pluginGroupId]',
'/dashboard/mcpServer',
'/dashboard/evaluation',
'/dashboard/evaluation/create'
......@@ -74,13 +78,6 @@ const Navbar = ({ unread }: { unread: number }) => {
activeLink: ['/dataset/list', '/dataset/detail']
},
{
label: t('common:navbar.plugin'),
icon: 'core/app/pluginLight',
activeIcon: 'core/app/pluginFill',
link: '/plugin/tool',
activeLink: ['/plugin/tool']
},
{
label: t('common:navbar.Account'),
icon: 'navbar/userLight',
activeIcon: 'navbar/userFill',
......@@ -129,16 +126,8 @@ const Navbar = ({ unread }: { unread: number }) => {
bg={isSecondNavbarPage ? 'myGray.50' : 'transparent'}
>
{/* logo */}
<Box
flex={'0 0 auto'}
mb={3}
border={'2px solid #fff'}
borderRadius={'50%'}
overflow={'hidden'}
cursor={'pointer'}
onClick={() => router.push('/account/info')}
>
<Avatar w={'2rem'} h={'2rem'} src={userInfo?.avatar} borderRadius={'50%'} />
<Box flex={'0 0 auto'} mb={3}>
<MyImage w={9} h={9} src={LOGO_ICON} />
</Box>
{/* 导航列表 */}
<Box flex={1}>
......@@ -254,6 +243,10 @@ const Navbar = ({ unread }: { unread: number }) => {
</Link>
</MyTooltip>
)}
<Box flex={'0 0 auto'} mb={4} cursor={'pointer'} onClick={() => router.push('/account/info')}>
<Avatar w={9} src={userInfo?.avatar} borderRadius={'50%'} />
</Box>
</Flex>
);
};
......
......@@ -27,12 +27,13 @@ const NavbarPhone = ({ unread }: { unread: number }) => {
label: t('common:navbar.Studio'),
icon: 'core/app/aiLight',
activeIcon: 'core/app/aiFill',
link: `/dashboard/apps`,
link: `/dashboard/agent`,
activeLink: [
'/dashboard/apps',
'/dashboard/agent',
'/app/detail',
'/dashboard/tool',
'/dashboard/systemTool',
'/dashboard/templateMarket',
'/dashboard/[pluginGroupId]',
'/dashboard/mcpServer',
'/dashboard/evaluation',
'/dashboard/evaluation/create'
......@@ -48,13 +49,6 @@ const NavbarPhone = ({ unread }: { unread: number }) => {
unread: 0
},
{
label: t('common:navbar.plugin'),
icon: 'core/app/pluginLight',
activeIcon: 'core/app/pluginFill',
link: '/plugin/tool',
activeLink: ['/plugin/tool']
},
{
label: t('common:navbar.Account'),
icon: 'support/user/userLight',
activeIcon: 'support/user/userFill',
......
......@@ -123,42 +123,45 @@ const Editor = React.memo(function Editor({
}, []);
return (
<Box h={'100%'} w={'100%'} position={'relative'}>
<Textarea
ref={textareaRef}
maxW={'100%'}
as={autoHeight ? ResizeTextarea : undefined}
sx={
!showResize
? {
'::-webkit-resizer': {
display: 'none'
<Box h={'100%'} w={'100%'}>
<Box position={'relative'}>
<Textarea
ref={textareaRef}
maxW={'100%'}
as={autoHeight ? ResizeTextarea : undefined}
resize={showResize ? 'vertical' : 'none'}
sx={
!showResize
? {
'::-webkit-resizer': {
display: 'none !important'
}
}
}
: {}
}
{...props}
maxH={`${maxH}px`}
minH={`${minH}px`}
onChange={handleChange}
/>
{onOpenModal &&
maxH &&
textareaRef.current &&
textareaRef.current.scrollHeight > Number(maxH) && (
<Box
zIndex={1}
position={'absolute'}
bottom={1}
right={2}
cursor={'pointer'}
onClick={onOpenModal}
>
<MyTooltip label={t('common:ui.textarea.Magnifying')}>
<MyIcon name={'common/fullScreenLight'} w={'14px'} color={'myGray.600'} />
</MyTooltip>
</Box>
)}
: {}
}
{...props}
maxH={`${maxH}px`}
minH={`${minH}px`}
onChange={handleChange}
/>
{onOpenModal &&
maxH &&
textareaRef.current &&
textareaRef.current.scrollHeight > Number(maxH) && (
<Box
zIndex={1}
position={'absolute'}
bottom={1}
right={2}
cursor={'pointer'}
onClick={onOpenModal}
>
<MyTooltip label={t('common:ui.textarea.Magnifying')}>
<MyIcon name={'common/fullScreenLight'} w={'14px'} color={'myGray.600'} />
</MyTooltip>
</Box>
)}
</Box>
</Box>
);
});
......@@ -28,13 +28,15 @@ const AuthValueDisplay = ({
index = 0,
onEdit,
value,
onChange
onChange,
bg
}: {
showInput: boolean;
index?: number;
onEdit: (index?: number) => void;
value: string;
onChange: (value: string) => void;
bg: string;
}) => {
const { t } = useTranslation();
......@@ -43,7 +45,7 @@ const AuthValueDisplay = ({
{showInput ? (
<Input
placeholder={'Value'}
bg={'myGray.50'}
bg={bg}
h={8}
maxLength={200}
onFocus={() => onEdit(index)}
......@@ -98,11 +100,13 @@ export const getSecretType = (config: HeaderSecretConfigType): HeaderSecretTypeE
const HeaderAuthForm = ({
headerSecretValue,
onChange,
fontWeight = 'medium'
fontWeight = 'medium',
bg = 'myGray.50'
}: {
headerSecretValue: HeaderSecretConfigType;
onChange: (secret: HeaderSecretConfigType) => void;
fontWeight?: string;
bg?: string;
}) => {
const { t } = useTranslation();
const headerSecretList = [
......@@ -138,7 +142,7 @@ const HeaderAuthForm = ({
{t('common:auth_type')}
</Box>
<MySelect
bg={'myGray.50'}
bg={bg}
value={currentAuthType}
onChange={(val) => {
if (val === HeaderSecretTypeEnum.None) {
......@@ -192,6 +196,7 @@ const HeaderAuthForm = ({
});
}
}}
bg={bg}
/>
) : (
<Box>
......@@ -201,7 +206,7 @@ const HeaderAuthForm = ({
<Input
w={1 / 3}
h={8}
bg="myGray.50"
bg={bg}
placeholder="key"
maxLength={64}
value={item.key}
......@@ -230,6 +235,7 @@ const HeaderAuthForm = ({
}}
index={index}
onEdit={setEditingIndex}
bg={bg}
/>
</Box>
{customHeaders.length > 1 && (
......
......@@ -33,7 +33,7 @@ import { LazyCollaboratorProvider } from '@/components/support/permission/Member
const MyModal = dynamic(() => import('@fastgpt/web/components/common/MyModal'));
const ModelTable = () => {
const ModelTable = ({ permissionConfig = false }: { permissionConfig?: boolean }) => {
const { t, i18n } = useTranslation();
const { getModelProviders, getModelProvider } = useSystemStore();
const { userInfo } = useUserStore();
......@@ -276,7 +276,7 @@ const ModelTable = () => {
<Tr color={'myGray.600'}>
<Th fontSize={'xs'}>
<HStack>
{userInfo?.team.permission.hasManagePer && (
{permissionConfig && userInfo?.team.permission.hasManagePer && (
<Checkbox
mr={1}
isChecked={isSelecteAll}
......@@ -288,7 +288,7 @@ const ModelTable = () => {
</Th>
<Th fontSize={'xs'}>{t('common:model.model_type')}</Th>
<Th fontSize={'xs'}>{t('common:model.billing')}</Th>
{userInfo?.team.permission.hasManagePer && (
{permissionConfig && userInfo?.team.permission.hasManagePer && (
<Th fontSize={'xs'}>{t('common:permission.Permission config')}</Th>
)}
</Tr>
......@@ -298,7 +298,7 @@ const ModelTable = () => {
<Tr key={index} _hover={{ bg: 'myGray.50' }}>
<Td fontSize={'sm'}>
<HStack>
{userInfo?.team.permission.hasManagePer && (
{permissionConfig && userInfo?.team.permission.hasManagePer && (
<Checkbox
mr={1}
isChecked={isSelected(item)}
......@@ -315,7 +315,7 @@ const ModelTable = () => {
<MyTag colorSchema={item.tagColor as any}>{item.typeLabel}</MyTag>
</Td>
<Td fontSize={'sm'}>{item.priceLabel}</Td>
{userInfo?.team.permission.hasManagePer && (
{permissionConfig && userInfo?.team.permission.hasManagePer && (
<Td fontSize={'sm'}>
<LazyCollaboratorProvider
selectedHint={t('account_model:model_permission_config_hint')}
......
......@@ -211,10 +211,13 @@ const InputRender = (props: InputRenderProps) => {
}
if (inputType === InputTypeEnum.fileSelect) {
const files = Array.isArray(value) ? value : [];
return (
<FileSelector
fileUrls={Array.isArray(value) ? value : []}
value={files}
onChange={onChange}
isDisabled={isDisabled}
onUploading={props.setUploading}
maxFiles={props.maxFiles}
canSelectFile={props.canSelectFile}
canSelectImg={props.canSelectImg}
......@@ -224,7 +227,6 @@ const InputRender = (props: InputRenderProps) => {
customFileExtensionList={props.customFileExtensionList}
canLocalUpload={props.canLocalUpload}
canUrlUpload={props.canUrlUpload}
isDisabled={isDisabled}
/>
);
}
......
......@@ -11,6 +11,7 @@ import { useFieldArray, type UseFormReturn } from 'react-hook-form';
import { ChatBoxContext } from '../Provider';
import dynamic from 'next/dynamic';
import { useContextSelector } from 'use-context-selector';
import { WorkflowAuthContext } from '../../context/workflowAuthContext';
import { useSystem } from '@fastgpt/web/hooks/useSystem';
import { documentFileType } from '@fastgpt/global/common/file/constants';
import FilePreview from '../../components/FilePreview';
......@@ -56,9 +57,9 @@ const ChatInput = ({
const InputLeftComponent = useContextSelector(ChatBoxContext, (v) => v.InputLeftComponent);
const outLinkAuthData = useContextSelector(ChatBoxContext, (v) => v.outLinkAuthData);
const appId = useContextSelector(ChatBoxContext, (v) => v.appId);
const chatId = useContextSelector(ChatBoxContext, (v) => v.chatId);
const outLinkAuthData = useContextSelector(WorkflowAuthContext, (v) => v.outLinkAuthData);
const appId = useContextSelector(WorkflowAuthContext, (v) => v.appId);
const chatId = useContextSelector(WorkflowAuthContext, (v) => v.chatId);
const isChatting = useContextSelector(ChatBoxContext, (v) => v.isChatting);
const whisperConfig = useContextSelector(ChatBoxContext, (v) => v.whisperConfig);
const chatInputGuide = useContextSelector(ChatBoxContext, (v) => v.chatInputGuide);
......
......@@ -8,6 +8,7 @@ import { useTranslation } from 'next-i18next';
import HighlightText from '@fastgpt/web/components/common/String/HighlightText';
import { ChatBoxContext } from '../Provider';
import { useContextSelector } from 'use-context-selector';
import { WorkflowAuthContext } from '../../context/workflowAuthContext';
export default function InputGuideBox({
appId,
......@@ -22,7 +23,7 @@ export default function InputGuideBox({
}) {
const { t } = useTranslation();
const chatInputGuide = useContextSelector(ChatBoxContext, (v) => v.chatInputGuide);
const outLinkAuthData = useContextSelector(ChatBoxContext, (v) => v.outLinkAuthData);
const outLinkAuthData = useContextSelector(WorkflowAuthContext, (v) => v.outLinkAuthData);
const { data = [] } = useRequest2(
async () => {
......
......@@ -14,6 +14,7 @@ import MyIcon from '@fastgpt/web/components/common/Icon';
import { useSystem } from '@fastgpt/web/hooks/useSystem';
import { useContextSelector } from 'use-context-selector';
import { ChatBoxContext } from '../Provider';
import { WorkflowAuthContext } from '../../context/workflowAuthContext';
import MyIconButton from '@/pageComponents/account/team/OrgManage/IconButton';
import { isMobile } from '@fastgpt/web/common/system/utils';
......@@ -286,8 +287,8 @@ const VoiceInput = forwardRef<VoiceInputComponentRef, VoiceInputProps>(
const isMobileDevice = isMobile();
const { isPc } = useSystem();
const outLinkAuthData = useContextSelector(ChatBoxContext, (v) => v.outLinkAuthData);
const appId = useContextSelector(ChatBoxContext, (v) => v.appId);
const outLinkAuthData = useContextSelector(WorkflowAuthContext, (v) => v.outLinkAuthData);
const appId = useContextSelector(WorkflowAuthContext, (v) => v.appId);
const whisperConfig = useContextSelector(ChatBoxContext, (v) => v.whisperConfig);
const canvasRef = useRef<HTMLCanvasElement>(null);
......
......@@ -25,6 +25,7 @@ import { ChatRecordContext } from '@/web/core/chat/context/chatRecordContext';
import { useCreation } from 'ahooks';
import type { ChatTypeEnum } from './constants';
import type { ChatQuickAppType } from '@fastgpt/global/core/chat/setting/type';
import { WorkflowRuntimeContextProvider } from '@/components/core/chat/ChatContainer/context/workflowAuthContext';
export type ChatProviderProps = {
appId: string;
......@@ -43,7 +44,7 @@ export type ChatProviderProps = {
onSwitchQuickApp?: (appId: string) => Promise<void>;
};
type useChatStoreType = ChatProviderProps & {
type useChatStoreType = Omit<ChatProviderProps, 'appId' | 'chatId' | 'outLinkAuthData'> & {
welcomeText: string;
variableList: VariableItemType[];
questionGuide: AppQGConfigType;
......@@ -72,10 +73,6 @@ type useChatStoreType = ChatProviderProps & {
chatInputGuide: ChatInputGuideConfigType;
getHistoryResponseData: ({ dataId }: { dataId: string }) => Promise<ChatHistoryItemResType[]>;
fileSelectConfig: AppFileSelectConfigType;
appId: string;
chatId: string;
outLinkAuthData: OutLinkChatAuthProps;
};
export const ChatBoxContext = createContext<useChatStoreType>({
......@@ -131,7 +128,6 @@ export const ChatBoxContext = createContext<useChatStoreType>({
open: false,
customUrl: ''
},
outLinkAuthData: {},
// @ts-ignore
variablesForm: undefined
});
......@@ -255,14 +251,19 @@ const Provider = ({
setAudioPlayingChatId,
isChatting,
chatInputGuide,
appId,
chatId,
outLinkAuthData: formatOutLinkAuth,
getHistoryResponseData,
chatType
};
return <ChatBoxContext.Provider value={value}>{children}</ChatBoxContext.Provider>;
return (
<WorkflowRuntimeContextProvider
appId={appId}
chatId={chatId}
outLinkAuthData={formatOutLinkAuth}
>
<ChatBoxContext.Provider value={value}>{children}</ChatBoxContext.Provider>
</WorkflowRuntimeContextProvider>
);
};
export default React.memo(Provider);
......@@ -14,6 +14,7 @@ import {
import FilesBlock from './FilesBox';
import { ChatBoxContext } from '../Provider';
import { useContextSelector } from 'use-context-selector';
import { WorkflowAuthContext } from '../../context/workflowAuthContext';
import AIResponseBox from '../../../components/AIResponseBox';
import { useCopyData } from '@fastgpt/web/hooks/useCopyData';
import MyIcon from '@fastgpt/web/components/common/Icon';
......@@ -158,9 +159,9 @@ const ChatItem = (props: Props) => {
const chatType = useContextSelector(ChatBoxContext, (v) => v.chatType);
const showNodeStatus = useContextSelector(ChatItemContext, (v) => v.showNodeStatus);
const appId = useContextSelector(ChatBoxContext, (v) => v.appId);
const chatId = useContextSelector(ChatBoxContext, (v) => v.chatId);
const outLinkAuthData = useContextSelector(ChatBoxContext, (v) => v.outLinkAuthData);
const appId = useContextSelector(WorkflowAuthContext, (v) => v.appId);
const chatId = useContextSelector(WorkflowAuthContext, (v) => v.chatId);
const outLinkAuthData = useContextSelector(WorkflowAuthContext, (v) => v.outLinkAuthData);
const isShowReadRawSource = useContextSelector(ChatItemContext, (v) => v.isShowReadRawSource);
const { totalQuoteList: quoteList = [] } = useMemo(
......
......@@ -5,7 +5,7 @@ import { useRequest } from '@fastgpt/web/hooks/useRequest';
import { useTranslation } from 'next-i18next';
import { updateChatUserFeedback } from '@/web/core/chat/api';
import { useContextSelector } from 'use-context-selector';
import { ChatBoxContext } from '../Provider';
import { WorkflowAuthContext } from '../../context/workflowAuthContext';
const FeedbackModal = ({
appId,
......@@ -22,7 +22,7 @@ const FeedbackModal = ({
}) => {
const ref = useRef<HTMLTextAreaElement>(null);
const { t } = useTranslation();
const outLinkAuthData = useContextSelector(ChatBoxContext, (v) => v.outLinkAuthData);
const outLinkAuthData = useContextSelector(WorkflowAuthContext, (v) => v.outLinkAuthData);
const { mutate, isLoading } = useRequest({
mutationFn: async () => {
......
......@@ -4,7 +4,7 @@ import { Box, useTheme } from '@chakra-ui/react';
import type { SearchDataResponseItemType } from '@fastgpt/global/core/dataset/type';
import QuoteItem, { formatScore } from '@/components/core/dataset/QuoteItem';
import { useContextSelector } from 'use-context-selector';
import { ChatBoxContext } from '../Provider';
import { WorkflowAuthContext } from '../../context/workflowAuthContext';
import { ChatItemContext } from '@/web/core/chat/context/chatItemContext';
import { useRequest2 } from '@fastgpt/web/hooks/useRequest';
import { useChatStore } from '@/web/core/chat/context/useChatStore';
......@@ -20,7 +20,7 @@ const QuoteList = React.memo(function QuoteList({
const theme = useTheme();
const { appId, outLinkAuthData } = useChatStore();
const RawSourceBoxProps = useContextSelector(ChatBoxContext, (v) => ({
const RawSourceBoxProps = useContextSelector(WorkflowAuthContext, (v) => ({
chatItemDataId,
appId: v.appId,
chatId: v.chatId,
......
......@@ -41,13 +41,14 @@ import {
ChatStatusEnum
} from '@fastgpt/global/core/chat/constants';
import {
checkIsInteractiveByHistories,
getInteractiveByHistories,
formatChatValue2InputType,
setUserSelectResultToHistories
setInteractiveResultToHistories
} from './utils';
import { ChatTypeEnum, textareaMinH } from './constants';
import { SseResponseEventEnum } from '@fastgpt/global/core/workflow/runtime/constants';
import ChatProvider, { ChatBoxContext, type ChatProviderProps } from './Provider';
import { WorkflowAuthContext } from '../context/workflowAuthContext';
import ChatItem from './components/ChatItem';
import dynamic from 'next/dynamic';
import type { StreamResponseType } from '@/web/common/api/fetch';
......@@ -64,6 +65,7 @@ import MyBox from '@fastgpt/web/components/common/MyBox';
import { VariableInputEnum } from '@fastgpt/global/core/workflow/constants';
import { valueTypeFormat } from '@fastgpt/global/core/workflow/runtime/utils';
import { formatTime2YMDHMS } from '@fastgpt/global/common/string/time';
import { TeamErrEnum } from '@fastgpt/global/common/error/code/team';
const FeedbackModal = dynamic(() => import('./components/FeedbackModal'));
const ReadFeedbackModal = dynamic(() => import('./components/ReadFeedbackModal'));
......@@ -74,6 +76,7 @@ const VariableInputForm = dynamic(() => import('./components/VariableInputForm')
const ChatHomeVariablesForm = dynamic(() => import('./components/home/ChatHomeVariablesForm'));
const WelcomeHomeBox = dynamic(() => import('./components/home/WelcomeHomeBox'));
const QuickApps = dynamic(() => import('./components/home/QuickApps'));
const WorkorderEntrance = dynamic(() => import('@/pageComponents/chat/WorkorderEntrance'));
enum FeedbackTypeEnum {
user = 'user',
......@@ -89,6 +92,7 @@ type Props = OutLinkChatAuthProps &
showVoiceIcon?: boolean;
showEmptyIntro?: boolean;
active?: boolean; // can use
showWorkorder?: boolean;
onStartChat?: (e: StartChatFnProps) => Promise<
StreamResponseType & {
......@@ -104,13 +108,14 @@ const ChatBox = ({
showVoiceIcon = true,
showEmptyIntro = false,
active = true,
showWorkorder,
onStartChat,
chatType
}: Props) => {
const ScrollContainerRef = useRef<HTMLDivElement>(null);
const { t } = useTranslation();
const { toast } = useToast();
const { feConfigs } = useSystemStore();
const { feConfigs, setNotSufficientModalType } = useSystemStore();
const { isPc } = useSystem();
const TextareaDom = useRef<HTMLTextAreaElement>(null);
const chatController = useRef(new AbortController());
......@@ -140,9 +145,9 @@ const ChatBox = ({
const isChatRecordsLoaded = useContextSelector(ChatRecordContext, (v) => v.isChatRecordsLoaded);
const ScrollData = useContextSelector(ChatRecordContext, (v) => v.ScrollData);
const appId = useContextSelector(ChatBoxContext, (v) => v.appId);
const chatId = useContextSelector(ChatBoxContext, (v) => v.chatId);
const outLinkAuthData = useContextSelector(ChatBoxContext, (v) => v.outLinkAuthData);
const appId = useContextSelector(WorkflowAuthContext, (v) => v.appId);
const chatId = useContextSelector(WorkflowAuthContext, (v) => v.chatId);
const outLinkAuthData = useContextSelector(WorkflowAuthContext, (v) => v.outLinkAuthData);
const welcomeText = useContextSelector(ChatBoxContext, (v) => v.welcomeText);
const variableList = useContextSelector(ChatBoxContext, (v) => v.variableList);
const questionGuide = useContextSelector(ChatBoxContext, (v) => v.questionGuide);
......@@ -153,7 +158,7 @@ const ChatBox = ({
const isChatting = useContextSelector(ChatBoxContext, (v) => v.isChatting);
// Workflow running, there are user input or selection
const isInteractive = useMemo(() => checkIsInteractiveByHistories(chatRecords), [chatRecords]);
const lastInteractive = useMemo(() => getInteractiveByHistories(chatRecords), [chatRecords]);
const showExternalVariable = useMemo(() => {
const map: Record<string, boolean> = {
......@@ -537,7 +542,7 @@ const ChatBox = ({
setChatRecords(
isInteractivePrompt
? // 把交互的结果存储到对话记录中,交互模式下,不需要新的会话轮次
setUserSelectResultToHistories(newChatList.slice(0, -2), text)
setInteractiveResultToHistories(newChatList.slice(0, -2), text)
: newChatList
);
......@@ -598,11 +603,18 @@ const ChatBox = ({
responseData
};
});
const lastInteractive = getInteractiveByHistories(state);
if (lastInteractive?.type === 'paymentPause' && !lastInteractive.params.continue) {
setNotSufficientModalType(TeamErrEnum.aiPointsNotEnough);
}
return newChatHistories;
});
setTimeout(() => {
if (!checkIsInteractiveByHistories(newChatHistories)) {
// If there is no interactive mode, create a question guide
if (!getInteractiveByHistories(newChatHistories)) {
createQuestionGuide();
}
......@@ -887,7 +899,7 @@ const ChatBox = ({
abortRequest('leave');
}, [chatId, appId, abortRequest, setValue]);
const canSendPrompt = onStartChat && chatStarted && active && !isInteractive;
const canSendPrompt = onStartChat && chatStarted && active && !lastInteractive;
// Add listener
useEffect(() => {
......@@ -989,6 +1001,7 @@ const ChatBox = ({
}
}, [ScrollContainerRef, setIsVariableVisible]);
// Home chat, and no chat records
const isHomeRender = useMemo(() => {
return chatType === ChatTypeEnum.home && chatRecords.length === 0 && !chatStartedWatch;
}, [chatType, chatRecords.length, chatStartedWatch]);
......@@ -1096,6 +1109,8 @@ const ChatBox = ({
showMarkIcon,
onCloseCustomFeedback
]);
// Child box
const AppChatRenderBox = useMemo(() => {
return (
<ScrollData
......@@ -1180,6 +1195,8 @@ const ChatBox = ({
w={'100%'}
maxW={['auto', 'min(820px, 100%)']}
>
{showWorkorder && <WorkorderEntrance />}
<ChatInput
onSendMessage={sendPrompt}
onStop={() => chatController.current?.abort('stop')}
......
......@@ -7,6 +7,7 @@ import { type ChatBoxInputType, type UserInputFileItemType } from './type';
import { getFileIcon } from '@fastgpt/global/common/file/icon';
import { ChatItemValueTypeEnum, ChatStatusEnum } from '@fastgpt/global/core/chat/constants';
import { extractDeepestInteractive } from '@fastgpt/global/core/workflow/runtime/utils';
import type { WorkflowInteractiveResponseType } from '@fastgpt/global/core/workflow/template/system/interactive/type';
export const formatChatValue2InputType = (value?: ChatItemValueItemType[]): ChatBoxInputType => {
if (!value) {
......@@ -44,9 +45,11 @@ export const formatChatValue2InputType = (value?: ChatItemValueItemType[]): Chat
};
};
export const checkIsInteractiveByHistories = (chatHistories: ChatSiteItemType[]) => {
export const getInteractiveByHistories = (
chatHistories: ChatSiteItemType[]
): WorkflowInteractiveResponseType | undefined => {
const lastAIHistory = chatHistories[chatHistories.length - 1];
if (!lastAIHistory) return false;
if (!lastAIHistory) return;
const lastMessageValue = lastAIHistory.value[
lastAIHistory.value.length - 1
......@@ -57,19 +60,24 @@ export const checkIsInteractiveByHistories = (chatHistories: ChatSiteItemType[])
lastMessageValue.type === ChatItemValueTypeEnum.interactive &&
!!lastMessageValue?.interactive?.params
) {
const params = lastMessageValue.interactive.params;
const finalInteractive = extractDeepestInteractive(lastMessageValue.interactive);
// 如果用户选择了,则不认为是交互模式(可能是上一轮以交互结尾,发起的新的一轮对话)
if ('userSelectOptions' in params) {
return !params.userSelectedVal;
} else if ('inputForm' in params) {
return !params.submitted;
if (finalInteractive.type === 'userSelect') {
if (!!finalInteractive.params.userSelectedVal) return;
} else if (finalInteractive.type === 'userInput') {
if (!!finalInteractive.params.submitted) return;
} else if (finalInteractive.type === 'paymentPause') {
if (!!finalInteractive.params.continue) return;
}
return finalInteractive;
}
return false;
return;
};
export const setUserSelectResultToHistories = (
export const setInteractiveResultToHistories = (
histories: ChatSiteItemType[],
interactiveVal: string
): ChatSiteItemType[] => {
......@@ -116,6 +124,19 @@ export const setUserSelectResultToHistories = (
}
};
}
if (finalInteractive.type === 'paymentPause') {
return {
...val,
interactive: {
...finalInteractive,
params: {
...finalInteractive.params,
continue: true
}
}
};
}
});
return {
......
......@@ -21,6 +21,10 @@ import { FlowNodeInputTypeEnum } from '@fastgpt/global/core/workflow/node/consta
import InputRender from '@/components/core/app/formRender';
import { nodeInputTypeToInputType } from '@/components/core/app/formRender/utils';
import { useSystemStore } from '@/web/common/system/useSystemStore';
import { WorkflowAuthContext } from '@/components/core/chat/ChatContainer/context/workflowAuthContext';
import { useMemoEnhance } from '@fastgpt/web/hooks/useMemoEnhance';
import { useDeepCompareEffect } from 'ahooks';
import PopoverConfirm from '@fastgpt/web/components/common/MyPopover/PopoverConfirm';
const RenderInput = () => {
const { t } = useTranslation();
......@@ -36,9 +40,9 @@ const RenderInput = () => {
const isChatting = useContextSelector(PluginRunContext, (v) => v.isChatting);
const fileSelectConfig = useContextSelector(PluginRunContext, (v) => v.fileSelectConfig);
const instruction = useContextSelector(PluginRunContext, (v) => v.instruction);
const appId = useContextSelector(PluginRunContext, (v) => v.appId);
const chatId = useContextSelector(PluginRunContext, (v) => v.chatId);
const outLinkAuthData = useContextSelector(PluginRunContext, (v) => v.outLinkAuthData);
const appId = useContextSelector(WorkflowAuthContext, (v) => v.appId);
const chatId = useContextSelector(WorkflowAuthContext, (v) => v.chatId);
const outLinkAuthData = useContextSelector(WorkflowAuthContext, (v) => v.outLinkAuthData);
const { llmModelList } = useSystemStore();
......@@ -74,17 +78,8 @@ const RenderInput = () => {
});
/* Global files(abandon) <=== */
const [restartData, setRestartData] = useState<ChatBoxInputFormType>();
const onClickNewChat = useCallback(
(e: ChatBoxInputFormType) => {
setRestartData(e);
onNewChat?.();
},
[onNewChat, setRestartData]
);
// Get plugin input components
const formatPluginInputs = useMemo(() => {
const formatPluginInputs = useMemoEnhance(() => {
if (histories.length === 0) return pluginInputs;
try {
const historyValue = histories[0]?.value as UserChatItemValueItemType[];
......@@ -98,8 +93,30 @@ const RenderInput = () => {
}
}, [histories, pluginInputs]);
const [restartData, setRestartData] = useState<ChatBoxInputFormType>();
const onClickNewChat = useCallback(
(e: ChatBoxInputFormType) => {
setRestartData(e);
onNewChat?.();
},
[onNewChat]
);
const onResetDefault = useCallback(() => {
reset({
files: [],
variables: formatPluginInputs.reduce(
(acc, input) => {
acc[input.key] = input.defaultValue;
return acc;
},
{} as Record<string, any>
)
});
}, [reset, formatPluginInputs]);
// Reset input value
useEffect(() => {
useDeepCompareEffect(() => {
// Set config default value
if (histories.length === 0) {
if (restartData) {
......@@ -108,16 +125,7 @@ const RenderInput = () => {
return;
}
reset({
files: [],
variables: formatPluginInputs.reduce(
(acc, input) => {
acc[input.key] = input.defaultValue;
return acc;
},
{} as Record<string, any>
)
});
onResetDefault();
return;
}
......@@ -159,13 +167,13 @@ const RenderInput = () => {
variables: historyVariables,
files: historyFileList
});
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [histories, formatPluginInputs]);
const [uploading, setUploading] = useState(false);
const fileUploading = uploading || hasFileUploading;
const isDisabledInput = fileUploading || histories.length > 0;
const hasHistory = histories.length > 0;
const isDisabledInput = !!hasHistory;
return (
<Box>
......@@ -196,6 +204,7 @@ const RenderInput = () => {
<Button
leftIcon={<MyIcon name={selectFileIcon as any} w={'16px'} />}
variant={'whiteBase'}
isDisabled={isChatting || fileUploading}
onClick={() => {
onOpenSelectFile();
}}
......@@ -292,13 +301,20 @@ const RenderInput = () => {
})}
{/* Run Button */}
{onStartChat && onNewChat && (
<Flex justifyContent={'end'} mt={8}>
<Flex justifyContent={'end'} mt={8} gap={4}>
<PopoverConfirm
content={t('chat:confirm_clear_input_value')}
onConfirm={onResetDefault}
Trigger={<Button variant={'whiteBase'}>{t('chat:clear_input_value')}</Button>}
/>
<Button
isLoading={isChatting}
isDisabled={fileUploading}
onClick={() => {
handleSubmit((e) => {
if (isDisabledInput) {
if (hasHistory) {
console.log(e);
onClickNewChat(e);
} else {
onSubmit(e);
......@@ -306,7 +322,7 @@ const RenderInput = () => {
})();
}}
>
{isDisabledInput ? t('common:Restart') : t('common:Run')}
{hasHistory ? t('common:Restart') : t('common:Run')}
</Button>
</Flex>
)}
......
......@@ -23,6 +23,7 @@ import { type AppFileSelectConfigType } from '@fastgpt/global/core/app/type';
import { defaultAppSelectFileConfig } from '@fastgpt/global/core/app/constants';
import { mergeChatResponseData } from '@fastgpt/global/core/chat/utils';
import { getErrText } from '@fastgpt/global/common/error/utils';
import { WorkflowRuntimeContextProvider } from '@/components/core/chat/ChatContainer/context/workflowAuthContext';
type PluginRunContextType = PluginRunBoxProps & {
isChatting: boolean;
......@@ -31,16 +32,15 @@ type PluginRunContextType = PluginRunBoxProps & {
fileSelectConfig: AppFileSelectConfigType;
};
export const PluginRunContext = createContext<PluginRunContextType>({
export const PluginRunContext = createContext<
Omit<PluginRunContextType, 'appId' | 'chatId' | 'outLinkAuthData'>
>({
isChatting: false,
onSubmit: function (e: FieldValues): Promise<any> {
throw new Error('Function not implemented.');
},
instruction: '',
fileSelectConfig: defaultAppSelectFileConfig,
appId: '',
chatId: '',
outLinkAuthData: {}
fileSelectConfig: defaultAppSelectFileConfig
});
const PluginRunContextProvider = ({
......@@ -229,25 +229,13 @@ const PluginRunContextProvider = ({
});
try {
// Remove files icon
const formatVariables = cloneDeep(variables);
for (const key in formatVariables) {
if (Array.isArray(formatVariables[key])) {
formatVariables[key].forEach((item) => {
if (item.url && item.icon) {
delete item.icon;
}
});
}
}
await onStartChat({
messages,
controller: chatController.current,
generatingMessage,
variables: {
files,
...formatVariables
...variables
}
});
......@@ -304,7 +292,15 @@ const PluginRunContextProvider = ({
instruction,
fileSelectConfig
};
return <PluginRunContext.Provider value={contextValue}>{children}</PluginRunContext.Provider>;
return (
<WorkflowRuntimeContextProvider
appId={props.appId}
chatId={props.chatId}
outLinkAuthData={props.outLinkAuthData || {}}
>
<PluginRunContext.Provider value={contextValue}>{children}</PluginRunContext.Provider>
</WorkflowRuntimeContextProvider>
);
};
export default PluginRunContextProvider;
import type { OutLinkChatAuthProps } from '@fastgpt/global/support/permission/chat';
import { useMemoEnhance } from '@fastgpt/web/hooks/useMemoEnhance';
import { createContext } from 'use-context-selector';
type WorkflowAuthContextType = {
outLinkAuthData: OutLinkChatAuthProps;
appId: string;
chatId: string;
};
export const WorkflowAuthContext = createContext<WorkflowAuthContextType>({
outLinkAuthData: {},
appId: '',
chatId: ''
});
export const WorkflowRuntimeContextProvider = ({
appId,
chatId,
outLinkAuthData,
children
}: {
appId: string;
chatId: string;
outLinkAuthData: OutLinkChatAuthProps;
children: React.ReactNode;
}) => {
const value = useMemoEnhance(
() => ({
outLinkAuthData,
appId,
chatId
}),
[outLinkAuthData, appId, chatId]
);
return <WorkflowAuthContext.Provider value={value}>{children}</WorkflowAuthContext.Provider>;
};
......@@ -21,6 +21,7 @@ import MyIcon from '@fastgpt/web/components/common/Icon';
import Avatar from '@fastgpt/web/components/common/Avatar';
import type {
InteractiveBasicType,
PaymentPauseInteractive,
UserInputInteractive,
UserSelectInteractive
} from '@fastgpt/global/core/workflow/template/system/interactive/type';
......@@ -31,7 +32,7 @@ import { SelectOptionsComponent, FormInputComponent } from './Interactive/Intera
import { extractDeepestInteractive } from '@fastgpt/global/core/workflow/runtime/utils';
import { useContextSelector } from 'use-context-selector';
import { type OnOpenCiteModalProps } from '@/web/core/chat/context/chatItemContext';
import { ChatBoxContext } from '../ChatContainer/ChatBox/Provider';
import { WorkflowAuthContext } from '../ChatContainer/context/workflowAuthContext';
import { useCreation } from 'ahooks';
const accordionButtonStyle = {
......@@ -98,9 +99,9 @@ const RenderText = React.memo(function RenderText({
chatItemDataId: string;
onOpenCiteModal?: (e?: OnOpenCiteModalProps) => void;
}) {
const appId = useContextSelector(ChatBoxContext, (v) => v.appId);
const chatId = useContextSelector(ChatBoxContext, (v) => v.chatId);
const outLinkAuthData = useContextSelector(ChatBoxContext, (v) => v.outLinkAuthData);
const appId = useContextSelector(WorkflowAuthContext, (v) => v.appId);
const chatId = useContextSelector(WorkflowAuthContext, (v) => v.chatId);
const outLinkAuthData = useContextSelector(WorkflowAuthContext, (v) => v.outLinkAuthData);
const source = useMemo(() => {
if (!text) return '';
......@@ -254,6 +255,32 @@ const RenderUserFormInteractive = React.memo(function RenderFormInput({
</Flex>
);
});
const RenderPaymentPauseInteractive = React.memo(function RenderPaymentPauseInteractive({
interactive
}: {
interactive: InteractiveBasicType & PaymentPauseInteractive;
}) {
const { t } = useTranslation();
return interactive.params.continue ? (
<Box>{t('chat:task_has_continued')}</Box>
) : (
<>
<Box color={'myGray.500'}>{t(interactive.params.description)}</Box>
<Button
maxW={'250px'}
onClick={() => {
onSendPrompt({
text: 'Continue',
isInteractivePrompt: true
});
}}
>
{t('chat:continue_run')}
</Button>
</>
);
});
const AIResponseBox = ({
chatItemDataId,
......@@ -298,6 +325,9 @@ const AIResponseBox = ({
if (finalInteractive.type === 'userInput') {
return <RenderUserFormInteractive interactive={finalInteractive} />;
}
if (finalInteractive.type === 'paymentPause') {
return <RenderPaymentPauseInteractive interactive={finalInteractive} />;
}
}
return null;
};
......
......@@ -7,6 +7,7 @@ import { LOGO_ICON } from '@fastgpt/global/common/system/constants';
import { getSystemMsgModalData } from '@/web/support/user/inform/api';
import dynamic from 'next/dynamic';
import { useRequest2 } from '@fastgpt/web/hooks/useRequest';
import { webPushTrack } from '@/web/common/middle/tracks/utils';
const Markdown = dynamic(() => import('@/components/Markdown'), { ssr: false });
const SystemMsgModal = ({}: {}) => {
......@@ -36,6 +37,11 @@ const SystemMsgModal = ({}: {}) => {
const onclickRead = useCallback(() => {
if (!data) return;
setSysMsgReadId(data.id);
webPushTrack.readSystemAnnouncement({
announcementId: data.id
});
onClose();
}, [data, onClose, setSysMsgReadId]);
......
......@@ -111,8 +111,8 @@ const AccountContainer = ({
]
: []),
{
icon: 'common/settingLight',
label: t('common:Setting'),
icon: 'support/usage/usageRecordLight',
label: t('account:language'),
value: TabEnum.setting
},
{
......
......@@ -11,10 +11,12 @@ import { useRouter } from 'next/router';
const TeamSelector = ({
showManage,
showAvatar = true,
onChange,
...props
}: Omit<ButtonProps, 'onChange'> & {
showManage?: boolean;
showAvatar?: boolean;
onChange?: () => void;
}) => {
const { t } = useTranslation();
......@@ -43,7 +45,7 @@ const TeamSelector = ({
const teamList = useMemo(() => {
return myTeams.map((team) => ({
icon: team.avatar,
...(showAvatar ? { icon: team.avatar } : {}),
iconSize: '1.25rem',
label: team.teamName,
value: team.teamId
......
import { AppTypeEnum } from '@fastgpt/global/core/app/constants';
import { i18nT } from '@fastgpt/web/i18n/utils';
export const appTypeMap = {
[AppTypeEnum.simple]: {
icon: 'core/app/simpleBot',
title: i18nT('app:type.Create simple bot'),
avatar: 'core/app/type/simpleFill',
emptyCreateText: i18nT('app:create_empty_app')
},
export const createAppTypeMap = {
[AppTypeEnum.workflow]: {
type: AppTypeEnum.workflow,
icon: 'core/app/type/workflowFill',
avatar: 'core/app/type/workflowFill',
title: i18nT('app:type.Create workflow bot'),
emptyCreateText: i18nT('app:create_empty_workflow')
title: i18nT('app:type.Workflow bot'),
intro: i18nT('app:type_workflow_intro'),
description: i18nT('app:type_workflow_description'),
imgUrl: '/imgs/app/workflowPreview.svg'
},
[AppTypeEnum.simple]: {
type: AppTypeEnum.simple,
icon: 'core/app/simpleBot',
title: i18nT('app:type.Chat_Agent'),
intro: i18nT('app:type_simple_intro'),
description: i18nT('app:type_simple_description'),
imgUrl: '/imgs/app/simpleAgentPreview.svg'
},
[AppTypeEnum.plugin]: {
[AppTypeEnum.workflowTool]: {
type: AppTypeEnum.workflowTool,
icon: 'core/app/type/pluginFill',
avatar: 'core/app/type/pluginFill',
title: i18nT('app:type.Create plugin bot'),
emptyCreateText: i18nT('app:create_empty_plugin')
title: i18nT('app:toolType_workflow'),
intro: i18nT('app:type_plugin_intro'),
description: i18nT('app:type_plugin_description'),
imgUrl: '/imgs/app/pluginPreview.svg'
},
[AppTypeEnum.mcpToolSet]: {
type: AppTypeEnum.mcpToolSet,
icon: 'core/app/type/mcpToolsFill',
title: i18nT('app:toolType_mcp'),
intro: i18nT('app:type_mcp_intro'),
description: i18nT('app:type.Create mcp tools tip'),
imgUrl: '/imgs/app/mcpToolsPreview.svg'
},
[AppTypeEnum.httpToolSet]: {
type: AppTypeEnum.httpToolSet,
icon: 'core/app/type/httpPluginFill',
title: i18nT('app:toolType_http'),
intro: i18nT('app:type_http_tool_set_intro'),
description: i18nT('app:type.Create http toolset tip'),
imgUrl: '/imgs/app/httpToolSetPreview.svg'
}
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment