Skip to content

refactor: migrate core, models, tasks, events and schedule to sessionmaker pattern#34381

Open
xr843 wants to merge 11 commits intolanggenius:mainfrom
xr843:refactor/sessionmaker-core
Open

refactor: migrate core, models, tasks, events and schedule to sessionmaker pattern#34381
xr843 wants to merge 11 commits intolanggenius:mainfrom
xr843:refactor/sessionmaker-core

Conversation

@xr843
Copy link
Copy Markdown
Contributor

@xr843 xr843 commented Apr 1, 2026

Summary

Part of #24245. Migrate Session(db.engine) + manual session.commit() to sessionmaker(db.engine).begin() context manager across core, models, tasks, events, schedule, and extensions modules.

Continues the migration after #34379 (service_api + inner_api) and the services layer PR.

Changes

37 files across these directories:

  • api/core/ — app logic, entities, tools, workflow nodes, RAG, ops, MCP, plugin
  • api/models/ — model.py, account.py
  • api/tasks/ — rag_pipeline, app_generate
  • api/events/ — event handlers
  • api/schedule/ — scheduled tasks
  • api/extensions/ — logstore repositories

Specific changes:

  • Replace Session(db.engine) with sessionmaker(db.engine).begin()
  • Replace Session(db.engine, expire_on_commit=False) with sessionmaker(db.engine, expire_on_commit=False).begin()
  • Remove manual session.commit() calls (handled automatically by the context manager)
  • Replace session.commit() with session.flush() where followed by session.refresh()
  • Preserve expire_on_commit=False and autoflush=False where applicable
  • Update imports: add sessionmaker, remove unused Session imports

Closes part of #24245

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. refactor labels Apr 1, 2026
@asukaminato0721
Copy link
Copy Markdown
Contributor

fix conflict

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-04-01 16:15:22.076853252 +0000
+++ /tmp/pyrefly_pr.txt	2026-04-01 16:15:09.987840123 +0000
@@ -24,12 +24,14 @@
   --> controllers/console/version.py:30:2
 ERROR Runtime checkable protocol `Generator` has an unsafe overlap with type `Generator[LLMResultChunk] | LLMResult` [unsafe-overlap]
    --> core/agent/fc_agent_runner.py:114:35
+ERROR Could not find name `Session` [unknown-name]
+   --> core/app/apps/common/workflow_response_converter.py:331:18
 ERROR Class member `EasyUIBasedGenerateTaskPipeline._application_generate_entity` overrides parent class `BasedGenerateTaskPipeline` in an inconsistent manner [bad-override]
   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:75:5
 ERROR `+=` is not supported between `list[PromptMessageContentUnionTypes]` and `str` [unsupported-operation]
-   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:325:29
+   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:323:29
 ERROR Argument `list[Unknown]` is not assignable to parameter `value` with type `SQLCoreOperations[dict[str, Any]] | dict[str, Any]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
-   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:392:27
+   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:390:27
 ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[UserPromptMessage], model_parameters=dict[str, int], stream=Literal[False]) [no-matching-overload]
   --> core/llm_generator/llm_generator.py:74:60
 ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[UserPromptMessage], model_parameters=dict[str, float | int], stream=Literal[False]) [no-matching-overload]
@@ -61,9 +63,9 @@
 ERROR Argument `dict[str, int | str | None]` is not assignable to parameter `attributes` with type `dict[str, str] | None` in function `mlflow.tracing.fluent.start_span_no_context` [bad-argument-type]
    --> core/ops/mlflow_trace/mlflow_trace.py:415:24
 ERROR Class member `OpsTraceProviderConfigMap.__getitem__` overrides parent class `UserDict` in an inconsistent manner [bad-param-name-override]
-   --> core/ops/ops_trace_manager.py:199:9
+   --> core/ops/ops_trace_manager.py:200:9
 ERROR Object of class `dict` has no attribute `model_dump` [missing-attribute]
-    --> core/ops/ops_trace_manager.py:1521:32
+    --> core/ops/ops_trace_manager.py:1522:32
 ERROR Runtime checkable protocol `Generator` has an unsafe overlap with type `BaseModel | Generator[BaseModel | Mapping[Unknown, Unknown] | str] | Mapping[Unknown, Unknown]` [unsafe-overlap]
   --> core/plugin/backwards_invocation/base.py:10:33
 ERROR Runtime checkable protocol `Generator` has an unsafe overlap with type `Generator[LLMResultChunkWithStructuredOutput] | LLMResultWithStructuredOutput` [unsafe-overlap]
@@ -354,6 +356,18 @@
   --> core/tools/utils/web_reader_tool.py:66:35
 ERROR `list[Never]` is not assignable to attribute `tools` with type `Never` [bad-assignment]
    --> core/tools/workflow_as_tool/provider.py:237:26
+ERROR Cannot find module `dify_graph.enums` [missing-import]
+  --> core/workflow/nodes/agent/message_transformer.py:11:1
+ERROR Cannot find module `dify_graph.file` [missing-import]
+  --> core/workflow/nodes/agent/message_transformer.py:12:1
+ERROR Cannot find module `dify_graph.model_runtime.entities.llm_entities` [missing-import]
+  --> core/workflow/nodes/agent/message_transformer.py:13:1
+ERROR Cannot find module `dify_graph.model_runtime.utils.encoders` [missing-import]
+  --> core/workflow/nodes/agent/message_transformer.py:14:1
+ERROR Cannot find module `dify_graph.node_events` [missing-import]
+  --> core/workflow/nodes/agent/message_transformer.py:15:1
+ERROR Parse error: Expected one or more symbol names after import [parse-error]
+  --> core/workflow/nodes/agent/message_transformer.py:15:37
 ERROR Object of class `NoneType` has no attribute `instrument` [missing-attribute]
   --> extensions/otel/runtime.py:96:9
 ERROR Cannot index into `Literal['']` [bad-index]

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-04-01 23:37:48.660975750 +0000
+++ /tmp/pyrefly_pr.txt	2026-04-01 23:37:37.222675293 +0000
@@ -24,12 +24,14 @@
   --> controllers/console/version.py:30:2
 ERROR Runtime checkable protocol `Generator` has an unsafe overlap with type `Generator[LLMResultChunk] | LLMResult` [unsafe-overlap]
    --> core/agent/fc_agent_runner.py:114:35
+ERROR Could not find name `Session` [unknown-name]
+   --> core/app/apps/common/workflow_response_converter.py:331:18
 ERROR Class member `EasyUIBasedGenerateTaskPipeline._application_generate_entity` overrides parent class `BasedGenerateTaskPipeline` in an inconsistent manner [bad-override]
   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:75:5
 ERROR `+=` is not supported between `list[PromptMessageContentUnionTypes]` and `str` [unsupported-operation]
-   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:325:29
+   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:323:29
 ERROR Argument `list[Unknown]` is not assignable to parameter `value` with type `SQLCoreOperations[dict[str, Any]] | dict[str, Any]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
-   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:392:27
+   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:390:27
 ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[UserPromptMessage], model_parameters=dict[str, int], stream=Literal[False]) [no-matching-overload]
   --> core/llm_generator/llm_generator.py:74:60
 ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[UserPromptMessage], model_parameters=dict[str, float | int], stream=Literal[False]) [no-matching-overload]
@@ -61,9 +63,9 @@
 ERROR Argument `dict[str, int | str | None]` is not assignable to parameter `attributes` with type `dict[str, str] | None` in function `mlflow.tracing.fluent.start_span_no_context` [bad-argument-type]
    --> core/ops/mlflow_trace/mlflow_trace.py:415:24
 ERROR Class member `OpsTraceProviderConfigMap.__getitem__` overrides parent class `UserDict` in an inconsistent manner [bad-param-name-override]
-   --> core/ops/ops_trace_manager.py:199:9
+   --> core/ops/ops_trace_manager.py:200:9
 ERROR Object of class `dict` has no attribute `model_dump` [missing-attribute]
-    --> core/ops/ops_trace_manager.py:1521:32
+    --> core/ops/ops_trace_manager.py:1522:32
 ERROR Runtime checkable protocol `Generator` has an unsafe overlap with type `BaseModel | Generator[BaseModel | Mapping[Unknown, Unknown] | str] | Mapping[Unknown, Unknown]` [unsafe-overlap]
   --> core/plugin/backwards_invocation/base.py:10:33
 ERROR Runtime checkable protocol `Generator` has an unsafe overlap with type `Generator[LLMResultChunkWithStructuredOutput] | LLMResultWithStructuredOutput` [unsafe-overlap]

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-04-01 23:39:55.756008946 +0000
+++ /tmp/pyrefly_pr.txt	2026-04-01 23:39:45.246040575 +0000
@@ -24,12 +24,14 @@
   --> controllers/console/version.py:30:2
 ERROR Runtime checkable protocol `Generator` has an unsafe overlap with type `Generator[LLMResultChunk] | LLMResult` [unsafe-overlap]
    --> core/agent/fc_agent_runner.py:114:35
+ERROR Could not find name `Session` [unknown-name]
+   --> core/app/apps/common/workflow_response_converter.py:330:18
 ERROR Class member `EasyUIBasedGenerateTaskPipeline._application_generate_entity` overrides parent class `BasedGenerateTaskPipeline` in an inconsistent manner [bad-override]
   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:75:5
 ERROR `+=` is not supported between `list[PromptMessageContentUnionTypes]` and `str` [unsupported-operation]
-   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:325:29
+   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:323:29
 ERROR Argument `list[Unknown]` is not assignable to parameter `value` with type `SQLCoreOperations[dict[str, Any]] | dict[str, Any]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
-   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:392:27
+   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:390:27
 ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[UserPromptMessage], model_parameters=dict[str, int], stream=Literal[False]) [no-matching-overload]
   --> core/llm_generator/llm_generator.py:74:60
 ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[UserPromptMessage], model_parameters=dict[str, float | int], stream=Literal[False]) [no-matching-overload]

@xr843 xr843 requested a review from laipz8200 as a code owner April 2, 2026 04:33
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-04-02 04:34:27.438316980 +0000
+++ /tmp/pyrefly_pr.txt	2026-04-02 04:34:16.883348509 +0000
@@ -27,9 +27,9 @@
 ERROR Class member `EasyUIBasedGenerateTaskPipeline._application_generate_entity` overrides parent class `BasedGenerateTaskPipeline` in an inconsistent manner [bad-override]
   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:75:5
 ERROR `+=` is not supported between `list[PromptMessageContentUnionTypes]` and `str` [unsupported-operation]
-   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:325:29
+   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:323:29
 ERROR Argument `list[Unknown]` is not assignable to parameter `value` with type `SQLCoreOperations[dict[str, Any]] | dict[str, Any]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
-   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:392:27
+   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:390:27
 ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[UserPromptMessage], model_parameters=dict[str, int], stream=Literal[False]) [no-matching-overload]
   --> core/llm_generator/llm_generator.py:74:60
 ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[UserPromptMessage], model_parameters=dict[str, float | int], stream=Literal[False]) [no-matching-overload]
@@ -7182,11 +7182,11 @@
 ERROR Argument `dict[str, bool]` is not assignable to parameter `substitutions` with type `Mapping[str, str]` in function `tasks.mail_inner_task._render_template_with_strategy` [bad-argument-type]
     --> tests/unit_tests/tasks/test_mail_send_task.py:1300:64
 ERROR Argument `Iterator[Any]` is not assignable to parameter `response_stream` with type `Generator[BaseModel | Mapping[str, Any] | str]` in function `tasks.app_generate.workflow_execute_task._publish_streaming_response` [bad-argument-type]
-  --> tests/unit_tests/tasks/test_workflow_execute_task.py:55:33
+  --> tests/unit_tests/tasks/test_workflow_execute_task.py:54:33
 ERROR Argument `UUID` is not assignable to parameter `workflow_run_id` with type `str` in function `tasks.app_generate.workflow_execute_task._publish_streaming_response` [bad-argument-type]
-  --> tests/unit_tests/tasks/test_workflow_execute_task.py:55:50
+  --> tests/unit_tests/tasks/test_workflow_execute_task.py:54:50
 ERROR Argument `Iterator[Any]` is not assignable to parameter `response_stream` with type `Generator[BaseModel | Mapping[str, Any] | str]` in function `tasks.app_generate.workflow_execute_task._publish_streaming_response` [bad-argument-type]
-  --> tests/unit_tests/tasks/test_workflow_execute_task.py:65:33
+  --> tests/unit_tests/tasks/test_workflow_execute_task.py:64:33
 ERROR Object of class `BlobChunkMessage` has no attribute `variable_name`
 ERROR Object of class `BlobChunkMessage` has no attribute `variable_name`
 ERROR Object of class `BlobChunkMessage` has no attribute `variable_value`

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-04-02 09:32:22.318573991 +0000
+++ /tmp/pyrefly_pr.txt	2026-04-02 09:32:12.148668621 +0000
@@ -19,9 +19,9 @@
 ERROR Class member `EasyUIBasedGenerateTaskPipeline._application_generate_entity` overrides parent class `BasedGenerateTaskPipeline` in an inconsistent manner [bad-override]
   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:75:5
 ERROR `+=` is not supported between `list[PromptMessageContentUnionTypes]` and `str` [unsupported-operation]
-   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:323:29
+   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:321:29
 ERROR Argument `list[Unknown]` is not assignable to parameter `value` with type `SQLCoreOperations[dict[str, Any]] | dict[str, Any]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
-   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:390:27
+   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:388:27
 ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[UserPromptMessage], model_parameters=dict[str, int], stream=Literal[False]) [no-matching-overload]
   --> core/llm_generator/llm_generator.py:74:60
 ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[UserPromptMessage], model_parameters=dict[str, float | int], stream=Literal[False]) [no-matching-overload]
@@ -5759,25 +5759,25 @@
 ERROR No matching overload found for function `list.__init__` called with arguments: (Generator[Unknown] | None) [no-matching-overload]
    --> tests/unit_tests/core/tools/test_tool_file_manager.py:253:24
 ERROR `SimpleNamespace` is not assignable to attribute `entity` with type `ToolProviderEntityWithPlugin` [bad-assignment]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:300:32
+   --> tests/unit_tests/core/tools/test_tool_manager.py:307:32
 ERROR Argument `SimpleNamespace` is not assignable to parameter `agent_tool` with type `AgentToolEntity` in function `core.tools.tool_manager.ToolManager.get_agent_tool_runtime` [bad-argument-type]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:438:32
+   --> tests/unit_tests/core/tools/test_tool_manager.py:444:32
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_tool` with type `WorkflowToolRuntimeSpec` in function `core.tools.tool_manager.ToolManager.get_workflow_tool_runtime` [bad-argument-type]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:485:35
+   --> tests/unit_tests/core/tools/test_tool_manager.py:491:35
 ERROR Argument `SimpleNamespace` is not assignable to parameter `agent_tool` with type `AgentToolEntity` in function `core.tools.tool_manager.ToolManager.get_agent_tool_runtime` [bad-argument-type]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:521:36
+   --> tests/unit_tests/core/tools/test_tool_manager.py:527:36
 ERROR Cannot set item in `dict[str, I18nObject | None]` [unsupported-operation]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:627:55
+   --> tests/unit_tests/core/tools/test_tool_manager.py:633:55
 ERROR `SimpleNamespace` is not assignable to attribute `entity` with type `ToolProviderEntityWithPlugin` [bad-assignment]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:654:32
+   --> tests/unit_tests/core/tools/test_tool_manager.py:660:32
 ERROR Argument `Literal['']` is not assignable to parameter `typ` with type `Literal['api', 'builtin', 'mcp', 'workflow'] | None` in function `core.tools.tool_manager.ToolManager.list_providers_from_api` [bad-argument-type]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:678:97
+   --> tests/unit_tests/core/tools/test_tool_manager.py:684:97
 ERROR `SimpleNamespace` is not assignable to attribute `entity` with type `ToolProviderEntityWithPlugin` [bad-assignment]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:820:30
+   --> tests/unit_tests/core/tools/test_tool_manager.py:826:30
 ERROR `SimpleNamespace` is not assignable to attribute `entity` with type `ToolProviderEntityWithPlugin` [bad-assignment]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:844:30
+   --> tests/unit_tests/core/tools/test_tool_manager.py:850:30
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:849:20
+   --> tests/unit_tests/core/tools/test_tool_manager.py:855:20
 ERROR Argument `SimpleNamespace` is not assignable to parameter `controller` with type `ToolProviderController` in function `core.tools.utils.encryption.create_tool_provider_encrypter` [bad-argument-type]
    --> tests/unit_tests/core/tools/utils/test_encryption.py:203:75
 ERROR `None` is not subscriptable [unsupported-operation]
@@ -5931,17 +5931,17 @@
 ERROR Object of class `BlobChunkMessage` has no attribute `json_object`
 ERROR Object of class `BlobChunkMessage` has no attribute `json_object`
 ERROR Argument `SimpleNamespace` is not assignable to parameter `db_provider` with type `WorkflowToolProvider` in function `core.tools.workflow_as_tool.provider.WorkflowToolProviderController._get_db_provider_tool` [bad-argument-type]
-  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:93:49
+  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:89:49
 ERROR Argument `SimpleNamespace` is not assignable to parameter `app` with type `App` in function `core.tools.workflow_as_tool.provider.WorkflowToolProviderController._get_db_provider_tool` [bad-argument-type]
-  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:93:62
+  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:89:62
 ERROR Argument `SimpleNamespace` is not assignable to parameter `user` with type `Account | None` in function `core.tools.workflow_as_tool.provider.WorkflowToolProviderController._get_db_provider_tool` [bad-argument-type]
-  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:93:89
+  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:89:89
 ERROR `not in` is not supported between `Literal['json']` and `object` [not-iterable]
-  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:98:12
+  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:94:12
 ERROR `list[SimpleNamespace]` is not assignable to attribute `tools` with type `list[WorkflowTool]` [bad-assignment]
-   --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:107:24
+   --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:103:24
 ERROR Argument `SimpleNamespace` is not assignable to parameter `db_provider` with type `WorkflowToolProvider` in function `core.tools.workflow_as_tool.provider.WorkflowToolProviderController.from_db` [bad-argument-type]
-   --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:153:60
+   --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:149:60
 ERROR Object of class `BlobChunkMessage` has no attribute `variable_name`
 ERROR Object of class `BlobChunkMessage` has no attribute `variable_value`
 ERROR Object of class `BlobChunkMessage` has no attribute `text`
@@ -6317,21 +6317,21 @@
 ERROR Argument `_FakeSession` is not assignable to parameter `session` with type `Session | None` in function `core.workflow.human_input_forms.load_form_tokens_by_form_id` [bad-argument-type]
   --> tests/unit_tests/core/workflow/test_human_input_forms.py:55:60
 ERROR Argument `object` is not assignable to parameter `node_data_memory` with type `MemoryConfig | None` in function `core.workflow.node_factory.fetch_memory` [bad-argument-type]
-  --> tests/unit_tests/core/workflow/test_node_factory.py:66:30
+  --> tests/unit_tests/core/workflow/test_node_factory.py:64:30
 ERROR Argument `object` is not assignable to parameter `node_data_memory` with type `MemoryConfig | None` in function `core.workflow.node_factory.fetch_memory` [bad-argument-type]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:102:30
+  --> tests/unit_tests/core/workflow/test_node_factory.py:98:30
 ERROR Argument `SimpleNamespace` is not assignable to parameter `graph_init_params` with type `GraphInitParams` in function `core.workflow.node_factory.DifyNodeFactory.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:249:35
+   --> tests/unit_tests/core/workflow/test_node_factory.py:245:35
 ERROR `SimpleNamespace` is not assignable to attribute `graph_runtime_state` with type `GraphRuntimeState` [bad-assignment]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:312:39
+   --> tests/unit_tests/core/workflow/test_node_factory.py:308:39
 ERROR `SimpleNamespace` is not assignable to attribute `_dify_context` with type `DifyRunContext` [bad-assignment]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:313:33
+   --> tests/unit_tests/core/workflow/test_node_factory.py:309:33
 ERROR `form_repository` may be uninitialized [unbound-name]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:452:49
+   --> tests/unit_tests/core/workflow/test_node_factory.py:448:49
 ERROR `SimpleNamespace` is not assignable to attribute `_dify_context` with type `DifyRunContext` [bad-assignment]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:595:33
+   --> tests/unit_tests/core/workflow/test_node_factory.py:591:33
 ERROR `SimpleNamespace` is not assignable to attribute `graph_runtime_state` with type `GraphRuntimeState` [bad-assignment]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:596:39
+   --> tests/unit_tests/core/workflow/test_node_factory.py:592:39
 ERROR Object of class `ExternalRecipient` has no attribute `reference_id` [missing-attribute]
   --> tests/unit_tests/core/workflow/test_node_runtime.py:88:12
 ERROR Argument `object` is not assignable to parameter `method` with type `EmailDeliveryMethod | InteractiveSurfaceDeliveryMethod` in function `core.workflow.node_runtime.apply_dify_debug_email_recipient` [bad-argument-type]
@@ -7032,13 +7032,13 @@
 ERROR Argument `None` is not assignable to parameter `plan` with type `CloudPlan` in function `RagPipelineTaskProxyTestDataFactory.create_mock_features` [bad-argument-type]
    --> tests/unit_tests/services/test_rag_pipeline_task_proxy.py:431:109
 ERROR Argument `dict[str, Any]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.schedule_service.ScheduleService.to_schedule_config` [bad-argument-type]
-   --> tests/unit_tests/services/test_schedule_service.py:860:61
+   --> tests/unit_tests/services/test_schedule_service.py:855:61
 ERROR Argument `dict[str, dict[str, str] | str]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.schedule_service.ScheduleService.to_schedule_config` [bad-argument-type]
-   --> tests/unit_tests/services/test_schedule_service.py:874:56
+   --> tests/unit_tests/services/test_schedule_service.py:869:56
 ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.schedule_service.ScheduleService.to_schedule_config` [bad-argument-type]
-   --> tests/unit_tests/services/test_schedule_service.py:891:61
+   --> tests/unit_tests/services/test_schedule_service.py:886:61
 ERROR Argument `dict[str, dict[str, str] | str]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.schedule_service.ScheduleService.to_schedule_config` [bad-argument-type]
-   --> tests/unit_tests/services/test_schedule_service.py:903:56
+   --> tests/unit_tests/services/test_schedule_service.py:898:56
 ERROR Argument `SimpleNamespace` is not assignable to parameter `value` with type `ModuleType` in function `_pytest.monkeypatch.MonkeyPatch.setitem` [bad-argument-type]
   --> tests/unit_tests/services/test_summary_index_service.py:91:9
 ERROR Missing required key `enable` for TypedDict `SummaryIndexSettingDict` [bad-typed-dict-key]
@@ -7174,11 +7174,11 @@
 ERROR Argument `dict[str, bool]` is not assignable to parameter `substitutions` with type `Mapping[str, str]` in function `tasks.mail_inner_task._render_template_with_strategy` [bad-argument-type]
     --> tests/unit_tests/tasks/test_mail_send_task.py:1300:64
 ERROR Argument `Iterator[Any]` is not assignable to parameter `response_stream` with type `Generator[BaseModel | Mapping[str, Any] | str]` in function `tasks.app_generate.workflow_execute_task._publish_streaming_response` [bad-argument-type]
-  --> tests/unit_tests/tasks/test_workflow_execute_task.py:55:33
+  --> tests/unit_tests/tasks/test_workflow_execute_task.py:54:33
 ERROR Argument `UUID` is not assignable to parameter `workflow_run_id` with type `str` in function `tasks.app_generate.workflow_execute_task._publish_streaming_response` [bad-argument-type]
-  --> tests/unit_tests/tasks/test_workflow_execute_task.py:55:50
+  --> tests/unit_tests/tasks/test_workflow_execute_task.py:54:50
 ERROR Argument `Iterator[Any]` is not assignable to parameter `response_stream` with type `Generator[BaseModel | Mapping[str, Any] | str]` in function `tasks.app_generate.workflow_execute_task._publish_streaming_response` [bad-argument-type]
-  --> tests/unit_tests/tasks/test_workflow_execute_task.py:65:33
+  --> tests/unit_tests/tasks/test_workflow_execute_task.py:64:33
 ERROR Object of class `BlobChunkMessage` has no attribute `variable_name`
 ERROR Object of class `BlobChunkMessage` has no attribute `variable_name`
 ERROR Object of class `BlobChunkMessage` has no attribute `variable_value`

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-04-02 23:21:23.339224827 +0000
+++ /tmp/pyrefly_pr.txt	2026-04-02 23:21:13.495166471 +0000
@@ -17,11 +17,11 @@
 ERROR Class member `EasyUIBasedGenerateTaskPipeline._application_generate_entity` overrides parent class `BasedGenerateTaskPipeline` in an inconsistent manner [bad-override]
   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:75:5
 ERROR `+=` is not supported between `list[PromptMessageContentUnionTypes]` and `str` [unsupported-operation]
-   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:323:29
+   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:321:29
 ERROR Argument `list[Unknown]` is not assignable to parameter `value` with type `SQLCoreOperations[dict[str, Any]] | dict[str, Any]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
-   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:390:27
+   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:388:27
 ERROR `defaultdict[str, dict[Unknown, Unknown]]` is not assignable to `defaultdict[ModelType, dict[str, ModelSettings]]` [bad-assignment]
-    --> core/entities/provider_configuration.py:1531:79
+    --> core/entities/provider_configuration.py:1513:79
 ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[UserPromptMessage], model_parameters=dict[str, int], stream=Literal[False]) [no-matching-overload]
   --> core/llm_generator/llm_generator.py:74:60
 ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[UserPromptMessage], model_parameters=dict[str, float | int], stream=Literal[False]) [no-matching-overload]
@@ -5427,21 +5427,21 @@
 ERROR Object of class `ModuleType` has no attribute `trace_manager_queue` [missing-attribute]
   --> tests/unit_tests/core/telemetry/test_facade.py:47:5
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.ProviderModelSetting.__init__` [bad-argument-type]
-  --> tests/unit_tests/core/test_provider_manager.py:51:20
+  --> tests/unit_tests/core/test_provider_manager.py:54:20
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.LoadBalancingModelConfig.__init__` [bad-argument-type]
-  --> tests/unit_tests/core/test_provider_manager.py:64:24
+  --> tests/unit_tests/core/test_provider_manager.py:67:24
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.LoadBalancingModelConfig.__init__` [bad-argument-type]
-  --> tests/unit_tests/core/test_provider_manager.py:73:24
+  --> tests/unit_tests/core/test_provider_manager.py:76:24
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.ProviderModelSetting.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:113:20
+   --> tests/unit_tests/core/test_provider_manager.py:116:20
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.LoadBalancingModelConfig.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:124:24
+   --> tests/unit_tests/core/test_provider_manager.py:127:24
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.ProviderModelSetting.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:160:20
+   --> tests/unit_tests/core/test_provider_manager.py:163:20
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.LoadBalancingModelConfig.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:171:24
+   --> tests/unit_tests/core/test_provider_manager.py:174:24
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.LoadBalancingModelConfig.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:180:24
+   --> tests/unit_tests/core/test_provider_manager.py:183:24
 ERROR `dict[str, str]` is not assignable to TypedDict key `data` with type `BaseNodeData` [bad-typed-dict-key]
   --> tests/unit_tests/core/test_trigger_debug_event_selectors.py:56:46
 ERROR Object of class `BlobChunkMessage` has no attribute `text`
@@ -5524,25 +5524,25 @@
 ERROR Argument `Generator[Unknown] | None` is not assignable to parameter `iterable` with type `Iterable[Unknown]` in function `list.__init__` [bad-argument-type]
    --> tests/unit_tests/core/tools/test_tool_file_manager.py:253:25
 ERROR `SimpleNamespace` is not assignable to attribute `entity` with type `ToolProviderEntityWithPlugin` [bad-assignment]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:300:32
+   --> tests/unit_tests/core/tools/test_tool_manager.py:307:32
 ERROR Argument `SimpleNamespace` is not assignable to parameter `agent_tool` with type `AgentToolEntity` in function `core.tools.tool_manager.ToolManager.get_agent_tool_runtime` [bad-argument-type]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:438:32
+   --> tests/unit_tests/core/tools/test_tool_manager.py:444:32
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_tool` with type `WorkflowToolRuntimeSpec` in function `core.tools.tool_manager.ToolManager.get_workflow_tool_runtime` [bad-argument-type]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:485:35
+   --> tests/unit_tests/core/tools/test_tool_manager.py:491:35
 ERROR Argument `SimpleNamespace` is not assignable to parameter `agent_tool` with type `AgentToolEntity` in function `core.tools.tool_manager.ToolManager.get_agent_tool_runtime` [bad-argument-type]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:521:36
+   --> tests/unit_tests/core/tools/test_tool_manager.py:527:36
 ERROR Cannot set item in `dict[str, I18nObject | None]` [unsupported-operation]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:627:55
+   --> tests/unit_tests/core/tools/test_tool_manager.py:633:55
 ERROR `SimpleNamespace` is not assignable to attribute `entity` with type `ToolProviderEntityWithPlugin` [bad-assignment]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:654:32
+   --> tests/unit_tests/core/tools/test_tool_manager.py:660:32
 ERROR Argument `Literal['']` is not assignable to parameter `typ` with type `Literal['api', 'builtin', 'mcp', 'workflow'] | None` in function `core.tools.tool_manager.ToolManager.list_providers_from_api` [bad-argument-type]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:678:97
+   --> tests/unit_tests/core/tools/test_tool_manager.py:684:97
 ERROR `SimpleNamespace` is not assignable to attribute `entity` with type `ToolProviderEntityWithPlugin` [bad-assignment]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:820:30
+   --> tests/unit_tests/core/tools/test_tool_manager.py:826:30
 ERROR `SimpleNamespace` is not assignable to attribute `entity` with type `ToolProviderEntityWithPlugin` [bad-assignment]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:844:30
+   --> tests/unit_tests/core/tools/test_tool_manager.py:850:30
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:849:20
+   --> tests/unit_tests/core/tools/test_tool_manager.py:855:20
 ERROR Argument `SimpleNamespace` is not assignable to parameter `controller` with type `ToolProviderController` in function `core.tools.utils.encryption.create_tool_provider_encrypter` [bad-argument-type]
    --> tests/unit_tests/core/tools/utils/test_encryption.py:203:75
 ERROR `None` is not subscriptable [unsupported-operation]
@@ -5580,17 +5580,17 @@
 ERROR Object of class `BlobChunkMessage` has no attribute `json_object`
 ERROR Object of class `BlobChunkMessage` has no attribute `json_object`
 ERROR Argument `SimpleNamespace` is not assignable to parameter `db_provider` with type `WorkflowToolProvider` in function `core.tools.workflow_as_tool.provider.WorkflowToolProviderController._get_db_provider_tool` [bad-argument-type]
-  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:93:49
+  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:94:49
 ERROR Argument `SimpleNamespace` is not assignable to parameter `app` with type `App` in function `core.tools.workflow_as_tool.provider.WorkflowToolProviderController._get_db_provider_tool` [bad-argument-type]
-  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:93:62
+  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:94:62
 ERROR Argument `SimpleNamespace` is not assignable to parameter `user` with type `Account | None` in function `core.tools.workflow_as_tool.provider.WorkflowToolProviderController._get_db_provider_tool` [bad-argument-type]
-  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:93:89
+  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:94:89
 ERROR `not in` is not supported between `Literal['json']` and `object` [not-iterable]
-  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:98:12
+  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:99:12
 ERROR `list[SimpleNamespace]` is not assignable to attribute `tools` with type `list[WorkflowTool]` [bad-assignment]
-   --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:107:24
+   --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:108:24
 ERROR Argument `SimpleNamespace` is not assignable to parameter `db_provider` with type `WorkflowToolProvider` in function `core.tools.workflow_as_tool.provider.WorkflowToolProviderController.from_db` [bad-argument-type]
-   --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:153:60
+   --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:154:60
 ERROR Object of class `BlobChunkMessage` has no attribute `variable_name`
 ERROR Object of class `BlobChunkMessage` has no attribute `variable_value`
 ERROR Object of class `BlobChunkMessage` has no attribute `text`
@@ -5946,21 +5946,21 @@
 ERROR Argument `_FakeSession` is not assignable to parameter `session` with type `Session | None` in function `core.workflow.human_input_forms.load_form_tokens_by_form_id` [bad-argument-type]
   --> tests/unit_tests/core/workflow/test_human_input_forms.py:55:60
 ERROR Argument `object` is not assignable to parameter `node_data_memory` with type `MemoryConfig | None` in function `core.workflow.node_factory.fetch_memory` [bad-argument-type]
-  --> tests/unit_tests/core/workflow/test_node_factory.py:66:30
+  --> tests/unit_tests/core/workflow/test_node_factory.py:64:30
 ERROR Argument `object` is not assignable to parameter `node_data_memory` with type `MemoryConfig | None` in function `core.workflow.node_factory.fetch_memory` [bad-argument-type]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:102:30
+  --> tests/unit_tests/core/workflow/test_node_factory.py:98:30
 ERROR Argument `SimpleNamespace` is not assignable to parameter `graph_init_params` with type `GraphInitParams` in function `core.workflow.node_factory.DifyNodeFactory.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:249:35
+   --> tests/unit_tests/core/workflow/test_node_factory.py:245:35
 ERROR `SimpleNamespace` is not assignable to attribute `graph_runtime_state` with type `GraphRuntimeState` [bad-assignment]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:312:39
+   --> tests/unit_tests/core/workflow/test_node_factory.py:308:39
 ERROR `SimpleNamespace` is not assignable to attribute `_dify_context` with type `DifyRunContext` [bad-assignment]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:313:33
+   --> tests/unit_tests/core/workflow/test_node_factory.py:309:33
 ERROR `form_repository` may be uninitialized [unbound-name]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:452:49
+   --> tests/unit_tests/core/workflow/test_node_factory.py:448:49
 ERROR `SimpleNamespace` is not assignable to attribute `_dify_context` with type `DifyRunContext` [bad-assignment]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:595:33
+   --> tests/unit_tests/core/workflow/test_node_factory.py:591:33
 ERROR `SimpleNamespace` is not assignable to attribute `graph_runtime_state` with type `GraphRuntimeState` [bad-assignment]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:596:39
+   --> tests/unit_tests/core/workflow/test_node_factory.py:592:39
 ERROR Object of class `ExternalRecipient` has no attribute `reference_id` [missing-attribute]
   --> tests/unit_tests/core/workflow/test_node_runtime.py:88:12
 ERROR Argument `object` is not assignable to parameter `method` with type `EmailDeliveryMethod | InteractiveSurfaceDeliveryMethod` in function `core.workflow.node_runtime.apply_dify_debug_email_recipient` [bad-argument-type]
@@ -6619,13 +6619,13 @@
 ERROR Argument `None` is not assignable to parameter `plan` with type `CloudPlan` in function `RagPipelineTaskProxyTestDataFactory.create_mock_features` [bad-argument-type]
    --> tests/unit_tests/services/test_rag_pipeline_task_proxy.py:431:109
 ERROR Argument `dict[str, Any]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.schedule_service.ScheduleService.to_schedule_config` [bad-argument-type]
-   --> tests/unit_tests/services/test_schedule_service.py:860:61
+   --> tests/unit_tests/services/test_schedule_service.py:855:61
 ERROR Argument `dict[str, dict[str, str] | str]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.schedule_service.ScheduleService.to_schedule_config` [bad-argument-type]
-   --> tests/unit_tests/services/test_schedule_service.py:874:56
+   --> tests/unit_tests/services/test_schedule_service.py:869:56
 ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.schedule_service.ScheduleService.to_schedule_config` [bad-argument-type]
-   --> tests/unit_tests/services/test_schedule_service.py:891:61
+   --> tests/unit_tests/services/test_schedule_service.py:886:61
 ERROR Argument `dict[str, dict[str, str] | str]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.schedule_service.ScheduleService.to_schedule_config` [bad-argument-type]
-   --> tests/unit_tests/services/test_schedule_service.py:903:56
+   --> tests/unit_tests/services/test_schedule_service.py:898:56
 ERROR Missing required key `enable` for TypedDict `SummaryIndexSettingDict` [bad-typed-dict-key]
   --> tests/unit_tests/services/test_summary_index_service.py:97:93
 ERROR Key `a` is not defined in TypedDict `SummaryIndexSettingDict` [bad-typed-dict-key]
@@ -6745,11 +6745,11 @@
 ERROR Argument `dict[str, bool]` is not assignable to parameter `substitutions` with type `Mapping[str, str]` in function `tasks.mail_inner_task._render_template_with_strategy` [bad-argument-type]
     --> tests/unit_tests/tasks/test_mail_send_task.py:1300:64
 ERROR Argument `Iterator[Any]` is not assignable to parameter `response_stream` with type `Generator[BaseModel | Mapping[str, Any] | str]` in function `tasks.app_generate.workflow_execute_task._publish_streaming_response` [bad-argument-type]
-  --> tests/unit_tests/tasks/test_workflow_execute_task.py:55:33
+  --> tests/unit_tests/tasks/test_workflow_execute_task.py:54:33
 ERROR Argument `UUID` is not assignable to parameter `workflow_run_id` with type `str` in function `tasks.app_generate.workflow_execute_task._publish_streaming_response` [bad-argument-type]
-  --> tests/unit_tests/tasks/test_workflow_execute_task.py:55:50
+  --> tests/unit_tests/tasks/test_workflow_execute_task.py:54:50
 ERROR Argument `Iterator[Any]` is not assignable to parameter `response_stream` with type `Generator[BaseModel | Mapping[str, Any] | str]` in function `tasks.app_generate.workflow_execute_task._publish_streaming_response` [bad-argument-type]
-  --> tests/unit_tests/tasks/test_workflow_execute_task.py:65:33
+  --> tests/unit_tests/tasks/test_workflow_execute_task.py:64:33
 ERROR Object of class `BlobChunkMessage` has no attribute `variable_name`
 ERROR Object of class `BlobChunkMessage` has no attribute `variable_name`
 ERROR Object of class `BlobChunkMessage` has no attribute `variable_value`

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 5, 2026

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-04-05 10:09:31.012598589 +0000
+++ /tmp/pyrefly_pr.txt	2026-04-05 10:09:22.738611055 +0000
@@ -17,11 +17,11 @@
 ERROR Class member `EasyUIBasedGenerateTaskPipeline._application_generate_entity` overrides parent class `BasedGenerateTaskPipeline` in an inconsistent manner [bad-override]
   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:75:5
 ERROR `+=` is not supported between `list[PromptMessageContentUnionTypes]` and `str` [unsupported-operation]
-   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:323:29
+   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:321:29
 ERROR Argument `list[Unknown]` is not assignable to parameter `value` with type `SQLCoreOperations[dict[str, Any]] | dict[str, Any]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
-   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:390:27
+   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:388:27
 ERROR `defaultdict[str, dict[Unknown, Unknown]]` is not assignable to `defaultdict[ModelType, dict[str, ModelSettings]]` [bad-assignment]
-    --> core/entities/provider_configuration.py:1531:79
+    --> core/entities/provider_configuration.py:1513:79
 ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[UserPromptMessage], model_parameters=dict[str, int], stream=Literal[False]) [no-matching-overload]
   --> core/llm_generator/llm_generator.py:74:60
 ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[UserPromptMessage], model_parameters=dict[str, float | int], stream=Literal[False]) [no-matching-overload]
@@ -5429,21 +5429,21 @@
 ERROR Object of class `ModuleType` has no attribute `trace_manager_queue` [missing-attribute]
   --> tests/unit_tests/core/telemetry/test_facade.py:47:5
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.ProviderModelSetting.__init__` [bad-argument-type]
-  --> tests/unit_tests/core/test_provider_manager.py:51:20
+  --> tests/unit_tests/core/test_provider_manager.py:54:20
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.LoadBalancingModelConfig.__init__` [bad-argument-type]
-  --> tests/unit_tests/core/test_provider_manager.py:64:24
+  --> tests/unit_tests/core/test_provider_manager.py:67:24
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.LoadBalancingModelConfig.__init__` [bad-argument-type]
-  --> tests/unit_tests/core/test_provider_manager.py:73:24
+  --> tests/unit_tests/core/test_provider_manager.py:76:24
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.ProviderModelSetting.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:113:20
+   --> tests/unit_tests/core/test_provider_manager.py:116:20
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.LoadBalancingModelConfig.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:124:24
+   --> tests/unit_tests/core/test_provider_manager.py:127:24
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.ProviderModelSetting.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:160:20
+   --> tests/unit_tests/core/test_provider_manager.py:163:20
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.LoadBalancingModelConfig.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:171:24
+   --> tests/unit_tests/core/test_provider_manager.py:174:24
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.LoadBalancingModelConfig.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:180:24
+   --> tests/unit_tests/core/test_provider_manager.py:183:24
 ERROR `dict[str, str]` is not assignable to TypedDict key `data` with type `BaseNodeData` [bad-typed-dict-key]
   --> tests/unit_tests/core/test_trigger_debug_event_selectors.py:56:46
 ERROR Object of class `BlobChunkMessage` has no attribute `text`
@@ -5526,25 +5526,25 @@
 ERROR Argument `Generator[Unknown] | None` is not assignable to parameter `iterable` with type `Iterable[Unknown]` in function `list.__init__` [bad-argument-type]
    --> tests/unit_tests/core/tools/test_tool_file_manager.py:253:25
 ERROR `SimpleNamespace` is not assignable to attribute `entity` with type `ToolProviderEntityWithPlugin` [bad-assignment]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:300:32
+   --> tests/unit_tests/core/tools/test_tool_manager.py:307:32
 ERROR Argument `SimpleNamespace` is not assignable to parameter `agent_tool` with type `AgentToolEntity` in function `core.tools.tool_manager.ToolManager.get_agent_tool_runtime` [bad-argument-type]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:438:32
+   --> tests/unit_tests/core/tools/test_tool_manager.py:444:32
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_tool` with type `WorkflowToolRuntimeSpec` in function `core.tools.tool_manager.ToolManager.get_workflow_tool_runtime` [bad-argument-type]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:485:35
+   --> tests/unit_tests/core/tools/test_tool_manager.py:491:35
 ERROR Argument `SimpleNamespace` is not assignable to parameter `agent_tool` with type `AgentToolEntity` in function `core.tools.tool_manager.ToolManager.get_agent_tool_runtime` [bad-argument-type]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:521:36
+   --> tests/unit_tests/core/tools/test_tool_manager.py:527:36
 ERROR Cannot set item in `dict[str, I18nObject | None]` [unsupported-operation]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:627:55
+   --> tests/unit_tests/core/tools/test_tool_manager.py:633:55
 ERROR `SimpleNamespace` is not assignable to attribute `entity` with type `ToolProviderEntityWithPlugin` [bad-assignment]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:654:32
+   --> tests/unit_tests/core/tools/test_tool_manager.py:660:32
 ERROR Argument `Literal['']` is not assignable to parameter `typ` with type `Literal['api', 'builtin', 'mcp', 'workflow'] | None` in function `core.tools.tool_manager.ToolManager.list_providers_from_api` [bad-argument-type]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:678:97
+   --> tests/unit_tests/core/tools/test_tool_manager.py:684:97
 ERROR `SimpleNamespace` is not assignable to attribute `entity` with type `ToolProviderEntityWithPlugin` [bad-assignment]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:820:30
+   --> tests/unit_tests/core/tools/test_tool_manager.py:826:30
 ERROR `SimpleNamespace` is not assignable to attribute `entity` with type `ToolProviderEntityWithPlugin` [bad-assignment]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:844:30
+   --> tests/unit_tests/core/tools/test_tool_manager.py:850:30
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:849:20
+   --> tests/unit_tests/core/tools/test_tool_manager.py:855:20
 ERROR Argument `SimpleNamespace` is not assignable to parameter `controller` with type `ToolProviderController` in function `core.tools.utils.encryption.create_tool_provider_encrypter` [bad-argument-type]
    --> tests/unit_tests/core/tools/utils/test_encryption.py:203:75
 ERROR `None` is not subscriptable [unsupported-operation]
@@ -5582,17 +5582,17 @@
 ERROR Object of class `BlobChunkMessage` has no attribute `json_object`
 ERROR Object of class `BlobChunkMessage` has no attribute `json_object`
 ERROR Argument `SimpleNamespace` is not assignable to parameter `db_provider` with type `WorkflowToolProvider` in function `core.tools.workflow_as_tool.provider.WorkflowToolProviderController._get_db_provider_tool` [bad-argument-type]
-  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:93:49
+  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:94:49
 ERROR Argument `SimpleNamespace` is not assignable to parameter `app` with type `App` in function `core.tools.workflow_as_tool.provider.WorkflowToolProviderController._get_db_provider_tool` [bad-argument-type]
-  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:93:62
+  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:94:62
 ERROR Argument `SimpleNamespace` is not assignable to parameter `user` with type `Account | None` in function `core.tools.workflow_as_tool.provider.WorkflowToolProviderController._get_db_provider_tool` [bad-argument-type]
-  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:93:89
+  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:94:89
 ERROR `not in` is not supported between `Literal['json']` and `object` [not-iterable]
-  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:98:12
+  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:99:12
 ERROR `list[SimpleNamespace]` is not assignable to attribute `tools` with type `list[WorkflowTool]` [bad-assignment]
-   --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:107:24
+   --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:108:24
 ERROR Argument `SimpleNamespace` is not assignable to parameter `db_provider` with type `WorkflowToolProvider` in function `core.tools.workflow_as_tool.provider.WorkflowToolProviderController.from_db` [bad-argument-type]
-   --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:153:60
+   --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:154:60
 ERROR Object of class `BlobChunkMessage` has no attribute `variable_name`
 ERROR Object of class `BlobChunkMessage` has no attribute `variable_value`
 ERROR Object of class `BlobChunkMessage` has no attribute `text`
@@ -5948,21 +5948,21 @@
 ERROR Argument `_FakeSession` is not assignable to parameter `session` with type `Session | None` in function `core.workflow.human_input_forms.load_form_tokens_by_form_id` [bad-argument-type]
   --> tests/unit_tests/core/workflow/test_human_input_forms.py:55:60
 ERROR Argument `object` is not assignable to parameter `node_data_memory` with type `MemoryConfig | None` in function `core.workflow.node_factory.fetch_memory` [bad-argument-type]
-  --> tests/unit_tests/core/workflow/test_node_factory.py:66:30
+  --> tests/unit_tests/core/workflow/test_node_factory.py:64:30
 ERROR Argument `object` is not assignable to parameter `node_data_memory` with type `MemoryConfig | None` in function `core.workflow.node_factory.fetch_memory` [bad-argument-type]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:102:30
+  --> tests/unit_tests/core/workflow/test_node_factory.py:98:30
 ERROR Argument `SimpleNamespace` is not assignable to parameter `graph_init_params` with type `GraphInitParams` in function `core.workflow.node_factory.DifyNodeFactory.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:249:35
+   --> tests/unit_tests/core/workflow/test_node_factory.py:245:35
 ERROR `SimpleNamespace` is not assignable to attribute `graph_runtime_state` with type `GraphRuntimeState` [bad-assignment]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:312:39
+   --> tests/unit_tests/core/workflow/test_node_factory.py:308:39
 ERROR `SimpleNamespace` is not assignable to attribute `_dify_context` with type `DifyRunContext` [bad-assignment]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:313:33
+   --> tests/unit_tests/core/workflow/test_node_factory.py:309:33
 ERROR `form_repository` may be uninitialized [unbound-name]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:452:49
+   --> tests/unit_tests/core/workflow/test_node_factory.py:448:49
 ERROR `SimpleNamespace` is not assignable to attribute `_dify_context` with type `DifyRunContext` [bad-assignment]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:595:33
+   --> tests/unit_tests/core/workflow/test_node_factory.py:591:33
 ERROR `SimpleNamespace` is not assignable to attribute `graph_runtime_state` with type `GraphRuntimeState` [bad-assignment]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:596:39
+   --> tests/unit_tests/core/workflow/test_node_factory.py:592:39
 ERROR Object of class `ExternalRecipient` has no attribute `reference_id` [missing-attribute]
   --> tests/unit_tests/core/workflow/test_node_runtime.py:88:12
 ERROR Argument `object` is not assignable to parameter `method` with type `EmailDeliveryMethod | InteractiveSurfaceDeliveryMethod` in function `core.workflow.node_runtime.apply_dify_debug_email_recipient` [bad-argument-type]
@@ -6641,13 +6641,13 @@
 ERROR Argument `None` is not assignable to parameter `plan` with type `CloudPlan` in function `RagPipelineTaskProxyTestDataFactory.create_mock_features` [bad-argument-type]
    --> tests/unit_tests/services/test_rag_pipeline_task_proxy.py:431:109
 ERROR Argument `dict[str, Any]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.schedule_service.ScheduleService.to_schedule_config` [bad-argument-type]
-   --> tests/unit_tests/services/test_schedule_service.py:860:61
+   --> tests/unit_tests/services/test_schedule_service.py:855:61
 ERROR Argument `dict[str, dict[str, str] | str]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.schedule_service.ScheduleService.to_schedule_config` [bad-argument-type]
-   --> tests/unit_tests/services/test_schedule_service.py:874:56
+   --> tests/unit_tests/services/test_schedule_service.py:869:56
 ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.schedule_service.ScheduleService.to_schedule_config` [bad-argument-type]
-   --> tests/unit_tests/services/test_schedule_service.py:891:61
+   --> tests/unit_tests/services/test_schedule_service.py:886:61
 ERROR Argument `dict[str, dict[str, str] | str]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.schedule_service.ScheduleService.to_schedule_config` [bad-argument-type]
-   --> tests/unit_tests/services/test_schedule_service.py:903:56
+   --> tests/unit_tests/services/test_schedule_service.py:898:56
 ERROR Missing required key `enable` for TypedDict `SummaryIndexSettingDict` [bad-typed-dict-key]
   --> tests/unit_tests/services/test_summary_index_service.py:97:93
 ERROR Key `a` is not defined in TypedDict `SummaryIndexSettingDict` [bad-typed-dict-key]
@@ -6789,11 +6789,11 @@
 ERROR Argument `dict[str, bool]` is not assignable to parameter `substitutions` with type `Mapping[str, str]` in function `tasks.mail_inner_task._render_template_with_strategy` [bad-argument-type]
     --> tests/unit_tests/tasks/test_mail_send_task.py:1300:64
 ERROR Argument `Iterator[Any]` is not assignable to parameter `response_stream` with type `Generator[BaseModel | Mapping[str, Any] | str]` in function `tasks.app_generate.workflow_execute_task._publish_streaming_response` [bad-argument-type]
-  --> tests/unit_tests/tasks/test_workflow_execute_task.py:55:33
+  --> tests/unit_tests/tasks/test_workflow_execute_task.py:54:33
 ERROR Argument `UUID` is not assignable to parameter `workflow_run_id` with type `str` in function `tasks.app_generate.workflow_execute_task._publish_streaming_response` [bad-argument-type]
-  --> tests/unit_tests/tasks/test_workflow_execute_task.py:55:50
+  --> tests/unit_tests/tasks/test_workflow_execute_task.py:54:50
 ERROR Argument `Iterator[Any]` is not assignable to parameter `response_stream` with type `Generator[BaseModel | Mapping[str, Any] | str]` in function `tasks.app_generate.workflow_execute_task._publish_streaming_response` [bad-argument-type]
-  --> tests/unit_tests/tasks/test_workflow_execute_task.py:65:33
+  --> tests/unit_tests/tasks/test_workflow_execute_task.py:64:33
 ERROR Object of class `BlobChunkMessage` has no attribute `variable_name`
 ERROR Object of class `BlobChunkMessage` has no attribute `variable_name`
 ERROR Object of class `BlobChunkMessage` has no attribute `variable_value`

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 5, 2026

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-04-05 10:11:28.443729392 +0000
+++ /tmp/pyrefly_pr.txt	2026-04-05 10:11:18.820721177 +0000
@@ -17,11 +17,11 @@
 ERROR Class member `EasyUIBasedGenerateTaskPipeline._application_generate_entity` overrides parent class `BasedGenerateTaskPipeline` in an inconsistent manner [bad-override]
   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:75:5
 ERROR `+=` is not supported between `list[PromptMessageContentUnionTypes]` and `str` [unsupported-operation]
-   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:323:29
+   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:321:29
 ERROR Argument `list[Unknown]` is not assignable to parameter `value` with type `SQLCoreOperations[dict[str, Any]] | dict[str, Any]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
-   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:390:27
+   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:388:27
 ERROR `defaultdict[str, dict[Unknown, Unknown]]` is not assignable to `defaultdict[ModelType, dict[str, ModelSettings]]` [bad-assignment]
-    --> core/entities/provider_configuration.py:1531:79
+    --> core/entities/provider_configuration.py:1513:79
 ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[UserPromptMessage], model_parameters=dict[str, int], stream=Literal[False]) [no-matching-overload]
   --> core/llm_generator/llm_generator.py:74:60
 ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[UserPromptMessage], model_parameters=dict[str, float | int], stream=Literal[False]) [no-matching-overload]
@@ -5429,21 +5429,21 @@
 ERROR Object of class `ModuleType` has no attribute `trace_manager_queue` [missing-attribute]
   --> tests/unit_tests/core/telemetry/test_facade.py:47:5
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.ProviderModelSetting.__init__` [bad-argument-type]
-  --> tests/unit_tests/core/test_provider_manager.py:51:20
+  --> tests/unit_tests/core/test_provider_manager.py:54:20
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.LoadBalancingModelConfig.__init__` [bad-argument-type]
-  --> tests/unit_tests/core/test_provider_manager.py:64:24
+  --> tests/unit_tests/core/test_provider_manager.py:67:24
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.LoadBalancingModelConfig.__init__` [bad-argument-type]
-  --> tests/unit_tests/core/test_provider_manager.py:73:24
+  --> tests/unit_tests/core/test_provider_manager.py:76:24
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.ProviderModelSetting.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:113:20
+   --> tests/unit_tests/core/test_provider_manager.py:116:20
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.LoadBalancingModelConfig.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:124:24
+   --> tests/unit_tests/core/test_provider_manager.py:127:24
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.ProviderModelSetting.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:160:20
+   --> tests/unit_tests/core/test_provider_manager.py:163:20
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.LoadBalancingModelConfig.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:171:24
+   --> tests/unit_tests/core/test_provider_manager.py:174:24
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.LoadBalancingModelConfig.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:180:24
+   --> tests/unit_tests/core/test_provider_manager.py:183:24
 ERROR `dict[str, str]` is not assignable to TypedDict key `data` with type `BaseNodeData` [bad-typed-dict-key]
   --> tests/unit_tests/core/test_trigger_debug_event_selectors.py:56:46
 ERROR Object of class `BlobChunkMessage` has no attribute `text`
@@ -5526,25 +5526,25 @@
 ERROR Argument `Generator[Unknown] | None` is not assignable to parameter `iterable` with type `Iterable[Unknown]` in function `list.__init__` [bad-argument-type]
    --> tests/unit_tests/core/tools/test_tool_file_manager.py:253:25
 ERROR `SimpleNamespace` is not assignable to attribute `entity` with type `ToolProviderEntityWithPlugin` [bad-assignment]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:300:32
+   --> tests/unit_tests/core/tools/test_tool_manager.py:307:32
 ERROR Argument `SimpleNamespace` is not assignable to parameter `agent_tool` with type `AgentToolEntity` in function `core.tools.tool_manager.ToolManager.get_agent_tool_runtime` [bad-argument-type]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:438:32
+   --> tests/unit_tests/core/tools/test_tool_manager.py:444:32
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_tool` with type `WorkflowToolRuntimeSpec` in function `core.tools.tool_manager.ToolManager.get_workflow_tool_runtime` [bad-argument-type]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:485:35
+   --> tests/unit_tests/core/tools/test_tool_manager.py:491:35
 ERROR Argument `SimpleNamespace` is not assignable to parameter `agent_tool` with type `AgentToolEntity` in function `core.tools.tool_manager.ToolManager.get_agent_tool_runtime` [bad-argument-type]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:521:36
+   --> tests/unit_tests/core/tools/test_tool_manager.py:527:36
 ERROR Cannot set item in `dict[str, I18nObject | None]` [unsupported-operation]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:627:55
+   --> tests/unit_tests/core/tools/test_tool_manager.py:633:55
 ERROR `SimpleNamespace` is not assignable to attribute `entity` with type `ToolProviderEntityWithPlugin` [bad-assignment]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:654:32
+   --> tests/unit_tests/core/tools/test_tool_manager.py:660:32
 ERROR Argument `Literal['']` is not assignable to parameter `typ` with type `Literal['api', 'builtin', 'mcp', 'workflow'] | None` in function `core.tools.tool_manager.ToolManager.list_providers_from_api` [bad-argument-type]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:678:97
+   --> tests/unit_tests/core/tools/test_tool_manager.py:684:97
 ERROR `SimpleNamespace` is not assignable to attribute `entity` with type `ToolProviderEntityWithPlugin` [bad-assignment]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:820:30
+   --> tests/unit_tests/core/tools/test_tool_manager.py:826:30
 ERROR `SimpleNamespace` is not assignable to attribute `entity` with type `ToolProviderEntityWithPlugin` [bad-assignment]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:844:30
+   --> tests/unit_tests/core/tools/test_tool_manager.py:850:30
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:849:20
+   --> tests/unit_tests/core/tools/test_tool_manager.py:855:20
 ERROR Argument `SimpleNamespace` is not assignable to parameter `controller` with type `ToolProviderController` in function `core.tools.utils.encryption.create_tool_provider_encrypter` [bad-argument-type]
    --> tests/unit_tests/core/tools/utils/test_encryption.py:203:75
 ERROR `None` is not subscriptable [unsupported-operation]
@@ -5582,17 +5582,17 @@
 ERROR Object of class `BlobChunkMessage` has no attribute `json_object`
 ERROR Object of class `BlobChunkMessage` has no attribute `json_object`
 ERROR Argument `SimpleNamespace` is not assignable to parameter `db_provider` with type `WorkflowToolProvider` in function `core.tools.workflow_as_tool.provider.WorkflowToolProviderController._get_db_provider_tool` [bad-argument-type]
-  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:93:49
+  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:94:49
 ERROR Argument `SimpleNamespace` is not assignable to parameter `app` with type `App` in function `core.tools.workflow_as_tool.provider.WorkflowToolProviderController._get_db_provider_tool` [bad-argument-type]
-  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:93:62
+  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:94:62
 ERROR Argument `SimpleNamespace` is not assignable to parameter `user` with type `Account | None` in function `core.tools.workflow_as_tool.provider.WorkflowToolProviderController._get_db_provider_tool` [bad-argument-type]
-  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:93:89
+  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:94:89
 ERROR `not in` is not supported between `Literal['json']` and `object` [not-iterable]
-  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:98:12
+  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:99:12
 ERROR `list[SimpleNamespace]` is not assignable to attribute `tools` with type `list[WorkflowTool]` [bad-assignment]
-   --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:107:24
+   --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:108:24
 ERROR Argument `SimpleNamespace` is not assignable to parameter `db_provider` with type `WorkflowToolProvider` in function `core.tools.workflow_as_tool.provider.WorkflowToolProviderController.from_db` [bad-argument-type]
-   --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:153:60
+   --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:154:60
 ERROR Object of class `BlobChunkMessage` has no attribute `variable_name`
 ERROR Object of class `BlobChunkMessage` has no attribute `variable_value`
 ERROR Object of class `BlobChunkMessage` has no attribute `text`
@@ -5948,21 +5948,21 @@
 ERROR Argument `_FakeSession` is not assignable to parameter `session` with type `Session | None` in function `core.workflow.human_input_forms.load_form_tokens_by_form_id` [bad-argument-type]
   --> tests/unit_tests/core/workflow/test_human_input_forms.py:55:60
 ERROR Argument `object` is not assignable to parameter `node_data_memory` with type `MemoryConfig | None` in function `core.workflow.node_factory.fetch_memory` [bad-argument-type]
-  --> tests/unit_tests/core/workflow/test_node_factory.py:66:30
+  --> tests/unit_tests/core/workflow/test_node_factory.py:64:30
 ERROR Argument `object` is not assignable to parameter `node_data_memory` with type `MemoryConfig | None` in function `core.workflow.node_factory.fetch_memory` [bad-argument-type]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:102:30
+  --> tests/unit_tests/core/workflow/test_node_factory.py:98:30
 ERROR Argument `SimpleNamespace` is not assignable to parameter `graph_init_params` with type `GraphInitParams` in function `core.workflow.node_factory.DifyNodeFactory.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:249:35
+   --> tests/unit_tests/core/workflow/test_node_factory.py:245:35
 ERROR `SimpleNamespace` is not assignable to attribute `graph_runtime_state` with type `GraphRuntimeState` [bad-assignment]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:312:39
+   --> tests/unit_tests/core/workflow/test_node_factory.py:308:39
 ERROR `SimpleNamespace` is not assignable to attribute `_dify_context` with type `DifyRunContext` [bad-assignment]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:313:33
+   --> tests/unit_tests/core/workflow/test_node_factory.py:309:33
 ERROR `form_repository` may be uninitialized [unbound-name]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:452:49
+   --> tests/unit_tests/core/workflow/test_node_factory.py:448:49
 ERROR `SimpleNamespace` is not assignable to attribute `_dify_context` with type `DifyRunContext` [bad-assignment]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:595:33
+   --> tests/unit_tests/core/workflow/test_node_factory.py:591:33
 ERROR `SimpleNamespace` is not assignable to attribute `graph_runtime_state` with type `GraphRuntimeState` [bad-assignment]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:596:39
+   --> tests/unit_tests/core/workflow/test_node_factory.py:592:39
 ERROR Object of class `ExternalRecipient` has no attribute `reference_id` [missing-attribute]
   --> tests/unit_tests/core/workflow/test_node_runtime.py:88:12
 ERROR Argument `object` is not assignable to parameter `method` with type `EmailDeliveryMethod | InteractiveSurfaceDeliveryMethod` in function `core.workflow.node_runtime.apply_dify_debug_email_recipient` [bad-argument-type]
@@ -6641,13 +6641,13 @@
 ERROR Argument `None` is not assignable to parameter `plan` with type `CloudPlan` in function `RagPipelineTaskProxyTestDataFactory.create_mock_features` [bad-argument-type]
    --> tests/unit_tests/services/test_rag_pipeline_task_proxy.py:431:109
 ERROR Argument `dict[str, Any]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.schedule_service.ScheduleService.to_schedule_config` [bad-argument-type]
-   --> tests/unit_tests/services/test_schedule_service.py:860:61
+   --> tests/unit_tests/services/test_schedule_service.py:855:61
 ERROR Argument `dict[str, dict[str, str] | str]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.schedule_service.ScheduleService.to_schedule_config` [bad-argument-type]
-   --> tests/unit_tests/services/test_schedule_service.py:874:56
+   --> tests/unit_tests/services/test_schedule_service.py:869:56
 ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.schedule_service.ScheduleService.to_schedule_config` [bad-argument-type]
-   --> tests/unit_tests/services/test_schedule_service.py:891:61
+   --> tests/unit_tests/services/test_schedule_service.py:886:61
 ERROR Argument `dict[str, dict[str, str] | str]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.schedule_service.ScheduleService.to_schedule_config` [bad-argument-type]
-   --> tests/unit_tests/services/test_schedule_service.py:903:56
+   --> tests/unit_tests/services/test_schedule_service.py:898:56
 ERROR Missing required key `enable` for TypedDict `SummaryIndexSettingDict` [bad-typed-dict-key]
   --> tests/unit_tests/services/test_summary_index_service.py:97:93
 ERROR Key `a` is not defined in TypedDict `SummaryIndexSettingDict` [bad-typed-dict-key]
@@ -6789,11 +6789,11 @@
 ERROR Argument `dict[str, bool]` is not assignable to parameter `substitutions` with type `Mapping[str, str]` in function `tasks.mail_inner_task._render_template_with_strategy` [bad-argument-type]
     --> tests/unit_tests/tasks/test_mail_send_task.py:1300:64
 ERROR Argument `Iterator[Any]` is not assignable to parameter `response_stream` with type `Generator[BaseModel | Mapping[str, Any] | str]` in function `tasks.app_generate.workflow_execute_task._publish_streaming_response` [bad-argument-type]
-  --> tests/unit_tests/tasks/test_workflow_execute_task.py:55:33
+  --> tests/unit_tests/tasks/test_workflow_execute_task.py:54:33
 ERROR Argument `UUID` is not assignable to parameter `workflow_run_id` with type `str` in function `tasks.app_generate.workflow_execute_task._publish_streaming_response` [bad-argument-type]
-  --> tests/unit_tests/tasks/test_workflow_execute_task.py:55:50
+  --> tests/unit_tests/tasks/test_workflow_execute_task.py:54:50
 ERROR Argument `Iterator[Any]` is not assignable to parameter `response_stream` with type `Generator[BaseModel | Mapping[str, Any] | str]` in function `tasks.app_generate.workflow_execute_task._publish_streaming_response` [bad-argument-type]
-  --> tests/unit_tests/tasks/test_workflow_execute_task.py:65:33
+  --> tests/unit_tests/tasks/test_workflow_execute_task.py:64:33
 ERROR Object of class `BlobChunkMessage` has no attribute `variable_name`
 ERROR Object of class `BlobChunkMessage` has no attribute `variable_name`
 ERROR Object of class `BlobChunkMessage` has no attribute `variable_value`

@xr843
Copy link
Copy Markdown
Contributor Author

xr843 commented Apr 6, 2026

Hi maintainers! 这个 PR 已经挂了 6 天,想请求 review 一下。这是 sessionmaker 迁移系列的第一步,建议先 review 本 PR (#34381),再看 #34382。感谢!

@asukaminato0721
Copy link
Copy Markdown
Contributor

fix ci...
or you can migrate to container first.

See #32454

@xr843
Copy link
Copy Markdown
Contributor Author

xr843 commented Apr 7, 2026

Hi @asukaminato0721, thanks for the feedback. I'll rebase onto the latest main to resolve the merge conflicts and fix the CI failures.

Regarding #32454 (Testcontainers) — I see the direction. My sessionmaker migration here is complementary to that effort: this PR migrates the production code to use sessionmaker().begin(), while Testcontainers would improve the test infrastructure. They're not conflicting changes.

I'll get CI green and update this PR shortly.

@xr843 xr843 force-pushed the refactor/sessionmaker-core branch from 4efa414 to 4bba990 Compare April 7, 2026 13:31
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-04-07 13:32:36.633954777 +0000
+++ /tmp/pyrefly_pr.txt	2026-04-07 13:32:26.548962096 +0000
@@ -17,11 +17,11 @@
 ERROR Class member `EasyUIBasedGenerateTaskPipeline._application_generate_entity` overrides parent class `BasedGenerateTaskPipeline` in an inconsistent manner [bad-override]
   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:75:5
 ERROR `+=` is not supported between `list[PromptMessageContentUnionTypes]` and `str` [unsupported-operation]
-   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:323:29
+   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:321:29
 ERROR Argument `list[Unknown]` is not assignable to parameter `value` with type `SQLCoreOperations[dict[str, Any]] | dict[str, Any]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
-   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:390:27
+   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:388:27
 ERROR `defaultdict[str, dict[Unknown, Unknown]]` is not assignable to `defaultdict[ModelType, dict[str, ModelSettings]]` [bad-assignment]
-    --> core/entities/provider_configuration.py:1531:79
+    --> core/entities/provider_configuration.py:1513:79
 ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[UserPromptMessage], model_parameters=dict[str, int], stream=Literal[False]) [no-matching-overload]
   --> core/llm_generator/llm_generator.py:85:60
 ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[UserPromptMessage], model_parameters=dict[str, float | int], stream=Literal[False]) [no-matching-overload]
@@ -5441,21 +5441,21 @@
 ERROR Object of class `ModuleType` has no attribute `trace_manager_queue` [missing-attribute]
   --> tests/unit_tests/core/telemetry/test_facade.py:47:5
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.ProviderModelSetting.__init__` [bad-argument-type]
-  --> tests/unit_tests/core/test_provider_manager.py:51:20
+  --> tests/unit_tests/core/test_provider_manager.py:54:20
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.LoadBalancingModelConfig.__init__` [bad-argument-type]
-  --> tests/unit_tests/core/test_provider_manager.py:64:24
+  --> tests/unit_tests/core/test_provider_manager.py:67:24
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.LoadBalancingModelConfig.__init__` [bad-argument-type]
-  --> tests/unit_tests/core/test_provider_manager.py:73:24
+  --> tests/unit_tests/core/test_provider_manager.py:76:24
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.ProviderModelSetting.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:113:20
+   --> tests/unit_tests/core/test_provider_manager.py:116:20
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.LoadBalancingModelConfig.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:124:24
+   --> tests/unit_tests/core/test_provider_manager.py:127:24
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.ProviderModelSetting.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:160:20
+   --> tests/unit_tests/core/test_provider_manager.py:163:20
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.LoadBalancingModelConfig.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:171:24
+   --> tests/unit_tests/core/test_provider_manager.py:174:24
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.LoadBalancingModelConfig.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:180:24
+   --> tests/unit_tests/core/test_provider_manager.py:183:24
 ERROR `dict[str, str]` is not assignable to TypedDict key `data` with type `BaseNodeData` [bad-typed-dict-key]
   --> tests/unit_tests/core/test_trigger_debug_event_selectors.py:56:46
 ERROR Object of class `BlobChunkMessage` has no attribute `text`
@@ -5538,25 +5538,25 @@
 ERROR Argument `Generator[Unknown] | None` is not assignable to parameter `iterable` with type `Iterable[Unknown]` in function `list.__init__` [bad-argument-type]
    --> tests/unit_tests/core/tools/test_tool_file_manager.py:253:25
 ERROR `SimpleNamespace` is not assignable to attribute `entity` with type `ToolProviderEntityWithPlugin` [bad-assignment]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:300:32
+   --> tests/unit_tests/core/tools/test_tool_manager.py:307:32
 ERROR Argument `SimpleNamespace` is not assignable to parameter `agent_tool` with type `AgentToolEntity` in function `core.tools.tool_manager.ToolManager.get_agent_tool_runtime` [bad-argument-type]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:438:32
+   --> tests/unit_tests/core/tools/test_tool_manager.py:444:32
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_tool` with type `WorkflowToolRuntimeSpec` in function `core.tools.tool_manager.ToolManager.get_workflow_tool_runtime` [bad-argument-type]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:485:35
+   --> tests/unit_tests/core/tools/test_tool_manager.py:491:35
 ERROR Argument `SimpleNamespace` is not assignable to parameter `agent_tool` with type `AgentToolEntity` in function `core.tools.tool_manager.ToolManager.get_agent_tool_runtime` [bad-argument-type]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:521:36
+   --> tests/unit_tests/core/tools/test_tool_manager.py:527:36
 ERROR Cannot set item in `dict[str, I18nObject | None]` [unsupported-operation]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:627:55
+   --> tests/unit_tests/core/tools/test_tool_manager.py:633:55
 ERROR `SimpleNamespace` is not assignable to attribute `entity` with type `ToolProviderEntityWithPlugin` [bad-assignment]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:654:32
+   --> tests/unit_tests/core/tools/test_tool_manager.py:660:32
 ERROR Argument `Literal['']` is not assignable to parameter `typ` with type `Literal['api', 'builtin', 'mcp', 'workflow'] | None` in function `core.tools.tool_manager.ToolManager.list_providers_from_api` [bad-argument-type]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:678:97
+   --> tests/unit_tests/core/tools/test_tool_manager.py:684:97
 ERROR `SimpleNamespace` is not assignable to attribute `entity` with type `ToolProviderEntityWithPlugin` [bad-assignment]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:820:30
+   --> tests/unit_tests/core/tools/test_tool_manager.py:826:30
 ERROR `SimpleNamespace` is not assignable to attribute `entity` with type `ToolProviderEntityWithPlugin` [bad-assignment]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:844:30
+   --> tests/unit_tests/core/tools/test_tool_manager.py:850:30
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:849:20
+   --> tests/unit_tests/core/tools/test_tool_manager.py:855:20
 ERROR Argument `SimpleNamespace` is not assignable to parameter `controller` with type `ToolProviderController` in function `core.tools.utils.encryption.create_tool_provider_encrypter` [bad-argument-type]
    --> tests/unit_tests/core/tools/utils/test_encryption.py:203:75
 ERROR `None` is not subscriptable [unsupported-operation]
@@ -5594,17 +5594,17 @@
 ERROR Object of class `BlobChunkMessage` has no attribute `json_object`
 ERROR Object of class `BlobChunkMessage` has no attribute `json_object`
 ERROR Argument `SimpleNamespace` is not assignable to parameter `db_provider` with type `WorkflowToolProvider` in function `core.tools.workflow_as_tool.provider.WorkflowToolProviderController._get_db_provider_tool` [bad-argument-type]
-  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:93:49
+  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:94:49
 ERROR Argument `SimpleNamespace` is not assignable to parameter `app` with type `App` in function `core.tools.workflow_as_tool.provider.WorkflowToolProviderController._get_db_provider_tool` [bad-argument-type]
-  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:93:62
+  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:94:62
 ERROR Argument `SimpleNamespace` is not assignable to parameter `user` with type `Account | None` in function `core.tools.workflow_as_tool.provider.WorkflowToolProviderController._get_db_provider_tool` [bad-argument-type]
-  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:93:89
+  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:94:89
 ERROR `not in` is not supported between `Literal['json']` and `object` [not-iterable]
-  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:98:12
+  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:99:12
 ERROR `list[SimpleNamespace]` is not assignable to attribute `tools` with type `list[WorkflowTool]` [bad-assignment]
-   --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:107:24
+   --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:108:24
 ERROR Argument `SimpleNamespace` is not assignable to parameter `db_provider` with type `WorkflowToolProvider` in function `core.tools.workflow_as_tool.provider.WorkflowToolProviderController.from_db` [bad-argument-type]
-   --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:153:60
+   --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:154:60
 ERROR Object of class `BlobChunkMessage` has no attribute `variable_name`
 ERROR Object of class `BlobChunkMessage` has no attribute `variable_value`
 ERROR Object of class `BlobChunkMessage` has no attribute `text`
@@ -5960,21 +5960,21 @@
 ERROR Argument `_FakeSession` is not assignable to parameter `session` with type `Session | None` in function `core.workflow.human_input_forms.load_form_tokens_by_form_id` [bad-argument-type]
   --> tests/unit_tests/core/workflow/test_human_input_forms.py:55:60
 ERROR Argument `object` is not assignable to parameter `node_data_memory` with type `MemoryConfig | None` in function `core.workflow.node_factory.fetch_memory` [bad-argument-type]
-  --> tests/unit_tests/core/workflow/test_node_factory.py:66:30
+  --> tests/unit_tests/core/workflow/test_node_factory.py:64:30
 ERROR Argument `object` is not assignable to parameter `node_data_memory` with type `MemoryConfig | None` in function `core.workflow.node_factory.fetch_memory` [bad-argument-type]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:102:30
+  --> tests/unit_tests/core/workflow/test_node_factory.py:98:30
 ERROR Argument `SimpleNamespace` is not assignable to parameter `graph_init_params` with type `GraphInitParams` in function `core.workflow.node_factory.DifyNodeFactory.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:249:35
+   --> tests/unit_tests/core/workflow/test_node_factory.py:245:35
 ERROR `SimpleNamespace` is not assignable to attribute `graph_runtime_state` with type `GraphRuntimeState` [bad-assignment]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:312:39
+   --> tests/unit_tests/core/workflow/test_node_factory.py:308:39
 ERROR `SimpleNamespace` is not assignable to attribute `_dify_context` with type `DifyRunContext` [bad-assignment]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:313:33
+   --> tests/unit_tests/core/workflow/test_node_factory.py:309:33
 ERROR `form_repository` may be uninitialized [unbound-name]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:452:49
+   --> tests/unit_tests/core/workflow/test_node_factory.py:448:49
 ERROR `SimpleNamespace` is not assignable to attribute `_dify_context` with type `DifyRunContext` [bad-assignment]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:595:33
+   --> tests/unit_tests/core/workflow/test_node_factory.py:591:33
 ERROR `SimpleNamespace` is not assignable to attribute `graph_runtime_state` with type `GraphRuntimeState` [bad-assignment]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:596:39
+   --> tests/unit_tests/core/workflow/test_node_factory.py:592:39
 ERROR Object of class `ExternalRecipient` has no attribute `reference_id` [missing-attribute]
   --> tests/unit_tests/core/workflow/test_node_runtime.py:88:12
 ERROR Argument `object` is not assignable to parameter `method` with type `EmailDeliveryMethod | InteractiveSurfaceDeliveryMethod` in function `core.workflow.node_runtime.apply_dify_debug_email_recipient` [bad-argument-type]
@@ -6142,11 +6142,11 @@
 ERROR Argument `MockRequest` is not assignable to parameter `request` with type `Request` in function `libs.token.extract_webapp_access_token` [bad-argument-type]
   --> tests/unit_tests/libs/test_token.py:30:44
 ERROR TypedDict `TenantCustomConfigDict` does not have key `feature1` [bad-typed-dict-key]
-   --> tests/unit_tests/models/test_account_models.py:736:23
+   --> tests/unit_tests/models/test_account_models.py:748:23
 ERROR TypedDict `TenantCustomConfigDict` does not have key `feature2` [bad-typed-dict-key]
-   --> tests/unit_tests/models/test_account_models.py:737:23
+   --> tests/unit_tests/models/test_account_models.py:749:23
 ERROR Argument `dict[str, bool | str]` is not assignable to parameter `value` with type `TenantCustomConfigDict` in function `models.account.Tenant.custom_config_dict` [bad-argument-type]
-   --> tests/unit_tests/models/test_account_models.py:758:37
+   --> tests/unit_tests/models/test_account_models.py:770:37
 ERROR `None` is not subscriptable [unsupported-operation]
     --> tests/unit_tests/models/test_app_models.py:1293:20
 ERROR `None` is not subscriptable [unsupported-operation]
@@ -6629,13 +6629,13 @@
 ERROR Argument `None` is not assignable to parameter `plan` with type `CloudPlan` in function `RagPipelineTaskProxyTestDataFactory.create_mock_features` [bad-argument-type]
    --> tests/unit_tests/services/test_rag_pipeline_task_proxy.py:431:109
 ERROR Argument `dict[str, Any]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.schedule_service.ScheduleService.to_schedule_config` [bad-argument-type]
-   --> tests/unit_tests/services/test_schedule_service.py:860:61
+   --> tests/unit_tests/services/test_schedule_service.py:855:61
 ERROR Argument `dict[str, dict[str, str] | str]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.schedule_service.ScheduleService.to_schedule_config` [bad-argument-type]
-   --> tests/unit_tests/services/test_schedule_service.py:874:56
+   --> tests/unit_tests/services/test_schedule_service.py:869:56
 ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.schedule_service.ScheduleService.to_schedule_config` [bad-argument-type]
-   --> tests/unit_tests/services/test_schedule_service.py:891:61
+   --> tests/unit_tests/services/test_schedule_service.py:886:61
 ERROR Argument `dict[str, dict[str, str] | str]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.schedule_service.ScheduleService.to_schedule_config` [bad-argument-type]
-   --> tests/unit_tests/services/test_schedule_service.py:903:56
+   --> tests/unit_tests/services/test_schedule_service.py:898:56
 ERROR Missing required key `enable` for TypedDict `SummaryIndexSettingDict` [bad-typed-dict-key]
   --> tests/unit_tests/services/test_summary_index_service.py:97:93
 ERROR Key `a` is not defined in TypedDict `SummaryIndexSettingDict` [bad-typed-dict-key]
@@ -6779,11 +6779,11 @@
 ERROR Argument `dict[str, bool]` is not assignable to parameter `substitutions` with type `Mapping[str, str]` in function `tasks.mail_inner_task._render_template_with_strategy` [bad-argument-type]
     --> tests/unit_tests/tasks/test_mail_send_task.py:1300:64
 ERROR Argument `Iterator[Any]` is not assignable to parameter `response_stream` with type `Generator[BaseModel | Mapping[str, Any] | str]` in function `tasks.app_generate.workflow_execute_task._publish_streaming_response` [bad-argument-type]
-  --> tests/unit_tests/tasks/test_workflow_execute_task.py:55:33
+  --> tests/unit_tests/tasks/test_workflow_execute_task.py:54:33
 ERROR Argument `UUID` is not assignable to parameter `workflow_run_id` with type `str` in function `tasks.app_generate.workflow_execute_task._publish_streaming_response` [bad-argument-type]
-  --> tests/unit_tests/tasks/test_workflow_execute_task.py:55:50
+  --> tests/unit_tests/tasks/test_workflow_execute_task.py:54:50
 ERROR Argument `Iterator[Any]` is not assignable to parameter `response_stream` with type `Generator[BaseModel | Mapping[str, Any] | str]` in function `tasks.app_generate.workflow_execute_task._publish_streaming_response` [bad-argument-type]
-  --> tests/unit_tests/tasks/test_workflow_execute_task.py:65:33
+  --> tests/unit_tests/tasks/test_workflow_execute_task.py:64:33
 ERROR Object of class `BlobChunkMessage` has no attribute `variable_name`
 ERROR Object of class `BlobChunkMessage` has no attribute `variable_name`
 ERROR Object of class `BlobChunkMessage` has no attribute `variable_value`

session.commit()

except Exception:
session.rollback()
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.

@dosu do we need manually rollback?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No, you shouldn't need to manually rollback. The whole point of this refactoring is to move from manual session.commit() calls to the sessionmaker(db.engine).begin() context manager, which automatically handles both commits and rollbacks [1]. If an exception occurs within the with block, the context manager will automatically rollback the transaction — no manual intervention needed.

This PR doesn't include any database schema migrations either, so there's no migration-level rollback to worry about.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
Chat with Dosu Open in Cursor  Share on X

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.

@dosu so how to update the code. Do we need try except here?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No, you don't need a try/except for rollback. The sessionmaker(db.engine).begin() context manager handles that automatically [1]:

  • Normal exit → auto-commits
  • Exception raised → auto-rollbacks
# This is sufficient — no try/except needed for rollback
with sessionmaker(db.engine).begin() as session:
    session.add(my_object)
    # exception → automatic rollback
    # no exception → automatic commit

You'd only add a try/except around it if you need custom error handling (e.g., logging, retries, or transforming exceptions) — but the rollback itself is already taken care of by the context manager.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
Chat with Dosu Open in Cursor  Share on X

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hi @asukaminato0721, as Dosu explained — no, we don't need try/except or manual rollback here.

The sessionmaker(db.engine).begin() context manager automatically:

  • commits on normal exit
  • rollbacks on exception

This is standard SQLAlchemy behavior (docs ref). A try/except would only be needed for custom error handling (logging, retries, etc.), not for rollback itself.

Could you re-review when you get a chance? CI is all green. Thanks!

@asukaminato0721 asukaminato0721 self-requested a review April 7, 2026 13:38
…er pattern

Part of langgenius#24245. Replace manual Session(db.engine) + session.commit()
with sessionmaker(db.engine).begin() context manager in api/core/,
api/models/, api/tasks/, api/events/, api/schedule/, and api/extensions/.

- Replace `Session(db.engine)` with `sessionmaker(db.engine).begin()`
- Replace `Session(db.engine, expire_on_commit=False)` with `sessionmaker(db.engine, expire_on_commit=False).begin()`
- Remove manual `session.commit()` calls (handled automatically by context manager)
- Replace `session.commit()` with `session.flush()` where followed by `session.refresh()`
- Preserve `expire_on_commit=False` and `autoflush=False` where applicable
- Update imports: add `sessionmaker`, remove unused `Session` imports
autofix-ci bot and others added 4 commits April 8, 2026 19:16
- Add missing `from sqlalchemy.orm import sessionmaker` import in
  workflow_response_converter.py and replace `Session(bind=db.engine)`
  with `sessionmaker(db.engine).begin()`
- Update test_schedule_service.py: mock `sessionmaker` instead of `Session`,
  use `.return_value.begin.return_value.__enter__` chain, remove
  `session.commit` assertions (handled by sessionmaker.begin context)
- Update test_workflow_execute_task.py: replace `_FakeSessionContext` with
  `_make_sessionmaker_mock` helper that mocks the sessionmaker.begin pattern
- Update test_base_trace_instance.py: mock `sessionmaker` instead of `Session`
  with proper begin context manager chain
… models)

Update mock patterns in 5 test files to match the Session -> sessionmaker
refactor. The sessionmaker(engine).begin() pattern returns a context manager
that auto-commits, so Session mocks are replaced with sessionmaker mocks
using the factory.begin() chain, and explicit commit assertions are removed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fix the last 3 failing test files:
- test_backwards_invocation_app.py: mock sessionmaker instead of Session
- test_provider_manager.py: mock sessionmaker with .begin() CM chain
- test_provider.py: _mock_session_with_begin returns MagicMock with
  proper .begin() context manager support

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
auto-merge was automatically disabled April 8, 2026 11:17

Head branch was pushed to by a user without write access

@xr843 xr843 force-pushed the refactor/sessionmaker-core branch from 4bba990 to d7f6ad3 Compare April 8, 2026 11:17
@xr843
Copy link
Copy Markdown
Contributor Author

xr843 commented Apr 8, 2026

@asukaminato0721 Thanks for the review! As dosu explained, sessionmaker(db.engine).begin() context manager handles commit/rollback automatically — commit on normal exit, rollback on exception. No manual try/except needed for rollback. Could you re-review and dismiss the changes-requested status? Thanks!

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-04-08 11:19:02.580010412 +0000
+++ /tmp/pyrefly_pr.txt	2026-04-08 11:18:52.718015637 +0000
@@ -17,11 +17,11 @@
 ERROR Class member `EasyUIBasedGenerateTaskPipeline._application_generate_entity` overrides parent class `BasedGenerateTaskPipeline` in an inconsistent manner [bad-override]
   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:75:5
 ERROR `+=` is not supported between `list[PromptMessageContentUnionTypes]` and `str` [unsupported-operation]
-   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:323:29
+   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:321:29
 ERROR Argument `list[Unknown]` is not assignable to parameter `value` with type `SQLCoreOperations[dict[str, Any]] | dict[str, Any]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
-   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:390:27
+   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:388:27
 ERROR `defaultdict[str, dict[Unknown, Unknown]]` is not assignable to `defaultdict[ModelType, dict[str, ModelSettings]]` [bad-assignment]
-    --> core/entities/provider_configuration.py:1531:79
+    --> core/entities/provider_configuration.py:1513:79
 ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[UserPromptMessage], model_parameters=dict[str, int], stream=Literal[False]) [no-matching-overload]
   --> core/llm_generator/llm_generator.py:85:60
 ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[UserPromptMessage], model_parameters=dict[str, float | int], stream=Literal[False]) [no-matching-overload]
@@ -5441,21 +5441,21 @@
 ERROR Object of class `ModuleType` has no attribute `trace_manager_queue` [missing-attribute]
   --> tests/unit_tests/core/telemetry/test_facade.py:47:5
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.ProviderModelSetting.__init__` [bad-argument-type]
-  --> tests/unit_tests/core/test_provider_manager.py:51:20
+  --> tests/unit_tests/core/test_provider_manager.py:54:20
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.LoadBalancingModelConfig.__init__` [bad-argument-type]
-  --> tests/unit_tests/core/test_provider_manager.py:64:24
+  --> tests/unit_tests/core/test_provider_manager.py:67:24
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.LoadBalancingModelConfig.__init__` [bad-argument-type]
-  --> tests/unit_tests/core/test_provider_manager.py:73:24
+  --> tests/unit_tests/core/test_provider_manager.py:76:24
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.ProviderModelSetting.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:113:20
+   --> tests/unit_tests/core/test_provider_manager.py:116:20
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.LoadBalancingModelConfig.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:124:24
+   --> tests/unit_tests/core/test_provider_manager.py:127:24
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.ProviderModelSetting.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:160:20
+   --> tests/unit_tests/core/test_provider_manager.py:163:20
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.LoadBalancingModelConfig.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:171:24
+   --> tests/unit_tests/core/test_provider_manager.py:174:24
 ERROR Argument `Literal['llm']` is not assignable to parameter `model_type` with type `ModelType | SQLCoreOperations[ModelType]` in function `models.provider.LoadBalancingModelConfig.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/test_provider_manager.py:180:24
+   --> tests/unit_tests/core/test_provider_manager.py:183:24
 ERROR `dict[str, str]` is not assignable to TypedDict key `data` with type `BaseNodeData` [bad-typed-dict-key]
   --> tests/unit_tests/core/test_trigger_debug_event_selectors.py:56:46
 ERROR Object of class `BlobChunkMessage` has no attribute `text`
@@ -5538,25 +5538,25 @@
 ERROR Argument `Generator[Unknown] | None` is not assignable to parameter `iterable` with type `Iterable[Unknown]` in function `list.__init__` [bad-argument-type]
    --> tests/unit_tests/core/tools/test_tool_file_manager.py:253:25
 ERROR `SimpleNamespace` is not assignable to attribute `entity` with type `ToolProviderEntityWithPlugin` [bad-assignment]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:300:32
+   --> tests/unit_tests/core/tools/test_tool_manager.py:307:32
 ERROR Argument `SimpleNamespace` is not assignable to parameter `agent_tool` with type `AgentToolEntity` in function `core.tools.tool_manager.ToolManager.get_agent_tool_runtime` [bad-argument-type]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:438:32
+   --> tests/unit_tests/core/tools/test_tool_manager.py:444:32
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_tool` with type `WorkflowToolRuntimeSpec` in function `core.tools.tool_manager.ToolManager.get_workflow_tool_runtime` [bad-argument-type]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:485:35
+   --> tests/unit_tests/core/tools/test_tool_manager.py:491:35
 ERROR Argument `SimpleNamespace` is not assignable to parameter `agent_tool` with type `AgentToolEntity` in function `core.tools.tool_manager.ToolManager.get_agent_tool_runtime` [bad-argument-type]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:521:36
+   --> tests/unit_tests/core/tools/test_tool_manager.py:527:36
 ERROR Cannot set item in `dict[str, I18nObject | None]` [unsupported-operation]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:627:55
+   --> tests/unit_tests/core/tools/test_tool_manager.py:633:55
 ERROR `SimpleNamespace` is not assignable to attribute `entity` with type `ToolProviderEntityWithPlugin` [bad-assignment]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:654:32
+   --> tests/unit_tests/core/tools/test_tool_manager.py:660:32
 ERROR Argument `Literal['']` is not assignable to parameter `typ` with type `Literal['api', 'builtin', 'mcp', 'workflow'] | None` in function `core.tools.tool_manager.ToolManager.list_providers_from_api` [bad-argument-type]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:678:97
+   --> tests/unit_tests/core/tools/test_tool_manager.py:684:97
 ERROR `SimpleNamespace` is not assignable to attribute `entity` with type `ToolProviderEntityWithPlugin` [bad-assignment]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:820:30
+   --> tests/unit_tests/core/tools/test_tool_manager.py:826:30
 ERROR `SimpleNamespace` is not assignable to attribute `entity` with type `ToolProviderEntityWithPlugin` [bad-assignment]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:844:30
+   --> tests/unit_tests/core/tools/test_tool_manager.py:850:30
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/core/tools/test_tool_manager.py:849:20
+   --> tests/unit_tests/core/tools/test_tool_manager.py:855:20
 ERROR Argument `SimpleNamespace` is not assignable to parameter `controller` with type `ToolProviderController` in function `core.tools.utils.encryption.create_tool_provider_encrypter` [bad-argument-type]
    --> tests/unit_tests/core/tools/utils/test_encryption.py:203:75
 ERROR `None` is not subscriptable [unsupported-operation]
@@ -5594,17 +5594,17 @@
 ERROR Object of class `BlobChunkMessage` has no attribute `json_object`
 ERROR Object of class `BlobChunkMessage` has no attribute `json_object`
 ERROR Argument `SimpleNamespace` is not assignable to parameter `db_provider` with type `WorkflowToolProvider` in function `core.tools.workflow_as_tool.provider.WorkflowToolProviderController._get_db_provider_tool` [bad-argument-type]
-  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:93:49
+  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:94:49
 ERROR Argument `SimpleNamespace` is not assignable to parameter `app` with type `App` in function `core.tools.workflow_as_tool.provider.WorkflowToolProviderController._get_db_provider_tool` [bad-argument-type]
-  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:93:62
+  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:94:62
 ERROR Argument `SimpleNamespace` is not assignable to parameter `user` with type `Account | None` in function `core.tools.workflow_as_tool.provider.WorkflowToolProviderController._get_db_provider_tool` [bad-argument-type]
-  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:93:89
+  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:94:89
 ERROR `not in` is not supported between `Literal['json']` and `object` [not-iterable]
-  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:98:12
+  --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:99:12
 ERROR `list[SimpleNamespace]` is not assignable to attribute `tools` with type `list[WorkflowTool]` [bad-assignment]
-   --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:107:24
+   --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:108:24
 ERROR Argument `SimpleNamespace` is not assignable to parameter `db_provider` with type `WorkflowToolProvider` in function `core.tools.workflow_as_tool.provider.WorkflowToolProviderController.from_db` [bad-argument-type]
-   --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:153:60
+   --> tests/unit_tests/core/tools/workflow_as_tool/test_provider.py:154:60
 ERROR Object of class `BlobChunkMessage` has no attribute `variable_name`
 ERROR Object of class `BlobChunkMessage` has no attribute `variable_value`
 ERROR Object of class `BlobChunkMessage` has no attribute `text`
@@ -5960,21 +5960,21 @@
 ERROR Argument `_FakeSession` is not assignable to parameter `session` with type `Session | None` in function `core.workflow.human_input_forms.load_form_tokens_by_form_id` [bad-argument-type]
   --> tests/unit_tests/core/workflow/test_human_input_forms.py:55:60
 ERROR Argument `object` is not assignable to parameter `node_data_memory` with type `MemoryConfig | None` in function `core.workflow.node_factory.fetch_memory` [bad-argument-type]
-  --> tests/unit_tests/core/workflow/test_node_factory.py:66:30
+  --> tests/unit_tests/core/workflow/test_node_factory.py:64:30
 ERROR Argument `object` is not assignable to parameter `node_data_memory` with type `MemoryConfig | None` in function `core.workflow.node_factory.fetch_memory` [bad-argument-type]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:102:30
+  --> tests/unit_tests/core/workflow/test_node_factory.py:98:30
 ERROR Argument `SimpleNamespace` is not assignable to parameter `graph_init_params` with type `GraphInitParams` in function `core.workflow.node_factory.DifyNodeFactory.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:249:35
+   --> tests/unit_tests/core/workflow/test_node_factory.py:245:35
 ERROR `SimpleNamespace` is not assignable to attribute `graph_runtime_state` with type `GraphRuntimeState` [bad-assignment]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:312:39
+   --> tests/unit_tests/core/workflow/test_node_factory.py:308:39
 ERROR `SimpleNamespace` is not assignable to attribute `_dify_context` with type `DifyRunContext` [bad-assignment]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:313:33
+   --> tests/unit_tests/core/workflow/test_node_factory.py:309:33
 ERROR `form_repository` may be uninitialized [unbound-name]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:452:49
+   --> tests/unit_tests/core/workflow/test_node_factory.py:448:49
 ERROR `SimpleNamespace` is not assignable to attribute `_dify_context` with type `DifyRunContext` [bad-assignment]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:595:33
+   --> tests/unit_tests/core/workflow/test_node_factory.py:591:33
 ERROR `SimpleNamespace` is not assignable to attribute `graph_runtime_state` with type `GraphRuntimeState` [bad-assignment]
-   --> tests/unit_tests/core/workflow/test_node_factory.py:596:39
+   --> tests/unit_tests/core/workflow/test_node_factory.py:592:39
 ERROR Object of class `ExternalRecipient` has no attribute `reference_id` [missing-attribute]
   --> tests/unit_tests/core/workflow/test_node_runtime.py:88:12
 ERROR Argument `object` is not assignable to parameter `method` with type `EmailDeliveryMethod | InteractiveSurfaceDeliveryMethod` in function `core.workflow.node_runtime.apply_dify_debug_email_recipient` [bad-argument-type]
@@ -6142,11 +6142,11 @@
 ERROR Argument `MockRequest` is not assignable to parameter `request` with type `Request` in function `libs.token.extract_webapp_access_token` [bad-argument-type]
   --> tests/unit_tests/libs/test_token.py:30:44
 ERROR TypedDict `TenantCustomConfigDict` does not have key `feature1` [bad-typed-dict-key]
-   --> tests/unit_tests/models/test_account_models.py:736:23
+   --> tests/unit_tests/models/test_account_models.py:748:23
 ERROR TypedDict `TenantCustomConfigDict` does not have key `feature2` [bad-typed-dict-key]
-   --> tests/unit_tests/models/test_account_models.py:737:23
+   --> tests/unit_tests/models/test_account_models.py:749:23
 ERROR Argument `dict[str, bool | str]` is not assignable to parameter `value` with type `TenantCustomConfigDict` in function `models.account.Tenant.custom_config_dict` [bad-argument-type]
-   --> tests/unit_tests/models/test_account_models.py:758:37
+   --> tests/unit_tests/models/test_account_models.py:770:37
 ERROR `None` is not subscriptable [unsupported-operation]
     --> tests/unit_tests/models/test_app_models.py:1293:20
 ERROR `None` is not subscriptable [unsupported-operation]
@@ -6637,13 +6637,13 @@
 ERROR Argument `None` is not assignable to parameter `plan` with type `CloudPlan` in function `RagPipelineTaskProxyTestDataFactory.create_mock_features` [bad-argument-type]
    --> tests/unit_tests/services/test_rag_pipeline_task_proxy.py:431:109
 ERROR Argument `dict[str, Any]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.schedule_service.ScheduleService.to_schedule_config` [bad-argument-type]
-   --> tests/unit_tests/services/test_schedule_service.py:860:61
+   --> tests/unit_tests/services/test_schedule_service.py:858:61
 ERROR Argument `dict[str, dict[str, str] | str]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.schedule_service.ScheduleService.to_schedule_config` [bad-argument-type]
-   --> tests/unit_tests/services/test_schedule_service.py:874:56
+   --> tests/unit_tests/services/test_schedule_service.py:872:56
 ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.schedule_service.ScheduleService.to_schedule_config` [bad-argument-type]
-   --> tests/unit_tests/services/test_schedule_service.py:891:61
+   --> tests/unit_tests/services/test_schedule_service.py:889:61
 ERROR Argument `dict[str, dict[str, str] | str]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.schedule_service.ScheduleService.to_schedule_config` [bad-argument-type]
-   --> tests/unit_tests/services/test_schedule_service.py:903:56
+   --> tests/unit_tests/services/test_schedule_service.py:901:56
 ERROR Missing required key `enable` for TypedDict `SummaryIndexSettingDict` [bad-typed-dict-key]
   --> tests/unit_tests/services/test_summary_index_service.py:97:93
 ERROR Key `a` is not defined in TypedDict `SummaryIndexSettingDict` [bad-typed-dict-key]
@@ -6787,11 +6787,11 @@
 ERROR Argument `dict[str, bool]` is not assignable to parameter `substitutions` with type `Mapping[str, str]` in function `tasks.mail_inner_task._render_template_with_strategy` [bad-argument-type]
     --> tests/unit_tests/tasks/test_mail_send_task.py:1300:64
 ERROR Argument `Iterator[Any]` is not assignable to parameter `response_stream` with type `Generator[BaseModel | Mapping[str, Any] | str]` in function `tasks.app_generate.workflow_execute_task._publish_streaming_response` [bad-argument-type]
-  --> tests/unit_tests/tasks/test_workflow_execute_task.py:55:33
+  --> tests/unit_tests/tasks/test_workflow_execute_task.py:54:33
 ERROR Argument `UUID` is not assignable to parameter `workflow_run_id` with type `str` in function `tasks.app_generate.workflow_execute_task._publish_streaming_response` [bad-argument-type]
-  --> tests/unit_tests/tasks/test_workflow_execute_task.py:55:50
+  --> tests/unit_tests/tasks/test_workflow_execute_task.py:54:50
 ERROR Argument `Iterator[Any]` is not assignable to parameter `response_stream` with type `Generator[BaseModel | Mapping[str, Any] | str]` in function `tasks.app_generate.workflow_execute_task._publish_streaming_response` [bad-argument-type]
-  --> tests/unit_tests/tasks/test_workflow_execute_task.py:65:33
+  --> tests/unit_tests/tasks/test_workflow_execute_task.py:64:33
 ERROR Object of class `BlobChunkMessage` has no attribute `variable_name`
 ERROR Object of class `BlobChunkMessage` has no attribute `variable_name`
 ERROR Object of class `BlobChunkMessage` has no attribute `variable_value`

@dosubot dosubot bot mentioned this pull request Apr 8, 2026
6 tasks
…ttern

Update 15 test files to match the Session → sessionmaker(db.engine).begin()
migration. Changes include:
- Replace Session mock patches with sessionmaker mock chains
- Remove explicit session.commit assertions (auto-commit via begin())
- Change commit-triggered error tests to use alternative error triggers
- Update rollback tests to use non-commit error sources
- Add sessionmaker mock helpers for repeated patterns

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-04-10 08:32:09.950940945 +0000
+++ /tmp/pyrefly_pr.txt	2026-04-10 08:32:01.749058872 +0000
@@ -303,6 +303,10 @@
   --> core/tools/mcp_tool/provider.py:33:14
 ERROR Class member `PluginToolProviderController.entity` overrides parent class `BuiltinToolProviderController` in an inconsistent manner [bad-override]
   --> core/tools/plugin_tool/provider.py:12:5
+ERROR Could not find name `Session` [unknown-name]
+   --> core/tools/tool_manager.py:243:30
+ERROR Could not find name `Session` [unknown-name]
+   --> core/tools/tool_manager.py:350:22
 ERROR `(method: str, url: str, max_retries: int = ..., **kwargs: Any) -> httpx._models.Response` is not assignable to attribute `perform_request` with type `(self: CloudScraper, method: Unknown, url: Unknown, *args: Unknown, **kwargs: Unknown) -> requests.models.Response` [bad-assignment]
   --> core/tools/utils/web_reader_tool.py:66:35
 ERROR `list[Never]` is not assignable to attribute `tools` with type `Never` [bad-assignment]
@@ -2472,83 +2476,85 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message | None` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate` [bad-argument-type]
    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:527:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `flask_app` with type `Flask` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:584:27
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:583:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `context` with type `Context` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:589:25
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:588:25
 ERROR Argument `SimpleNamespace` is not assignable to parameter `variable_loader` with type `VariableLoader` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:590:33
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:589:33
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_execution_repository` with type `WorkflowExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:591:47
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:590:47
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_node_execution_repository` with type `WorkflowNodeExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:592:52
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:591:52
 ERROR Argument `SimpleNamespace` is not assignable to parameter `flask_app` with type `Flask` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:648:27
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:646:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `context` with type `Context` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:653:25
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:651:25
 ERROR Argument `SimpleNamespace` is not assignable to parameter `variable_loader` with type `VariableLoader` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:654:33
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:652:33
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_execution_repository` with type `WorkflowExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:655:47
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:653:47
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_node_execution_repository` with type `WorkflowNodeExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:656:52
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:654:52
 ERROR Argument `SimpleNamespace` is not assignable to parameter `flask_app` with type `Flask` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:720:23
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:717:23
 ERROR Argument `SimpleNamespace` is not assignable to parameter `context` with type `Context` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:725:21
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:722:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `variable_loader` with type `VariableLoader` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:726:29
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:723:29
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_execution_repository` with type `WorkflowExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:727:43
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:724:43
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_node_execution_repository` with type `WorkflowNodeExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:728:48
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:725:48
 ERROR Argument `SimpleNamespace` is not assignable to parameter `flask_app` with type `Flask` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:804:23
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:800:23
 ERROR Argument `SimpleNamespace` is not assignable to parameter `context` with type `Context` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:809:21
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:805:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `variable_loader` with type `VariableLoader` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:810:29
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:806:29
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_execution_repository` with type `WorkflowExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:811:43
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:807:43
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_node_execution_repository` with type `WorkflowNodeExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:812:48
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:808:48
+ERROR Could not find name `_sessionmaker_factory` [unknown-name]
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:869:91
 ERROR Argument `SimpleNamespace` is not assignable to parameter `flask_app` with type `Flask` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:885:27
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:881:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `context` with type `Context` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:890:25
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:886:25
 ERROR Argument `SimpleNamespace` is not assignable to parameter `variable_loader` with type `VariableLoader` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:891:33
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:887:33
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_execution_repository` with type `WorkflowExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:892:47
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:888:47
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_node_execution_repository` with type `WorkflowNodeExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:893:52
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:889:52
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._handle_advanced_chat_response` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:942:31
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:938:31
 ERROR Argument `SimpleNamespace` is not assignable to parameter `user` with type `Account | EndUser` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._handle_advanced_chat_response` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:951:22
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:947:22
 ERROR Argument `(**kwargs: Unknown) -> None` is not assignable to parameter `draft_var_saver_factory` with type `DraftVariableSaverFactory` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._handle_advanced_chat_response` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:952:41
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:948:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._handle_advanced_chat_response` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:989:31
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:985:31
 ERROR Argument `SimpleNamespace` is not assignable to parameter `user` with type `Account | EndUser` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._handle_advanced_chat_response` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:998:22
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:994:22
 ERROR Argument `(**kwargs: Unknown) -> None` is not assignable to parameter `draft_var_saver_factory` with type `DraftVariableSaverFactory` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._handle_advanced_chat_response` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:999:41
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:995:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `flask_app` with type `Flask` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1076:23
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1071:23
 ERROR Argument `SimpleNamespace` is not assignable to parameter `context` with type `Context` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1081:21
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1076:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `variable_loader` with type `VariableLoader` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1082:29
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1077:29
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_execution_repository` with type `WorkflowExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1083:43
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1078:43
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_node_execution_repository` with type `WorkflowNodeExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1084:48
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1079:48
 ERROR No matching overload found for function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator.generate` called with arguments: (app_model=SimpleNamespace, workflow=SimpleNamespace, user=Account, args=dict[str, dict[@_, @_] | str], invoke_from=Literal[InvokeFrom.DEBUGGER], workflow_run_id=Literal['run-id'], streaming=Literal[False]) [no-matching-overload]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1156:36
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1151:36
 ERROR Object of class `NoneType` has no attribute `show_retrieve_source` [missing-attribute]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1167:16
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1162:16
 ERROR No matching overload found for function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator.generate` called with arguments: (app_model=SimpleNamespace, workflow=SimpleNamespace, user=EndUser, args=dict[str, dict[@_, @_] | str], invoke_from=Literal[InvokeFrom.SERVICE_API], workflow_run_id=Literal['run-id'], streaming=Literal[False]) [no-matching-overload]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1235:27
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1230:27
 ERROR Cannot index into `str` [bad-index]
   --> tests/unit_tests/core/app/apps/advanced_chat/test_generate_response_converter.py:95:16
 ERROR Cannot index into `str` [bad-index]
@@ -2784,7 +2790,7 @@
 ERROR Cannot index into `str` [bad-index]
    --> tests/unit_tests/core/app/apps/pipeline/test_pipeline_generate_response_converter.py:112:12
 ERROR Class `PipelineRunner` has no class attribute `call_args` [missing-attribute]
-   --> tests/unit_tests/core/app/apps/pipeline/test_pipeline_generator.py:341:12
+   --> tests/unit_tests/core/app/apps/pipeline/test_pipeline_generator.py:338:12
 ERROR Argument `SimpleNamespace` is not assignable to parameter `application_generate_entity` with type `RagPipelineGenerateEntity` in function `core.app.apps.pipeline.pipeline_runner.PipelineRunner.__init__` [bad-argument-type]
   --> tests/unit_tests/core/app/apps/pipeline/test_pipeline_runner.py:65:37
 ERROR Argument `SimpleNamespace` is not assignable to parameter `application_generate_entity` with type `RagPipelineGenerateEntity` in function `core.app.apps.pipeline.pipeline_runner.PipelineRunner.__init__` [bad-argument-type]
@@ -3016,7 +3022,7 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `application_generate_entity` with type `AdvancedChatAppGenerateEntity | WorkflowAppGenerateEntity` in function `core.app.apps.common.workflow_response_converter.WorkflowResponseConverter.__init__` [bad-argument-type]
    --> tests/unit_tests/core/app/apps/test_workflow_pause_events.py:112:37
 ERROR Argument `SimpleNamespace` is not assignable to parameter `graph_runtime_state` with type `GraphRuntimeState` in function `core.app.apps.common.workflow_response_converter.WorkflowResponseConverter.workflow_pause_to_stream_response` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_workflow_pause_events.py:176:29
+   --> tests/unit_tests/core/app/apps/test_workflow_pause_events.py:178:29
 ERROR Argument `SimpleNamespace` is not assignable to parameter `app_model` with type `App` in function `core.app.apps.workflow.app_config_manager.WorkflowAppConfigManager.get_app_config` [bad-argument-type]
   --> tests/unit_tests/core/app/apps/workflow/test_app_config_manager.py:23:66
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `core.app.apps.workflow.app_config_manager.WorkflowAppConfigManager.get_app_config` [bad-argument-type]
@@ -3242,283 +3248,283 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `application_generate_entity` with type `AppGenerateEntity` in function `core.app.task_pipeline.based_generate_task_pipeline.BasedGenerateTaskPipeline.__init__` [bad-argument-type]
   --> tests/unit_tests/core/app/task_pipeline/test_based_generate_task_pipeline.py:23:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-  --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:98:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:121:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-  --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:99:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:122:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:100:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:123:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:118:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:141:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:119:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:142:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:120:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:143:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:138:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:161:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:139:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:162:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:140:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:163:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:152:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:175:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:153:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:176:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:154:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:177:21
 ERROR `() -> Iterator[SimpleNamespace]` is not assignable to attribute `listen` with type `(self: AppQueueManager) -> Generator[MessageQueueMessage | WorkflowQueueMessage, Unknown]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:182:41
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:205:41
 ERROR `(message_id: str) -> None` is not assignable to attribute `get_message_event_type` with type `(self: MessageCycleManager, message_id: str) -> StreamEvent` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:183:66
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:206:66
 ERROR `(**kwargs: Unknown) -> Literal['chunk']` is not assignable to attribute `message_to_stream_response` with type `(self: MessageCycleManager, answer: str, message_id: str, from_variable_selector: list[str] | None = None, event_type: StreamEvent | None = None) -> MessageStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:184:70
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:207:70
 ERROR `(**kwargs: Unknown) -> Literal['replace']` is not assignable to attribute `message_replace_to_stream_response` with type `(self: MessageCycleManager, answer: str, reason: str = '') -> MessageReplaceStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:185:78
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:208:78
 ERROR `() -> Literal['end']` is not assignable to attribute `_message_end_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline) -> MessageEndStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:187:52
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:210:52
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:225:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:228:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:226:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:229:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:227:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:230:21
 ERROR `TestEasyUiBasedGenerateTaskPipeline.test_handle_output_moderation_chunk_directs_output._Moderation` is not assignable to attribute `output_moderation_handler` with type `OutputModeration | None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:239:46
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:242:46
 ERROR `(event: AppQueueEvent, publish_from: Unknown) -> None` is not assignable to attribute `publish` with type `(self: AppQueueManager, event: AppQueueEvent, pub_from: PublishFrom) -> None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:240:42
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:243:42
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:288:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:291:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:289:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:292:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:290:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:293:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:322:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:325:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:323:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:326:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:324:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:327:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:414:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:404:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:415:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:405:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:416:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:406:21
 ERROR `() -> Iterator[SimpleNamespace]` is not assignable to attribute `listen` with type `(self: AppQueueManager) -> Generator[MessageQueueMessage | WorkflowQueueMessage, Unknown]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:437:41
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:427:41
 ERROR `(event: QueueAnnotationReplyEvent) -> SimpleNamespace` is not assignable to attribute `handle_annotation_reply` with type `(self: MessageCycleManager, event: QueueAnnotationReplyEvent) -> MessageAnnotation | None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:438:67
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:428:67
 ERROR `(event: QueueAgentThoughtEvent) -> Literal['thought']` is not assignable to attribute `_agent_thought_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, event: QueueAgentThoughtEvent) -> AgentThoughtStreamResponse | None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:439:54
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:429:54
 ERROR `(event: QueueMessageFileEvent) -> Literal['file']` is not assignable to attribute `message_file_to_stream_response` with type `(self: MessageCycleManager, event: QueueMessageFileEvent) -> MessageFileStreamResponse | None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:440:75
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:430:75
 ERROR `(**kwargs: Unknown) -> Literal['agent']` is not assignable to attribute `_agent_message_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, answer: str, message_id: str) -> AgentMessageStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:441:54
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:431:54
 ERROR `(err: Unknown) -> Unknown` is not assignable to attribute `error_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, e: Exception) -> ErrorStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:443:45
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:433:45
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:481:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:451:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:482:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:452:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:483:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:453:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:530:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:482:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:531:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:483:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:532:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:484:21
 ERROR `(trace_manager: Unknown) -> Iterator[Any]` is not assignable to attribute `_wrapper_process_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, trace_manager: TraceQueueManager | None = None) -> Generator[StreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:536:53
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:488:53
 ERROR `(generator: Generator[StreamResponse]) -> Literal['streamed']` is not assignable to attribute `_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, generator: Generator[StreamResponse]) -> Generator[ChatbotAppStreamResponse | CompletionAppStreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:537:40
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:489:40
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:551:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:503:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:552:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:504:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:553:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:505:21
 ERROR `(trace_manager: Unknown) -> Iterator[Any]` is not assignable to attribute `_wrapper_process_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, trace_manager: TraceQueueManager | None = None) -> Generator[StreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:557:53
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:509:53
 ERROR `(generator: Generator[StreamResponse]) -> Literal['blocking']` is not assignable to attribute `_to_blocking_response` with type `(self: EasyUIBasedGenerateTaskPipeline, generator: Generator[StreamResponse]) -> ChatbotAppBlockingResponse | CompletionAppBlockingResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:558:42
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:510:42
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:570:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:522:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:571:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:523:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:572:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:524:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:587:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:539:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:588:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:540:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:589:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:541:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:604:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:556:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:605:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:557:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:606:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:558:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:623:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:575:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:624:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:576:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:625:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:577:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:642:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:594:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:643:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:595:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:644:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:596:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `publisher` with type `AppGeneratorTTSPublisher | None` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline._listen_audio_msg` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:649:57
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:601:57
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:659:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:611:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:660:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:612:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:661:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:613:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `publisher` with type `AppGeneratorTTSPublisher | None` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline._listen_audio_msg` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:666:53
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:618:53
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:673:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:625:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:674:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:626:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:675:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:627:21
 ERROR `(publisher: AppGeneratorTTSPublisher | None, trace_manager: Unknown) -> Iterator[Any]` is not assignable to attribute `_process_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, publisher: AppGeneratorTTSPublisher | None, trace_manager: TraceQueueManager | None = None) -> Generator[StreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:678:45
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:630:45
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:693:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:645:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:694:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:646:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:695:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:647:21
 ERROR `(publisher: AppGeneratorTTSPublisher | None, trace_manager: Unknown) -> Iterator[Any]` is not assignable to attribute `_process_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, publisher: AppGeneratorTTSPublisher | None, trace_manager: TraceQueueManager | None = None) -> Generator[StreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:706:45
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:658:45
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:727:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:679:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:728:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:680:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:729:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:681:21
 ERROR `(publisher: AppGeneratorTTSPublisher | None, trace_manager: Unknown) -> Iterator[Any]` is not assignable to attribute `_process_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, publisher: AppGeneratorTTSPublisher | None, trace_manager: TraceQueueManager | None = None) -> Generator[StreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:746:45
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:698:45
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:764:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:716:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:765:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:717:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:766:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:718:21
 ERROR `() -> Iterator[MessageQueueMessage | WorkflowQueueMessage] | Iterator[Any]` is not assignable to attribute `listen` with type `(self: AppQueueManager) -> Generator[MessageQueueMessage | WorkflowQueueMessage, Unknown]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:770:41
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:722:41
 ERROR `(answer: Unknown) -> Literal['moderated answer']` is not assignable to attribute `handle_output_moderation_when_task_finished` with type `(self: EasyUIBasedGenerateTaskPipeline, completion: str) -> str | None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:774:64
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:726:64
 ERROR `(answer: str) -> str` is not assignable to attribute `message_replace_to_stream_response` with type `(self: MessageCycleManager, answer: str, reason: str = '') -> MessageReplaceStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:775:78
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:727:78
 ERROR `() -> Literal['end']` is not assignable to attribute `_message_end_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline) -> MessageEndStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:777:52
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:729:52
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:808:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:743:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:809:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:744:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:810:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:745:21
 ERROR `() -> Iterator[MessageQueueMessage | WorkflowQueueMessage] | Iterator[Any]` is not assignable to attribute `listen` with type `(self: AppQueueManager) -> Generator[MessageQueueMessage | WorkflowQueueMessage, Unknown]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:825:41
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:760:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:843:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:778:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:844:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:779:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:845:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:780:21
 ERROR `() -> Iterator[MessageQueueMessage | WorkflowQueueMessage] | Iterator[Any]` is not assignable to attribute `listen` with type `(self: AppQueueManager) -> Generator[MessageQueueMessage | WorkflowQueueMessage, Unknown]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:854:41
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:789:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:865:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:800:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:866:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:801:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-\n\n... (truncated) ...

The sessionmaker refactor left three places out of sync:

1. api/core/tools/tool_manager.py uses Session(db.engine) on lines 243
   and 350 (read-only blocks intentionally not migrated to .begin())
   but the import line was reduced to only sessionmaker, breaking
   pyrefly type-check and test_get_tool_runtime_workflow_path.

2. test_generate_worker_handles_value_and_unknown_errors monkeypatches
   sessionmaker with _sessionmaker_factory but never defines it, leading
   to NameError. Adds the factory definition mirroring the pattern used
   in the sibling tests at line 696/779.

3. test_on_retrieval_end_updates_segments_for_text_and_image references
   session_ctx that was never declared in scope (a leftover from a
   previous version of the test). Renames it to begin_cm which is the
   actually-defined variable two lines above.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-04-11 01:42:35.106976064 +0000
+++ /tmp/pyrefly_pr.txt	2026-04-11 01:42:26.681942290 +0000
@@ -2498,83 +2498,83 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message | None` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate` [bad-argument-type]
    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:527:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `flask_app` with type `Flask` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:584:27
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:583:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `context` with type `Context` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:589:25
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:588:25
 ERROR Argument `SimpleNamespace` is not assignable to parameter `variable_loader` with type `VariableLoader` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:590:33
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:589:33
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_execution_repository` with type `WorkflowExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:591:47
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:590:47
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_node_execution_repository` with type `WorkflowNodeExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:592:52
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:591:52
 ERROR Argument `SimpleNamespace` is not assignable to parameter `flask_app` with type `Flask` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:648:27
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:646:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `context` with type `Context` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:653:25
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:651:25
 ERROR Argument `SimpleNamespace` is not assignable to parameter `variable_loader` with type `VariableLoader` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:654:33
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:652:33
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_execution_repository` with type `WorkflowExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:655:47
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:653:47
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_node_execution_repository` with type `WorkflowNodeExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:656:52
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:654:52
 ERROR Argument `SimpleNamespace` is not assignable to parameter `flask_app` with type `Flask` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:720:23
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:717:23
 ERROR Argument `SimpleNamespace` is not assignable to parameter `context` with type `Context` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:725:21
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:722:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `variable_loader` with type `VariableLoader` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:726:29
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:723:29
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_execution_repository` with type `WorkflowExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:727:43
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:724:43
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_node_execution_repository` with type `WorkflowNodeExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:728:48
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:725:48
 ERROR Argument `SimpleNamespace` is not assignable to parameter `flask_app` with type `Flask` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:804:23
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:800:23
 ERROR Argument `SimpleNamespace` is not assignable to parameter `context` with type `Context` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:809:21
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:805:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `variable_loader` with type `VariableLoader` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:810:29
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:806:29
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_execution_repository` with type `WorkflowExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:811:43
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:807:43
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_node_execution_repository` with type `WorkflowNodeExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:812:48
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:808:48
 ERROR Argument `SimpleNamespace` is not assignable to parameter `flask_app` with type `Flask` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:885:27
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:887:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `context` with type `Context` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:890:25
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:892:25
 ERROR Argument `SimpleNamespace` is not assignable to parameter `variable_loader` with type `VariableLoader` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:891:33
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:893:33
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_execution_repository` with type `WorkflowExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:892:47
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:894:47
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_node_execution_repository` with type `WorkflowNodeExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:893:52
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:895:52
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._handle_advanced_chat_response` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:942:31
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:944:31
 ERROR Argument `SimpleNamespace` is not assignable to parameter `user` with type `Account | EndUser` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._handle_advanced_chat_response` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:951:22
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:953:22
 ERROR Argument `(**kwargs: Unknown) -> None` is not assignable to parameter `draft_var_saver_factory` with type `DraftVariableSaverFactory` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._handle_advanced_chat_response` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:952:41
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:954:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._handle_advanced_chat_response` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:989:31
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:991:31
 ERROR Argument `SimpleNamespace` is not assignable to parameter `user` with type `Account | EndUser` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._handle_advanced_chat_response` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:998:22
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1000:22
 ERROR Argument `(**kwargs: Unknown) -> None` is not assignable to parameter `draft_var_saver_factory` with type `DraftVariableSaverFactory` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._handle_advanced_chat_response` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:999:41
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1001:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `flask_app` with type `Flask` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1076:23
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1077:23
 ERROR Argument `SimpleNamespace` is not assignable to parameter `context` with type `Context` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1081:21
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1082:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `variable_loader` with type `VariableLoader` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1082:29
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1083:29
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_execution_repository` with type `WorkflowExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1083:43
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1084:43
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_node_execution_repository` with type `WorkflowNodeExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1084:48
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1085:48
 ERROR No matching overload found for function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator.generate` called with arguments: (app_model=SimpleNamespace, workflow=SimpleNamespace, user=Account, args=dict[str, dict[@_, @_] | str], invoke_from=Literal[InvokeFrom.DEBUGGER], workflow_run_id=Literal['run-id'], streaming=Literal[False]) [no-matching-overload]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1156:36
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1157:36
 ERROR Object of class `NoneType` has no attribute `show_retrieve_source` [missing-attribute]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1167:16
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1168:16
 ERROR No matching overload found for function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator.generate` called with arguments: (app_model=SimpleNamespace, workflow=SimpleNamespace, user=EndUser, args=dict[str, dict[@_, @_] | str], invoke_from=Literal[InvokeFrom.SERVICE_API], workflow_run_id=Literal['run-id'], streaming=Literal[False]) [no-matching-overload]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1235:27
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1236:27
 ERROR Cannot index into `str` [bad-index]
   --> tests/unit_tests/core/app/apps/advanced_chat/test_generate_response_converter.py:95:16
 ERROR Cannot index into `str` [bad-index]
@@ -2810,7 +2810,7 @@
 ERROR Cannot index into `str` [bad-index]
    --> tests/unit_tests/core/app/apps/pipeline/test_pipeline_generate_response_converter.py:112:12
 ERROR Class `PipelineRunner` has no class attribute `call_args` [missing-attribute]
-   --> tests/unit_tests/core/app/apps/pipeline/test_pipeline_generator.py:341:12
+   --> tests/unit_tests/core/app/apps/pipeline/test_pipeline_generator.py:338:12
 ERROR Argument `SimpleNamespace` is not assignable to parameter `application_generate_entity` with type `RagPipelineGenerateEntity` in function `core.app.apps.pipeline.pipeline_runner.PipelineRunner.__init__` [bad-argument-type]
   --> tests/unit_tests/core/app/apps/pipeline/test_pipeline_runner.py:65:37
 ERROR Argument `SimpleNamespace` is not assignable to parameter `application_generate_entity` with type `RagPipelineGenerateEntity` in function `core.app.apps.pipeline.pipeline_runner.PipelineRunner.__init__` [bad-argument-type]
@@ -3042,7 +3042,7 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `application_generate_entity` with type `AdvancedChatAppGenerateEntity | WorkflowAppGenerateEntity` in function `core.app.apps.common.workflow_response_converter.WorkflowResponseConverter.__init__` [bad-argument-type]
    --> tests/unit_tests/core/app/apps/test_workflow_pause_events.py:112:37
 ERROR Argument `SimpleNamespace` is not assignable to parameter `graph_runtime_state` with type `GraphRuntimeState` in function `core.app.apps.common.workflow_response_converter.WorkflowResponseConverter.workflow_pause_to_stream_response` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_workflow_pause_events.py:176:29
+   --> tests/unit_tests/core/app/apps/test_workflow_pause_events.py:178:29
 ERROR Argument `SimpleNamespace` is not assignable to parameter `app_model` with type `App` in function `core.app.apps.workflow.app_config_manager.WorkflowAppConfigManager.get_app_config` [bad-argument-type]
   --> tests/unit_tests/core/app/apps/workflow/test_app_config_manager.py:23:66
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `core.app.apps.workflow.app_config_manager.WorkflowAppConfigManager.get_app_config` [bad-argument-type]
@@ -3268,283 +3268,283 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `application_generate_entity` with type `AppGenerateEntity` in function `core.app.task_pipeline.based_generate_task_pipeline.BasedGenerateTaskPipeline.__init__` [bad-argument-type]
   --> tests/unit_tests/core/app/task_pipeline/test_based_generate_task_pipeline.py:23:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-  --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:98:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:121:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-  --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:99:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:122:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:100:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:123:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:118:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:141:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:119:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:142:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:120:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:143:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:138:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:161:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:139:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:162:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:140:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:163:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:152:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:175:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:153:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:176:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:154:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:177:21
 ERROR `() -> Iterator[SimpleNamespace]` is not assignable to attribute `listen` with type `(self: AppQueueManager) -> Generator[MessageQueueMessage | WorkflowQueueMessage, Unknown]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:182:41
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:205:41
 ERROR `(message_id: str) -> None` is not assignable to attribute `get_message_event_type` with type `(self: MessageCycleManager, message_id: str) -> StreamEvent` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:183:66
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:206:66
 ERROR `(**kwargs: Unknown) -> Literal['chunk']` is not assignable to attribute `message_to_stream_response` with type `(self: MessageCycleManager, answer: str, message_id: str, from_variable_selector: list[str] | None = None, event_type: StreamEvent | None = None) -> MessageStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:184:70
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:207:70
 ERROR `(**kwargs: Unknown) -> Literal['replace']` is not assignable to attribute `message_replace_to_stream_response` with type `(self: MessageCycleManager, answer: str, reason: str = '') -> MessageReplaceStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:185:78
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:208:78
 ERROR `() -> Literal['end']` is not assignable to attribute `_message_end_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline) -> MessageEndStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:187:52
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:210:52
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:225:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:228:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:226:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:229:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:227:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:230:21
 ERROR `TestEasyUiBasedGenerateTaskPipeline.test_handle_output_moderation_chunk_directs_output._Moderation` is not assignable to attribute `output_moderation_handler` with type `OutputModeration | None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:239:46
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:242:46
 ERROR `(event: AppQueueEvent, publish_from: Unknown) -> None` is not assignable to attribute `publish` with type `(self: AppQueueManager, event: AppQueueEvent, pub_from: PublishFrom) -> None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:240:42
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:243:42
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:288:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:291:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:289:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:292:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:290:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:293:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:322:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:325:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:323:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:326:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:324:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:327:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:414:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:404:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:415:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:405:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:416:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:406:21
 ERROR `() -> Iterator[SimpleNamespace]` is not assignable to attribute `listen` with type `(self: AppQueueManager) -> Generator[MessageQueueMessage | WorkflowQueueMessage, Unknown]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:437:41
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:427:41
 ERROR `(event: QueueAnnotationReplyEvent) -> SimpleNamespace` is not assignable to attribute `handle_annotation_reply` with type `(self: MessageCycleManager, event: QueueAnnotationReplyEvent) -> MessageAnnotation | None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:438:67
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:428:67
 ERROR `(event: QueueAgentThoughtEvent) -> Literal['thought']` is not assignable to attribute `_agent_thought_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, event: QueueAgentThoughtEvent) -> AgentThoughtStreamResponse | None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:439:54
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:429:54
 ERROR `(event: QueueMessageFileEvent) -> Literal['file']` is not assignable to attribute `message_file_to_stream_response` with type `(self: MessageCycleManager, event: QueueMessageFileEvent) -> MessageFileStreamResponse | None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:440:75
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:430:75
 ERROR `(**kwargs: Unknown) -> Literal['agent']` is not assignable to attribute `_agent_message_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, answer: str, message_id: str) -> AgentMessageStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:441:54
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:431:54
 ERROR `(err: Unknown) -> Unknown` is not assignable to attribute `error_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, e: Exception) -> ErrorStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:443:45
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:433:45
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:481:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:451:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:482:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:452:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:483:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:453:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:530:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:482:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:531:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:483:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:532:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:484:21
 ERROR `(trace_manager: Unknown) -> Iterator[Any]` is not assignable to attribute `_wrapper_process_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, trace_manager: TraceQueueManager | None = None) -> Generator[StreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:536:53
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:488:53
 ERROR `(generator: Generator[StreamResponse]) -> Literal['streamed']` is not assignable to attribute `_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, generator: Generator[StreamResponse]) -> Generator[ChatbotAppStreamResponse | CompletionAppStreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:537:40
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:489:40
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:551:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:503:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:552:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:504:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:553:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:505:21
 ERROR `(trace_manager: Unknown) -> Iterator[Any]` is not assignable to attribute `_wrapper_process_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, trace_manager: TraceQueueManager | None = None) -> Generator[StreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:557:53
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:509:53
 ERROR `(generator: Generator[StreamResponse]) -> Literal['blocking']` is not assignable to attribute `_to_blocking_response` with type `(self: EasyUIBasedGenerateTaskPipeline, generator: Generator[StreamResponse]) -> ChatbotAppBlockingResponse | CompletionAppBlockingResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:558:42
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:510:42
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:570:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:522:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:571:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:523:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:572:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:524:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:587:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:539:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:588:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:540:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:589:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:541:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:604:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:556:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:605:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:557:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:606:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:558:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:623:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:575:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:624:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:576:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:625:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:577:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:642:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:594:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:643:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:595:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:644:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:596:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `publisher` with type `AppGeneratorTTSPublisher | None` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline._listen_audio_msg` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:649:57
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:601:57
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:659:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:611:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:660:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:612:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:661:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:613:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `publisher` with type `AppGeneratorTTSPublisher | None` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline._listen_audio_msg` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:666:53
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:618:53
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:673:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:625:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:674:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:626:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:675:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:627:21
 ERROR `(publisher: AppGeneratorTTSPublisher | None, trace_manager: Unknown) -> Iterator[Any]` is not assignable to attribute `_process_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, publisher: AppGeneratorTTSPublisher | None, trace_manager: TraceQueueManager | None = None) -> Generator[StreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:678:45
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:630:45
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:693:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:645:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:694:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:646:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:695:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:647:21
 ERROR `(publisher: AppGeneratorTTSPublisher | None, trace_manager: Unknown) -> Iterator[Any]` is not assignable to attribute `_process_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, publisher: AppGeneratorTTSPublisher | None, trace_manager: TraceQueueManager | None = None) -> Generator[StreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:706:45
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:658:45
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:727:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:679:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:728:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:680:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:729:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:681:21
 ERROR `(publisher: AppGeneratorTTSPublisher | None, trace_manager: Unknown) -> Iterator[Any]` is not assignable to attribute `_process_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, publisher: AppGeneratorTTSPublisher | None, trace_manager: TraceQueueManager | None = None) -> Generator[StreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:746:45
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:698:45
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:764:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:716:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:765:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:717:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:766:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:718:21
 ERROR `() -> Iterator[MessageQueueMessage | WorkflowQueueMessage] | Iterator[Any]` is not assignable to attribute `listen` with type `(self: AppQueueManager) -> Generator[MessageQueueMessage | WorkflowQueueMessage, Unknown]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:770:41
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:722:41
 ERROR `(answer: Unknown) -> Literal['moderated answer']` is not assignable to attribute `handle_output_moderation_when_task_finished` with type `(self: EasyUIBasedGenerateTaskPipeline, completion: str) -> str | None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:774:64
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:726:64
 ERROR `(answer: str) -> str` is not assignable to attribute `message_replace_to_stream_response` with type `(self: MessageCycleManager, answer: str, reason: str = '') -> MessageReplaceStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:775:78
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:727:78
 ERROR `() -> Literal['end']` is not assignable to attribute `_message_end_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline) -> MessageEndStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:777:52
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:729:52
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:808:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:743:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:809:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:744:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:810:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:745:21
 ERROR `() -> Iterator[MessageQueueMessage | WorkflowQueueMessage] | Iterator[Any]` is not assignable to attribute `listen` with type `(self: AppQueueManager) -> Generator[MessageQueueMessage | WorkflowQueueMessage, Unknown]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:825:41
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:760:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:843:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:778:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:844:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:779:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:845:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:780:21
 ERROR `() -> Iterator[MessageQueueMessage | WorkflowQueueMessage] | Iterator[Any]` is not assignable to attribute `listen` with type `(self: AppQueueManager) -> Generator[MessageQueueMessage | WorkflowQueueMessage, Unknown]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:854:41
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:789:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:865:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:800:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:866:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:801:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:867:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:802:21
 ERROR `(message_id: str) -> None` is not assignable to attribute `get_message_event_type` with type `(self: MessageCycleManager, message_id: str) -> StreamEvent` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:874:66
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:809:66
 ERROR `(**kwargs: Unknown) -> Unknown` is not assignable to attribute `message_to_stream_response` with type `(self: MessageCycleManager, answer: str, message_id: str, from_variable_selector: list[str] | None = None, event_type: StreamEvent | None = None) -> MessageStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:875:70
+   --> tests/unit_test\n\n... (truncated) ...

ruff N805 (first method arg must be self) was tripping autofix on
test_ops_trace_manager.py. The test author used descriptive names to
disambiguate nested contexts, but the bodies never reference those
names so a plain self rename is purely cosmetic.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-04-11 01:49:45.433862704 +0000
+++ /tmp/pyrefly_pr.txt	2026-04-11 01:49:36.862707698 +0000
@@ -2498,83 +2498,83 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message | None` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate` [bad-argument-type]
    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:527:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `flask_app` with type `Flask` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:584:27
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:583:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `context` with type `Context` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:589:25
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:588:25
 ERROR Argument `SimpleNamespace` is not assignable to parameter `variable_loader` with type `VariableLoader` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:590:33
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:589:33
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_execution_repository` with type `WorkflowExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:591:47
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:590:47
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_node_execution_repository` with type `WorkflowNodeExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:592:52
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:591:52
 ERROR Argument `SimpleNamespace` is not assignable to parameter `flask_app` with type `Flask` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:648:27
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:646:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `context` with type `Context` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:653:25
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:651:25
 ERROR Argument `SimpleNamespace` is not assignable to parameter `variable_loader` with type `VariableLoader` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:654:33
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:652:33
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_execution_repository` with type `WorkflowExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:655:47
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:653:47
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_node_execution_repository` with type `WorkflowNodeExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:656:52
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:654:52
 ERROR Argument `SimpleNamespace` is not assignable to parameter `flask_app` with type `Flask` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:720:23
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:717:23
 ERROR Argument `SimpleNamespace` is not assignable to parameter `context` with type `Context` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:725:21
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:722:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `variable_loader` with type `VariableLoader` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:726:29
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:723:29
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_execution_repository` with type `WorkflowExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:727:43
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:724:43
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_node_execution_repository` with type `WorkflowNodeExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:728:48
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:725:48
 ERROR Argument `SimpleNamespace` is not assignable to parameter `flask_app` with type `Flask` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:804:23
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:800:23
 ERROR Argument `SimpleNamespace` is not assignable to parameter `context` with type `Context` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:809:21
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:805:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `variable_loader` with type `VariableLoader` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:810:29
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:806:29
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_execution_repository` with type `WorkflowExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:811:43
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:807:43
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_node_execution_repository` with type `WorkflowNodeExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:812:48
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:808:48
 ERROR Argument `SimpleNamespace` is not assignable to parameter `flask_app` with type `Flask` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:885:27
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:887:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `context` with type `Context` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:890:25
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:892:25
 ERROR Argument `SimpleNamespace` is not assignable to parameter `variable_loader` with type `VariableLoader` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:891:33
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:893:33
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_execution_repository` with type `WorkflowExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:892:47
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:894:47
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_node_execution_repository` with type `WorkflowNodeExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:893:52
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:895:52
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._handle_advanced_chat_response` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:942:31
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:944:31
 ERROR Argument `SimpleNamespace` is not assignable to parameter `user` with type `Account | EndUser` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._handle_advanced_chat_response` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:951:22
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:953:22
 ERROR Argument `(**kwargs: Unknown) -> None` is not assignable to parameter `draft_var_saver_factory` with type `DraftVariableSaverFactory` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._handle_advanced_chat_response` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:952:41
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:954:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._handle_advanced_chat_response` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:989:31
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:991:31
 ERROR Argument `SimpleNamespace` is not assignable to parameter `user` with type `Account | EndUser` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._handle_advanced_chat_response` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:998:22
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1000:22
 ERROR Argument `(**kwargs: Unknown) -> None` is not assignable to parameter `draft_var_saver_factory` with type `DraftVariableSaverFactory` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._handle_advanced_chat_response` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:999:41
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1001:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `flask_app` with type `Flask` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1076:23
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1077:23
 ERROR Argument `SimpleNamespace` is not assignable to parameter `context` with type `Context` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1081:21
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1082:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `variable_loader` with type `VariableLoader` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1082:29
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1083:29
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_execution_repository` with type `WorkflowExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1083:43
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1084:43
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_node_execution_repository` with type `WorkflowNodeExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1084:48
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1085:48
 ERROR No matching overload found for function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator.generate` called with arguments: (app_model=SimpleNamespace, workflow=SimpleNamespace, user=Account, args=dict[str, dict[@_, @_] | str], invoke_from=Literal[InvokeFrom.DEBUGGER], workflow_run_id=Literal['run-id'], streaming=Literal[False]) [no-matching-overload]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1156:36
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1157:36
 ERROR Object of class `NoneType` has no attribute `show_retrieve_source` [missing-attribute]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1167:16
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1168:16
 ERROR No matching overload found for function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator.generate` called with arguments: (app_model=SimpleNamespace, workflow=SimpleNamespace, user=EndUser, args=dict[str, dict[@_, @_] | str], invoke_from=Literal[InvokeFrom.SERVICE_API], workflow_run_id=Literal['run-id'], streaming=Literal[False]) [no-matching-overload]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1235:27
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1236:27
 ERROR Cannot index into `str` [bad-index]
   --> tests/unit_tests/core/app/apps/advanced_chat/test_generate_response_converter.py:95:16
 ERROR Cannot index into `str` [bad-index]
@@ -2810,7 +2810,7 @@
 ERROR Cannot index into `str` [bad-index]
    --> tests/unit_tests/core/app/apps/pipeline/test_pipeline_generate_response_converter.py:112:12
 ERROR Class `PipelineRunner` has no class attribute `call_args` [missing-attribute]
-   --> tests/unit_tests/core/app/apps/pipeline/test_pipeline_generator.py:341:12
+   --> tests/unit_tests/core/app/apps/pipeline/test_pipeline_generator.py:338:12
 ERROR Argument `SimpleNamespace` is not assignable to parameter `application_generate_entity` with type `RagPipelineGenerateEntity` in function `core.app.apps.pipeline.pipeline_runner.PipelineRunner.__init__` [bad-argument-type]
   --> tests/unit_tests/core/app/apps/pipeline/test_pipeline_runner.py:65:37
 ERROR Argument `SimpleNamespace` is not assignable to parameter `application_generate_entity` with type `RagPipelineGenerateEntity` in function `core.app.apps.pipeline.pipeline_runner.PipelineRunner.__init__` [bad-argument-type]
@@ -3042,7 +3042,7 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `application_generate_entity` with type `AdvancedChatAppGenerateEntity | WorkflowAppGenerateEntity` in function `core.app.apps.common.workflow_response_converter.WorkflowResponseConverter.__init__` [bad-argument-type]
    --> tests/unit_tests/core/app/apps/test_workflow_pause_events.py:112:37
 ERROR Argument `SimpleNamespace` is not assignable to parameter `graph_runtime_state` with type `GraphRuntimeState` in function `core.app.apps.common.workflow_response_converter.WorkflowResponseConverter.workflow_pause_to_stream_response` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_workflow_pause_events.py:176:29
+   --> tests/unit_tests/core/app/apps/test_workflow_pause_events.py:178:29
 ERROR Argument `SimpleNamespace` is not assignable to parameter `app_model` with type `App` in function `core.app.apps.workflow.app_config_manager.WorkflowAppConfigManager.get_app_config` [bad-argument-type]
   --> tests/unit_tests/core/app/apps/workflow/test_app_config_manager.py:23:66
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `core.app.apps.workflow.app_config_manager.WorkflowAppConfigManager.get_app_config` [bad-argument-type]
@@ -3268,283 +3268,283 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `application_generate_entity` with type `AppGenerateEntity` in function `core.app.task_pipeline.based_generate_task_pipeline.BasedGenerateTaskPipeline.__init__` [bad-argument-type]
   --> tests/unit_tests/core/app/task_pipeline/test_based_generate_task_pipeline.py:23:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-  --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:98:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:121:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-  --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:99:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:122:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:100:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:123:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:118:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:141:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:119:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:142:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:120:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:143:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:138:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:161:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:139:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:162:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:140:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:163:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:152:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:175:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:153:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:176:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:154:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:177:21
 ERROR `() -> Iterator[SimpleNamespace]` is not assignable to attribute `listen` with type `(self: AppQueueManager) -> Generator[MessageQueueMessage | WorkflowQueueMessage, Unknown]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:182:41
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:205:41
 ERROR `(message_id: str) -> None` is not assignable to attribute `get_message_event_type` with type `(self: MessageCycleManager, message_id: str) -> StreamEvent` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:183:66
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:206:66
 ERROR `(**kwargs: Unknown) -> Literal['chunk']` is not assignable to attribute `message_to_stream_response` with type `(self: MessageCycleManager, answer: str, message_id: str, from_variable_selector: list[str] | None = None, event_type: StreamEvent | None = None) -> MessageStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:184:70
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:207:70
 ERROR `(**kwargs: Unknown) -> Literal['replace']` is not assignable to attribute `message_replace_to_stream_response` with type `(self: MessageCycleManager, answer: str, reason: str = '') -> MessageReplaceStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:185:78
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:208:78
 ERROR `() -> Literal['end']` is not assignable to attribute `_message_end_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline) -> MessageEndStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:187:52
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:210:52
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:225:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:228:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:226:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:229:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:227:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:230:21
 ERROR `TestEasyUiBasedGenerateTaskPipeline.test_handle_output_moderation_chunk_directs_output._Moderation` is not assignable to attribute `output_moderation_handler` with type `OutputModeration | None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:239:46
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:242:46
 ERROR `(event: AppQueueEvent, publish_from: Unknown) -> None` is not assignable to attribute `publish` with type `(self: AppQueueManager, event: AppQueueEvent, pub_from: PublishFrom) -> None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:240:42
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:243:42
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:288:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:291:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:289:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:292:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:290:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:293:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:322:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:325:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:323:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:326:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:324:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:327:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:414:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:404:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:415:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:405:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:416:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:406:21
 ERROR `() -> Iterator[SimpleNamespace]` is not assignable to attribute `listen` with type `(self: AppQueueManager) -> Generator[MessageQueueMessage | WorkflowQueueMessage, Unknown]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:437:41
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:427:41
 ERROR `(event: QueueAnnotationReplyEvent) -> SimpleNamespace` is not assignable to attribute `handle_annotation_reply` with type `(self: MessageCycleManager, event: QueueAnnotationReplyEvent) -> MessageAnnotation | None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:438:67
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:428:67
 ERROR `(event: QueueAgentThoughtEvent) -> Literal['thought']` is not assignable to attribute `_agent_thought_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, event: QueueAgentThoughtEvent) -> AgentThoughtStreamResponse | None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:439:54
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:429:54
 ERROR `(event: QueueMessageFileEvent) -> Literal['file']` is not assignable to attribute `message_file_to_stream_response` with type `(self: MessageCycleManager, event: QueueMessageFileEvent) -> MessageFileStreamResponse | None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:440:75
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:430:75
 ERROR `(**kwargs: Unknown) -> Literal['agent']` is not assignable to attribute `_agent_message_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, answer: str, message_id: str) -> AgentMessageStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:441:54
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:431:54
 ERROR `(err: Unknown) -> Unknown` is not assignable to attribute `error_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, e: Exception) -> ErrorStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:443:45
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:433:45
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:481:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:451:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:482:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:452:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:483:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:453:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:530:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:482:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:531:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:483:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:532:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:484:21
 ERROR `(trace_manager: Unknown) -> Iterator[Any]` is not assignable to attribute `_wrapper_process_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, trace_manager: TraceQueueManager | None = None) -> Generator[StreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:536:53
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:488:53
 ERROR `(generator: Generator[StreamResponse]) -> Literal['streamed']` is not assignable to attribute `_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, generator: Generator[StreamResponse]) -> Generator[ChatbotAppStreamResponse | CompletionAppStreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:537:40
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:489:40
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:551:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:503:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:552:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:504:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:553:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:505:21
 ERROR `(trace_manager: Unknown) -> Iterator[Any]` is not assignable to attribute `_wrapper_process_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, trace_manager: TraceQueueManager | None = None) -> Generator[StreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:557:53
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:509:53
 ERROR `(generator: Generator[StreamResponse]) -> Literal['blocking']` is not assignable to attribute `_to_blocking_response` with type `(self: EasyUIBasedGenerateTaskPipeline, generator: Generator[StreamResponse]) -> ChatbotAppBlockingResponse | CompletionAppBlockingResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:558:42
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:510:42
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:570:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:522:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:571:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:523:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:572:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:524:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:587:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:539:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:588:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:540:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:589:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:541:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:604:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:556:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:605:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:557:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:606:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:558:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:623:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:575:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:624:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:576:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:625:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:577:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:642:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:594:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:643:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:595:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:644:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:596:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `publisher` with type `AppGeneratorTTSPublisher | None` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline._listen_audio_msg` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:649:57
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:601:57
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:659:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:611:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:660:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:612:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:661:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:613:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `publisher` with type `AppGeneratorTTSPublisher | None` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline._listen_audio_msg` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:666:53
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:618:53
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:673:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:625:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:674:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:626:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:675:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:627:21
 ERROR `(publisher: AppGeneratorTTSPublisher | None, trace_manager: Unknown) -> Iterator[Any]` is not assignable to attribute `_process_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, publisher: AppGeneratorTTSPublisher | None, trace_manager: TraceQueueManager | None = None) -> Generator[StreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:678:45
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:630:45
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:693:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:645:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:694:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:646:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:695:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:647:21
 ERROR `(publisher: AppGeneratorTTSPublisher | None, trace_manager: Unknown) -> Iterator[Any]` is not assignable to attribute `_process_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, publisher: AppGeneratorTTSPublisher | None, trace_manager: TraceQueueManager | None = None) -> Generator[StreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:706:45
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:658:45
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:727:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:679:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:728:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:680:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:729:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:681:21
 ERROR `(publisher: AppGeneratorTTSPublisher | None, trace_manager: Unknown) -> Iterator[Any]` is not assignable to attribute `_process_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, publisher: AppGeneratorTTSPublisher | None, trace_manager: TraceQueueManager | None = None) -> Generator[StreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:746:45
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:698:45
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:764:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:716:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:765:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:717:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:766:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:718:21
 ERROR `() -> Iterator[MessageQueueMessage | WorkflowQueueMessage] | Iterator[Any]` is not assignable to attribute `listen` with type `(self: AppQueueManager) -> Generator[MessageQueueMessage | WorkflowQueueMessage, Unknown]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:770:41
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:722:41
 ERROR `(answer: Unknown) -> Literal['moderated answer']` is not assignable to attribute `handle_output_moderation_when_task_finished` with type `(self: EasyUIBasedGenerateTaskPipeline, completion: str) -> str | None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:774:64
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:726:64
 ERROR `(answer: str) -> str` is not assignable to attribute `message_replace_to_stream_response` with type `(self: MessageCycleManager, answer: str, reason: str = '') -> MessageReplaceStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:775:78
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:727:78
 ERROR `() -> Literal['end']` is not assignable to attribute `_message_end_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline) -> MessageEndStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:777:52
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:729:52
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:808:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:743:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:809:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:744:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:810:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:745:21
 ERROR `() -> Iterator[MessageQueueMessage | WorkflowQueueMessage] | Iterator[Any]` is not assignable to attribute `listen` with type `(self: AppQueueManager) -> Generator[MessageQueueMessage | WorkflowQueueMessage, Unknown]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:825:41
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:760:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:843:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:778:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:844:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:779:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:845:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:780:21
 ERROR `() -> Iterator[MessageQueueMessage | WorkflowQueueMessage] | Iterator[Any]` is not assignable to attribute `listen` with type `(self: AppQueueManager) -> Generator[MessageQueueMessage | WorkflowQueueMessage, Unknown]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:854:41
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:789:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:865:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:800:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:866:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:801:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:867:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:802:21
 ERROR `(message_id: str) -> None` is not assignable to attribute `get_message_event_type` with type `(self: MessageCycleManager, message_id: str) -> StreamEvent` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:874:66
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:809:66
 ERROR `(**kwargs: Unknown) -> Unknown` is not assignable to attribute `message_to_stream_response` with type `(self: MessageCycleManager, answer: str, message_id: str, from_variable_selector: list[str] | None = None, event_type: StreamEvent | None = None) -> MessageStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:875:70
+   --> tests/unit_test\n\n... (truncated) ...

@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-04-11 01:51:57.516984207 +0000
+++ /tmp/pyrefly_pr.txt	2026-04-11 01:51:50.642780394 +0000
@@ -2498,83 +2498,83 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message | None` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate` [bad-argument-type]
    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:527:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `flask_app` with type `Flask` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:584:27
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:583:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `context` with type `Context` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:589:25
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:588:25
 ERROR Argument `SimpleNamespace` is not assignable to parameter `variable_loader` with type `VariableLoader` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:590:33
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:589:33
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_execution_repository` with type `WorkflowExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:591:47
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:590:47
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_node_execution_repository` with type `WorkflowNodeExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:592:52
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:591:52
 ERROR Argument `SimpleNamespace` is not assignable to parameter `flask_app` with type `Flask` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:648:27
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:646:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `context` with type `Context` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:653:25
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:651:25
 ERROR Argument `SimpleNamespace` is not assignable to parameter `variable_loader` with type `VariableLoader` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:654:33
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:652:33
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_execution_repository` with type `WorkflowExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:655:47
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:653:47
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_node_execution_repository` with type `WorkflowNodeExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:656:52
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:654:52
 ERROR Argument `SimpleNamespace` is not assignable to parameter `flask_app` with type `Flask` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:720:23
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:717:23
 ERROR Argument `SimpleNamespace` is not assignable to parameter `context` with type `Context` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:725:21
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:722:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `variable_loader` with type `VariableLoader` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:726:29
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:723:29
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_execution_repository` with type `WorkflowExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:727:43
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:724:43
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_node_execution_repository` with type `WorkflowNodeExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:728:48
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:725:48
 ERROR Argument `SimpleNamespace` is not assignable to parameter `flask_app` with type `Flask` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:804:23
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:800:23
 ERROR Argument `SimpleNamespace` is not assignable to parameter `context` with type `Context` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:809:21
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:805:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `variable_loader` with type `VariableLoader` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:810:29
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:806:29
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_execution_repository` with type `WorkflowExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:811:43
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:807:43
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_node_execution_repository` with type `WorkflowNodeExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:812:48
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:808:48
 ERROR Argument `SimpleNamespace` is not assignable to parameter `flask_app` with type `Flask` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:885:27
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:887:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `context` with type `Context` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:890:25
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:892:25
 ERROR Argument `SimpleNamespace` is not assignable to parameter `variable_loader` with type `VariableLoader` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:891:33
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:893:33
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_execution_repository` with type `WorkflowExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:892:47
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:894:47
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_node_execution_repository` with type `WorkflowNodeExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:893:52
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:895:52
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._handle_advanced_chat_response` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:942:31
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:944:31
 ERROR Argument `SimpleNamespace` is not assignable to parameter `user` with type `Account | EndUser` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._handle_advanced_chat_response` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:951:22
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:953:22
 ERROR Argument `(**kwargs: Unknown) -> None` is not assignable to parameter `draft_var_saver_factory` with type `DraftVariableSaverFactory` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._handle_advanced_chat_response` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:952:41
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:954:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._handle_advanced_chat_response` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:989:31
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:991:31
 ERROR Argument `SimpleNamespace` is not assignable to parameter `user` with type `Account | EndUser` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._handle_advanced_chat_response` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:998:22
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1000:22
 ERROR Argument `(**kwargs: Unknown) -> None` is not assignable to parameter `draft_var_saver_factory` with type `DraftVariableSaverFactory` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._handle_advanced_chat_response` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:999:41
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1001:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `flask_app` with type `Flask` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1076:23
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1077:23
 ERROR Argument `SimpleNamespace` is not assignable to parameter `context` with type `Context` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1081:21
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1082:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `variable_loader` with type `VariableLoader` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1082:29
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1083:29
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_execution_repository` with type `WorkflowExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1083:43
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1084:43
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_node_execution_repository` with type `WorkflowNodeExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1084:48
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1085:48
 ERROR No matching overload found for function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator.generate` called with arguments: (app_model=SimpleNamespace, workflow=SimpleNamespace, user=Account, args=dict[str, dict[@_, @_] | str], invoke_from=Literal[InvokeFrom.DEBUGGER], workflow_run_id=Literal['run-id'], streaming=Literal[False]) [no-matching-overload]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1156:36
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1157:36
 ERROR Object of class `NoneType` has no attribute `show_retrieve_source` [missing-attribute]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1167:16
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1168:16
 ERROR No matching overload found for function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator.generate` called with arguments: (app_model=SimpleNamespace, workflow=SimpleNamespace, user=EndUser, args=dict[str, dict[@_, @_] | str], invoke_from=Literal[InvokeFrom.SERVICE_API], workflow_run_id=Literal['run-id'], streaming=Literal[False]) [no-matching-overload]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1235:27
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1236:27
 ERROR Cannot index into `str` [bad-index]
   --> tests/unit_tests/core/app/apps/advanced_chat/test_generate_response_converter.py:95:16
 ERROR Cannot index into `str` [bad-index]
@@ -2810,7 +2810,7 @@
 ERROR Cannot index into `str` [bad-index]
    --> tests/unit_tests/core/app/apps/pipeline/test_pipeline_generate_response_converter.py:112:12
 ERROR Class `PipelineRunner` has no class attribute `call_args` [missing-attribute]
-   --> tests/unit_tests/core/app/apps/pipeline/test_pipeline_generator.py:341:12
+   --> tests/unit_tests/core/app/apps/pipeline/test_pipeline_generator.py:338:12
 ERROR Argument `SimpleNamespace` is not assignable to parameter `application_generate_entity` with type `RagPipelineGenerateEntity` in function `core.app.apps.pipeline.pipeline_runner.PipelineRunner.__init__` [bad-argument-type]
   --> tests/unit_tests/core/app/apps/pipeline/test_pipeline_runner.py:65:37
 ERROR Argument `SimpleNamespace` is not assignable to parameter `application_generate_entity` with type `RagPipelineGenerateEntity` in function `core.app.apps.pipeline.pipeline_runner.PipelineRunner.__init__` [bad-argument-type]
@@ -3042,7 +3042,7 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `application_generate_entity` with type `AdvancedChatAppGenerateEntity | WorkflowAppGenerateEntity` in function `core.app.apps.common.workflow_response_converter.WorkflowResponseConverter.__init__` [bad-argument-type]
    --> tests/unit_tests/core/app/apps/test_workflow_pause_events.py:112:37
 ERROR Argument `SimpleNamespace` is not assignable to parameter `graph_runtime_state` with type `GraphRuntimeState` in function `core.app.apps.common.workflow_response_converter.WorkflowResponseConverter.workflow_pause_to_stream_response` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_workflow_pause_events.py:176:29
+   --> tests/unit_tests/core/app/apps/test_workflow_pause_events.py:178:29
 ERROR Argument `SimpleNamespace` is not assignable to parameter `app_model` with type `App` in function `core.app.apps.workflow.app_config_manager.WorkflowAppConfigManager.get_app_config` [bad-argument-type]
   --> tests/unit_tests/core/app/apps/workflow/test_app_config_manager.py:23:66
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `core.app.apps.workflow.app_config_manager.WorkflowAppConfigManager.get_app_config` [bad-argument-type]
@@ -3268,283 +3268,283 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `application_generate_entity` with type `AppGenerateEntity` in function `core.app.task_pipeline.based_generate_task_pipeline.BasedGenerateTaskPipeline.__init__` [bad-argument-type]
   --> tests/unit_tests/core/app/task_pipeline/test_based_generate_task_pipeline.py:23:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-  --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:98:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:122:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-  --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:99:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:123:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:100:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:124:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:118:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:142:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:119:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:143:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:120:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:144:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:138:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:162:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:139:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:163:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:140:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:164:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:152:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:176:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:153:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:177:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:154:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:178:21
 ERROR `() -> Iterator[SimpleNamespace]` is not assignable to attribute `listen` with type `(self: AppQueueManager) -> Generator[MessageQueueMessage | WorkflowQueueMessage, Unknown]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:182:41
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:206:41
 ERROR `(message_id: str) -> None` is not assignable to attribute `get_message_event_type` with type `(self: MessageCycleManager, message_id: str) -> StreamEvent` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:183:66
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:207:66
 ERROR `(**kwargs: Unknown) -> Literal['chunk']` is not assignable to attribute `message_to_stream_response` with type `(self: MessageCycleManager, answer: str, message_id: str, from_variable_selector: list[str] | None = None, event_type: StreamEvent | None = None) -> MessageStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:184:70
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:208:70
 ERROR `(**kwargs: Unknown) -> Literal['replace']` is not assignable to attribute `message_replace_to_stream_response` with type `(self: MessageCycleManager, answer: str, reason: str = '') -> MessageReplaceStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:185:78
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:209:78
 ERROR `() -> Literal['end']` is not assignable to attribute `_message_end_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline) -> MessageEndStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:187:52
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:211:52
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:225:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:229:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:226:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:230:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:227:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:231:21
 ERROR `TestEasyUiBasedGenerateTaskPipeline.test_handle_output_moderation_chunk_directs_output._Moderation` is not assignable to attribute `output_moderation_handler` with type `OutputModeration | None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:239:46
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:243:46
 ERROR `(event: AppQueueEvent, publish_from: Unknown) -> None` is not assignable to attribute `publish` with type `(self: AppQueueManager, event: AppQueueEvent, pub_from: PublishFrom) -> None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:240:42
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:244:42
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:288:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:292:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:289:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:293:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:290:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:294:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:322:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:326:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:323:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:327:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:324:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:328:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:414:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:405:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:415:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:406:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:416:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:407:21
 ERROR `() -> Iterator[SimpleNamespace]` is not assignable to attribute `listen` with type `(self: AppQueueManager) -> Generator[MessageQueueMessage | WorkflowQueueMessage, Unknown]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:437:41
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:428:41
 ERROR `(event: QueueAnnotationReplyEvent) -> SimpleNamespace` is not assignable to attribute `handle_annotation_reply` with type `(self: MessageCycleManager, event: QueueAnnotationReplyEvent) -> MessageAnnotation | None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:438:67
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:429:67
 ERROR `(event: QueueAgentThoughtEvent) -> Literal['thought']` is not assignable to attribute `_agent_thought_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, event: QueueAgentThoughtEvent) -> AgentThoughtStreamResponse | None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:439:54
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:430:54
 ERROR `(event: QueueMessageFileEvent) -> Literal['file']` is not assignable to attribute `message_file_to_stream_response` with type `(self: MessageCycleManager, event: QueueMessageFileEvent) -> MessageFileStreamResponse | None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:440:75
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:431:75
 ERROR `(**kwargs: Unknown) -> Literal['agent']` is not assignable to attribute `_agent_message_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, answer: str, message_id: str) -> AgentMessageStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:441:54
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:432:54
 ERROR `(err: Unknown) -> Unknown` is not assignable to attribute `error_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, e: Exception) -> ErrorStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:443:45
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:434:45
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:481:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:452:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:482:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:453:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:483:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:454:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:530:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:483:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:531:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:484:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:532:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:485:21
 ERROR `(trace_manager: Unknown) -> Iterator[Any]` is not assignable to attribute `_wrapper_process_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, trace_manager: TraceQueueManager | None = None) -> Generator[StreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:536:53
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:489:53
 ERROR `(generator: Generator[StreamResponse]) -> Literal['streamed']` is not assignable to attribute `_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, generator: Generator[StreamResponse]) -> Generator[ChatbotAppStreamResponse | CompletionAppStreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:537:40
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:490:40
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:551:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:504:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:552:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:505:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:553:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:506:21
 ERROR `(trace_manager: Unknown) -> Iterator[Any]` is not assignable to attribute `_wrapper_process_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, trace_manager: TraceQueueManager | None = None) -> Generator[StreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:557:53
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:510:53
 ERROR `(generator: Generator[StreamResponse]) -> Literal['blocking']` is not assignable to attribute `_to_blocking_response` with type `(self: EasyUIBasedGenerateTaskPipeline, generator: Generator[StreamResponse]) -> ChatbotAppBlockingResponse | CompletionAppBlockingResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:558:42
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:511:42
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:570:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:523:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:571:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:524:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:572:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:525:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:587:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:540:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:588:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:541:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:589:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:542:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:604:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:557:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:605:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:558:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:606:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:559:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:623:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:576:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:624:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:577:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:625:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:578:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:642:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:595:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:643:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:596:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:644:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:597:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `publisher` with type `AppGeneratorTTSPublisher | None` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline._listen_audio_msg` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:649:57
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:602:57
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:659:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:612:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:660:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:613:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:661:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:614:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `publisher` with type `AppGeneratorTTSPublisher | None` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline._listen_audio_msg` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:666:53
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:619:53
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:673:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:626:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:674:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:627:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:675:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:628:21
 ERROR `(publisher: AppGeneratorTTSPublisher | None, trace_manager: Unknown) -> Iterator[Any]` is not assignable to attribute `_process_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, publisher: AppGeneratorTTSPublisher | None, trace_manager: TraceQueueManager | None = None) -> Generator[StreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:678:45
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:631:45
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:693:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:646:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:694:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:647:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:695:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:648:21
 ERROR `(publisher: AppGeneratorTTSPublisher | None, trace_manager: Unknown) -> Iterator[Any]` is not assignable to attribute `_process_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, publisher: AppGeneratorTTSPublisher | None, trace_manager: TraceQueueManager | None = None) -> Generator[StreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:706:45
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:659:45
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:727:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:680:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:728:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:681:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:729:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:682:21
 ERROR `(publisher: AppGeneratorTTSPublisher | None, trace_manager: Unknown) -> Iterator[Any]` is not assignable to attribute `_process_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, publisher: AppGeneratorTTSPublisher | None, trace_manager: TraceQueueManager | None = None) -> Generator[StreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:746:45
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:699:45
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:764:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:717:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:765:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:718:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:766:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:719:21
 ERROR `() -> Iterator[MessageQueueMessage | WorkflowQueueMessage] | Iterator[Any]` is not assignable to attribute `listen` with type `(self: AppQueueManager) -> Generator[MessageQueueMessage | WorkflowQueueMessage, Unknown]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:770:41
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:723:41
 ERROR `(answer: Unknown) -> Literal['moderated answer']` is not assignable to attribute `handle_output_moderation_when_task_finished` with type `(self: EasyUIBasedGenerateTaskPipeline, completion: str) -> str | None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:774:64
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:727:64
 ERROR `(answer: str) -> str` is not assignable to attribute `message_replace_to_stream_response` with type `(self: MessageCycleManager, answer: str, reason: str = '') -> MessageReplaceStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:775:78
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:728:78
 ERROR `() -> Literal['end']` is not assignable to attribute `_message_end_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline) -> MessageEndStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:777:52
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:730:52
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:808:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:744:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:809:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:745:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:810:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:746:21
 ERROR `() -> Iterator[MessageQueueMessage | WorkflowQueueMessage] | Iterator[Any]` is not assignable to attribute `listen` with type `(self: AppQueueManager) -> Generator[MessageQueueMessage | WorkflowQueueMessage, Unknown]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:825:41
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:761:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:843:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:779:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:844:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:780:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:845:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:781:21
 ERROR `() -> Iterator[MessageQueueMessage | WorkflowQueueMessage] | Iterator[Any]` is not assignable to attribute `listen` with type `(self: AppQueueManager) -> Generator[MessageQueueMessage | WorkflowQueueMessage, Unknown]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:854:41
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:790:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:865:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:801:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:866:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:802:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:867:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:803:21
 ERROR `(message_id: str) -> None` is not assignable to attribute `get_message_event_type` with type `(self: MessageCycleManager, message_id: str) -> StreamEvent` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:874:66
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:810:66
 ERROR `(**kwargs: Unknown) -> Unknown` is not assignable to attribute `message_to_stream_response` with type `(self: MessageCycleManager, answer: str, message_id: str, from_variable_selector: list[str] | None = None, event_type: StreamEvent | None = None) -> MessageStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:875:70
+   --> tests/unit_test\n\n... (truncated) ...

…essionmaker

The previous commit added a Session import to silence pyrefly, but the
real intent of this PR is to migrate everywhere to the sessionmaker
pattern. tool_manager.py still had two leftover raw Session(db.engine)
blocks that the refactor missed, and the corresponding tests were
mocking sessionmaker (not Session), so the patch could not intercept
real engine access — manifesting as AttributeError: object has no
attribute connect when the test mock_db.engine = object() flowed
through.

Migrating both sites to sessionmaker(bind=db.engine, ...).begin()
makes the source consistent with the rest of the refactor and lets
the existing test fixtures work as designed. Session import is no
longer needed and is dropped.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-04-11 02:04:41.922309858 +0000
+++ /tmp/pyrefly_pr.txt	2026-04-11 02:04:33.128301975 +0000
@@ -2498,83 +2498,83 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message | None` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate` [bad-argument-type]
    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:527:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `flask_app` with type `Flask` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:584:27
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:583:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `context` with type `Context` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:589:25
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:588:25
 ERROR Argument `SimpleNamespace` is not assignable to parameter `variable_loader` with type `VariableLoader` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:590:33
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:589:33
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_execution_repository` with type `WorkflowExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:591:47
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:590:47
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_node_execution_repository` with type `WorkflowNodeExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:592:52
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:591:52
 ERROR Argument `SimpleNamespace` is not assignable to parameter `flask_app` with type `Flask` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:648:27
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:646:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `context` with type `Context` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:653:25
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:651:25
 ERROR Argument `SimpleNamespace` is not assignable to parameter `variable_loader` with type `VariableLoader` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:654:33
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:652:33
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_execution_repository` with type `WorkflowExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:655:47
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:653:47
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_node_execution_repository` with type `WorkflowNodeExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:656:52
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:654:52
 ERROR Argument `SimpleNamespace` is not assignable to parameter `flask_app` with type `Flask` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:720:23
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:717:23
 ERROR Argument `SimpleNamespace` is not assignable to parameter `context` with type `Context` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:725:21
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:722:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `variable_loader` with type `VariableLoader` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:726:29
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:723:29
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_execution_repository` with type `WorkflowExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:727:43
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:724:43
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_node_execution_repository` with type `WorkflowNodeExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:728:48
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:725:48
 ERROR Argument `SimpleNamespace` is not assignable to parameter `flask_app` with type `Flask` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:804:23
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:800:23
 ERROR Argument `SimpleNamespace` is not assignable to parameter `context` with type `Context` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:809:21
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:805:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `variable_loader` with type `VariableLoader` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:810:29
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:806:29
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_execution_repository` with type `WorkflowExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:811:43
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:807:43
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_node_execution_repository` with type `WorkflowNodeExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:812:48
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:808:48
 ERROR Argument `SimpleNamespace` is not assignable to parameter `flask_app` with type `Flask` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:885:27
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:887:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `context` with type `Context` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:890:25
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:892:25
 ERROR Argument `SimpleNamespace` is not assignable to parameter `variable_loader` with type `VariableLoader` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:891:33
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:893:33
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_execution_repository` with type `WorkflowExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:892:47
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:894:47
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_node_execution_repository` with type `WorkflowNodeExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:893:52
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:895:52
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._handle_advanced_chat_response` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:942:31
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:944:31
 ERROR Argument `SimpleNamespace` is not assignable to parameter `user` with type `Account | EndUser` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._handle_advanced_chat_response` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:951:22
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:953:22
 ERROR Argument `(**kwargs: Unknown) -> None` is not assignable to parameter `draft_var_saver_factory` with type `DraftVariableSaverFactory` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._handle_advanced_chat_response` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:952:41
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:954:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._handle_advanced_chat_response` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:989:31
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:991:31
 ERROR Argument `SimpleNamespace` is not assignable to parameter `user` with type `Account | EndUser` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._handle_advanced_chat_response` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:998:22
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1000:22
 ERROR Argument `(**kwargs: Unknown) -> None` is not assignable to parameter `draft_var_saver_factory` with type `DraftVariableSaverFactory` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._handle_advanced_chat_response` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:999:41
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1001:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `flask_app` with type `Flask` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1076:23
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1077:23
 ERROR Argument `SimpleNamespace` is not assignable to parameter `context` with type `Context` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1081:21
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1082:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `variable_loader` with type `VariableLoader` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1082:29
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1083:29
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_execution_repository` with type `WorkflowExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1083:43
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1084:43
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_node_execution_repository` with type `WorkflowNodeExecutionRepository` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator._generate_worker` [bad-argument-type]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1084:48
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1085:48
 ERROR No matching overload found for function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator.generate` called with arguments: (app_model=SimpleNamespace, workflow=SimpleNamespace, user=Account, args=dict[str, dict[@_, @_] | str], invoke_from=Literal[InvokeFrom.DEBUGGER], workflow_run_id=Literal['run-id'], streaming=Literal[False]) [no-matching-overload]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1156:36
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1157:36
 ERROR Object of class `NoneType` has no attribute `show_retrieve_source` [missing-attribute]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1167:16
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1168:16
 ERROR No matching overload found for function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator.generate` called with arguments: (app_model=SimpleNamespace, workflow=SimpleNamespace, user=EndUser, args=dict[str, dict[@_, @_] | str], invoke_from=Literal[InvokeFrom.SERVICE_API], workflow_run_id=Literal['run-id'], streaming=Literal[False]) [no-matching-overload]
-    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1235:27
+    --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1236:27
 ERROR Cannot index into `str` [bad-index]
   --> tests/unit_tests/core/app/apps/advanced_chat/test_generate_response_converter.py:95:16
 ERROR Cannot index into `str` [bad-index]
@@ -2810,7 +2810,7 @@
 ERROR Cannot index into `str` [bad-index]
    --> tests/unit_tests/core/app/apps/pipeline/test_pipeline_generate_response_converter.py:112:12
 ERROR Class `PipelineRunner` has no class attribute `call_args` [missing-attribute]
-   --> tests/unit_tests/core/app/apps/pipeline/test_pipeline_generator.py:341:12
+   --> tests/unit_tests/core/app/apps/pipeline/test_pipeline_generator.py:338:12
 ERROR Argument `SimpleNamespace` is not assignable to parameter `application_generate_entity` with type `RagPipelineGenerateEntity` in function `core.app.apps.pipeline.pipeline_runner.PipelineRunner.__init__` [bad-argument-type]
   --> tests/unit_tests/core/app/apps/pipeline/test_pipeline_runner.py:65:37
 ERROR Argument `SimpleNamespace` is not assignable to parameter `application_generate_entity` with type `RagPipelineGenerateEntity` in function `core.app.apps.pipeline.pipeline_runner.PipelineRunner.__init__` [bad-argument-type]
@@ -3042,7 +3042,7 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `application_generate_entity` with type `AdvancedChatAppGenerateEntity | WorkflowAppGenerateEntity` in function `core.app.apps.common.workflow_response_converter.WorkflowResponseConverter.__init__` [bad-argument-type]
    --> tests/unit_tests/core/app/apps/test_workflow_pause_events.py:112:37
 ERROR Argument `SimpleNamespace` is not assignable to parameter `graph_runtime_state` with type `GraphRuntimeState` in function `core.app.apps.common.workflow_response_converter.WorkflowResponseConverter.workflow_pause_to_stream_response` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_workflow_pause_events.py:176:29
+   --> tests/unit_tests/core/app/apps/test_workflow_pause_events.py:178:29
 ERROR Argument `SimpleNamespace` is not assignable to parameter `app_model` with type `App` in function `core.app.apps.workflow.app_config_manager.WorkflowAppConfigManager.get_app_config` [bad-argument-type]
   --> tests/unit_tests/core/app/apps/workflow/test_app_config_manager.py:23:66
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `core.app.apps.workflow.app_config_manager.WorkflowAppConfigManager.get_app_config` [bad-argument-type]
@@ -3268,283 +3268,283 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `application_generate_entity` with type `AppGenerateEntity` in function `core.app.task_pipeline.based_generate_task_pipeline.BasedGenerateTaskPipeline.__init__` [bad-argument-type]
   --> tests/unit_tests/core/app/task_pipeline/test_based_generate_task_pipeline.py:23:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-  --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:98:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:122:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-  --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:99:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:123:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:100:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:124:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:118:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:142:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:119:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:143:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:120:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:144:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:138:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:162:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:139:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:163:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:140:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:164:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:152:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:176:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:153:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:177:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:154:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:178:21
 ERROR `() -> Iterator[SimpleNamespace]` is not assignable to attribute `listen` with type `(self: AppQueueManager) -> Generator[MessageQueueMessage | WorkflowQueueMessage, Unknown]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:182:41
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:206:41
 ERROR `(message_id: str) -> None` is not assignable to attribute `get_message_event_type` with type `(self: MessageCycleManager, message_id: str) -> StreamEvent` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:183:66
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:207:66
 ERROR `(**kwargs: Unknown) -> Literal['chunk']` is not assignable to attribute `message_to_stream_response` with type `(self: MessageCycleManager, answer: str, message_id: str, from_variable_selector: list[str] | None = None, event_type: StreamEvent | None = None) -> MessageStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:184:70
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:208:70
 ERROR `(**kwargs: Unknown) -> Literal['replace']` is not assignable to attribute `message_replace_to_stream_response` with type `(self: MessageCycleManager, answer: str, reason: str = '') -> MessageReplaceStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:185:78
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:209:78
 ERROR `() -> Literal['end']` is not assignable to attribute `_message_end_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline) -> MessageEndStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:187:52
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:211:52
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:225:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:229:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:226:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:230:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:227:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:231:21
 ERROR `TestEasyUiBasedGenerateTaskPipeline.test_handle_output_moderation_chunk_directs_output._Moderation` is not assignable to attribute `output_moderation_handler` with type `OutputModeration | None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:239:46
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:243:46
 ERROR `(event: AppQueueEvent, publish_from: Unknown) -> None` is not assignable to attribute `publish` with type `(self: AppQueueManager, event: AppQueueEvent, pub_from: PublishFrom) -> None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:240:42
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:244:42
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:288:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:292:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:289:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:293:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:290:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:294:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:322:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:326:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:323:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:327:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:324:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:328:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:414:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:405:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:415:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:406:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:416:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:407:21
 ERROR `() -> Iterator[SimpleNamespace]` is not assignable to attribute `listen` with type `(self: AppQueueManager) -> Generator[MessageQueueMessage | WorkflowQueueMessage, Unknown]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:437:41
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:428:41
 ERROR `(event: QueueAnnotationReplyEvent) -> SimpleNamespace` is not assignable to attribute `handle_annotation_reply` with type `(self: MessageCycleManager, event: QueueAnnotationReplyEvent) -> MessageAnnotation | None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:438:67
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:429:67
 ERROR `(event: QueueAgentThoughtEvent) -> Literal['thought']` is not assignable to attribute `_agent_thought_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, event: QueueAgentThoughtEvent) -> AgentThoughtStreamResponse | None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:439:54
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:430:54
 ERROR `(event: QueueMessageFileEvent) -> Literal['file']` is not assignable to attribute `message_file_to_stream_response` with type `(self: MessageCycleManager, event: QueueMessageFileEvent) -> MessageFileStreamResponse | None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:440:75
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:431:75
 ERROR `(**kwargs: Unknown) -> Literal['agent']` is not assignable to attribute `_agent_message_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, answer: str, message_id: str) -> AgentMessageStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:441:54
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:432:54
 ERROR `(err: Unknown) -> Unknown` is not assignable to attribute `error_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, e: Exception) -> ErrorStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:443:45
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:434:45
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:481:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:452:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:482:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:453:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:483:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:454:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:530:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:483:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:531:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:484:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:532:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:485:21
 ERROR `(trace_manager: Unknown) -> Iterator[Any]` is not assignable to attribute `_wrapper_process_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, trace_manager: TraceQueueManager | None = None) -> Generator[StreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:536:53
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:489:53
 ERROR `(generator: Generator[StreamResponse]) -> Literal['streamed']` is not assignable to attribute `_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, generator: Generator[StreamResponse]) -> Generator[ChatbotAppStreamResponse | CompletionAppStreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:537:40
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:490:40
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:551:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:504:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:552:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:505:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:553:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:506:21
 ERROR `(trace_manager: Unknown) -> Iterator[Any]` is not assignable to attribute `_wrapper_process_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, trace_manager: TraceQueueManager | None = None) -> Generator[StreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:557:53
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:510:53
 ERROR `(generator: Generator[StreamResponse]) -> Literal['blocking']` is not assignable to attribute `_to_blocking_response` with type `(self: EasyUIBasedGenerateTaskPipeline, generator: Generator[StreamResponse]) -> ChatbotAppBlockingResponse | CompletionAppBlockingResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:558:42
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:511:42
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:570:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:523:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:571:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:524:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:572:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:525:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:587:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:540:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:588:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:541:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:589:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:542:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:604:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:557:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:605:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:558:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:606:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:559:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:623:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:576:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:624:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:577:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:625:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:578:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:642:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:595:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:643:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:596:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:644:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:597:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `publisher` with type `AppGeneratorTTSPublisher | None` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline._listen_audio_msg` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:649:57
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:602:57
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:659:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:612:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:660:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:613:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:661:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:614:21
 ERROR Argument `SimpleNamespace` is not assignable to parameter `publisher` with type `AppGeneratorTTSPublisher | None` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline._listen_audio_msg` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:666:53
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:619:53
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:673:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:626:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:674:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:627:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:675:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:628:21
 ERROR `(publisher: AppGeneratorTTSPublisher | None, trace_manager: Unknown) -> Iterator[Any]` is not assignable to attribute `_process_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, publisher: AppGeneratorTTSPublisher | None, trace_manager: TraceQueueManager | None = None) -> Generator[StreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:678:45
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:631:45
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:693:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:646:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:694:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:647:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:695:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:648:21
 ERROR `(publisher: AppGeneratorTTSPublisher | None, trace_manager: Unknown) -> Iterator[Any]` is not assignable to attribute `_process_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, publisher: AppGeneratorTTSPublisher | None, trace_manager: TraceQueueManager | None = None) -> Generator[StreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:706:45
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:659:45
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:727:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:680:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:728:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:681:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:729:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:682:21
 ERROR `(publisher: AppGeneratorTTSPublisher | None, trace_manager: Unknown) -> Iterator[Any]` is not assignable to attribute `_process_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, publisher: AppGeneratorTTSPublisher | None, trace_manager: TraceQueueManager | None = None) -> Generator[StreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:746:45
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:699:45
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:764:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:717:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:765:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:718:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:766:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:719:21
 ERROR `() -> Iterator[MessageQueueMessage | WorkflowQueueMessage] | Iterator[Any]` is not assignable to attribute `listen` with type `(self: AppQueueManager) -> Generator[MessageQueueMessage | WorkflowQueueMessage, Unknown]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:770:41
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:723:41
 ERROR `(answer: Unknown) -> Literal['moderated answer']` is not assignable to attribute `handle_output_moderation_when_task_finished` with type `(self: EasyUIBasedGenerateTaskPipeline, completion: str) -> str | None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:774:64
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:727:64
 ERROR `(answer: str) -> str` is not assignable to attribute `message_replace_to_stream_response` with type `(self: MessageCycleManager, answer: str, reason: str = '') -> MessageReplaceStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:775:78
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:728:78
 ERROR `() -> Literal['end']` is not assignable to attribute `_message_end_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline) -> MessageEndStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:777:52
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:730:52
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:808:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:744:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:809:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:745:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:810:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:746:21
 ERROR `() -> Iterator[MessageQueueMessage | WorkflowQueueMessage] | Iterator[Any]` is not assignable to attribute `listen` with type `(self: AppQueueManager) -> Generator[MessageQueueMessage | WorkflowQueueMessage, Unknown]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:825:41
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:761:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:843:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:779:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:844:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:780:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:845:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:781:21
 ERROR `() -> Iterator[MessageQueueMessage | WorkflowQueueMessage] | Iterator[Any]` is not assignable to attribute `listen` with type `(self: AppQueueManager) -> Generator[MessageQueueMessage | WorkflowQueueMessage, Unknown]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:854:41
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:790:41
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:865:27
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:801:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:866:26
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:802:26
 ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:867:21
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:803:21
 ERROR `(message_id: str) -> None` is not assignable to attribute `get_message_event_type` with type `(self: MessageCycleManager, message_id: str) -> StreamEvent` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:874:66
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:810:66
 ERROR `(**kwargs: Unknown) -> Unknown` is not assignable to attribute `message_to_stream_response` with type `(self: MessageCycleManager, answer: str, message_id: str, from_variable_selector: list[str] | None = None, event_type: StreamEvent | None = None) -> MessageStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:875:70
+   --> tests/unit_test\n\n... (truncated) ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-revision refactor size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants