Repository navigation
Rkadakia/reci3 - #203
Closed
riyakadakia wants to merge 4 commits into
Closed
Rkadakia/reci3#203riyakadakia wants to merge 4 commits into
riyakadakia wants to merge 4 commits into
Conversation
…ndling logic from the main component into reusable modules. - Extract mention state management into useMentionHandler custom hook, removing complex state logic from the component and making it reusable across other components that need mention functionality. - Extract pure utility functions (extractMentionQuery, insertMention) into mention-utils.ts, separating business logic from UI concerns and making the logic easier to test and maintain. - Simplify LineCommentEditorV2 component from ~200 lines to ~100 lines, focusing it solely on rendering and event handling with no impact to public API or component behavior.
Add 7 new unit tests to mention-utils.test.ts covering mention extraction, insertion, and cursor positioning logic. Achieve 100% code coverage on the utilities module, ensuring the core refactored logic works correctly and preventing future regressions.
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.
Issue for this PR
Closes #200
Type of change
What does this PR do?
Adds a
/scottyslash command to the OpenCode TUI that displays ASCII art of a cute Scottish terrier when invoked by the user.Changes made:
Why this works:
OpenCode's slash commands are defined in promptCommands with a slashName property. The autocomplete system recognizes commands with
slashNameand makes them available as /[slashName]. When executed, the run function inserts the ASCII art into the input field using input.insertText().How did you verify your code works?
If this is a UI change, please include a screenshot or recording.


Checklist