fix(core): remove per-prompt system option (#34361)

This commit is contained in:
Kit Langton 2026-06-28 21:56:59 -04:00 committed by GitHub
commit 7073e8797f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 3 additions and 80 deletions

View file

@ -23,5 +23,4 @@ export const Prompt = Schema.Struct({
text: Schema.String,
files: Schema.Array(FileAttachment).pipe(optional),
agents: Schema.Array(AgentAttachment).pipe(optional),
system: Schema.String.pipe(optional),
}).annotate({ identifier: "PromptInput" })

View file

@ -42,18 +42,16 @@ export const Prompt = Schema.Struct({
text: Schema.String,
files: Schema.Array(FileAttachment).pipe(optional),
agents: Schema.Array(AgentAttachment).pipe(optional),
system: Schema.String.pipe(optional),
})
.annotate({ identifier: "Prompt" })
.pipe(
statics((schema) => ({
equivalence: Schema.toEquivalence(schema),
fromUserMessage: (input: Pick<Prompt, "text" | "files" | "agents" | "system">) =>
fromUserMessage: (input: Pick<Prompt, "text" | "files" | "agents">) =>
schema.make({
text: input.text,
...(input.files === undefined ? {} : { files: input.files }),
...(input.agents === undefined ? {} : { agents: input.agents }),
...(input.system === undefined ? {} : { system: input.system }),
}),
})),
)

View file

@ -47,7 +47,6 @@ export const User = Schema.Struct({
text: Prompt.fields.text,
files: Prompt.fields.files,
agents: Prompt.fields.agents,
system: Prompt.fields.system,
type: Schema.Literal("user"),
}).annotate({ identifier: "Session.Message.User" })