feat: add durable WorldQuant backtests with UI and AI confirmation
This commit is contained in:
@@ -18,6 +18,7 @@ import {
|
||||
post,
|
||||
stateLabels,
|
||||
} from "../api";
|
||||
import { BacktestToolCard } from "../backtests/BacktestToolCard";
|
||||
import { PnlChart } from "../components/PnlChart";
|
||||
import type { Alpha, Job, Pnl, Research } from "../types";
|
||||
import { chatTransport } from "./transport";
|
||||
@@ -85,6 +86,8 @@ export function ChatPanel({
|
||||
"create_sync_job",
|
||||
"cancel_job",
|
||||
"retry_job",
|
||||
"start_backtest",
|
||||
"control_backtest",
|
||||
].includes(call.name) &&
|
||||
!seenWrites.current.has(call.id)
|
||||
) {
|
||||
@@ -434,9 +437,11 @@ export function ChatPanel({
|
||||
</div>
|
||||
<footer className="ai-composer" ref={input}>
|
||||
<div className="ai-context">
|
||||
{context.page === "account"
|
||||
? "上下文:个人信息页"
|
||||
: `上下文:${context.alpha_id ? `Alpha ${context.alpha_id}` : "Alpha 列表"}${context.selected_ids?.length ? ` · 已选 ${context.selected_ids.length} 条` : ""}`}
|
||||
{context.page === "backtests"
|
||||
? "上下文:回测研究"
|
||||
: context.page === "account"
|
||||
? "上下文:个人信息页"
|
||||
: `上下文:${context.alpha_id ? `Alpha ${context.alpha_id}` : "Alpha 列表"}${context.selected_ids?.length ? ` · 已选 ${context.selected_ids.length} 条` : ""}`}
|
||||
</div>
|
||||
<TextArea
|
||||
aria-label="发送给研究助手"
|
||||
@@ -537,6 +542,9 @@ function BusinessCard({
|
||||
{labels[call.status] ?? call.status}
|
||||
</Tag>
|
||||
</div>
|
||||
{call.name.includes("backtest") && (
|
||||
<BacktestToolCard call={call} onAction={onAction} />
|
||||
)}
|
||||
{call.preview.targets?.map((target) => (
|
||||
<details
|
||||
key={target.alpha_id}
|
||||
|
||||
Reference in New Issue
Block a user