From d9ebcccb2da89c733acc3c4ee6bee317e465bebd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cnora?= Date: Mon, 19 Aug 2024 15:07:46 -0400 Subject: [PATCH] chore: replace assistant and add beta language --- cypress/integration/api/ai.spec.ts | 22 +++++++++---------- .../src/components/ContactUsMenu.tsx | 8 +++---- .../assistant/AssistantEmptyState.tsx | 5 +++++ .../site-wrapper/site-header/index.tsx | 4 ++-- 4 files changed, 22 insertions(+), 17 deletions(-) diff --git a/cypress/integration/api/ai.spec.ts b/cypress/integration/api/ai.spec.ts index f402b3416f..4c195b63a2 100644 --- a/cypress/integration/api/ai.spec.ts +++ b/cypress/integration/api/ai.spec.ts @@ -1,11 +1,11 @@ -// context("POST /api/ai", () => { -// it("gets an ai response for a given prompty", () => { -// cy.request("POST", "/api/ai", { -// prompt: "How do I create a primary button", -// secret: Cypress.env("OPENAI_API_SECRET"), -// }).then((response) => { -// expect(response.status).to.eq(200); -// expect(response.body).length.to.be.greaterThan(1); -// }); -// }); -// }); +context("POST /api/ai", () => { + it("gets an ai response for a given prompt", () => { + cy.request("POST", "/api/ai", { + prompt: "How do I create a primary button", + secret: Cypress.env("OPENAI_API_SECRET"), + }).then((response) => { + expect(response.status).to.eq(200); + expect(response.body).length.to.be.greaterThan(1); + }); + }); +}); diff --git a/packages/paste-website/src/components/ContactUsMenu.tsx b/packages/paste-website/src/components/ContactUsMenu.tsx index 1cbc036ccf..6d9d367e90 100644 --- a/packages/paste-website/src/components/ContactUsMenu.tsx +++ b/packages/paste-website/src/components/ContactUsMenu.tsx @@ -32,9 +32,9 @@ export const ContactUsMenu: React.FC = () => { }) } > - + - + { handleClick("Contact Us", "click-ask-question", "Ask question")} > Ask a question handleClick("Contact Us", "click-request-feature", "Request feature")} > Request a feature diff --git a/packages/paste-website/src/components/assistant/AssistantEmptyState.tsx b/packages/paste-website/src/components/assistant/AssistantEmptyState.tsx index 1a87ffc05d..b0e570b3b7 100644 --- a/packages/paste-website/src/components/assistant/AssistantEmptyState.tsx +++ b/packages/paste-website/src/components/assistant/AssistantEmptyState.tsx @@ -3,6 +3,7 @@ import { Button } from "@twilio-paste/button"; import { Heading } from "@twilio-paste/heading"; import { Paragraph } from "@twilio-paste/paragraph"; import Image from "next/image"; +import Link from "next/link"; import * as React from "react"; import { Logo } from "../../assets/Logo"; @@ -33,6 +34,10 @@ export const AssistantEmptyState: React.FC<{ onCannedThreadCreation: (message: s Create different threads to interact with PasteBot, and revisit your conversations. It can help with writing Code, understanding component guidelines and Design guidelines. + + PasteBot is an experimental feature. Share your feedback with the Paste team on{" "} + Github Discussions. + diff --git a/packages/paste-website/src/components/site-wrapper/site-header/index.tsx b/packages/paste-website/src/components/site-wrapper/site-header/index.tsx index 662881aa2e..6d6c15ce3e 100644 --- a/packages/paste-website/src/components/site-wrapper/site-header/index.tsx +++ b/packages/paste-website/src/components/site-wrapper/site-header/index.tsx @@ -8,7 +8,7 @@ import "react-github-button/assets/style.css"; import { PASTE_DOCS_TOPBAR } from "../../../constants"; import { ContactUsMenu } from "../../ContactUsMenu"; -// import { AssistantLink } from "./AssistantLink"; +import { AssistantLink } from "./AssistantLink"; import { DarkModeToggle } from "./DarkModeToggle"; import { FigmaButton } from "./FigmaButton"; import { HamburgerToggle } from "./HamburgerToggle"; @@ -45,7 +45,7 @@ export const SiteHeader: React.FC<{ - {/* TODO: replace when AI connection is fixed */} +