inspect-ai 0.3.81__py3-none-any.whl → 0.3.83__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/__init__.py +2 -1
- inspect_ai/_cli/eval.py +35 -2
- inspect_ai/_cli/util.py +44 -1
- inspect_ai/_display/core/config.py +1 -1
- inspect_ai/_display/core/display.py +13 -4
- inspect_ai/_display/core/results.py +1 -1
- inspect_ai/_display/textual/app.py +14 -3
- inspect_ai/_display/textual/display.py +4 -0
- inspect_ai/_display/textual/widgets/samples.py +9 -3
- inspect_ai/_display/textual/widgets/task_detail.py +8 -8
- inspect_ai/_display/textual/widgets/tasks.py +17 -1
- inspect_ai/_display/textual/widgets/vscode.py +44 -0
- inspect_ai/_eval/eval.py +74 -25
- inspect_ai/_eval/evalset.py +22 -18
- inspect_ai/_eval/loader.py +34 -11
- inspect_ai/_eval/run.py +13 -15
- inspect_ai/_eval/score.py +13 -3
- inspect_ai/_eval/task/generate.py +8 -9
- inspect_ai/_eval/task/log.py +55 -6
- inspect_ai/_eval/task/run.py +51 -10
- inspect_ai/_eval/task/task.py +23 -9
- inspect_ai/_util/constants.py +2 -0
- inspect_ai/_util/file.py +30 -1
- inspect_ai/_util/json.py +37 -1
- inspect_ai/_util/registry.py +1 -0
- inspect_ai/_util/vscode.py +37 -0
- inspect_ai/_view/server.py +113 -1
- inspect_ai/_view/www/App.css +7 -1
- inspect_ai/_view/www/dist/assets/index.css +813 -415
- inspect_ai/_view/www/dist/assets/index.js +54475 -32003
- inspect_ai/_view/www/eslint.config.mjs +1 -1
- inspect_ai/_view/www/log-schema.json +137 -31
- inspect_ai/_view/www/node_modules/flatted/python/flatted.py +149 -0
- inspect_ai/_view/www/package.json +11 -2
- inspect_ai/_view/www/src/App.tsx +161 -853
- inspect_ai/_view/www/src/api/api-browser.ts +176 -5
- inspect_ai/_view/www/src/api/api-vscode.ts +75 -1
- inspect_ai/_view/www/src/api/client-api.ts +66 -10
- inspect_ai/_view/www/src/api/jsonrpc.ts +2 -0
- inspect_ai/_view/www/src/api/types.ts +107 -2
- inspect_ai/_view/www/src/appearance/icons.ts +2 -0
- inspect_ai/_view/www/src/components/AsciinemaPlayer.tsx +3 -3
- inspect_ai/_view/www/src/components/Card.tsx +6 -4
- inspect_ai/_view/www/src/components/DownloadPanel.tsx +2 -2
- inspect_ai/_view/www/src/components/ExpandablePanel.tsx +56 -61
- inspect_ai/_view/www/src/components/FindBand.tsx +17 -9
- inspect_ai/_view/www/src/components/HumanBaselineView.tsx +1 -1
- inspect_ai/_view/www/src/components/JsonPanel.tsx +14 -24
- inspect_ai/_view/www/src/components/LargeModal.tsx +2 -35
- inspect_ai/_view/www/src/components/LightboxCarousel.tsx +27 -11
- inspect_ai/_view/www/src/components/LinkButton.module.css +16 -0
- inspect_ai/_view/www/src/components/LinkButton.tsx +33 -0
- inspect_ai/_view/www/src/components/LiveVirtualList.module.css +11 -0
- inspect_ai/_view/www/src/components/LiveVirtualList.tsx +177 -0
- inspect_ai/_view/www/src/components/MarkdownDiv.tsx +116 -26
- inspect_ai/_view/www/src/components/MessageBand.tsx +14 -9
- inspect_ai/_view/www/src/components/Modal.module.css +38 -0
- inspect_ai/_view/www/src/components/Modal.tsx +77 -0
- inspect_ai/_view/www/src/components/MorePopOver.tsx +3 -3
- inspect_ai/_view/www/src/components/NavPills.tsx +20 -8
- inspect_ai/_view/www/src/components/NoContentsPanel.module.css +12 -0
- inspect_ai/_view/www/src/components/NoContentsPanel.tsx +20 -0
- inspect_ai/_view/www/src/components/ProgressBar.module.css +5 -4
- inspect_ai/_view/www/src/components/ProgressBar.tsx +3 -2
- inspect_ai/_view/www/src/components/PulsingDots.module.css +81 -0
- inspect_ai/_view/www/src/components/PulsingDots.tsx +45 -0
- inspect_ai/_view/www/src/components/TabSet.tsx +4 -37
- inspect_ai/_view/www/src/components/ToolButton.tsx +3 -4
- inspect_ai/_view/www/src/index.tsx +26 -94
- inspect_ai/_view/www/src/logfile/remoteLogFile.ts +9 -1
- inspect_ai/_view/www/src/logfile/remoteZipFile.ts +30 -4
- inspect_ai/_view/www/src/metadata/RenderedContent.tsx +4 -6
- inspect_ai/_view/www/src/plan/DetailStep.module.css +4 -0
- inspect_ai/_view/www/src/plan/DetailStep.tsx +6 -3
- inspect_ai/_view/www/src/plan/ScorerDetailView.tsx +1 -1
- inspect_ai/_view/www/src/plan/SolverDetailView.module.css +2 -1
- inspect_ai/_view/www/src/samples/InlineSampleDisplay.module.css +9 -1
- inspect_ai/_view/www/src/samples/InlineSampleDisplay.tsx +74 -28
- inspect_ai/_view/www/src/samples/SampleDialog.tsx +58 -22
- inspect_ai/_view/www/src/samples/SampleDisplay.module.css +4 -0
- inspect_ai/_view/www/src/samples/SampleDisplay.tsx +135 -104
- inspect_ai/_view/www/src/samples/SampleSummaryView.module.css +10 -0
- inspect_ai/_view/www/src/samples/SampleSummaryView.tsx +83 -36
- inspect_ai/_view/www/src/samples/SamplesTools.tsx +35 -30
- inspect_ai/_view/www/src/samples/chat/ChatMessage.tsx +2 -1
- inspect_ai/_view/www/src/samples/chat/ChatMessageRenderer.tsx +1 -1
- inspect_ai/_view/www/src/samples/chat/ChatViewVirtualList.tsx +45 -53
- inspect_ai/_view/www/src/samples/chat/MessageContent.tsx +6 -1
- inspect_ai/_view/www/src/samples/chat/MessageContents.tsx +5 -0
- inspect_ai/_view/www/src/samples/chat/messages.ts +36 -0
- inspect_ai/_view/www/src/samples/chat/tools/ToolCallView.module.css +3 -0
- inspect_ai/_view/www/src/samples/chat/tools/ToolCallView.tsx +11 -1
- inspect_ai/_view/www/src/samples/chat/tools/ToolInput.tsx +22 -46
- inspect_ai/_view/www/src/samples/descriptor/samplesDescriptor.tsx +34 -20
- inspect_ai/_view/www/src/samples/descriptor/score/BooleanScoreDescriptor.module.css +3 -3
- inspect_ai/_view/www/src/samples/descriptor/score/BooleanScoreDescriptor.tsx +1 -1
- inspect_ai/_view/www/src/samples/descriptor/score/ObjectScoreDescriptor.module.css +4 -4
- inspect_ai/_view/www/src/samples/descriptor/score/ObjectScoreDescriptor.tsx +10 -10
- inspect_ai/_view/www/src/samples/descriptor/types.ts +6 -5
- inspect_ai/_view/www/src/samples/list/SampleFooter.module.css +22 -3
- inspect_ai/_view/www/src/samples/list/SampleFooter.tsx +27 -2
- inspect_ai/_view/www/src/samples/list/SampleList.tsx +122 -85
- inspect_ai/_view/www/src/samples/list/SampleRow.module.css +6 -0
- inspect_ai/_view/www/src/samples/list/SampleRow.tsx +28 -15
- inspect_ai/_view/www/src/samples/sample-tools/SelectScorer.tsx +29 -18
- inspect_ai/_view/www/src/samples/sample-tools/SortFilter.tsx +28 -28
- inspect_ai/_view/www/src/samples/sample-tools/sample-filter/SampleFilter.tsx +19 -9
- inspect_ai/_view/www/src/samples/sampleDataAdapter.ts +33 -0
- inspect_ai/_view/www/src/samples/sampleLimit.ts +2 -2
- inspect_ai/_view/www/src/samples/scores/SampleScores.tsx +12 -27
- inspect_ai/_view/www/src/samples/scores/SampleScoresGrid.module.css +38 -0
- inspect_ai/_view/www/src/samples/scores/SampleScoresGrid.tsx +118 -0
- inspect_ai/_view/www/src/samples/scores/{SampleScoreView.module.css → SampleScoresView.module.css} +10 -1
- inspect_ai/_view/www/src/samples/scores/SampleScoresView.tsx +78 -0
- inspect_ai/_view/www/src/samples/transcript/ErrorEventView.tsx +0 -13
- inspect_ai/_view/www/src/samples/transcript/InfoEventView.tsx +0 -13
- inspect_ai/_view/www/src/samples/transcript/InputEventView.tsx +0 -13
- inspect_ai/_view/www/src/samples/transcript/ModelEventView.module.css +4 -0
- inspect_ai/_view/www/src/samples/transcript/ModelEventView.tsx +10 -24
- inspect_ai/_view/www/src/samples/transcript/SampleInitEventView.tsx +0 -13
- inspect_ai/_view/www/src/samples/transcript/SampleLimitEventView.tsx +4 -22
- inspect_ai/_view/www/src/samples/transcript/SandboxEventView.tsx +15 -24
- inspect_ai/_view/www/src/samples/transcript/ScoreEventView.tsx +0 -13
- inspect_ai/_view/www/src/samples/transcript/StepEventView.tsx +6 -28
- inspect_ai/_view/www/src/samples/transcript/SubtaskEventView.tsx +24 -34
- inspect_ai/_view/www/src/samples/transcript/ToolEventView.module.css +4 -0
- inspect_ai/_view/www/src/samples/transcript/ToolEventView.tsx +33 -17
- inspect_ai/_view/www/src/samples/transcript/TranscriptView.tsx +197 -338
- inspect_ai/_view/www/src/samples/transcript/TranscriptVirtualListComponent.module.css +16 -0
- inspect_ai/_view/www/src/samples/transcript/TranscriptVirtualListComponent.tsx +44 -0
- inspect_ai/_view/www/src/samples/transcript/event/EventNav.tsx +7 -4
- inspect_ai/_view/www/src/samples/transcript/event/EventPanel.tsx +81 -60
- inspect_ai/_view/www/src/samples/transcript/event/EventProgressPanel.module.css +23 -0
- inspect_ai/_view/www/src/samples/transcript/event/EventProgressPanel.tsx +27 -0
- inspect_ai/_view/www/src/samples/transcript/state/StateEventRenderers.tsx +29 -1
- inspect_ai/_view/www/src/samples/transcript/state/StateEventView.tsx +102 -72
- inspect_ai/_view/www/src/scoring/utils.ts +87 -0
- inspect_ai/_view/www/src/state/appSlice.ts +244 -0
- inspect_ai/_view/www/src/state/hooks.ts +399 -0
- inspect_ai/_view/www/src/state/logPolling.ts +200 -0
- inspect_ai/_view/www/src/state/logSlice.ts +224 -0
- inspect_ai/_view/www/src/state/logsPolling.ts +118 -0
- inspect_ai/_view/www/src/state/logsSlice.ts +181 -0
- inspect_ai/_view/www/src/state/samplePolling.ts +314 -0
- inspect_ai/_view/www/src/state/sampleSlice.ts +140 -0
- inspect_ai/_view/www/src/state/sampleUtils.ts +21 -0
- inspect_ai/_view/www/src/state/scrolling.ts +206 -0
- inspect_ai/_view/www/src/state/store.ts +168 -0
- inspect_ai/_view/www/src/state/store_filter.ts +84 -0
- inspect_ai/_view/www/src/state/utils.ts +23 -0
- inspect_ai/_view/www/src/storage/index.ts +26 -0
- inspect_ai/_view/www/src/types/log.d.ts +36 -26
- inspect_ai/_view/www/src/types/markdown-it-katex.d.ts +21 -0
- inspect_ai/_view/www/src/types.ts +94 -32
- inspect_ai/_view/www/src/utils/attachments.ts +58 -23
- inspect_ai/_view/www/src/utils/json-worker.ts +79 -12
- inspect_ai/_view/www/src/utils/logger.ts +52 -0
- inspect_ai/_view/www/src/utils/polling.ts +100 -0
- inspect_ai/_view/www/src/utils/react.ts +30 -0
- inspect_ai/_view/www/src/utils/vscode.ts +1 -1
- inspect_ai/_view/www/src/workspace/WorkSpace.tsx +184 -217
- inspect_ai/_view/www/src/workspace/WorkSpaceView.tsx +11 -53
- inspect_ai/_view/www/src/workspace/navbar/Navbar.tsx +8 -18
- inspect_ai/_view/www/src/workspace/navbar/PrimaryBar.module.css +1 -0
- inspect_ai/_view/www/src/workspace/navbar/PrimaryBar.tsx +40 -22
- inspect_ai/_view/www/src/workspace/navbar/ResultsPanel.module.css +16 -1
- inspect_ai/_view/www/src/workspace/navbar/ResultsPanel.tsx +159 -103
- inspect_ai/_view/www/src/workspace/navbar/RunningStatusPanel.module.css +32 -0
- inspect_ai/_view/www/src/workspace/navbar/RunningStatusPanel.tsx +32 -0
- inspect_ai/_view/www/src/workspace/navbar/ScoreGrid.module.css +35 -0
- inspect_ai/_view/www/src/workspace/navbar/ScoreGrid.tsx +117 -0
- inspect_ai/_view/www/src/workspace/navbar/SecondaryBar.tsx +12 -14
- inspect_ai/_view/www/src/workspace/navbar/StatusPanel.tsx +6 -2
- inspect_ai/_view/www/src/workspace/sidebar/LogDirectoryTitleView.tsx +4 -4
- inspect_ai/_view/www/src/workspace/sidebar/Sidebar.module.css +3 -2
- inspect_ai/_view/www/src/workspace/sidebar/Sidebar.tsx +28 -13
- inspect_ai/_view/www/src/workspace/tabs/InfoTab.tsx +5 -10
- inspect_ai/_view/www/src/workspace/tabs/JsonTab.tsx +4 -4
- inspect_ai/_view/www/src/workspace/tabs/RunningNoSamples.module.css +22 -0
- inspect_ai/_view/www/src/workspace/tabs/RunningNoSamples.tsx +19 -0
- inspect_ai/_view/www/src/workspace/tabs/SamplesTab.tsx +128 -115
- inspect_ai/_view/www/src/workspace/tabs/grouping.ts +37 -5
- inspect_ai/_view/www/src/workspace/tabs/types.ts +4 -0
- inspect_ai/_view/www/src/workspace/types.ts +4 -3
- inspect_ai/_view/www/src/workspace/utils.ts +4 -4
- inspect_ai/_view/www/vite.config.js +6 -0
- inspect_ai/_view/www/yarn.lock +464 -355
- inspect_ai/agent/__init__.py +36 -0
- inspect_ai/agent/_agent.py +268 -0
- inspect_ai/agent/_as_solver.py +72 -0
- inspect_ai/agent/_as_tool.py +122 -0
- inspect_ai/{solver → agent}/_bridge/bridge.py +23 -37
- inspect_ai/{solver → agent}/_bridge/patch.py +9 -8
- inspect_ai/agent/_filter.py +46 -0
- inspect_ai/agent/_handoff.py +93 -0
- inspect_ai/{solver/_human_agent → agent/_human}/agent.py +11 -12
- inspect_ai/{solver/_human_agent → agent/_human}/commands/__init__.py +2 -3
- inspect_ai/{solver/_human_agent → agent/_human}/commands/clock.py +3 -1
- inspect_ai/{solver/_human_agent → agent/_human}/commands/score.py +5 -5
- inspect_ai/{solver/_human_agent → agent/_human}/install.py +6 -3
- inspect_ai/{solver/_human_agent → agent/_human}/service.py +7 -3
- inspect_ai/{solver/_human_agent → agent/_human}/state.py +5 -5
- inspect_ai/agent/_react.py +241 -0
- inspect_ai/agent/_run.py +36 -0
- inspect_ai/agent/_types.py +81 -0
- inspect_ai/log/_condense.py +26 -0
- inspect_ai/log/_log.py +17 -5
- inspect_ai/log/_recorders/buffer/__init__.py +14 -0
- inspect_ai/log/_recorders/buffer/buffer.py +30 -0
- inspect_ai/log/_recorders/buffer/database.py +685 -0
- inspect_ai/log/_recorders/buffer/filestore.py +259 -0
- inspect_ai/log/_recorders/buffer/types.py +84 -0
- inspect_ai/log/_recorders/eval.py +2 -11
- inspect_ai/log/_recorders/types.py +30 -0
- inspect_ai/log/_transcript.py +32 -2
- inspect_ai/model/__init__.py +7 -1
- inspect_ai/model/_call_tools.py +257 -52
- inspect_ai/model/_chat_message.py +7 -4
- inspect_ai/model/_conversation.py +13 -62
- inspect_ai/model/_display.py +85 -0
- inspect_ai/model/_generate_config.py +2 -2
- inspect_ai/model/_model.py +114 -14
- inspect_ai/model/_model_output.py +14 -9
- inspect_ai/model/_openai.py +16 -4
- inspect_ai/model/_openai_computer_use.py +162 -0
- inspect_ai/model/_openai_responses.py +319 -165
- inspect_ai/model/_providers/anthropic.py +20 -21
- inspect_ai/model/_providers/azureai.py +24 -13
- inspect_ai/model/_providers/bedrock.py +1 -7
- inspect_ai/model/_providers/cloudflare.py +3 -3
- inspect_ai/model/_providers/goodfire.py +2 -6
- inspect_ai/model/_providers/google.py +11 -10
- inspect_ai/model/_providers/groq.py +6 -3
- inspect_ai/model/_providers/hf.py +7 -3
- inspect_ai/model/_providers/mistral.py +7 -10
- inspect_ai/model/_providers/openai.py +47 -17
- inspect_ai/model/_providers/openai_o1.py +11 -4
- inspect_ai/model/_providers/openai_responses.py +12 -14
- inspect_ai/model/_providers/providers.py +2 -2
- inspect_ai/model/_providers/together.py +12 -2
- inspect_ai/model/_providers/util/chatapi.py +7 -2
- inspect_ai/model/_providers/util/hf_handler.py +4 -2
- inspect_ai/model/_providers/util/llama31.py +4 -2
- inspect_ai/model/_providers/vertex.py +11 -9
- inspect_ai/model/_providers/vllm.py +4 -4
- inspect_ai/scorer/__init__.py +2 -0
- inspect_ai/scorer/_metrics/__init__.py +2 -0
- inspect_ai/scorer/_metrics/grouped.py +84 -0
- inspect_ai/scorer/_score.py +26 -6
- inspect_ai/solver/__init__.py +2 -2
- inspect_ai/solver/_basic_agent.py +22 -9
- inspect_ai/solver/_bridge.py +31 -0
- inspect_ai/solver/_chain.py +20 -12
- inspect_ai/solver/_fork.py +5 -1
- inspect_ai/solver/_human_agent.py +52 -0
- inspect_ai/solver/_prompt.py +3 -1
- inspect_ai/solver/_run.py +59 -0
- inspect_ai/solver/_solver.py +14 -4
- inspect_ai/solver/_task_state.py +5 -3
- inspect_ai/tool/_tool_call.py +15 -8
- inspect_ai/tool/_tool_def.py +17 -12
- inspect_ai/tool/_tool_support_helpers.py +4 -4
- inspect_ai/tool/_tool_with.py +14 -11
- inspect_ai/tool/_tools/_bash_session.py +11 -2
- inspect_ai/tool/_tools/_computer/_common.py +18 -2
- inspect_ai/tool/_tools/_computer/_computer.py +18 -2
- inspect_ai/tool/_tools/_computer/_resources/tool/_constants.py +2 -0
- inspect_ai/tool/_tools/_computer/_resources/tool/_x11_client.py +17 -0
- inspect_ai/tool/_tools/_think.py +1 -1
- inspect_ai/tool/_tools/_web_browser/_web_browser.py +103 -62
- inspect_ai/util/__init__.py +2 -0
- inspect_ai/util/_anyio.py +27 -0
- inspect_ai/util/_sandbox/__init__.py +2 -1
- inspect_ai/util/_sandbox/context.py +32 -7
- inspect_ai/util/_sandbox/docker/cleanup.py +4 -0
- inspect_ai/util/_sandbox/docker/compose.py +2 -2
- inspect_ai/util/_sandbox/docker/docker.py +12 -1
- inspect_ai/util/_store_model.py +30 -7
- inspect_ai/util/_subprocess.py +13 -3
- inspect_ai/util/_subtask.py +1 -0
- {inspect_ai-0.3.81.dist-info → inspect_ai-0.3.83.dist-info}/METADATA +1 -1
- {inspect_ai-0.3.81.dist-info → inspect_ai-0.3.83.dist-info}/RECORD +295 -229
- inspect_ai/_view/www/src/samples/scores/SampleScoreView.tsx +0 -169
- inspect_ai/_view/www/src/samples/transcript/SampleTranscript.tsx +0 -22
- /inspect_ai/{solver → agent}/_bridge/__init__.py +0 -0
- /inspect_ai/{solver/_human_agent → agent/_human}/__init__.py +0 -0
- /inspect_ai/{solver/_human_agent → agent/_human}/commands/command.py +0 -0
- /inspect_ai/{solver/_human_agent → agent/_human}/commands/instructions.py +0 -0
- /inspect_ai/{solver/_human_agent → agent/_human}/commands/note.py +0 -0
- /inspect_ai/{solver/_human_agent → agent/_human}/commands/status.py +0 -0
- /inspect_ai/{solver/_human_agent → agent/_human}/commands/submit.py +0 -0
- /inspect_ai/{solver/_human_agent → agent/_human}/panel.py +0 -0
- /inspect_ai/{solver/_human_agent → agent/_human}/view.py +0 -0
- {inspect_ai-0.3.81.dist-info → inspect_ai-0.3.83.dist-info}/WHEEL +0 -0
- {inspect_ai-0.3.81.dist-info → inspect_ai-0.3.83.dist-info}/entry_points.txt +0 -0
- {inspect_ai-0.3.81.dist-info → inspect_ai-0.3.83.dist-info}/licenses/LICENSE +0 -0
- {inspect_ai-0.3.81.dist-info → inspect_ai-0.3.83.dist-info}/top_level.txt +0 -0
@@ -7,7 +7,6 @@ import { toArray } from "../../utils/type";
|
|
7
7
|
import { ChatView } from "../chat/ChatView";
|
8
8
|
import { EventPanel } from "./event/EventPanel";
|
9
9
|
import { EventSection } from "./event/EventSection";
|
10
|
-
import { TranscriptEventState } from "./types";
|
11
10
|
|
12
11
|
import { FC } from "react";
|
13
12
|
import styles from "./SampleInitEventView.module.css";
|
@@ -15,8 +14,6 @@ import styles from "./SampleInitEventView.module.css";
|
|
15
14
|
interface SampleInitEventViewProps {
|
16
15
|
id: string;
|
17
16
|
event: SampleInitEvent;
|
18
|
-
eventState: TranscriptEventState;
|
19
|
-
setEventState: (state: TranscriptEventState) => void;
|
20
17
|
className?: string | string[];
|
21
18
|
}
|
22
19
|
|
@@ -26,8 +23,6 @@ interface SampleInitEventViewProps {
|
|
26
23
|
export const SampleInitEventView: FC<SampleInitEventViewProps> = ({
|
27
24
|
id,
|
28
25
|
event,
|
29
|
-
eventState,
|
30
|
-
setEventState,
|
31
26
|
className,
|
32
27
|
}) => {
|
33
28
|
const stateObj = event.state as Record<string, unknown>;
|
@@ -65,14 +60,6 @@ export const SampleInitEventView: FC<SampleInitEventViewProps> = ({
|
|
65
60
|
title="Sample"
|
66
61
|
icon={ApplicationIcons.sample}
|
67
62
|
subTitle={formatDateTime(new Date(event.timestamp))}
|
68
|
-
selectedNav={eventState.selectedNav || ""}
|
69
|
-
setSelectedNav={(selectedNav) => {
|
70
|
-
setEventState({ ...eventState, selectedNav });
|
71
|
-
}}
|
72
|
-
collapsed={eventState.collapsed}
|
73
|
-
setCollapsed={(collapsed) => {
|
74
|
-
setEventState({ ...eventState, collapsed });
|
75
|
-
}}
|
76
63
|
>
|
77
64
|
<div data-name="Sample" className={styles.sample}>
|
78
65
|
<ChatView messages={stateObj["messages"] as Messages} />
|
@@ -1,14 +1,11 @@
|
|
1
1
|
import { FC } from "react";
|
2
2
|
import { ApplicationIcons } from "../../appearance/icons";
|
3
|
-
import { SampleLimitEvent,
|
3
|
+
import { SampleLimitEvent, Type9 } from "../../types/log";
|
4
4
|
import { EventPanel } from "./event/EventPanel";
|
5
|
-
import { TranscriptEventState } from "./types";
|
6
5
|
|
7
6
|
interface SampleLimitEventViewProps {
|
8
7
|
id: string;
|
9
8
|
event: SampleLimitEvent;
|
10
|
-
eventState: TranscriptEventState;
|
11
|
-
setEventState: (state: TranscriptEventState) => void;
|
12
9
|
className?: string | string[];
|
13
10
|
}
|
14
11
|
|
@@ -18,11 +15,9 @@ interface SampleLimitEventViewProps {
|
|
18
15
|
export const SampleLimitEventView: FC<SampleLimitEventViewProps> = ({
|
19
16
|
id,
|
20
17
|
event,
|
21
|
-
eventState,
|
22
|
-
setEventState,
|
23
18
|
className,
|
24
19
|
}) => {
|
25
|
-
const resolve_title = (type:
|
20
|
+
const resolve_title = (type: Type9) => {
|
26
21
|
switch (type) {
|
27
22
|
case "custom":
|
28
23
|
return "Custom Limit Exceeded";
|
@@ -39,7 +34,7 @@ export const SampleLimitEventView: FC<SampleLimitEventViewProps> = ({
|
|
39
34
|
}
|
40
35
|
};
|
41
36
|
|
42
|
-
const resolve_icon = (type:
|
37
|
+
const resolve_icon = (type: Type9) => {
|
43
38
|
switch (type) {
|
44
39
|
case "custom":
|
45
40
|
return ApplicationIcons.limits.custom;
|
@@ -60,20 +55,7 @@ export const SampleLimitEventView: FC<SampleLimitEventViewProps> = ({
|
|
60
55
|
const icon = resolve_icon(event.type);
|
61
56
|
|
62
57
|
return (
|
63
|
-
<EventPanel
|
64
|
-
id={id}
|
65
|
-
title={title}
|
66
|
-
icon={icon}
|
67
|
-
className={className}
|
68
|
-
selectedNav={eventState.selectedNav || ""}
|
69
|
-
setSelectedNav={(selectedNav) => {
|
70
|
-
setEventState({ ...eventState, selectedNav });
|
71
|
-
}}
|
72
|
-
collapsed={eventState.collapsed}
|
73
|
-
setCollapsed={(collapsed) => {
|
74
|
-
setEventState({ ...eventState, collapsed });
|
75
|
-
}}
|
76
|
-
>
|
58
|
+
<EventPanel id={id} title={title} icon={icon} className={className}>
|
77
59
|
{event.message}
|
78
60
|
</EventPanel>
|
79
61
|
);
|
@@ -5,7 +5,6 @@ import { MetaDataGrid } from "../../metadata/MetaDataGrid";
|
|
5
5
|
import { SandboxEvent } from "../../types/log";
|
6
6
|
import { EventPanel } from "./event/EventPanel";
|
7
7
|
import { EventSection } from "./event/EventSection";
|
8
|
-
import { TranscriptEventState } from "./types";
|
9
8
|
|
10
9
|
import clsx from "clsx";
|
11
10
|
import { FC } from "react";
|
@@ -15,8 +14,6 @@ import { formatTiming } from "./event/utils";
|
|
15
14
|
interface SandboxEventViewProps {
|
16
15
|
id: string;
|
17
16
|
event: SandboxEvent;
|
18
|
-
eventState: TranscriptEventState;
|
19
|
-
setEventState: (state: TranscriptEventState) => void;
|
20
17
|
className?: string | string[];
|
21
18
|
}
|
22
19
|
|
@@ -26,8 +23,6 @@ interface SandboxEventViewProps {
|
|
26
23
|
export const SandboxEventView: FC<SandboxEventViewProps> = ({
|
27
24
|
id,
|
28
25
|
event,
|
29
|
-
eventState,
|
30
|
-
setEventState,
|
31
26
|
className,
|
32
27
|
}) => {
|
33
28
|
return (
|
@@ -37,31 +32,24 @@ export const SandboxEventView: FC<SandboxEventViewProps> = ({
|
|
37
32
|
title={`Sandbox: ${event.action}`}
|
38
33
|
icon={ApplicationIcons.sandbox}
|
39
34
|
subTitle={formatTiming(event.timestamp, event.working_start)}
|
40
|
-
selectedNav={eventState.selectedNav || ""}
|
41
|
-
setSelectedNav={(selectedNav) => {
|
42
|
-
setEventState({ ...eventState, selectedNav });
|
43
|
-
}}
|
44
|
-
collapsed={eventState.collapsed}
|
45
|
-
setCollapsed={(collapsed) => {
|
46
|
-
setEventState({ ...eventState, collapsed });
|
47
|
-
}}
|
48
35
|
>
|
49
36
|
{event.action === "exec" ? (
|
50
|
-
<ExecView event={event} />
|
37
|
+
<ExecView id={`${id}-exec`} event={event} />
|
51
38
|
) : event.action === "read_file" ? (
|
52
|
-
<ReadFileView event={event} />
|
39
|
+
<ReadFileView id={`${id}-read-file`} event={event} />
|
53
40
|
) : (
|
54
|
-
<WriteFileView event={event} />
|
41
|
+
<WriteFileView id={`${id}-write-file`} event={event} />
|
55
42
|
)}
|
56
43
|
</EventPanel>
|
57
44
|
);
|
58
45
|
};
|
59
46
|
|
60
47
|
interface ExecViewProps {
|
48
|
+
id: string;
|
61
49
|
event: SandboxEvent;
|
62
50
|
}
|
63
51
|
|
64
|
-
const ExecView: FC<ExecViewProps> = ({ event }) => {
|
52
|
+
const ExecView: FC<ExecViewProps> = ({ id, event }) => {
|
65
53
|
if (event.cmd === null) {
|
66
54
|
return undefined;
|
67
55
|
}
|
@@ -92,7 +80,7 @@ const ExecView: FC<ExecViewProps> = ({ event }) => {
|
|
92
80
|
</EventSection>
|
93
81
|
<EventSection title={`Result`}>
|
94
82
|
{output ? (
|
95
|
-
<ExpandablePanel collapse={false}>
|
83
|
+
<ExpandablePanel id={`${id}-output`} collapse={false}>
|
96
84
|
<MarkdownDiv markdown={output} />
|
97
85
|
</ExpandablePanel>
|
98
86
|
) : undefined}
|
@@ -103,38 +91,41 @@ const ExecView: FC<ExecViewProps> = ({ event }) => {
|
|
103
91
|
};
|
104
92
|
|
105
93
|
interface ReadFileViewProps {
|
94
|
+
id: string;
|
106
95
|
event: SandboxEvent;
|
107
96
|
}
|
108
97
|
|
109
|
-
const ReadFileView: FC<ReadFileViewProps> = ({ event }) => {
|
98
|
+
const ReadFileView: FC<ReadFileViewProps> = ({ id, event }) => {
|
110
99
|
if (event.file === null) {
|
111
100
|
return undefined;
|
112
101
|
}
|
113
102
|
const file = event.file;
|
114
103
|
const output = event.output;
|
115
|
-
return <FileView file={file} contents={output?.trim()} />;
|
104
|
+
return <FileView id={id} file={file} contents={output?.trim()} />;
|
116
105
|
};
|
117
106
|
|
118
107
|
interface WriteFileViewProps {
|
108
|
+
id: string;
|
119
109
|
event: SandboxEvent;
|
120
110
|
}
|
121
111
|
|
122
|
-
const WriteFileView: FC<WriteFileViewProps> = ({ event }) => {
|
112
|
+
const WriteFileView: FC<WriteFileViewProps> = ({ id, event }) => {
|
123
113
|
if (event.file === null) {
|
124
114
|
return undefined;
|
125
115
|
}
|
126
116
|
const file = event.file;
|
127
117
|
const input = event.input;
|
128
118
|
|
129
|
-
return <FileView file={file} contents={input?.trim()} />;
|
119
|
+
return <FileView id={id} file={file} contents={input?.trim()} />;
|
130
120
|
};
|
131
121
|
|
132
122
|
interface FileViewProps {
|
123
|
+
id: string;
|
133
124
|
file: string;
|
134
125
|
contents?: string;
|
135
126
|
}
|
136
127
|
|
137
|
-
const FileView: FC<FileViewProps> = ({ file, contents }) => {
|
128
|
+
const FileView: FC<FileViewProps> = ({ id, file, contents }) => {
|
138
129
|
return (
|
139
130
|
<div>
|
140
131
|
<EventSection title="File">
|
@@ -143,7 +134,7 @@ const FileView: FC<FileViewProps> = ({ file, contents }) => {
|
|
143
134
|
|
144
135
|
{contents ? (
|
145
136
|
<EventSection title="Contents">
|
146
|
-
<ExpandablePanel collapse={false}>
|
137
|
+
<ExpandablePanel id={`${id}-file`} collapse={false}>
|
147
138
|
<pre>{contents}</pre>
|
148
139
|
</ExpandablePanel>
|
149
140
|
</EventSection>
|
@@ -5,7 +5,6 @@ import { MetaDataGrid } from "../../metadata/MetaDataGrid";
|
|
5
5
|
import { ScoreEvent, Value1 } from "../../types/log";
|
6
6
|
import { formatDateTime } from "../../utils/format";
|
7
7
|
import { EventPanel } from "./event/EventPanel";
|
8
|
-
import { TranscriptEventState } from "./types";
|
9
8
|
|
10
9
|
import clsx from "clsx";
|
11
10
|
import styles from "./ScoreEventView.module.css";
|
@@ -13,8 +12,6 @@ import styles from "./ScoreEventView.module.css";
|
|
13
12
|
interface ScoreEventViewProps {
|
14
13
|
id: string;
|
15
14
|
event: ScoreEvent;
|
16
|
-
eventState: TranscriptEventState;
|
17
|
-
setEventState: (state: TranscriptEventState) => void;
|
18
15
|
className?: string | string[];
|
19
16
|
}
|
20
17
|
|
@@ -24,8 +21,6 @@ interface ScoreEventViewProps {
|
|
24
21
|
export const ScoreEventView: FC<ScoreEventViewProps> = ({
|
25
22
|
id,
|
26
23
|
event,
|
27
|
-
eventState,
|
28
|
-
setEventState,
|
29
24
|
className,
|
30
25
|
}) => {
|
31
26
|
const resolvedTarget = event.target
|
@@ -41,14 +36,6 @@ export const ScoreEventView: FC<ScoreEventViewProps> = ({
|
|
41
36
|
className={clsx(className, "text-size-small")}
|
42
37
|
subTitle={formatDateTime(new Date(event.timestamp))}
|
43
38
|
icon={ApplicationIcons.scorer}
|
44
|
-
selectedNav={eventState.selectedNav || ""}
|
45
|
-
setSelectedNav={(selectedNav) => {
|
46
|
-
setEventState({ ...eventState, selectedNav });
|
47
|
-
}}
|
48
|
-
collapsed={eventState.collapsed}
|
49
|
-
setCollapsed={(collapsed) => {
|
50
|
-
setEventState({ ...eventState, collapsed });
|
51
|
-
}}
|
52
39
|
>
|
53
40
|
<div data-name="Explanation" className={clsx(styles.explanation)}>
|
54
41
|
{event.target ? (
|
@@ -1,17 +1,15 @@
|
|
1
1
|
import clsx from "clsx";
|
2
|
-
import { FC
|
2
|
+
import { FC } from "react";
|
3
3
|
import { StepEvent } from "../../types/log";
|
4
4
|
import { formatDateTime } from "../../utils/format";
|
5
5
|
import { EventPanel } from "./event/EventPanel";
|
6
6
|
import { TranscriptComponent } from "./TranscriptView";
|
7
|
-
import { EventNode
|
7
|
+
import { EventNode } from "./types";
|
8
8
|
|
9
9
|
interface StepEventViewProps {
|
10
|
+
id: string;
|
10
11
|
event: StepEvent;
|
11
|
-
eventState: TranscriptEventState;
|
12
|
-
setEventState: (state: TranscriptEventState) => void;
|
13
12
|
children: EventNode[];
|
14
|
-
scrollRef?: RefObject<HTMLDivElement | null>;
|
15
13
|
className?: string | string[];
|
16
14
|
}
|
17
15
|
|
@@ -19,11 +17,9 @@ interface StepEventViewProps {
|
|
19
17
|
* Renders the StepEventView component.
|
20
18
|
*/
|
21
19
|
export const StepEventView: FC<StepEventViewProps> = ({
|
20
|
+
id,
|
22
21
|
event,
|
23
|
-
eventState,
|
24
|
-
setEventState,
|
25
22
|
children,
|
26
|
-
scrollRef,
|
27
23
|
className,
|
28
24
|
}) => {
|
29
25
|
const descriptor = stepDescriptor(event);
|
@@ -32,37 +28,19 @@ export const StepEventView: FC<StepEventViewProps> = ({
|
|
32
28
|
`${event.type ? event.type + ": " : "Step: "}${event.name}`;
|
33
29
|
const text = summarize(children);
|
34
30
|
|
35
|
-
const [transcriptState, setTranscriptState] = useState({});
|
36
|
-
const onTranscriptState = useCallback(
|
37
|
-
(state: TranscriptEventState) => {
|
38
|
-
setTranscriptState({ ...state });
|
39
|
-
},
|
40
|
-
[setTranscriptState],
|
41
|
-
);
|
42
|
-
|
43
31
|
return (
|
44
32
|
<EventPanel
|
45
|
-
id={`step-${event.name}`}
|
33
|
+
id={`step-${event.name}-${id}`}
|
46
34
|
className={clsx("transcript-step", className)}
|
47
35
|
title={title}
|
48
36
|
subTitle={formatDateTime(new Date(event.timestamp))}
|
49
37
|
icon={descriptor.icon}
|
50
38
|
collapse={descriptor.collapse}
|
51
39
|
text={text}
|
52
|
-
selectedNav={eventState.selectedNav || ""}
|
53
|
-
setSelectedNav={(selectedNav) => {
|
54
|
-
setEventState({ ...eventState, selectedNav });
|
55
|
-
}}
|
56
|
-
collapsed={eventState.collapsed}
|
57
|
-
setCollapsed={(collapsed) => {
|
58
|
-
setEventState({ ...eventState, collapsed });
|
59
|
-
}}
|
60
40
|
>
|
61
41
|
<TranscriptComponent
|
62
|
-
id={`step
|
42
|
+
id={`step|${event.name}|${id}`}
|
63
43
|
eventNodes={children}
|
64
|
-
transcriptState={transcriptState}
|
65
|
-
setTranscriptState={onTranscriptState}
|
66
44
|
/>
|
67
45
|
</EventPanel>
|
68
46
|
);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import clsx from "clsx";
|
2
|
-
import { FC,
|
2
|
+
import { FC, ReactNode } from "react";
|
3
3
|
import { ApplicationIcons } from "../../appearance/icons";
|
4
4
|
import { MetaDataView } from "../../metadata/MetaDataView";
|
5
5
|
import { Input2, Input5, Result2, SubtaskEvent } from "../../types/log";
|
@@ -7,13 +7,10 @@ import { EventPanel } from "./event/EventPanel";
|
|
7
7
|
import { formatTiming, formatTitle } from "./event/utils";
|
8
8
|
import styles from "./SubtaskEventView.module.css";
|
9
9
|
import { TranscriptView } from "./TranscriptView";
|
10
|
-
import { TranscriptEventState } from "./types";
|
11
10
|
|
12
11
|
interface SubtaskEventViewProps {
|
13
12
|
id: string;
|
14
13
|
event: SubtaskEvent;
|
15
|
-
eventState: TranscriptEventState;
|
16
|
-
setEventState: (state: TranscriptEventState) => void;
|
17
14
|
depth: number;
|
18
15
|
className?: string | string[];
|
19
16
|
}
|
@@ -24,14 +21,12 @@ interface SubtaskEventViewProps {
|
|
24
21
|
export const SubtaskEventView: FC<SubtaskEventViewProps> = ({
|
25
22
|
id,
|
26
23
|
event,
|
27
|
-
eventState,
|
28
|
-
setEventState,
|
29
24
|
depth,
|
30
25
|
className,
|
31
26
|
}) => {
|
32
|
-
|
33
|
-
|
34
|
-
|
27
|
+
const body: ReactNode[] = [];
|
28
|
+
if (event.type === "fork") {
|
29
|
+
body.push(
|
35
30
|
<div title="Summary" className={clsx(styles.summary)}>
|
36
31
|
<div className={clsx("text-style-label")}>Inputs</div>
|
37
32
|
<div className={clsx(styles.summaryRendered)}>
|
@@ -48,24 +43,27 @@ export const SubtaskEventView: FC<SubtaskEventViewProps> = ({
|
|
48
43
|
) : (
|
49
44
|
<None />
|
50
45
|
)}
|
51
|
-
</div
|
52
|
-
)
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
<TranscriptView
|
61
|
-
id={`${id}-subtask`}
|
62
|
-
data-name="Transcript"
|
63
|
-
events={event.events}
|
64
|
-
depth={depth + 1}
|
65
|
-
/>
|
66
|
-
) : undefined}
|
67
|
-
</Fragment>
|
46
|
+
</div>,
|
47
|
+
);
|
48
|
+
} else {
|
49
|
+
body.push(
|
50
|
+
<SubtaskSummary
|
51
|
+
data-name="Summary"
|
52
|
+
input={event.input}
|
53
|
+
result={event.result}
|
54
|
+
/>,
|
68
55
|
);
|
56
|
+
if (event.events.length > 0) {
|
57
|
+
body.push(
|
58
|
+
<TranscriptView
|
59
|
+
id={`${id}-subtask`}
|
60
|
+
data-name="Transcript"
|
61
|
+
events={event.events}
|
62
|
+
depth={depth + 1}
|
63
|
+
/>,
|
64
|
+
);
|
65
|
+
}
|
66
|
+
}
|
69
67
|
|
70
68
|
// Is this a traditional subtask or a fork?
|
71
69
|
const type = event.type === "fork" ? "Fork" : "Subtask";
|
@@ -80,14 +78,6 @@ export const SubtaskEventView: FC<SubtaskEventViewProps> = ({
|
|
80
78
|
)}
|
81
79
|
subTitle={formatTiming(event.timestamp, event.working_start)}
|
82
80
|
collapse={false}
|
83
|
-
selectedNav={eventState.selectedNav || ""}
|
84
|
-
setSelectedNav={(selectedNav) => {
|
85
|
-
setEventState({ ...eventState, selectedNav });
|
86
|
-
}}
|
87
|
-
collapsed={eventState.collapsed}
|
88
|
-
setCollapsed={(collapsed) => {
|
89
|
-
setEventState({ ...eventState, collapsed });
|
90
|
-
}}
|
91
81
|
>
|
92
82
|
{body}
|
93
83
|
</EventPanel>
|
@@ -5,17 +5,17 @@ import { ToolCallView } from "../chat/tools/ToolCallView";
|
|
5
5
|
import { ApprovalEventView } from "./ApprovalEventView";
|
6
6
|
import { EventPanel } from "./event/EventPanel";
|
7
7
|
import { TranscriptView } from "./TranscriptView";
|
8
|
-
import { TranscriptEventState } from "./types";
|
9
8
|
|
9
|
+
import clsx from "clsx";
|
10
10
|
import { FC, useMemo } from "react";
|
11
|
+
import { PulsingDots } from "../../components/PulsingDots";
|
12
|
+
import { ChatView } from "../chat/ChatView";
|
11
13
|
import { formatTiming, formatTitle } from "./event/utils";
|
12
14
|
import styles from "./ToolEventView.module.css";
|
13
15
|
|
14
16
|
interface ToolEventViewProps {
|
15
17
|
id: string;
|
16
18
|
event: ToolEvent;
|
17
|
-
eventState: TranscriptEventState;
|
18
|
-
setEventState: (state: TranscriptEventState) => void;
|
19
19
|
depth: number;
|
20
20
|
className?: string | string[];
|
21
21
|
}
|
@@ -26,8 +26,6 @@ interface ToolEventViewProps {
|
|
26
26
|
export const ToolEventView: FC<ToolEventViewProps> = ({
|
27
27
|
id,
|
28
28
|
event,
|
29
|
-
eventState,
|
30
|
-
setEventState,
|
31
29
|
depth,
|
32
30
|
className,
|
33
31
|
}) => {
|
@@ -37,10 +35,19 @@ export const ToolEventView: FC<ToolEventViewProps> = ({
|
|
37
35
|
[event.function, event.arguments],
|
38
36
|
);
|
39
37
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
38
|
+
const { approvalEvent, lastModelEvent } = useMemo(() => {
|
39
|
+
// Find an approval if there is one
|
40
|
+
const approvalEvent = event.events.find((e) => {
|
41
|
+
return e.event === "approval";
|
42
|
+
});
|
43
|
+
|
44
|
+
// Find a model message to render, if there is one
|
45
|
+
const lastModelEvent = [...event.events].reverse().find((e) => {
|
46
|
+
return e.event === "model";
|
47
|
+
});
|
48
|
+
|
49
|
+
return { approvalEvent, lastModelEvent };
|
50
|
+
}, [event.events]);
|
44
51
|
|
45
52
|
const title = `Tool: ${event.view?.title || event.function}`;
|
46
53
|
return (
|
@@ -50,17 +57,10 @@ export const ToolEventView: FC<ToolEventViewProps> = ({
|
|
50
57
|
className={className}
|
51
58
|
subTitle={formatTiming(event.timestamp, event.working_start)}
|
52
59
|
icon={ApplicationIcons.solvers.use_tools}
|
53
|
-
selectedNav={eventState.selectedNav || ""}
|
54
|
-
setSelectedNav={(selectedNav) => {
|
55
|
-
setEventState({ ...eventState, selectedNav });
|
56
|
-
}}
|
57
|
-
collapsed={eventState.collapsed}
|
58
|
-
setCollapsed={(collapsed) => {
|
59
|
-
setEventState({ ...eventState, collapsed });
|
60
|
-
}}
|
61
60
|
>
|
62
61
|
<div data-name="Summary" className={styles.summary}>
|
63
62
|
<ToolCallView
|
63
|
+
id={`${id}-tool-call`}
|
64
64
|
functionCall={functionCall}
|
65
65
|
input={input}
|
66
66
|
highlightLanguage={highlightLanguage}
|
@@ -68,6 +68,16 @@ export const ToolEventView: FC<ToolEventViewProps> = ({
|
|
68
68
|
mode="compact"
|
69
69
|
view={event.view ? event.view : undefined}
|
70
70
|
/>
|
71
|
+
|
72
|
+
{lastModelEvent && lastModelEvent.event === "model" ? (
|
73
|
+
<ChatView
|
74
|
+
id={`${id}-toolcall-chatmessage`}
|
75
|
+
messages={lastModelEvent.output.choices.map((m) => m.message)}
|
76
|
+
numbered={false}
|
77
|
+
toolCallStyle="compact"
|
78
|
+
/>
|
79
|
+
) : undefined}
|
80
|
+
|
71
81
|
{approvalEvent ? (
|
72
82
|
<ApprovalEventView
|
73
83
|
event={approvalEvent}
|
@@ -76,11 +86,17 @@ export const ToolEventView: FC<ToolEventViewProps> = ({
|
|
76
86
|
) : (
|
77
87
|
""
|
78
88
|
)}
|
89
|
+
{event.pending ? (
|
90
|
+
<div className={clsx(styles.progress)}>
|
91
|
+
<PulsingDots subtle={false} size="medium" />
|
92
|
+
</div>
|
93
|
+
) : undefined}
|
79
94
|
</div>
|
80
95
|
{event.events.length > 0 ? (
|
81
96
|
<TranscriptView
|
82
97
|
id={`${id}-subtask`}
|
83
98
|
data-name="Transcript"
|
99
|
+
data-default={event.failed || event.agent ? true : null}
|
84
100
|
events={event.events}
|
85
101
|
depth={depth + 1}
|
86
102
|
/>
|