@langgraph-js/ui 4.0.2 → 4.0.3

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/cli.mjs CHANGED
@@ -18,9 +18,11 @@ console.log("启动 LangGraph UI...");
18
18
  console.log(`命令: vite preview ${args.join(" ")}`);
19
19
 
20
20
  // 使用 spawn 而不是 exec,以便更好地处理输入/输出流和参数
21
- const childProcess = spawn("npx", ["vite", "preview", "--config", "vite.config.preview.ts", ...args], {
21
+ const childProcess = spawn("npx", ["vite", "dev", "--config", "../vite.config.preview.ts", ...args], {
22
22
  stdio: "inherit", // 继承父进程的 stdio,使输出直接显示在控制台
23
23
  shell: true,
24
+ // cwd 是 ./dist
25
+ cwd: "./dist",
24
26
  });
25
27
 
26
28
  // 处理子进程退出
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langgraph-js/ui",
3
- "version": "4.0.2",
3
+ "version": "4.0.3",
4
4
  "description": "",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",
@@ -5,6 +5,7 @@ export const OpenSmithPlugin = () =>
5
5
  ({
6
6
  name: "open-smith",
7
7
  configureServer(server) {
8
+ console.log("open-smith is open on http://localhost:4173/api/open-smith/ui/index.html");
8
9
  server.middlewares.use("/api/open-smith", async (req, res, next) => {
9
10
  try {
10
11
  const body = Readable.toWeb(req);
package/vite.config.ts CHANGED
@@ -2,10 +2,9 @@ import react from "@vitejs/plugin-react";
2
2
  import { defineConfig, Plugin } from "vite";
3
3
  import basicSsl from "@vitejs/plugin-basic-ssl";
4
4
  import tailwindcss from "@tailwindcss/vite";
5
- import { OpenSmithPlugin } from "./src/OpenSmithPlugin";
6
5
 
7
6
  // https://vitejs.dev/config/
8
- export default defineConfig(({ mode }) => {
7
+ export default defineConfig(({ mode, command }) => {
9
8
  const isHttps = mode === "https";
10
9
  return {
11
10
  plugins: [react(), tailwindcss(), isHttps ? basicSsl() : undefined],