From d02796501396451b0302ab4c141e18e66e975728 Mon Sep 17 00:00:00 2001 From: AnotiaWang Date: Tue, 11 Feb 2025 22:57:49 +0800 Subject: [PATCH] style: prettier format --- README.md | 11 +- app.vue | 21 ++- components/ColorModeButton.vue | 6 +- components/DeepResearch.vue | 25 ++- components/ResearchFeedback.vue | 11 +- components/ResearchForm.vue | 48 +++++- components/ResearchReport.vue | 17 +- components/Tree.vue | 7 +- lib/ai/providers.ts | 36 ++--- lib/ai/text-splitter.test.ts | 79 ++++----- lib/ai/text-splitter.ts | 104 ++++++------ lib/deep-research.ts | 232 +++++++++++++++------------ lib/feedback.ts | 24 +-- lib/prompt.ts | 6 +- lib/run.ts | 62 +++---- nuxt.config.ts | 7 +- pages/index.vue | 35 +++- prettier.config.cjs | 1 - server/api/deep-research.post.ts | 9 +- server/api/generate-feedback.post.ts | 6 +- stores/config.ts | 5 + test.ts | 16 ++ utils/json.ts | 48 +++--- 23 files changed, 485 insertions(+), 331 deletions(-) create mode 100644 stores/config.ts create mode 100644 test.ts diff --git a/README.md b/README.md index 835dc5a..b127157 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,9 @@ 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. -Note: The project is currently WIP, expect bugs. README will be updated once the project is usable. - -Rough preview of the UI: - -image +> Note: The project is currently WIP, expect bugs. + ## Setup @@ -80,3 +77,7 @@ bun run preview ``` Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information. + +## License + +MIT diff --git a/app.vue b/app.vue index 88300e4..a6d8b77 100644 --- a/app.vue +++ b/app.vue @@ -18,9 +18,15 @@ content: 'SiliconCloud Stats 是一个用于分析 SiliconCloud 平台使用情况的工具。通过输入 Cookie,可以拉取 SiliconCloud 控制台 API 来实现各种分析功能,如 token 用量分析等。', }, - { name: 'keywords', content: 'SiliconCloud, 数据分析, token 用量, API 分析, 控制台工具' }, + { + name: 'keywords', + content: 'SiliconCloud, 数据分析, token 用量, API 分析, 控制台工具', + }, // Open Graph tags - { property: 'og:title', content: 'SiliconCloud Stats - SiliconCloud 平台使用情况分析工具' }, + { + property: 'og:title', + content: 'SiliconCloud Stats - SiliconCloud 平台使用情况分析工具', + }, { property: 'og:description', content: @@ -30,8 +36,15 @@ { property: 'og:image', content: '/images/readme-showcase-total.webp' }, // Twitter Card tags { name: 'twitter:card', content: 'summary_large_image' }, - { name: 'twitter:title', content: 'SiliconCloud Stats - SiliconCloud 平台使用情况分析工具' }, - { name: 'twitter:description', content: 'SiliconCloud Stats 是一个用于分析 SiliconCloud 平台使用情况的工具。' }, + { + name: 'twitter:title', + content: 'SiliconCloud Stats - SiliconCloud 平台使用情况分析工具', + }, + { + name: 'twitter:description', + content: + 'SiliconCloud Stats 是一个用于分析 SiliconCloud 平台使用情况的工具。', + }, { name: 'twitter:image', content: '/images/readme-showcase-total.webp' }, ], // script: [ diff --git a/components/ColorModeButton.vue b/components/ColorModeButton.vue index eaeb974..4092850 100644 --- a/components/ColorModeButton.vue +++ b/components/ColorModeButton.vue @@ -19,6 +19,10 @@ diff --git a/components/DeepResearch.vue b/components/DeepResearch.vue index 6fa66e9..7ede475 100644 --- a/components/DeepResearch.vue +++ b/components/DeepResearch.vue @@ -1,5 +1,10 @@