Phase A — EditorRuntimeActor 内存缓存层 - 新增 editor_actor.rs: EditorBlockDocument 内存态 + apply_command + load_or_init - block.rs 四个写工具(replace/insert/delete/move)接入 actor 路径 - editor_actor feature flag(MNOTE_WEB_ENABLE_EDITOR_ACTOR=true 默认开启) - bridge-runtime 三个核心函数公开化 - rust-toolchain: 1.89 → stable(修复 spike WASM 编译阻塞) Phase B — 编辑器增量 delta channel - BlockDelta/DeltaOperation 类型 + actor.build_block_delta() - leptos-tiptap spike: mnote:editor:block-delta CustomEvent 监听 + JSON patch - DocumentAiAgentPanel: 拦截 blockDelta → window dispatchEvent - 工具响应含 blockDelta 字段供前端消费 Phase C — 事件 stream delta - broadcast channel 在 AppState/actor/SSE 三层贯通 - tree_events SSE 端点发 block.delta 事件 - 旧客户端降级兼容 环境修复 - rustc recursion_limit = 1024(修复 Leptos SSR 类型深度溢出) - run-convex-deploy.js(封装 Convex function 部署到本地后端 3210) ref: design/07-ai/process/7-13-page-block-editor-runtime-actor-v1.md
24 lines
644 B
TypeScript
24 lines
644 B
TypeScript
import { httpRouter } from "convex/server";
|
|
import { auth } from "./auth";
|
|
import { api } from "./_generated/api";
|
|
import { httpAction } from "./_generated/server";
|
|
|
|
// 说明:
|
|
// - Convex Auth 需要通过 HTTP Routes 提供回调/授权等端点(即使你只用密码登录,也建议保持该配置)。
|
|
// - 该文件是 Convex 的约定入口(convex/http.ts)。
|
|
|
|
const http = httpRouter();
|
|
|
|
auth.addHttpRoutes(http);
|
|
|
|
http.route({
|
|
path: "/ping",
|
|
method: "POST",
|
|
handler: httpAction(async (ctx) => {
|
|
const result = await ctx.runQuery(api.ping.ping, {});
|
|
return Response.json(result);
|
|
}),
|
|
});
|
|
|
|
export default http;
|