feat(*): 短剧创作工作台 - 完善章节分镜、资产管理、技能运行与生成任务恢复
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import type { Express } from "express";
|
||||
|
||||
import { CanvasSession } from "./canvas-session.js";
|
||||
import { CONFIG_DIR, type LocalRuntimeConfig } from "./config.js";
|
||||
import { createLocalRuntimeApp } from "./local-runtime.js";
|
||||
@@ -21,7 +23,7 @@ type CanvasAgentHttpOptions = {
|
||||
dependencies: CanvasAgentHttpDependencies;
|
||||
};
|
||||
|
||||
export function startHttpServer(options?: CanvasAgentHttpOptions) {
|
||||
export function startHttpServer(options?: CanvasAgentHttpOptions): ReturnType<typeof startLocalRuntime> | Express {
|
||||
if (!options) return startLocalRuntime();
|
||||
return createHttpApp(options.config, options.session, options.dependencies);
|
||||
}
|
||||
@@ -30,7 +32,7 @@ export function createHttpApp(
|
||||
config: LocalRuntimeConfig,
|
||||
session: CanvasAgentSession = new CanvasSession(),
|
||||
dependencies: CanvasAgentHttpDependencies = {},
|
||||
) {
|
||||
): Express {
|
||||
const endpoint = config.url;
|
||||
const manager = new LocalRuntimeSessionManager({
|
||||
endpoint,
|
||||
|
||||
Reference in New Issue
Block a user