feat: add Super Alpha research, management and MCP workflows
Deploy production / deploy (push) Successful in 56s
Deploy production / deploy (push) Successful in 56s
This commit is contained in:
@@ -44,6 +44,7 @@ function filterSignature(filters: Record<string, unknown>) {
|
||||
}
|
||||
|
||||
export function SavedViews({
|
||||
managementScope = "non_super",
|
||||
filters,
|
||||
columns,
|
||||
submission,
|
||||
@@ -55,6 +56,7 @@ export function SavedViews({
|
||||
suspended,
|
||||
onOverlay,
|
||||
}: {
|
||||
managementScope?: "super" | "non_super";
|
||||
filters: Record<string, unknown>;
|
||||
columns: string[];
|
||||
submission: Submission;
|
||||
@@ -90,13 +92,22 @@ export function SavedViews({
|
||||
views.push(...result.items);
|
||||
if (views.length >= result.total || result.items.length === 0) break;
|
||||
}
|
||||
if (!controller.signal.aborted) setItems(views);
|
||||
if (!controller.signal.aborted)
|
||||
setItems(
|
||||
views.filter(
|
||||
(v) =>
|
||||
(v.content.filters.management_scope ??
|
||||
(v.content.filters.alpha_type === "SUPER"
|
||||
? "super"
|
||||
: "non_super")) === managementScope,
|
||||
),
|
||||
);
|
||||
}
|
||||
void load().catch((error: Error) => {
|
||||
if (!controller.signal.aborted) Toast.error(error.message);
|
||||
});
|
||||
return () => controller.abort();
|
||||
}, [revision]);
|
||||
}, [revision, managementScope]);
|
||||
|
||||
function openEditor(mode: Editor["mode"], view?: View) {
|
||||
const content = view?.content ?? { name: "", filters, columns };
|
||||
|
||||
@@ -5,6 +5,7 @@ import "./style.css";
|
||||
|
||||
export const sourceLabel = (kind: string) =>
|
||||
({
|
||||
superalpha: "Super Alpha 研究",
|
||||
chatbox: "Chatbox 研究",
|
||||
manual: "手工研究",
|
||||
mcp: "MCP 研究",
|
||||
@@ -33,6 +34,24 @@ export function SourceDetails({
|
||||
<p>来源引用:{source.reference}</p>
|
||||
)}
|
||||
<div className="inline-actions">
|
||||
{(source.superalpha_plan_id ||
|
||||
((source.kind === "superalpha" ||
|
||||
source.research_kind === "superalpha") &&
|
||||
source.research_id)) && (
|
||||
<Button
|
||||
onClick={() =>
|
||||
onAction({
|
||||
type: "open_superalpha_research",
|
||||
plan_id: source.superalpha_plan_id ?? undefined,
|
||||
version: source.superalpha_plan_version ?? undefined,
|
||||
experiment_id: source.research_id ?? undefined,
|
||||
nonce: Date.now(),
|
||||
})
|
||||
}
|
||||
>
|
||||
查看 Super Alpha 研究
|
||||
</Button>
|
||||
)}
|
||||
{source.research_id &&
|
||||
["template", "variant", "feature", "pipeline", "quantflow"].includes(
|
||||
source.kind,
|
||||
|
||||
Reference in New Issue
Block a user