He utilizado escenas con la acción « Pedir a la IA », y me di cuenta más tarde de que algunas habían dado lugar a la creación de una escena. Pero como no sé cómo se han nombrado y tengo cientos de escenas, es difícil encontrarlas para ‹ limpiar ›.
Sería necesario poder filtrar las escenas creadas por la IA. Ya sea con un botón dedicado, o haciendo que una etiqueta « creado por la IA » se aplique sistemáticamente a este tipo de escenas.
Idealmente, sería necesario que este filtro funcione incluso en las escenas creadas recientemente, y no solo en las futuras…
Para las noticias nuevas, es fácil. Para las antiguas, creo que no hay ningún medio técnicamente posible.
¡Hola a todos!
Este tema ahora está en desarrollo .
Se ha abierto una PR para etiquetar automáticamente las escenas creadas por IA y corregir el filtro por etiquetas:
master ← cicoub13:claude/filter-ai-generated-scenes-pcgaoc
ouvert 12:56PM - 07 Sep 26 UTC
### Description
Scenes created by the AI through the `scene.create` tool — re… achable from the "Ask AI" scene action, the AI chat and external MCP clients — were indistinguishable from hand-made ones. With hundreds of scenes there is no way to find them back to clean them up, since you don't know how the AI named them.
Every scene created that way now automatically carries the `AI` tag. The existing scene card badge and the "Filter by tags" dropdown already handle tags, so **no front-end change is needed**: the `AI` entry shows up in the filter as soon as the first AI-created scene exists.
Tags supplied by the model are kept, deduplicated case-insensitively (`t_tag_scene` has a composite primary key `(scene_id, name)`, so a duplicate name would fail the insert), and the AI tag is always stored with its canonical casing since the filter matches on an exact name.
**The tag filter had to be fixed first.** `scene.get` matched tag names with a substring `LIKE '%tag%'`, then grouped the matched rows by the tag name actually found and intersected the groups. With a short tag like `AI`, `%AI%` also matches `Maison`, `Salaire`, … and those unrelated groups were then intersected together, so the filter returned nothing. The front only ever sends exact tag names picked from the dropdown (`SceneTagFilter.jsx`), so the lookup now matches on the exact name. Requested tags that no scene carries also get their own empty group, which keeps the AND semantics when several tags are selected — previously such a tag was silently ignored and widened the result set.
Known limitation: scenes created by the AI *before* this change are not tagged retroactively.
## Forum
Forum: https://community.gladysassistant.com/t/pouvoir-filtrer-les-scenes-qui-ont-ete-generees-par-lia/10817
### Checklist
- [x] Tests pass: `cd server && npm run coverage` (Codecov requires 100% coverage on changed lines) and Cypress (`npm run cypress:run`) if the UI changed
- [x] Linter and prettier pass on both front and server (`npm run eslint`, `npm run prettier`)
- [x] No undocumented breaking change
Coverage on the changed files is 100% statements/branches/functions/lines for `lib/scene/scene.get.js` and `utils/constants.js`; the only uncovered lines reported in `services/mcp/lib/buildSchemas.js` are pre-existing ones in the `device.turn-on-off` tool, outside this diff. Cypress was not re-run because no front-end file changed.
7 tests were added: the AI tag being applied with and without model-supplied tags, deduplication and canonical casing, exact-vs-substring tag matching, and filtering on a tag no scene carries.
## Summary by CodeRabbit
* **New Features**
* Scenes created through the AI scene creation tool are automatically tagged “AI.”
* Existing tags are preserved, while duplicate AI tags are avoided.
* **Bug Fixes**
* Scene searches now match complete tag names rather than partial matches.
* Searches requiring multiple tags correctly return no results when any requested tag is missing.
* Tag searches now work safely for names that resemble built-in object properties.
No duden en seguir la PR, probar (opcional, especialmente para pequeñas solicitudes) y dar sus comentarios aquí si es necesario.