feat(plugins): add source-aware evidence and recording timelines
This commit is contained in:
1 parent
72ff342605
commit
ef7af9988e
61 files changed
+3847
-108
No files matched your search
@@ -162,6 +162,7 @@ import {
|
||||
extractCheckerResult,
|
||||
renderMarkdownToHtml
|
||||
} from '../../utils/markdown-parser.util';
|
||||
import { getPluginToolView } from '../../utils/plugin-tool-view.util';
|
||||
|
||||
import {
|
||||
getActionObject,
|
||||
@@ -182,7 +183,8 @@ import {
|
||||
getStepPostImageUrl,
|
||||
isReportStatusAction,
|
||||
getReportStatusValue,
|
||||
getReportStatusExplanation
|
||||
getReportStatusExplanation,
|
||||
actionEvidenceSource
|
||||
} from '../../utils/action-formatter.util';
|
||||
|
||||
import {
|
||||
@@ -1612,6 +1614,17 @@ export class AgentStreamComponent implements AfterViewInit {
|
||||
}
|
||||
}
|
||||
|
||||
public evidenceSourceLabel(item: any): string { return actionEvidenceSource(item).label; }
|
||||
|
||||
public openEvidenceVideo(item: any, step: any, event: Event): void {
|
||||
event.stopPropagation();
|
||||
const started = this.agentService.currentSession()?.start_time;
|
||||
const value = item?.timestamp || item?.start_time || step?.timestamp;
|
||||
const timestamp = typeof value === 'number' ? value : Date.parse(value) / 1000;
|
||||
if (!started || !Number.isFinite(timestamp)) return;
|
||||
this.agentService.openVideoPlayer(undefined, undefined, undefined, Math.max(0, timestamp - started), undefined, actionEvidenceSource(item).id);
|
||||
}
|
||||
|
||||
public getScreenRecordingButtonTitle(): string {
|
||||
if (this.agentService.isCurrentSessionRunning()) {
|
||||
return this.agentService.currentSession()?.recording_status === 'recording' ? "任务正在运行(录屏中)" : "任务正在运行";
|
||||
@@ -1637,6 +1650,12 @@ export class AgentStreamComponent implements AfterViewInit {
|
||||
return isDeviceActionTool(tool);
|
||||
}
|
||||
|
||||
public getPluginToolView = getPluginToolView;
|
||||
|
||||
public isEvidenceTool(tool: any): boolean {
|
||||
return isDeviceActionTool(tool) || getPluginToolView(tool) !== null;
|
||||
}
|
||||
|
||||
public isFailureAnalyzerActionTool(tool: any): boolean {
|
||||
return isDeviceActionTool(tool);
|
||||
}
|
||||
@@ -2033,11 +2052,12 @@ export class AgentStreamComponent implements AfterViewInit {
|
||||
}
|
||||
|
||||
public getToolIcon(tool: any): string {
|
||||
return getToolIcon(tool);
|
||||
const plugin = getPluginToolView(tool);
|
||||
return plugin ? (plugin.auxiliary ? 'visibility' : 'extension') : getToolIcon(tool);
|
||||
}
|
||||
|
||||
public getToolTitle(tool: any): string {
|
||||
return getToolTitle(tool);
|
||||
return getPluginToolView(tool)?.title || getToolTitle(tool);
|
||||
}
|
||||
|
||||
public getToolTargetText(tool: any): string {
|
||||
|
||||
Reference in new issue
Block a user