From f70a541b55f1b24a6a89d71a80612c5f50e3cd96 Mon Sep 17 00:00:00 2001 From: Michal Tuszowski Date: Sat, 18 Jul 2026 13:45:36 +0200 Subject: [PATCH 1/2] ai: $gadaj_teraz without an argument reports the active backend Quality-of-life: checking which AI backend is live no longer requires switching to it. Bare `$gadaj_teraz` replies with the active config and the selectable ones; that read-only path is open to everyone, while switching stays Vykidailo-gated. Co-Authored-By: Claude Opus 4.8 --- ai_commands.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/ai_commands.py b/ai_commands.py index 59b238d..1fcb22e 100644 --- a/ai_commands.py +++ b/ai_commands.py @@ -111,17 +111,26 @@ class Events(commands.Cog): @commands.hybrid_command( name="gadaj_teraz", - description="Przełącz backend AI (np. gpt / claude). Tylko Vykidailo.", + description="Pokaż/przełącz backend AI (bez argumentu = status). Przełączanie: Vykidailo.", ) - async def gadaj_teraz(self, ctx, nazwa_konfigu: str): + async def gadaj_teraz(self, ctx, nazwa_konfigu: Optional[str] = None): async with ctx.channel.typing(): + available = ai_functions.list_ai_configs() + # No argument -> report the active backend (read-only, open to all). + if not nazwa_konfigu: + active = ai_functions.get_active_ai_config() + await discord_friendly_reply( + ctx, + f"Teraz gadam przez **{active}**. Dostępne: {', '.join(available)}. " + "Przełączysz przez `$gadaj_teraz ` (tylko Vykidailo).", + ) + return is_admin = isinstance(ctx.author, discord.Member) and any( role.name == "Vykidailo" for role in ctx.author.roles ) if not is_admin: await discord_friendly_reply(ctx, "Tylko Vykidailo może przełączać AI.") return - available = ai_functions.list_ai_configs() if nazwa_konfigu not in available: await discord_friendly_reply( ctx, From b8093d707d9e40fc29e2a57598e913374f22ded5 Mon Sep 17 00:00:00 2001 From: Michal Tuszowski Date: Sat, 18 Jul 2026 13:51:26 +0200 Subject: [PATCH 2/2] ci: allow manual runs via workflow_dispatch Lets CI be triggered on demand from the Actions tab or `gh workflow run`, instead of pushing a commit just to exercise the pipeline. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 923e678..ae90644 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,9 @@ on: branches: ["main"] pull_request: branches: ["main"] + # Manual trigger: run CI on demand from the Actions tab (or `gh workflow run + # ci.yml --ref `) without pushing a commit just to see it go green. + workflow_dispatch: permissions: contents: read