feat(providers): add timestamp-based sorting for provider list

- Add createdAt timestamp field to Provider interface
- Implement sorting logic: old providers without timestamp first, then by creation time
- Providers without timestamps are sorted alphabetically by name
- New providers are automatically timestamped on creation
This commit is contained in:
Jason
2025-09-07 22:29:08 +08:00
parent fa2b11fcc2
commit 1482dc9e66
3 changed files with 25 additions and 2 deletions

View File

@@ -3,6 +3,7 @@ export interface Provider {
name: string;
settingsConfig: Record<string, any>; // 应用配置对象Claude 为 settings.jsonCodex 为 { auth, config }
websiteUrl?: string;
createdAt?: number; // 添加时间戳(毫秒)
}
export interface AppConfig {