This commit is contained in:
2025-06-25 11:33:35 +08:00
parent 8a4ccd5ef2
commit 794b4c5e72
34 changed files with 2918 additions and 413 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
import { useState, useEffect, useRef, useCallback } from 'react'
import MarkdownItCjs from "markdown-it/dist/markdown-it.js";
const MarkdownItCjs = require("markdown-it/dist/markdown-it.js");
import { ComponentCard } from '@/components/ComponentCard';
import { Component } from '@prisma/client';
import { nextTick } from 'process';
+4 -4
View File
@@ -90,7 +90,7 @@ export async function GET(
export async function DELETE(
request: NextRequest,
{ params }: { params: { id: string } }
{ params }: { params: Promise<{ id: string }> }
) {
try {
// 验证用户身份
@@ -103,7 +103,7 @@ export async function DELETE(
}
const client = new AIClient()
const success = await client.deleteConversation(params.id, user.id)
const success = await client.deleteConversation((await params).id, user.id)
if (!success) {
return NextResponse.json(
@@ -125,7 +125,7 @@ export async function DELETE(
export async function PATCH(
request: NextRequest,
{ params }: { params: { id: string } }
{ params }: { params: Promise<{ id: string }> }
) {
try {
// 验证用户身份
@@ -146,7 +146,7 @@ export async function PATCH(
}
const client = new AIClient()
const success = await client.updateConversationTitle(params.id, user.id, title)
const success = await client.updateConversationTitle((await params).id, user.id, title)
if (!success) {
return NextResponse.json(
+1 -1
View File
@@ -310,7 +310,7 @@ export default function CartPage() {
</div>
<div className="flex items-center justify-between mt-4">
s <div className="flex items-center space-x-2">
<div className="flex items-center space-x-2">
<button
onClick={() => updateQuantity(item.id, item.quantity - 1)}
disabled={item.quantity <= 1 || isUpdating === item.id}
+2 -2
View File
@@ -118,11 +118,11 @@ export default function LoginPage() {
</button>
</div>
<div className="text-center">
{/* <div className="text-center">
<p className="text-sm text-gray-600">
测试账号:admin@pcdiy.com,密码:admin123
</p>
</div>
</div> */}
</form>
</div>
</div>