refactor(core): move database schema ownership (#29068)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
This commit is contained in:
Dax
2026-05-30 21:08:38 -04:00
committed by GitHub
parent 6bcb9cb9bb
commit 7f571d36ea
390 changed files with 11127 additions and 9164 deletions
+4 -4
View File
@@ -1,7 +1,7 @@
import * as path from "path"
import { Effect, Schema } from "effect"
import * as Tool from "./tool"
import { Bus } from "../bus"
import { EventV2Bridge } from "@/event-v2-bridge"
import { FileWatcher } from "../file/watcher"
import { InstanceState } from "@/effect/instance-state"
import { Patch } from "../patch"
@@ -25,7 +25,7 @@ export const ApplyPatchTool = Tool.define(
const lsp = yield* LSP.Service
const afs = yield* AppFileSystem.Service
const format = yield* Format.Service
const bus = yield* Bus.Service
const events = yield* EventV2Bridge.Service
const run = Effect.fn("ApplyPatchTool.execute")(function* (
params: Schema.Schema.Type<typeof Parameters>,
@@ -253,13 +253,13 @@ export const ApplyPatchTool = Tool.define(
if (yield* format.file(edited)) {
yield* Bom.syncFile(afs, edited, change.bom)
}
yield* bus.publish(File.Event.Edited, { file: edited })
yield* events.publish(File.Event.Edited, { file: edited })
}
}
// Publish file change events
for (const update of updates) {
yield* bus.publish(FileWatcher.Event.Updated, update)
yield* events.publish(FileWatcher.Event.Updated, update)
}
// Notify LSP of file changes and collect diagnostics