feat: introduce versioning (v1.2.0) and display it in dashboard

This commit is contained in:
Gemini CLI
2026-03-05 21:22:57 +01:00
parent 07c71ab209
commit 36dd389e10

View File

@ -39,6 +39,7 @@ logger = logging.getLogger("PingPongBot")
class PingPongBot: class PingPongBot:
def __init__(self, config_path="config/ping_pong_config.yaml"): def __init__(self, config_path="config/ping_pong_config.yaml"):
self.version = "1.2.0"
with open(config_path, 'r') as f: with open(config_path, 'r') as f:
self.config = yaml.safe_load(f) self.config = yaml.safe_load(f)
@ -135,7 +136,7 @@ class PingPongBot:
def render_dashboard(self): def render_dashboard(self):
"""Render a clean summary of the bot state""" """Render a clean summary of the bot state"""
# 1. Config Table # 1. Config Table
cfg_table = Table(title="[bold cyan]PING-PONG BOT CONFIG[/]", box=box.ROUNDED, expand=True) cfg_table = Table(title=f"[bold cyan]PING-PONG BOT CONFIG (v{self.version})[/]", box=box.ROUNDED, expand=True)
cfg_table.add_column("Property", style="dim") cfg_table.add_column("Property", style="dim")
cfg_table.add_column("Value", style="bold white") cfg_table.add_column("Value", style="bold white")
cfg_table.add_row("Symbol", f"{self.symbol} ({self.interval}m)") cfg_table.add_row("Symbol", f"{self.symbol} ({self.interval}m)")