mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
feat: add field to allow user only messages (#4554)
Co-authored-by: GitHub Action <action@github.com> Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
This commit is contained in:
parent
3b005d29d7
commit
43c021ed80
2 changed files with 4 additions and 1 deletions
|
|
@ -58,6 +58,7 @@ export namespace MessageV2 {
|
|||
type: z.literal("text"),
|
||||
text: z.string(),
|
||||
synthetic: z.boolean().optional(),
|
||||
ignored: z.boolean().optional(),
|
||||
time: z
|
||||
.object({
|
||||
start: z.number(),
|
||||
|
|
@ -566,7 +567,7 @@ export namespace MessageV2 {
|
|||
}
|
||||
result.push(userMessage)
|
||||
for (const part of msg.parts) {
|
||||
if (part.type === "text")
|
||||
if (part.type === "text" && !part.ignored)
|
||||
userMessage.parts.push({
|
||||
type: "text",
|
||||
text: part.text,
|
||||
|
|
|
|||
|
|
@ -150,6 +150,7 @@ export type TextPart = {
|
|||
type: "text"
|
||||
text: string
|
||||
synthetic?: boolean
|
||||
ignored?: boolean
|
||||
time?: {
|
||||
start: number
|
||||
end?: number
|
||||
|
|
@ -1233,6 +1234,7 @@ export type TextPartInput = {
|
|||
type: "text"
|
||||
text: string
|
||||
synthetic?: boolean
|
||||
ignored?: boolean
|
||||
time?: {
|
||||
start: number
|
||||
end?: number
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue