mirror of
https://github.com/aiclientproxy/proxycast.git
synced 2026-09-24 23:10:56 +08:00
主要变更: - 引入基于 Protocol 的 Agent 架构(支持 OpenAI/Anthropic/Kiro/Gemini) - 新增 API Key Provider 管理系统,支持多种第三方 AI 服务商 - 重构流式响应处理,新增统一的 Stream 处理模块 - 新增协议转换器(Translator)模块,支持 Kiro 到 OpenAI/Anthropic 的转换 - 前端新增 API Key Provider 配置界面和导入/导出功能 - 新增 50+ AI 服务商图标支持 - 优化 Agent 工具调用显示和流式渲染 - 完善数据库 schema,新增 api_key_providers 表 技术细节: - 重构 native_agent.rs,引入策略模式的 Protocol trait - 新增 parsers 和 generators 模块处理不同协议的 SSE 流 - 新增完整的 API Key 验证和连接测试功能 - 改进前端 TypeScript 类型定义 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
76 lines
2.4 KiB
JavaScript
76 lines
2.4 KiB
JavaScript
import js from "@eslint/js";
|
|
import tseslint from "@typescript-eslint/eslint-plugin";
|
|
import tsparser from "@typescript-eslint/parser";
|
|
import reactHooks from "eslint-plugin-react-hooks";
|
|
import reactRefresh from "eslint-plugin-react-refresh";
|
|
import globals from "globals";
|
|
|
|
export default [
|
|
{ ignores: ["dist", "src-tauri", "node_modules"] },
|
|
{
|
|
files: ["**/*.{ts,tsx}"],
|
|
languageOptions: {
|
|
ecmaVersion: 2020,
|
|
globals: globals.browser,
|
|
parser: tsparser,
|
|
parserOptions: {
|
|
ecmaFeatures: { jsx: true },
|
|
},
|
|
},
|
|
plugins: {
|
|
"@typescript-eslint": tseslint,
|
|
"react-hooks": reactHooks,
|
|
"react-refresh": reactRefresh,
|
|
},
|
|
rules: {
|
|
...js.configs.recommended.rules,
|
|
...tseslint.configs.recommended.rules,
|
|
...reactHooks.configs.recommended.rules,
|
|
"react-refresh/only-export-components": [
|
|
"warn",
|
|
{
|
|
allowConstantExport: true,
|
|
allowExportNames: [
|
|
// AddCustomProviderModal.tsx
|
|
"validateCustomProviderForm",
|
|
"isFormValid",
|
|
"hasRequiredFields",
|
|
// ApiKeyItem.tsx
|
|
"extractApiKeyDisplayInfo",
|
|
// ApiKeyList.tsx
|
|
"getApiKeyListStats",
|
|
// ApiKeyProviderSection.tsx
|
|
"verifyProviderSelectionSync",
|
|
"extractSelectionState",
|
|
// ConnectionTestButton.tsx
|
|
"getConnectionTestStatusInfo",
|
|
// DeleteProviderDialog.tsx
|
|
"canDeleteProvider",
|
|
"isSystemProvider",
|
|
// ProviderConfigForm.tsx
|
|
"getFieldsForProviderType",
|
|
"providerTypeRequiresField",
|
|
// ProviderGroup.tsx
|
|
"getGroupLabel",
|
|
"isProviderInGroup",
|
|
"getGroupOrder",
|
|
// ProviderList.tsx
|
|
"filterProviders",
|
|
"groupProviders",
|
|
"matchesSearchQuery",
|
|
// ProviderListItem.tsx
|
|
"extractListItemDisplayInfo",
|
|
"getApiKeyCount",
|
|
// ProviderSetting.tsx
|
|
"extractProviderSettingInfo",
|
|
// icons/providers/index.tsx
|
|
"iconComponents",
|
|
],
|
|
},
|
|
],
|
|
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_", varsIgnorePattern: "^_", caughtErrorsIgnorePattern: "^_" }],
|
|
"@typescript-eslint/no-explicit-any": "off",
|
|
},
|
|
},
|
|
];
|