Skip to content

Conversation

LegendsOfXania
Copy link
Contributor

@LegendsOfXania LegendsOfXania commented Jun 27, 2025

Hey! I've finally updated the custom commands page to make it compatible with Typewriter beta 160.

Summary by CodeRabbit

  • Documentation
    • Clarified usage of custom commands with and without arguments, including a new warning note.
    • Updated instructions for retrieving player-entered arguments, reflecting a change in recommended variables.
    • Refreshed related images to match updated guidance.
    • Improved placeholder names in example messages for better clarity.

Copy link
Contributor

coderabbitai bot commented Jun 27, 2025

Walkthrough

The documentation for creating custom commands was updated to clarify usage differences between commands with and without arguments. The method for retrieving arguments was revised, related images were updated, and JSON command placeholders were made more descriptive.

Changes

File(s) Change Summary
.../02-custom-commands.mdx Updated documentation to clarify argument handling, revised method for retrieving arguments, added warning note, updated images, and added import for ActionButton.
.../assets/commands/sequence.json Changed placeholder tokens in the message field from numeric ("<1>", "<2>") to descriptive names ("", "").

Poem

In the warren of docs, a note now appears,
For commands with or without, the guidance is clear.
Placeholders renamed, more meaning in sight,
Arguments retrieved in a way that feels right.
With every small hop, our commands grow bright!
🐇✨

✨ Finishing Touches
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Post Copyable Unit Tests in Comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (3)
documentation/plugins/code-snippets/snippets.json (1)

1-310: Monolithic snippet registry hurts maintainability

All snippets are crammed into a single ~300-line JSON blob. A small edit triggers huge merge conflicts and makes PR reviews painful.
Split the registry into one-snippet-per-file (or at least per topic) and compose them during the build step.

documentation/docs/docs/03-creating-stories/07-advanced-interactions/02-custom-commands.mdx (2)

16-18: Grammar nits in warning block

Small wording fixes improve professionalism:

-This guide show you how to create a custom command with argument, if you don't need arguments, you can use the ...
+This guide shows you how to create a custom command with arguments. If you don't need arguments, use the ...

39-40: Alt text & wording out-of-sync with new variable names

The guide now refers to “String Builder Variable” but the image alt text still says Interaction Context Text Variable.

-<Image img={...} alt="Interaction Context Text Variable" width={400}/>
+<Image img={...} alt="String Builder Variable example" width={400}/>

Also consider explicitly linking to the docs for StringBuilderVar & InteractionContextStringVar so readers can jump straight to the APIs.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ea23a02 and 4d2cf6a.

⛔ Files ignored due to path filters (2)
  • documentation/docs/docs/assets/interactions/context-text-variable.png is excluded by !**/*.png
  • documentation/docs/docs/assets/interactions/string-builder-variable.png is excluded by !**/*.png
📒 Files selected for processing (3)
  • documentation/docs/docs/03-creating-stories/07-advanced-interactions/02-custom-commands.mdx (2 hunks)
  • documentation/docs/docs/03-creating-stories/07-advanced-interactions/assets/commands/sequence.json (1 hunks)
  • documentation/plugins/code-snippets/snippets.json (1 hunks)
🧰 Additional context used
🪛 LanguageTool
documentation/docs/docs/03-creating-stories/07-advanced-interactions/02-custom-commands.mdx

[uncategorized] ~17-~17: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... :::warning[Custom Commands] This guide show you how to create a custom command with...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~17-~17: The grammatical number of this noun doesn’t look right. Consider replacing it.
Context: ...you how to create a custom command with argument, if you don't need arguments, you can u...

(AI_EN_LECTOR_REPLACEMENT_NOUN_NUMBER)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Test Documentation Build
🔇 Additional comments (1)
documentation/docs/docs/03-creating-stories/07-advanced-interactions/assets/commands/sequence.json (1)

11-11: 👍 Descriptive placeholders improve readability

Switching from <1>/<2> to <pseudo>/<age> makes the message self-explanatory. No further action required.

@Marten-Mrfc
Copy link
Collaborator

Will look at this when i am home (:

@Marten-Mrfc Marten-Mrfc self-requested a review June 28, 2025 11:00
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (3)
documentation/docs/docs/03-creating-stories/07-advanced-interactions/02-custom-commands.mdx (3)

17-20: Fix wording and grammar in the warning block

Minor language issues reduce professionalism and may confuse non-native speakers:

  1. showshows
  2. with argumentwith an argument
  3. Split the comma splice into two sentences for clarity.
-:::warning[Custom Commands]
-This guide show you how to create a custom command with argument, if you don't need arguments, you can use the [RunCommandEvent](../../../adapters/BasicAdapter/entries/event/on_run_command.mdx) to create a command without arguments.
-:::
+:::warning[Custom Commands]
+This guide shows you how to create a custom command with an argument.  
+If you don't need arguments, use the [RunCommandEvent](../../../adapters/BasicAdapter/entries/event/on_run_command.mdx) to create a command without them.
+:::

40-42: Update image alt text to match the new variable names

You replaced Interaction Context Text Variable with String Builder Variable / Interaction Context String Variable, but the alt attribute still refers to the old term, causing cognitive dissonance and harming accessibility.

-<Image img={require("../../assets/interactions/string-builder-variable.png")} alt="Interaction Context Text Variable" width={400}/>
+<Image img={require("../../assets/interactions/string-builder-variable.png")} alt="String Builder Variable and Interaction Context String Variable" width={400}/>

58-58: Optional: Provide a poster frame or fallback text for the .webm video

Some browsers/users block auto-playing WebM. Supplying a poster or descriptive fallback improves UX.

Example:

<Player
  url={require("../../assets/custom-commands/result.webm").default}
  poster={require("../../assets/custom-commands/result-poster.jpg").default}
/>
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4d2cf6a and 75a8717.

📒 Files selected for processing (1)
  • documentation/docs/docs/03-creating-stories/07-advanced-interactions/02-custom-commands.mdx (3 hunks)
🧰 Additional context used
🪛 LanguageTool
documentation/docs/docs/03-creating-stories/07-advanced-interactions/02-custom-commands.mdx

[uncategorized] ~18-~18: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... :::warning[Custom Commands] This guide show you how to create a custom command with...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~18-~18: The grammatical number of this noun doesn’t look right. Consider replacing it.
Context: ...you how to create a custom command with argument, if you don't need arguments, you can u...

(AI_EN_LECTOR_REPLACEMENT_NOUN_NUMBER)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Test Documentation Build

Copy link
Collaborator

@Marten-Mrfc Marten-Mrfc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review of updated Custom Commands Page

Thanks xaya for updating this page so that it is filled with the latest things available in the beta!

@Marten-Mrfc Marten-Mrfc enabled auto-merge (rebase) June 28, 2025 20:25
@Marten-Mrfc Marten-Mrfc disabled auto-merge June 28, 2025 20:25
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
documentation/docs/docs/03-creating-stories/07-advanced-interactions/02-custom-commands.mdx (2)

17-19: Minor grammar fixes

The sentence should read:
This guide shows you how to create a custom command with arguments

-This guide show you how to create a custom command with argument,
+This guide shows you how to create a custom command with arguments,

38-46: Polish punctuation & list clarity

Several commas are missing after introductory phrases, and step 5 lacks a period. Consider:

-If you want your command to actually do something when you run it you can do the following steps:
+If you want your command to actually do something when you run it, you can follow these steps:

-5. Do the same for the number argument
-6. Lastly construct a message. For this guide we used `Hi <pseudo>, you are <age> years old.`
+5. Do the same for the number argument.
+6. Lastly, construct a message. For this guide we used `Hi <pseudo>, you are <age> years old.`
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 75a8717 and 65a5352.

📒 Files selected for processing (1)
  • documentation/docs/docs/03-creating-stories/07-advanced-interactions/02-custom-commands.mdx (3 hunks)
🧰 Additional context used
🪛 LanguageTool
documentation/docs/docs/03-creating-stories/07-advanced-interactions/02-custom-commands.mdx

[uncategorized] ~18-~18: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... :::warning[Custom Commands] This guide show you how to create a custom command with...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~18-~18: The grammatical number of this noun doesn’t look right. Consider replacing it.
Context: ...you how to create a custom command with argument, if you don't need arguments, you can u...

(AI_EN_LECTOR_REPLACEMENT_NOUN_NUMBER)


[typographical] ~39-~39: Consider adding a comma here.
Context: ...d to actually do something when you run it you can do the following steps: 1. In t...

(IF_COMMA)


[typographical] ~40-~40: Use a comma after an introductory phrase.
Context: ...n the Number Argument, add a trigger. For this guide we will use a Send Message entry. 2. ...

(COMMA_INTRODUCTORY_WORDS_PHRASES)


[uncategorized] ~41-~41: A comma might be missing here.
Context: ...geentry. 2. Inside theSend Message` entry click on the <ActionButton button="dyna...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)


[uncategorized] ~43-~43: A comma might be missing here.
Context: ...l it pseudo. 4. For the value of this part use a `Interaction Context String Varia...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)


[uncategorized] ~45-~45: A comma might be missing here.
Context: ... Do the same for the number argument 6. Lastly construct a message. For this guide we ...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)


[typographical] ~45-~45: Use a comma after an introductory phrase.
Context: ...argument 6. Lastly construct a message. For this guide we used `Hi , you are yea...

(COMMA_INTRODUCTORY_WORDS_PHRASES)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Test Documentation Build
🔇 Additional comments (2)
documentation/docs/docs/03-creating-stories/07-advanced-interactions/02-custom-commands.mdx (2)

64-64: Asset path confirmed
The demo video exists at documentation/docs/docs/assets/custom-commands/result.webm, which is exactly where ../../assets/custom-commands/result.webm resolves from 03-creating-stories/07-advanced-interactions/02-custom-commands.mdx. No further action required.


10-10: Verify the ActionButtons component path
I couldn’t find any matching ActionButton or ActionButtons files in the repo—please double-check that the component exists under @site/src/components and update the import accordingly.

• File to check:
documentation/docs/docs/03-creating-stories/07-advanced-interactions/02-custom-commands.mdx (line 10)
• Possible resolutions:

  • If the file is named ActionButton.tsx, change the import to:
    import ActionButton from "@site/src/components/ActionButton"
  • If it’s ActionButtons.tsx (plural) or lives in its own folder (ActionButtons/index.tsx), ensure the path matches that exact filename/location.
    • Run locally to confirm, for example:
ls documentation/src/components | grep -E '^ActionButtons?(\.tsx|/)$'

@Marten-Mrfc Marten-Mrfc merged commit 897c2b9 into gabber235:develop Jun 28, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants