Skip to content

Conversation

@marcelklehr
Copy link
Member

No description provided.

Signed-off-by: Marcel Klehr <[email protected]>
Signed-off-by: Marcel Klehr <[email protected]>
Comment on lines +27 to +41
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());
Copy link
Contributor

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?

Copy link
Contributor

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes :)

Copy link
Member

@julien-nc julien-nc left a 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.

@marcelklehr marcelklehr merged commit 9356650 into main Dec 3, 2025
17 checks passed
@marcelklehr marcelklehr deleted the feat/ai-tagging branch December 3, 2025 10:14
@janepie janepie mentioned this pull request Dec 9, 2025
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.

4 participants