-
Notifications
You must be signed in to change notification settings - Fork 64
add agent rule action #421
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
base: main
Are you sure you want to change the base?
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||
PR Type
Enhancement
Description
Add agent rule action support with dropdown selection
Implement action configuration editor using JSON format
Load action options from backend API endpoint
Add CodeMirror JSON language support dependency
Diagram Walkthrough
File Walkthrough
agent-rule.svelte
Add action selection and configuration UIsrc/routes/page/agent/[agentId]/agent-components/agent-rule.svelte
getAgentRuleActionsservice andCodeScriptcomponentactionOptionsstate variable andloadAgentRuleActions()functionchangeAction()andtoggleAction()handlers for actionmanagement
changeContent()to handle action config JSON parsingonMount()to use Promise.all for parallel loading_agent.scss
Add styling for action config editorsrc/lib/scss/custom/pages/_agent.scss
.agent-action-configCSS class with height constraintsdisplay
agentTypes.js
Define AgentAction and AgentRule typessrc/lib/helpers/types/agentTypes.js
actionproperty toAgentRuletypedefAgentActiontypedef with name, disabled, and configproperties
agent-service.js
Add getAgentRuleActions service functionsrc/lib/services/agent-service.js
getAgentRuleActions()async functionagentRuleActionsUrlendpointapi-endpoints.js
Add rule actions API endpointsrc/lib/services/api-endpoints.js
agentRuleActionsUrlendpoint pointing to/rule/actionspackage.json
Add CodeMirror JSON language supportpackage.json
@codemirror/lang-jsondependency version ^6.0.2