mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
fix dirs query param
This commit is contained in:
parent
8e1010dc3f
commit
178a14ce3e
2 changed files with 3 additions and 9 deletions
|
|
@ -1,5 +1,4 @@
|
|||
import { Server } from "../../server/server"
|
||||
import { UI } from "../ui"
|
||||
import { cmd } from "./cmd"
|
||||
|
||||
export const ServeCommand = cmd({
|
||||
|
|
@ -25,12 +24,7 @@ export const ServeCommand = cmd({
|
|||
port,
|
||||
hostname,
|
||||
})
|
||||
UI.println(
|
||||
UI.Style.TEXT_NORMAL_BOLD,
|
||||
"Web interface: ",
|
||||
UI.Style.TEXT_NORMAL,
|
||||
`https://desktop.dev.opencode.ai?url=${server.url}`,
|
||||
)
|
||||
console.log(`opencode server listening on http://${server.hostname}:${server.port}`)
|
||||
await new Promise(() => {})
|
||||
await server.stop()
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1106,7 +1106,7 @@ export namespace Server {
|
|||
"query",
|
||||
z.object({
|
||||
query: z.string(),
|
||||
dirs: z.boolean().optional(),
|
||||
dirs: z.union([z.literal("true"), z.literal("false")]).optional(),
|
||||
}),
|
||||
),
|
||||
async (c) => {
|
||||
|
|
@ -1115,7 +1115,7 @@ export namespace Server {
|
|||
const results = await File.search({
|
||||
query,
|
||||
limit: 10,
|
||||
dirs,
|
||||
dirs: dirs !== "false",
|
||||
})
|
||||
return c.json(results)
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue