Download packages/server/src/handlers/command.ts from SaylorTwift/opencode: direct link, hf CLI and curl.
- Browser
- Download file 373 Bytes
-
https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/server/src/handlers/command.ts
- Command line
-
hf download hf://SaylorTwift/opencode/packages/server/src/handlers/command.ts
-
curl -L -o command.ts https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/server/src/handlers/command.ts
373 Bytes
| import { CommandV2 } from "@opencode-ai/core/command" | |
| import { HttpApiBuilder } from "effect/unstable/httpapi" | |
| import { Api } from "../api" | |
| import { response } from "../location" | |
| export const CommandHandler = HttpApiBuilder.group(Api, "server.command", (handlers) => | |
| handlers.handle("command.list", () => response(CommandV2.Service.use((command) => command.list()))), | |
| ) | |