@meridianlabs/inspect-scout-viewer 0.4.6 → 0.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/App.d.ts +1 -0
- package/lib/AppRouter.d.ts +2 -0
- package/lib/api/api.d.ts +13 -1
- package/lib/app/components/ActivityBarLayout.d.ts +2 -0
- package/lib/app/components/Chip.d.ts +12 -0
- package/lib/app/components/ChipGroup.d.ts +7 -0
- package/lib/app/components/NextPreviousNav.d.ts +11 -0
- package/lib/app/components/ProjectBar.d.ts +7 -0
- package/lib/app/components/ScansNavbar.d.ts +1 -1
- package/lib/app/components/ScoreValue.d.ts +9 -0
- package/lib/app/components/ValidationResult.d.ts +3 -0
- package/lib/app/hooks/useFilterConditions.d.ts +6 -0
- package/lib/app/project/ProjectPanel.d.ts +7 -0
- package/lib/app/project/SettingsContent.d.ts +7 -0
- package/lib/app/project/components/FormFields.d.ts +67 -0
- package/lib/app/project/configUtils.d.ts +30 -0
- package/lib/app/project/hooks/useNestedConfig.d.ts +28 -0
- package/lib/app/runScan/ActiveScanView.d.ts +6 -0
- package/lib/app/runScan/DefineScannerSection.d.ts +6 -0
- package/lib/app/runScan/RunScanPanel.d.ts +2 -0
- package/lib/app/scan/scanners/dataframe/DataframeGridApiContext.d.ts +7 -0
- package/lib/app/scan/scanners/dataframe/ScannerDataframeCSVButtons.d.ts +9 -0
- package/lib/app/scannerResult/result/ResultBody.d.ts +2 -2
- package/lib/app/scannerResult/result/ResultPanel.d.ts +3 -2
- package/lib/app/scans/ScansGrid.d.ts +2 -2
- package/lib/app/server/useActiveScan.d.ts +3 -0
- package/lib/app/server/useActiveScans.d.ts +3 -0
- package/lib/app/server/useAdjacentTranscriptIds.d.ts +10 -0
- package/lib/app/server/useCode.d.ts +4 -0
- package/lib/app/server/useConfig.d.ts +1 -0
- package/lib/app/server/useProjectConfig.d.ts +30 -0
- package/lib/app/server/useScan.d.ts +4 -0
- package/lib/app/server/useScanDataframe.d.ts +9 -0
- package/lib/app/server/useScanDataframeInput.d.ts +10 -0
- package/lib/app/server/useScans.d.ts +3 -0
- package/lib/app/server/{useServerScansInfinite.d.ts → useScansInfinite.d.ts} +1 -1
- package/lib/app/server/useServerTranscriptsInfinite.d.ts +9 -2
- package/lib/app/server/useStartScan.d.ts +3 -0
- package/lib/app/server/useTranscript.d.ts +9 -0
- package/lib/app/server/useTranscriptsColumnValues.d.ts +11 -0
- package/lib/app/transcript/TranscriptBody.d.ts +6 -1
- package/lib/app/transcript/TranscriptFilterPopover.d.ts +7 -0
- package/lib/app/transcript/TranscriptNav.d.ts +10 -0
- package/lib/app/transcript/hooks/useTranscriptColumnFilter.d.ts +11 -0
- package/lib/app/transcript/hooks/useTranscriptNavigation.d.ts +12 -0
- package/lib/app/transcripts/TranscriptColumnsButton.d.ts +6 -0
- package/lib/app/transcripts/TranscriptColumnsPopover.d.ts +7 -0
- package/lib/app/transcripts/TranscriptFilterBar.d.ts +7 -0
- package/lib/app/transcripts/TranscriptsGrid.d.ts +5 -0
- package/lib/app/transcripts/columnFilter/ColumnFilterButton.d.ts +6 -0
- package/lib/app/transcripts/columnFilter/ColumnFilterControl.d.ts +16 -0
- package/lib/app/transcripts/columnFilter/ColumnFilterEditor.d.ts +31 -0
- package/lib/app/transcripts/columnFilter/DurationInput.d.ts +9 -0
- package/lib/app/transcripts/columnFilter/index.d.ts +7 -0
- package/lib/app/transcripts/columnFilter/useAddFilterPopover.d.ts +34 -0
- package/lib/app/transcripts/columnFilter/useColumnFilter.d.ts +27 -0
- package/lib/app/transcripts/columnFilter/useColumnFilterPopover.d.ts +25 -0
- package/lib/app/transcripts/columnSizing/defaultStrategy.d.ts +2 -0
- package/lib/app/transcripts/columnSizing/fitContentStrategy.d.ts +2 -0
- package/lib/app/transcripts/columnSizing/index.d.ts +4 -0
- package/lib/app/transcripts/columnSizing/strategies.d.ts +10 -0
- package/lib/app/transcripts/columnSizing/types.d.ts +47 -0
- package/lib/app/transcripts/columnSizing/useColumnSizing.d.ts +34 -0
- package/lib/app/transcripts/columnSizing/utils.d.ts +14 -0
- package/lib/app/transcripts/columns.d.ts +37 -0
- package/lib/app/transcripts/constants.d.ts +35 -0
- package/lib/app/types.d.ts +1 -0
- package/lib/components/AutocompleteInput.d.ts +19 -0
- package/lib/components/FindBand.d.ts +6 -0
- package/lib/components/Modal.d.ts +10 -0
- package/lib/components/ToolButton.d.ts +2 -1
- package/lib/components/ToolDropdownButton.d.ts +3 -0
- package/lib/components/content/DisplayModeContext.d.ts +9 -0
- package/lib/components/icons.d.ts +4 -0
- package/lib/components/transcript/ScoreEventView.d.ts +0 -1
- package/lib/components/transcript/TranscriptViewNodes.d.ts +13 -0
- package/lib/components/transcript/outline/OutlineRow.d.ts +1 -0
- package/lib/components/transcript/types.d.ts +2 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +30097 -12545
- package/lib/index.js.map +1 -1
- package/lib/query/transcriptColumns.d.ts +1 -0
- package/lib/router/url.d.ts +3 -0
- package/lib/state/store.d.ts +23 -5
- package/lib/styles/index.css +1432 -267
- package/lib/types/api-types.d.ts +10 -1
- package/lib/types/generated.d.ts +1140 -37
- package/lib/utils/react-query.d.ts +1 -0
- package/package.json +2 -1
- package/lib/app/components/ToolButton.d.ts +0 -8
- package/lib/app/server/useServerScan.d.ts +0 -3
- package/lib/app/server/useServerScanDataframe.d.ts +0 -3
- package/lib/app/server/useServerScanDataframeInput.d.ts +0 -3
- package/lib/app/server/useServerScans.d.ts +0 -3
- package/lib/app/server/useServerTranscript.d.ts +0 -3
- package/lib/app/transcripts/ColumnFilterControl.d.ts +0 -11
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ScalarValue } from '../../../api/api';
|
|
3
|
+
import { SimpleCondition } from '../../../query/types';
|
|
4
|
+
import { FilterType } from '../../../state/store';
|
|
5
|
+
interface ColumnFilterControlProps {
|
|
6
|
+
columnId: string;
|
|
7
|
+
filterType: FilterType;
|
|
8
|
+
condition: SimpleCondition | null;
|
|
9
|
+
onChange: (condition: SimpleCondition | null) => void;
|
|
10
|
+
/** Autocomplete suggestions for the filter value */
|
|
11
|
+
suggestions?: ScalarValue[];
|
|
12
|
+
/** Called when the popover opens/closes (for fetching suggestions) */
|
|
13
|
+
onOpenChange?: (columnId: string | null) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const ColumnFilterControl: FC<ColumnFilterControlProps>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ScalarValue } from '../../../api/api';
|
|
3
|
+
import { OperatorModel } from '../../../query';
|
|
4
|
+
import { FilterType } from '../../../state/store';
|
|
5
|
+
export interface AvailableColumn {
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ColumnFilterEditorProps {
|
|
10
|
+
columnId: string;
|
|
11
|
+
filterType: FilterType;
|
|
12
|
+
operator: OperatorModel;
|
|
13
|
+
operatorOptions: OperatorModel[];
|
|
14
|
+
rawValue: string;
|
|
15
|
+
/** Second value for BETWEEN/NOT BETWEEN operators */
|
|
16
|
+
rawValue2?: string;
|
|
17
|
+
isValueDisabled: boolean;
|
|
18
|
+
/** True if operator expects a range with two values (BETWEEN, NOT BETWEEN) */
|
|
19
|
+
isRangeOperator?: boolean;
|
|
20
|
+
onOperatorChange: (operator: OperatorModel) => void;
|
|
21
|
+
onValueChange: (value: string) => void;
|
|
22
|
+
/** Handler for second value changes (BETWEEN operators) */
|
|
23
|
+
onValue2Change?: (value: string) => void;
|
|
24
|
+
onCommit?: () => void;
|
|
25
|
+
onCancel?: () => void;
|
|
26
|
+
suggestions?: ScalarValue[];
|
|
27
|
+
mode?: "add" | "edit";
|
|
28
|
+
availableColumns?: AvailableColumn[];
|
|
29
|
+
onColumnChange?: (columnId: string) => void;
|
|
30
|
+
}
|
|
31
|
+
export declare const ColumnFilterEditor: FC<ColumnFilterEditorProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ChangeEvent, FC } from 'react';
|
|
2
|
+
export interface DurationInputProps {
|
|
3
|
+
id: string;
|
|
4
|
+
value: string;
|
|
5
|
+
onChange: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
autoFocus?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const DurationInput: FC<DurationInputProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { ColumnFilterControl } from './ColumnFilterControl';
|
|
2
|
+
export { ColumnFilterButton } from './ColumnFilterButton';
|
|
3
|
+
export { ColumnFilterEditor } from './ColumnFilterEditor';
|
|
4
|
+
export { useColumnFilter } from './useColumnFilter';
|
|
5
|
+
export type { UseColumnFilterParams, UseColumnFilterReturn, } from './useColumnFilter';
|
|
6
|
+
export type { ColumnFilterEditorProps } from './ColumnFilterEditor';
|
|
7
|
+
export type { ColumnFilterButtonProps } from './ColumnFilterButton';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { OperatorModel } from '../../../query';
|
|
2
|
+
import { ColumnFilter } from '../../../state/store';
|
|
3
|
+
export interface AvailableColumn {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
interface UseAddFilterPopoverParams {
|
|
8
|
+
filters: Record<string, ColumnFilter>;
|
|
9
|
+
onAddFilter: (filter: ColumnFilter) => void;
|
|
10
|
+
onFilterColumnChange?: (columnId: string | null) => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Hook for managing the "Add Filter" popover state.
|
|
14
|
+
* Wraps useColumnFilter with column selection and open/close logic.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useAddFilterPopover({ filters, onAddFilter, onFilterColumnChange, }: UseAddFilterPopoverParams): {
|
|
17
|
+
isOpen: boolean;
|
|
18
|
+
setIsOpen: import('react').Dispatch<import('react').SetStateAction<boolean>>;
|
|
19
|
+
selectedColumnId: string | null;
|
|
20
|
+
availableColumns: AvailableColumn[];
|
|
21
|
+
operator: "=" | "!=" | "<" | "<=" | ">" | ">=" | "IN" | "NOT IN" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IS NULL" | "IS NOT NULL" | "BETWEEN" | "NOT BETWEEN";
|
|
22
|
+
setOperator: (op: OperatorModel) => void;
|
|
23
|
+
operatorOptions: ("=" | "!=" | "<" | "<=" | ">" | ">=" | "IN" | "NOT IN" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IS NULL" | "IS NOT NULL" | "BETWEEN" | "NOT BETWEEN")[];
|
|
24
|
+
value: string;
|
|
25
|
+
setValue: (value: string) => void;
|
|
26
|
+
value2: string;
|
|
27
|
+
setValue2: (value: string) => void;
|
|
28
|
+
isValueDisabled: boolean;
|
|
29
|
+
isRangeOperator: boolean;
|
|
30
|
+
handleColumnChange: (newColumnId: string) => void;
|
|
31
|
+
commitAndClose: () => void;
|
|
32
|
+
cancelAndClose: () => void;
|
|
33
|
+
};
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { OperatorModel } from '../../../query';
|
|
2
|
+
import { SimpleCondition } from '../../../query/types';
|
|
3
|
+
import { FilterType } from '../../../state/store';
|
|
4
|
+
export interface UseColumnFilterParams {
|
|
5
|
+
columnId: string;
|
|
6
|
+
filterType: FilterType;
|
|
7
|
+
condition: SimpleCondition | null;
|
|
8
|
+
isOpen: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface UseColumnFilterReturn {
|
|
11
|
+
operator: OperatorModel;
|
|
12
|
+
setOperator: (operator: OperatorModel) => void;
|
|
13
|
+
operatorOptions: OperatorModel[];
|
|
14
|
+
value: string;
|
|
15
|
+
setValue: (value: string) => void;
|
|
16
|
+
/** Second value for BETWEEN/NOT BETWEEN operators */
|
|
17
|
+
value2: string;
|
|
18
|
+
setValue2: (value: string) => void;
|
|
19
|
+
/** True if operator requires no value (IS NULL, IS NOT NULL) */
|
|
20
|
+
usesValue: boolean;
|
|
21
|
+
/** True if operator expects a list of values (IN, NOT IN) */
|
|
22
|
+
usesListValue: boolean;
|
|
23
|
+
/** True if operator expects a range with two values (BETWEEN, NOT BETWEEN) */
|
|
24
|
+
usesRangeValue: boolean;
|
|
25
|
+
buildCondition: (operator: OperatorModel, value: string, value2?: string) => SimpleCondition | null | undefined;
|
|
26
|
+
}
|
|
27
|
+
export declare function useColumnFilter({ columnId, filterType, condition, isOpen, }: UseColumnFilterParams): UseColumnFilterReturn;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { SimpleCondition } from '../../../query/types';
|
|
2
|
+
import { FilterType } from '../../../state/store';
|
|
3
|
+
import { useColumnFilter } from './useColumnFilter';
|
|
4
|
+
export interface UseColumnFilterPopoverParams {
|
|
5
|
+
columnId: string;
|
|
6
|
+
filterType: FilterType;
|
|
7
|
+
condition: SimpleCondition | null;
|
|
8
|
+
onChange: (condition: SimpleCondition | null) => void;
|
|
9
|
+
}
|
|
10
|
+
export interface UseColumnFilterPopoverReturn {
|
|
11
|
+
isOpen: boolean;
|
|
12
|
+
setIsOpen: (open: boolean) => void;
|
|
13
|
+
operator: ReturnType<typeof useColumnFilter>["operator"];
|
|
14
|
+
setOperator: ReturnType<typeof useColumnFilter>["setOperator"];
|
|
15
|
+
operatorOptions: ReturnType<typeof useColumnFilter>["operatorOptions"];
|
|
16
|
+
value: ReturnType<typeof useColumnFilter>["value"];
|
|
17
|
+
setValue: ReturnType<typeof useColumnFilter>["setValue"];
|
|
18
|
+
value2: ReturnType<typeof useColumnFilter>["value2"];
|
|
19
|
+
setValue2: ReturnType<typeof useColumnFilter>["setValue2"];
|
|
20
|
+
isValueDisabled: ReturnType<typeof useColumnFilter>["usesValue"];
|
|
21
|
+
isRangeOperator: ReturnType<typeof useColumnFilter>["usesRangeValue"];
|
|
22
|
+
commitAndClose: () => void;
|
|
23
|
+
cancelAndClose: () => void;
|
|
24
|
+
}
|
|
25
|
+
export declare function useColumnFilterPopover({ columnId, filterType, condition, onChange, }: UseColumnFilterPopoverParams): UseColumnFilterPopoverReturn;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ColumnSizingStrategyKey, SizingStrategy } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Registry of all available sizing strategies.
|
|
4
|
+
*/
|
|
5
|
+
export declare const sizingStrategies: Record<ColumnSizingStrategyKey, SizingStrategy>;
|
|
6
|
+
/**
|
|
7
|
+
* Get a sizing strategy by key.
|
|
8
|
+
* Falls back to default strategy if key is not found.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getSizingStrategy(key: ColumnSizingStrategyKey): SizingStrategy;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ColumnSizingState } from '@tanstack/react-table';
|
|
2
|
+
import { TranscriptInfo } from '../../../types/api-types';
|
|
3
|
+
import { TranscriptColumn } from '../columns';
|
|
4
|
+
/**
|
|
5
|
+
* Size constraints for a column.
|
|
6
|
+
*/
|
|
7
|
+
export interface ColumnSizeConstraints {
|
|
8
|
+
/** Default size in pixels */
|
|
9
|
+
size: number;
|
|
10
|
+
/** Minimum allowed size in pixels */
|
|
11
|
+
minSize: number;
|
|
12
|
+
/** Maximum allowed size in pixels */
|
|
13
|
+
maxSize: number;
|
|
14
|
+
}
|
|
15
|
+
/** Default minimum column size in pixels */
|
|
16
|
+
export declare const DEFAULT_MIN_SIZE = 40;
|
|
17
|
+
/** Default maximum column size in pixels */
|
|
18
|
+
export declare const DEFAULT_MAX_SIZE = 600;
|
|
19
|
+
/** Default column size in pixels when not specified */
|
|
20
|
+
export declare const DEFAULT_SIZE = 150;
|
|
21
|
+
/**
|
|
22
|
+
* Context provided to sizing strategies for computing column sizes.
|
|
23
|
+
*/
|
|
24
|
+
export interface SizingStrategyContext {
|
|
25
|
+
/** The table element for DOM measurements (may be null) */
|
|
26
|
+
tableElement: HTMLTableElement | null;
|
|
27
|
+
/** Column definitions */
|
|
28
|
+
columns: TranscriptColumn[];
|
|
29
|
+
/** Current data for content measurement */
|
|
30
|
+
data: TranscriptInfo[];
|
|
31
|
+
/** Pre-computed constraints for each column */
|
|
32
|
+
constraints: Map<string, ColumnSizeConstraints>;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Interface for column sizing strategies.
|
|
36
|
+
* Each strategy computes column sizes differently.
|
|
37
|
+
*/
|
|
38
|
+
export interface SizingStrategy {
|
|
39
|
+
/** Compute sizes for all columns */
|
|
40
|
+
computeSizes(context: SizingStrategyContext): ColumnSizingState;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Available sizing strategy keys.
|
|
44
|
+
* - "default": Uses the column's defined `size` property
|
|
45
|
+
* - "fit-content": Measures content and sizes columns to fit within min/max constraints
|
|
46
|
+
*/
|
|
47
|
+
export type ColumnSizingStrategyKey = "default" | "fit-content";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ColumnSizingState, OnChangeFn } from '@tanstack/react-table';
|
|
2
|
+
import { TranscriptInfo } from '../../../types/api-types';
|
|
3
|
+
import { TranscriptColumn } from '../columns';
|
|
4
|
+
import { ColumnSizingStrategyKey } from './types';
|
|
5
|
+
interface UseColumnSizingOptions {
|
|
6
|
+
/** Column definitions */
|
|
7
|
+
columns: TranscriptColumn[];
|
|
8
|
+
/** Reference to the table element for DOM measurement */
|
|
9
|
+
tableRef: React.RefObject<HTMLTableElement | null>;
|
|
10
|
+
/** Current data for content measurement */
|
|
11
|
+
data: TranscriptInfo[];
|
|
12
|
+
}
|
|
13
|
+
interface UseColumnSizingResult {
|
|
14
|
+
/** Current column sizing state */
|
|
15
|
+
columnSizing: ColumnSizingState;
|
|
16
|
+
/** Handler for column sizing changes with min/max enforcement */
|
|
17
|
+
handleColumnSizingChange: OnChangeFn<ColumnSizingState>;
|
|
18
|
+
/** Current sizing strategy key */
|
|
19
|
+
sizingStrategy: ColumnSizingStrategyKey;
|
|
20
|
+
/** Set the sizing strategy */
|
|
21
|
+
setSizingStrategy: (strategy: ColumnSizingStrategyKey) => void;
|
|
22
|
+
/** Apply auto-sizing based on current strategy (preserves manually resized columns) */
|
|
23
|
+
applyAutoSizing: () => void;
|
|
24
|
+
/** Reset a single column to its auto-calculated size */
|
|
25
|
+
resetColumnSize: (columnId: string) => void;
|
|
26
|
+
/** Reset all column sizing and clear manual resize tracking */
|
|
27
|
+
clearColumnSizing: () => void;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Hook for managing column sizing with min/max constraints and auto-sizing.
|
|
31
|
+
* Manually resized columns are preserved during auto-sizing operations.
|
|
32
|
+
*/
|
|
33
|
+
export declare function useColumnSizing({ columns, tableRef, data, }: UseColumnSizingOptions): UseColumnSizingResult;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TranscriptColumn } from '../columns';
|
|
2
|
+
import { ColumnSizeConstraints } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Extract size constraints from column definitions.
|
|
5
|
+
*/
|
|
6
|
+
export declare function getColumnConstraints(columns: TranscriptColumn[]): Map<string, ColumnSizeConstraints>;
|
|
7
|
+
/**
|
|
8
|
+
* Clamp a size value to min/max constraints.
|
|
9
|
+
*/
|
|
10
|
+
export declare function clampSize(size: number, constraints: ColumnSizeConstraints): number;
|
|
11
|
+
/**
|
|
12
|
+
* Get the column ID from a column definition.
|
|
13
|
+
*/
|
|
14
|
+
export declare function getColumnId(column: TranscriptColumn): string;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ColumnDef } from '@tanstack/react-table';
|
|
2
|
+
import { FilterType } from '../../state/store';
|
|
3
|
+
import { TranscriptInfo } from '../../types/api-types';
|
|
4
|
+
export declare const COLUMN_LABELS: Record<keyof TranscriptInfo, string>;
|
|
5
|
+
export type TranscriptColumn = ColumnDef<TranscriptInfo> & {
|
|
6
|
+
meta?: {
|
|
7
|
+
align?: "left" | "center" | "right";
|
|
8
|
+
filterable?: boolean;
|
|
9
|
+
filterType?: FilterType;
|
|
10
|
+
};
|
|
11
|
+
/** Returns string for tooltip display */
|
|
12
|
+
titleValue?: (value: unknown) => string;
|
|
13
|
+
/** Returns string representation for column width measurement. Return null to skip content measurement. */
|
|
14
|
+
textValue?: (value: unknown) => string | null;
|
|
15
|
+
/** Minimum column width in pixels */
|
|
16
|
+
minSize?: number;
|
|
17
|
+
/** Maximum column width in pixels */
|
|
18
|
+
maxSize?: number;
|
|
19
|
+
};
|
|
20
|
+
export declare const DEFAULT_COLUMN_ORDER: Array<keyof TranscriptInfo>;
|
|
21
|
+
export declare const DEFAULT_VISIBLE_COLUMNS: Array<keyof TranscriptInfo>;
|
|
22
|
+
/**
|
|
23
|
+
* Get columns for the TranscriptsGrid.
|
|
24
|
+
* @param visibleColumnKeys - Optional list of column keys to display. If not provided, returns all columns in default order.
|
|
25
|
+
* @returns Array of column definitions in the order specified or default order.
|
|
26
|
+
*/
|
|
27
|
+
export declare function getTranscriptColumns(visibleColumnKeys?: Array<keyof TranscriptInfo>): TranscriptColumn[];
|
|
28
|
+
/**
|
|
29
|
+
* Extract title value for tooltip from a cell.
|
|
30
|
+
*/
|
|
31
|
+
export declare function getCellTitleValue(cell: any, columnDef: TranscriptColumn): string;
|
|
32
|
+
/**
|
|
33
|
+
* Get the filter type for a given column ID.
|
|
34
|
+
* @param columnId - The column ID to look up
|
|
35
|
+
* @returns The filter type for the column, or "string" as default
|
|
36
|
+
*/
|
|
37
|
+
export declare function getFilterTypeForColumn(columnId: string): FilterType;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Infinite Scroll Tuning
|
|
3
|
+
*
|
|
4
|
+
* Goal: user never hits bottom while waiting for next page.
|
|
5
|
+
*
|
|
6
|
+
* Formula: threshold >= scroll_speed × fetch_duration
|
|
7
|
+
*
|
|
8
|
+
* Assumptions:
|
|
9
|
+
* row_height = 29px
|
|
10
|
+
* fetch_duration = 300-1000ms (variable with fixed overhead)
|
|
11
|
+
* max_scroll_speed = 1500px/s (typical fast scroller)
|
|
12
|
+
*
|
|
13
|
+
* Check at typical speed (1500px/s):
|
|
14
|
+
* runway_time = 2000px / 1500px/s = 1333ms
|
|
15
|
+
* worst_case_fetch = 1000ms
|
|
16
|
+
* margin = 333ms ✓
|
|
17
|
+
*
|
|
18
|
+
* Check at extreme speed (5000px/s):
|
|
19
|
+
* runway_time = 2000px / 5000px/s = 400ms
|
|
20
|
+
* median_fetch = ~350ms
|
|
21
|
+
* margin = 50ms (tight but ok) ✓
|
|
22
|
+
*
|
|
23
|
+
* Why large pageSize? Fetch duration is mostly fixed overhead, so larger
|
|
24
|
+
* pages = fewer fetches = fewer stall opportunities. 500 rows gives ~9.7s
|
|
25
|
+
* of scrolling per page at 1500px/s.
|
|
26
|
+
*
|
|
27
|
+
* Note: If threshold > pageSize_px, the next page is prefetched immediately
|
|
28
|
+
* after the current page loads. This is fine for maximum smoothness.
|
|
29
|
+
*/
|
|
30
|
+
export declare const TRANSCRIPTS_INFINITE_SCROLL_CONFIG: {
|
|
31
|
+
/** Number of rows to fetch per page (500 rows = 14,500px at 29px/row) */
|
|
32
|
+
readonly pageSize: 500;
|
|
33
|
+
/** Distance from bottom (in px) at which to trigger fetch (~69 rows) */
|
|
34
|
+
readonly threshold: 2000;
|
|
35
|
+
};
|
package/lib/app/types.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export interface ScanResultData extends ScanResultSummary {
|
|
|
51
51
|
transcriptAgentArgs?: Record<string, unknown>;
|
|
52
52
|
transcriptScore?: JsonValue;
|
|
53
53
|
transcriptSuccess?: boolean;
|
|
54
|
+
transcriptMessageCount?: number;
|
|
54
55
|
transcriptTotalTime?: number;
|
|
55
56
|
transcriptTotalTokens?: number;
|
|
56
57
|
transcriptError?: string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export interface AutocompleteInputProps {
|
|
3
|
+
id: string;
|
|
4
|
+
value: string;
|
|
5
|
+
onChange: (value: string) => void;
|
|
6
|
+
onCommit?: () => void;
|
|
7
|
+
onCancel?: () => void;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
suggestions: Array<string | number | boolean | null>;
|
|
11
|
+
autoFocus?: boolean;
|
|
12
|
+
maxSuggestions?: number;
|
|
13
|
+
charactersBeforeSuggesting?: number;
|
|
14
|
+
maxSuggestionWidth?: number;
|
|
15
|
+
className?: string;
|
|
16
|
+
/** When true, shows a dropdown toggle icon to browse all options */
|
|
17
|
+
allowBrowse?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare const AutocompleteInput: FC<AutocompleteInputProps>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
interface ToolButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
-
label
|
|
3
|
+
label?: string | ReactNode;
|
|
4
4
|
classes?: string;
|
|
5
5
|
icon?: string;
|
|
6
6
|
latched?: boolean;
|
|
7
|
+
subtle?: boolean;
|
|
7
8
|
}
|
|
8
9
|
export declare const ToolButton: import('react').ForwardRefExoticComponent<ToolButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
9
10
|
export {};
|
|
@@ -3,6 +3,9 @@ interface ToolDropdownButtonProps extends ButtonHTMLAttributes<HTMLButtonElement
|
|
|
3
3
|
label: string | ReactNode;
|
|
4
4
|
icon?: string;
|
|
5
5
|
items: Record<string, () => void>;
|
|
6
|
+
dropdownAlign?: "left" | "right";
|
|
7
|
+
dropdownClassName?: string | string[];
|
|
8
|
+
subtle?: boolean;
|
|
6
9
|
}
|
|
7
10
|
export declare const ToolDropdownButton: import('react').ForwardRefExoticComponent<ToolDropdownButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
8
11
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type DisplayMode = "rendered" | "raw";
|
|
2
|
+
export interface DisplayModeContextType {
|
|
3
|
+
displayMode: DisplayMode;
|
|
4
|
+
}
|
|
5
|
+
export declare const DisplayModeContext: import('react').Context<DisplayModeContextType | null>;
|
|
6
|
+
/**
|
|
7
|
+
* Hook to access display mode. Returns default "rendered" if no provider exists.
|
|
8
|
+
*/
|
|
9
|
+
export declare const useDisplayMode: () => DisplayMode;
|
|
@@ -43,6 +43,7 @@ export declare const ApplicationIcons: {
|
|
|
43
43
|
confirm: string;
|
|
44
44
|
copy: string;
|
|
45
45
|
display: string;
|
|
46
|
+
download: string;
|
|
46
47
|
epoch: (epoch: string) => string;
|
|
47
48
|
edit: string;
|
|
48
49
|
error: string;
|
|
@@ -95,6 +96,7 @@ export declare const ApplicationIcons: {
|
|
|
95
96
|
pendingTask: string;
|
|
96
97
|
pendingTaskSubtle: string;
|
|
97
98
|
play: string;
|
|
99
|
+
"play-circle": string;
|
|
98
100
|
previous: string;
|
|
99
101
|
refresh: string;
|
|
100
102
|
refuse: string;
|
|
@@ -126,6 +128,7 @@ export declare const ApplicationIcons: {
|
|
|
126
128
|
subtask: string;
|
|
127
129
|
success: string;
|
|
128
130
|
successSubtle: string;
|
|
131
|
+
threeDots: string;
|
|
129
132
|
transcript: string;
|
|
130
133
|
tree: {
|
|
131
134
|
open: string;
|
|
@@ -135,4 +138,5 @@ export declare const ApplicationIcons: {
|
|
|
135
138
|
usage: string;
|
|
136
139
|
wrap: string;
|
|
137
140
|
x: string;
|
|
141
|
+
xLarge: string;
|
|
138
142
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { EventNode, EventType } from './types';
|
|
3
|
+
interface TranscriptViewNodesProps {
|
|
4
|
+
id: string;
|
|
5
|
+
eventNodes: EventNode[];
|
|
6
|
+
defaultCollapsedIds: Record<string, boolean>;
|
|
7
|
+
nodeFilter?: (node: EventNode<EventType>[]) => EventNode<EventType>[];
|
|
8
|
+
scrollRef?: React.RefObject<HTMLDivElement | null>;
|
|
9
|
+
initialEventId?: string | null;
|
|
10
|
+
className?: string | string[];
|
|
11
|
+
}
|
|
12
|
+
export declare const TranscriptViewNodes: FC<TranscriptViewNodesProps>;
|
|
13
|
+
export {};
|
|
@@ -5,6 +5,7 @@ export interface OutlineRowProps {
|
|
|
5
5
|
collapseScope: string;
|
|
6
6
|
running?: boolean;
|
|
7
7
|
selected?: boolean;
|
|
8
|
+
getEventUrl?: (eventId: string) => string | undefined;
|
|
8
9
|
}
|
|
9
10
|
export declare const OutlineRow: FC<OutlineRowProps>;
|
|
10
11
|
export declare const summarizeNode: (node: EventNode) => ReactNode;
|
|
@@ -9,6 +9,8 @@ export declare const kTranscriptCollapseScope = "transcript-collapse";
|
|
|
9
9
|
export declare const kTranscriptOutlineCollapseScope = "transcript-outline";
|
|
10
10
|
export declare const kCollapsibleEventTypes: string[];
|
|
11
11
|
export type EventType = SampleInitEvent | SampleLimitEvent | StateEvent | StoreEvent | ModelEvent | LoggerEvent | InfoEvent | StepEvent | SubtaskEvent | ScoreEvent | ScoreEditEvent | ToolEvent | InputEvent | ErrorEvent | ApprovalEvent | SandboxEvent | SpanBeginEvent | SpanEndEvent;
|
|
12
|
+
export declare const eventTypeValues: readonly ["sample_init", "sample_limit", "state", "store", "model", "logger", "info", "step", "subtask", "score", "score_edit", "tool", "input", "error", "approval", "sandbox", "span_begin", "span_end"];
|
|
13
|
+
export type EventTypeValue = (typeof eventTypeValues)[number];
|
|
12
14
|
export declare class EventNode<T extends EventType = EventType> {
|
|
13
15
|
id: string;
|
|
14
16
|
event: T;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { App } from './App';
|
|
2
2
|
export { apiScoutServer } from './api/api-scout-server';
|
|
3
|
+
export { apiScoutServerV1 } from './api/api-scout-server-v1';
|
|
4
|
+
export type { HeaderProvider } from './api/api-scout-server-v1';
|
|
3
5
|
export type { ScanApi } from './api/api.ts';
|
|
4
6
|
export { ApiProvider, StoreProvider, createStore } from './state/store';
|