feat(autocomplete): add native tag autocomplete for prompt textareas

This commit is contained in:
CalamitousFelicitousness
2026-03-26 00:45:26 +00:00
parent 5312265d27
commit d4d5bce3b9
6 changed files with 471 additions and 18 deletions
+2 -2
View File
@@ -145,9 +145,9 @@ class Api:
# hide trailing-slash duplicates from OpenAPI schema
from fastapi.routing import APIRoute
paths = {r.path for r in self.app.routes if hasattr(r, 'path')}
route_paths = {r.path for r in self.app.routes if hasattr(r, 'path')}
for route in self.app.routes:
if isinstance(route, APIRoute) and len(route.path) > 1 and route.path.endswith('/') and route.path[:-1] in paths:
if isinstance(route, APIRoute) and len(route.path) > 1 and route.path.endswith('/') and route.path[:-1] in route_paths:
route.include_in_schema = False
# upload api