fix: add bounded web-probe observe timeline drilldown (#937)

Co-authored-by: Codex <codex@noreply.local>
This commit is contained in:
Lyon
2026-06-26 10:20:28 +08:00
committed by GitHub
parent effd3656d4
commit 8abf188ee2
7 changed files with 247 additions and 5 deletions
@@ -19,6 +19,10 @@ export interface WebObserveWrapperInput {
readonly collectFile: string | null;
readonly collectTraceId: string | null;
readonly collectSampleSeq: number | null;
readonly collectTimestamp: string | null;
readonly collectTurn: number | null;
readonly collectCommandId: string | null;
readonly collectWindowMs: number | null;
readonly analyzeArchivePrefix: string | null;
}
@@ -36,6 +40,10 @@ export interface WebObserveWrapperOptionsLike {
readonly collectFile: string | null;
readonly collectTraceId: string | null;
readonly collectSampleSeq: number | null;
readonly collectTimestamp: string | null;
readonly collectTurn: number | null;
readonly collectCommandId: string | null;
readonly collectWindowMs: number | null;
readonly analyzeArchivePrefix: string | null;
}
@@ -106,6 +114,10 @@ export function buildWebObserveWrapperContract(input: WebObserveWrapperInput): R
collectFile: input.collectFile,
collectTraceId: input.collectTraceId,
collectSampleSeq: input.collectSampleSeq,
collectTimestamp: input.collectTimestamp,
collectTurn: input.collectTurn,
collectCommandId: input.collectCommandId,
collectWindowMs: input.collectWindowMs,
analyzeArchivePrefix: input.analyzeArchivePrefix,
valuesRedacted: true,
},
@@ -168,6 +180,10 @@ export function buildWebObserveWrapperForObserveOptions(
collectFile: options.collectFile,
collectTraceId: options.collectTraceId,
collectSampleSeq: options.collectSampleSeq,
collectTimestamp: options.collectTimestamp,
collectTurn: options.collectTurn,
collectCommandId: options.collectCommandId,
collectWindowMs: options.collectWindowMs,
analyzeArchivePrefix: options.analyzeArchivePrefix,
});
}
@@ -204,6 +220,10 @@ function webObserveWrapperCommandShape(input: WebObserveWrapperInput): string {
if (input.collectFile !== null) parts.push("--file", input.collectFile);
if (input.collectTraceId !== null) parts.push("--trace-id", input.collectTraceId);
if (input.collectSampleSeq !== null) parts.push("--sample-seq", String(input.collectSampleSeq));
if (input.collectTimestamp !== null) parts.push("--timestamp", input.collectTimestamp);
if (input.collectTurn !== null) parts.push("--turn", String(input.collectTurn));
if (input.collectCommandId !== null) parts.push("--command-id", input.collectCommandId);
if (input.collectWindowMs !== null) parts.push("--window-ms", String(input.collectWindowMs));
}
if (input.action === "analyze" && input.analyzeArchivePrefix !== null) {
parts.push("--archive-prefix", input.analyzeArchivePrefix);