Skip to content

Commit 2a5abc8

Browse files
committed
feat: update routing and improve link handling across components
- Refactored links in ApiReferenceContent, CareersContent, DocsLayout, DocsNav, and ToolsList to use pathname and query for better routing. - Changed external links in ExamplesList and Footer to use standard anchor tags instead of next/link to avoid type errors. - Updated link handling in Navbar and NetworksList to ensure proper routing with query parameters. - Modified styles in various components to use linear gradients instead of traditional gradients for consistency. - Adjusted tool implementations in calendar-tool, data-validator.tool, execa-tool, and pnpm-tool to improve error handling and tracing context. - Updated changelog workflow to use default imports for execa for consistency.
1 parent 00fcbe8 commit 2a5abc8

19 files changed

Lines changed: 79 additions & 82 deletions

app/components/api-reference-content.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,23 +78,23 @@ export function ApiReferenceContent() {
7878
{/* Quick Links — Agents / Tools / Workflows */}
7979
<div className="mt-6 grid grid-cols-1 sm:grid-cols-3 gap-4">
8080
<Link
81-
href="/api-reference/agents"
81+
href={{ pathname: "/api-reference/agents" }}
8282
className="group block rounded-2xl border border-border bg-card p-4 transition-all hover:border-primary/50 hover:shadow-lg"
8383
>
8484
<h3 className="mb-1 text-sm font-semibold text-foreground">Agents</h3>
8585
<p className="text-sm text-muted-foreground">See agent endpoints, streaming, and agent tool call docs</p>
8686
</Link>
8787

8888
<Link
89-
href="/api-reference/tools"
89+
href={{ pathname: "/api-reference/tools" }}
9090
className="group block rounded-2xl border border-border bg-card p-4 transition-all hover:border-primary/50 hover:shadow-lg"
9191
>
9292
<h3 className="mb-1 text-sm font-semibold text-foreground">Tools</h3>
9393
<p className="text-sm text-muted-foreground">Tool execution endpoints and sample integrations</p>
9494
</Link>
9595

9696
<Link
97-
href="/api-reference/workflows"
97+
href={{ pathname: "/api-reference/workflows" }}
9898
className="group block rounded-2xl border border-border bg-card p-4 transition-all hover:border-primary/50 hover:shadow-lg"
9999
>
100100
<h3 className="mb-1 text-sm font-semibold text-foreground">Workflows</h3>

app/components/careers-content.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,18 +81,19 @@ export function CareersContent() {
8181
<div>
8282
<h2 className="mb-8 text-2xl font-bold text-foreground">Open Positions</h2>
8383
<div className="space-y-4">
84-
{POSITIONS.map((position, index) => (
84+
{POSITIONS.map((position, index) => {
85+
const slug = position.title.toLowerCase().replace(/\s+/g, "-")
86+
const href = `/careers/${slug}`
87+
88+
return (
8589
<motion.div
8690
key={position.title}
8791
initial={{ opacity: 0, y: 20 }}
8892
whileInView={{ opacity: 1, y: 0 }}
8993
transition={{ duration: 0.4, delay: index * 0.1 }}
9094
viewport={{ once: true }}
9195
>
92-
<Link
93-
href={`/careers/${position.title.toLowerCase().replace(/\s+/g, "-")}`}
94-
className="group flex flex-col gap-4 rounded-2xl border border-border bg-card p-6 transition-all hover:border-primary/50 hover:shadow-lg sm:flex-row sm:items-center sm:justify-between"
95-
>
96+
<Link href={href as any} className="group flex flex-col gap-4 rounded-2xl border border-border bg-card p-6 transition-all hover:border-primary/50 hover:shadow-lg sm:flex-row sm:items-center sm:justify-between">
9697
<div>
9798
<div className="mb-2 flex flex-wrap items-center gap-2">
9899
<Badge variant="secondary">{position.department}</Badge>

app/components/docs-layout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ export function DocsLayout({
5858
<nav className="mt-16 flex items-center justify-between border-t border-border pt-8">
5959
{prevPage ? (
6060
<Button variant="outline" asChild>
61-
<Link href={prevPage.href}>
61+
<Link href={prevPage.href as any}>
6262
<ArrowLeftIcon className="mr-2 size-4" /> {prevPage.title}
6363
</Link>
6464
</Button>
6565
) : <div />}
6666
{nextPage && (
6767
<Button variant="outline" asChild>
68-
<Link href={nextPage.href}>
68+
<Link href={nextPage.href as any}>
6969
{nextPage.title} <ChevronRightIcon className="ml-2 size-4" />
7070
</Link>
7171
</Button>

app/components/docs-nav.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export function DocsNav() {
115115
viewport={{ once: true }}
116116
>
117117
<Link
118-
href={section.href}
118+
href={section.href as any}
119119
className="group flex h-full flex-col rounded-2xl border border-border bg-card p-6 transition-all hover:border-primary/50 hover:shadow-lg"
120120
>
121121
<div className="mb-4 flex size-12 items-center justify-center rounded-lg bg-primary/10 text-primary">

app/components/examples-list.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"use client"
22

33
import { useState } from "react"
4-
import Link from "next/link"
4+
// use standard anchor for external links to avoid next/link type errors
55
import { motion } from "framer-motion"
66
import { Input } from "@/ui/input"
77
import { Badge } from "@/ui/badge"
@@ -104,14 +104,14 @@ export function ExamplesList() {
104104
</p>
105105
<div className="flex gap-3">
106106
<Button variant="outline" size="sm" asChild className="flex-1">
107-
<Link href={example.github} target="_blank" rel="noopener noreferrer">
107+
<a href={example.github} target="_blank" rel="noopener noreferrer">
108108
<GithubIcon className="mr-2 size-4" /> View Code
109-
</Link>
109+
</a>
110110
</Button>
111111
<Button size="sm" asChild className="flex-1">
112-
<Link href={example.github} target="_blank" rel="noopener noreferrer">
112+
<a href={example.github} target="_blank" rel="noopener noreferrer">
113113
<ExternalLinkIcon className="mr-2 size-4" /> Live Demo
114-
</Link>
114+
</a>
115115
</Button>
116116
</div>
117117
</motion.div>

app/components/footer.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export function Footer() {
117117
{/* Brand column */}
118118
<div className="col-span-2 md:col-span-3 lg:col-span-2">
119119
<Link href="/" className="flex items-center gap-2">
120-
<div className="flex size-10 items-center justify-center rounded-lg bg-gradient-to-br from-primary to-primary/80 shadow-lg">
120+
<div className="flex size-10 items-center justify-center rounded-lg bg-linear-to-br from-primary to-primary/80 shadow-lg">
121121
<span className="font-bold text-primary-foreground text-lg">A</span>
122122
</div>
123123
<span className="text-xl font-bold text-foreground">AgentStack</span>
@@ -128,7 +128,7 @@ export function Footer() {
128128
</p>
129129
<div className="mt-6 flex items-center gap-3">
130130
{SOCIAL_LINKS.map((social) => (
131-
<Link
131+
<a
132132
key={social.name}
133133
href={social.href}
134134
target="_blank"
@@ -137,7 +137,7 @@ export function Footer() {
137137
aria-label={social.name}
138138
>
139139
<social.icon className="size-5" />
140-
</Link>
140+
</a>
141141
))}
142142
</div>
143143
</div>
@@ -149,7 +149,7 @@ export function Footer() {
149149
{FOOTER_LINKS.product.map((link) => (
150150
<li key={link.label}>
151151
<Link
152-
href={link.href}
152+
href={link.href as any}
153153
className="text-sm text-muted-foreground transition-colors hover:text-foreground"
154154
>
155155
{link.label}
@@ -166,7 +166,7 @@ export function Footer() {
166166
{FOOTER_LINKS.resources.map((link) => (
167167
<li key={link.label}>
168168
<Link
169-
href={link.href}
169+
href={link.href as any}
170170
className="text-sm text-muted-foreground transition-colors hover:text-foreground"
171171
>
172172
{link.label}
@@ -183,7 +183,7 @@ export function Footer() {
183183
{FOOTER_LINKS.company.map((link) => (
184184
<li key={link.label}>
185185
<Link
186-
href={link.href}
186+
href={link.href as any}
187187
className="text-sm text-muted-foreground transition-colors hover:text-foreground"
188188
>
189189
{link.label}
@@ -200,7 +200,7 @@ export function Footer() {
200200
{FOOTER_LINKS.legal.map((link) => (
201201
<li key={link.label}>
202202
<Link
203-
href={link.href}
203+
href={link.href as any}
204204
className="text-sm text-muted-foreground transition-colors hover:text-foreground"
205205
>
206206
{link.label}

app/components/landing-cta.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export function LandingCTA() {
4545
<section className="relative overflow-hidden border-t border-border">
4646
{/* Background gradients */}
4747
<div className="absolute inset-0 -z-10">
48-
<div className="absolute inset-0 bg-gradient-to-t from-primary/5 via-transparent to-transparent" />
48+
<div className="absolute inset-0 bg-linear-to-t from-primary/5 via-transparent to-transparent" />
4949
<div className="absolute left-1/2 top-0 h-[600px] w-[600px] -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary/10 blur-[120px]" />
5050
<div className="absolute bottom-0 left-0 h-[400px] w-[400px] -translate-x-1/2 translate-y-1/2 rounded-full bg-blue-500/10 blur-[100px]" />
5151
<div className="absolute bottom-0 right-0 h-[400px] w-[400px] translate-x-1/2 translate-y-1/2 rounded-full bg-purple-500/10 blur-[100px]" />
@@ -84,7 +84,7 @@ export function LandingCTA() {
8484
>
8585
Ready to Build{" "}
8686
<span className="relative">
87-
<span className="relative z-10 bg-gradient-to-r from-primary via-blue-500 to-purple-500 bg-clip-text text-transparent">
87+
<span className="relative z-10 bg-linear-to-r from-primary via-blue-500 to-purple-500 bg-clip-text text-transparent">
8888
Something Amazing?
8989
</span>
9090
</span>
@@ -113,7 +113,7 @@ export function LandingCTA() {
113113
<Button
114114
size="lg"
115115
asChild
116-
className="group h-14 min-w-[200px] bg-gradient-to-r from-primary to-primary/90 px-8 text-base shadow-lg shadow-primary/25 transition-all hover:shadow-xl hover:shadow-primary/30"
116+
className="group h-14 min-w-[200px] bg-linear-to-r from-primary to-primary/90 px-8 text-base shadow-lg shadow-primary/25 transition-all hover:shadow-xl hover:shadow-primary/30"
117117
>
118118
<Link href="/chat">
119119
<RocketIcon className="mr-2 size-5" />
@@ -180,7 +180,7 @@ export function LandingCTA() {
180180
viewport={{ once: true }}
181181
>
182182
<Link
183-
href={link.href}
183+
href={link.href as any}
184184
className="group flex h-full flex-col rounded-2xl border border-border bg-card/50 p-6 backdrop-blur-sm transition-all hover:border-primary/50 hover:bg-card hover:shadow-lg"
185185
>
186186
<div className="mb-4 flex size-12 items-center justify-center rounded-xl bg-primary/10 text-primary transition-colors group-hover:bg-primary group-hover:text-primary-foreground">

app/components/navbar.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"use client"
22

33
import Link from "next/link"
4+
import type { Route } from "next"
45
import { useState, useEffect, useCallback } from "react"
56
import { usePathname } from "next/navigation"
67
import { Button } from "@/ui/button"
@@ -156,7 +157,7 @@ export function Navbar() {
156157
className="group flex items-center gap-2.5 transition-opacity hover:opacity-80"
157158
aria-label="AgentStack Home"
158159
>
159-
<div className="flex size-9 items-center justify-center rounded-lg bg-gradient-to-br from-primary to-primary/80 shadow-sm transition-transform group-hover:scale-105">
160+
<div className="flex size-9 items-center justify-center rounded-lg bg-linear-to-br from-primary to-primary/80 shadow-sm transition-transform group-hover:scale-105">
160161
<span className="font-bold text-primary-foreground text-sm">A</span>
161162
</div>
162163
<span className="font-semibold text-foreground text-lg">AgentStack</span>
@@ -189,7 +190,7 @@ export function Navbar() {
189190
{link.items.map((item) => (
190191
<DropdownMenuItem key={item.label} asChild>
191192
<Link
192-
href={item.href}
193+
href={item.href as Route}
193194
className={`flex items-start gap-3 rounded-md p-2 transition-colors ${isActiveLink(item.href)
194195
? "bg-primary/10 text-primary"
195196
: ""
@@ -220,7 +221,7 @@ export function Navbar() {
220221
: "text-muted-foreground hover:text-foreground"
221222
}`}
222223
>
223-
<Link href={link.href}>{link.label}</Link>
224+
<Link href={link.href as Route}>{link.label}</Link>
224225
</Button>
225226
)
226227
)}
@@ -236,7 +237,7 @@ export function Navbar() {
236237
<Button
237238
size="sm"
238239
asChild
239-
className="bg-gradient-to-r from-primary to-primary/90 shadow-sm transition-all hover:shadow-md"
240+
className="bg-linear-to-r from-primary to-primary/90 shadow-sm transition-all hover:shadow-md"
240241
>
241242
<Link href="/chat">Get Started</Link>
242243
</Button>
@@ -288,7 +289,7 @@ export function Navbar() {
288289
{link.items.map((item) => (
289290
<Link
290291
key={item.label}
291-
href={item.href}
292+
href={item.href as Route}
292293
className={`flex items-center gap-3 rounded-lg p-3 transition-colors ${isActiveLink(item.href)
293294
? "bg-primary/10 text-primary"
294295
: "hover:bg-accent"
@@ -312,7 +313,7 @@ export function Navbar() {
312313
) : (
313314
<Link
314315
key={link.label}
315-
href={link.href}
316+
href={link.href as Route}
316317
className={`rounded-lg px-3 py-2.5 text-base font-medium transition-colors ${isActiveLink(link.href)
317318
? "bg-primary/10 text-primary"
318319
: "hover:bg-accent"
@@ -341,7 +342,7 @@ export function Navbar() {
341342
<Button
342343
size="lg"
343344
asChild
344-
className="w-full bg-gradient-to-r from-primary to-primary/90"
345+
className="w-full bg-linear-to-r from-primary to-primary/90"
345346
tabIndex={mobileOpen ? 0 : -1}
346347
>
347348
<Link href="/chat" onClick={() => setMobileOpen(false)}>

app/components/networks-list.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export function NetworksList() {
8484
viewport={{ once: true }}
8585
>
8686
<Link
87-
href={`/networks/${network.id}`}
87+
href={{ pathname: '/networks/[id]', query: { id: network.id } }}
8888
className="group flex h-full flex-col rounded-2xl border border-border bg-card p-8 transition-all hover:border-primary/50 hover:shadow-lg"
8989
>
9090
<div className="mb-6 flex items-start justify-between">

app/components/tools-list.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,8 @@ export function ToolsList() {
403403
transition={{ duration: 0.3, delay: index * 0.05 }}
404404
>
405405
<Link
406-
href={`/docs/tools/${tool.id}`}
407-
className="group flex h-full flex-col rounded-xl border border-primary/20 bg-gradient-to-br from-primary/5 to-transparent p-5 transition-all hover:border-primary/40 hover:shadow-lg hover:shadow-primary/5"
406+
href={{ pathname: '/docs/tools/[id]', query: { id: tool.id } }}
407+
className="group flex h-full flex-col rounded-xl border border-primary/20 bg-linear-to-br from-primary/5 to-transparent p-5 transition-all hover:border-primary/40 hover:shadow-lg hover:shadow-primary/5"
408408
>
409409
<div className="mb-3 flex items-center justify-between">
410410
<div className="flex size-10 items-center justify-center rounded-lg bg-primary/10 text-primary">
@@ -476,7 +476,7 @@ export function ToolsList() {
476476
transition={{ duration: 0.3, delay: index * 0.02 }}
477477
>
478478
<Link
479-
href={`/docs/tools/${tool.id}`}
479+
href={{ pathname: '/docs/tools/[id]', query: { id: tool.id } }}
480480
className="group flex h-full flex-col rounded-xl border border-border bg-card p-5 transition-all hover:border-primary/50 hover:shadow-lg"
481481
>
482482
<div className="mb-4 flex items-start justify-between">
@@ -565,7 +565,7 @@ export function ToolsList() {
565565
whileInView={{ opacity: 1, y: 0 }}
566566
transition={{ duration: 0.5 }}
567567
viewport={{ once: true }}
568-
className="mt-20 rounded-2xl border border-border bg-gradient-to-br from-primary/5 via-transparent to-transparent p-8 text-center lg:p-12"
568+
className="mt-20 rounded-2xl border border-border bg-linear-to-br from-primary/5 via-transparent to-transparent p-8 text-center lg:p-12"
569569
>
570570
<div className="mx-auto max-w-2xl">
571571
<div className="mb-4 inline-flex size-14 items-center justify-center rounded-full bg-primary/10">
@@ -580,13 +580,13 @@ export function ToolsList() {
580580
</p>
581581
<div className="flex flex-col items-center justify-center gap-4 sm:flex-row">
582582
<Button size="lg" asChild>
583-
<Link href="/docs/tools/custom">
583+
<Link href={{ pathname: "/docs/tools/custom" }}>
584584
Build Custom Tool
585585
<ArrowRightIcon className="ml-2 size-4" />
586586
</Link>
587587
</Button>
588588
<Button variant="outline" size="lg" asChild>
589-
<Link href="/contact">Request a Tool</Link>
589+
<Link href={{ pathname: "/contact" }}>Request a Tool</Link>
590590
</Button>
591591
</div>
592592
</div>

0 commit comments

Comments
 (0)