Skip to content

Conversation

francismiko
Copy link
Contributor

No description provided.

francismiko and others added 6 commits September 1, 2025 21:38
* feat: Add relevant functions related to agent invocation, including plan parsing, state management and tool invocation

* Refactor agent call logic and utilities

- Simplified the `runAgentCall` function by removing unnecessary complexity and restructuring the flow for better readability and maintainability.
- Introduced helper functions to create tools from tool nodes and to prepare agent messages, enhancing modularity.
- Removed the `utils.ts` file as its functions were integrated into the main logic, streamlining the codebase.
- Updated the dispatch logic in `index.ts` to utilize the new helper functions and improve clarity.
- Adjusted the handling of interactive modes and tool calls to ensure proper response formatting and error handling.

* refactor: clean up the processing logic of the interactive mode and remove the unused tool creation functions

* feat: add relevant constants for proxy configuration and update the proxy call logic

* refactor: remove unused configuration variables from workflow properties

* refactor: remove unused configuration variables from dispatchRunAgents props

* fix: build error

* refactor: update FlowNodeTypeEnum values and consolidate utility functions

* refactor: simplify conditional checks in tool call and reasoning handlers

* feat: add default agent prompt for improved response handling

* refactor: rename directory with agent->tool, agentCall->agnet

* refactor: rename dispatchRunAgents to dispatchRunAgent for consistency

* refactor: rename toolCall to tools for consistency in FlowNodeTypeEnum

* refactor: rename agents to toolCall for consistency in nodeTypes mapping

* refactor: remove unused runtimeEdges parameter from dispatchRunAgent

* refactor: update runAgentCall and dispatchRunAgent to use structured requestProps and workflowProps

* refactor: streamline requestProps and handleToolResponse in runAgentCall and dispatchRunAgent

* refactor: restructure RunAgentCallProps and update requestProps to requestParams for clarity

* refactor: enhance interactiveEntryToolParams handling in runAgentCall for improved response management

* refactor: flatten RunAgentCallProps structure and update dispatchRunAgent to use direct properties

* fix: correct initialization of interactiveResponse in runAgentCall
Copy link

github-actions bot commented Sep 2, 2025

Preview sandbox Image:

registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-pr:fatsgpt_sandbox_470eef52fe75155e97f1fb581aee9c8358973bbd

Copy link

github-actions bot commented Sep 2, 2025

Preview mcp_server Image:

registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-pr:fatsgpt_mcp_server_573f74f29f1df7dd2667aa66175e35fbfede89f2

Copy link

github-actions bot commented Sep 2, 2025

Preview fastgpt Image:

registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-pr:fatsgpt_573f74f29f1df7dd2667aa66175e35fbfede89f2

return {
response: '',
usages: [],
isEnd: true
};
} else if (toolId === SubAppIds.plan) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: 看下这里是不是应该放到 agentCall 里

… and parameters

fix: update error handling in transferModelAgent and transferPlanAgent to return error messages
refactor: simplify isEndSign assignment in runAgentCall
cursor[bot]

This comment was marked as outdated.

@@ -181,6 +181,11 @@ export enum NodeInputKeyEnum {
aiChatResponseFormat = 'aiChatResponseFormat',
aiChatJsonSchema = 'aiChatJsonSchema',

// agent
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: 待确认输入

@c121914yu c121914yu marked this pull request as ready for review September 8, 2025 02:55
Copy link
Contributor

gru-agent bot commented Sep 8, 2025

TestGru Assignment

Summary

Link CommitId Status Reason
Detail 470eef5 🚫 Skipped No files need to be tested {"packages/service/core/ai/llm/agentCall.ts":"File path does not match include patterns.","packages/service/core/workflow/dispatch/ai/agent/constants.ts":"File path does not match include patterns.","packages/service/core/workflow/dispatch/ai/agent/index.ts":"File path does not match include patterns.","packages/service/core/workflow/dispatch/ai/agent/utils.ts":"File path does not match include patterns.","packages/service/core/workflow/dispatch/ai/sub/ask/constants.ts":"File path does not match include patterns.","packages/service/core/workflow/dispatch/ai/sub/model/constants.ts":"File path does not match include patterns.","packages/service/core/workflow/dispatch/ai/sub/model/index.ts":"File path does not match include patterns.","packages/service/core/workflow/dispatch/ai/sub/plan/constants.ts":"File path does not match include patterns.","packages/service/core/workflow/dispatch/ai/sub/plan/index.ts":"File path does not match include patterns.","packages/s…

History Assignment

Tip

You can @gru-agent and leave your feedback. TestGru will make adjustments based on your input

@c121914yu c121914yu merged commit 946b0a9 into labring:test-agent Sep 8, 2025
4 of 6 checks passed
c121914yu added a commit that referenced this pull request Sep 8, 2025
* refactor: agent call (#5572)

* feat: Add relevant functions related to agent invocation, including plan parsing, state management and tool invocation

* Refactor agent call logic and utilities

- Simplified the `runAgentCall` function by removing unnecessary complexity and restructuring the flow for better readability and maintainability.
- Introduced helper functions to create tools from tool nodes and to prepare agent messages, enhancing modularity.
- Removed the `utils.ts` file as its functions were integrated into the main logic, streamlining the codebase.
- Updated the dispatch logic in `index.ts` to utilize the new helper functions and improve clarity.
- Adjusted the handling of interactive modes and tool calls to ensure proper response formatting and error handling.

* refactor: clean up the processing logic of the interactive mode and remove the unused tool creation functions

* feat: add relevant constants for proxy configuration and update the proxy call logic

* refactor: remove unused configuration variables from workflow properties

* refactor: remove unused configuration variables from dispatchRunAgents props

* fix: build error

* refactor: update FlowNodeTypeEnum values and consolidate utility functions

* refactor: simplify conditional checks in tool call and reasoning handlers

* feat: add default agent prompt for improved response handling

* refactor: rename directory with agent->tool, agentCall->agnet

* refactor: rename dispatchRunAgents to dispatchRunAgent for consistency

* refactor: rename toolCall to tools for consistency in FlowNodeTypeEnum

* refactor: rename agents to toolCall for consistency in nodeTypes mapping

* refactor: remove unused runtimeEdges parameter from dispatchRunAgent

* refactor: update runAgentCall and dispatchRunAgent to use structured requestProps and workflowProps

* refactor: streamline requestProps and handleToolResponse in runAgentCall and dispatchRunAgent

* refactor: restructure RunAgentCallProps and update requestProps to requestParams for clarity

* refactor: enhance interactiveEntryToolParams handling in runAgentCall for improved response management

* refactor: flatten RunAgentCallProps structure and update dispatchRunAgent to use direct properties

* fix: correct initialization of interactiveResponse in runAgentCall

* agent call code

* fix: agent call stop sign

* feat: add plan agent tools and default generated prompts

* feat: add model agent tools and related functions

* chore: rename enum value

* fix: optimize isEndSign assignment and update default plan prompt format

* fix: update transferPlanAgent to use histories instead of sharedContext and rename default prompt variable

* fix: update transferPlanAgent to use ChatItemType and adapt message structure

* feat: add ModelAgentTool and PlanAgentTool with detailed descriptions and parameters
fix: update error handling in transferModelAgent and transferPlanAgent to return error messages
refactor: simplify isEndSign assignment in runAgentCall

* feat: enhance agent call handling and response processing with context support

* feat: refactor agent prompts and add utility functions for system prompt parsing

* feat: add plan agent tools and default generated prompts

* feat: add model agent tools and related functions

* chore: rename enum value

* fix: optimize isEndSign assignment and update default plan prompt format

* fix: update transferPlanAgent to use histories instead of sharedContext and rename default prompt variable

* fix: update transferPlanAgent to use ChatItemType and adapt message structure

* feat: add ModelAgentTool and PlanAgentTool with detailed descriptions and parameters
fix: update error handling in transferModelAgent and transferPlanAgent to return error messages
refactor: simplify isEndSign assignment in runAgentCall

* feat: enhance agent call handling and response processing with context support

* feat: refactor agent prompts and add utility functions for system prompt parsing

* feat: add AskAgentTool to support the interactive questioning function

* Update request.ts

---------

Co-authored-by: archer <545436317@qq.com>
c121914yu added a commit that referenced this pull request Sep 9, 2025
* refactor: agent call (#5572)

* feat: Add relevant functions related to agent invocation, including plan parsing, state management and tool invocation

* Refactor agent call logic and utilities

- Simplified the `runAgentCall` function by removing unnecessary complexity and restructuring the flow for better readability and maintainability.
- Introduced helper functions to create tools from tool nodes and to prepare agent messages, enhancing modularity.
- Removed the `utils.ts` file as its functions were integrated into the main logic, streamlining the codebase.
- Updated the dispatch logic in `index.ts` to utilize the new helper functions and improve clarity.
- Adjusted the handling of interactive modes and tool calls to ensure proper response formatting and error handling.

* refactor: clean up the processing logic of the interactive mode and remove the unused tool creation functions

* feat: add relevant constants for proxy configuration and update the proxy call logic

* refactor: remove unused configuration variables from workflow properties

* refactor: remove unused configuration variables from dispatchRunAgents props

* fix: build error

* refactor: update FlowNodeTypeEnum values and consolidate utility functions

* refactor: simplify conditional checks in tool call and reasoning handlers

* feat: add default agent prompt for improved response handling

* refactor: rename directory with agent->tool, agentCall->agnet

* refactor: rename dispatchRunAgents to dispatchRunAgent for consistency

* refactor: rename toolCall to tools for consistency in FlowNodeTypeEnum

* refactor: rename agents to toolCall for consistency in nodeTypes mapping

* refactor: remove unused runtimeEdges parameter from dispatchRunAgent

* refactor: update runAgentCall and dispatchRunAgent to use structured requestProps and workflowProps

* refactor: streamline requestProps and handleToolResponse in runAgentCall and dispatchRunAgent

* refactor: restructure RunAgentCallProps and update requestProps to requestParams for clarity

* refactor: enhance interactiveEntryToolParams handling in runAgentCall for improved response management

* refactor: flatten RunAgentCallProps structure and update dispatchRunAgent to use direct properties

* fix: correct initialization of interactiveResponse in runAgentCall

* agent call code

* fix: agent call stop sign

* feat: add plan agent tools and default generated prompts

* feat: add model agent tools and related functions

* chore: rename enum value

* fix: optimize isEndSign assignment and update default plan prompt format

* fix: update transferPlanAgent to use histories instead of sharedContext and rename default prompt variable

* fix: update transferPlanAgent to use ChatItemType and adapt message structure

* feat: add ModelAgentTool and PlanAgentTool with detailed descriptions and parameters
fix: update error handling in transferModelAgent and transferPlanAgent to return error messages
refactor: simplify isEndSign assignment in runAgentCall

* feat: enhance agent call handling and response processing with context support

* feat: refactor agent prompts and add utility functions for system prompt parsing

* feat: add plan agent tools and default generated prompts

* feat: add model agent tools and related functions

* chore: rename enum value

* fix: optimize isEndSign assignment and update default plan prompt format

* fix: update transferPlanAgent to use histories instead of sharedContext and rename default prompt variable

* fix: update transferPlanAgent to use ChatItemType and adapt message structure

* feat: add ModelAgentTool and PlanAgentTool with detailed descriptions and parameters
fix: update error handling in transferModelAgent and transferPlanAgent to return error messages
refactor: simplify isEndSign assignment in runAgentCall

* feat: enhance agent call handling and response processing with context support

* feat: refactor agent prompts and add utility functions for system prompt parsing

* feat: add AskAgentTool to support the interactive questioning function

* Update request.ts

---------

Co-authored-by: archer <545436317@qq.com>
c121914yu added a commit that referenced this pull request Sep 9, 2025
* refactor: agent call (#5572)

* feat: Add relevant functions related to agent invocation, including plan parsing, state management and tool invocation

* Refactor agent call logic and utilities

- Simplified the `runAgentCall` function by removing unnecessary complexity and restructuring the flow for better readability and maintainability.
- Introduced helper functions to create tools from tool nodes and to prepare agent messages, enhancing modularity.
- Removed the `utils.ts` file as its functions were integrated into the main logic, streamlining the codebase.
- Updated the dispatch logic in `index.ts` to utilize the new helper functions and improve clarity.
- Adjusted the handling of interactive modes and tool calls to ensure proper response formatting and error handling.

* refactor: clean up the processing logic of the interactive mode and remove the unused tool creation functions

* feat: add relevant constants for proxy configuration and update the proxy call logic

* refactor: remove unused configuration variables from workflow properties

* refactor: remove unused configuration variables from dispatchRunAgents props

* fix: build error

* refactor: update FlowNodeTypeEnum values and consolidate utility functions

* refactor: simplify conditional checks in tool call and reasoning handlers

* feat: add default agent prompt for improved response handling

* refactor: rename directory with agent->tool, agentCall->agnet

* refactor: rename dispatchRunAgents to dispatchRunAgent for consistency

* refactor: rename toolCall to tools for consistency in FlowNodeTypeEnum

* refactor: rename agents to toolCall for consistency in nodeTypes mapping

* refactor: remove unused runtimeEdges parameter from dispatchRunAgent

* refactor: update runAgentCall and dispatchRunAgent to use structured requestProps and workflowProps

* refactor: streamline requestProps and handleToolResponse in runAgentCall and dispatchRunAgent

* refactor: restructure RunAgentCallProps and update requestProps to requestParams for clarity

* refactor: enhance interactiveEntryToolParams handling in runAgentCall for improved response management

* refactor: flatten RunAgentCallProps structure and update dispatchRunAgent to use direct properties

* fix: correct initialization of interactiveResponse in runAgentCall

* agent call code

* fix: agent call stop sign

* feat: add plan agent tools and default generated prompts

* feat: add model agent tools and related functions

* chore: rename enum value

* fix: optimize isEndSign assignment and update default plan prompt format

* fix: update transferPlanAgent to use histories instead of sharedContext and rename default prompt variable

* fix: update transferPlanAgent to use ChatItemType and adapt message structure

* feat: add ModelAgentTool and PlanAgentTool with detailed descriptions and parameters
fix: update error handling in transferModelAgent and transferPlanAgent to return error messages
refactor: simplify isEndSign assignment in runAgentCall

* feat: enhance agent call handling and response processing with context support

* feat: refactor agent prompts and add utility functions for system prompt parsing

* feat: add plan agent tools and default generated prompts

* feat: add model agent tools and related functions

* chore: rename enum value

* fix: optimize isEndSign assignment and update default plan prompt format

* fix: update transferPlanAgent to use histories instead of sharedContext and rename default prompt variable

* fix: update transferPlanAgent to use ChatItemType and adapt message structure

* feat: add ModelAgentTool and PlanAgentTool with detailed descriptions and parameters
fix: update error handling in transferModelAgent and transferPlanAgent to return error messages
refactor: simplify isEndSign assignment in runAgentCall

* feat: enhance agent call handling and response processing with context support

* feat: refactor agent prompts and add utility functions for system prompt parsing

* feat: add AskAgentTool to support the interactive questioning function

* Update request.ts

---------

Co-authored-by: archer <545436317@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants