Download packages/schema/src/prompt-input.ts from SaylorTwift/opencode: direct link, hf CLI and curl.
- Browser
- Download file 900 Bytes
-
https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/schema/src/prompt-input.ts
- Command line
-
hf download hf://SaylorTwift/opencode/packages/schema/src/prompt-input.ts
-
curl -L -o prompt-input.ts https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/schema/src/prompt-input.ts
900 Bytes
| export * as PromptInput from "./prompt-input" | |
| import { Schema } from "effect" | |
| import { AgentAttachment, Source } from "./prompt" | |
| import { optional, statics } from "./schema" | |
| export interface FileAttachment extends Schema.Schema.Type<typeof FileAttachment> {} | |
| export const FileAttachment = Schema.Struct({ | |
| uri: Schema.String, | |
| name: Schema.String.pipe(optional), | |
| description: Schema.String.pipe(optional), | |
| source: Source.pipe(optional), | |
| }) | |
| .annotate({ identifier: "PromptInput.FileAttachment" }) | |
| .pipe( | |
| statics((schema) => ({ | |
| create: (input: FileAttachment) => schema.make(input), | |
| })), | |
| ) | |
| export interface Prompt extends Schema.Schema.Type<typeof Prompt> {} | |
| export const Prompt = Schema.Struct({ | |
| text: Schema.String, | |
| files: Schema.Array(FileAttachment).pipe(optional), | |
| agents: Schema.Array(AgentAttachment).pipe(optional), | |
| }).annotate({ identifier: "PromptInput" }) | |