Skip to content

Commit 654b68d

Browse files
committed
cleanup
1 parent c8c0ce3 commit 654b68d

File tree

2 files changed

+26
-34
lines changed

2 files changed

+26
-34
lines changed

src/toolkits/toolkits/twitter/tools/profile/client.tsx

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import React from "react";
22
import { createClientTool } from "@/toolkits/create-tool";
33
import { getUserProfileTool } from "./base";
44
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
5-
import { Card, CardContent, CardHeader } from "@/components/ui/card";
65
import { Separator } from "@/components/ui/separator";
76
import { BadgeCheck } from "lucide-react";
87

@@ -15,8 +14,8 @@ export const getUserProfileToolConfigClient = createClientTool(
1514
</div>
1615
),
1716
ResultComponent: ({ result }) => (
18-
<Card className="w-full">
19-
<CardHeader className="flex flex-row items-center space-y-0 pb-2">
17+
<div className="w-full">
18+
<div className="flex flex-row items-center space-y-0 pb-2">
2019
<Avatar className="h-12 w-12">
2120
<AvatarImage
2221
src={result.user.data.profile_image_url ?? undefined}
@@ -47,8 +46,8 @@ export const getUserProfileToolConfigClient = createClientTool(
4746
@{result.user.data.username}
4847
</p>
4948
</div>
50-
</CardHeader>
51-
<CardContent className="space-y-3">
49+
</div>
50+
<div className="space-y-3">
5251
{result.user.data.description && (
5352
<p className="text-sm">{result.user.data.description}</p>
5453
)}
@@ -65,32 +64,32 @@ export const getUserProfileToolConfigClient = createClientTool(
6564
{result.user.data.public_metrics?.tweet_count?.toLocaleString()}{" "}
6665
tweets
6766
</span>
67+
{result.user.data.location && (
68+
<p className="text-muted-foreground text-sm">
69+
📍 {result.user.data.location}
70+
</p>
71+
)}
72+
{result.user.data.url && (
73+
<p className="text-muted-foreground text-sm">
74+
🔗{" "}
75+
<a
76+
href={result.user.data.url}
77+
target="_blank"
78+
rel="noopener noreferrer"
79+
className="text-blue-500 hover:underline"
80+
>
81+
{result.user.data.url}
82+
</a>
83+
</p>
84+
)}
6885
</div>
69-
{result.user.data.location && (
70-
<p className="text-muted-foreground text-sm">
71-
📍 {result.user.data.location}
72-
</p>
73-
)}
74-
{result.user.data.url && (
75-
<p className="text-muted-foreground text-sm">
76-
🔗{" "}
77-
<a
78-
href={result.user.data.url}
79-
target="_blank"
80-
rel="noopener noreferrer"
81-
className="text-blue-500 hover:underline"
82-
>
83-
{result.user.data.url}
84-
</a>
85-
</p>
86-
)}
8786
<Separator />
8887
<p className="text-muted-foreground text-xs">
8988
Joined{" "}
9089
{new Date(result.user.data.created_at ?? "").toLocaleDateString()}
9190
</p>
92-
</CardContent>
93-
</Card>
91+
</div>
92+
</div>
9493
),
9594
},
9695
);

src/toolkits/toolkits/twitter/tools/tweets/base.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,9 @@ export const getLatestTweetsTool = createBaseTool({
1414
.number()
1515
.min(1)
1616
.max(100)
17-
.default(10)
1817
.describe("Number of tweets to retrieve (max 100, default 10)"),
19-
exclude_retweets: z
20-
.boolean()
21-
.default(false)
22-
.describe("Exclude retweets from results"),
23-
exclude_replies: z
24-
.boolean()
25-
.default(false)
26-
.describe("Exclude replies from results"),
18+
exclude_retweets: z.boolean().describe("Exclude retweets from results"),
19+
exclude_replies: z.boolean().describe("Exclude replies from results"),
2720
}),
2821
outputSchema: z.object({
2922
tweets: z.custom<TweetUserTimelineV2Paginator>(),

0 commit comments

Comments
 (0)