-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Test agent #6220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test agent #6220
Conversation
* add role and tools filling * add: file-upload --------- Co-authored-by: xxyyh <2289112474@qq>
Co-authored-by: xxyyh <2289112474@qq>
* cp skill chat * rebase fdf933d and add skill chat * 1. skill 的 CRUD 2. skill 的信息渲染到前端界面 * solve comment * remove chatid and chatItemId * skill match * perf: skill manage * fix: ts --------- Co-authored-by: xxyyh <2289112474@qq> Co-authored-by: archer <[email protected]>
Co-authored-by: xxyyh <2289112474@qq>
Co-authored-by: xxyyh <2289112474@qq>
* feat:top box fill * prompt fix --------- Co-authored-by: xxyyh <2289112474@qq>
* have-replan * agent --------- Co-authored-by: xxyyh <2289112474@qq>
|
There is too much information in the pull request to test. |
|
|
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements a comprehensive Agent system for autonomous task planning and execution. The agent can automatically decompose complex tasks into executable steps, supporting intelligent tool selection, dynamic planning, and interactive user feedback.
Key Changes:
- Introduces a new "Chat Agent V2" workflow type with autonomous task planning capabilities
- Adds skill-based tool selection system with visual editor support
- Implements Plan Agent for multi-step task decomposition
- Adds support for skill nodes in prompt editor with
{{@skillId@}}syntax
Reviewed changes
Copilot reviewed 200 out of 434 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
packages/web/i18n/zh-Hant/common.json |
Added Traditional Chinese translations for agent-related UI strings including skill configuration, prompt tips, and exit confirmations |
packages/web/i18n/zh-Hant/chat.json |
Added translations for agent planning features like "agent_call", "plan_agent", "context_pick", and "step_summary" |
packages/web/i18n/zh-Hant/app.json |
Added translations for agent intro, skills management, tool configuration, and empty folder displays |
packages/web/i18n/zh-CN/common.json |
Added Simplified Chinese translations matching the Traditional Chinese additions |
packages/web/i18n/zh-CN/chat.json |
Added Simplified Chinese translations for agent features |
packages/web/i18n/zh-CN/app.json |
Added Simplified Chinese translations for skills and tools |
packages/web/i18n/en/common.json |
Added English translations for all agent-related UI elements |
packages/web/i18n/en/chat.json |
Added English translations for agent planning features |
packages/web/i18n/en/app.json |
Added English translations for skills, tools, and agent configuration |
packages/web/hooks/useScrollPagination.tsx |
Updated import paths for pagination types from deprecated location |
packages/web/components/common/Textarea/PromptEditor/utils.ts |
Extended type support to include SkillNode in text entity registration |
packages/web/components/common/Textarea/PromptEditor/plugins/VariablePickerPlugin/index.tsx |
Fixed flushSync warning by deferring menu closure |
packages/web/components/common/Textarea/PromptEditor/plugins/SkillPickerPlugin/index.tsx |
New plugin for skill selection with keyboard navigation and folder support |
packages/web/components/common/Textarea/PromptEditor/plugins/SkillLabelPlugin/utils.ts |
Added utility for parsing skill label regex patterns |
packages/web/components/common/Textarea/PromptEditor/plugins/SkillLabelPlugin/node.tsx |
Implemented SkillNode decorator for rendering skill labels |
packages/web/components/common/Textarea/PromptEditor/plugins/SkillLabelPlugin/index.tsx |
Plugin for transforming skill text patterns into visual skill nodes |
packages/web/components/common/Textarea/PromptEditor/Editor.tsx |
Integrated skill picker and label plugins into editor |
packages/web/components/common/MySelect/MultipleRowSelect.tsx |
Fixed styling issue with open state background color |
packages/web/components/common/Icon/constants.ts |
Added warningFill icon for skill configuration warnings |
packages/web/components/common/Icon/button.tsx |
Added MyDeleteIconButton component with pre-configured delete styling |
packages/service/support/user/audit/util.ts |
Added support for chatAgent app type in i18n translations |
packages/service/support/permission/teamLimit.ts |
Included chatAgent type in app count limits |
packages/service/support/permission/app/auth.ts |
Fixed import path for AppDetailType |
packages/service/core/workflow/utils.ts |
Relaxed type constraints for tool runtime node generation |
packages/service/core/workflow/dispatch/utils.ts |
Refactored workflow response writer with stepId support and child response handling |
packages/service/core/workflow/dispatch/type.ts |
Updated WorkflowResponseType with zod schema validation |
packages/service/core/workflow/dispatch/tools/readFiles.ts |
Updated file reading utility function names |
packages/service/core/workflow/dispatch/index.ts |
Major refactor to support agent node responses, usage tracking, and interactive workflows |
packages/service/core/workflow/dispatch/ai/agent/index.ts |
Core agent dispatch logic with plan iteration and master agent coordination |
packages/service/core/workflow/dispatch/ai/agent/master/call.ts |
Master agent call handler for tool execution and plan delegation |
packages/service/core/workflow/dispatch/ai/agent/sub/plan/index.ts |
Plan agent implementation for task decomposition |
packages/service/core/workflow/dispatch/ai/agent/sub/tool/index.ts |
Tool execution dispatcher for system and MCP tools |
packages/service/core/workflow/dispatch/ai/agent/sub/file/index.ts |
File reading implementation for agent file access |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
packages/service/core/workflow/dispatch/ai/agent/master/call.ts:1
- Debug console.log statement with magic number should be removed or replaced with proper logging using the addLog utility.
import type { ChatCompletionMessageParam, ChatCompletionTool } from '@fastgpt/global/core/ai/type';
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "delete_folder": "Delete Folder", | ||
| "delete_success": "Deleted Successfully", | ||
| "delete_warning": "Deletion Warning", | ||
| "descripton": "describe", |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected spelling of 'descripton' to 'description'.
| "descripton": "describe", | |
| "description": "describe", |
| "skill_editor": "技能辅助生成", | ||
| "skill_empty_name": "未命名的技能", | ||
| "skill_local_removed": "本地技能已移除", | ||
| "skill_name_placeholder": "请输入技能明,仅用于展示", |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The placeholder text appears to have a typo. It should likely be "请输入技能名,仅用于展示" (skill name) instead of "技能明".
| "skill_name_placeholder": "请输入技能明,仅用于展示", | |
| "skill_name_placeholder": "请输入技能名,仅用于展示", |
| "skill_editor": "技能輔助生成", | ||
| "skill_empty_name": "未命名的技能", | ||
| "skill_local_removed": "本地技能已移除", | ||
| "skill_name_placeholder": "請輸入技能明,僅用於展示", |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The placeholder text appears to have a typo. It should likely be "請輸入技能名,僅用於展示" (skill name) instead of "技能明".
| "skill_name_placeholder": "請輸入技能明,僅用於展示", | |
| "skill_name_placeholder": "請輸入技能名,僅用於展示", |
| console.log('Plan request messages'); | ||
| console.dir({ requestMessages }, { depth: null }); | ||
| console.log('userInput:', userInput, 'mode:', mode, 'interactive?.type:', interactive?.type); |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debug console.log statements should be removed or replaced with proper logging using the addLog utility that's already imported in this file.
| console.log('Plan request messages'); | |
| console.dir({ requestMessages }, { depth: null }); | |
| console.log('userInput:', userInput, 'mode:', mode, 'interactive?.type:', interactive?.type); | |
| // console.log('Plan request messages'); | |
| // console.dir({ requestMessages }, { depth: null }); | |
| // console.log('userInput:', userInput, 'mode:', mode, 'interactive?.type:', interactive?.type); |
| if (!userQuery) { | ||
| const toolArgs = parseJsonArgs(call.function.arguments); | ||
| finalUserInput = toolArgs?.description || ''; | ||
| console.log('[Plan Tool] finalUserInput', finalUserInput); |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Multiple debug console.log statements should be removed or replaced with proper logging using the addLog utility that's already used elsewhere in this file.
| planTool?.function?.description || '请基于上述历史记录来规划当前任务'; | ||
| } | ||
|
|
||
| console.log('[Plan Tool] userQuery 为空,使用备用输入:', finalUserInput); |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Multiple debug console.log statements should be removed or replaced with proper logging using the addLog utility that's already used elsewhere in this file.
| stop: true | ||
| }; | ||
| } catch (error) { | ||
| console.log(error, 111); |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Multiple debug console.log statements should be removed or replaced with proper logging using the addLog utility that's already used elsewhere in this file.
| } | ||
|
|
||
| if (agentPlan) { | ||
| console.log(`Start step call`, { |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debug console.log statement should be removed or replaced with addLog.debug() for consistency with the logging pattern used elsewhere in the codebase.
| console.log(`Start step call`, { | |
| addLog.debug('Start step call', { |
Preview mcp_server Image: |
Preview sandbox Image: |
No description provided.