-
Notifications
You must be signed in to change notification settings - Fork 0
[WIP] feat: ai chat plugin #11
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
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
2bf8805 to
8722cb6
Compare
packages/better-stack/src/plugins/ai-chat/client/components/chat-interface.tsx
Outdated
Show resolved
Hide resolved
packages/better-stack/src/plugins/ai-chat/client/components/chat-input.tsx
Outdated
Show resolved
Hide resolved
packages/better-stack/src/plugins/ai-chat/client/components/chat-input.tsx
Show resolved
Hide resolved
packages/better-stack/src/plugins/ai-chat/client/components/chat-input.tsx
Outdated
Show resolved
Hide resolved
packages/better-stack/src/plugins/ai-chat/client/components/chat-input.tsx
Show resolved
Hide resolved
| ## Available Documentation Pages | ||
| ${pages.map((page) => `- ${page.data.title}: /docs${page.url}.mdx`).join('\n')} | ||
| ${pages.map((page) => `- ${page.data.title}: /docs${page.url==="/" ? "index" : page.url}.mdx`).join('\n')} |
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.
Bug: Malformed URL generated for root documentation page
When page.url equals "/", the template literal /docs${page.url==="/" ? "index" : page.url}.mdx produces /docsindex.mdx instead of /docs/index.mdx. The ternary correctly substitutes "index" for the root page, but the template is missing the / separator before the substitution. Non-root pages work correctly because their URLs like "/installation" already start with /. The correct template would be /docs/${page.url==="/" ? "index" : page.url.slice(1)}.mdx or similar to ensure consistent slash handling.
Changes in this PR:
Note
Extracts a shared markdown renderer and UI primitives into the UI package, updates the blog plugin to use them with new attribution, and sets OPENAI_API_KEY for e2e tasks.
@workspace/ui/components/markdown-contentwith math support, syntax highlighting, code block toolbar/copy, heading anchors, task lists, and pluggableLinkComponent/ImageComponent; includesmarkdown-content.cssand export inpackages/ui.dropdown-menu,scroll-area,sheet, andtooltipcomponents.BetterStackAttributioncomponent.MarkdownContent(imports styles and highlight theme).BetterStackAttribution.turbo.json: AddsOPENAI_API_KEYtoe2e:*task env.packages/uidependencies/peer deps to support markdown rendering and styling.Written by Cursor Bugbot for commit 9921177. This will update automatically on new commits. Configure here.