diff --git a/main.go b/main.go index f3250ad..7c099b8 100644 --- a/main.go +++ b/main.go @@ -71,6 +71,8 @@ func (a *App) handleMessage(ctx context.Context, msg *tgbotapi.Message) error { return nil } + question := msg.Text[len("@grok"):] + select { case a.sema <- struct{}{}: default: @@ -79,9 +81,13 @@ func (a *App) handleMessage(ctx context.Context, msg *tgbotapi.Message) error { } defer func() { <-a.sema }() - a.log.Info("message passed all guards", "text", msg.Text) + a.log.Info( + "message passed all guards", + "og_text", msg.Text, + "transformed_text", question, + ) - response, err := a.proompter.Prompt(ctx, msg.Text) + response, err := a.proompter.Prompt(ctx, question) if err != nil { return fmt.Errorf("prompting: %w", err) }