feat: add versioned research templates and alpha variants

This commit is contained in:
yuxuanhui
2026-09-08 21:29:21 +08:00
parent b604e6050e
commit f89ae211d2
55 changed files with 5650 additions and 435 deletions
+26 -3
View File
@@ -4,9 +4,16 @@ import type { UIAction } from "../ai/types";
import "./style.css";
export const sourceLabel = (kind: string) =>
({ chatbox: "Chatbox 研究", manual: "手工研究", ai: "AI 研究(历史)" })[
kind
] ?? kind;
({
chatbox: "Chatbox 研究",
manual: "手工研究",
ai: "AI 研究(历史)",
template: "模板研究",
variant: "Alpha 变体",
feature: "特征工程",
pipeline: "研究流水线",
quantflow: "QuantFlow",
})[kind] ?? kind;
export function SourceDetails({
source,
@@ -25,6 +32,22 @@ export function SourceDetails({
<p>来源引用:{source.reference}</p>
)}
<div className="inline-actions">
{source.research_id &&
["template", "variant", "feature", "pipeline", "quantflow"].includes(
source.kind,
) && (
<Button
onClick={() =>
onAction({
type: "open_experiment",
experiment_id: source.research_id!,
nonce: Date.now(),
})
}
>
查看研究实验
</Button>
)}
{source.kind === "chatbox" && source.reference && (
<Button
onClick={() =>