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
@@ -5,7 +5,7 @@ import * as Tool from "./tool"
import { LSP } from "@/lsp/lsp"
import { createTwoFilesPatch } from "diff"
import DESCRIPTION from "./write.txt"
import { Bus } from "../bus"
import { EventV2Bridge } from "@/event-v2-bridge"
import { File } from "../file"
import { FileWatcher } from "../file/watcher"
import { Format } from "../format"
@@ -29,7 +29,7 @@ export const WriteTool = Tool.define(
Effect.gen(function* () {
const lsp = yield* LSP.Service
const fs = yield* AppFileSystem.Service
const bus = yield* Bus.Service
const events = yield* EventV2Bridge.Service
const format = yield* Format.Service
return {
@@ -65,8 +65,8 @@ export const WriteTool = Tool.define(
if (yield* format.file(filepath)) {
yield* Bom.syncFile(fs, filepath, desiredBom)
}
yield* bus.publish(File.Event.Edited, { file: filepath })
yield* bus.publish(FileWatcher.Event.Updated, {
yield* events.publish(File.Event.Edited, { file: filepath })
yield* events.publish(FileWatcher.Event.Updated, {
file: filepath,
event: exists ? "change" : "add",
})