Skip to content

Conversation

Joannall
Copy link
Collaborator

@Joannall Joannall commented Sep 17, 2025

PR Type

Enhancement


Description

  • Changed EventEmitter class visibility from internal to public

  • Updated SQL query indication message for better user feedback


Diagram Walkthrough

flowchart LR
  A["EventEmitter class"] -- "visibility change" --> B["public access"]
  C["SqlSelect function"] -- "message update" --> D["improved user feedback"]
Loading

File Walkthrough

Relevant files
Enhancement
EventEmitter.cs
Make EventEmitter class publicly accessible                           

src/Plugins/BotSharp.Plugin.ChatHub/Helpers/EventEmitter.cs

  • Changed class visibility from internal to public
  • Changed SendChatEvent method visibility from internal to public
+2/-2     
SqlSelect.cs
Improve SQL query indication message                                         

src/Plugins/BotSharp.Plugin.SqlDriver/UtilFunctions/SqlSelect.cs

  • Updated Indication property message to be more descriptive and
    user-friendly
+1/-1     

Copy link

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

API Surface Change

Making the class and its method public expands the API surface. Confirm that this is intentional, documented, and that consumers cannot misuse it (e.g., ensure appropriate validation/logging and consider naming/namespace stability).

public class EventEmitter
{
    public static async Task SendChatEvent<T>(
        IServiceProvider services,
        ILogger logger,
        string @event,
        string conversationId,
UX Copy Tone

The new indication string is more verbose and includes a first-person voice; ensure this aligns with product tone guidelines and that localization/translation needs are considered.

public string Indication => "Generated query statement. I'm pulling the data from database, please wait";

Copy link

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Learned
best practice
Use neutral, non-misleading message

Avoid promising a long-running operation in a property; use a neutral, safe
default message that doesn't imply state and won't mislead users.

src/Plugins/BotSharp.Plugin.SqlDriver/UtilFunctions/SqlSelect.cs [12]

-public string Indication => "Generated query statement. I'm pulling the data from database, please wait";
+public string Indication => "Generating query and retrieving data…";
  • Apply / Chat
Suggestion importance[1-10]: 6

__

Why:
Relevant best practice - Validate external/system state and avoid unnecessary async overhead or misleading messages; keep user-facing indications accurate and fail-safe.

Low
  • More

@Oceania2018 Oceania2018 merged commit 29c3fa5 into SciSharp:master Sep 17, 2025
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants