File tree Expand file tree Collapse file tree 6 files changed +27
-7
lines changed Expand file tree Collapse file tree 6 files changed +27
-7
lines changed Original file line number Diff line number Diff line change 1
1
/** @type {import('next').NextConfig } */
2
2
const nextConfig = {
3
3
reactStrictMode : true ,
4
- crossOrigin : 'anonymous' ,
4
+ transpilePackages : [ '@lobehub/ui' ] ,
5
5
async headers ( ) {
6
6
return [
7
7
{
Original file line number Diff line number Diff line change 38
38
"@lobehub/chat-plugin-sdk" : " ^1.15.1" ,
39
39
"@lobehub/chat-plugins-gateway" : " ^1" ,
40
40
"@lobehub/ui" : " latest" ,
41
- "@types/react" : " 18.2.21" ,
42
- "@types/react-dom" : " 18.2.7" ,
43
41
"antd" : " ^5" ,
44
42
"antd-style" : " ^3" ,
45
43
"dayjs" : " ^1" ,
46
- "next" : " ^ 13.4.19 " ,
44
+ "next" : " 13.4.7 " ,
47
45
"react" : " ^18.2.0" ,
48
46
"react-dom" : " ^18.2.0" ,
49
47
"react-layout-kit" : " ^1"
50
48
},
51
49
"devDependencies" : {
52
50
"@lobehub/lint" : " latest" ,
51
+ "@types/react" : " 18.2.21" ,
52
+ "@types/react-dom" : " 18.2.7" ,
53
53
"@vercel/node" : " ^2" ,
54
54
"@vitest/coverage-v8" : " latest" ,
55
55
"commitlint" : " ^17" ,
Original file line number Diff line number Diff line change 14
14
"gender" : {
15
15
"type" : " string" ,
16
16
"enum" : [" man" , " woman" ],
17
- "description" : " 用户的性别 "
17
+ "description" : " 对话用户的性别,需要询问用户后才知道这个信息 "
18
18
}
19
19
},
20
20
"required" : [" mood" , " gender" ],
Original file line number Diff line number Diff line change
1
+ import { ThemeProvider } from '@lobehub/ui' ;
2
+ import type { AppProps } from 'next/app' ;
3
+
4
+ import './global.css' ;
5
+
6
+ export default function App ( { Component, pageProps } : AppProps ) {
7
+ return (
8
+ < ThemeProvider themeMode = { 'auto' } >
9
+ < Component { ...pageProps } />
10
+ </ ThemeProvider >
11
+ ) ;
12
+ }
Original file line number Diff line number Diff line change
1
+ html ,
2
+ body {
3
+ background : transparent !important ;
4
+ /*使用 iframe 嵌入时,如果在暗色模式下仍需要保持透明背景,需要强制设定 color-scheme 为 light */
5
+ color-scheme : light !important ;
6
+ }
Original file line number Diff line number Diff line change @@ -2,13 +2,15 @@ export interface ClothesItem {
2
2
description : string ;
3
3
name : string ;
4
4
}
5
+ type Mood = 'happy' | 'sad' | 'anger' | 'fear' | 'surprise' | 'disgust' ;
6
+
5
7
export interface ResponseData {
6
8
clothes : ClothesItem [ ] ;
7
- mood : string ;
9
+ mood : Mood ;
8
10
today : number ;
9
11
}
10
12
11
13
export interface RequestData {
12
14
gender : 'man' | 'woman' ;
13
- mood : string ;
15
+ mood : Mood ;
14
16
}
You can’t perform that action at this time.
0 commit comments