docs: added kapa logo + link to mcp server (#14005)
This commit is contained in:
@@ -1,27 +1,36 @@
|
||||
import React from "react"
|
||||
import clsx from "clsx"
|
||||
import { Kbd } from "../../../Kbd"
|
||||
import { KapaIcon } from "../../../Icons/Kapa"
|
||||
import { Tooltip } from "../../../Tooltip"
|
||||
|
||||
export const AiAssistantChatWindowFooter = () => {
|
||||
return (
|
||||
<div
|
||||
className={clsx(
|
||||
"bg-medusa-bg-component border-t border-medusa-border-base",
|
||||
"flex items-center justify-end gap-docs_0.75 text-compact-x-small",
|
||||
"flex items-center justify-between gap-docs_0.75 text-compact-x-small",
|
||||
"py-docs_0.75 px-docs_1"
|
||||
)}
|
||||
>
|
||||
<span className="text-medusa-fg-muted">Chat is cleared on refresh</span>
|
||||
<span className="h-docs_0.75 w-px bg-medusa-border-base"></span>
|
||||
<div className="flex items-center gap-docs_0.5">
|
||||
<span className="text-medusa-fg-subtle">Line break</span>
|
||||
<div className="flex items-center gap-[5px]">
|
||||
<Kbd className="bg-medusa-bg-field-component border-medusa-border-strong w-[18px] h-[18px] inline-block p-0">
|
||||
⇧
|
||||
</Kbd>
|
||||
<Kbd className="bg-medusa-bg-field-component border-medusa-border-strong w-[18px] h-[18px] inline-block p-0">
|
||||
↵
|
||||
</Kbd>
|
||||
<Tooltip text="Powered by Kapa.ai">
|
||||
<a href="https://kapa.ai" target="_blank" rel="noreferrer">
|
||||
<KapaIcon className="text-medusa-fg-disabled hover:text-medusa-fg-muted transition-colors" />
|
||||
</a>
|
||||
</Tooltip>
|
||||
<div className="flex items-center justify-end gap-docs_0.75">
|
||||
<span className="text-medusa-fg-muted">Chat is cleared on refresh</span>
|
||||
<span className="h-docs_0.75 w-px bg-medusa-border-base"></span>
|
||||
<div className="flex items-center gap-docs_0.5">
|
||||
<span className="text-medusa-fg-subtle">Line break</span>
|
||||
<div className="flex items-center gap-[5px]">
|
||||
<Kbd className="bg-medusa-bg-field-component border-medusa-border-strong w-[18px] h-[18px] inline-block p-0">
|
||||
⇧
|
||||
</Kbd>
|
||||
<Kbd className="bg-medusa-bg-field-component border-medusa-border-strong w-[18px] h-[18px] inline-block p-0">
|
||||
↵
|
||||
</Kbd>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -158,7 +158,7 @@ export const AiAssistantChatWindowInput = ({
|
||||
placeholder="Ask me a question about Medusa..."
|
||||
disabled={loading}
|
||||
/>
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="flex items-center justify-end gap-docs_1">
|
||||
<Tooltip
|
||||
tooltipChildren={
|
||||
<span>
|
||||
|
||||
@@ -5,10 +5,15 @@ import { SearchSuggestionType } from "../../Search/Suggestions"
|
||||
import { SearchHitGroupName } from "../../Search/Hits/GroupName"
|
||||
import { SearchSuggestionItem } from "../../Search/Suggestions/Item"
|
||||
import { useChat } from "@kapaai/react-sdk"
|
||||
import { Link } from "../../Link"
|
||||
import { useSiteConfig } from "../../../providers"
|
||||
|
||||
type AiAssistantSuggestionsProps = React.AllHTMLAttributes<HTMLDivElement>
|
||||
|
||||
export const AiAssistantSuggestions = (props: AiAssistantSuggestionsProps) => {
|
||||
const {
|
||||
config: { baseUrl },
|
||||
} = useSiteConfig()
|
||||
const { submitQuery } = useChat()
|
||||
const suggestions: SearchSuggestionType[] = [
|
||||
{
|
||||
@@ -34,6 +39,18 @@ export const AiAssistantSuggestions = (props: AiAssistantSuggestionsProps) => {
|
||||
|
||||
return (
|
||||
<div {...props}>
|
||||
<span className="text-medusa-fg-muted text-compact-small px-docs_0.5 py-docs_0.75 block">
|
||||
Ask any questions about Medusa. Get help with your development.
|
||||
<br />
|
||||
You can also use the{" "}
|
||||
<Link
|
||||
href={`${baseUrl}/learn/introduction/build-with-llms-ai#mcp-remote-server`}
|
||||
variant="content"
|
||||
>
|
||||
Medusa MCP server
|
||||
</Link>{" "}
|
||||
in Cursor, VSCode, etc...
|
||||
</span>
|
||||
{suggestions.map((suggestion, index) => (
|
||||
<React.Fragment key={index}>
|
||||
<SearchHitGroupName name={suggestion.title} />
|
||||
|
||||
Reference in New Issue
Block a user