Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 0 additions & 1 deletion apps/web/__tests__/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export function getRule(instructions: string, actions: Action[] = []) {
userId: "userId",
createdAt: new Date(),
updatedAt: new Date(),
automate: false,
runOnThreads: false,
groupId: null,
from: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function AddRuleDialog() {
Add Rule
</Button>
</DialogTrigger>
<DialogContent className="max-w-4xl">
<DialogContent className="max-w-5xl">
<RulesPrompt />
</DialogContent>
</Dialog>
Expand Down
16 changes: 0 additions & 16 deletions apps/web/app/(app)/[emailAccountId]/assistant/AssistantTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,17 @@
import { XIcon } from "lucide-react";
import { useCallback } from "react";
import { useQueryState } from "nuqs";
import useSWR from "swr";
import { History } from "@/app/(app)/[emailAccountId]/assistant/History";
import { Pending } from "@/app/(app)/[emailAccountId]/assistant/Pending";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import { Rules } from "@/app/(app)/[emailAccountId]/assistant/Rules";
import { Process } from "@/app/(app)/[emailAccountId]/assistant/Process";
import { RulesPrompt } from "@/app/(app)/[emailAccountId]/assistant/RulesPrompt";
import { TabsToolbar } from "@/components/TabsToolbar";
import { TypographyP } from "@/components/Typography";
import { RuleTab } from "@/app/(app)/[emailAccountId]/assistant/RuleTab";
import type { GetPendingRulesResponse } from "@/app/api/rules/pending/route";
import { Button } from "@/components/ui/button";

export function AssistantTabs() {
const { data: pendingData } =
useSWR<GetPendingRulesResponse>("/api/rules/pending");

const hasPendingRule = pendingData?.hasPending ?? false;

return (
<div className="flex h-full flex-col overflow-hidden">
<Tabs defaultValue="empty" className="flex h-full flex-col">
Expand All @@ -32,9 +24,6 @@ export function AssistantTabs() {
<TabsTrigger value="rules">Rules</TabsTrigger>
<TabsTrigger value="test">Test</TabsTrigger>
<TabsTrigger value="history">History</TabsTrigger>
{hasPendingRule && (
<TabsTrigger value="pending">Pending</TabsTrigger>
)}
</TabsList>
</div>
<CloseArtifactButton />
Expand All @@ -61,11 +50,6 @@ export function AssistantTabs() {
<TabsContent value="history" className="content-container pb-4">
<History />
</TabsContent>
{hasPendingRule && (
<TabsContent value="pending" className="content-container pb-4">
<Pending />
</TabsContent>
)}
{/* Set via search params. Not a visible tab. */}
<TabsContent value="rule" className="content-container pb-4">
<RuleTab />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,6 @@ export function CreatedRulesContent({
<div className="space-y-2">
<div className="flex items-center justify-between">
<h4 className="font-medium text-base">{rule.name}</h4>
{!rule.automate && (
<Badge color="yellow">Requires Approval</Badge>
)}
</div>

<div className="text-sm">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Link from "next/link";
import { ExternalLinkIcon, EyeIcon } from "lucide-react";
import type { PendingExecutedRules } from "@/app/api/user/planned/route";
import type { PlanHistoryResponse } from "@/app/api/user/planned/history/route";
import { decodeSnippet } from "@/utils/gmail/decode";
import { ActionBadgeExpanded } from "@/components/PlanBadge";
import { Tooltip } from "@/components/Tooltip";
Expand Down Expand Up @@ -68,7 +68,7 @@ export function RuleCell({
message,
setInput,
}: {
rule: PendingExecutedRules["executedRules"][number]["rule"];
rule: PlanHistoryResponse["executedRules"][number]["rule"];
status: ExecutedRuleStatus;
reason?: string | null;
message: ParsedMessage;
Expand Down Expand Up @@ -147,7 +147,7 @@ export function ActionItemsCell({
actionItems,
provider,
}: {
actionItems: PendingExecutedRules["executedRules"][number]["actionItems"];
actionItems: PlanHistoryResponse["executedRules"][number]["actionItems"];
provider: string;
}) {
return (
Expand Down
275 changes: 0 additions & 275 deletions apps/web/app/(app)/[emailAccountId]/assistant/Pending.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ export function RuleDialog({
type: ActionType.LABEL,
},
],
automate: true,
runOnThreads: true,
conditionalOperator: LogicalOperator.AND,
...initialRule,
Expand Down
Loading
Loading