feat(studio): make agent edits live and explicit (#3581)

This commit is contained in:
Miguel Ángel
2026-09-02 01:11:13 -04:00
committed by GitHub
parent f498be94c2
commit 6b5b4cb988
94 changed files with 7181 additions and 985 deletions
+8 -2
View File
@@ -6,6 +6,7 @@ import { readNodeRequestBody } from "./vite.request-body.js";
import { watch } from "chokidar";
import { createProjectSignatureCache, createViteAdapter } from "./vite.adapter";
import { previewConfigPayload } from "./vite.preview-config";
import { loadStudioServerDevModule } from "./vite.studio-server-module";
async function loadRuntimeSourceForDev(
server: import("vite").ViteDevServer,
@@ -115,8 +116,13 @@ function devProjectApi(): Plugin {
} | null = null;
const getApi = async () => {
if (!_api) {
const mod = await server.ssrLoadModule("@hyperframes/studio-server");
_studioServerModule = mod as typeof _studioServerModule;
// The package's `node` condition resolves to ignored dist output,
// which may predate the source under test. Studio dev owns a source
// workspace, so load that producer explicitly.
const mod = (await loadStudioServerDevModule(server, __dirname)) as NonNullable<
typeof _studioServerModule
>;
_studioServerModule = mod;
const adapter = createViteAdapter(dataDir, server, signatureCache);
_api = mod.createStudioApi(adapter);
}