/
Alex_Ural
/
opencode
Обзор
Документация
Войти
/
Alex_Ural
/
opencode
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
packages/schema/src/prompt-input.ts
26 строк
900 B
Dax Raad
fix(core): resolve prompt attachment mime types
26 июн 2026, 20:51
26 июн 2026, 20:51
850a0df
Код
Авторство
О чём код?
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" })