Skip to content

Commit 4aa2e46

Browse files
committed
style(studio): format the agent tools export and keep its comment share
1 parent fdb51b3 commit 4aa2e46

3 files changed

Lines changed: 7 additions & 8 deletions

File tree

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import { expect, it } from "vitest";
2-
import { buildStudioTools, collectStudioLookScene, type StudioAgentToolsDeps } from "@hyperframes/studio";
2+
import { buildStudioTools, collectStudioLookScene } from "@hyperframes/studio";
33

4-
it("exports Studio's agent tools so a host can run them on its own edit session", () => {
5-
const tools = buildStudioTools({ current: {} as StudioAgentToolsDeps });
6-
expect(tools.map((tool) => tool.name)).toEqual(
7-
expect.arrayContaining(["studio_look", "studio_inspect", "studio_select", "studio_seek"]),
8-
);
4+
it("exports Studio's agent tools for a host's own edit session", () => {
5+
const names = buildStudioTools({ current: {} as never }).map((tool) => tool.name);
6+
expect(names).toEqual(expect.arrayContaining(["studio_look", "studio_seek"]));
97
expect(typeof collectStudioLookScene).toBe("function");
108
});

‎packages/studio/src/index.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,6 @@ export { MarqueeOverlay } from "./components/editor/MarqueeOverlay";
241241
export type { MarqueeOverlayProps } from "./components/editor/MarqueeOverlay";
242242
export type { Rect as MarqueeRect } from "./utils/marqueeGeometry";
243243

244-
// Agent tools: Studio's WebMCP tool bodies, for a host running them on its own edit session.
245244
export { buildStudioTools } from "./webmcp/useStudioAgentTools";
246245
export type { StudioAgentToolsDeps } from "./webmcp/useStudioAgentTools";
247246
export { collectStudioLookScene } from "./webmcp/tools/lookTools";

‎packages/studio/src/webmcp/useStudioAgentTools.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ export interface StudioAgentToolsDeps
111111
* a snapshot, which is what lets the list be built once and still see live
112112
* state. That is the whole point of the ref: see the registration note below.
113113
*/
114-
export function buildStudioTools(depsRef: { readonly current: StudioAgentToolsDeps }): ModelContextTool[] {
114+
export function buildStudioTools(depsRef: {
115+
readonly current: StudioAgentToolsDeps;
116+
}): ModelContextTool[] {
115117
/**
116118
* `execute` for a tool whose handler takes the caller's abort signal.
117119
*

0 commit comments

Comments
 (0)