Skip to content

Commit

Permalink
Merge pull request #3435 from dfinity/rei/ai-modal-fix
Browse files Browse the repository at this point in the history
fix ai modal opening multiple times
  • Loading branch information
reigj1 authored Sep 6, 2024
2 parents 03d08ac + fbaa551 commit eb37e01
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
19 changes: 18 additions & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,24 @@ const config = {
markdown: {
mermaid: true,
},
scripts: [],
scripts: [
{
src: "https://widget.kapa.ai/kapa-widget.bundle.js",
"data-website-id": "08910249-851f-465b-b60f-238d84e1afc1",
"data-project-name": "Internet Computer",
"data-project-color": "#172234",
"data-project-logo":
"https://s3.coinmarketcap.com/static-gravity/image/2fb1bc84c1494178beef0822179d137d.png",
"data-modal-override-open-class": "ask-ai-widget-trigger",
"data-modal-ask-ai-input-placeholder":
"Ask me a question about the Internet Computer Protocol",
"data-modal-example-questions":
"What is the ICP token?, How is the Internet Computer governed?, How do I start building fully on-chain Web3?",
"data-modal-disclaimer":
" This LLM provides responses are generated automatically and may be inaccurate or outdated. Please take care to verify or validate any responses before making any critical decisions.",
async: true,
},
],
plugins: [
"docusaurus-plugin-sass",
customWebpack,
Expand Down
18 changes: 2 additions & 16 deletions src/components/DocsHome/AskAIWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,8 @@ export function AskAIWidget() {
(isDocsPage || currentPath === "/") && (
// AI chatbot integration via Kapa
<>
<Head>
<script
defer
src="https://widget.kapa.ai/kapa-widget.bundle.js"
data-website-id="08910249-851f-465b-b60f-238d84e1afc1"
data-project-name="Internet Computer"
data-project-color="#172234"
data-project-logo="https://s3.coinmarketcap.com/static-gravity/image/2fb1bc84c1494178beef0822179d137d.png"
data-button-hide="true"
data-modal-override-open-class="ask-ai-widget-trigger"
data-modal-ask-ai-input-placeholder="Ask me a question about the Internet Computer Protocol"
data-modal-example-questions="What is the ICP token?, How is the Internet Computer governed?, How do I start building fully on-chain Web3?"
data-modal-disclaimer="This LLM provides responses are generated automatically and may be inaccurate or outdated. Please take care to verify or validate any responses before making any critical decisions."
/>
<style>{css}</style>
</Head>
{" "}
<style>{css}</style>
<button
className={`relative ask-ai-widget-trigger button-white button-fancy-ai border-none transition-all
bg-[radial-gradient(67.52%_167.71%_at_50.38%_-41.67%,#EA2B7B_0%,#3B00B9_100%)]
Expand Down

0 comments on commit eb37e01

Please sign in to comment.