-
Notifications
You must be signed in to change notification settings - Fork 27
feat: Add system tags to AI generated files #406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Marcel Klehr <[email protected]>
Signed-off-by: Marcel Klehr <[email protected]>
Signed-off-by: Marcel Klehr <[email protected]>
| public function getAiTag() { | ||
| try { | ||
| return $this->systemTagManager->getTag(self::AI_TAG_NAME, true, true); | ||
| } catch (TagNotFoundException $e) { | ||
| return $this->systemTagManager->createTag(self::AI_TAG_NAME, true, true); | ||
| } | ||
| } | ||
|
|
||
| /** | ||
| * @param string $fileId | ||
| * @return void | ||
| * @throws TagNotFoundException | ||
| */ | ||
| public function assignAiTagToFile(string $fileId) { | ||
| $this->systemTagObjectMapper->assignTags($fileId, 'files', $this->getAiTag()->getId()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps the tag can be created in a migration so we're sure it exists and then store the tag's ID in a config. It might be a little better to not create ISystemTag every time or is it not that impactful?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps the tag can be created in a migration so we're sure it exists
can they be deleted by users? If yes, then ignore this review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes :)
julien-nc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, works well.
No description provided.