Repository navigation
Conversation
…nd improve theme handling
refactor: 重构Token服务分组验证逻辑 feat(abstractions): 新增Fal和Midjourney相关DTO feat(service): 添加图片任务日志事件处理器 feat(core): 扩展数据访问实体配置 feat(migrations): 添加移除请求日志的迁移文件 feat(ui): 在模型映射页面添加自定义模型输入 fix(azure-databricks): 修复流式响应处理逻辑 feat(i18n): 新增未保存更改警告等翻译 style: 清理无用代码和文件 chore: 更新依赖和配置文件
There was a problem hiding this comment.
Pull Request Overview
This pull request establishes comprehensive project setup and configuration for a Thor AI platform, transitioning from Ant Design to a modern React + shadcn/ui stack with .NET 9 backend support.
Key Changes:
- Migration from Ant Design to shadcn/ui component library with Tailwind CSS
- Comprehensive developer tooling setup including VSCode configurations and Claude Code permissions
- Complete UI component overhaul for channel management, announcements, authentication, and user interface
- Updated internationalization with enhanced translations for new UI components
Reviewed Changes
Copilot reviewed 106 out of 305 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
lobe/src/pages/channel/features/UpdateChannel.tsx |
Complete rewrite using shadcn/ui components for channel editing |
lobe/src/pages/channel/features/CreateChannel.tsx |
Migration to modern UI components with improved form validation |
lobe/src/pages/auth/page.tsx |
Updated authentication page with shadcn/ui components |
lobe/src/pages/announcement/page.tsx |
Comprehensive announcement management UI overhaul |
lobe/src/pages/announcement/features/EditAnnouncement.tsx |
Modern dialog-based announcement editing interface |
lobe/src/pages/announcement/features/CreateAnnouncement.tsx |
Enhanced announcement creation with markdown support |
| Various UI components | New shadcn/ui component implementations |
| Configuration files | VSCode, build tasks, and development environment setup |
Comments suppressed due to low confidence (1)
lobe/src/i18n/locales/zh-CN.ts:1
- The Azure OpenAI API version '2025-01-01-preview' appears to be a future version that may not exist yet. Verify this API version is available and consider using a confirmed existing version.
const zhCN = {
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| other: value.other || "", | ||
| key: value.key || "", | ||
| models: value.models || [], | ||
| group: value.group ? String(value.group) : value.groups?.[0] ?? "", |
There was a problem hiding this comment.
[nitpick] The fallback logic using optional chaining with nullish coalescing is complex and potentially fragile. Consider extracting this into a helper function or simplifying the logic to handle the group/groups conversion more explicitly.
| } | ||
| }; | ||
|
|
||
| const selectedGroup = groups.find((group) => String(group.code ?? '') === formData.group); |
There was a problem hiding this comment.
[nitpick] The type coercion with String() and fallback to empty string suggests uncertain data types. Consider defining proper TypeScript interfaces to ensure type safety and avoid runtime conversions.
| const expireTime = announcement.expireTime | ||
| ? new Date(announcement.expireTime).toISOString().slice(0, 16) | ||
| : ''; |
There was a problem hiding this comment.
[nitpick] The date manipulation using slice(0, 16) to format for datetime-local input is brittle. Consider using a proper date formatting utility or extracting this logic into a reusable helper function.
| import { useTheme } from "next-themes" | ||
| import { Toaster as Sonner, ToasterProps } from "sonner" | ||
|
|
||
| const Toaster = ({ ...props }: ToasterProps) => { | ||
| const { theme = "system" } = useTheme() |
There was a problem hiding this comment.
The import suggests this is a Next.js application, but the project appears to be using React Router based on other files. This could cause runtime errors if next-themes is not properly configured for non-Next.js environments.
| import { useTheme } from "next-themes" | |
| import { Toaster as Sonner, ToasterProps } from "sonner" | |
| const Toaster = ({ ...props }: ToasterProps) => { | |
| const { theme = "system" } = useTheme() | |
| import React, { useContext } from "react" | |
| import { Toaster as Sonner, ToasterProps } from "sonner" | |
| // Simple ThemeContext for demonstration; in a real app, this should be provided at a higher level | |
| const ThemeContext = React.createContext({ theme: "system" }); | |
| const Toaster = ({ ...props }: ToasterProps) => { | |
| const { theme = "system" } = useContext(ThemeContext) |
| } from "../components/ui/toast" | ||
|
|
||
| const TOAST_LIMIT = 1 | ||
| const TOAST_REMOVE_DELAY = 1000000 |
There was a problem hiding this comment.
[nitpick] The TOAST_REMOVE_DELAY of 1,000,000ms (16+ minutes) seems excessively long and likely unintentional. Consider using a more reasonable timeout like 5000ms (5 seconds) for better user experience.
| const TOAST_REMOVE_DELAY = 1000000 | |
| const TOAST_REMOVE_DELAY = 5000 |
This pull request introduces initial project setup and configuration files for both the backend (.NET 9) and frontend (React + Vite) of the Thor AI platform. It adds essential documentation, developer environment settings, build and launch tasks, and updates the frontend dependencies and meta tags to support new tooling and branding. These changes lay the foundation for local development, build automation, and consistent project structure.
Project Documentation and Guidance
CLAUDE.md, detailing project architecture, build commands, environment variables, coding practices, and troubleshooting steps for both backend and frontend.Frontend Configuration and Branding
lobe/index.htmlmeta tags and links to use new branding (favicon.png), set proper canonical and Open Graph URLs, and improved mobile web app support. [1] [2] [3]lobe/components.jsonfor UI library configuration, setting up Tailwind, Lucide icons, and component aliases.lobe/package.jsondependencies: replaced Ant Design and related packages with Radix UI, Tailwind CSS, Lucide icons, and other modern libraries for improved frontend stack and performance. [1] [2]Backend and Development Environment
.vscode/launch.jsonfor .NET Core debugging and attach configurations, and.vscode/tasks.jsonfor build, publish, and watch tasks to streamline backend development workflows. [1] [2].vscode/settings.jsonto configure VSCode extensions (e.g., disabling chatgpt on startup)..claude/settings.local.jsonfor Claude Code permissions, specifying allowed shell commands for local development and automation.