inspect-ai 0.3.70__py3-none-any.whl → 0.3.72__py3-none-any.whl
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.
- inspect_ai/_cli/eval.py +14 -8
- inspect_ai/_display/core/display.py +2 -0
- inspect_ai/_display/core/footer.py +13 -3
- inspect_ai/_display/plain/display.py +6 -2
- inspect_ai/_display/rich/display.py +19 -6
- inspect_ai/_display/textual/app.py +6 -1
- inspect_ai/_display/textual/display.py +4 -0
- inspect_ai/_display/textual/widgets/transcript.py +10 -6
- inspect_ai/_eval/task/run.py +5 -8
- inspect_ai/_util/content.py +20 -1
- inspect_ai/_util/transcript.py +10 -4
- inspect_ai/_util/working.py +4 -0
- inspect_ai/_view/www/App.css +6 -0
- inspect_ai/_view/www/dist/assets/index.css +115 -87
- inspect_ai/_view/www/dist/assets/index.js +5324 -2276
- inspect_ai/_view/www/eslint.config.mjs +24 -1
- inspect_ai/_view/www/log-schema.json +283 -20
- inspect_ai/_view/www/package.json +8 -3
- inspect_ai/_view/www/src/App.tsx +2 -2
- inspect_ai/_view/www/src/components/AnsiDisplay.tsx +4 -3
- inspect_ai/_view/www/src/components/Card.tsx +9 -8
- inspect_ai/_view/www/src/components/DownloadButton.tsx +2 -1
- inspect_ai/_view/www/src/components/EmptyPanel.tsx +2 -2
- inspect_ai/_view/www/src/components/ErrorPanel.tsx +4 -3
- inspect_ai/_view/www/src/components/ExpandablePanel.tsx +13 -5
- inspect_ai/_view/www/src/components/FindBand.tsx +3 -3
- inspect_ai/_view/www/src/components/HumanBaselineView.tsx +3 -3
- inspect_ai/_view/www/src/components/LabeledValue.tsx +5 -4
- inspect_ai/_view/www/src/components/LargeModal.tsx +18 -13
- inspect_ai/_view/www/src/components/{LightboxCarousel.css → LightboxCarousel.module.css} +22 -18
- inspect_ai/_view/www/src/components/LightboxCarousel.tsx +36 -27
- inspect_ai/_view/www/src/components/MessageBand.tsx +2 -1
- inspect_ai/_view/www/src/components/NavPills.tsx +9 -8
- inspect_ai/_view/www/src/components/ProgressBar.tsx +2 -1
- inspect_ai/_view/www/src/components/TabSet.tsx +21 -15
- inspect_ai/_view/www/src/index.tsx +2 -2
- inspect_ai/_view/www/src/metadata/MetaDataGrid.tsx +11 -9
- inspect_ai/_view/www/src/metadata/MetaDataView.tsx +3 -2
- inspect_ai/_view/www/src/metadata/MetadataGrid.module.css +1 -0
- inspect_ai/_view/www/src/metadata/RenderedContent.tsx +16 -0
- inspect_ai/_view/www/src/plan/DatasetDetailView.tsx +3 -2
- inspect_ai/_view/www/src/plan/DetailStep.tsx +2 -1
- inspect_ai/_view/www/src/plan/PlanCard.tsx +2 -5
- inspect_ai/_view/www/src/plan/PlanDetailView.tsx +6 -9
- inspect_ai/_view/www/src/plan/ScorerDetailView.tsx +2 -1
- inspect_ai/_view/www/src/plan/SolverDetailView.tsx +3 -3
- inspect_ai/_view/www/src/samples/InlineSampleDisplay.tsx +2 -2
- inspect_ai/_view/www/src/samples/SampleDialog.tsx +3 -3
- inspect_ai/_view/www/src/samples/SampleDisplay.tsx +2 -2
- inspect_ai/_view/www/src/samples/SampleSummaryView.tsx +2 -2
- inspect_ai/_view/www/src/samples/SamplesTools.tsx +2 -1
- inspect_ai/_view/www/src/samples/chat/ChatMessage.tsx +3 -19
- inspect_ai/_view/www/src/samples/chat/ChatMessageRenderer.tsx +2 -1
- inspect_ai/_view/www/src/samples/chat/ChatMessageRow.tsx +2 -1
- inspect_ai/_view/www/src/samples/chat/ChatView.tsx +2 -1
- inspect_ai/_view/www/src/samples/chat/ChatViewVirtualList.tsx +22 -7
- inspect_ai/_view/www/src/samples/chat/MessageContent.tsx +35 -6
- inspect_ai/_view/www/src/samples/chat/MessageContents.tsx +2 -2
- inspect_ai/_view/www/src/samples/chat/messages.ts +15 -2
- inspect_ai/_view/www/src/samples/chat/tools/ToolCallView.tsx +13 -4
- inspect_ai/_view/www/src/samples/chat/tools/ToolInput.module.css +2 -2
- inspect_ai/_view/www/src/samples/chat/tools/ToolInput.tsx +18 -19
- inspect_ai/_view/www/src/samples/chat/tools/ToolOutput.module.css +1 -1
- inspect_ai/_view/www/src/samples/chat/tools/ToolOutput.tsx +4 -3
- inspect_ai/_view/www/src/samples/chat/tools/ToolTitle.tsx +2 -2
- inspect_ai/_view/www/src/samples/error/FlatSampleErrorView.tsx +2 -3
- inspect_ai/_view/www/src/samples/error/SampleErrorView.tsx +3 -2
- inspect_ai/_view/www/src/samples/list/SampleFooter.tsx +2 -1
- inspect_ai/_view/www/src/samples/list/SampleHeader.tsx +2 -1
- inspect_ai/_view/www/src/samples/list/SampleList.tsx +57 -45
- inspect_ai/_view/www/src/samples/list/SampleRow.tsx +2 -1
- inspect_ai/_view/www/src/samples/list/SampleSeparator.tsx +2 -1
- inspect_ai/_view/www/src/samples/sample-tools/EpochFilter.tsx +2 -2
- inspect_ai/_view/www/src/samples/sample-tools/SelectScorer.tsx +4 -3
- inspect_ai/_view/www/src/samples/sample-tools/SortFilter.tsx +2 -5
- inspect_ai/_view/www/src/samples/sample-tools/sample-filter/SampleFilter.tsx +2 -2
- inspect_ai/_view/www/src/samples/scores/SampleScoreView.tsx +2 -1
- inspect_ai/_view/www/src/samples/scores/SampleScores.tsx +2 -2
- inspect_ai/_view/www/src/samples/transcript/ApprovalEventView.tsx +2 -1
- inspect_ai/_view/www/src/samples/transcript/ErrorEventView.tsx +2 -1
- inspect_ai/_view/www/src/samples/transcript/InfoEventView.tsx +2 -1
- inspect_ai/_view/www/src/samples/transcript/InputEventView.tsx +2 -1
- inspect_ai/_view/www/src/samples/transcript/LoggerEventView.module.css +4 -0
- inspect_ai/_view/www/src/samples/transcript/LoggerEventView.tsx +12 -2
- inspect_ai/_view/www/src/samples/transcript/ModelEventView.module.css +1 -1
- inspect_ai/_view/www/src/samples/transcript/ModelEventView.tsx +25 -28
- inspect_ai/_view/www/src/samples/transcript/SampleInitEventView.tsx +2 -1
- inspect_ai/_view/www/src/samples/transcript/SampleLimitEventView.tsx +5 -4
- inspect_ai/_view/www/src/samples/transcript/SampleTranscript.tsx +2 -2
- inspect_ai/_view/www/src/samples/transcript/SandboxEventView.tsx +8 -7
- inspect_ai/_view/www/src/samples/transcript/ScoreEventView.tsx +2 -2
- inspect_ai/_view/www/src/samples/transcript/StepEventView.tsx +3 -3
- inspect_ai/_view/www/src/samples/transcript/SubtaskEventView.tsx +18 -14
- inspect_ai/_view/www/src/samples/transcript/ToolEventView.tsx +5 -5
- inspect_ai/_view/www/src/samples/transcript/TranscriptView.tsx +34 -15
- inspect_ai/_view/www/src/samples/transcript/event/EventNav.tsx +2 -1
- inspect_ai/_view/www/src/samples/transcript/event/EventNavs.tsx +2 -1
- inspect_ai/_view/www/src/samples/transcript/event/EventRow.tsx +3 -2
- inspect_ai/_view/www/src/samples/transcript/event/EventSection.tsx +2 -2
- inspect_ai/_view/www/src/samples/transcript/event/EventTimingPanel.module.css +28 -0
- inspect_ai/_view/www/src/samples/transcript/event/EventTimingPanel.tsx +115 -0
- inspect_ai/_view/www/src/samples/transcript/event/utils.ts +29 -0
- inspect_ai/_view/www/src/samples/transcript/state/StateDiffView.tsx +2 -1
- inspect_ai/_view/www/src/samples/transcript/state/StateEventRenderers.tsx +3 -3
- inspect_ai/_view/www/src/samples/transcript/state/StateEventView.tsx +11 -8
- inspect_ai/_view/www/src/types/log.d.ts +129 -34
- inspect_ai/_view/www/src/usage/ModelTokenTable.tsx +6 -10
- inspect_ai/_view/www/src/usage/ModelUsagePanel.module.css +4 -0
- inspect_ai/_view/www/src/usage/ModelUsagePanel.tsx +32 -9
- inspect_ai/_view/www/src/usage/TokenTable.tsx +4 -6
- inspect_ai/_view/www/src/usage/UsageCard.tsx +2 -1
- inspect_ai/_view/www/src/utils/format.ts +1 -1
- inspect_ai/_view/www/src/utils/json.ts +24 -0
- inspect_ai/_view/www/src/workspace/WorkSpace.tsx +6 -5
- inspect_ai/_view/www/src/workspace/WorkSpaceView.tsx +9 -2
- inspect_ai/_view/www/src/workspace/error/TaskErrorPanel.tsx +2 -1
- inspect_ai/_view/www/src/workspace/navbar/Navbar.tsx +2 -1
- inspect_ai/_view/www/src/workspace/navbar/PrimaryBar.tsx +3 -3
- inspect_ai/_view/www/src/workspace/navbar/ResultsPanel.tsx +4 -3
- inspect_ai/_view/www/src/workspace/navbar/SecondaryBar.tsx +5 -4
- inspect_ai/_view/www/src/workspace/navbar/StatusPanel.tsx +5 -8
- inspect_ai/_view/www/src/workspace/sidebar/EvalStatus.tsx +5 -4
- inspect_ai/_view/www/src/workspace/sidebar/LogDirectoryTitleView.tsx +2 -1
- inspect_ai/_view/www/src/workspace/sidebar/Sidebar.tsx +2 -1
- inspect_ai/_view/www/src/workspace/sidebar/SidebarLogEntry.tsx +2 -2
- inspect_ai/_view/www/src/workspace/sidebar/SidebarScoreView.tsx +2 -1
- inspect_ai/_view/www/src/workspace/sidebar/SidebarScoresView.tsx +2 -2
- inspect_ai/_view/www/src/workspace/tabs/InfoTab.tsx +2 -2
- inspect_ai/_view/www/src/workspace/tabs/JsonTab.tsx +2 -5
- inspect_ai/_view/www/src/workspace/tabs/SamplesTab.tsx +12 -11
- inspect_ai/_view/www/yarn.lock +241 -5
- inspect_ai/log/_condense.py +3 -0
- inspect_ai/log/_recorders/eval.py +6 -1
- inspect_ai/log/_transcript.py +58 -1
- inspect_ai/model/__init__.py +2 -0
- inspect_ai/model/_call_tools.py +7 -0
- inspect_ai/model/_chat_message.py +22 -7
- inspect_ai/model/_conversation.py +10 -8
- inspect_ai/model/_generate_config.py +25 -4
- inspect_ai/model/_model.py +133 -57
- inspect_ai/model/_model_output.py +3 -0
- inspect_ai/model/_openai.py +106 -40
- inspect_ai/model/_providers/anthropic.py +281 -153
- inspect_ai/model/_providers/google.py +27 -8
- inspect_ai/model/_providers/groq.py +9 -4
- inspect_ai/model/_providers/openai.py +57 -4
- inspect_ai/model/_providers/openai_o1.py +10 -0
- inspect_ai/model/_providers/providers.py +1 -1
- inspect_ai/model/_reasoning.py +15 -2
- inspect_ai/scorer/_model.py +23 -19
- inspect_ai/solver/_human_agent/agent.py +14 -10
- inspect_ai/solver/_human_agent/commands/__init__.py +7 -3
- inspect_ai/solver/_human_agent/commands/submit.py +76 -30
- inspect_ai/tool/__init__.py +2 -0
- inspect_ai/tool/_tool.py +3 -1
- inspect_ai/tool/_tools/_computer/_common.py +117 -58
- inspect_ai/tool/_tools/_computer/_computer.py +80 -57
- inspect_ai/tool/_tools/_computer/_resources/image_home_dir/.config/Code/User/settings.json +7 -1
- inspect_ai/tool/_tools/_computer/_resources/image_home_dir/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml +91 -0
- inspect_ai/tool/_tools/_computer/_resources/tool/.pylintrc +8 -0
- inspect_ai/tool/_tools/_computer/_resources/tool/.vscode/settings.json +12 -0
- inspect_ai/tool/_tools/_computer/_resources/tool/_args.py +78 -0
- inspect_ai/tool/_tools/_computer/_resources/tool/_constants.py +20 -0
- inspect_ai/tool/_tools/_computer/_resources/tool/_run.py +1 -1
- inspect_ai/tool/_tools/_computer/_resources/tool/_x11_client.py +175 -113
- inspect_ai/tool/_tools/_computer/_resources/tool/computer_tool.py +76 -20
- inspect_ai/tool/_tools/_computer/_resources/tool/pyproject.toml +65 -0
- inspect_ai/tool/_tools/_computer/test_args.py +151 -0
- inspect_ai/tool/_tools/_web_browser/_resources/.pylintrc +8 -0
- inspect_ai/tool/_tools/_web_browser/_resources/.vscode/launch.json +24 -0
- inspect_ai/tool/_tools/_web_browser/_resources/.vscode/settings.json +25 -0
- inspect_ai/tool/_tools/_web_browser/_resources/Dockerfile +5 -6
- inspect_ai/tool/_tools/_web_browser/_resources/README.md +10 -11
- inspect_ai/tool/_tools/_web_browser/_resources/accessibility_tree.py +71 -0
- inspect_ai/tool/_tools/_web_browser/_resources/accessibility_tree_node.py +323 -0
- inspect_ai/tool/_tools/_web_browser/_resources/cdp/__init__.py +5 -0
- inspect_ai/tool/_tools/_web_browser/_resources/cdp/a11y.py +279 -0
- inspect_ai/tool/_tools/_web_browser/_resources/cdp/dom.py +9 -0
- inspect_ai/tool/_tools/_web_browser/_resources/cdp/dom_snapshot.py +293 -0
- inspect_ai/tool/_tools/_web_browser/_resources/cdp/page.py +94 -0
- inspect_ai/tool/_tools/_web_browser/_resources/constants.py +2 -0
- inspect_ai/tool/_tools/_web_browser/_resources/images/usage_diagram.svg +2 -0
- inspect_ai/tool/_tools/_web_browser/_resources/playwright_browser.py +50 -0
- inspect_ai/tool/_tools/_web_browser/_resources/playwright_crawler.py +31 -359
- inspect_ai/tool/_tools/_web_browser/_resources/playwright_page_crawler.py +280 -0
- inspect_ai/tool/_tools/_web_browser/_resources/pyproject.toml +65 -0
- inspect_ai/tool/_tools/_web_browser/_resources/rectangle.py +64 -0
- inspect_ai/tool/_tools/_web_browser/_resources/rpc_client_helpers.py +146 -0
- inspect_ai/tool/_tools/_web_browser/_resources/scale_factor.py +64 -0
- inspect_ai/tool/_tools/_web_browser/_resources/test_accessibility_tree_node.py +180 -0
- inspect_ai/tool/_tools/_web_browser/_resources/test_playwright_crawler.py +15 -9
- inspect_ai/tool/_tools/_web_browser/_resources/test_rectangle.py +15 -0
- inspect_ai/tool/_tools/_web_browser/_resources/test_web_client.py +44 -0
- inspect_ai/tool/_tools/_web_browser/_resources/web_browser_rpc_types.py +39 -0
- inspect_ai/tool/_tools/_web_browser/_resources/web_client.py +198 -48
- inspect_ai/tool/_tools/_web_browser/_resources/web_client_new_session.py +26 -25
- inspect_ai/tool/_tools/_web_browser/_resources/web_server.py +178 -39
- inspect_ai/tool/_tools/_web_browser/_web_browser.py +38 -19
- inspect_ai/util/__init__.py +2 -1
- inspect_ai/util/_display.py +12 -0
- inspect_ai/util/_sandbox/events.py +55 -21
- inspect_ai/util/_sandbox/self_check.py +131 -43
- inspect_ai/util/_subtask.py +11 -0
- {inspect_ai-0.3.70.dist-info → inspect_ai-0.3.72.dist-info}/METADATA +1 -1
- {inspect_ai-0.3.70.dist-info → inspect_ai-0.3.72.dist-info}/RECORD +209 -186
- {inspect_ai-0.3.70.dist-info → inspect_ai-0.3.72.dist-info}/WHEEL +1 -1
- inspect_ai/_view/www/src/components/VirtualList.module.css +0 -19
- inspect_ai/_view/www/src/components/VirtualList.tsx +0 -292
- inspect_ai/tool/_tools/_computer/_computer_split.py +0 -198
- inspect_ai/tool/_tools/_web_browser/_resources/accessibility_node.py +0 -312
- inspect_ai/tool/_tools/_web_browser/_resources/dm_env_servicer.py +0 -275
- inspect_ai/tool/_tools/_web_browser/_resources/images/usage_diagram.png +0 -0
- inspect_ai/tool/_tools/_web_browser/_resources/test_accessibility_node.py +0 -176
- inspect_ai/tool/_tools/_web_browser/_resources/test_dm_env_servicer.py +0 -135
- inspect_ai/tool/_tools/_web_browser/_resources/test_web_environment.py +0 -71
- inspect_ai/tool/_tools/_web_browser/_resources/web_environment.py +0 -184
- {inspect_ai-0.3.70.dist-info → inspect_ai-0.3.72.dist-info}/LICENSE +0 -0
- {inspect_ai-0.3.70.dist-info → inspect_ai-0.3.72.dist-info}/entry_points.txt +0 -0
- {inspect_ai-0.3.70.dist-info → inspect_ai-0.3.72.dist-info}/top_level.txt +0 -0
@@ -1,5 +1,5 @@
|
|
1
1
|
import clsx from "clsx";
|
2
|
-
import { ChangeEvent } from "react";
|
2
|
+
import { ChangeEvent, FC } from "react";
|
3
3
|
import styles from "./EpochFilter.module.css";
|
4
4
|
|
5
5
|
interface EpochFilterProps {
|
@@ -8,7 +8,7 @@ interface EpochFilterProps {
|
|
8
8
|
setEpoch: (n: string) => void;
|
9
9
|
}
|
10
10
|
|
11
|
-
export const EpochFilter:
|
11
|
+
export const EpochFilter: FC<EpochFilterProps> = ({
|
12
12
|
epochs,
|
13
13
|
epoch,
|
14
14
|
setEpoch,
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import clsx from "clsx";
|
2
2
|
import { ScoreLabel } from "../../types";
|
3
3
|
|
4
|
+
import { FC } from "react";
|
4
5
|
import styles from "./SelectScorer.module.css";
|
5
6
|
|
6
7
|
interface SelectScorerProps {
|
@@ -9,7 +10,7 @@ interface SelectScorerProps {
|
|
9
10
|
setScore: (score: ScoreLabel) => void;
|
10
11
|
}
|
11
12
|
|
12
|
-
export const SelectScorer:
|
13
|
+
export const SelectScorer: FC<SelectScorerProps> = ({
|
13
14
|
scores,
|
14
15
|
score,
|
15
16
|
setScore,
|
@@ -100,7 +101,7 @@ interface ScoreSelectorProps {
|
|
100
101
|
className?: string | string[];
|
101
102
|
}
|
102
103
|
|
103
|
-
const ScoreSelector:
|
104
|
+
const ScoreSelector: FC<ScoreSelectorProps> = ({
|
104
105
|
scores,
|
105
106
|
selectedIndex,
|
106
107
|
setSelectedIndex,
|
@@ -138,7 +139,7 @@ interface ScorerSelectorProps {
|
|
138
139
|
setSelectedIndex: (index: number) => void;
|
139
140
|
}
|
140
141
|
|
141
|
-
const ScorerSelector:
|
142
|
+
const ScorerSelector: FC<ScorerSelectorProps> = ({
|
142
143
|
scorers,
|
143
144
|
selectedIndex,
|
144
145
|
setSelectedIndex,
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import clsx from "clsx";
|
2
|
+
import { FC } from "react";
|
2
3
|
import { SampleSummary } from "../../api/types";
|
3
4
|
import {
|
4
5
|
kEpochAscVal,
|
@@ -18,11 +19,7 @@ interface SortFilterProps {
|
|
18
19
|
epochs: number;
|
19
20
|
}
|
20
21
|
|
21
|
-
export const SortFilter:
|
22
|
-
sort,
|
23
|
-
setSort,
|
24
|
-
epochs,
|
25
|
-
}) => {
|
22
|
+
export const SortFilter: FC<SortFilterProps> = ({ sort, setSort, epochs }) => {
|
26
23
|
const options = [
|
27
24
|
{ label: "sample asc", val: kSampleAscVal },
|
28
25
|
{ label: "sample desc", val: kSampleDescVal },
|
@@ -14,7 +14,7 @@ import {
|
|
14
14
|
import { tags } from "@lezer/highlight";
|
15
15
|
import clsx from "clsx";
|
16
16
|
import { EditorView, minimalSetup } from "codemirror";
|
17
|
-
import { useEffect, useMemo, useRef, useState } from "react";
|
17
|
+
import { FC, useEffect, useMemo, useRef, useState } from "react";
|
18
18
|
|
19
19
|
import { ScoreFilter } from "../../../types";
|
20
20
|
import { EvalDescriptor } from "../../descriptor/types";
|
@@ -147,7 +147,7 @@ const getLints = (
|
|
147
147
|
};
|
148
148
|
|
149
149
|
// Main component
|
150
|
-
export const SampleFilter:
|
150
|
+
export const SampleFilter: FC<SampleFilterProps> = ({
|
151
151
|
evalDescriptor,
|
152
152
|
scoreFilter,
|
153
153
|
setScoreFilter,
|
@@ -7,6 +7,7 @@ import { arrayToString, inputString } from "../../utils/format";
|
|
7
7
|
import { SamplesDescriptor } from "../descriptor/samplesDescriptor";
|
8
8
|
import { SampleScores } from "./SampleScores";
|
9
9
|
|
10
|
+
import { FC } from "react";
|
10
11
|
import { SampleSummary } from "../../api/types";
|
11
12
|
import styles from "./SampleScoreView.module.css";
|
12
13
|
|
@@ -17,7 +18,7 @@ interface SampleScoreViewProps {
|
|
17
18
|
className?: string | string[];
|
18
19
|
}
|
19
20
|
|
20
|
-
export const SampleScoreView:
|
21
|
+
export const SampleScoreView: FC<SampleScoreViewProps> = ({
|
21
22
|
sample,
|
22
23
|
sampleDescriptor,
|
23
24
|
className,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Fragment } from "react";
|
1
|
+
import { FC, Fragment } from "react";
|
2
2
|
import { SampleSummary } from "../../api/types";
|
3
3
|
import { SamplesDescriptor } from "../descriptor/samplesDescriptor";
|
4
4
|
|
@@ -10,7 +10,7 @@ interface SampleScoresProps {
|
|
10
10
|
scorer: string;
|
11
11
|
}
|
12
12
|
|
13
|
-
export const SampleScores:
|
13
|
+
export const SampleScores: FC<SampleScoresProps> = ({
|
14
14
|
sample,
|
15
15
|
sampleDescriptor,
|
16
16
|
scorer,
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { FC } from "react";
|
1
2
|
import { ApplicationIcons } from "../../appearance/icons";
|
2
3
|
import { ApprovalEvent } from "../../types/log";
|
3
4
|
import { EventRow } from "./event/EventRow";
|
@@ -10,7 +11,7 @@ interface ApprovalEventViewProps {
|
|
10
11
|
/**
|
11
12
|
* Renders the ApprovalEventView component.
|
12
13
|
*/
|
13
|
-
export const ApprovalEventView:
|
14
|
+
export const ApprovalEventView: FC<ApprovalEventViewProps> = ({
|
14
15
|
event,
|
15
16
|
className,
|
16
17
|
}) => {
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { FC } from "react";
|
1
2
|
import { ApplicationIcons } from "../../appearance/icons";
|
2
3
|
import { ANSIDisplay } from "../../components/AnsiDisplay";
|
3
4
|
import { ErrorEvent } from "../../types/log";
|
@@ -16,7 +17,7 @@ interface ErrorEventViewProps {
|
|
16
17
|
/**
|
17
18
|
* Renders the ErrorEventView component.
|
18
19
|
*/
|
19
|
-
export const ErrorEventView:
|
20
|
+
export const ErrorEventView: FC<ErrorEventViewProps> = ({
|
20
21
|
id,
|
21
22
|
event,
|
22
23
|
eventState,
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { FC } from "react";
|
1
2
|
import { ApplicationIcons } from "../../appearance/icons";
|
2
3
|
import { JSONPanel } from "../../components/JsonPanel";
|
3
4
|
import { MarkdownDiv } from "../../components/MarkdownDiv";
|
@@ -18,7 +19,7 @@ interface InfoEventViewProps {
|
|
18
19
|
/**
|
19
20
|
* Renders the InfoEventView component.
|
20
21
|
*/
|
21
|
-
export const InfoEventView:
|
22
|
+
export const InfoEventView: FC<InfoEventViewProps> = ({
|
22
23
|
id,
|
23
24
|
event,
|
24
25
|
eventState,
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { FC } from "react";
|
1
2
|
import { ApplicationIcons } from "../../appearance/icons";
|
2
3
|
import { ANSIDisplay } from "../../components/AnsiDisplay";
|
3
4
|
import { InputEvent } from "../../types/log";
|
@@ -16,7 +17,7 @@ interface InputEventViewProps {
|
|
16
17
|
/**
|
17
18
|
* Renders the ErrorEventView component.
|
18
19
|
*/
|
19
|
-
export const InputEventView:
|
20
|
+
export const InputEventView: FC<InputEventViewProps> = ({
|
20
21
|
id,
|
21
22
|
event,
|
22
23
|
eventState,
|
@@ -3,6 +3,9 @@ import { ApplicationIcons } from "../../appearance/icons";
|
|
3
3
|
import { LoggerEvent } from "../../types/log";
|
4
4
|
import { EventRow } from "./event/EventRow";
|
5
5
|
|
6
|
+
import { FC } from "react";
|
7
|
+
import { MetaDataGrid } from "../../metadata/MetaDataGrid";
|
8
|
+
import { parsedJson as maybeParseJson } from "../../utils/json";
|
6
9
|
import styles from "./LoggerEventView.module.css";
|
7
10
|
|
8
11
|
interface LoggerEventViewProps {
|
@@ -13,10 +16,11 @@ interface LoggerEventViewProps {
|
|
13
16
|
/**
|
14
17
|
* Renders the LoggerEventView component.
|
15
18
|
*/
|
16
|
-
export const LoggerEventView:
|
19
|
+
export const LoggerEventView: FC<LoggerEventViewProps> = ({
|
17
20
|
event,
|
18
21
|
className,
|
19
22
|
}) => {
|
23
|
+
const obj = maybeParseJson(event.message.message);
|
20
24
|
return (
|
21
25
|
<EventRow
|
22
26
|
className={className}
|
@@ -24,7 +28,13 @@ export const LoggerEventView: React.FC<LoggerEventViewProps> = ({
|
|
24
28
|
icon={ApplicationIcons.logging[event.message.level.toLowerCase()]}
|
25
29
|
>
|
26
30
|
<div className={clsx("text-size-base", styles.grid)}>
|
27
|
-
<div className={clsx("text-size-smaller")}>
|
31
|
+
<div className={clsx("text-size-smaller")}>
|
32
|
+
{obj !== undefined && obj !== null ? (
|
33
|
+
<MetaDataGrid entries={obj as Record<string, unknown>} />
|
34
|
+
) : (
|
35
|
+
event.message.message
|
36
|
+
)}
|
37
|
+
</div>
|
28
38
|
<div className={clsx("text-size-smaller", "text-style-secondary")}>
|
29
39
|
{event.message.filename}:{event.message.lineno}
|
30
40
|
</div>
|
@@ -3,7 +3,7 @@ import "prismjs/components/prism-json";
|
|
3
3
|
import "prismjs/components/prism-python";
|
4
4
|
|
5
5
|
import clsx from "clsx";
|
6
|
-
import { Fragment, useEffect, useMemo, useRef } from "react";
|
6
|
+
import { FC, Fragment, useEffect, useMemo, useRef } from "react";
|
7
7
|
import { ApplicationIcons } from "../../appearance/icons";
|
8
8
|
import { MetaDataGrid } from "../../metadata/MetaDataGrid";
|
9
9
|
import {
|
@@ -14,11 +14,6 @@ import {
|
|
14
14
|
Tools1,
|
15
15
|
} from "../../types/log";
|
16
16
|
import { ModelUsagePanel } from "../../usage/ModelUsagePanel";
|
17
|
-
import {
|
18
|
-
formatDateTime,
|
19
|
-
formatNumber,
|
20
|
-
formatPrettyDecimal,
|
21
|
-
} from "../../utils/format";
|
22
17
|
import { ChatView } from "../chat/ChatView";
|
23
18
|
import { EventPanel } from "./event/EventPanel";
|
24
19
|
import { EventSection } from "./event/EventSection";
|
@@ -26,6 +21,8 @@ import { TranscriptEventState } from "./types";
|
|
26
21
|
|
27
22
|
import { highlightElement } from "prismjs";
|
28
23
|
import styles from "./ModelEventView.module.css";
|
24
|
+
import { EventTimingPanel } from "./event/EventTimingPanel";
|
25
|
+
import { formatTiming, formatTitle } from "./event/utils";
|
29
26
|
|
30
27
|
interface ModelEventViewProps {
|
31
28
|
id: string;
|
@@ -38,7 +35,7 @@ interface ModelEventViewProps {
|
|
38
35
|
/**
|
39
36
|
* Renders the StateEventView component.
|
40
37
|
*/
|
41
|
-
export const ModelEventView:
|
38
|
+
export const ModelEventView: FC<ModelEventViewProps> = ({
|
42
39
|
id,
|
43
40
|
event,
|
44
41
|
eventState,
|
@@ -48,15 +45,6 @@ export const ModelEventView: React.FC<ModelEventViewProps> = ({
|
|
48
45
|
const totalUsage = event.output.usage?.total_tokens;
|
49
46
|
const callTime = event.output.time;
|
50
47
|
|
51
|
-
const subItems = [];
|
52
|
-
if (totalUsage) {
|
53
|
-
subItems.push(`${formatNumber(totalUsage)} tokens`);
|
54
|
-
}
|
55
|
-
if (callTime) {
|
56
|
-
subItems.push(`${formatPrettyDecimal(callTime)} sec`);
|
57
|
-
}
|
58
|
-
const subtitle = subItems.length > 0 ? `(${subItems.join(", ")})` : "";
|
59
|
-
|
60
48
|
// Note: despite the type system saying otherwise, this has appeared empircally
|
61
49
|
// to sometimes be undefined
|
62
50
|
const outputMessages = event.output.choices?.map((choice) => {
|
@@ -83,8 +71,8 @@ export const ModelEventView: React.FC<ModelEventViewProps> = ({
|
|
83
71
|
<EventPanel
|
84
72
|
id={id}
|
85
73
|
className={className}
|
86
|
-
title={`Model Call: ${event.model}
|
87
|
-
subTitle={
|
74
|
+
title={formatTitle(`Model Call: ${event.model}`, totalUsage, callTime)}
|
75
|
+
subTitle={formatTiming(event.timestamp, event.working_start)}
|
88
76
|
icon={ApplicationIcons.model}
|
89
77
|
selectedNav={eventState.selectedNav || ""}
|
90
78
|
setSelectedNav={(selectedNav) => {
|
@@ -116,6 +104,15 @@ export const ModelEventView: React.FC<ModelEventViewProps> = ({
|
|
116
104
|
) : undefined}
|
117
105
|
</EventSection>
|
118
106
|
|
107
|
+
<EventSection title="Timing" className={styles.tableSelection}>
|
108
|
+
<EventTimingPanel
|
109
|
+
timestamp={event.timestamp}
|
110
|
+
completed={event.completed}
|
111
|
+
working_start={event.working_start}
|
112
|
+
working_time={event.working_time}
|
113
|
+
/>
|
114
|
+
</EventSection>
|
115
|
+
|
119
116
|
<EventSection
|
120
117
|
title="Tools"
|
121
118
|
className={clsx(styles.tableSelection, styles.tools)}
|
@@ -150,7 +147,7 @@ interface APIViewProps {
|
|
150
147
|
className?: string | string[];
|
151
148
|
}
|
152
149
|
|
153
|
-
export const APIView:
|
150
|
+
export const APIView: FC<APIViewProps> = ({ call, className }) => {
|
154
151
|
if (!call) {
|
155
152
|
return null;
|
156
153
|
}
|
@@ -172,11 +169,7 @@ interface APICodeCellProps {
|
|
172
169
|
contents: Request | Response;
|
173
170
|
}
|
174
171
|
|
175
|
-
export const APICodeCell:
|
176
|
-
if (!contents) {
|
177
|
-
return null;
|
178
|
-
}
|
179
|
-
|
172
|
+
export const APICodeCell: FC<APICodeCellProps> = ({ id, contents }) => {
|
180
173
|
const codeRef = useRef<HTMLElement>(null);
|
181
174
|
const sourceCode = useMemo(() => {
|
182
175
|
return JSON.stringify(contents, undefined, 2);
|
@@ -186,11 +179,15 @@ export const APICodeCell: React.FC<APICodeCellProps> = ({ id, contents }) => {
|
|
186
179
|
if (codeRef.current) {
|
187
180
|
highlightElement(codeRef.current);
|
188
181
|
}
|
189
|
-
}, [
|
182
|
+
}, [contents]);
|
183
|
+
|
184
|
+
if (!contents) {
|
185
|
+
return null;
|
186
|
+
}
|
190
187
|
|
191
188
|
return (
|
192
|
-
<div>
|
193
|
-
<pre className={styles.codePre}>
|
189
|
+
<div className={clsx("model-call")}>
|
190
|
+
<pre className={clsx(styles.codePre)}>
|
194
191
|
<code
|
195
192
|
id={id}
|
196
193
|
ref={codeRef}
|
@@ -207,7 +204,7 @@ interface ToolConfigProps {
|
|
207
204
|
tools: Tools1;
|
208
205
|
}
|
209
206
|
|
210
|
-
const ToolsConfig:
|
207
|
+
const ToolsConfig: FC<ToolConfigProps> = ({ tools }) => {
|
211
208
|
const toolEls = tools.map((tool, idx) => {
|
212
209
|
return (
|
213
210
|
<Fragment key={`${tool.name}-${idx}`}>
|
@@ -9,6 +9,7 @@ import { EventPanel } from "./event/EventPanel";
|
|
9
9
|
import { EventSection } from "./event/EventSection";
|
10
10
|
import { TranscriptEventState } from "./types";
|
11
11
|
|
12
|
+
import { FC } from "react";
|
12
13
|
import styles from "./SampleInitEventView.module.css";
|
13
14
|
|
14
15
|
interface SampleInitEventViewProps {
|
@@ -22,7 +23,7 @@ interface SampleInitEventViewProps {
|
|
22
23
|
/**
|
23
24
|
* Renders the SampleInitEventView component.
|
24
25
|
*/
|
25
|
-
export const SampleInitEventView:
|
26
|
+
export const SampleInitEventView: FC<SampleInitEventViewProps> = ({
|
26
27
|
id,
|
27
28
|
event,
|
28
29
|
eventState,
|
@@ -1,5 +1,6 @@
|
|
1
|
+
import { FC } from "react";
|
1
2
|
import { ApplicationIcons } from "../../appearance/icons";
|
2
|
-
import { SampleLimitEvent,
|
3
|
+
import { SampleLimitEvent, Type8 } from "../../types/log";
|
3
4
|
import { EventPanel } from "./event/EventPanel";
|
4
5
|
import { TranscriptEventState } from "./types";
|
5
6
|
|
@@ -14,14 +15,14 @@ interface SampleLimitEventViewProps {
|
|
14
15
|
/**
|
15
16
|
* Renders the InfoEventView component.
|
16
17
|
*/
|
17
|
-
export const SampleLimitEventView:
|
18
|
+
export const SampleLimitEventView: FC<SampleLimitEventViewProps> = ({
|
18
19
|
id,
|
19
20
|
event,
|
20
21
|
eventState,
|
21
22
|
setEventState,
|
22
23
|
className,
|
23
24
|
}) => {
|
24
|
-
const resolve_title = (type:
|
25
|
+
const resolve_title = (type: Type8) => {
|
25
26
|
switch (type) {
|
26
27
|
case "custom":
|
27
28
|
return "Custom Limit Exceeded";
|
@@ -38,7 +39,7 @@ export const SampleLimitEventView: React.FC<SampleLimitEventViewProps> = ({
|
|
38
39
|
}
|
39
40
|
};
|
40
41
|
|
41
|
-
const resolve_icon = (type:
|
42
|
+
const resolve_icon = (type: Type8) => {
|
42
43
|
switch (type) {
|
43
44
|
case "custom":
|
44
45
|
return ApplicationIcons.limits.custom;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { RefObject } from "react";
|
1
|
+
import { FC, RefObject } from "react";
|
2
2
|
import { Events } from "../../types/log";
|
3
3
|
import { TranscriptVirtualList } from "./TranscriptView";
|
4
4
|
|
@@ -11,7 +11,7 @@ interface SampleTranscriptProps {
|
|
11
11
|
/**
|
12
12
|
* Renders the SampleTranscript component.=
|
13
13
|
*/
|
14
|
-
export const SampleTranscript:
|
14
|
+
export const SampleTranscript: FC<SampleTranscriptProps> = ({
|
15
15
|
id,
|
16
16
|
evalEvents,
|
17
17
|
scrollRef,
|
@@ -3,13 +3,14 @@ import ExpandablePanel from "../../components/ExpandablePanel";
|
|
3
3
|
import { MarkdownDiv } from "../../components/MarkdownDiv";
|
4
4
|
import { MetaDataGrid } from "../../metadata/MetaDataGrid";
|
5
5
|
import { SandboxEvent } from "../../types/log";
|
6
|
-
import { formatDateTime } from "../../utils/format";
|
7
6
|
import { EventPanel } from "./event/EventPanel";
|
8
7
|
import { EventSection } from "./event/EventSection";
|
9
8
|
import { TranscriptEventState } from "./types";
|
10
9
|
|
11
10
|
import clsx from "clsx";
|
11
|
+
import { FC } from "react";
|
12
12
|
import styles from "./SandboxEventView.module.css";
|
13
|
+
import { formatTiming } from "./event/utils";
|
13
14
|
|
14
15
|
interface SandboxEventViewProps {
|
15
16
|
id: string;
|
@@ -22,7 +23,7 @@ interface SandboxEventViewProps {
|
|
22
23
|
/**
|
23
24
|
* Renders the SandboxEventView component.
|
24
25
|
*/
|
25
|
-
export const SandboxEventView:
|
26
|
+
export const SandboxEventView: FC<SandboxEventViewProps> = ({
|
26
27
|
id,
|
27
28
|
event,
|
28
29
|
eventState,
|
@@ -35,7 +36,7 @@ export const SandboxEventView: React.FC<SandboxEventViewProps> = ({
|
|
35
36
|
className={className}
|
36
37
|
title={`Sandbox: ${event.action}`}
|
37
38
|
icon={ApplicationIcons.sandbox}
|
38
|
-
subTitle={
|
39
|
+
subTitle={formatTiming(event.timestamp, event.working_start)}
|
39
40
|
selectedNav={eventState.selectedNav || ""}
|
40
41
|
setSelectedNav={(selectedNav) => {
|
41
42
|
setEventState({ ...eventState, selectedNav });
|
@@ -60,7 +61,7 @@ interface ExecViewProps {
|
|
60
61
|
event: SandboxEvent;
|
61
62
|
}
|
62
63
|
|
63
|
-
const ExecView:
|
64
|
+
const ExecView: FC<ExecViewProps> = ({ event }) => {
|
64
65
|
if (event.cmd === null) {
|
65
66
|
return undefined;
|
66
67
|
}
|
@@ -105,7 +106,7 @@ interface ReadFileViewProps {
|
|
105
106
|
event: SandboxEvent;
|
106
107
|
}
|
107
108
|
|
108
|
-
const ReadFileView:
|
109
|
+
const ReadFileView: FC<ReadFileViewProps> = ({ event }) => {
|
109
110
|
if (event.file === null) {
|
110
111
|
return undefined;
|
111
112
|
}
|
@@ -118,7 +119,7 @@ interface WriteFileViewProps {
|
|
118
119
|
event: SandboxEvent;
|
119
120
|
}
|
120
121
|
|
121
|
-
const WriteFileView:
|
122
|
+
const WriteFileView: FC<WriteFileViewProps> = ({ event }) => {
|
122
123
|
if (event.file === null) {
|
123
124
|
return undefined;
|
124
125
|
}
|
@@ -133,7 +134,7 @@ interface FileViewProps {
|
|
133
134
|
contents?: string;
|
134
135
|
}
|
135
136
|
|
136
|
-
const FileView:
|
137
|
+
const FileView: FC<FileViewProps> = ({ file, contents }) => {
|
137
138
|
return (
|
138
139
|
<div>
|
139
140
|
<EventSection title="File">
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Fragment } from "react";
|
1
|
+
import { FC, Fragment } from "react";
|
2
2
|
import { ApplicationIcons } from "../../appearance/icons";
|
3
3
|
import { MarkdownDiv } from "../../components/MarkdownDiv";
|
4
4
|
import { MetaDataGrid } from "../../metadata/MetaDataGrid";
|
@@ -21,7 +21,7 @@ interface ScoreEventViewProps {
|
|
21
21
|
/**
|
22
22
|
* Renders the ScoreEventView component.
|
23
23
|
*/
|
24
|
-
export const ScoreEventView:
|
24
|
+
export const ScoreEventView: FC<ScoreEventViewProps> = ({
|
25
25
|
id,
|
26
26
|
event,
|
27
27
|
eventState,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import clsx from "clsx";
|
2
|
-
import { RefObject, useCallback, useState } from "react";
|
2
|
+
import { FC, RefObject, useCallback, useState } from "react";
|
3
3
|
import { StepEvent } from "../../types/log";
|
4
4
|
import { formatDateTime } from "../../utils/format";
|
5
5
|
import { EventPanel } from "./event/EventPanel";
|
@@ -18,7 +18,7 @@ interface StepEventViewProps {
|
|
18
18
|
/**
|
19
19
|
* Renders the StepEventView component.
|
20
20
|
*/
|
21
|
-
export const StepEventView:
|
21
|
+
export const StepEventView: FC<StepEventViewProps> = ({
|
22
22
|
event,
|
23
23
|
eventState,
|
24
24
|
setEventState,
|
@@ -37,7 +37,7 @@ export const StepEventView: React.FC<StepEventViewProps> = ({
|
|
37
37
|
(state: TranscriptEventState) => {
|
38
38
|
setTranscriptState({ ...state });
|
39
39
|
},
|
40
|
-
[
|
40
|
+
[setTranscriptState],
|
41
41
|
);
|
42
42
|
|
43
43
|
return (
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import clsx from "clsx";
|
2
|
-
import { Fragment } from "react";
|
2
|
+
import { FC, Fragment } from "react";
|
3
3
|
import { ApplicationIcons } from "../../appearance/icons";
|
4
4
|
import { MetaDataView } from "../../metadata/MetaDataView";
|
5
|
-
import { Input2,
|
6
|
-
import { formatDateTime } from "../../utils/format";
|
5
|
+
import { Input2, Input5, Result2, SubtaskEvent } from "../../types/log";
|
7
6
|
import { EventPanel } from "./event/EventPanel";
|
7
|
+
import { formatTiming, formatTitle } from "./event/utils";
|
8
8
|
import styles from "./SubtaskEventView.module.css";
|
9
9
|
import { TranscriptView } from "./TranscriptView";
|
10
10
|
import { TranscriptEventState } from "./types";
|
@@ -21,7 +21,7 @@ interface SubtaskEventViewProps {
|
|
21
21
|
/**
|
22
22
|
* Renders the StateEventView component.
|
23
23
|
*/
|
24
|
-
export const SubtaskEventView:
|
24
|
+
export const SubtaskEventView: FC<SubtaskEventViewProps> = ({
|
25
25
|
id,
|
26
26
|
event,
|
27
27
|
eventState,
|
@@ -73,8 +73,12 @@ export const SubtaskEventView: React.FC<SubtaskEventViewProps> = ({
|
|
73
73
|
<EventPanel
|
74
74
|
id={id}
|
75
75
|
className={className}
|
76
|
-
title={
|
77
|
-
|
76
|
+
title={formatTitle(
|
77
|
+
`${type}: ${event.name}`,
|
78
|
+
undefined,
|
79
|
+
event.working_time,
|
80
|
+
)}
|
81
|
+
subTitle={formatTiming(event.timestamp, event.working_start)}
|
78
82
|
collapse={false}
|
79
83
|
selectedNav={eventState.selectedNav || ""}
|
80
84
|
setSelectedNav={(selectedNav) => {
|
@@ -91,25 +95,25 @@ export const SubtaskEventView: React.FC<SubtaskEventViewProps> = ({
|
|
91
95
|
};
|
92
96
|
|
93
97
|
interface SubtaskSummaryProps {
|
94
|
-
input: Input2 |
|
95
|
-
result:
|
98
|
+
input: Input2 | Input5;
|
99
|
+
result: Result2;
|
96
100
|
}
|
97
101
|
/**
|
98
102
|
* Renders the StateEventView component.
|
99
103
|
*/
|
100
|
-
const SubtaskSummary:
|
101
|
-
|
104
|
+
const SubtaskSummary: FC<SubtaskSummaryProps> = ({ input, result }) => {
|
105
|
+
const output = typeof result === "object" ? result : { result };
|
102
106
|
return (
|
103
107
|
<div className={clsx(styles.subtaskSummary)}>
|
104
108
|
<div className={clsx("text-style-label")}>Input</div>
|
105
109
|
<div className={clsx("text-size-large", styles.subtaskLabel)}></div>
|
106
110
|
<div className={clsx("text-style-label")}>Output</div>
|
107
|
-
<Rendered values={input} />
|
111
|
+
{input ? <Rendered values={input} /> : undefined}
|
108
112
|
<div className={clsx("text-size-title-secondary", styles.subtaskLabel)}>
|
109
113
|
<i className={ApplicationIcons.arrows.right} />
|
110
114
|
</div>
|
111
115
|
<div>
|
112
|
-
<Rendered values={
|
116
|
+
<Rendered values={output} />
|
113
117
|
</div>
|
114
118
|
</div>
|
115
119
|
);
|
@@ -123,7 +127,7 @@ interface RenderedProps {
|
|
123
127
|
* Recursively renders content based on the type of `values`.
|
124
128
|
value.
|
125
129
|
*/
|
126
|
-
const Rendered:
|
130
|
+
const Rendered: FC<RenderedProps> = ({ values }) => {
|
127
131
|
if (Array.isArray(values)) {
|
128
132
|
return values.map((val) => {
|
129
133
|
return <Rendered values={val} />;
|
@@ -139,7 +143,7 @@ const Rendered: React.FC<RenderedProps> = ({ values }) => {
|
|
139
143
|
}
|
140
144
|
};
|
141
145
|
|
142
|
-
const None:
|
146
|
+
const None: FC = () => {
|
143
147
|
return (
|
144
148
|
<span className={clsx("text-size-small", "text-style-secondary")}>
|
145
149
|
[None]
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { ApplicationIcons } from "../../appearance/icons";
|
2
2
|
import { ToolEvent } from "../../types/log";
|
3
|
-
import { formatDateTime } from "../../utils/format";
|
4
3
|
import { resolveToolInput } from "../chat/tools/tool";
|
5
4
|
import { ToolCallView } from "../chat/tools/ToolCallView";
|
6
5
|
import { ApprovalEventView } from "./ApprovalEventView";
|
@@ -8,7 +7,8 @@ import { EventPanel } from "./event/EventPanel";
|
|
8
7
|
import { TranscriptView } from "./TranscriptView";
|
9
8
|
import { TranscriptEventState } from "./types";
|
10
9
|
|
11
|
-
import { useMemo } from "react";
|
10
|
+
import { FC, useMemo } from "react";
|
11
|
+
import { formatTiming, formatTitle } from "./event/utils";
|
12
12
|
import styles from "./ToolEventView.module.css";
|
13
13
|
|
14
14
|
interface ToolEventViewProps {
|
@@ -23,7 +23,7 @@ interface ToolEventViewProps {
|
|
23
23
|
/**
|
24
24
|
* Renders the ToolEventView component.
|
25
25
|
*/
|
26
|
-
export const ToolEventView:
|
26
|
+
export const ToolEventView: FC<ToolEventViewProps> = ({
|
27
27
|
id,
|
28
28
|
event,
|
29
29
|
eventState,
|
@@ -46,9 +46,9 @@ export const ToolEventView: React.FC<ToolEventViewProps> = ({
|
|
46
46
|
return (
|
47
47
|
<EventPanel
|
48
48
|
id={id}
|
49
|
-
title={title}
|
49
|
+
title={formatTitle(title, undefined, event.working_time)}
|
50
50
|
className={className}
|
51
|
-
subTitle={
|
51
|
+
subTitle={formatTiming(event.timestamp, event.working_start)}
|
52
52
|
icon={ApplicationIcons.solvers.use_tools}
|
53
53
|
selectedNav={eventState.selectedNav || ""}
|
54
54
|
setSelectedNav={(selectedNav) => {
|