Skip to content

Commit c77218d

Browse files
committed
feat: refresh UI and add mocked mode
1 parent 1fd313a commit c77218d

27 files changed

+3201
-1924
lines changed

package-lock.json

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"next": "16.1.1",
1414
"react": "19.2.3",
1515
"react-dom": "19.2.3",
16+
"sonner": "^2.0.7",
1617
"vaul": "^1.1.2"
1718
},
1819
"devDependencies": {

public/cursor-wordmark.svg

Lines changed: 20 additions & 0 deletions
Loading

src/app/api/cursor/[...path]/route.ts

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,20 @@ const CURSOR_API_BASE = 'https://api.cursor.com/v0';
55
// Proxy route to forward requests to Cursor API
66
// This avoids CORS issues when calling from the browser
77

8-
export async function GET(
9-
request: NextRequest,
10-
{ params }: { params: Promise<{ path: string[] }> }
11-
) {
12-
const { path } = await params;
8+
type RouteContext = { params: Promise<{ path: string[] }> };
9+
10+
export async function GET(request: NextRequest, context: RouteContext) {
11+
const { path } = await context.params;
1312
return proxyRequest(request, path, 'GET');
1413
}
1514

16-
export async function POST(
17-
request: NextRequest,
18-
{ params }: { params: Promise<{ path: string[] }> }
19-
) {
20-
const { path } = await params;
15+
export async function POST(request: NextRequest, context: RouteContext) {
16+
const { path } = await context.params;
2117
return proxyRequest(request, path, 'POST');
2218
}
2319

24-
export async function DELETE(
25-
request: NextRequest,
26-
{ params }: { params: Promise<{ path: string[] }> }
27-
) {
28-
const { path } = await params;
20+
export async function DELETE(request: NextRequest, context: RouteContext) {
21+
const { path } = await context.params;
2922
return proxyRequest(request, path, 'DELETE');
3023
}
3124

0 commit comments

Comments
 (0)