mirror of
https://github.com/labring/FastGPT.git
synced 2026-05-16 01:09:01 +08:00
57a505f837
* chore: Rename service & container names for consistency in Docker configs (#6710) * chore: Rename container names for consistency in Docker configs * chore: Rename service names for consistency in Docker configs chore: Update OpenSandbox versions and image repositories (#6709) * chore: Update OpenSandbox versions and image repositories * yml version * images * init yml * port --------- Co-authored-by: archer <545436317@qq.com> refactor(chat): optimize sandbox status logic and decouple UI/Status hooks (#6713) * refactor(chat): optimize sandbox status logic and decouple UI/Status hooks * fix: useRef, rename onClose to afterClose Update .env.template (#6720) aiproxy默认的请求地址改成http协议 feat: comprehensive agent skill management and sandbox infrastructure optimization - Skill System: Implemented a full skill management module including CRUD operations, folder organization, AI-driven skill generation, and versioning (switch/update). - Sandbox Infrastructure: Introduced 'volume-manager' for PVC and Docker volume lifecycle management, replacing the MinIO sync-agent for better data persistence. - Workflow Integration: Enhanced the Agent node to support skill selection and configuration, including new UI components and data normalization. - Permission Management: Added granular permission controls for skills, supporting collaborators, owner transfers, and permission inheritance. - UI/UX: Added a dedicated Skill dashboard, sandbox debug interface (terminal, logs, and iframe proxy), and comprehensive i18n support. - Maintenance: Migrated Docker services to named volumes, optimized sandbox instance limits, and improved error handling for sandbox providers. Co-authored-by: chanzhi82020 <chenzhi@sangfor.com.cn> Co-authored-by: lavine77 Signed-off-by: Jon <ljp@sangfor.com.cn> feat: hide skill prettier * perf: hide skill code * fix: ts * lock * perf: tool code * fix: ts * lock * fix: test * fix: openapi * lock * fix: test * null model --------- Co-authored-by: archer <545436317@qq.com>
116 lines
2.4 KiB
TypeScript
116 lines
2.4 KiB
TypeScript
import type { I18nStringType } from '../../common/i18n/type';
|
|
|
|
export enum AgentSkillSourceEnum {
|
|
system = 'system',
|
|
personal = 'personal'
|
|
}
|
|
|
|
export enum AgentSkillCategoryEnum {
|
|
search = 'search',
|
|
tool = 'tool',
|
|
coding = 'coding',
|
|
data = 'data',
|
|
analysis = 'analysis',
|
|
communication = 'communication',
|
|
other = 'other'
|
|
}
|
|
|
|
export const AgentSkillCategoryMap: Record<
|
|
`${AgentSkillCategoryEnum}`,
|
|
{ label: I18nStringType; icon: string }
|
|
> = {
|
|
[AgentSkillCategoryEnum.search]: {
|
|
label: {
|
|
'zh-CN': '搜索',
|
|
'zh-Hant': '搜索',
|
|
en: 'Search'
|
|
},
|
|
icon: 'core/agentSkill/search'
|
|
},
|
|
[AgentSkillCategoryEnum.tool]: {
|
|
label: {
|
|
'zh-CN': '工具',
|
|
'zh-Hant': '工具',
|
|
en: 'Tool'
|
|
},
|
|
icon: 'core/agentSkill/tool'
|
|
},
|
|
[AgentSkillCategoryEnum.coding]: {
|
|
label: {
|
|
'zh-CN': '编程',
|
|
'zh-Hant': '編程',
|
|
en: 'Coding'
|
|
},
|
|
icon: 'core/agentSkill/coding'
|
|
},
|
|
[AgentSkillCategoryEnum.data]: {
|
|
label: {
|
|
'zh-CN': '数据处理',
|
|
'zh-Hant': '數據處理',
|
|
en: 'Data Processing'
|
|
},
|
|
icon: 'core/agentSkill/data'
|
|
},
|
|
[AgentSkillCategoryEnum.analysis]: {
|
|
label: {
|
|
'zh-CN': '分析',
|
|
'zh-Hant': '分析',
|
|
en: 'Analysis'
|
|
},
|
|
icon: 'core/agentSkill/analysis'
|
|
},
|
|
[AgentSkillCategoryEnum.communication]: {
|
|
label: {
|
|
'zh-CN': '通信',
|
|
'zh-Hant': '通訊',
|
|
en: 'Communication'
|
|
},
|
|
icon: 'core/agentSkill/communication'
|
|
},
|
|
[AgentSkillCategoryEnum.other]: {
|
|
label: {
|
|
'zh-CN': '其他',
|
|
'zh-Hant': '其他',
|
|
en: 'Other'
|
|
},
|
|
icon: 'core/agentSkill/other'
|
|
}
|
|
};
|
|
|
|
export const agentSkillsCollectionName = 'agent_skills';
|
|
|
|
export const agentSkillsVersionCollectionName = 'agent_skills_versions';
|
|
|
|
export const skillSandboxCollectionName = 'skill_sandbox_info';
|
|
|
|
// Agent Skill types
|
|
export enum AgentSkillTypeEnum {
|
|
folder = 'folder',
|
|
skill = 'skill'
|
|
}
|
|
|
|
export const AgentSkillFolderTypeList = [AgentSkillTypeEnum.folder];
|
|
|
|
// Sandbox types
|
|
export enum SandboxTypeEnum {
|
|
editDebug = 'edit-debug',
|
|
sessionRuntime = 'session-runtime'
|
|
}
|
|
|
|
// Sandbox status states
|
|
export enum SandboxStateEnum {
|
|
pending = 'Pending',
|
|
running = 'Running',
|
|
failed = 'Failed',
|
|
succeeded = 'Succeeded',
|
|
unknown = 'Unknown'
|
|
}
|
|
|
|
// Sandbox protocol types
|
|
export enum SandboxProtocolEnum {
|
|
http = 'http',
|
|
https = 'https'
|
|
}
|
|
|
|
export const sandboxInstanceCollectionName = 'agent_sandbox_instances';
|