Source code for test_inject

import asyncio
from response_postprocessor import inject_header_tool_emojis

[docs] async def main(): """Smoke-test :func:`inject_header_tool_emojis` from the command line. Builds a single hard-coded response string that already contains a first-line bracket header (``[ model :: emojis :: thought ]``), then calls ``response_postprocessor.inject_header_tool_emojis`` with a sample ``tools_executed`` list of ``["brave_web_search"]`` and prints the ``repr`` of the returned string so the inserted tool-category emoji section can be inspected. This is a standalone developer/debugging harness rather than part of an automated suite: it performs no assertions, touches no external systems (no Redis streams, knowledge graph, LLM, or HTTP calls), and only writes to stdout. Despite being declared ``async`` it awaits nothing, since ``inject_header_tool_emojis`` is a pure synchronous string transform; the coroutine exists only so the module can be driven uniformly via ``asyncio.run``. Called by the module-level ``asyncio.run(main())`` at the bottom of this file; no other internal callers were found. Returns: None. Output is emitted to stdout via ``print``. """ text = "[ gemini-3.1-pro-preview :: 🐉🥃🔎⚙️ :: Some thought. ]" out = inject_header_tool_emojis(text, tools_executed=["brave_web_search"]) print("Output:") print(repr(out))
asyncio.run(main())