feat: show AI progress and configure prompt directory

This commit is contained in:
Azimkin
2026-09-14 14:25:50 +02:00
parent b68e715267
commit 40e7930e60
9 changed files with 64 additions and 12 deletions

View File

@@ -54,11 +54,19 @@ def _split_transcript(value: str, *, limit: int = 4000) -> list[str]:
return chunks
async def _dislike(message: Any) -> None:
async def _set_reaction(message: Any, emoji: str | None) -> None:
try:
await message.react("👎")
await message.react(emoji)
except Exception:
log.exception("Could not add a dislike reaction to message %s", getattr(message, "id", None))
log.exception(
"Could not set reaction %r on message %s",
emoji,
getattr(message, "id", None),
)
async def _dislike(message: Any) -> None:
await _set_reaction(message, "👎")
def _transcribable_media(message: Any) -> Any | None:
@@ -416,6 +424,7 @@ async def echo(ctx: "CommandContext") -> None:
category="shared",
).shared()
async def ai(ctx: "CommandContext") -> None:
await _set_reaction(ctx.message, "🤔")
failed = False
try:
invocation = parse_agent_invocation(ctx.args, ctx.manager.config.ai)
@@ -436,6 +445,8 @@ async def ai(ctx: "CommandContext") -> None:
if failed:
await _dislike(ctx.message)
else:
await _set_reaction(ctx.message, None)
@command_registry.command(