feat(deep-assessment): refresh exploration graph in place
This commit is contained in:
parent
1d1db56a04
commit
f0b0bb5400
|
|
@ -26,7 +26,7 @@ export default function GraphBrief({ task, t, onIntent, onGoIntents }) {
|
|||
{steps.length ? (
|
||||
<>
|
||||
<ul className="assessment-graph-intents" aria-label="目标拆解">
|
||||
{steps.slice(0, PREVIEW_LIMIT).map(step => {
|
||||
{steps.slice(-PREVIEW_LIMIT).map(step => {
|
||||
const dependencies = (step.depends_on || []).map(id => titles.get(id) || id);
|
||||
return (
|
||||
<li key={step.id}>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Fragment, useEffect, useRef, useState } from 'react';
|
||||
import { toastError } from '../../components/ui';
|
||||
import { GRAPH_KIND_COLOR } from './labels';
|
||||
import { GRAPH_COLUMN_GAP, graphPositions } from './graphLayout';
|
||||
import { GRAPH_COLUMN_GAP, graphPositions, updatedGraphPositions } from './graphLayout';
|
||||
|
||||
const STYLE = [
|
||||
{
|
||||
|
|
@ -114,35 +114,58 @@ function visibleLabels(cy, model, selected, hovered, measure) {
|
|||
return labels;
|
||||
}
|
||||
|
||||
export function fitGraph(cy) {
|
||||
function fitGraph(cy) {
|
||||
const nodes = cy.nodes(':visible');
|
||||
if (nodes.empty()) return;
|
||||
cy.fit(nodes, 45);
|
||||
if (cy.zoom() > 1) cy.zoom(1).center(nodes);
|
||||
}
|
||||
|
||||
export function zoomGraph(cy, factor) {
|
||||
function zoomGraph(cy, factor) {
|
||||
cy.zoom({
|
||||
level: cy.zoom() * factor,
|
||||
renderedPosition: { x: cy.width() / 2, y: cy.height() / 2 }
|
||||
});
|
||||
}
|
||||
|
||||
export default function GraphCanvas({ model, graphKey, selectedId, showAll, locate, onSelect, cyRef }) {
|
||||
function graphElements(model, positions) {
|
||||
return [
|
||||
...[...model.nodes.values()].map(node => ({
|
||||
data: {
|
||||
id: node.id, kind: node.kind, boundary: Number(Boolean(node.boundary)),
|
||||
color: GRAPH_KIND_COLOR[node.kind] || '#86909c'
|
||||
},
|
||||
position: positions.get(node.id)
|
||||
})),
|
||||
...model.edges.map(edge => {
|
||||
const source = positions.get(edge.source);
|
||||
const target = positions.get(edge.target);
|
||||
const dx = target.x - source.x;
|
||||
const route = dx > GRAPH_COLUMN_GAP * 1.5 ? 'long-flow' : 'flow';
|
||||
return {
|
||||
data: {
|
||||
...edge, projection: edge.projection || '',
|
||||
bend: target.y < source.y ? -28 : 28
|
||||
},
|
||||
classes: dx > 0 && model.layoutEdges.has(edge.id) ? route : ''
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
|
||||
export default function GraphCanvas({ model, graphKey, selectedId, showAll, locate, onSelect, chartRef }) {
|
||||
const containerRef = useRef(null);
|
||||
const chartRef = useRef(null);
|
||||
const viewRef = useRef(null);
|
||||
const controlsRef = useRef({ selectedId, showAll, locate, onSelect });
|
||||
const controlsRef = useRef({ model, selectedId, showAll, locate, onSelect });
|
||||
const [labels, setLabels] = useState([]);
|
||||
|
||||
useEffect(() => {
|
||||
controlsRef.current = { selectedId, showAll, locate, onSelect };
|
||||
chartRef.current?.syncSelection();
|
||||
}, [selectedId, showAll, locate, onSelect]);
|
||||
controlsRef.current = { model, selectedId, showAll, locate, onSelect };
|
||||
chartRef.current?.sync();
|
||||
}, [model, selectedId, showAll, locate, onSelect, chartRef]);
|
||||
|
||||
useEffect(() => {
|
||||
const container = containerRef.current;
|
||||
if (!model.nodes.size) {
|
||||
if (!graphKey) {
|
||||
setLabels([]);
|
||||
return undefined;
|
||||
}
|
||||
|
|
@ -151,6 +174,7 @@ export default function GraphCanvas({ model, graphKey, selectedId, showAll, loca
|
|||
let frame;
|
||||
let resize;
|
||||
let hovered;
|
||||
let appliedModel;
|
||||
let centeredRequest;
|
||||
let previousSelection;
|
||||
let previousShowAll = controlsRef.current.showAll;
|
||||
|
|
@ -158,36 +182,13 @@ export default function GraphCanvas({ model, graphKey, selectedId, showAll, loca
|
|||
|
||||
import('cytoscape').then(({ default: cytoscape }) => {
|
||||
if (disposed) return;
|
||||
const positions = graphPositions(model);
|
||||
const elements = [
|
||||
...[...model.nodes.values()].map(node => ({
|
||||
data: {
|
||||
id: node.id, kind: node.kind, boundary: Number(Boolean(node.boundary)),
|
||||
color: GRAPH_KIND_COLOR[node.kind] || '#86909c'
|
||||
},
|
||||
position: positions.get(node.id)
|
||||
})),
|
||||
...model.edges.map(edge => {
|
||||
const source = positions.get(edge.source);
|
||||
const target = positions.get(edge.target);
|
||||
const spansColumns = target.x - source.x > GRAPH_COLUMN_GAP * 1.5;
|
||||
return {
|
||||
data: {
|
||||
...edge, projection: edge.projection || '',
|
||||
bend: target.y < source.y ? -28 : 28
|
||||
},
|
||||
classes: model.layoutEdges.has(edge.id) ? (spansColumns ? 'long-flow' : 'flow') : ''
|
||||
};
|
||||
})
|
||||
];
|
||||
cy = cytoscape({
|
||||
container, elements, style: STYLE,
|
||||
container, style: STYLE,
|
||||
layout: { name: 'preset', fit: false },
|
||||
wheelSensitivity: 0.2, minZoom: 0.005, maxZoom: 3,
|
||||
boxSelectionEnabled: false,
|
||||
autounselectify: true
|
||||
});
|
||||
cyRef.current = cy;
|
||||
const measurement = document.createElement('canvas').getContext('2d');
|
||||
measurement.font = `12px ${getComputedStyle(container).fontFamily}`;
|
||||
const widths = new Map();
|
||||
|
|
@ -198,10 +199,10 @@ export default function GraphCanvas({ model, graphKey, selectedId, showAll, loca
|
|||
const selectedNode = () => cy.$id(controlsRef.current.selectedId)[0];
|
||||
const updateLabels = () => {
|
||||
cancelAnimationFrame(frame);
|
||||
frame = requestAnimationFrame(() => setLabels(visibleLabels(cy, model, selectedNode(), hovered, measure)));
|
||||
frame = requestAnimationFrame(() => setLabels(visibleLabels(cy, appliedModel, selectedNode(), hovered, measure)));
|
||||
};
|
||||
const syncSelection = () => {
|
||||
const { showAll, locate } = controlsRef.current;
|
||||
const { model, selectedId, showAll, locate } = controlsRef.current;
|
||||
const selected = selectedNode();
|
||||
const related = selected?.connectedEdges() || cy.collection();
|
||||
const neighbors = related.connectedNodes();
|
||||
|
|
@ -225,22 +226,34 @@ export default function GraphCanvas({ model, graphKey, selectedId, showAll, loca
|
|||
centeredRequest = locate;
|
||||
const zoom = Math.max(cy.zoom(), 1);
|
||||
cy.zoom(zoom).center(selected);
|
||||
} else if (!selected && (showAll !== previousShowAll || (overview && previousSelection?.hidden()))) {
|
||||
} else if (!selected && (showAll !== previousShowAll
|
||||
|| (!selectedId && overview && previousSelection?.hidden()))) {
|
||||
fitGraph(cy);
|
||||
}
|
||||
previousSelection = selected;
|
||||
previousShowAll = showAll;
|
||||
updateLabels();
|
||||
};
|
||||
chartRef.current = { syncSelection };
|
||||
const saved = viewRef.current;
|
||||
const restore = saved?.key === graphKey;
|
||||
if (restore) {
|
||||
cy.viewport(saved);
|
||||
centeredRequest = controlsRef.current.locate;
|
||||
}
|
||||
syncSelection();
|
||||
if (!restore && !centeredRequest) fitGraph(cy);
|
||||
const sync = (reset = false) => {
|
||||
const { model } = controlsRef.current;
|
||||
const initial = !appliedModel;
|
||||
if (reset || model !== appliedModel) {
|
||||
const positions = reset ? graphPositions(model) : updatedGraphPositions(
|
||||
model, new Map(cy.nodes().map(node => [node.id(), node.position()]))
|
||||
);
|
||||
appliedModel = model;
|
||||
cy.json({ elements: graphElements(model, positions) });
|
||||
}
|
||||
syncSelection();
|
||||
if (reset || (initial && !centeredRequest)) fitGraph(cy);
|
||||
};
|
||||
chartRef.current = {
|
||||
sync,
|
||||
fit: () => fitGraph(cy),
|
||||
zoom: factor => zoomGraph(cy, factor),
|
||||
resetLayout: () => sync(true)
|
||||
};
|
||||
sync();
|
||||
cy.on('pan zoom position', updateLabels);
|
||||
cy.on('tap', event => {
|
||||
if (event.target === cy) controlsRef.current.onSelect('');
|
||||
|
|
@ -257,6 +270,7 @@ export default function GraphCanvas({ model, graphKey, selectedId, showAll, loca
|
|||
cy.resize();
|
||||
const nextWidth = cy.width();
|
||||
const nextHeight = cy.height();
|
||||
if (nextWidth === width && nextHeight === height) return;
|
||||
cy.panBy({ x: (nextWidth - width) / 2, y: (nextHeight - height) / 2 });
|
||||
width = nextWidth;
|
||||
height = nextHeight;
|
||||
|
|
@ -276,14 +290,10 @@ export default function GraphCanvas({ model, graphKey, selectedId, showAll, loca
|
|||
disposed = true;
|
||||
cancelAnimationFrame(frame);
|
||||
resize?.disconnect();
|
||||
if (cy) {
|
||||
viewRef.current = { key: graphKey, zoom: cy.zoom(), pan: cy.pan() };
|
||||
cy.destroy();
|
||||
}
|
||||
cy?.destroy();
|
||||
chartRef.current = null;
|
||||
cyRef.current = null;
|
||||
};
|
||||
}, [model, graphKey, cyRef]);
|
||||
}, [graphKey, chartRef]);
|
||||
|
||||
return (
|
||||
<div className="assessment-graph-viewport" role="group" aria-label="探索图">
|
||||
|
|
|
|||
|
|
@ -1,19 +1,21 @@
|
|||
/** 探索图:cytoscape 渲染、节点下钻与证据路径。 */
|
||||
import { useCallback, useMemo, useRef, useState } from 'react';
|
||||
import { Button, Empty, RadioGroup, Select, Space, Tag, Typography } from '@douyinfe/semi-ui';
|
||||
import { Button, Empty, RadioGroup, Select, Space, Switch, Tag, Typography } from '@douyinfe/semi-ui';
|
||||
import { api } from '../../lib/http';
|
||||
import { useT } from '../../lib/i18n';
|
||||
import { useResource } from '../../components/hooks';
|
||||
import { useInterval, useResource } from '../../components/hooks';
|
||||
import { SectionCard, ErrorBanner, JsonViewer, KeyValueList, toastError } from '../../components/ui';
|
||||
import { formatDateTime } from '../../lib/format';
|
||||
import { kindText, stateText, truncateText } from './labels';
|
||||
import GraphCanvas, { fitGraph, zoomGraph } from './GraphCanvas';
|
||||
import GraphCanvas from './GraphCanvas';
|
||||
import GraphBrief from './GraphBrief';
|
||||
import { prepareGraph, graphPositions } from './graphLayout';
|
||||
import { prepareGraph } from './graphLayout';
|
||||
|
||||
const { Text, Paragraph } = Typography;
|
||||
|
||||
export default function GraphTab({ id, task, reloadToken, onGoIntents }) {
|
||||
export default function GraphTab({
|
||||
id, task, reloadToken, onGoIntents, autoRefresh, onAutoRefreshChange, onRefreshTask, refreshPaused
|
||||
}) {
|
||||
const t = useT();
|
||||
const [view, setView] = useState('summary');
|
||||
const [scope, setScope] = useState('');
|
||||
|
|
@ -30,15 +32,22 @@ export default function GraphTab({ id, task, reloadToken, onGoIntents }) {
|
|||
const [nodeLoading, setNodeLoading] = useState(false);
|
||||
const [pathView, setPathView] = useState(null);
|
||||
const [pathLoading, setPathLoading] = useState(false);
|
||||
const cyRef = useRef(null);
|
||||
const chartRef = useRef(null);
|
||||
const lastGraph = useRef(null);
|
||||
const polling = useRef(false);
|
||||
const nodeRequest = useRef(0);
|
||||
|
||||
const graphKey = JSON.stringify([id, view, scope, offset]);
|
||||
const resource = useResource(
|
||||
async () => ({
|
||||
key: graphKey,
|
||||
graph: await api.get(`/deep-assessments/${id}/graph`, { view, scope, offset, limit: 80 })
|
||||
}),
|
||||
async () => {
|
||||
const graph = await api.get(`/deep-assessments/${id}/graph`, { view, scope, offset, limit: 80 });
|
||||
const snapshot = JSON.stringify(graph);
|
||||
const previous = lastGraph.current;
|
||||
if (previous?.key === graphKey && previous.snapshot === snapshot) return previous;
|
||||
const next = { key: graphKey, snapshot, graph };
|
||||
lastGraph.current = next;
|
||||
return next;
|
||||
},
|
||||
[id, view, scope, offset, reloadToken]
|
||||
);
|
||||
const graph = resource.data?.graph;
|
||||
|
|
@ -103,13 +112,17 @@ export default function GraphTab({ id, task, reloadToken, onGoIntents }) {
|
|||
}
|
||||
};
|
||||
|
||||
const relayout = () => {
|
||||
const cy = cyRef.current;
|
||||
if (!cy) return;
|
||||
const positions = graphPositions(model);
|
||||
cy.nodes().positions(node => positions.get(node.id()));
|
||||
fitGraph(cy);
|
||||
};
|
||||
const refresh = options => Promise.all([resource.reload(options), onRefreshTask(options)]);
|
||||
|
||||
useInterval(async () => {
|
||||
if (document.hidden || refreshPaused || resource.loading || polling.current) return;
|
||||
polling.current = true;
|
||||
try {
|
||||
await refresh({ silent: true });
|
||||
} finally {
|
||||
polling.current = false;
|
||||
}
|
||||
}, autoRefresh ? 10000 : 0);
|
||||
|
||||
const headExtra = (
|
||||
<Space wrap>
|
||||
|
|
@ -125,7 +138,7 @@ export default function GraphTab({ id, task, reloadToken, onGoIntents }) {
|
|||
onChange={event => { setView(event.target.value); setOffset(0); }}
|
||||
/>
|
||||
<Button size="small" onClick={() => { setScope(''); setOffset(0); }} disabled={!scope && offset === 0}>全图概览</Button>
|
||||
<Button size="small" onClick={() => resource.reload()} loading={resource.loading}>刷新</Button>
|
||||
<Button size="small" onClick={() => refresh()} loading={resource.loading}>刷新</Button>
|
||||
</Space>
|
||||
);
|
||||
|
||||
|
|
@ -142,7 +155,7 @@ export default function GraphTab({ id, task, reloadToken, onGoIntents }) {
|
|||
description="点击节点查看原文与直接关联,放大可查看更多节点名称。"
|
||||
extra={headExtra}
|
||||
>
|
||||
<ErrorBanner error={resource.error} onRetry={() => resource.reload()} />
|
||||
<ErrorBanner error={resource.error} onRetry={() => refresh()} />
|
||||
<GraphBrief
|
||||
task={task}
|
||||
t={t}
|
||||
|
|
@ -162,6 +175,10 @@ export default function GraphTab({ id, task, reloadToken, onGoIntents }) {
|
|||
<Button size="small" theme="borderless" onClick={() => { setScope(''); setOffset(0); }}>返回全图</Button>
|
||||
</Space>
|
||||
) : null}
|
||||
<Space spacing={6}>
|
||||
<Text size="small" type="tertiary">自动刷新</Text>
|
||||
<Switch size="small" aria-label="自动刷新探索图" checked={autoRefresh} onChange={onAutoRefreshChange} />
|
||||
</Space>
|
||||
</div>
|
||||
{resource.loading && !graph ? <Text type="tertiary">正在读取图谱…</Text> : null}
|
||||
<div className="assessment-graph-toolbar">
|
||||
|
|
@ -185,7 +202,7 @@ export default function GraphTab({ id, task, reloadToken, onGoIntents }) {
|
|||
</Button>
|
||||
</Space>
|
||||
</div>
|
||||
{graph && nodes.length === 0 ? (
|
||||
{graph && nodes.length === 0 && !selectedId ? (
|
||||
<Empty
|
||||
title="暂无图谱节点"
|
||||
description="开始测评后会生成目标、意图、事实与证据节点。"
|
||||
|
|
@ -195,10 +212,10 @@ export default function GraphTab({ id, task, reloadToken, onGoIntents }) {
|
|||
<>
|
||||
<div className="assessment-graph-tools">
|
||||
<Space wrap>
|
||||
<Button size="small" aria-label="缩小图谱" disabled={!nodes.length} onClick={() => cyRef.current && zoomGraph(cyRef.current, 0.8)}>−</Button>
|
||||
<Button size="small" aria-label="放大图谱" disabled={!nodes.length} onClick={() => cyRef.current && zoomGraph(cyRef.current, 1.25)}>+</Button>
|
||||
<Button size="small" disabled={!nodes.length} onClick={() => cyRef.current && fitGraph(cyRef.current)}>适应画布</Button>
|
||||
<Button size="small" disabled={!nodes.length} onClick={relayout}>重置布局</Button>
|
||||
<Button size="small" aria-label="缩小图谱" disabled={!nodes.length} onClick={() => chartRef.current?.zoom(0.8)}>−</Button>
|
||||
<Button size="small" aria-label="放大图谱" disabled={!nodes.length} onClick={() => chartRef.current?.zoom(1.25)}>+</Button>
|
||||
<Button size="small" disabled={!nodes.length} onClick={() => chartRef.current?.fit()}>适应画布</Button>
|
||||
<Button size="small" disabled={!nodes.length} onClick={() => chartRef.current?.resetLayout()}>重置布局</Button>
|
||||
</Space>
|
||||
{canExpand ? (
|
||||
<Space wrap>
|
||||
|
|
@ -218,7 +235,7 @@ export default function GraphTab({ id, task, reloadToken, onGoIntents }) {
|
|||
</div>
|
||||
) : null}
|
||||
<div className={`assessment-graph-layout${selectedId ? ' with-details' : ''}`}>
|
||||
<GraphCanvas model={model} graphKey={resource.data?.key} selectedId={selectedId} showAll={showAll} locate={locate} onSelect={selectNode} cyRef={cyRef} />
|
||||
<GraphCanvas model={model} graphKey={resource.data?.key} selectedId={selectedId} showAll={showAll} locate={locate} onSelect={selectNode} chartRef={chartRef} />
|
||||
{selectedId ? (
|
||||
<div className="assessment-node-panel" aria-live="polite">
|
||||
<div className="assessment-node-body">
|
||||
|
|
|
|||
|
|
@ -348,7 +348,16 @@ export default function Workbench({ id, tab, criterion, evidencePath, evidenceSt
|
|||
) : activeTab === 'assets' ? (
|
||||
<AssetsTab id={id} task={task} observation={observation} reloadToken={reloadToken} />
|
||||
) : activeTab === 'graph' ? (
|
||||
<GraphTab id={id} task={task} reloadToken={reloadToken} onGoIntents={() => onTabChange?.('intents')} />
|
||||
<GraphTab
|
||||
id={id}
|
||||
task={task}
|
||||
reloadToken={reloadToken}
|
||||
onGoIntents={() => onTabChange?.('intents')}
|
||||
autoRefresh={autoRefresh}
|
||||
onAutoRefreshChange={setAutoRefresh}
|
||||
onRefreshTask={resource.reload}
|
||||
refreshPaused={Boolean(busy) || resource.loading}
|
||||
/>
|
||||
) : activeTab === 'findings' ? (
|
||||
<FindingsTab id={id} task={task} reloadToken={reloadToken} />
|
||||
) : activeTab === 'acceptance' ? (
|
||||
|
|
|
|||
|
|
@ -35,12 +35,16 @@ function hasUpstream(upstream, start, target) {
|
|||
export function prepareGraph(graph) {
|
||||
const nodes = new Map((graph?.nodes || []).map(node => [node.id, node]));
|
||||
const styles = new Set();
|
||||
const edgeOccurrences = new Map();
|
||||
const edges = (graph?.edges || [])
|
||||
.filter(edge => nodes.has(edge.source) && nodes.has(edge.target))
|
||||
.map((edge, index) => {
|
||||
.map(edge => {
|
||||
const style = RELATION_STYLES.find(item => item.relations.includes(edge.relation)) || RELATION_STYLES.at(-1);
|
||||
styles.add(style);
|
||||
return { ...edge, id: `edge-${index}`, color: style.color };
|
||||
const key = JSON.stringify([edge.source, edge.target, edge.relation, edge.projection]);
|
||||
const occurrence = edgeOccurrences.get(key) || 0;
|
||||
edgeOccurrences.set(key, occurrence + 1);
|
||||
return { ...edge, id: `edge:${key}:${occurrence}`, color: style.color };
|
||||
});
|
||||
const parents = new Map();
|
||||
const ordered = edges.map(edge => ({ edge, priority: edgePriority(edge, nodes) }));
|
||||
|
|
@ -92,6 +96,7 @@ export function prepareGraph(graph) {
|
|||
|
||||
export const GRAPH_COLUMN_GAP = 168;
|
||||
const GRAPH_LEVEL_GAP = 36;
|
||||
const GRAPH_ROW_GAP = 76;
|
||||
|
||||
export function graphPositions({ nodes, upstream }) {
|
||||
const depths = new Map();
|
||||
|
|
@ -142,7 +147,7 @@ export function graphPositions({ nodes, upstream }) {
|
|||
const stagger = [0, 23, -23, 35, -35][columnIndex % 5];
|
||||
column.forEach((id, index) => positions.set(id, {
|
||||
x,
|
||||
y: (index - (column.length - 1) / 2) * 76 + stagger
|
||||
y: (index - (column.length - 1) / 2) * GRAPH_ROW_GAP + stagger
|
||||
}));
|
||||
x += GRAPH_COLUMN_GAP;
|
||||
columnIndex += 1;
|
||||
|
|
@ -152,3 +157,25 @@ export function graphPositions({ nodes, upstream }) {
|
|||
}
|
||||
return positions;
|
||||
}
|
||||
|
||||
|
||||
/** Keep existing positions during refresh and give new nodes a free slot near their branch. */
|
||||
export function updatedGraphPositions(model, previous) {
|
||||
const proposed = graphPositions(model);
|
||||
if (!previous.size) return proposed;
|
||||
|
||||
const placed = new Map([...previous].filter(([id]) => model.nodes.has(id)));
|
||||
for (const [id, position] of proposed) {
|
||||
if (placed.has(id)) continue;
|
||||
const parentPositions = [...model.upstream.get(id)].map(parent => placed.get(parent).x + GRAPH_COLUMN_GAP);
|
||||
const x = Math.max(position.x, ...parentPositions);
|
||||
const occupied = [...placed.values()].filter(other => Math.abs(other.x - x) < GRAPH_COLUMN_GAP / 2);
|
||||
let y = position.y;
|
||||
for (let offset = 1; occupied.some(other => Math.abs(other.y - y) < GRAPH_ROW_GAP / 2); offset += 1) {
|
||||
const step = Math.ceil(offset / 2) * (offset % 2 ? 1 : -1);
|
||||
y = position.y + step * GRAPH_ROW_GAP;
|
||||
}
|
||||
placed.set(id, { x, y });
|
||||
}
|
||||
return placed;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1155,6 +1155,78 @@ test('deep assessment: graph brief reflects saved intents and the current task s
|
|||
expect(mockApi.writes()).toEqual([]);
|
||||
});
|
||||
|
||||
test('deep assessment: graph polls saved progress without moving the selection or viewport', async ({ page, mockApi }) => {
|
||||
await page.clock.install();
|
||||
const path = `/api/deep-assessments/${ASSESSMENT.id}`;
|
||||
const first = { id: 'existing', title: '已有意图', status: 'completed' };
|
||||
const added = { id: 'new', title: '新保存的意图', status: 'pending' };
|
||||
const goal = { id: 'goal', kind: 'goal', title: '图谱目标' };
|
||||
const stepNode = step => ({ id: `step:${step.id}`, kind: 'step', title: step.title, state: step.status });
|
||||
const node = { ...stepNode(first), body: '当前阅读中的意图详情' };
|
||||
const connect = step => ({ source: goal.id, target: stepNode(step).id, relation: 'plans' });
|
||||
const task = { ...ASSESSMENT, steps: [first], summary: '已有阶段总结' };
|
||||
|
||||
mockApi.respond('GET', path, { json: { task } });
|
||||
mockApi.respond('GET', `${path}/events`, { json: { events: [] } });
|
||||
mockApi.respond('GET', `${path}/graph`, { json: { nodes: [goal, node], edges: [connect(first)], primary_count: 1, total: 1 } });
|
||||
mockApi.respond('GET', `${path}/graph/node`, { json: { node } });
|
||||
await page.goto(`/static/app/#/deep-assessments?id=${ASSESSMENT.id}&tab=graph`);
|
||||
const main = await ready(page);
|
||||
const graph = main.getByRole('group', { name: '探索图' });
|
||||
const brief = main.locator('.assessment-graph-brief');
|
||||
await brief.locator('summary').click();
|
||||
await button(brief, first.title).click();
|
||||
await expect(main.getByText(node.body)).toBeVisible();
|
||||
const selected = graph.getByRole('button', { name: first.title, pressed: true });
|
||||
const root = graph.getByRole('button', { name: goal.title });
|
||||
await expect(selected).toBeVisible();
|
||||
await main.getByRole('button', { name: '放大图谱' }).click();
|
||||
await graph.scrollIntoViewIfNeeded();
|
||||
const bounds = await graph.boundingBox();
|
||||
await page.mouse.move(bounds.x + bounds.width * 0.65, bounds.y + 100);
|
||||
await page.mouse.down();
|
||||
await page.mouse.move(bounds.x + bounds.width * 0.65 + 48, bounds.y + 132, { steps: 4 });
|
||||
await page.mouse.up();
|
||||
const canvas = graph.locator('canvas').first();
|
||||
await canvas.evaluate(element => { element.dataset.viewportCheck = 'kept'; });
|
||||
const coordinates = async () => {
|
||||
const box = await graph.boundingBox();
|
||||
const markers = await Promise.all([selected.boundingBox(), root.boundingBox()]);
|
||||
return markers.flatMap(marker => marker ? [marker.x - box.x, marker.y - box.y] : []);
|
||||
};
|
||||
const before = await coordinates();
|
||||
expect(before).toHaveLength(4);
|
||||
|
||||
const updated = { ...task, steps: [first, added], summary: '自动读到的新阶段总结' };
|
||||
mockApi.respond('GET', path, { json: { task: updated } });
|
||||
mockApi.respond('GET', `${path}/graph`, { json: {
|
||||
nodes: [goal, stepNode(added), node],
|
||||
edges: [connect(added), connect(first)],
|
||||
primary_count: 2, total: 2
|
||||
} });
|
||||
|
||||
await page.clock.fastForward(10000);
|
||||
await expect(brief.getByText(updated.summary)).toBeVisible();
|
||||
await expect(button(brief, added.title)).toBeVisible();
|
||||
await expect(main.getByText(/当前页节点 2 \/ 2/)).toBeVisible();
|
||||
await expect(canvas).toHaveAttribute('data-viewport-check', 'kept');
|
||||
await expect(main.getByText(node.body)).toBeVisible();
|
||||
await expect(selected).toBeVisible();
|
||||
const after = await coordinates();
|
||||
expect(after).toHaveLength(before.length);
|
||||
after.forEach((value, i) => expect(value).toBeCloseTo(before[i], 0));
|
||||
await button(main, '关闭详情').click();
|
||||
await expect(graph.getByRole('button', { name: added.title })).toBeVisible();
|
||||
|
||||
await main.getByRole('switch', { name: '自动刷新探索图' }).click();
|
||||
const graphReads = mockApi.calls('GET', `${path}/graph`).length;
|
||||
const taskReads = mockApi.calls('GET', path).length;
|
||||
await page.clock.fastForward(20000);
|
||||
expect(mockApi.calls('GET', `${path}/graph`)).toHaveLength(graphReads);
|
||||
expect(mockApi.calls('GET', path)).toHaveLength(taskReads);
|
||||
expect(mockApi.writes()).toEqual([]);
|
||||
});
|
||||
|
||||
test('deep assessment: graph switches views and resets pagination on a narrow screen', async ({ page, mockApi }) => {
|
||||
const apiPath = `/api/deep-assessments/${ASSESSMENT.id}`;
|
||||
mockApi.respond('GET', `${apiPath}/events`, { json: { events: [] } });
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{S as t,t as n}from"./react-QV7DAAIx.js";import{F as r,H as i,L as a,M as o,W as s,at as c,ct as l,i as u,ot as d,wt as f,xt as p}from"./semi-DCiGoqD2.js";import{F as m,I as h,P as g,a as _,b as v,c as y,d as b,f as x,l as S,m as C,p as w,s as T,u as E,x as D,y as O}from"./index-CexI4Ljq.js";var k=e(t(),1),A=e(n(),1),{Text:j}=s;function M(){let e=g(),{hasPermission:t}=m(),n=t(`agents:write`),s=t(`agents:delete`),[M,N]=(0,k.useState)(``),[P,F]=(0,k.useState)(null),[I,L]=(0,k.useState)(null),[R,z]=(0,k.useState)(!1),B=_(()=>h.get(`/multi-agent/markdown-agents`),[]),V=(Array.isArray(B.data?.agents)?B.data.agents:[]).filter(e=>{if(!M)return!0;let t=M.toLowerCase();return[e.name,e.id,e.filename,e.description].some(e=>String(e||``).toLowerCase().includes(t))}),H=async e=>{try{F(await h.get(`/multi-agent/markdown-agents/${encodeURIComponent(e.filename)}`))}catch(e){v(e,`读取智能体失败`)}},U=async()=>{let e=await I.form.validate();z(!0);try{await h.post(`/multi-agent/markdown-agents`,{filename:e.filename?.trim()||``,name:e.name.trim(),description:e.description?.trim()||``,instruction:e.instruction,kind:e.kind||`sub`,tools:String(e.tools||``).split(`,`).map(e=>e.trim()).filter(Boolean)}),D(`智能体已保存`),L(null),B.reload()}catch(e){v(e,`保存智能体失败`)}finally{z(!1)}},W=e=>O({title:`删除智能体「${e.name||e.filename}」?`,onOk:async()=>{await h.del(`/multi-agent/markdown-agents/${encodeURIComponent(e.filename)}`),D(`已删除`),B.reload()}});return(0,A.jsxs)(`div`,{children:[(0,A.jsx)(w,{title:e(`agents.title`,null,`智能体管理`),description:B.data?.dir?`目录:${B.data.dir}`:`以 Markdown 文件定义的子智能体与编排器。`,extra:(0,A.jsxs)(r,{children:[(0,A.jsx)(a,{icon:(0,A.jsx)(d,{}),onClick:()=>B.reload(),loading:B.loading,children:`刷新`}),n&&(0,A.jsx)(a,{theme:`solid`,type:`primary`,icon:(0,A.jsx)(l,{}),onClick:()=>L({record:null,form:{}}),children:`新建智能体`})]})}),B.data?.error&&(0,A.jsx)(S,{error:B.data.error}),(0,A.jsxs)(C,{title:`智能体(${V.length})`,children:[(0,A.jsx)(S,{error:B.error,onRetry:()=>B.reload()}),(0,A.jsx)(T,{columns:[{title:`智能体`,dataIndex:`name`,render:(e,t)=>(0,A.jsxs)(r,{vertical:!0,spacing:0,align:`start`,children:[(0,A.jsxs)(r,{children:[(0,A.jsx)(j,{strong:!0,children:e||t.id}),t.is_orchestrator&&(0,A.jsx)(o,{size:`small`,color:`purple`,children:`编排器`})]}),(0,A.jsx)(j,{type:`tertiary`,children:t.filename})]})},{title:`类型`,dataIndex:`kind`,width:110,render:e=>(0,A.jsx)(o,{size:`small`,children:e||`sub`})},{title:`描述`,dataIndex:`description`,render:e=>(0,A.jsx)(j,{type:`tertiary`,ellipsis:{showTooltip:!0},style:{maxWidth:460},children:e||`—`})},{title:`操作`,width:180,render:(e,t)=>(0,A.jsxs)(r,{children:[(0,A.jsx)(a,{size:`small`,theme:`borderless`,onClick:()=>H(t),children:`详情`}),n&&(0,A.jsx)(a,{size:`small`,theme:`borderless`,icon:(0,A.jsx)(p,{}),onClick:()=>L({record:t,form:{}})}),s&&(0,A.jsx)(a,{size:`small`,theme:`borderless`,type:`danger`,icon:(0,A.jsx)(f,{}),onClick:()=>W(t)})]})}],dataSource:V,rowKey:`filename`,loading:B.loading,pagination:{pageSize:20},toolbar:(0,A.jsx)(i,{prefix:(0,A.jsx)(c,{}),value:M,onChange:N,placeholder:`搜索名称或文件名`,style:{width:280}})})]}),(0,A.jsx)(y,{title:I?.record?`编辑智能体`:`新建智能体`,visible:!!I,onCancel:()=>L(null),onOk:U,confirmLoading:R,width:760,children:(0,A.jsxs)(u,{getFormApi:e=>L(t=>t&&{...t,form:e}),initValues:I?.record?{filename:I.record.filename,name:I.record.name,description:I.record.description,kind:I.record.kind||`sub`}:{kind:`sub`},children:[(0,A.jsx)(u.Input,{field:`filename`,label:`文件名(留空自动生成)`,placeholder:`例如 recon.md`}),(0,A.jsx)(u.Input,{field:`name`,label:`名称`,rules:[{required:!0,message:`请输入名称`}]}),(0,A.jsx)(u.Input,{field:`description`,label:`描述`}),(0,A.jsx)(u.Select,{field:`kind`,label:`类型`,optionList:[{value:`sub`,label:`子智能体`},{value:`orchestrator`,label:`编排器`},{value:`plan_execute`,label:`计划执行`}]}),(0,A.jsx)(u.Input,{field:`tools`,label:`工具(逗号分隔)`,placeholder:`toolName, mcp::tool`}),(0,A.jsx)(u.TextArea,{field:`instruction`,label:`指令(Markdown)`,autosize:{minRows:8,maxRows:20}})]})},I?.record?.filename||`new-agent`),(0,A.jsx)(y,{title:P?.name||`智能体详情`,visible:!!P,onCancel:()=>F(null),width:720,children:P&&(0,A.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},children:[(0,A.jsx)(b,{items:[{label:`文件名`,value:P.filename},{label:`ID`,value:P.id},{label:`类型`,value:P.kind},{label:`绑定角色`,value:P.bind_role||`—`},{label:`最大迭代`,value:P.max_iterations??`—`},{label:`工具`,value:Array.isArray(P.tools)&&P.tools.length?P.tools.join(`、`):`—`}]}),(0,A.jsx)(x,{content:P.instruction||P.raw||``}),(0,A.jsx)(E,{value:P.raw||P,title:`原始 Markdown`,collapsed:!0})]})})]})}export{M as default};
|
||||
import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{S as t,t as n}from"./react-QV7DAAIx.js";import{F as r,H as i,L as a,M as o,W as s,at as c,ct as l,i as u,ot as d,wt as f,xt as p}from"./semi-DCiGoqD2.js";import{F as m,I as h,P as g,a as _,b as v,c as y,d as b,f as x,l as S,m as C,p as w,s as T,u as E,x as D,y as O}from"./index-COzcePjZ.js";var k=e(t(),1),A=e(n(),1),{Text:j}=s;function M(){let e=g(),{hasPermission:t}=m(),n=t(`agents:write`),s=t(`agents:delete`),[M,N]=(0,k.useState)(``),[P,F]=(0,k.useState)(null),[I,L]=(0,k.useState)(null),[R,z]=(0,k.useState)(!1),B=_(()=>h.get(`/multi-agent/markdown-agents`),[]),V=(Array.isArray(B.data?.agents)?B.data.agents:[]).filter(e=>{if(!M)return!0;let t=M.toLowerCase();return[e.name,e.id,e.filename,e.description].some(e=>String(e||``).toLowerCase().includes(t))}),H=async e=>{try{F(await h.get(`/multi-agent/markdown-agents/${encodeURIComponent(e.filename)}`))}catch(e){v(e,`读取智能体失败`)}},U=async()=>{let e=await I.form.validate();z(!0);try{await h.post(`/multi-agent/markdown-agents`,{filename:e.filename?.trim()||``,name:e.name.trim(),description:e.description?.trim()||``,instruction:e.instruction,kind:e.kind||`sub`,tools:String(e.tools||``).split(`,`).map(e=>e.trim()).filter(Boolean)}),D(`智能体已保存`),L(null),B.reload()}catch(e){v(e,`保存智能体失败`)}finally{z(!1)}},W=e=>O({title:`删除智能体「${e.name||e.filename}」?`,onOk:async()=>{await h.del(`/multi-agent/markdown-agents/${encodeURIComponent(e.filename)}`),D(`已删除`),B.reload()}});return(0,A.jsxs)(`div`,{children:[(0,A.jsx)(w,{title:e(`agents.title`,null,`智能体管理`),description:B.data?.dir?`目录:${B.data.dir}`:`以 Markdown 文件定义的子智能体与编排器。`,extra:(0,A.jsxs)(r,{children:[(0,A.jsx)(a,{icon:(0,A.jsx)(d,{}),onClick:()=>B.reload(),loading:B.loading,children:`刷新`}),n&&(0,A.jsx)(a,{theme:`solid`,type:`primary`,icon:(0,A.jsx)(l,{}),onClick:()=>L({record:null,form:{}}),children:`新建智能体`})]})}),B.data?.error&&(0,A.jsx)(S,{error:B.data.error}),(0,A.jsxs)(C,{title:`智能体(${V.length})`,children:[(0,A.jsx)(S,{error:B.error,onRetry:()=>B.reload()}),(0,A.jsx)(T,{columns:[{title:`智能体`,dataIndex:`name`,render:(e,t)=>(0,A.jsxs)(r,{vertical:!0,spacing:0,align:`start`,children:[(0,A.jsxs)(r,{children:[(0,A.jsx)(j,{strong:!0,children:e||t.id}),t.is_orchestrator&&(0,A.jsx)(o,{size:`small`,color:`purple`,children:`编排器`})]}),(0,A.jsx)(j,{type:`tertiary`,children:t.filename})]})},{title:`类型`,dataIndex:`kind`,width:110,render:e=>(0,A.jsx)(o,{size:`small`,children:e||`sub`})},{title:`描述`,dataIndex:`description`,render:e=>(0,A.jsx)(j,{type:`tertiary`,ellipsis:{showTooltip:!0},style:{maxWidth:460},children:e||`—`})},{title:`操作`,width:180,render:(e,t)=>(0,A.jsxs)(r,{children:[(0,A.jsx)(a,{size:`small`,theme:`borderless`,onClick:()=>H(t),children:`详情`}),n&&(0,A.jsx)(a,{size:`small`,theme:`borderless`,icon:(0,A.jsx)(p,{}),onClick:()=>L({record:t,form:{}})}),s&&(0,A.jsx)(a,{size:`small`,theme:`borderless`,type:`danger`,icon:(0,A.jsx)(f,{}),onClick:()=>W(t)})]})}],dataSource:V,rowKey:`filename`,loading:B.loading,pagination:{pageSize:20},toolbar:(0,A.jsx)(i,{prefix:(0,A.jsx)(c,{}),value:M,onChange:N,placeholder:`搜索名称或文件名`,style:{width:280}})})]}),(0,A.jsx)(y,{title:I?.record?`编辑智能体`:`新建智能体`,visible:!!I,onCancel:()=>L(null),onOk:U,confirmLoading:R,width:760,children:(0,A.jsxs)(u,{getFormApi:e=>L(t=>t&&{...t,form:e}),initValues:I?.record?{filename:I.record.filename,name:I.record.name,description:I.record.description,kind:I.record.kind||`sub`}:{kind:`sub`},children:[(0,A.jsx)(u.Input,{field:`filename`,label:`文件名(留空自动生成)`,placeholder:`例如 recon.md`}),(0,A.jsx)(u.Input,{field:`name`,label:`名称`,rules:[{required:!0,message:`请输入名称`}]}),(0,A.jsx)(u.Input,{field:`description`,label:`描述`}),(0,A.jsx)(u.Select,{field:`kind`,label:`类型`,optionList:[{value:`sub`,label:`子智能体`},{value:`orchestrator`,label:`编排器`},{value:`plan_execute`,label:`计划执行`}]}),(0,A.jsx)(u.Input,{field:`tools`,label:`工具(逗号分隔)`,placeholder:`toolName, mcp::tool`}),(0,A.jsx)(u.TextArea,{field:`instruction`,label:`指令(Markdown)`,autosize:{minRows:8,maxRows:20}})]})},I?.record?.filename||`new-agent`),(0,A.jsx)(y,{title:P?.name||`智能体详情`,visible:!!P,onCancel:()=>F(null),width:720,children:P&&(0,A.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},children:[(0,A.jsx)(b,{items:[{label:`文件名`,value:P.filename},{label:`ID`,value:P.id},{label:`类型`,value:P.kind},{label:`绑定角色`,value:P.bind_role||`—`},{label:`最大迭代`,value:P.max_iterations??`—`},{label:`工具`,value:Array.isArray(P.tools)&&P.tools.length?P.tools.join(`、`):`—`}]}),(0,A.jsx)(x,{content:P.instruction||P.raw||``}),(0,A.jsx)(E,{value:P.raw||P,title:`原始 Markdown`,collapsed:!0})]})})]})}export{M as default};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{I as e,L as t}from"./index-CexI4Ljq.js";var n=encodeURIComponent,r=t=>e.get(`/c2/listeners`,t),i=t=>e.post(`/c2/listeners`,t),a=(t,r)=>e.put(`/c2/listeners/${n(t)}`,r),o=t=>e.del(`/c2/listeners/${n(t)}`),s=t=>e.post(`/c2/listeners/${n(t)}/start`,{}),c=t=>e.post(`/c2/listeners/${n(t)}/stop`,{}),l=t=>e.get(`/c2/sessions`,t),u=t=>e.get(`/c2/sessions/${n(t)}`),d=t=>e.del(`/c2/sessions/${n(t)}`),f=t=>e.del(`/c2/sessions`,{body:{ids:t}}),p=(t,{sleepSeconds:r,jitterPercent:i})=>e.put(`/c2/sessions/${n(t)}/sleep`,{sleep_seconds:r,jitter_percent:i}),m=(t,r)=>e.put(`/c2/sessions/${n(t)}/note`,{note:r}),h=t=>e.get(`/c2/tasks`,t),g=t=>e.get(`/c2/tasks/${n(t)}`),_=t=>e.post(`/c2/tasks`,t),v=(t,r)=>e.post(`/c2/sessions/${n(t)}/tasks`,r),y=t=>e.post(`/c2/tasks/${n(t)}/cancel`,{}),b=(t,r=30)=>e.get(`/c2/tasks/${n(t)}/wait`,{timeout:r},{timeout:(r+10)*1e3}),x=t=>e.del(`/c2/tasks`,{body:{ids:t}}),S=(e,r)=>t(`/c2/tasks/${n(e)}/result-file`,{filename:r}),C=t=>e.post(`/c2/payloads/oneliner`,t),w=t=>e.post(`/c2/payloads/build`,t),T=(e,r)=>t(`/c2/payloads/${n(e)}/download`,{filename:r}),E=t=>e.get(`/c2/events`,t),D=t=>e.del(`/c2/events`,{body:{ids:t}}),O=()=>e.get(`/c2/profiles`),k=t=>e.post(`/c2/profiles`,t),A=(t,r)=>e.put(`/c2/profiles/${n(t)}`,r),j=t=>e.del(`/c2/profiles/${n(t)}`);async function M(){try{let t=await e.get(`/projects`,{limit:200});return Array.isArray(t?.projects)?t.projects:[]}catch{return[]}}export{b as A,h as C,c as D,s as E,a as O,l as S,p as T,g as _,k as a,O as b,D as c,d,f,u as g,S as h,i,A as k,o as l,T as m,w as n,v as o,x as p,y as r,_ as s,C as t,j as u,E as v,m as w,M as x,r as y};
|
||||
import{I as e,L as t}from"./index-COzcePjZ.js";var n=encodeURIComponent,r=t=>e.get(`/c2/listeners`,t),i=t=>e.post(`/c2/listeners`,t),a=(t,r)=>e.put(`/c2/listeners/${n(t)}`,r),o=t=>e.del(`/c2/listeners/${n(t)}`),s=t=>e.post(`/c2/listeners/${n(t)}/start`,{}),c=t=>e.post(`/c2/listeners/${n(t)}/stop`,{}),l=t=>e.get(`/c2/sessions`,t),u=t=>e.get(`/c2/sessions/${n(t)}`),d=t=>e.del(`/c2/sessions/${n(t)}`),f=t=>e.del(`/c2/sessions`,{body:{ids:t}}),p=(t,{sleepSeconds:r,jitterPercent:i})=>e.put(`/c2/sessions/${n(t)}/sleep`,{sleep_seconds:r,jitter_percent:i}),m=(t,r)=>e.put(`/c2/sessions/${n(t)}/note`,{note:r}),h=t=>e.get(`/c2/tasks`,t),g=t=>e.get(`/c2/tasks/${n(t)}`),_=t=>e.post(`/c2/tasks`,t),v=(t,r)=>e.post(`/c2/sessions/${n(t)}/tasks`,r),y=t=>e.post(`/c2/tasks/${n(t)}/cancel`,{}),b=(t,r=30)=>e.get(`/c2/tasks/${n(t)}/wait`,{timeout:r},{timeout:(r+10)*1e3}),x=t=>e.del(`/c2/tasks`,{body:{ids:t}}),S=(e,r)=>t(`/c2/tasks/${n(e)}/result-file`,{filename:r}),C=t=>e.post(`/c2/payloads/oneliner`,t),w=t=>e.post(`/c2/payloads/build`,t),T=(e,r)=>t(`/c2/payloads/${n(e)}/download`,{filename:r}),E=t=>e.get(`/c2/events`,t),D=t=>e.del(`/c2/events`,{body:{ids:t}}),O=()=>e.get(`/c2/profiles`),k=t=>e.post(`/c2/profiles`,t),A=(t,r)=>e.put(`/c2/profiles/${n(t)}`,r),j=t=>e.del(`/c2/profiles/${n(t)}`);async function M(){try{let t=await e.get(`/projects`,{limit:200});return Array.isArray(t?.projects)?t.projects:[]}catch{return[]}}export{b as A,h as C,c as D,s as E,a as O,l as S,p as T,g as _,k as a,O as b,D as c,d,f,u as g,S as h,i,A as k,o as l,T as m,w as n,v as o,x as p,y as r,_ as s,C as t,j as u,E as v,m as w,M as x,r as y};
|
||||
|
|
@ -1 +1 @@
|
|||
import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{F as t,L as n,W as r}from"./semi-DCiGoqD2.js";import{E as i,P as a,k as o}from"./index-CexI4Ljq.js";import"./c2-shared-DdWdvkU_.js";import{t as s}from"./react-QV7DAAIx.js";var c=e(s(),1),{Text:l}=r,u=[{value:`http_beacon`,label:`HTTP Beacon`},{value:`https_beacon`,label:`HTTPS Beacon`},{value:`tcp_reverse`,label:`TCP 反向`},{value:`websocket`,label:`WebSocket`}],d={running:`运行中`,stopped:`已停止`,error:`异常`},f={tcp_reverse:[{value:`bash`,label:`Bash (/dev/tcp)`},{value:`nc`,label:`Netcat (-e)`},{value:`nc_mkfifo`,label:`Netcat (mkfifo)`},{value:`python`,label:`Python`},{value:`perl`,label:`Perl`},{value:`powershell`,label:`PowerShell`}],http_beacon:[{value:`curl_beacon`,label:`Curl Beacon (HTTP)`}],https_beacon:[{value:`curl_beacon`,label:`Curl Beacon (HTTP)`}],websocket:[{value:`curl_beacon`,label:`Curl Beacon (HTTP)`}]},p=[{value:`shell`,label:`shell`},{value:`exec`,label:`exec`},{value:`ls`,label:`ls`},{value:`pwd`,label:`pwd`},{value:`cd`,label:`cd`},{value:`ps`,label:`ps`},{value:`kill_proc`,label:`kill_proc`},{value:`download`,label:`download`},{value:`upload`,label:`upload`},{value:`screenshot`,label:`screenshot`},{value:`sleep`,label:`sleep`},{value:`exit`,label:`exit`},{value:`self_delete`,label:`self_delete`},{value:`port_fwd`,label:`port_fwd`},{value:`socks_start`,label:`socks_start`},{value:`socks_stop`,label:`socks_stop`},{value:`load_assembly`,label:`load_assembly`},{value:`persist`,label:`persist`}],m=[{value:`queued`,label:`队列中`},{value:`sent`,label:`已发送`},{value:`running`,label:`执行中`},{value:`success`,label:`成功`},{value:`failed`,label:`失败`},{value:`cancelled`,label:`已取消`}],h=[{value:`info`,label:`信息`},{value:`warn`,label:`警告`},{value:`critical`,label:`严重`}],g=[{value:`listener`,label:`监听器`},{value:`session`,label:`会话`},{value:`task`,label:`任务`},{value:`payload`,label:`Payload`},{value:`opsec`,label:`OPSEC`}],_=[{value:`active`,label:`活跃`},{value:`sleeping`,label:`休眠`},{value:`dead`,label:`离线`},{value:`killed`,label:`已终止`}],v=[{value:`15m`,label:`最近15分钟`,ms:9e5},{value:`1h`,label:`最近1小时`,ms:36e5},{value:`24h`,label:`最近24小时`,ms:864e5},{value:`7d`,label:`最近7天`,ms:6048e5},{value:`all`,label:`全部`,ms:0}];function y(e){let t=v.find(t=>t.value===e);return!t||!t.ms?``:new Date(Date.now()-t.ms).toISOString()}function b({value:e,onChange:r,ns:i=`tasks`}){let o=a();return(0,c.jsxs)(t,{spacing:6,wrap:!0,className:`c2-time-presets`,children:[(0,c.jsx)(l,{type:`tertiary`,size:`small`,children:o(`c2.tasks.timePresets`,null,`快捷`)}),v.map(t=>(0,c.jsx)(n,{size:`small`,theme:t.value===e?`solid`:`borderless`,type:t.value===e?`primary`:`tertiary`,onClick:()=>r(t.value),children:o(`c2.${i}.preset${t.value===`all`?`All`:t.value}`,null,t.label)},t.value))]})}function x(e){let t=Number(e);return!Number.isFinite(t)||t<=0?`—`:t<1e3?`${Math.round(t)}ms`:t<6e4?`${(t/1e3).toFixed(1)}秒`:`${Math.round(t/6e4)}分钟`}function S({value:e}){let t=a();return e?(0,c.jsx)(`span`,{className:`c2-time-text`,title:i(e),children:o(e,t)}):(0,c.jsx)(l,{type:`tertiary`,children:`—`})}var C={running:`green`,stopped:`grey`,error:`red`},w={queued:`amber`,sent:`blue`,running:`blue`,success:`green`,failed:`red`,cancelled:`grey`},T={active:`green`,sleeping:`amber`,dead:`grey`,killed:`red`},E={info:`blue`,warn:`amber`,critical:`red`};export{d as a,T as c,m as d,p as f,y as g,x as h,C as i,_ as l,S as m,E as n,u as o,b as p,h as r,f as s,g as t,w as u};
|
||||
import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{F as t,L as n,W as r}from"./semi-DCiGoqD2.js";import{E as i,P as a,k as o}from"./index-COzcePjZ.js";import"./c2-shared-Czl_uisN.js";import{t as s}from"./react-QV7DAAIx.js";var c=e(s(),1),{Text:l}=r,u=[{value:`http_beacon`,label:`HTTP Beacon`},{value:`https_beacon`,label:`HTTPS Beacon`},{value:`tcp_reverse`,label:`TCP 反向`},{value:`websocket`,label:`WebSocket`}],d={running:`运行中`,stopped:`已停止`,error:`异常`},f={tcp_reverse:[{value:`bash`,label:`Bash (/dev/tcp)`},{value:`nc`,label:`Netcat (-e)`},{value:`nc_mkfifo`,label:`Netcat (mkfifo)`},{value:`python`,label:`Python`},{value:`perl`,label:`Perl`},{value:`powershell`,label:`PowerShell`}],http_beacon:[{value:`curl_beacon`,label:`Curl Beacon (HTTP)`}],https_beacon:[{value:`curl_beacon`,label:`Curl Beacon (HTTP)`}],websocket:[{value:`curl_beacon`,label:`Curl Beacon (HTTP)`}]},p=[{value:`shell`,label:`shell`},{value:`exec`,label:`exec`},{value:`ls`,label:`ls`},{value:`pwd`,label:`pwd`},{value:`cd`,label:`cd`},{value:`ps`,label:`ps`},{value:`kill_proc`,label:`kill_proc`},{value:`download`,label:`download`},{value:`upload`,label:`upload`},{value:`screenshot`,label:`screenshot`},{value:`sleep`,label:`sleep`},{value:`exit`,label:`exit`},{value:`self_delete`,label:`self_delete`},{value:`port_fwd`,label:`port_fwd`},{value:`socks_start`,label:`socks_start`},{value:`socks_stop`,label:`socks_stop`},{value:`load_assembly`,label:`load_assembly`},{value:`persist`,label:`persist`}],m=[{value:`queued`,label:`队列中`},{value:`sent`,label:`已发送`},{value:`running`,label:`执行中`},{value:`success`,label:`成功`},{value:`failed`,label:`失败`},{value:`cancelled`,label:`已取消`}],h=[{value:`info`,label:`信息`},{value:`warn`,label:`警告`},{value:`critical`,label:`严重`}],g=[{value:`listener`,label:`监听器`},{value:`session`,label:`会话`},{value:`task`,label:`任务`},{value:`payload`,label:`Payload`},{value:`opsec`,label:`OPSEC`}],_=[{value:`active`,label:`活跃`},{value:`sleeping`,label:`休眠`},{value:`dead`,label:`离线`},{value:`killed`,label:`已终止`}],v=[{value:`15m`,label:`最近15分钟`,ms:9e5},{value:`1h`,label:`最近1小时`,ms:36e5},{value:`24h`,label:`最近24小时`,ms:864e5},{value:`7d`,label:`最近7天`,ms:6048e5},{value:`all`,label:`全部`,ms:0}];function y(e){let t=v.find(t=>t.value===e);return!t||!t.ms?``:new Date(Date.now()-t.ms).toISOString()}function b({value:e,onChange:r,ns:i=`tasks`}){let o=a();return(0,c.jsxs)(t,{spacing:6,wrap:!0,className:`c2-time-presets`,children:[(0,c.jsx)(l,{type:`tertiary`,size:`small`,children:o(`c2.tasks.timePresets`,null,`快捷`)}),v.map(t=>(0,c.jsx)(n,{size:`small`,theme:t.value===e?`solid`:`borderless`,type:t.value===e?`primary`:`tertiary`,onClick:()=>r(t.value),children:o(`c2.${i}.preset${t.value===`all`?`All`:t.value}`,null,t.label)},t.value))]})}function x(e){let t=Number(e);return!Number.isFinite(t)||t<=0?`—`:t<1e3?`${Math.round(t)}ms`:t<6e4?`${(t/1e3).toFixed(1)}秒`:`${Math.round(t/6e4)}分钟`}function S({value:e}){let t=a();return e?(0,c.jsx)(`span`,{className:`c2-time-text`,title:i(e),children:o(e,t)}):(0,c.jsx)(l,{type:`tertiary`,children:`—`})}var C={running:`green`,stopped:`grey`,error:`red`},w={queued:`amber`,sent:`blue`,running:`blue`,success:`green`,failed:`red`,cancelled:`grey`},T={active:`green`,sleeping:`amber`,dead:`grey`,killed:`red`},E={info:`blue`,warn:`amber`,critical:`red`};export{d as a,T as c,m as d,p as f,y as g,x as h,C as i,_ as l,S as m,E as n,u as o,b as p,h as r,f as s,g as t,w as u};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{S as t,t as n}from"./react-QV7DAAIx.js";import{F as r,H as i,L as a,M as o,W as s,at as c,ot as l,wt as u}from"./semi-DCiGoqD2.js";import{E as d,F as f,I as p,P as m,a as h,c as g,d as _,l as v,m as y,p as b,s as x,u as S,x as C,y as w}from"./index-CexI4Ljq.js";var T=e(t(),1),E=e(n(),1),{Text:D}=s;function O(){let e=m(),{hasPermission:t}=f(),n=t(`knowledge:delete`),[s,O]=(0,T.useState)(``),[k,A]=(0,T.useState)(50),[j,M]=(0,T.useState)(null),N=h(()=>p.get(`/knowledge/retrieval-logs`,{conversationId:s||void 0,limit:k}),[s,k]),P=Array.isArray(N.data?.logs)?N.data.logs:[],F=e=>w({title:`删除该检索日志?`,content:e.query||e.id,onOk:async()=>{await p.del(`/knowledge/retrieval-logs/${encodeURIComponent(e.id)}`),C(`已删除`),N.reload()}});return(0,E.jsxs)(`div`,{children:[(0,E.jsx)(b,{title:e(`knowledge.retrievalLogsTitle`,null,`检索历史`),description:`记录智能体每次知识库检索的语句、命中项与会话,用于回溯回答依据。`,extra:(0,E.jsx)(a,{icon:(0,E.jsx)(l,{}),onClick:()=>N.reload(),loading:N.loading,children:`刷新`})}),(0,E.jsxs)(y,{title:`检索记录(${P.length})`,children:[(0,E.jsx)(v,{error:N.error,onRetry:()=>N.reload()}),(0,E.jsx)(x,{columns:[{title:`检索语句`,dataIndex:`query`,render:(e,t)=>(0,E.jsx)(`button`,{type:`button`,className:`link-button`,onClick:()=>M(t),style:{background:`none`,border:`none`,padding:0,cursor:`pointer`,textAlign:`left`,color:`var(--semi-color-primary)`},children:e||`—`})},{title:`风险类型`,dataIndex:`riskType`,width:140,render:e=>e?(0,E.jsx)(o,{size:`small`,children:e}):`—`},{title:`命中知识项`,dataIndex:`retrievedItems`,width:120,render:e=>(0,E.jsxs)(D,{type:`tertiary`,children:[Array.isArray(e)?e.length:0,` 条`]})},{title:`会话`,dataIndex:`conversationId`,width:200,render:e=>(0,E.jsx)(D,{type:`tertiary`,ellipsis:{showTooltip:!0},children:e||`—`})},{title:`时间`,dataIndex:`createdAt`,width:180,render:e=>d(e)},{title:`操作`,width:110,render:(e,t)=>(0,E.jsxs)(r,{children:[(0,E.jsx)(a,{size:`small`,theme:`borderless`,onClick:()=>M(t),children:`详情`}),n&&(0,E.jsx)(a,{size:`small`,theme:`borderless`,type:`danger`,icon:(0,E.jsx)(u,{}),onClick:()=>F(t)})]})}],dataSource:P,rowKey:`id`,loading:N.loading,pagination:!1,toolbar:(0,E.jsxs)(r,{children:[(0,E.jsx)(i,{prefix:(0,E.jsx)(c,{}),placeholder:`按会话 ID 过滤`,value:s,onChange:O,style:{width:260}}),(0,E.jsx)(i,{placeholder:`条数`,value:String(k),onChange:e=>A(Math.min(Math.max(Number(e)||50,1),500)),style:{width:100},suffix:(0,E.jsx)(D,{type:`tertiary`,children:`条`})})]})})]}),(0,E.jsx)(g,{title:`检索日志详情`,visible:!!j,onCancel:()=>M(null),width:560,children:j&&(0,E.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},children:[(0,E.jsx)(_,{items:[{label:`日志 ID`,value:j.id},{label:`检索语句`,value:j.query},{label:`风险类型`,value:j.riskType||`—`},{label:`会话 ID`,value:j.conversationId||`—`},{label:`消息 ID`,value:j.messageId||`—`},{label:`时间`,value:d(j.createdAt)}]}),(0,E.jsx)(S,{value:j.retrievedItems||[],title:`命中知识项`})]})})]})}export{O as default};
|
||||
import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{S as t,t as n}from"./react-QV7DAAIx.js";import{F as r,H as i,L as a,M as o,W as s,at as c,ot as l,wt as u}from"./semi-DCiGoqD2.js";import{E as d,F as f,I as p,P as m,a as h,c as g,d as _,l as v,m as y,p as b,s as x,u as S,x as C,y as w}from"./index-COzcePjZ.js";var T=e(t(),1),E=e(n(),1),{Text:D}=s;function O(){let e=m(),{hasPermission:t}=f(),n=t(`knowledge:delete`),[s,O]=(0,T.useState)(``),[k,A]=(0,T.useState)(50),[j,M]=(0,T.useState)(null),N=h(()=>p.get(`/knowledge/retrieval-logs`,{conversationId:s||void 0,limit:k}),[s,k]),P=Array.isArray(N.data?.logs)?N.data.logs:[],F=e=>w({title:`删除该检索日志?`,content:e.query||e.id,onOk:async()=>{await p.del(`/knowledge/retrieval-logs/${encodeURIComponent(e.id)}`),C(`已删除`),N.reload()}});return(0,E.jsxs)(`div`,{children:[(0,E.jsx)(b,{title:e(`knowledge.retrievalLogsTitle`,null,`检索历史`),description:`记录智能体每次知识库检索的语句、命中项与会话,用于回溯回答依据。`,extra:(0,E.jsx)(a,{icon:(0,E.jsx)(l,{}),onClick:()=>N.reload(),loading:N.loading,children:`刷新`})}),(0,E.jsxs)(y,{title:`检索记录(${P.length})`,children:[(0,E.jsx)(v,{error:N.error,onRetry:()=>N.reload()}),(0,E.jsx)(x,{columns:[{title:`检索语句`,dataIndex:`query`,render:(e,t)=>(0,E.jsx)(`button`,{type:`button`,className:`link-button`,onClick:()=>M(t),style:{background:`none`,border:`none`,padding:0,cursor:`pointer`,textAlign:`left`,color:`var(--semi-color-primary)`},children:e||`—`})},{title:`风险类型`,dataIndex:`riskType`,width:140,render:e=>e?(0,E.jsx)(o,{size:`small`,children:e}):`—`},{title:`命中知识项`,dataIndex:`retrievedItems`,width:120,render:e=>(0,E.jsxs)(D,{type:`tertiary`,children:[Array.isArray(e)?e.length:0,` 条`]})},{title:`会话`,dataIndex:`conversationId`,width:200,render:e=>(0,E.jsx)(D,{type:`tertiary`,ellipsis:{showTooltip:!0},children:e||`—`})},{title:`时间`,dataIndex:`createdAt`,width:180,render:e=>d(e)},{title:`操作`,width:110,render:(e,t)=>(0,E.jsxs)(r,{children:[(0,E.jsx)(a,{size:`small`,theme:`borderless`,onClick:()=>M(t),children:`详情`}),n&&(0,E.jsx)(a,{size:`small`,theme:`borderless`,type:`danger`,icon:(0,E.jsx)(u,{}),onClick:()=>F(t)})]})}],dataSource:P,rowKey:`id`,loading:N.loading,pagination:!1,toolbar:(0,E.jsxs)(r,{children:[(0,E.jsx)(i,{prefix:(0,E.jsx)(c,{}),placeholder:`按会话 ID 过滤`,value:s,onChange:O,style:{width:260}}),(0,E.jsx)(i,{placeholder:`条数`,value:String(k),onChange:e=>A(Math.min(Math.max(Number(e)||50,1),500)),style:{width:100},suffix:(0,E.jsx)(D,{type:`tertiary`,children:`条`})})]})})]}),(0,E.jsx)(g,{title:`检索日志详情`,visible:!!j,onCancel:()=>M(null),width:560,children:j&&(0,E.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},children:[(0,E.jsx)(_,{items:[{label:`日志 ID`,value:j.id},{label:`检索语句`,value:j.query},{label:`风险类型`,value:j.riskType||`—`},{label:`会话 ID`,value:j.conversationId||`—`},{label:`消息 ID`,value:j.messageId||`—`},{label:`时间`,value:d(j.createdAt)}]}),(0,E.jsx)(S,{value:j.retrievedItems||[],title:`命中知识项`})]})})]})}export{O as default};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{S as t,t as n}from"./react-QV7DAAIx.js";import{W as r,i}from"./semi-DCiGoqD2.js";import{I as a,P as o,c as s,l as c,x as l}from"./index-CexI4Ljq.js";var u=e(t(),1),d=e(n(),1),{Text:f}=r,p=120,m=4e3;function h({visible:e,project:t,onCancel:n,onSaved:r}){let h=o(),g=(0,u.useId)(),[_,v]=(0,u.useState)(!1),[y,b]=(0,u.useState)(null),x=!!t?.id;return(0,u.useEffect)(()=>{b(null)},[e,t?.id]),(0,d.jsxs)(s,{visible:e,width:560,maskClosable:!1,onCancel:n,title:x?h(`projects.modalEditTitle`,null,`编辑项目`):h(`projects.modalNewTitle`,null,`新建项目`),formId:g,okText:x?h(`projects.saveChanges`,null,`保存修改`):h(`projects.createProject`,null,`创建项目`),confirmLoading:_,children:[(0,d.jsx)(f,{type:`tertiary`,size:`small`,children:x?h(`projects.modalEditSubtitle`,null,`修改项目名称与描述`):h(`projects.modalNewSubtitle`,null,`创建后可绑定对话,跨会话共享事实黑板`)}),(0,d.jsxs)(i,{id:g,onSubmit:async e=>{v(!0),b(null);try{let n={name:e.name.trim(),description:(e.description||``).slice(0,m)},i=x?await a.put(`/projects/${t.id}`,n):await a.post(`/projects`,n);l(x?h(`projects.saved`,null,`已保存`):h(`projects.createProject`,null,`创建项目`)),r?.(i)}catch(e){b(e)}finally{v(!1)}},initValues:{name:t?.name||``,description:t?.description||``},children:[(0,d.jsx)(i.Input,{field:`name`,maxLength:p,label:h(`projects.projectName`,null,`项目名称`),placeholder:h(`projects.projectNamePlaceholder`,null,`例如:某客户 Web 渗透`),rules:[{required:!0,whitespace:!0,message:h(`projects.enterProjectName`,null,`请输入项目名称`)}]}),(0,d.jsx)(i.TextArea,{field:`description`,rows:4,maxCount:m,label:h(`projects.projectDescription`,null,`项目描述`),placeholder:h(`projects.projectDescriptionPlaceholder`,null,`客户/任务备注、协作说明…`),extraText:h(`projects.descriptionLengthHint`,null,`仅供团队成员查阅,Agent 不会读取;需让 Agent 知晓的内容请写入事实黑板`)}),(0,d.jsx)(c,{error:y})]},`${e}-${t?.id||`new`}`)]})}export{h as t};
|
||||
import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{S as t,t as n}from"./react-QV7DAAIx.js";import{W as r,i}from"./semi-DCiGoqD2.js";import{I as a,P as o,c as s,l as c,x as l}from"./index-COzcePjZ.js";var u=e(t(),1),d=e(n(),1),{Text:f}=r,p=120,m=4e3;function h({visible:e,project:t,onCancel:n,onSaved:r}){let h=o(),g=(0,u.useId)(),[_,v]=(0,u.useState)(!1),[y,b]=(0,u.useState)(null),x=!!t?.id;return(0,u.useEffect)(()=>{b(null)},[e,t?.id]),(0,d.jsxs)(s,{visible:e,width:560,maskClosable:!1,onCancel:n,title:x?h(`projects.modalEditTitle`,null,`编辑项目`):h(`projects.modalNewTitle`,null,`新建项目`),formId:g,okText:x?h(`projects.saveChanges`,null,`保存修改`):h(`projects.createProject`,null,`创建项目`),confirmLoading:_,children:[(0,d.jsx)(f,{type:`tertiary`,size:`small`,children:x?h(`projects.modalEditSubtitle`,null,`修改项目名称与描述`):h(`projects.modalNewSubtitle`,null,`创建后可绑定对话,跨会话共享事实黑板`)}),(0,d.jsxs)(i,{id:g,onSubmit:async e=>{v(!0),b(null);try{let n={name:e.name.trim(),description:(e.description||``).slice(0,m)},i=x?await a.put(`/projects/${t.id}`,n):await a.post(`/projects`,n);l(x?h(`projects.saved`,null,`已保存`):h(`projects.createProject`,null,`创建项目`)),r?.(i)}catch(e){b(e)}finally{v(!1)}},initValues:{name:t?.name||``,description:t?.description||``},children:[(0,d.jsx)(i.Input,{field:`name`,maxLength:p,label:h(`projects.projectName`,null,`项目名称`),placeholder:h(`projects.projectNamePlaceholder`,null,`例如:某客户 Web 渗透`),rules:[{required:!0,whitespace:!0,message:h(`projects.enterProjectName`,null,`请输入项目名称`)}]}),(0,d.jsx)(i.TextArea,{field:`description`,rows:4,maxCount:m,label:h(`projects.projectDescription`,null,`项目描述`),placeholder:h(`projects.projectDescriptionPlaceholder`,null,`客户/任务备注、协作说明…`),extraText:h(`projects.descriptionLengthHint`,null,`仅供团队成员查阅,Agent 不会读取;需让 Agent 知晓的内容请写入事实黑板`)}),(0,d.jsx)(c,{error:y})]},`${e}-${t?.id||`new`}`)]})}export{h as t};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{S as t,t as n}from"./react-QV7DAAIx.js";import{F as r,H as i,L as a,M as o,W as s,at as c,ct as l,i as u,ot as d,wt as f,xt as p}from"./semi-DCiGoqD2.js";import{F as m,I as h,P as g,a as _,b as v,c as y,l as b,m as x,p as S,s as C,x as w,y as T}from"./index-CexI4Ljq.js";var E=e(t(),1),D=e(n(),1),{Text:O}=s;function k(){let e=g(),{hasPermission:t}=m(),n=t(`roles:write`),s=t(`roles:delete`),[k,A]=(0,E.useState)(``),[j,M]=(0,E.useState)(null),[N,P]=(0,E.useState)(!1),F=_(()=>h.get(`/roles`),[]),I=(Array.isArray(F.data?.roles)?F.data.roles:[]).filter(e=>{if(!k)return!0;let t=k.toLowerCase();return[e.name,e.description].some(e=>String(e||``).toLowerCase().includes(t))}),L=async()=>{let e=await j.form.validate();P(!0);try{let t={name:e.name.trim(),description:e.description?.trim()||``,user_prompt:e.user_prompt||``,tools:String(e.tools||``).split(`,`).map(e=>e.trim()).filter(Boolean),enabled:e.enabled!==!1},n=j.role?.name;n&&n!==t.name?(await h.post(`/roles`,t),await h.del(`/roles/${encodeURIComponent(n)}`)):n?await h.put(`/roles/${encodeURIComponent(n)}`,t):await h.post(`/roles`,t),w(`角色已保存`),M(null),F.reload()}catch(e){v(e,`保存角色失败`)}finally{P(!1)}},R=e=>T({title:`删除角色「${e.name}」?`,content:`已绑定该角色的对话将失去对应提示词与工具配置。`,onOk:async()=>{await h.del(`/roles/${encodeURIComponent(e.name)}`),w(`已删除`),F.reload()}});return(0,D.jsxs)(`div`,{children:[(0,D.jsx)(S,{title:e(`roles.title`,null,`角色管理`),description:`角色定义对话的系统提示词、可用工具与绑定工作流。`,extra:(0,D.jsxs)(r,{children:[(0,D.jsx)(a,{icon:(0,D.jsx)(d,{}),onClick:()=>F.reload(),loading:F.loading,children:`刷新`}),n&&(0,D.jsx)(a,{theme:`solid`,type:`primary`,icon:(0,D.jsx)(l,{}),onClick:()=>M({role:null,form:{}}),children:`新建角色`})]})}),(0,D.jsxs)(x,{title:`角色(${I.length})`,children:[(0,D.jsx)(b,{error:F.error,onRetry:()=>F.reload()}),(0,D.jsx)(C,{columns:[{title:`角色`,dataIndex:`name`,render:(e,t)=>(0,D.jsxs)(r,{vertical:!0,spacing:0,align:`start`,children:[(0,D.jsxs)(r,{children:[(0,D.jsx)(O,{strong:!0,children:e}),t.enabled===!1&&(0,D.jsx)(o,{size:`small`,color:`grey`,children:`已停用`})]}),(0,D.jsx)(O,{type:`tertiary`,ellipsis:{showTooltip:!0},style:{maxWidth:460},children:t.description||`—`})]})},{title:`工具`,dataIndex:`tools`,width:260,render:e=>Array.isArray(e)&&e.length?(0,D.jsxs)(r,{wrap:!0,spacing:4,children:[e.slice(0,4).map(e=>(0,D.jsx)(o,{size:`small`,children:e},e)),e.length>4&&(0,D.jsxs)(O,{type:`tertiary`,children:[`+`,e.length-4]})]}):(0,D.jsx)(O,{type:`tertiary`,children:`未绑定`})},{title:`工作流`,dataIndex:`workflow_id`,width:160,render:e=>e||`—`},{title:`操作`,width:150,render:(e,t)=>(0,D.jsxs)(r,{children:[n&&(0,D.jsx)(a,{size:`small`,theme:`borderless`,icon:(0,D.jsx)(p,{}),onClick:()=>M({role:t,form:{}}),children:`编辑`}),s&&(0,D.jsx)(a,{size:`small`,theme:`borderless`,type:`danger`,icon:(0,D.jsx)(f,{}),onClick:()=>R(t)})]})}],dataSource:I,rowKey:`name`,loading:F.loading,pagination:{pageSize:20},toolbar:(0,D.jsx)(i,{prefix:(0,D.jsx)(c,{}),value:k,onChange:A,placeholder:`搜索角色名称`,style:{width:260}})})]}),(0,D.jsx)(y,{title:j?.role?`编辑角色`:`新建角色`,visible:!!j,onCancel:()=>M(null),onOk:L,confirmLoading:N,width:760,children:(0,D.jsxs)(u,{getFormApi:e=>M(t=>t&&{...t,form:e}),initValues:j?.role?{name:j.role.name,description:j.role.description,user_prompt:j.role.user_prompt,tools:Array.isArray(j.role.tools)?j.role.tools.join(`, `):``,enabled:j.role.enabled!==!1}:{enabled:!0},children:[(0,D.jsx)(u.Input,{field:`name`,label:`角色名称`,rules:[{required:!0,message:`请输入角色名称`}]}),(0,D.jsx)(u.Input,{field:`description`,label:`描述`}),(0,D.jsx)(u.Input,{field:`tools`,label:`工具(逗号分隔)`,placeholder:`toolName, mcp::toolName`}),(0,D.jsx)(u.TextArea,{field:`user_prompt`,label:`用户提示词(追加到用户消息前)`,autosize:{minRows:6,maxRows:18}}),(0,D.jsx)(u.Slot,{label:`启用`,children:(0,D.jsx)(u.Switch,{field:`enabled`})})]})},j?.role?.name||`new-role`)]})}export{k as default};
|
||||
import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{S as t,t as n}from"./react-QV7DAAIx.js";import{F as r,H as i,L as a,M as o,W as s,at as c,ct as l,i as u,ot as d,wt as f,xt as p}from"./semi-DCiGoqD2.js";import{F as m,I as h,P as g,a as _,b as v,c as y,l as b,m as x,p as S,s as C,x as w,y as T}from"./index-COzcePjZ.js";var E=e(t(),1),D=e(n(),1),{Text:O}=s;function k(){let e=g(),{hasPermission:t}=m(),n=t(`roles:write`),s=t(`roles:delete`),[k,A]=(0,E.useState)(``),[j,M]=(0,E.useState)(null),[N,P]=(0,E.useState)(!1),F=_(()=>h.get(`/roles`),[]),I=(Array.isArray(F.data?.roles)?F.data.roles:[]).filter(e=>{if(!k)return!0;let t=k.toLowerCase();return[e.name,e.description].some(e=>String(e||``).toLowerCase().includes(t))}),L=async()=>{let e=await j.form.validate();P(!0);try{let t={name:e.name.trim(),description:e.description?.trim()||``,user_prompt:e.user_prompt||``,tools:String(e.tools||``).split(`,`).map(e=>e.trim()).filter(Boolean),enabled:e.enabled!==!1},n=j.role?.name;n&&n!==t.name?(await h.post(`/roles`,t),await h.del(`/roles/${encodeURIComponent(n)}`)):n?await h.put(`/roles/${encodeURIComponent(n)}`,t):await h.post(`/roles`,t),w(`角色已保存`),M(null),F.reload()}catch(e){v(e,`保存角色失败`)}finally{P(!1)}},R=e=>T({title:`删除角色「${e.name}」?`,content:`已绑定该角色的对话将失去对应提示词与工具配置。`,onOk:async()=>{await h.del(`/roles/${encodeURIComponent(e.name)}`),w(`已删除`),F.reload()}});return(0,D.jsxs)(`div`,{children:[(0,D.jsx)(S,{title:e(`roles.title`,null,`角色管理`),description:`角色定义对话的系统提示词、可用工具与绑定工作流。`,extra:(0,D.jsxs)(r,{children:[(0,D.jsx)(a,{icon:(0,D.jsx)(d,{}),onClick:()=>F.reload(),loading:F.loading,children:`刷新`}),n&&(0,D.jsx)(a,{theme:`solid`,type:`primary`,icon:(0,D.jsx)(l,{}),onClick:()=>M({role:null,form:{}}),children:`新建角色`})]})}),(0,D.jsxs)(x,{title:`角色(${I.length})`,children:[(0,D.jsx)(b,{error:F.error,onRetry:()=>F.reload()}),(0,D.jsx)(C,{columns:[{title:`角色`,dataIndex:`name`,render:(e,t)=>(0,D.jsxs)(r,{vertical:!0,spacing:0,align:`start`,children:[(0,D.jsxs)(r,{children:[(0,D.jsx)(O,{strong:!0,children:e}),t.enabled===!1&&(0,D.jsx)(o,{size:`small`,color:`grey`,children:`已停用`})]}),(0,D.jsx)(O,{type:`tertiary`,ellipsis:{showTooltip:!0},style:{maxWidth:460},children:t.description||`—`})]})},{title:`工具`,dataIndex:`tools`,width:260,render:e=>Array.isArray(e)&&e.length?(0,D.jsxs)(r,{wrap:!0,spacing:4,children:[e.slice(0,4).map(e=>(0,D.jsx)(o,{size:`small`,children:e},e)),e.length>4&&(0,D.jsxs)(O,{type:`tertiary`,children:[`+`,e.length-4]})]}):(0,D.jsx)(O,{type:`tertiary`,children:`未绑定`})},{title:`工作流`,dataIndex:`workflow_id`,width:160,render:e=>e||`—`},{title:`操作`,width:150,render:(e,t)=>(0,D.jsxs)(r,{children:[n&&(0,D.jsx)(a,{size:`small`,theme:`borderless`,icon:(0,D.jsx)(p,{}),onClick:()=>M({role:t,form:{}}),children:`编辑`}),s&&(0,D.jsx)(a,{size:`small`,theme:`borderless`,type:`danger`,icon:(0,D.jsx)(f,{}),onClick:()=>R(t)})]})}],dataSource:I,rowKey:`name`,loading:F.loading,pagination:{pageSize:20},toolbar:(0,D.jsx)(i,{prefix:(0,D.jsx)(c,{}),value:k,onChange:A,placeholder:`搜索角色名称`,style:{width:260}})})]}),(0,D.jsx)(y,{title:j?.role?`编辑角色`:`新建角色`,visible:!!j,onCancel:()=>M(null),onOk:L,confirmLoading:N,width:760,children:(0,D.jsxs)(u,{getFormApi:e=>M(t=>t&&{...t,form:e}),initValues:j?.role?{name:j.role.name,description:j.role.description,user_prompt:j.role.user_prompt,tools:Array.isArray(j.role.tools)?j.role.tools.join(`, `):``,enabled:j.role.enabled!==!1}:{enabled:!0},children:[(0,D.jsx)(u.Input,{field:`name`,label:`角色名称`,rules:[{required:!0,message:`请输入角色名称`}]}),(0,D.jsx)(u.Input,{field:`description`,label:`描述`}),(0,D.jsx)(u.Input,{field:`tools`,label:`工具(逗号分隔)`,placeholder:`toolName, mcp::toolName`}),(0,D.jsx)(u.TextArea,{field:`user_prompt`,label:`用户提示词(追加到用户消息前)`,autosize:{minRows:6,maxRows:18}}),(0,D.jsx)(u.Slot,{label:`启用`,children:(0,D.jsx)(u.Switch,{field:`enabled`})})]})},j?.role?.name||`new-role`)]})}export{k as default};
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{S as t,_ as n,t as r,y as i}from"./react-QV7DAAIx.js";import{A as a,F as o,Gt as s,H as c,I as l,L as u,M as d,O as f,St as p,W as m,X as h,at as g,c as _,f as v,h as y,m as b,ot as ee,p as x,s as S,u as C,v as w,x as T,z as E}from"./semi-DCiGoqD2.js";import{A as D,D as O,E as k,F as A,I as j,L as M,M as N,N as P,P as F,R as I,S as L,T as R,_ as te,a as z,b as B,d as V,j as ne,l as H,m as U,n as re,o as ie,p as ae,s as W,u as G,x as K,y as oe}from"./index-CexI4Ljq.js";import{n as se,r as ce,t as le}from"./model-channel-mQ6lfvSO.js";var q=e(t(),1),J=class extends Error{constructor(e,t){super(t?`第 ${t} 行:${e}`:e),this.name=`YamlError`,this.line=t||0}},ue=/^(?:[-?:,\[\]{}#&*!|>'"%@`]|.*[:\s]$|.*\s#|.*[\n\r\t])/,de=/^(?:true|false|null|~|yes|no|on|off|[-+]?(?:\d+|\d*\.\d+)(?:[eE][-+]?\d+)?)$/i;function fe(e){let t=String(e);return!(t===``||de.test(t)||/^[-+]?(?:\d+\.\d*|\.\d+|\d+)(?:[eE][-+]?\d+)?$/.test(t)||ue.test(t)||/^(?:\s)|:(?:\s|$)|[\r\n\t]/.test(t)||/[,[\]{}]/.test(t)||/^[!&*|>@`]/.test(t))}function pe(e){return JSON.stringify(String(e))}function me(e){let t=String(e);return fe(t)?t:pe(t)}function he(e){if(e==null)return`null`;if(typeof e==`boolean`)return e?`true`:`false`;if(typeof e==`number`)return Number.isFinite(e)?String(e):pe(String(e));let t=String(e);return fe(t)?t:pe(t)}function ge(e){return e==null||[`string`,`number`,`boolean`].includes(typeof e)}function _e(e,t,n,r){let i=` `.repeat(n),a=me(e);if(ge(t))r.push(`${i}${a}: ${he(t)}`);else if(Array.isArray(t)){if(!t.length){r.push(`${i}${a}: []`);return}r.push(`${i}${a}:`),be(t,n+2,r)}else Object.entries(t).length?(r.push(`${i}${a}:`),ve(t,n+2,r)):r.push(`${i}${a}: {}`)}function ve(e,t,n){for(let[r,i]of Object.entries(e))_e(r,i,t,n)}function ye(e,t,n){let r=` `.repeat(t);if(ge(e)){n.push(`${r}- ${he(e)}`);return}if(Array.isArray(e)){if(!e.length){n.push(`${r}- []`);return}n.push(`${r}-`),be(e,t+2,n);return}let i=Object.entries(e);if(!i.length){n.push(`${r}- {}`);return}let[a,o]=i[0],s=i.slice(1);ge(o)?n.push(`${r}- ${me(a)}: ${he(o)}`):(n.push(`${r}-`),_e(a,o,t+2,n));for(let[e,r]of s)_e(e,r,t+2,n)}function be(e,t,n){for(let r of e)ye(r,t,n)}function xe(e,{header:t}={}){let n=[];if(t){for(let e of String(t).replace(/\r\n?/g,`
|
||||
import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{S as t,_ as n,t as r,y as i}from"./react-QV7DAAIx.js";import{A as a,F as o,Gt as s,H as c,I as l,L as u,M as d,O as f,St as p,W as m,X as h,at as g,c as _,f as v,h as y,m as b,ot as ee,p as x,s as S,u as C,v as w,x as T,z as E}from"./semi-DCiGoqD2.js";import{A as D,D as O,E as k,F as A,I as j,L as M,M as N,N as P,P as F,R as I,S as L,T as R,_ as te,a as z,b as B,d as V,j as ne,l as H,m as U,n as re,o as ie,p as ae,s as W,u as G,x as K,y as oe}from"./index-COzcePjZ.js";import{n as se,r as ce,t as le}from"./model-channel-mQ6lfvSO.js";var q=e(t(),1),J=class extends Error{constructor(e,t){super(t?`第 ${t} 行:${e}`:e),this.name=`YamlError`,this.line=t||0}},ue=/^(?:[-?:,\[\]{}#&*!|>'"%@`]|.*[:\s]$|.*\s#|.*[\n\r\t])/,de=/^(?:true|false|null|~|yes|no|on|off|[-+]?(?:\d+|\d*\.\d+)(?:[eE][-+]?\d+)?)$/i;function fe(e){let t=String(e);return!(t===``||de.test(t)||/^[-+]?(?:\d+\.\d*|\.\d+|\d+)(?:[eE][-+]?\d+)?$/.test(t)||ue.test(t)||/^(?:\s)|:(?:\s|$)|[\r\n\t]/.test(t)||/[,[\]{}]/.test(t)||/^[!&*|>@`]/.test(t))}function pe(e){return JSON.stringify(String(e))}function me(e){let t=String(e);return fe(t)?t:pe(t)}function he(e){if(e==null)return`null`;if(typeof e==`boolean`)return e?`true`:`false`;if(typeof e==`number`)return Number.isFinite(e)?String(e):pe(String(e));let t=String(e);return fe(t)?t:pe(t)}function ge(e){return e==null||[`string`,`number`,`boolean`].includes(typeof e)}function _e(e,t,n,r){let i=` `.repeat(n),a=me(e);if(ge(t))r.push(`${i}${a}: ${he(t)}`);else if(Array.isArray(t)){if(!t.length){r.push(`${i}${a}: []`);return}r.push(`${i}${a}:`),be(t,n+2,r)}else Object.entries(t).length?(r.push(`${i}${a}:`),ve(t,n+2,r)):r.push(`${i}${a}: {}`)}function ve(e,t,n){for(let[r,i]of Object.entries(e))_e(r,i,t,n)}function ye(e,t,n){let r=` `.repeat(t);if(ge(e)){n.push(`${r}- ${he(e)}`);return}if(Array.isArray(e)){if(!e.length){n.push(`${r}- []`);return}n.push(`${r}-`),be(e,t+2,n);return}let i=Object.entries(e);if(!i.length){n.push(`${r}- {}`);return}let[a,o]=i[0],s=i.slice(1);ge(o)?n.push(`${r}- ${me(a)}: ${he(o)}`):(n.push(`${r}-`),_e(a,o,t+2,n));for(let[e,r]of s)_e(e,r,t+2,n)}function be(e,t,n){for(let r of e)ye(r,t,n)}function xe(e,{header:t}={}){let n=[];if(t){for(let e of String(t).replace(/\r\n?/g,`
|
||||
`).split(`
|
||||
`))n.push(`# ${e}`.trimEnd());n.length&&n.push(``)}return ge(e)?(n.push(he(e)),`${n.join(`
|
||||
`)}\n`):Array.isArray(e)?(e.length?be(e,0,n):n.push(`[]`),`${n.join(`
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{F as t,L as n,W as r,ot as i,wt as a}from"./semi-DCiGoqD2.js";import{D as o,F as s,I as c,O as l,P as u,_ as d,a as f,l as p,m,p as h,s as g,x as _,y as v}from"./index-CexI4Ljq.js";import{t as y}from"./react-QV7DAAIx.js";var b=e(y(),1),{Text:x}=r;function S(){let e=u(),{hasPermission:r}=s(),y=r(`skills:delete`),S=f(()=>c.get(`/skills/stats`),[]),C=Array.isArray(S.data?.stats)?S.data.stats:[],w=Number(S.data?.total_calls||0),T=Number(S.data?.total_success||0),E=w>0?T/w:null,D=()=>v({title:`清空所有技能调用统计?`,content:`只影响统计计数,不删除技能文件。`,onOk:async()=>{await c.del(`/skills/stats`),_(`统计已清空`),S.reload()}}),O=e=>v({title:`清空「${e}」的统计?`,onOk:async()=>{await c.del(`/skills/${encodeURIComponent(e)}/stats`),_(`已清空`),S.reload()}});return(0,b.jsxs)(`div`,{children:[(0,b.jsx)(h,{title:e(`skills.monitorTitle`,null,`技能状态`),description:S.data?.skills_dir?`技能目录:${S.data.skills_dir}`:`统计技能被调用的次数、成功率与最近使用时间。`,extra:(0,b.jsxs)(t,{children:[(0,b.jsx)(n,{icon:(0,b.jsx)(i,{}),onClick:()=>S.reload(),loading:S.loading,children:`刷新`}),y&&(0,b.jsx)(n,{type:`danger`,theme:`light`,onClick:D,children:`清空全部统计`})]})}),(0,b.jsx)(d,{columns:4,metrics:[{id:`skills`,label:`技能总数`,value:o(S.data?.total_skills||0),loading:S.loading},{id:`calls`,label:`调用总数`,value:o(w),loading:S.loading},{id:`success`,label:`成功次数`,value:o(T),loading:S.loading},{id:`rate`,label:`成功率`,value:E===null?`—`:l(E),tone:E!==null&&E<.8?`warning`:`success`,loading:S.loading}]}),(0,b.jsxs)(m,{title:`按技能统计`,children:[(0,b.jsx)(p,{error:S.error,onRetry:()=>S.reload()}),(0,b.jsx)(g,{columns:[{title:`技能`,dataIndex:`skill_name`,render:e=>(0,b.jsx)(x,{strong:!0,children:e})},{title:`调用次数`,dataIndex:`total_calls`,width:120,render:e=>o(e||0)},{title:`成功`,dataIndex:`success_calls`,width:100,render:e=>o(e||0)},{title:`失败`,dataIndex:`failed_calls`,width:100,render:e=>Number(e)>0?(0,b.jsx)(x,{type:`danger`,children:o(e)}):`0`},{title:`最后调用`,dataIndex:`last_call_time`,width:180,render:e=>e||`—`},{title:`操作`,width:110,render:(e,t)=>y&&Number(t.total_calls)>0?(0,b.jsx)(n,{size:`small`,theme:`borderless`,type:`danger`,icon:(0,b.jsx)(a,{}),onClick:()=>O(t.skill_name),children:`清空`}):null}],dataSource:C,rowKey:`skill_name`,loading:S.loading,pagination:{pageSize:20}})]})]})}export{S as default};
|
||||
import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{F as t,L as n,W as r,ot as i,wt as a}from"./semi-DCiGoqD2.js";import{D as o,F as s,I as c,O as l,P as u,_ as d,a as f,l as p,m,p as h,s as g,x as _,y as v}from"./index-COzcePjZ.js";import{t as y}from"./react-QV7DAAIx.js";var b=e(y(),1),{Text:x}=r;function S(){let e=u(),{hasPermission:r}=s(),y=r(`skills:delete`),S=f(()=>c.get(`/skills/stats`),[]),C=Array.isArray(S.data?.stats)?S.data.stats:[],w=Number(S.data?.total_calls||0),T=Number(S.data?.total_success||0),E=w>0?T/w:null,D=()=>v({title:`清空所有技能调用统计?`,content:`只影响统计计数,不删除技能文件。`,onOk:async()=>{await c.del(`/skills/stats`),_(`统计已清空`),S.reload()}}),O=e=>v({title:`清空「${e}」的统计?`,onOk:async()=>{await c.del(`/skills/${encodeURIComponent(e)}/stats`),_(`已清空`),S.reload()}});return(0,b.jsxs)(`div`,{children:[(0,b.jsx)(h,{title:e(`skills.monitorTitle`,null,`技能状态`),description:S.data?.skills_dir?`技能目录:${S.data.skills_dir}`:`统计技能被调用的次数、成功率与最近使用时间。`,extra:(0,b.jsxs)(t,{children:[(0,b.jsx)(n,{icon:(0,b.jsx)(i,{}),onClick:()=>S.reload(),loading:S.loading,children:`刷新`}),y&&(0,b.jsx)(n,{type:`danger`,theme:`light`,onClick:D,children:`清空全部统计`})]})}),(0,b.jsx)(d,{columns:4,metrics:[{id:`skills`,label:`技能总数`,value:o(S.data?.total_skills||0),loading:S.loading},{id:`calls`,label:`调用总数`,value:o(w),loading:S.loading},{id:`success`,label:`成功次数`,value:o(T),loading:S.loading},{id:`rate`,label:`成功率`,value:E===null?`—`:l(E),tone:E!==null&&E<.8?`warning`:`success`,loading:S.loading}]}),(0,b.jsxs)(m,{title:`按技能统计`,children:[(0,b.jsx)(p,{error:S.error,onRetry:()=>S.reload()}),(0,b.jsx)(g,{columns:[{title:`技能`,dataIndex:`skill_name`,render:e=>(0,b.jsx)(x,{strong:!0,children:e})},{title:`调用次数`,dataIndex:`total_calls`,width:120,render:e=>o(e||0)},{title:`成功`,dataIndex:`success_calls`,width:100,render:e=>o(e||0)},{title:`失败`,dataIndex:`failed_calls`,width:100,render:e=>Number(e)>0?(0,b.jsx)(x,{type:`danger`,children:o(e)}):`0`},{title:`最后调用`,dataIndex:`last_call_time`,width:180,render:e=>e||`—`},{title:`操作`,width:110,render:(e,t)=>y&&Number(t.total_calls)>0?(0,b.jsx)(n,{size:`small`,theme:`borderless`,type:`danger`,icon:(0,b.jsx)(a,{}),onClick:()=>O(t.skill_name),children:`清空`}):null}],dataSource:C,rowKey:`skill_name`,loading:S.loading,pagination:{pageSize:20}})]})]})}export{S as default};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -18,7 +18,7 @@
|
|||
} catch (error) { /* first paint fallback */ }
|
||||
})();
|
||||
</script>
|
||||
<script type="module" crossorigin src="/static/app/assets/index-CexI4Ljq.js"></script>
|
||||
<script type="module" crossorigin src="/static/app/assets/index-COzcePjZ.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="/static/app/assets/rolldown-runtime-WkwZ5CU-.js">
|
||||
<link rel="modulepreload" crossorigin href="/static/app/assets/react-QV7DAAIx.js">
|
||||
<link rel="modulepreload" crossorigin href="/static/app/assets/semi-DCiGoqD2.js">
|
||||
|
|
|
|||
Loading…
Reference in New Issue