chore: add disable image extension functionality#6706
chore: add disable image extension functionality#6706sriramveeraghanta merged 2 commits intopreviewfrom
Conversation
WalkthroughThis pull request improves the robustness of various image-related functionalities by introducing optional chaining to safely access properties when the image component may be undefined. It adjusts the control flow in extension handling and slash command filtering, updates type definitions and interface method signatures, and adds new properties for tracking upload status. Additionally, an experimental Next.js configuration is introduced for optimizing package imports during build. Changes
Sequence Diagram(s)sequenceDiagram
participant Editor
participant ExtensionLoader as "Extension Loader"
Editor->>ExtensionLoader: Request Initialization
ExtensionLoader->>ExtensionLoader: Check if "image" is disabled
alt Image Extension Enabled
ExtensionLoader->>ExtensionLoader: Add ImageExtension & CustomImageExtension
else
ExtensionLoader->>ExtensionLoader: Skip image extensions
end
ExtensionLoader->>Editor: Return Extensions List
sequenceDiagram
participant Editor
participant SlashCommandHandler as "Slash Command Handler"
Editor->>SlashCommandHandler: Request filtered command sections
SlashCommandHandler->>SlashCommandHandler: Build internalAdditionalOptions (conditionally for "image")
SlashCommandHandler->>SlashCommandHandler: Merge external options with internal ones
SlashCommandHandler->>Editor: Return ordered command sections
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (11)
⏰ Context from checks skipped due to timeout of 90000ms (2)
🔇 Additional comments (22)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Description
This PR adds the functionality to disable the editor image extension.
Type of Change
Summary by CodeRabbit