fix: 站点管理预设选项添加 label 标签
SiteInitializationPreset 类型缺少 label 字段, 导致 coding plan、deepseek 等预设在下拉菜单显示空白。 给接口添加 label: string,全部 13 个预设补上中文标签。
This commit is contained in:
+1
@@ -1,5 +1,6 @@
|
|||||||
export interface SiteInitializationPreset {
|
export interface SiteInitializationPreset {
|
||||||
id: string;
|
id: string;
|
||||||
|
label: string;
|
||||||
platform: 'openai' | 'claude';
|
platform: 'openai' | 'claude';
|
||||||
defaultUrl: string;
|
defaultUrl: string;
|
||||||
initialSegment: string;
|
initialSegment: string;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
export interface SiteInitializationPreset {
|
export interface SiteInitializationPreset {
|
||||||
id: string;
|
id: string;
|
||||||
|
label: string;
|
||||||
platform: 'openai' | 'claude';
|
platform: 'openai' | 'claude';
|
||||||
defaultUrl: string;
|
defaultUrl: string;
|
||||||
initialSegment: string;
|
initialSegment: string;
|
||||||
@@ -10,6 +11,7 @@ export interface SiteInitializationPreset {
|
|||||||
const presets: SiteInitializationPreset[] = [
|
const presets: SiteInitializationPreset[] = [
|
||||||
{
|
{
|
||||||
id: 'codingplan-openai',
|
id: 'codingplan-openai',
|
||||||
|
label: '阿里云 Coding Plan (OpenAI)',
|
||||||
platform: 'openai',
|
platform: 'openai',
|
||||||
defaultUrl: 'https://coding.dashscope.aliyuncs.com/v1',
|
defaultUrl: 'https://coding.dashscope.aliyuncs.com/v1',
|
||||||
initialSegment: 'apikey',
|
initialSegment: 'apikey',
|
||||||
@@ -18,6 +20,7 @@ const presets: SiteInitializationPreset[] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'codingplan-claude',
|
id: 'codingplan-claude',
|
||||||
|
label: '阿里云 Coding Plan (Claude)',
|
||||||
platform: 'claude',
|
platform: 'claude',
|
||||||
defaultUrl: 'https://coding.dashscope.aliyuncs.com/apps/anthropic',
|
defaultUrl: 'https://coding.dashscope.aliyuncs.com/apps/anthropic',
|
||||||
initialSegment: 'apikey',
|
initialSegment: 'apikey',
|
||||||
@@ -26,6 +29,7 @@ const presets: SiteInitializationPreset[] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'zhipu-coding-plan-openai',
|
id: 'zhipu-coding-plan-openai',
|
||||||
|
label: '智谱清言 Coding Plan (OpenAI)',
|
||||||
platform: 'openai',
|
platform: 'openai',
|
||||||
defaultUrl: 'https://open.bigmodel.cn/api/coding/paas/v4',
|
defaultUrl: 'https://open.bigmodel.cn/api/coding/paas/v4',
|
||||||
initialSegment: 'apikey',
|
initialSegment: 'apikey',
|
||||||
@@ -34,6 +38,7 @@ const presets: SiteInitializationPreset[] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'zhipu-coding-plan-claude',
|
id: 'zhipu-coding-plan-claude',
|
||||||
|
label: '智谱清言 Coding Plan (Claude)',
|
||||||
platform: 'claude',
|
platform: 'claude',
|
||||||
defaultUrl: 'https://open.bigmodel.cn/api/anthropic',
|
defaultUrl: 'https://open.bigmodel.cn/api/anthropic',
|
||||||
initialSegment: 'apikey',
|
initialSegment: 'apikey',
|
||||||
@@ -42,6 +47,7 @@ const presets: SiteInitializationPreset[] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'deepseek-openai',
|
id: 'deepseek-openai',
|
||||||
|
label: 'DeepSeek (OpenAI)',
|
||||||
platform: 'openai',
|
platform: 'openai',
|
||||||
defaultUrl: 'https://api.deepseek.com/v1',
|
defaultUrl: 'https://api.deepseek.com/v1',
|
||||||
initialSegment: 'apikey',
|
initialSegment: 'apikey',
|
||||||
@@ -50,6 +56,7 @@ const presets: SiteInitializationPreset[] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'deepseek-claude',
|
id: 'deepseek-claude',
|
||||||
|
label: 'DeepSeek (Claude)',
|
||||||
platform: 'claude',
|
platform: 'claude',
|
||||||
defaultUrl: 'https://api.deepseek.com/anthropic',
|
defaultUrl: 'https://api.deepseek.com/anthropic',
|
||||||
initialSegment: 'apikey',
|
initialSegment: 'apikey',
|
||||||
@@ -58,6 +65,7 @@ const presets: SiteInitializationPreset[] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'moonshot-openai',
|
id: 'moonshot-openai',
|
||||||
|
label: 'Moonshot (OpenAI)',
|
||||||
platform: 'openai',
|
platform: 'openai',
|
||||||
defaultUrl: 'https://api.moonshot.cn/v1',
|
defaultUrl: 'https://api.moonshot.cn/v1',
|
||||||
initialSegment: 'apikey',
|
initialSegment: 'apikey',
|
||||||
@@ -66,6 +74,7 @@ const presets: SiteInitializationPreset[] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'moonshot-claude',
|
id: 'moonshot-claude',
|
||||||
|
label: 'Moonshot (Claude)',
|
||||||
platform: 'claude',
|
platform: 'claude',
|
||||||
defaultUrl: 'https://api.moonshot.cn/anthropic',
|
defaultUrl: 'https://api.moonshot.cn/anthropic',
|
||||||
initialSegment: 'apikey',
|
initialSegment: 'apikey',
|
||||||
@@ -74,6 +83,7 @@ const presets: SiteInitializationPreset[] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'minimax-openai',
|
id: 'minimax-openai',
|
||||||
|
label: 'MiniMax (OpenAI)',
|
||||||
platform: 'openai',
|
platform: 'openai',
|
||||||
defaultUrl: 'https://api.minimaxi.com/v1',
|
defaultUrl: 'https://api.minimaxi.com/v1',
|
||||||
initialSegment: 'apikey',
|
initialSegment: 'apikey',
|
||||||
@@ -82,6 +92,7 @@ const presets: SiteInitializationPreset[] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'minimax-claude',
|
id: 'minimax-claude',
|
||||||
|
label: 'MiniMax (Claude)',
|
||||||
platform: 'claude',
|
platform: 'claude',
|
||||||
defaultUrl: 'https://api.minimaxi.com/anthropic',
|
defaultUrl: 'https://api.minimaxi.com/anthropic',
|
||||||
initialSegment: 'apikey',
|
initialSegment: 'apikey',
|
||||||
@@ -90,6 +101,7 @@ const presets: SiteInitializationPreset[] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'modelscope-openai',
|
id: 'modelscope-openai',
|
||||||
|
label: 'ModelScope (OpenAI)',
|
||||||
platform: 'openai',
|
platform: 'openai',
|
||||||
defaultUrl: 'https://api-inference.modelscope.cn/v1',
|
defaultUrl: 'https://api-inference.modelscope.cn/v1',
|
||||||
initialSegment: 'apikey',
|
initialSegment: 'apikey',
|
||||||
@@ -102,6 +114,7 @@ const presets: SiteInitializationPreset[] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'modelscope-claude',
|
id: 'modelscope-claude',
|
||||||
|
label: 'ModelScope (Claude)',
|
||||||
platform: 'claude',
|
platform: 'claude',
|
||||||
defaultUrl: 'https://api-inference.modelscope.cn',
|
defaultUrl: 'https://api-inference.modelscope.cn',
|
||||||
initialSegment: 'apikey',
|
initialSegment: 'apikey',
|
||||||
@@ -110,6 +123,7 @@ const presets: SiteInitializationPreset[] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'doubao-coding-openai',
|
id: 'doubao-coding-openai',
|
||||||
|
label: '豆包 Coding Plan (OpenAI)',
|
||||||
platform: 'openai',
|
platform: 'openai',
|
||||||
defaultUrl: 'https://ark.cn-beijing.volces.com/api/coding/v3',
|
defaultUrl: 'https://ark.cn-beijing.volces.com/api/coding/v3',
|
||||||
initialSegment: 'apikey',
|
initialSegment: 'apikey',
|
||||||
|
|||||||
Reference in New Issue
Block a user