feat: add versioned research templates and alpha variants
This commit is contained in:
@@ -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={() =>
|
||||
|
||||
Reference in New Issue
Block a user