Skip to content

Commit

Permalink
fix: change help button and add docs faq link (CopilotKit#1166)
Browse files Browse the repository at this point in the history
  • Loading branch information
ranst91 authored Dec 30, 2024
1 parent 8386e7e commit 21656f2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions CopilotKit/examples/next-openai/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export default function WaterBnb() {
const copilotKitProps: Partial<React.ComponentProps<typeof CopilotKit>> = {
runtimeUrl,
publicApiKey: publicApiKey || undefined,
showDevConsole: true,
};

return (
Expand Down
14 changes: 12 additions & 2 deletions CopilotKit/packages/react-ui/src/components/help-modal/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,11 @@ export function CopilotKitHelpModal() {
const HelpButton = () => (
<button
onClick={() => setShowHelpModal(true)}
className="p-2 bg-transparent rounded-full shadow-lg hover:shadow-xl transition-shadow duration-300 focus:outline-none focus:ring-2 focus:ring-blue-500"
style={{ width: "50px", height: "30px", marginRight: "0.25rem" }}
className="text-sm p-0 bg-transparent rounded border border-blue-500"
aria-label="Open Help"
>
<LifeBuoyIcon />
Help
</button>
);

Expand Down Expand Up @@ -79,6 +80,15 @@ export function CopilotKitHelpModal() {
<h2 className="text-2xl font-bold">Help Options</h2>
</div>
<div className="space-y-4 mb-4">
<div className="block w-full text-center py-2 px-4 bg-blue-500 text-white rounded hover:bg-blue-600 transition duration-150 text-sm">
<a
href="https://docs.copilotkit.ai/coagents/troubleshooting/common-issues"
target="_blank"
rel="noopener noreferrer"
>
Visit the Troubleshooting and FAQ section in the docs
</a>
</div>
<div className="block w-full text-center py-2 px-4 bg-blue-500 text-white rounded hover:bg-blue-600 transition duration-150 text-sm">
<a
href="https://go.copilotkit.ai/dev-console-support-discord"
Expand Down

0 comments on commit 21656f2

Please sign in to comment.