mirror of
https://github.com/lWolvesl/antigravity-usage-monitor.git
synced 2026-11-26 17:09:28 +08:00
feat(panel): add live step search, danger-tier diagnostic chips, and click-to-inspect step drawer
This commit is contained in:
@@ -394,6 +394,8 @@ export const StepTableWidget = defineComponent({
|
||||
typeof props.onVirtualHeightChange === 'function' ? props.onVirtualHeightChange : null;
|
||||
const onSortChange =
|
||||
typeof props.onSortChange === 'function' ? props.onSortChange : null;
|
||||
const onSelectStep =
|
||||
typeof props.onSelectStep === 'function' ? props.onSelectStep : null;
|
||||
|
||||
const stepsTheadRow = h('tr');
|
||||
const stepsThead = h('thead', {}, [stepsTheadRow]);
|
||||
@@ -1137,7 +1139,8 @@ export const StepTableWidget = defineComponent({
|
||||
const stripeSig = isVirtualized ? (item.isStripeEven ? 'E' : 'O') : 'N';
|
||||
const anomalySig = st.anomalySig || '';
|
||||
const compactSig = isCompactionStepItem(st) ? 'C' : '';
|
||||
return `${locale}:${colOrderSig}:${stripeSig}:${badgeSig}:${anomalySig}:${compactSig}:${railActive}:${item.hasTurn}:${item.hasUp}:${item.hasDown}:${item.isStart}:${item.isLatest}:${item.prompt}:${parts}`;
|
||||
const selSig = ds.selectedStepKey && ds.selectedStepKey === item.rowKey ? 'S' : '';
|
||||
return `${locale}:${colOrderSig}:${stripeSig}:${badgeSig}:${anomalySig}:${compactSig}:${selSig}:${railActive}:${item.hasTurn}:${item.hasUp}:${item.hasDown}:${item.isStart}:${item.isLatest}:${item.prompt}:${parts}`;
|
||||
},
|
||||
createRow: (item) => {
|
||||
if (item.isSizer) {
|
||||
@@ -1364,6 +1367,7 @@ export const StepTableWidget = defineComponent({
|
||||
: t('steps.badgeFilterAgent', { agent: agentName })
|
||||
);
|
||||
refs.agentBadgeEl.onclick = (e) => {
|
||||
e?.stopPropagation?.();
|
||||
if (e && (e.ctrlKey || e.metaKey || e.shiftKey) && effectiveScopes[0] !== 'all') {
|
||||
const next = effectiveScopes.includes(targetScope)
|
||||
? effectiveScopes.filter((id) => id !== targetScope)
|
||||
@@ -1389,11 +1393,21 @@ export const StepTableWidget = defineComponent({
|
||||
const rowDiagGetter = hasRowTip
|
||||
? () => buildStepRowDiagnostic(st, cellCtx.displaySettings, hasStepAnomaly, isCompactionRow)
|
||||
: null;
|
||||
const isSelectedRow = Boolean(ds.selectedStepKey && ds.selectedStepKey === item.rowKey);
|
||||
patchClasses(tr, {
|
||||
'is-compaction': isCompactionRow,
|
||||
'is-anomaly-warn': isAnomalyWarn,
|
||||
'is-anomaly-danger': isAnomalyDanger,
|
||||
'is-selectable': Boolean(onSelectStep),
|
||||
'is-selected': isSelectedRow,
|
||||
});
|
||||
if (onSelectStep) {
|
||||
tr.onclick = () => {
|
||||
onSelectStep(st, item.rowKey);
|
||||
};
|
||||
} else {
|
||||
tr.onclick = null;
|
||||
}
|
||||
if (hasRowTip) {
|
||||
const anchorEl = firstTd || tr;
|
||||
tr.onmouseenter = () => {
|
||||
@@ -1567,6 +1581,7 @@ export const StepTableWidget = defineComponent({
|
||||
allowNewRowFade = false,
|
||||
sortKey = '',
|
||||
sortDir = '',
|
||||
selectedStepKey = '',
|
||||
} = {}
|
||||
) {
|
||||
const normCascadeId = String(cascadeId || '');
|
||||
@@ -1637,7 +1652,7 @@ export const StepTableWidget = defineComponent({
|
||||
cascadeId, locale, colOrderSig, effectiveScopes, hasSubagents, isMergedMultiAgents,
|
||||
effectiveTurnRail, showStepAgentBadge, showStepSpeedColor, normTokenFmt,
|
||||
displaySettings.modelDisplayMode, displaySettings.showUpstreamModel,
|
||||
displaySettings.orchestratorIdMode, normSortKey, normSortDir,
|
||||
displaySettings.orchestratorIdMode, normSortKey, normSortDir, String(selectedStepKey || ''),
|
||||
]);
|
||||
if (
|
||||
lastRenderOptions === renderOptions &&
|
||||
@@ -1736,6 +1751,7 @@ export const StepTableWidget = defineComponent({
|
||||
totalBodyH,
|
||||
sizerSpec,
|
||||
effectiveScopes,
|
||||
selectedStepKey: String(selectedStepKey || ''),
|
||||
formattedPrompts: new Map(),
|
||||
};
|
||||
renderedSliceStart = -1;
|
||||
|
||||
Reference in New Issue
Block a user