Refactor action registration to use a decorator for user-friendly descriptions

This commit is contained in:
trojanhorse47
2025-10-31 13:55:59 +01:00
parent 2803263bed
commit 0598e58708
7 changed files with 48 additions and 38 deletions

View File

@@ -58,7 +58,7 @@ class ChatManager:
"""
self.inputs.user_query = message
pipeline = Pipeline(self.inputs)
listeners: list[tuple[PipelineEvent, Callable[[Any], str | None]]] = [
listeners: list[tuple[PipelineEvent, Callable[[Any], str | None]]] = [ # type: ignore
(PipelineEvent.QUERY_CHECK, lambda _: "🔍 Sto controllando la tua richiesta..."),
(PipelineEvent.INFO_RECOVERY, lambda _: "📊 Sto recuperando i dati (mercato, news, social)..."),
(PipelineEvent.REPORT_GENERATION, lambda _: "✍️ Sto scrivendo il report finale..."),