feat: Add 'None' option to remove assigned agents/teams in macros and automations

- Add 'None' option (with id: 'nil') to agent and team assignment dropdowns in macros
- Deprecate remove_assigned_team action in favor of assign_team with 'None' option
- Update helper functions to properly display 'None' for unassignment
- Add comprehensive test coverage for the new functionality
- Maintain backward compatibility with existing remove_assigned_team action

Fixes #7551

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Sojan Jose
2025-08-12 13:07:19 +02:00
co-authored by Claude
parent b4f758f644
commit 8aa37907c0
6 changed files with 53 additions and 11 deletions
@@ -19,6 +19,8 @@ export const MACRO_ACTION_TYPES = [
label: 'REMOVE_LABEL',
inputType: 'multi_select',
},
// @deprecated: Use assign_team with 'None' option instead
// Kept for backward compatibility
{
key: 'remove_assigned_team',
label: 'REMOVE_ASSIGNED_TEAM',
@@ -17,6 +17,7 @@ export const resolveActionName = key => {
export const resolveTeamIds = (teams, ids) => {
return ids
.map(id => {
if (id === 'nil') return 'None';
const team = teams.find(i => i.id === id);
return team ? team.name : '';
})
@@ -35,6 +36,8 @@ export const resolveLabels = (labels, ids) => {
export const resolveAgents = (agents, ids) => {
return ids
.map(id => {
if (id === 'nil') return 'None';
if (id === 'self') return 'Self';
const agent = agents.find(i => i.id === id);
return agent ? agent.name : '';
})