Skip to content

Commit e12c82b

Browse files
Use the Kapa AI SDK instead of the Kapa AI widget (#2113)
* Install the kapa sdk * WIP using the SDK for the Kapa Ask AI widget * Removes old kapa from root * Now rendering everything inside the dialog component * Fixes min-height of dialog content * Remove kapa from root * prevents kapa using reCaptcha * Adds more functionailty with temporary UI placement for now * Reset conversation button * Adds a new sparkle list icon * Adds some example questions as a blank state * Animate in the example questions * use “marked” package to render markdown * Improve some animations * Submit a question from the URL param * adds custom scroll bar styling * fixes modal to correct height after re-opening it * Add button to stop generating answer mid-stream * Adds buttons states to show submitting, generating, submittable * Adds a helpfull sentence in the blank state * Show a message if the chat returns an error * Adds reset chat and feedback buttons to the bottom of an answer * Makes sure you can give feedback in the different states of chat * Adds a suble background to the dialog * Fix a button inside button error * Improve the shortcut esc key on dialog and sheet component * Fix classname error * organize imports * Use our custom focus-visible * Move the Tooltip for the button into the AskAI component * Improved error message * Organize imports * Animated the modal gradient * Small layout improvements * Adds most asked questions from Kapa * border glow tweak * AskAI component is now a hook that can take a question * remove kapa script * Add a delay before the modal opens when usign the URL params * Remove old component * Update to the latest Kapa version * Rephrased error message * Use correct types for conversation * Fixed types for addFeedback * Adds DOMPurify package * removed unused const * Removed unnecessary platform specification * Reset the timeout when the ai panel pops up Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Fix for coderabbit bad commit * Clean up imports --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 808c299 commit e12c82b

File tree

10 files changed

+733
-189
lines changed

10 files changed

+733
-189
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
export function SparkleListIcon({ className }: { className?: string }) {
2+
return (
3+
<svg className={className} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
4+
<path
5+
fillRule="evenodd"
6+
clipRule="evenodd"
7+
d="M17 11C17.4304 11 17.8126 11.2754 17.9487 11.6838L18.4743 13.2607C18.6734 13.858 19.142 14.3266 19.7393 14.5257L21.3162 15.0513C21.7246 15.1874 22 15.5696 22 16C22 16.4304 21.7246 16.8126 21.3162 16.9487L19.7393 17.4743C19.142 17.6734 18.6734 18.142 18.4743 18.7393L17.9487 20.3162C17.8126 20.7246 17.4304 21 17 21C16.5696 21 16.1874 20.7246 16.0513 20.3162L15.5257 18.7393C15.3266 18.142 14.858 17.6734 14.2607 17.4743L12.6838 16.9487C12.2754 16.8126 12 16.4304 12 16C12 15.5696 12.2754 15.1874 12.6838 15.0513L14.2607 14.5257C14.858 14.3266 15.3266 13.858 15.5257 13.2607L16.0513 11.6838C16.1874 11.2754 16.5696 11 17 11Z"
8+
fill="currentColor"
9+
/>
10+
<rect x="2" y="6" width="20" height="2" rx="1" fill="currentColor" />
11+
<rect x="2" y="15" width="7" height="2" rx="1" fill="currentColor" />
12+
</svg>
13+
);
14+
}

0 commit comments

Comments
 (0)