mirror of
https://github.com/langgenius/webapp-conversation.git
synced 2025-12-08 17:32:27 +08:00
feat: migrate ESLint to v9 flat config
- Replace .eslintrc.json with eslint.config.mjs - Simplify configuration using @antfu/eslint-config - Add necessary ESLint plugin dependencies - Disable overly strict style rules - Set package.json type to module for ESM support - Fix ESLint disable comment format 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -2,18 +2,15 @@ import type { ThoughtItem } from '@/app/components/chat/type'
|
||||
import type { VisionFile } from '@/types/app'
|
||||
|
||||
export const sortAgentSorts = (list: ThoughtItem[]) => {
|
||||
if (!list)
|
||||
return list
|
||||
if (list.some(item => item.position === undefined))
|
||||
return list
|
||||
if (!list) { return list }
|
||||
if (list.some(item => item.position === undefined)) { return list }
|
||||
const temp = [...list]
|
||||
temp.sort((a, b) => a.position - b.position)
|
||||
return temp
|
||||
}
|
||||
|
||||
export const addFileInfos = (list: ThoughtItem[], messageFiles: VisionFile[]) => {
|
||||
if (!list || !messageFiles)
|
||||
return list
|
||||
if (!list || !messageFiles) { return list }
|
||||
return list.map((item) => {
|
||||
if (item.files && item.files?.length > 0) {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user