Skip to content

Commit

Permalink
Merge pull request #66 from auth0-lab/remove_reminder_tasks
Browse files Browse the repository at this point in the history
remove all Google Task related code
  • Loading branch information
jfromaniello authored Oct 10, 2024
2 parents f02ff5e + 58c3dc7 commit 9cf72a1
Show file tree
Hide file tree
Showing 12 changed files with 7 additions and 291 deletions.
2 changes: 0 additions & 2 deletions app/actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { saveAIStateToStore } from "@/lib/db";
import { confirmPurchase } from "@/llm/actions/confirm-purchase";
import { continueConversation } from "@/llm/actions/continue-conversation";
import { checkEnrollment } from "@/llm/actions/newsletter";
import { createGoogleTask } from "@/llm/actions/reminders";
import * as serialization from "@/llm/components/serialization";
import { ClientMessage, ServerMessage } from "@/llm/types";
import { getUser as fetchUser } from "@/sdk/auth0/mgmt";
Expand All @@ -24,7 +23,6 @@ export const AI = (p: Props) => {
actions: {
continueConversation,
confirmPurchase,
createGoogleTask,
checkEnrollment,
},
onSetAIState: async ({ state, done }) => {
Expand Down
9 changes: 2 additions & 7 deletions components/auth0/user-profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,12 @@ export default function UserProfile({ user }: { user: KeyValueMap }) {
{currentItem === "connected-accounts" && (
<ConnectedAccounts
availableAccounts={[
// {
// connection: "box",
// displayName: "Box",
// api: "box-write",
// description: "Upload files to your Box account.",
// },
{
connection: "google-oauth2",
displayName: "Google",
api: "google-all",
description: "Create and manage events and tasks in your Google Calendar.",
description:
"Create and manage events in your Google Calendar.",
},
]}
allowLink={true}
Expand Down
4 changes: 4 additions & 0 deletions database/market0/V014__remove_reminders.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
DROP FUNCTION "update_reminders_updated_at";

DROP TABLE "reminders";

1 change: 0 additions & 1 deletion lib/db/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ export const getAIStateFromStore = async ({ conversationID }: { conversationID:
return result[0] ? (result[0] as Conversation) : { messages: [], ownerID: "" };
};

export * as reminders from "./reminders";
export * as conditionalPurchases from "./conditional-purchases";
export * as userUsage from "./userUsage";
export * as documents from "./documents";
Expand Down
75 changes: 0 additions & 75 deletions lib/db/reminders.ts

This file was deleted.

5 changes: 0 additions & 5 deletions lib/examples.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,4 @@ export const menuItems = [
message: "Buy 10 ZEKO when P/E ratio is above 0",
icon: <CartIcon />,
},
{
id: generateId(),
message: "Remind me to buy ZEKO in two weeks",
icon: <ReminderIcon />,
},
];
2 changes: 0 additions & 2 deletions llm/actions/continue-conversation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import checkSubscription from "@/llm/tools/newsletter/check-subscription";
import setSubscription from "@/llm/tools/newsletter/set-subscription";
import setEmployeer from "@/llm/tools/profile/set-employeer";
import setProfileAttributes from "@/llm/tools/profile/set-profile-attributes";
import addReminder from "@/llm/tools/schedule/add-reminder";
import getEvents from "@/llm/tools/schedule/get-events";
import addConditionalPurchase from "@/llm/tools/trading/add-conditional-purchase";
import getForecasts from "@/llm/tools/trading/get-forecasts";
Expand Down Expand Up @@ -87,7 +86,6 @@ export async function continueConversation(
},
tools: await composeTools(
showStockPurchaseUI,
addReminder,
addConditionalPurchase,
showStockPrice,
showCurrentPositions,
Expand Down
61 changes: 0 additions & 61 deletions llm/actions/reminders.ts

This file was deleted.

81 changes: 0 additions & 81 deletions llm/components/reminder.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions llm/components/serialization.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Documents } from "./documents";
import { Events } from "./events";
import { FormattedText } from "./FormattedText";
import { Positions } from "./positions";
import { Reminder } from "./reminder";
import { SimpleMessage } from "./simple-message";
import { Stock } from "./stock";
import { StockPurchase } from "./stock-purchase";
Expand All @@ -17,7 +16,6 @@ export const components = {
Stocks,
SimpleMessage,
StockPurchase,
Reminder,
ConditionalPurchase,
FormattedText,
};
Expand Down
48 changes: 0 additions & 48 deletions llm/tools/schedule/add-reminder.tsx

This file was deleted.

8 changes: 1 addition & 7 deletions sdk/auth0/3rd-party-apis/index.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
import { getSession } from "@auth0/nextjs-auth0";

import * as google from "./providers/google";
import * as box from "./providers/box";
import * as google from "./providers/google";

const PROVIDERS_APIS = [
{
name: "google",
api: "google-calendar",
requiredScopes: ["https://www.googleapis.com/auth/calendar.events"],
},
{
name: "google",
api: "google-tasks",
requiredScopes: ["https://www.googleapis.com/auth/tasks"],
},
{
name: "google",
api: "google-all",
requiredScopes: [
"https://www.googleapis.com/auth/calendar.events",
"https://www.googleapis.com/auth/tasks",
],
},
{
Expand Down

0 comments on commit 9cf72a1

Please sign in to comment.