Skip to content

[chore: grouped allwedusers, users, responseStyle, tone, response_foramt, reasponseStylePrompt , fallback and guardrails under settings#879

Open
Anushtha-Rathore wants to merge 1 commit intoWalkover-Web-Solution:testingfrom
Anushtha-Rathore:settings-field-updates
Open

[chore: grouped allwedusers, users, responseStyle, tone, response_foramt, reasponseStylePrompt , fallback and guardrails under settings#879
Anushtha-Rathore wants to merge 1 commit intoWalkover-Web-Solution:testingfrom
Anushtha-Rathore:settings-field-updates

Conversation

@Anushtha-Rathore
Copy link
Copy Markdown
Contributor

[chore: grouped allwedusers, users, responseStyle, tone, response_foramt, reasponseStylePrompt , fallback and guardrails under settings

Copy link
Copy Markdown
Contributor

@windsurf-bot windsurf-bot bot left a comment

Choose a reason for hiding this comment

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

Other comments (6)
  • src/controllers/agentConfig.controller.js (173-176) The PR removes `response_format` and `fall_back` objects but doesn't show how these are now structured within the new `settings` object. Make sure that any code that previously accessed these fields is updated to use the new path (`settings.response_format`, `settings.fall_back`, etc.) to prevent undefined behavior.
  • src/controllers/agentConfig.controller.js (206-206) The PR removes the default value for `fall_back` when creating an agent but doesn't provide a default value for the new `settings` field. Consider adding a default structure for `settings` to ensure backward compatibility with code that might expect certain fields to exist.
  • src/controllers/template.controller.js (219-219) The `response_format` field is added to FILTER_BRIDGE_EXCLUDE_KEYS and removed from direct initialization in model_data, but I don't see where it's being initialized under the new settings structure. This could lead to undefined behavior if code elsewhere expects this field to be initialized.
  • src/controllers/template.controller.js (428-428) The `response_format` initialization is also removed from child agent creation without replacement. For consistency, if this field is now expected to be under settings, there should be a similar initialization pattern for child agents.
  • src/controllers/agentConfig.controller.js (321-327) The PR title mentions grouping several fields under settings (allowedusers, users, responseStyle, tone, response_format, responseStylePrompt, fallback, guardrails) but the diff only shows changes for `fall_back` and `guardrails`. Please ensure all mentioned fields are properly migrated to the settings object.
  • src/validation/joi_validation/agentConfig.validation.js (87-87) There are typos in the PR title and description: 'allwedusers' should be 'allowedUsers', 'response_foramt' should be 'response_format', and 'reasponseStylePrompt' should be 'responseStylePrompt'. Consider updating these for clarity.

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

{
"page_config.availability": "private",
"page_config.allowedUsers": userEmail
"settings.publicUsers": userEmail
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.

There's an inconsistency between the PR title/description (which mentions 'allwedusers') and the actual code changes (which rename 'allowedUsers' to 'publicUsers'). Please update either the PR title/description or the code to ensure consistency.

Comment on lines +1160 to 1169
criteria_check: 1,
"settings.publicUsers": 1,
"settings.responseStyle": 1,
"settings.tone": 1,
"settings.responseStylePrompt": 1,
"settings.tonePrompt": 1,
"settings.response_format": 1,
"settings.fall_back": 1,
"settings.guardrails": 1
})
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.

This PR moves fields from the root level or page_config namespace to the settings namespace. Is there a data migration plan to handle existing documents that use the old field structure? Without migration, this change might break functionality for existing agents.

service: Joi.string().optional(),
model: Joi.string().optional()
settings: Joi.object({
publicUsers: Joi.array().items(Joi.string()).optional(),
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.

The PR title mentions 'allowedUsers', but the code adds 'publicUsers'. Is this intentional or should these be the same field name?

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.

1 participant