Skip to content

chore: updataed for connected-tools new field#884

Open
Anushtha-Rathore wants to merge 1 commit into
Walkover-Web-Solution:testingfrom
Anushtha-Rathore:connected-tools-field-updateasa
Open

chore: updataed for connected-tools new field#884
Anushtha-Rathore wants to merge 1 commit into
Walkover-Web-Solution:testingfrom
Anushtha-Rathore:connected-tools-field-updateasa

Conversation

@Anushtha-Rathore

Copy link
Copy Markdown
Contributor

merge d firelds under connected tools

@windsurf-bot windsurf-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Other comments (11)
  • src/controllers/agentConfig.controller.js (422-422) You're using MongoDB's dot notation (`update_fields["connected_tools.variables_path"]`) for updating nested fields, but this is inconsistent with how you're updating the entire `connected_tools` object elsewhere. This could lead to conflicts if both updates happen. Consider consolidating these updates into the merged_connected_tools object instead.
  • src/controllers/template.controller.js (90-92) This PR moves several fields under a new `connected_tools` object, but there's no clear migration strategy for existing data. Consider adding a migration script or ensuring backward compatibility for agents created before this change.
  • src/db_services/agentVersion.service.js (433-435) The code is being updated to use `connected_tools.function_ids` instead of `function_ids`, but there's no migration path for existing data. Consider adding a migration script or ensuring backward compatibility by checking both locations in all relevant functions.
  • src/controllers/template.controller.js (221-223) Several fields were removed from `template_fields` array (variables_state, built_in_tools, variables_path) without explanation. If these fields contained important data, this change could lead to data loss when creating agents from templates.
  • src/db_services/configuration.service.js (1066-1066) There's an inconsistency in how function_ids_for_lookup is handled. In line 1066 it's used directly as a string literal, but in line 703 it's wrapped with $ifNull. For consistency, line 1066 should also use $ifNull:
                  input: { $ifNull: ["$function_ids_for_lookup", []] },
    
  • src/db_services/agentVersion.service.js (168-170) There's an inconsistency in how you're checking for the existence of connected agents. On line 168, you check if `"connected_tools.connected_agents"` exists, but on line 170 you use optional chaining `agent.connected_tools?.connected_agents`. For consistency, you should either:
    1. Check for existence of connected_tools first: { org_id, connected_tools: { $exists: true } }
    2. Or use dot notation in the assignment: const connectedAgents = (agent.connected_tools && agent.connected_tools.connected_agents) || {}
  • src/db_services/configuration.service.js (1185-1190) This code is duplicating data by setting both agent.function_ids and agent.connected_tools.function_ids. Since you're migrating to the connected_tools structure, consider removing this duplication to avoid confusion about which field should be used.
  • src/db_services/agentVersion.service.js (189-191) Similar to the issue above, there's an inconsistency between how you check for existence of connected agents in versions. You should use the same approach for consistency.
  • src/db_services/apiCall.service.js (99-103) While updating the path for `function_ids` to be under `connected_tools`, consider adding a check for documents that might still have the old structure. This could prevent potential issues if some documents haven't been migrated yet. You might want to include a migration script or handle both structures during a transition period.
  • src/controllers/agentConfig.controller.js (268-275) The PR title contains a typo: 'chore: updataed for connected-tools new field' should be 'chore: updated for connected-tools new field'
  • src/controllers/template.controller.js (90-90) The PR title contains a typo: 'updataed' should be 'updated'.

💡 To request another review, post a new comment with "/windsurf-review".

Comment thread src/validation/joi_validation/agentConfig.validation.js Outdated
Comment thread src/validation/joi_validation/agentConfig.validation.js Outdated
Comment thread src/controllers/agentConfig.controller.js Outdated
@Anushtha-Rathore Anushtha-Rathore force-pushed the connected-tools-field-updateasa branch from db777f6 to a0c16bd Compare April 3, 2026 10:13
Comment thread migrations/mongo/connectedToolsMigration.js Outdated
@Anushtha-Rathore Anushtha-Rathore force-pushed the connected-tools-field-updateasa branch from a0c16bd to f1a3f46 Compare April 6, 2026 09:52
@Natwar589

Copy link
Copy Markdown
Collaborator

Your card was not found on the dbdash with the branch connected-tools-field-updateasa

@Anushtha-Rathore Anushtha-Rathore force-pushed the connected-tools-field-updateasa branch from f1a3f46 to ceb93ac Compare April 6, 2026 10:15
@Natwar589

Copy link
Copy Markdown
Collaborator

Your card was not found on the dbdash with the branch connected-tools-field-updateasa

Comment thread src/controllers/agentConfig.controller.js Outdated
Comment thread migrations/mongo/connectedToolsMigration.js Outdated
Comment thread src/controllers/agentConfig.controller.js Outdated
@Natwar589

Copy link
Copy Markdown
Collaborator

Your card was not found on the dbdash with the branch connected-tools-field-updateasa

1 similar comment
@Natwar589

Copy link
Copy Markdown
Collaborator

Your card was not found on the dbdash with the branch connected-tools-field-updateasa

…with MongoDB migration and controller updates
@Natwar589 Natwar589 force-pushed the connected-tools-field-updateasa branch from 2ff7f03 to 32cd171 Compare May 14, 2026 07:18
@Natwar589

Copy link
Copy Markdown
Collaborator

Your card was not found on the dbdash with the branch connected-tools-field-updateasa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants