mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-04 08:03:14 +00:00
fix(core): mdns global config
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { cmd } from "@/cli/cmd/cmd"
|
||||
import { Config } from "@/config/config"
|
||||
import { Instance } from "@/project/instance"
|
||||
import path from "path"
|
||||
import { Server } from "@/server/server"
|
||||
@@ -15,8 +14,7 @@ export const TuiSpawnCommand = cmd({
|
||||
}),
|
||||
handler: async (args) => {
|
||||
upgrade()
|
||||
const config = await Config.get()
|
||||
const opts = resolveNetworkOptions(args, config)
|
||||
const opts = await resolveNetworkOptions(args)
|
||||
const server = Server.listen(opts)
|
||||
const bin = process.execPath
|
||||
const cmd = []
|
||||
|
||||
@@ -7,7 +7,6 @@ import { UI } from "@/cli/ui"
|
||||
import { iife } from "@/util/iife"
|
||||
import { Log } from "@/util/log"
|
||||
import { withNetworkOptions, resolveNetworkOptions } from "@/cli/network"
|
||||
import { Config } from "@/config/config"
|
||||
|
||||
declare global {
|
||||
const OPENCODE_WORKER_PATH: string
|
||||
@@ -78,9 +77,8 @@ export const TuiThreadCommand = cmd({
|
||||
process.on("unhandledRejection", (e) => {
|
||||
Log.Default.error(e)
|
||||
})
|
||||
const config = await Config.get()
|
||||
const networkOpts = resolveNetworkOptions(args, config)
|
||||
const server = await client.call("server", networkOpts)
|
||||
const opts = await resolveNetworkOptions(args)
|
||||
const server = await client.call("server", opts)
|
||||
const prompt = await iife(async () => {
|
||||
const piped = !process.stdin.isTTY ? await Bun.stdin.text() : undefined
|
||||
if (!args.prompt) return piped
|
||||
|
||||
Reference in New Issue
Block a user