agent-squad icon indicating copy to clipboard operation
agent-squad copied to clipboard

fixing agent key to accept numbers - issue #80

Open RanaElwaseef21 opened this issue 1 year ago • 0 comments

Issue number: #80

Summary

Changing agent id regex to accept digits all changes in agent file only in both python and typescript

Changes

Python Prev : key = re.sub(r"[^a-zA-Z\s-]", "", name) New : key = re.sub(r"[^a-zA-Z0-9\s-]", "", name)

Typescript :

Prev : .replace(/[^a-zA-Z\s-]/g, "")) New : .replace(/[^a-zA-Z0-9\s-]/g, ""))

Please provide a summary of what's being changed

Agent id now can have digits in it .

User experience

Please share what the user experience looks like before and after this change

Previously, if the user had an agent ID containing digits, the numbers would be removed. Now, the numbers will be retained.

Examples before here if user changed the digit it will return agent already exists

Agent Name: Image2-You
Agent ID: image-you

Agent Name: Image4-You
Agent ID: image-you

Example after :

 Agent Name: Image2-You
Agent ID: image2-you

Agent Name: Image4-You
Agent ID: image4-you

Checklist

If your change doesn't seem to apply, please leave them unchecked.

  • [ 👍 ] I have performed a self-review of this change
  • [👍 ] Changes have been tested
  • [ ] Changes are documented
Is this a breaking change?

RFC issue number:

Checklist:

  • [ ] Migration process documented
  • [ ] Implement warnings (if it can live side by side)

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

RanaElwaseef21 avatar Dec 22 '24 13:12 RanaElwaseef21