feat: add field to allow user only messages (#4554)

Co-authored-by: GitHub Action <[email protected]>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <[email protected]>
This commit is contained in:
authored and GitHub committed 2025-11-20 19:13:42 -06:00
1 parent 3b005d29d7
commit 43c021ed80
2 files changed
+4 -1

No files matched your search

+2 -1
View File
@@ -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,
+2
View File
@@ -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