Skip to content

fixing agent key to accept numbers - issue #80#165

Merged
cornelcroi merged 4 commits into
2FastLabs:mainfrom
RanaElwaseef21:feature/fixing-agent-name
Dec 26, 2024
Merged

fixing agent key to accept numbers - issue #80#165
cornelcroi merged 4 commits into
2FastLabs:mainfrom
RanaElwaseef21:feature/fixing-agent-name

Conversation

@RanaElwaseef21
Copy link
Copy Markdown
Contributor

@RanaElwaseef21 RanaElwaseef21 commented Dec 22, 2024

Issue number:
#80

Summary

Changing agent id regex to accept digits all changes in agent file only in both python and typescript
added unit test for this new regex

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.

@tica3467
Copy link
Copy Markdown

Hey sorry am.back now I.domt have time f0r born aga8h or shit

@tica3467
Copy link
Copy Markdown

Not possible

@tica3467
Copy link
Copy Markdown

Bring good Charm Charming Charming Good Charming

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.

3 participants