-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Mintlify - new components #18519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mintlify - new components #18519
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
WalkthroughAdds three Mintlify actions (chat-with-assistant, search-documentation, trigger-update), expands the Mintlify app with a public Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant U as User
participant A as Action (Trigger Update)
participant App as mintlify.app
participant HTTP as HTTP Client
participant API as Mintlify API
U->>A: provide `projectId` / $ context
A->>App: triggerUpdate({ projectId, $ })
App->>HTTP: POST /admin/projects/{projectId}/update (admin_api_key)
HTTP->>API: Request
API-->>HTTP: Response
HTTP-->>App: Result
App-->>A: Result
A-->>U: $summary "Update triggered"
sequenceDiagram
autonumber
participant U as User
participant A as Action (Search Documentation)
participant App as mintlify.app
participant HTTP as HTTP Client
participant API as Mintlify API
U->>A: query, pageSize, version?, language?
A->>App: searchDocumentation({ domain, data })
App->>HTTP: POST /assistant/{domain}/search (assistant_api_key)
HTTP->>API: { query, pageSize, filter? }
API-->>HTTP: Results[]
HTTP-->>App: Results[]
App-->>A: Results[]
A-->>U: $summary "Found N results"
rect rgba(230,245,255,0.4)
note right of A: filter built if version or language provided
end
sequenceDiagram
autonumber
participant U as User
participant A as Action (Chat with Assistant)
participant App as mintlify.app
participant HTTP as HTTP Client
participant API as Mintlify API
U->>A: message, fp, domain
A->>App: chatWithAssistant({ domain, data })
App->>HTTP: POST /assistant/{domain}/message (assistant_api_key)
HTTP->>API: { fp, messages:[{ id, role:"user", content, parts:[{type:"text", text}] }] }
API-->>HTTP: Assistant response
HTTP-->>App: Response
App-->>A: Response
A-->>U: $summary with response.id
note right of A: message `id` generated with `uuidv4`
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
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. Comment |
There was a problem hiding this 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 (1)
components/mintlify/actions/search-documentation/search-documentation.mjs (1)
53-58
: Simplify filter construction to avoid undefined values.The current logic includes both
version
andlanguage
in the filter object even when only one is provided, which sends undefined values to the API. Consider constructing the filter more precisely.Apply this diff to only include defined filter fields:
- filter: this.version || this.language - ? { - version: this.version, - language: this.language, - } - : undefined, + filter: this.version || this.language + ? { + ...(this.version && { version: this.version }), + ...(this.language && { language: this.language }), + } + : undefined,
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
components/mintlify/actions/chat-with-assistant/chat-with-assistant.mjs
(1 hunks)components/mintlify/actions/search-documentation/search-documentation.mjs
(1 hunks)components/mintlify/actions/trigger-update/trigger-update.mjs
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- components/mintlify/actions/trigger-update/trigger-update.mjs
🧰 Additional context used
🧬 Code graph analysis (2)
components/mintlify/actions/search-documentation/search-documentation.mjs (2)
components/mintlify/actions/chat-with-assistant/chat-with-assistant.mjs (1)
response
(35-54)components/mintlify/actions/trigger-update/trigger-update.mjs (1)
response
(23-26)
components/mintlify/actions/chat-with-assistant/chat-with-assistant.mjs (2)
components/mintlify/actions/search-documentation/search-documentation.mjs (1)
response
(47-60)components/mintlify/actions/trigger-update/trigger-update.mjs (1)
response
(23-26)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: pnpm publish
- GitHub Check: Verify TypeScript components
- GitHub Check: Publish TypeScript components
- GitHub Check: Lint Code Base
🔇 Additional comments (8)
components/mintlify/actions/chat-with-assistant/chat-with-assistant.mjs (4)
1-2
: LGTM! Import pattern follows ESM best practices.The named import syntax for uuid v4 is correct and aligns with the recommended ESM pattern for the uuid package.
4-14
: LGTM! Metadata and annotations are appropriate.The action metadata correctly reflects the read-only nature of the chat operation with appropriate hints for the platform.
15-33
: LGTM! Props are well-defined.The props include appropriate metadata with clear labels and descriptions. All required fields are correctly specified.
38-54
: Message structure aligns with Mintlify API spec. No changes needed.components/mintlify/actions/search-documentation/search-documentation.mjs (4)
1-1
: LGTM!Import is clean and correct.
3-13
: LGTM! Metadata and annotations are appropriate.The action metadata correctly reflects the read-only search operation with appropriate hints.
14-45
: LGTM! Props are well-structured.The props include a good mix of required and optional parameters with clear labels and helpful descriptions.
62-62
: No action needed —response
is always an array. The Mintlify API’s “Search documentation” endpoint returns a JSON array (even if empty), soresponse.length
will always be defined.
/approve |
* upstream/master: Adding app scaffolding for stackby Airtop new components (PipedreamHQ#18637) Sinch - new components (PipedreamHQ#18635) Mintlify - new components (PipedreamHQ#18519) Linear App - updates and new components (PipedreamHQ#18606) Merging pull request PipedreamHQ#18622 Adding app scaffolding for airtop
Resolves #17477
Summary by CodeRabbit
New Features
Chores