Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: replace assistant and add beta language #4038

Merged
merged 3 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions cypress/integration/api/ai.spec.ts
Original file line number Diff line number Diff line change
@@ -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);
});
});
});
8 changes: 4 additions & 4 deletions packages/paste-website/src/components/ContactUsMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ export const ContactUsMenu: React.FC = () => {
})
}
>
<ProductSupportIcon decorative={false} title="Contact us" size="sizeIcon40" />
<ProductSupportIcon decorative={false} title="Get help" size="sizeIcon40" />
</MenuButton>
<Menu {...menu} aria-label="Contact us">
<Menu {...menu} aria-label="Get help">
<MenuItem
{...menu}
href="/assistant"
Expand All @@ -44,14 +44,14 @@ export const ContactUsMenu: React.FC = () => {
</MenuItem>
<MenuItem
{...menu}
href="https://github.com/twilio-labs/paste/discussions"
href="https://github.com/twilio-labs/paste/discussions/new?category=general "
onClick={() => handleClick("Contact Us", "click-ask-question", "Ask question")}
>
Ask a question
</MenuItem>
<MenuItem
{...menu}
href="https://github.com/twilio-labs/paste/discussions"
href="https://github.com/twilio-labs/paste/discussions/new?category=ideas"
Comment on lines +47 to +54
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: love the use of defaulting category 👏

onClick={() => handleClick("Contact Us", "click-request-feature", "Request feature")}
>
Request a feature
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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.
</Paragraph>
<Paragraph>
PasteBot is an experimental feature. Share your feedback with the Paste team on{" "}
<Link href="https://github.com/twilio-labs/paste/discussions/new/choose">Github Discussions</Link>.
</Paragraph>
</Box>
<Image src={EmptyDoSomething} width={400} aria-hidden="true" alt="" priority />
</Box>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -45,7 +45,7 @@ export const SiteHeader: React.FC<{
<Box data-cy="paste-docsearch-container" id="paste-docs-search-input">
<SiteHeaderSearch />
</Box>
{/* <AssistantLink /> TODO: replace when AI connection is fixed */}
<AssistantLink />
<ContactUsMenu />
<DarkModeToggle />
<FigmaButton />
Expand Down
Loading