Merge branch 'feat/back-to-front' into feature/waveform-renderer

This commit is contained in:
Roe-xin
2026-01-08 17:26:29 +08:00
5 changed files with 71 additions and 46 deletions

View File

@ -10,6 +10,9 @@ type Environment = "dev" | "test" | "prod";
/** 当前环境 - 修改这里切换环境 */
const CURRENT_ENV: Environment = "test";
/** 服务等级类型 */
export type ServiceTier = "lite" | "syntaxic" | "max" | "auto";
/** 配置项接口 */
export interface IccoderConfig {
/** 后端服务地址 */
@ -18,6 +21,8 @@ export interface IccoderConfig {
timeout: number;
/** 用户ID临时使用后续对接认证 */
userId: string;
/** 服务等级 */
serviceTier: ServiceTier;
}
/** 环境配置 */
@ -25,20 +30,23 @@ const ENV_CONFIG: Record<Environment, IccoderConfig> = {
/** 本地开发环境 */
dev: {
backendUrl: "http://localhost:2233",
timeout: 300000, // 5分钟与子智能体超时一致
timeout: 300000,
userId: "default-user",
serviceTier: "max", // 默认使用 max
},
/** 测试服务器环境 */
test: {
backendUrl: "http://192.168.1.108:2233",
timeout: 60000,
userId: "default-user",
serviceTier: "max",
},
/** 生产环境 */
prod: {
backendUrl: "https://api.iccoder.com", // TODO: 替换为实际生产地址
backendUrl: "https://api.iccoder.com",
timeout: 60000,
userId: "default-user",
serviceTier: "auto",
},
};