feat: Show Model Name in Live Stats Panel (#169)
Co-authored-by: Ahmed Allam <ahmed39652003@gmail.com>
This commit is contained in:
@@ -139,7 +139,7 @@ async def run_cli(args: Any) -> None: # noqa: PLR0915
|
|||||||
status_text.append("Running penetration test...", style="bold #22c55e")
|
status_text.append("Running penetration test...", style="bold #22c55e")
|
||||||
status_text.append("\n\n")
|
status_text.append("\n\n")
|
||||||
|
|
||||||
stats_text = build_live_stats_text(tracer)
|
stats_text = build_live_stats_text(tracer, agent_config)
|
||||||
if stats_text:
|
if stats_text:
|
||||||
status_text.append(stats_text)
|
status_text.append(stats_text)
|
||||||
|
|
||||||
|
|||||||
@@ -676,7 +676,7 @@ class StrixTUIApp(App): # type: ignore[misc]
|
|||||||
|
|
||||||
stats_content = Text()
|
stats_content = Text()
|
||||||
|
|
||||||
stats_text = build_live_stats_text(self.tracer)
|
stats_text = build_live_stats_text(self.tracer, self.agent_config)
|
||||||
if stats_text:
|
if stats_text:
|
||||||
stats_content.append(stats_text)
|
stats_content.append(stats_text)
|
||||||
|
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ def build_final_stats_text(tracer: Any) -> Text:
|
|||||||
return stats_text
|
return stats_text
|
||||||
|
|
||||||
|
|
||||||
def build_live_stats_text(tracer: Any) -> Text:
|
def build_live_stats_text(tracer: Any, agent_config: dict[str, Any] | None = None) -> Text:
|
||||||
stats_text = Text()
|
stats_text = Text()
|
||||||
if not tracer:
|
if not tracer:
|
||||||
return stats_text
|
return stats_text
|
||||||
@@ -165,6 +165,12 @@ def build_live_stats_text(tracer: Any) -> Text:
|
|||||||
|
|
||||||
stats_text.append("\n")
|
stats_text.append("\n")
|
||||||
|
|
||||||
|
if agent_config:
|
||||||
|
llm_config = agent_config["llm_config"]
|
||||||
|
model = getattr(llm_config, "model_name", "Unknown")
|
||||||
|
stats_text.append(f"🧠 Model: {model}")
|
||||||
|
stats_text.append("\n")
|
||||||
|
|
||||||
stats_text.append("🤖 Agents: ", style="bold white")
|
stats_text.append("🤖 Agents: ", style="bold white")
|
||||||
stats_text.append(str(agent_count), style="dim white")
|
stats_text.append(str(agent_count), style="dim white")
|
||||||
stats_text.append(" • ", style="dim white")
|
stats_text.append(" • ", style="dim white")
|
||||||
|
|||||||
Reference in New Issue
Block a user