@theoremjs/studio 0.3.4-next.419.g1bc04b7 → 0.3.4-next.421.g4bac1c7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/page/assets/{Banner-CyBhJeGY.js → Banner-Bhxjn7kI.js} +2 -2
- package/page/assets/{ConsoleFrame-DWRi3Fb6.js → ConsoleFrame-UIVwgv3q.js} +1 -1
- package/page/assets/{ContextMenu-RZRY0khC.js → ContextMenu-xfLYAjt8.js} +2 -2
- package/page/assets/{ToolResultCharts-D5CYZm-9.js → ToolResultCharts-Cye-CPQ4.js} +1 -1
- package/page/assets/{TraceInspector-ASc3Ee2f.js → TraceInspector-00b1hKCK.js} +1 -1
- package/page/assets/{TraceOverview-GGldPp4V.js → TraceOverview-Dnm1l7ov.js} +1 -1
- package/page/assets/{browser-engine-BZoN5QGO.js → browser-engine-CbYemYzY.js} +1 -1
- package/page/assets/{browser-transport-DPNBa9Kl.js → browser-transport-QQYuLRu2.js} +3 -3
- package/page/assets/{export-agent-Bq9IoXFw.js → export-agent-B3VXKK1e.js} +1 -1
- package/page/assets/{guardrail-tester-CCCEkT94.js → guardrail-tester-ljYi3mZL.js} +1 -1
- package/page/assets/{index-C5WhxY2D.js → index-D5u0SWSF.js} +7 -7
- package/page/assets/{studio-code-pane-z83oVXAG.js → studio-code-pane-BNpnRiKg.js} +1 -1
- package/page/assets/{studio-console-BxwBazft.js → studio-console-BX_pWf9e.js} +1 -1
- package/page/assets/{studio-decision-jz4o68jy.js → studio-decision-DMYjI_Vq.js} +1 -1
- package/page/assets/{studio-embedding-kZaEvAlZ.js → studio-embedding-DSRp-fxm.js} +1 -1
- package/page/assets/{studio-host-console-BQf_1uve.js → studio-host-console-D_UNdI5m.js} +2 -2
- package/page/assets/{studio-labels-258OYG65.js → studio-labels-DIDBAiu7.js} +1 -1
- package/page/assets/{studio-live-vqqryvbD.js → studio-live-vZp_hMzR.js} +1 -1
- package/page/assets/{studio-map-BQ9lWOEd.js → studio-map-DYDmOfkO.js} +1 -1
- package/page/assets/{studio-trace-replay-Dr6yADbe.js → studio-trace-replay-C02AKLwK.js} +1 -1
- package/page/assets/{use-one-call-Ca4xDSCB.js → use-one-call-B8MZBbmr.js} +1 -1
- package/page/index.html +5 -5
- package/ui/studio-runner.d.ts +5 -1
- package/ui/studio-runner.js +6 -6
package/ui/studio-runner.d.ts
CHANGED
|
@@ -24,6 +24,10 @@ export interface StudioRunnerProps {
|
|
|
24
24
|
conversationView?: ChatProps['conversationView'];
|
|
25
25
|
/** The text a chat's composer starts with. */
|
|
26
26
|
initialText?: ChatProps['initialText'];
|
|
27
|
+
/** The files a chat's composer starts with, staged. */
|
|
28
|
+
initialFiles?: ChatProps['initialFiles'];
|
|
29
|
+
/** The messages a chat's composer starts with set aside. */
|
|
30
|
+
initialPending?: ChatProps['initialPending'];
|
|
27
31
|
onConversationChange?: ChatProps['onConversationChange'];
|
|
28
32
|
chatRef?: ChatProps['chatRef'];
|
|
29
33
|
/** The value the page picked for each slot, for a chat's turns and a call's start. */
|
|
@@ -44,5 +48,5 @@ export interface StudioRunnerProps {
|
|
|
44
48
|
* A runner is one conversation. The chat keeps its transcript when an edit recompiles the draft,
|
|
45
49
|
* so its trace feed outlives each transport too; remount the runner (a new `key`) to start over.
|
|
46
50
|
*/
|
|
47
|
-
export declare function StudioRunner({ payload, mode, runtime, trace, className, flush, columns, onActivity, conversation, conversationView, initialText, onConversationChange, chatRef, slots, context, tested, traces: given, }: StudioRunnerProps): import("react").JSX.Element;
|
|
51
|
+
export declare function StudioRunner({ payload, mode, runtime, trace, className, flush, columns, onActivity, conversation, conversationView, initialText, initialFiles, initialPending, onConversationChange, chatRef, slots, context, tested, traces: given, }: StudioRunnerProps): import("react").JSX.Element;
|
|
48
52
|
export type ChatProps = ComponentProps<typeof TheoremChat>;
|
package/ui/studio-runner.js
CHANGED
|
@@ -43,7 +43,7 @@ function RunLoading() {
|
|
|
43
43
|
* A runner is one conversation. The chat keeps its transcript when an edit recompiles the draft,
|
|
44
44
|
* so its trace feed outlives each transport too; remount the runner (a new `key`) to start over.
|
|
45
45
|
*/
|
|
46
|
-
export function StudioRunner({ payload, mode, runtime, trace, className, flush, columns, onActivity, conversation, conversationView, initialText, onConversationChange, chatRef, slots, context, tested, traces: given, }) {
|
|
46
|
+
export function StudioRunner({ payload, mode, runtime, trace, className, flush, columns, onActivity, conversation, conversationView, initialText, initialFiles, initialPending, onConversationChange, chatRef, slots, context, tested, traces: given, }) {
|
|
47
47
|
const [own] = useState(createTraceFeed);
|
|
48
48
|
const traces = given ?? own;
|
|
49
49
|
const activity = useRef(onActivity);
|
|
@@ -53,9 +53,9 @@ export function StudioRunner({ payload, mode, runtime, trace, className, flush,
|
|
|
53
53
|
useEffect(() => {
|
|
54
54
|
warmWhenIdle(decisionRun, embeddingRun, hostRun, liveRun);
|
|
55
55
|
}, []);
|
|
56
|
-
return (_jsx(Suspense, { fallback: _jsx(RunLoading, {}), children: _jsx(Run, { payload: payload, mode: mode, runtime: runtime, trace: trace, className: className, flush: flush, columns: columns, conversation: conversation, conversationView: conversationView, initialText: initialText, onConversationChange: onConversationChange, chatRef: chatRef, slots: slots, context: context, tested: tested, project: project, traces: traces, note: note }) }));
|
|
56
|
+
return (_jsx(Suspense, { fallback: _jsx(RunLoading, {}), children: _jsx(Run, { payload: payload, mode: mode, runtime: runtime, trace: trace, className: className, flush: flush, columns: columns, conversation: conversation, conversationView: conversationView, initialText: initialText, initialFiles: initialFiles, initialPending: initialPending, onConversationChange: onConversationChange, chatRef: chatRef, slots: slots, context: context, tested: tested, project: project, traces: traces, note: note }) }));
|
|
57
57
|
}
|
|
58
|
-
function Run({ payload, mode, runtime, trace, className, flush, columns, conversation, conversationView, initialText, onConversationChange, chatRef, slots, context, tested, project, traces, note, }) {
|
|
58
|
+
function Run({ payload, mode, runtime, trace, className, flush, columns, conversation, conversationView, initialText, initialFiles, initialPending, onConversationChange, chatRef, slots, context, tested, project, traces, note, }) {
|
|
59
59
|
if (project)
|
|
60
60
|
return (_jsx(ProjectRun, { project: project, payload: payload, traces: traces, trace: trace, className: className, flush: flush, columns: columns, note: note, chatRef: chatRef, slots: slots, context: context, tested: tested }));
|
|
61
61
|
if (mode !== 'demo' && !runtime)
|
|
@@ -66,7 +66,7 @@ function Run({ payload, mode, runtime, trace, className, flush, columns, convers
|
|
|
66
66
|
return (_jsx(StudioHostConsole, { payload: payload, runtime: runtime, traces: traces, trace: trace, className: className, onActivity: note, flush: flush, columns: columns }));
|
|
67
67
|
if (payload.profile.type === 'embedding')
|
|
68
68
|
return (_jsx(StudioEmbedding, { payload: payload, runtime: runtime, traces: traces, trace: trace, className: className, onActivity: note, flush: flush, columns: columns }));
|
|
69
|
-
return (_jsx(TurnRun, { payload: payload, runtime: runtime, traces: traces, trace: trace, className: className, note: note, conversation: conversation, conversationView: conversationView, initialText: initialText, onConversationChange: onConversationChange, chatRef: chatRef, slots: slots, context: context }));
|
|
69
|
+
return (_jsx(TurnRun, { payload: payload, runtime: runtime, traces: traces, trace: trace, className: className, note: note, conversation: conversation, conversationView: conversationView, initialText: initialText, initialFiles: initialFiles, initialPending: initialPending, onConversationChange: onConversationChange, chatRef: chatRef, slots: slots, context: context }));
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
72
72
|
* The two ways out of a run that waits on a Save: write the edits, or drop them. Dropping an
|
|
@@ -174,7 +174,7 @@ function ProjectRun({ project, tested, ...run }) {
|
|
|
174
174
|
return _jsx(SideRun, { ...run, endpoint: projectProfileEndpoint(project, payload.agentId) });
|
|
175
175
|
return _jsx(ProjectSides, { ...run, project: project, saved: saved, edits: edits });
|
|
176
176
|
}
|
|
177
|
-
function TurnRun({ payload, runtime, traces, trace, className, note, conversation, conversationView, initialText, onConversationChange, chatRef, slots, context, }) {
|
|
177
|
+
function TurnRun({ payload, runtime, traces, trace, className, note, conversation, conversationView, initialText, initialFiles, initialPending, onConversationChange, chatRef, slots, context, }) {
|
|
178
178
|
const iface = useMemo(() => studioInterface(payload), [payload]);
|
|
179
179
|
/** The studio's page answers each page tool with the tool's stub. */
|
|
180
180
|
const pageTools = useMemo(() => studioPageTools(payload), [payload]);
|
|
@@ -184,5 +184,5 @@ function TurnRun({ payload, runtime, traces, trace, className, note, conversatio
|
|
|
184
184
|
traces,
|
|
185
185
|
})
|
|
186
186
|
: createStudioTransport(payload, { traces }), note), [payload, runtime, traces, note]);
|
|
187
|
-
return iface.type === 'live' ? (_jsx(StudioLive, { payload: payload, runtime: runtime, note: note, trace: trace, slots: slots, context: context })) : (_jsx(TheoremChat, { detectCodeLanguage: true, labels: STUDIO_LABELS, transport: transport, trace: trace, className: className, conversation: conversation, conversationView: conversationView, initialText: initialText, onConversationChange: onConversationChange, chatRef: chatRef, slots: slots, context: context, pageTools: pageTools }));
|
|
187
|
+
return iface.type === 'live' ? (_jsx(StudioLive, { payload: payload, runtime: runtime, note: note, trace: trace, slots: slots, context: context })) : (_jsx(TheoremChat, { detectCodeLanguage: true, labels: STUDIO_LABELS, transport: transport, trace: trace, className: className, conversation: conversation, conversationView: conversationView, initialText: initialText, initialFiles: initialFiles, initialPending: initialPending, onConversationChange: onConversationChange, chatRef: chatRef, slots: slots, context: context, pageTools: pageTools }));
|
|
188
188
|
}
|