diff --git a/frontend/src/app/prompts/workshop/page.tsx b/frontend/src/app/prompts/workshop/page.tsx
index 6f887ca..30064db 100644
--- a/frontend/src/app/prompts/workshop/page.tsx
+++ b/frontend/src/app/prompts/workshop/page.tsx
@@ -5,6 +5,7 @@ import { useRouter } from 'next/navigation';
import { useAuth } from '@/lib/auth-context';
import { apiFetch, getToken } from '@/lib/auth';
import { AVAILABLE_MODELS, DEFAULT_MODEL } from '@/lib/models';
+import { ModelSelector } from '@/components/ui/model-selector';
const API_BASE = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:3000/api/v1';
@@ -119,13 +120,7 @@ export default function PromptWorkshopPage() {
-
+
{!isLoggedIn && (
diff --git a/frontend/src/components/ui/model-selector.tsx b/frontend/src/components/ui/model-selector.tsx
new file mode 100644
index 0000000..0245514
--- /dev/null
+++ b/frontend/src/components/ui/model-selector.tsx
@@ -0,0 +1,50 @@
+'use client';
+
+import { useState } from 'react';
+import { AVAILABLE_MODELS, type ModelOption } from '@/lib/models';
+
+interface ModelSelectorProps {
+ value: string;
+ onChange: (id: string) => void;
+ className?: string;
+}
+
+export function ModelSelector({ value, onChange, className = '' }: ModelSelectorProps) {
+ const [open, setOpen] = useState(false);
+ const selected = AVAILABLE_MODELS.find(m => m.id === value) || AVAILABLE_MODELS[0];
+
+ return (
+
+
+ {open && (
+ <>
+
setOpen(false)} />
+
+ {AVAILABLE_MODELS.map(m => (
+
+ ))}
+
+ >
+ )}
+
+ );
+}
diff --git a/frontend/src/lib/models.ts b/frontend/src/lib/models.ts
index 28cb33d..b6cfb58 100644
--- a/frontend/src/lib/models.ts
+++ b/frontend/src/lib/models.ts
@@ -1,11 +1,13 @@
export interface ModelOption {
id: string;
label: string;
+ provider: string;
+ desc: string;
}
export const AVAILABLE_MODELS: ModelOption[] = [
- { id: 'general', label: '通用模式' },
- { id: 'opencode-go', label: 'DeepSeek V4 Flash' },
+ { id: 'general', label: '通用模式', provider: 'OpenAI 兼容', desc: '日常问答,综合能力均衡' },
+ { id: 'opencode-go', label: 'DeepSeek V4 Flash', provider: 'OpenCode Go', desc: '高速推理,代码生成强' },
];
export const DEFAULT_MODEL = 'general';