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

fix: Remove the unused function context UI #300

Merged
merged 1 commit into from
Dec 13, 2024
Merged
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
46 changes: 8 additions & 38 deletions app/components/chat/ToolContextButton.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { useEffect, useState } from "react";
import { SquareFunction } from "lucide-react";
import { client } from "@/client/client";
import {
Sheet,
SheetContent,
Expand All @@ -8,21 +7,16 @@ import {
SheetTitle,
SheetTrigger,
} from "@/components/ui/sheet";
import { Button } from "../ui/button";
import { Textarea } from "../ui/textarea";
import { client } from "@/client/client";
import { useAuth } from "@clerk/nextjs";
import { SquareFunction } from "lucide-react";
import { useEffect, useState } from "react";
import toast from "react-hot-toast";
import { Label } from "../ui/label";
import { Input } from "../ui/input";
import {
Card,
CardContent,
CardFooter,
CardHeader,
CardTitle,
} from "../ui/card";
import { ReadOnlyJSON } from "../read-only-json";
import { Button } from "../ui/button";
import { Card, CardContent, CardHeader, CardTitle } from "../ui/card";
import { Input } from "../ui/input";
import { Label } from "../ui/label";
import { Textarea } from "../ui/textarea";

interface ToolContextButtonProps {
clusterId: string;
Expand Down Expand Up @@ -160,30 +154,6 @@ const ToolContextButton: React.FC<ToolContextButtonProps> = ({
</SheetDescription>
</SheetHeader>
<div className="mt-6 space-y-6">
<Card>
<CardHeader>
<CardTitle>Context</CardTitle>
</CardHeader>
<CardContent>
<div className="space-y-2">
<Label htmlFor="context">Context</Label>
<p className="text-sm text-muted-foreground">
This context is used to guide the tools action globally.
</p>
<Textarea
id="context"
value={context}
onChange={(e) => setContext(e.target.value)}
placeholder="Enter function context here..."
rows={10}
/>
</div>
</CardContent>
<CardFooter className="flex justify-end">
<Button onClick={updateContext}>Save Context</Button>
</CardFooter>
</Card>

{functionDetails && (
<Card>
<CardHeader>
Expand Down
Loading