Skip to content

feat: Add system tags to AI generated files - #406

Merged
marcelklehr merged 3 commits into
mainfrom
feat/ai-tagging
Dec 3, 2025
Merged

feat: Add system tags to AI generated files#406
marcelklehr merged 3 commits into
mainfrom
feat/ai-tagging

Conversation

@marcelklehr

Copy link
Copy Markdown
Member

No description provided.

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Comment thread lib/Service/SystemTagService.php
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes :)

@julien-nc julien-nc left a comment

Copy link
Copy Markdown
Member

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.

3 participants