mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-20 10:59:59 +00:00
feat: add startup debug command (#24310)
This commit is contained in:
@@ -9,6 +9,7 @@ import { ScrapCommand } from "./scrap"
|
||||
import { SkillCommand } from "./skill"
|
||||
import { SnapshotCommand } from "./snapshot"
|
||||
import { AgentCommand } from "./agent"
|
||||
import { StartupCommand } from "./startup"
|
||||
|
||||
export const DebugCommand = cmd({
|
||||
command: "debug",
|
||||
@@ -22,6 +23,7 @@ export const DebugCommand = cmd({
|
||||
.command(ScrapCommand)
|
||||
.command(SkillCommand)
|
||||
.command(SnapshotCommand)
|
||||
.command(StartupCommand)
|
||||
.command(AgentCommand)
|
||||
.command(PathsCommand)
|
||||
.command({
|
||||
|
||||
11
packages/opencode/src/cli/cmd/debug/startup.ts
Normal file
11
packages/opencode/src/cli/cmd/debug/startup.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { EOL } from "os"
|
||||
import { cmd } from "../cmd"
|
||||
|
||||
export const StartupCommand = cmd({
|
||||
command: "startup",
|
||||
describe: "print startup timing",
|
||||
builder: (yargs) => yargs,
|
||||
handler() {
|
||||
process.stdout.write(performance.now().toString() + EOL)
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user