mirror of
https://github.com/labring/FastGPT.git
synced 2026-05-05 01:02:59 +08:00
Agent skill dev (#6668)
* 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>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { type Monaco } from '@monaco-editor/react';
|
||||
import { useCallback } from 'react';
|
||||
import { type CompletionModel, type CompletionPosition } from './type';
|
||||
|
||||
let monacoInstance: Monaco | null = null;
|
||||
|
||||
@@ -10,16 +11,8 @@ const useSystemHelperCompletion = () => {
|
||||
|
||||
const buildSuggestions = (
|
||||
monaco: Monaco,
|
||||
model: Parameters<
|
||||
Parameters<
|
||||
typeof monaco.languages.registerCompletionItemProvider
|
||||
>[1]['provideCompletionItems']
|
||||
>[0],
|
||||
position: Parameters<
|
||||
Parameters<
|
||||
typeof monaco.languages.registerCompletionItemProvider
|
||||
>[1]['provideCompletionItems']
|
||||
>[1],
|
||||
model: CompletionModel,
|
||||
position: CompletionPosition,
|
||||
memberSnippet: string
|
||||
) => {
|
||||
const lineContent = model.getLineContent(position.lineNumber);
|
||||
@@ -76,7 +69,7 @@ const useSystemHelperCompletion = () => {
|
||||
for (const lang of ['javascript', 'typescript'] as const) {
|
||||
monaco.languages.registerCompletionItemProvider(lang, {
|
||||
triggerCharacters: ['.'],
|
||||
provideCompletionItems: (model, position) =>
|
||||
provideCompletionItems: (model: CompletionModel, position: CompletionPosition) =>
|
||||
buildSuggestions(monaco, model, position, jsSnippet)
|
||||
});
|
||||
}
|
||||
@@ -85,7 +78,7 @@ const useSystemHelperCompletion = () => {
|
||||
const pySnippet = 'httpRequest(${1:url}, method="${2:GET}", headers={}, timeout=${3:60})';
|
||||
monaco.languages.registerCompletionItemProvider('python', {
|
||||
triggerCharacters: ['.'],
|
||||
provideCompletionItems: (model, position) =>
|
||||
provideCompletionItems: (model: CompletionModel, position: CompletionPosition) =>
|
||||
buildSuggestions(monaco, model, position, pySnippet)
|
||||
});
|
||||
}, []);
|
||||
|
||||
Reference in New Issue
Block a user