inspect-ai 0.3.81__py3-none-any.whl → 0.3.82__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.
Files changed (179) hide show
  1. inspect_ai/_cli/eval.py +35 -2
  2. inspect_ai/_cli/util.py +44 -1
  3. inspect_ai/_display/core/config.py +1 -1
  4. inspect_ai/_display/core/display.py +13 -4
  5. inspect_ai/_display/core/results.py +1 -1
  6. inspect_ai/_display/textual/widgets/task_detail.py +5 -4
  7. inspect_ai/_eval/eval.py +38 -1
  8. inspect_ai/_eval/evalset.py +5 -0
  9. inspect_ai/_eval/run.py +5 -2
  10. inspect_ai/_eval/task/log.py +53 -6
  11. inspect_ai/_eval/task/run.py +51 -10
  12. inspect_ai/_util/constants.py +2 -0
  13. inspect_ai/_util/file.py +17 -1
  14. inspect_ai/_util/json.py +36 -1
  15. inspect_ai/_view/server.py +113 -1
  16. inspect_ai/_view/www/App.css +1 -1
  17. inspect_ai/_view/www/dist/assets/index.css +518 -296
  18. inspect_ai/_view/www/dist/assets/index.js +38803 -36307
  19. inspect_ai/_view/www/eslint.config.mjs +1 -1
  20. inspect_ai/_view/www/log-schema.json +13 -0
  21. inspect_ai/_view/www/node_modules/flatted/python/flatted.py +149 -0
  22. inspect_ai/_view/www/package.json +8 -2
  23. inspect_ai/_view/www/src/App.tsx +151 -855
  24. inspect_ai/_view/www/src/api/api-browser.ts +176 -5
  25. inspect_ai/_view/www/src/api/api-vscode.ts +75 -1
  26. inspect_ai/_view/www/src/api/client-api.ts +66 -10
  27. inspect_ai/_view/www/src/api/jsonrpc.ts +2 -0
  28. inspect_ai/_view/www/src/api/types.ts +107 -2
  29. inspect_ai/_view/www/src/appearance/icons.ts +1 -0
  30. inspect_ai/_view/www/src/components/AsciinemaPlayer.tsx +3 -3
  31. inspect_ai/_view/www/src/components/DownloadPanel.tsx +2 -2
  32. inspect_ai/_view/www/src/components/ExpandablePanel.tsx +56 -61
  33. inspect_ai/_view/www/src/components/FindBand.tsx +17 -9
  34. inspect_ai/_view/www/src/components/HumanBaselineView.tsx +1 -1
  35. inspect_ai/_view/www/src/components/JsonPanel.tsx +14 -24
  36. inspect_ai/_view/www/src/components/LargeModal.tsx +2 -35
  37. inspect_ai/_view/www/src/components/LightboxCarousel.tsx +27 -11
  38. inspect_ai/_view/www/src/components/LiveVirtualList.module.css +11 -0
  39. inspect_ai/_view/www/src/components/LiveVirtualList.tsx +177 -0
  40. inspect_ai/_view/www/src/components/MarkdownDiv.tsx +3 -3
  41. inspect_ai/_view/www/src/components/MessageBand.tsx +14 -9
  42. inspect_ai/_view/www/src/components/MorePopOver.tsx +3 -3
  43. inspect_ai/_view/www/src/components/NavPills.tsx +20 -8
  44. inspect_ai/_view/www/src/components/NoContentsPanel.module.css +12 -0
  45. inspect_ai/_view/www/src/components/NoContentsPanel.tsx +20 -0
  46. inspect_ai/_view/www/src/components/ProgressBar.module.css +5 -4
  47. inspect_ai/_view/www/src/components/ProgressBar.tsx +3 -2
  48. inspect_ai/_view/www/src/components/PulsingDots.module.css +81 -0
  49. inspect_ai/_view/www/src/components/PulsingDots.tsx +45 -0
  50. inspect_ai/_view/www/src/components/TabSet.tsx +4 -37
  51. inspect_ai/_view/www/src/components/ToolButton.tsx +3 -4
  52. inspect_ai/_view/www/src/index.tsx +26 -94
  53. inspect_ai/_view/www/src/logfile/remoteLogFile.ts +9 -1
  54. inspect_ai/_view/www/src/logfile/remoteZipFile.ts +30 -4
  55. inspect_ai/_view/www/src/metadata/RenderedContent.tsx +4 -6
  56. inspect_ai/_view/www/src/plan/ScorerDetailView.tsx +1 -1
  57. inspect_ai/_view/www/src/samples/InlineSampleDisplay.module.css +9 -1
  58. inspect_ai/_view/www/src/samples/InlineSampleDisplay.tsx +67 -28
  59. inspect_ai/_view/www/src/samples/SampleDialog.tsx +51 -22
  60. inspect_ai/_view/www/src/samples/SampleDisplay.module.css +4 -0
  61. inspect_ai/_view/www/src/samples/SampleDisplay.tsx +144 -90
  62. inspect_ai/_view/www/src/samples/SampleSummaryView.module.css +4 -0
  63. inspect_ai/_view/www/src/samples/SampleSummaryView.tsx +82 -35
  64. inspect_ai/_view/www/src/samples/SamplesTools.tsx +23 -30
  65. inspect_ai/_view/www/src/samples/chat/ChatMessage.tsx +2 -1
  66. inspect_ai/_view/www/src/samples/chat/ChatMessageRenderer.tsx +1 -1
  67. inspect_ai/_view/www/src/samples/chat/ChatViewVirtualList.tsx +45 -53
  68. inspect_ai/_view/www/src/samples/chat/MessageContent.tsx +4 -1
  69. inspect_ai/_view/www/src/samples/chat/MessageContents.tsx +3 -0
  70. inspect_ai/_view/www/src/samples/chat/messages.ts +34 -0
  71. inspect_ai/_view/www/src/samples/chat/tools/ToolCallView.module.css +3 -0
  72. inspect_ai/_view/www/src/samples/chat/tools/ToolCallView.tsx +10 -1
  73. inspect_ai/_view/www/src/samples/chat/tools/ToolInput.tsx +22 -46
  74. inspect_ai/_view/www/src/samples/descriptor/samplesDescriptor.tsx +25 -17
  75. inspect_ai/_view/www/src/samples/descriptor/score/ObjectScoreDescriptor.tsx +2 -1
  76. inspect_ai/_view/www/src/samples/descriptor/types.ts +6 -5
  77. inspect_ai/_view/www/src/samples/list/SampleFooter.module.css +21 -3
  78. inspect_ai/_view/www/src/samples/list/SampleFooter.tsx +20 -1
  79. inspect_ai/_view/www/src/samples/list/SampleList.tsx +105 -85
  80. inspect_ai/_view/www/src/samples/list/SampleRow.module.css +6 -0
  81. inspect_ai/_view/www/src/samples/list/SampleRow.tsx +27 -14
  82. inspect_ai/_view/www/src/samples/sample-tools/SelectScorer.tsx +29 -18
  83. inspect_ai/_view/www/src/samples/sample-tools/SortFilter.tsx +28 -28
  84. inspect_ai/_view/www/src/samples/sample-tools/sample-filter/SampleFilter.tsx +19 -9
  85. inspect_ai/_view/www/src/samples/sampleDataAdapter.ts +33 -0
  86. inspect_ai/_view/www/src/samples/sampleLimit.ts +2 -2
  87. inspect_ai/_view/www/src/samples/scores/SampleScoreView.tsx +7 -9
  88. inspect_ai/_view/www/src/samples/scores/SampleScores.tsx +7 -11
  89. inspect_ai/_view/www/src/samples/transcript/ErrorEventView.tsx +0 -13
  90. inspect_ai/_view/www/src/samples/transcript/InfoEventView.tsx +0 -13
  91. inspect_ai/_view/www/src/samples/transcript/InputEventView.tsx +0 -13
  92. inspect_ai/_view/www/src/samples/transcript/ModelEventView.module.css +4 -0
  93. inspect_ai/_view/www/src/samples/transcript/ModelEventView.tsx +10 -24
  94. inspect_ai/_view/www/src/samples/transcript/SampleInitEventView.tsx +0 -13
  95. inspect_ai/_view/www/src/samples/transcript/SampleLimitEventView.tsx +4 -22
  96. inspect_ai/_view/www/src/samples/transcript/SandboxEventView.tsx +15 -24
  97. inspect_ai/_view/www/src/samples/transcript/ScoreEventView.tsx +0 -13
  98. inspect_ai/_view/www/src/samples/transcript/StepEventView.tsx +6 -28
  99. inspect_ai/_view/www/src/samples/transcript/SubtaskEventView.tsx +24 -34
  100. inspect_ai/_view/www/src/samples/transcript/ToolEventView.module.css +4 -0
  101. inspect_ai/_view/www/src/samples/transcript/ToolEventView.tsx +8 -13
  102. inspect_ai/_view/www/src/samples/transcript/TranscriptView.tsx +197 -338
  103. inspect_ai/_view/www/src/samples/transcript/TranscriptVirtualListComponent.module.css +16 -0
  104. inspect_ai/_view/www/src/samples/transcript/TranscriptVirtualListComponent.tsx +44 -0
  105. inspect_ai/_view/www/src/samples/transcript/event/EventNav.tsx +7 -4
  106. inspect_ai/_view/www/src/samples/transcript/event/EventPanel.tsx +52 -58
  107. inspect_ai/_view/www/src/samples/transcript/event/EventProgressPanel.module.css +23 -0
  108. inspect_ai/_view/www/src/samples/transcript/event/EventProgressPanel.tsx +27 -0
  109. inspect_ai/_view/www/src/samples/transcript/state/StateEventRenderers.tsx +30 -1
  110. inspect_ai/_view/www/src/samples/transcript/state/StateEventView.tsx +102 -72
  111. inspect_ai/_view/www/src/scoring/utils.ts +87 -0
  112. inspect_ai/_view/www/src/state/appSlice.ts +244 -0
  113. inspect_ai/_view/www/src/state/hooks.ts +397 -0
  114. inspect_ai/_view/www/src/state/logPolling.ts +196 -0
  115. inspect_ai/_view/www/src/state/logSlice.ts +214 -0
  116. inspect_ai/_view/www/src/state/logsPolling.ts +118 -0
  117. inspect_ai/_view/www/src/state/logsSlice.ts +181 -0
  118. inspect_ai/_view/www/src/state/samplePolling.ts +311 -0
  119. inspect_ai/_view/www/src/state/sampleSlice.ts +127 -0
  120. inspect_ai/_view/www/src/state/sampleUtils.ts +21 -0
  121. inspect_ai/_view/www/src/state/scrolling.ts +206 -0
  122. inspect_ai/_view/www/src/state/store.ts +168 -0
  123. inspect_ai/_view/www/src/state/store_filter.ts +84 -0
  124. inspect_ai/_view/www/src/state/utils.ts +23 -0
  125. inspect_ai/_view/www/src/storage/index.ts +26 -0
  126. inspect_ai/_view/www/src/types/log.d.ts +2 -0
  127. inspect_ai/_view/www/src/types.ts +94 -32
  128. inspect_ai/_view/www/src/utils/attachments.ts +58 -23
  129. inspect_ai/_view/www/src/utils/logger.ts +52 -0
  130. inspect_ai/_view/www/src/utils/polling.ts +100 -0
  131. inspect_ai/_view/www/src/utils/react.ts +30 -0
  132. inspect_ai/_view/www/src/utils/vscode.ts +1 -1
  133. inspect_ai/_view/www/src/workspace/WorkSpace.tsx +181 -216
  134. inspect_ai/_view/www/src/workspace/WorkSpaceView.tsx +11 -53
  135. inspect_ai/_view/www/src/workspace/navbar/Navbar.tsx +8 -18
  136. inspect_ai/_view/www/src/workspace/navbar/PrimaryBar.module.css +1 -0
  137. inspect_ai/_view/www/src/workspace/navbar/PrimaryBar.tsx +40 -22
  138. inspect_ai/_view/www/src/workspace/navbar/ResultsPanel.module.css +0 -1
  139. inspect_ai/_view/www/src/workspace/navbar/ResultsPanel.tsx +98 -39
  140. inspect_ai/_view/www/src/workspace/navbar/RunningStatusPanel.module.css +32 -0
  141. inspect_ai/_view/www/src/workspace/navbar/RunningStatusPanel.tsx +32 -0
  142. inspect_ai/_view/www/src/workspace/navbar/SecondaryBar.tsx +11 -13
  143. inspect_ai/_view/www/src/workspace/navbar/StatusPanel.tsx +6 -2
  144. inspect_ai/_view/www/src/workspace/sidebar/LogDirectoryTitleView.tsx +4 -4
  145. inspect_ai/_view/www/src/workspace/sidebar/Sidebar.tsx +28 -13
  146. inspect_ai/_view/www/src/workspace/tabs/InfoTab.tsx +5 -10
  147. inspect_ai/_view/www/src/workspace/tabs/JsonTab.tsx +4 -4
  148. inspect_ai/_view/www/src/workspace/tabs/RunningNoSamples.module.css +22 -0
  149. inspect_ai/_view/www/src/workspace/tabs/RunningNoSamples.tsx +19 -0
  150. inspect_ai/_view/www/src/workspace/tabs/SamplesTab.tsx +110 -115
  151. inspect_ai/_view/www/src/workspace/tabs/grouping.ts +37 -5
  152. inspect_ai/_view/www/src/workspace/tabs/types.ts +4 -0
  153. inspect_ai/_view/www/src/workspace/types.ts +4 -3
  154. inspect_ai/_view/www/src/workspace/utils.ts +4 -4
  155. inspect_ai/_view/www/vite.config.js +6 -0
  156. inspect_ai/_view/www/yarn.lock +370 -354
  157. inspect_ai/log/_condense.py +26 -0
  158. inspect_ai/log/_log.py +6 -3
  159. inspect_ai/log/_recorders/buffer/__init__.py +14 -0
  160. inspect_ai/log/_recorders/buffer/buffer.py +30 -0
  161. inspect_ai/log/_recorders/buffer/database.py +685 -0
  162. inspect_ai/log/_recorders/buffer/filestore.py +259 -0
  163. inspect_ai/log/_recorders/buffer/types.py +84 -0
  164. inspect_ai/log/_recorders/eval.py +2 -11
  165. inspect_ai/log/_recorders/types.py +30 -0
  166. inspect_ai/log/_transcript.py +27 -1
  167. inspect_ai/model/_call_tools.py +1 -0
  168. inspect_ai/model/_generate_config.py +2 -2
  169. inspect_ai/model/_model.py +1 -0
  170. inspect_ai/tool/_tool_support_helpers.py +4 -4
  171. inspect_ai/tool/_tools/_web_browser/_web_browser.py +3 -1
  172. inspect_ai/util/_subtask.py +1 -0
  173. {inspect_ai-0.3.81.dist-info → inspect_ai-0.3.82.dist-info}/METADATA +1 -1
  174. {inspect_ai-0.3.81.dist-info → inspect_ai-0.3.82.dist-info}/RECORD +178 -138
  175. inspect_ai/_view/www/src/samples/transcript/SampleTranscript.tsx +0 -22
  176. {inspect_ai-0.3.81.dist-info → inspect_ai-0.3.82.dist-info}/WHEEL +0 -0
  177. {inspect_ai-0.3.81.dist-info → inspect_ai-0.3.82.dist-info}/entry_points.txt +0 -0
  178. {inspect_ai-0.3.81.dist-info → inspect_ai-0.3.82.dist-info}/licenses/LICENSE +0 -0
  179. {inspect_ai-0.3.81.dist-info → inspect_ai-0.3.82.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, Type8 } from "../../types/log";
3
+ import { SampleLimitEvent, Type10 } 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: Type8) => {
20
+ const resolve_title = (type: Type10) => {
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: Type8) => {
37
+ const resolve_icon = (type: Type10) => {
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, RefObject, useCallback, useState } from "react";
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, TranscriptEventState } from "./types";
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-${event.name}-transcript`}
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, Fragment } from "react";
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
- // Render Forks specially
33
- const body =
34
- event.type === "fork" ? (
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
- <Fragment>
54
- <SubtaskSummary
55
- data-name="Summary"
56
- input={event.input}
57
- result={event.result}
58
- />
59
- {event.events.length > 0 ? (
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>
@@ -8,3 +8,7 @@
8
8
  padding: 0;
9
9
  margin-bottom: 0;
10
10
  }
11
+
12
+ .progress {
13
+ margin-left: 0.5em;
14
+ }
@@ -5,17 +5,16 @@ 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";
11
12
  import { formatTiming, formatTitle } from "./event/utils";
12
13
  import styles from "./ToolEventView.module.css";
13
14
 
14
15
  interface ToolEventViewProps {
15
16
  id: string;
16
17
  event: ToolEvent;
17
- eventState: TranscriptEventState;
18
- setEventState: (state: TranscriptEventState) => void;
19
18
  depth: number;
20
19
  className?: string | string[];
21
20
  }
@@ -26,8 +25,6 @@ interface ToolEventViewProps {
26
25
  export const ToolEventView: FC<ToolEventViewProps> = ({
27
26
  id,
28
27
  event,
29
- eventState,
30
- setEventState,
31
28
  depth,
32
29
  className,
33
30
  }) => {
@@ -50,17 +47,10 @@ export const ToolEventView: FC<ToolEventViewProps> = ({
50
47
  className={className}
51
48
  subTitle={formatTiming(event.timestamp, event.working_start)}
52
49
  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
50
  >
62
51
  <div data-name="Summary" className={styles.summary}>
63
52
  <ToolCallView
53
+ id={`${id}-tool-call`}
64
54
  functionCall={functionCall}
65
55
  input={input}
66
56
  highlightLanguage={highlightLanguage}
@@ -76,6 +66,11 @@ export const ToolEventView: FC<ToolEventViewProps> = ({
76
66
  ) : (
77
67
  ""
78
68
  )}
69
+ {event.pending ? (
70
+ <div className={clsx(styles.progress)}>
71
+ <PulsingDots subtle={false} size="medium" />
72
+ </div>
73
+ ) : undefined}
79
74
  </div>
80
75
  {event.events.length > 0 ? (
81
76
  <TranscriptView