fix: add role-aware, provider-specific AI error messages and empty room validation#69
Open
sezallagwal wants to merge 1 commit intoRocketChat:mainfrom
Open
Conversation
Collaborator
|
@sezallagwal can you fix this conflicts |
4ea0e2a to
680080e
Compare
Contributor
Author
|
@iam-vipin Fixed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #68
Changes
Role-aware, provider-specific error messages (
AIHandler.ts)getConfigError(provider)helper that selects the right error message based on usage mode (Personal / Workspace) and user role (admin / regular user)./quick config.Empty room validation (
Handler.ts)/quick aiis used in a room with no messages, instead of silently failing.Settings cleanup (
settings.ts)required: truetorequired: falsesince only one provider's keys are needed at a time — the red asterisks were misleading.Translation updates (all 5 locales)
__provider__placeholders, plus a newAI_No_Message_Foundkey.ErrorKeysarray intranslation.tsto match.Pass user context (
ExecuteBlockActionHandler.ts)usertoAIHandlerconstructor so role-based error logic works.Files Changed (10)
src/handlers/AIHandler.tssrc/handlers/Handler.tssrc/handlers/ExecuteBlockActionHandler.tssrc/config/settings.tssrc/lib/Translation/translation.tssrc/lib/Translation/locales/{en,de,pt,ru,pl}.tsDemo
Untitled.Project.mp4