Skip to content

Commit 2cbd20a

Browse files
committed
init
0 parents  commit 2cbd20a

29 files changed

+9894
-0
lines changed

.gitignore

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Nuxt dev/build outputs
2+
.output
3+
.data
4+
.nuxt
5+
.nitro
6+
.cache
7+
dist
8+
9+
# Node dependencies
10+
node_modules
11+
12+
# Logs
13+
logs
14+
*.log
15+
16+
# Misc
17+
.DS_Store
18+
.fleet
19+
.idea
20+
21+
# Local env files
22+
.env
23+
.env.*
24+
!.env.example

README.md

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Deep Research Web UI
2+
3+
This is a web UI for https://github.com/dzhng/deep-research. It supports streaming AI responses, and viasualization of the research process using a tree structure.
4+
5+
Note: The project is currently WIP, expect bugs. README will be updated once the project is usable.
6+
7+
Rough preview of the UI:
8+
9+
<img width="1087" alt="image" src="https://github.com/user-attachments/assets/4bb5b722-0300-4d4f-bb01-fc1ed2404442" />
10+
11+
12+
## Setup
13+
14+
Make sure to install dependencies:
15+
16+
```bash
17+
# npm
18+
npm install
19+
20+
# pnpm
21+
pnpm install
22+
23+
# yarn
24+
yarn install
25+
26+
# bun
27+
bun install
28+
```
29+
30+
## Development Server
31+
32+
Start the development server on `http://localhost:3000`:
33+
34+
```bash
35+
# npm
36+
npm run dev
37+
38+
# pnpm
39+
pnpm dev
40+
41+
# yarn
42+
yarn dev
43+
44+
# bun
45+
bun run dev
46+
```
47+
48+
## Production
49+
50+
Build the application for production:
51+
52+
```bash
53+
# npm
54+
npm run build
55+
56+
# pnpm
57+
pnpm build
58+
59+
# yarn
60+
yarn build
61+
62+
# bun
63+
bun run build
64+
```
65+
66+
Locally preview production build:
67+
68+
```bash
69+
# npm
70+
npm run preview
71+
72+
# pnpm
73+
pnpm preview
74+
75+
# yarn
76+
yarn preview
77+
78+
# bun
79+
bun run preview
80+
```
81+
82+
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.

app.config.ts

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export default defineAppConfig({
2+
ui: {
3+
colors: {
4+
primary: 'violet',
5+
},
6+
},
7+
})

app.vue

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<template>
2+
<UApp :locale="zh_cn">
3+
<NuxtLayout>
4+
<NuxtPage />
5+
</NuxtLayout>
6+
</UApp>
7+
</template>
8+
9+
<script setup lang="ts">
10+
import { zh_cn } from '@nuxt/ui/locale'
11+
12+
// const colorMode = useColorMode()
13+
14+
// TODO
15+
useHead({
16+
title: 'SiliconCloud Stats - SiliconCloud 平台使用情况分析工具',
17+
meta: [
18+
{ name: 'description', content: 'SiliconCloud Stats 是一个用于分析 SiliconCloud 平台使用情况的工具。通过输入 Cookie,可以拉取 SiliconCloud 控制台 API 来实现各种分析功能,如 token 用量分析等。' },
19+
{ name: 'keywords', content: 'SiliconCloud, 数据分析, token 用量, API 分析, 控制台工具' },
20+
// Open Graph tags
21+
{ property: 'og:title', content: 'SiliconCloud Stats - SiliconCloud 平台使用情况分析工具' },
22+
{ property: 'og:description', content: 'SiliconCloud Stats 是一个用于分析 SiliconCloud 平台使用情况的工具。通过输入 Cookie,可以拉取 SiliconCloud 控制台 API 来实现各种分析功能,如 token 用量分析等。' },
23+
{ property: 'og:type', content: 'website' },
24+
{ property: 'og:image', content: '/images/readme-showcase-total.webp' },
25+
// Twitter Card tags
26+
{ name: 'twitter:card', content: 'summary_large_image' },
27+
{ name: 'twitter:title', content: 'SiliconCloud Stats - SiliconCloud 平台使用情况分析工具' },
28+
{ name: 'twitter:description', content: 'SiliconCloud Stats 是一个用于分析 SiliconCloud 平台使用情况的工具。' },
29+
{ name: 'twitter:image', content: '/images/readme-showcase-total.webp' },
30+
],
31+
// script: [
32+
// {
33+
// defer: true,
34+
// src: 'https://umami.ataw.top/script.js',
35+
// 'data-website-id': '6be07672-962f-42fe-85fc-92e96a5f30d6',
36+
// },
37+
// ],
38+
})
39+
40+
// onMounted(() => {
41+
// watchEffect(() => {
42+
// if (colorMode.value === 'dark') {
43+
// document.documentElement.setAttribute('theme-mode', 'dark')
44+
// } else {
45+
// document.documentElement.removeAttribute('theme-mode')
46+
// }
47+
// })
48+
// })
49+
</script>

assets/css/main.css

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/* Don't do `@import "tailwindcss"`, do this instead: */
2+
@layer theme, base, components, utilities;
3+
4+
@import "tailwindcss/theme" layer(theme) theme(static);
5+
@import "tailwindcss/preflight" layer(base);
6+
@import "tailwindcss/utilities" layer(utilities);
7+
8+
/* Then import "@nuxt/ui": */
9+
@import "@nuxt/ui";

components/ColorModeButton.vue

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<script setup lang="ts">
2+
import { usePreferredColorScheme } from '@vueuse/core'
3+
4+
const colorMode = useColorMode()
5+
const preferredColor = usePreferredColorScheme()
6+
const preference = computed(() => {
7+
// 默认为自动,会跟随用户的浏览器切换
8+
if (colorMode.preference === 'system') {
9+
return preferredColor.value
10+
}
11+
return colorMode.preference
12+
})
13+
14+
const toggleColorMode = () => {
15+
colorMode.preference = preference.value === 'light' ? 'dark' : 'light'
16+
}
17+
</script>
18+
19+
<template>
20+
<div>
21+
<UButton
22+
:icon="
23+
preference === 'dark'
24+
? 'i-heroicons-sun-20-solid'
25+
: 'i-heroicons-moon-20-solid'
26+
"
27+
color="primary"
28+
@click="toggleColorMode"
29+
/>
30+
</div>
31+
</template>

0 commit comments

Comments
 (0)