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"),
|
type: z.literal("text"),
|
||||||
text: z.string(),
|
text: z.string(),
|
||||||
synthetic: z.boolean().optional(),
|
synthetic: z.boolean().optional(),
|
||||||
|
ignored: z.boolean().optional(),
|
||||||
time: z
|
time: z
|
||||||
.object({
|
.object({
|
||||||
start: z.number(),
|
start: z.number(),
|
||||||
|
|
@ -566,7 +567,7 @@ export namespace MessageV2 {
|
||||||
}
|
}
|
||||||
result.push(userMessage)
|
result.push(userMessage)
|
||||||
for (const part of msg.parts) {
|
for (const part of msg.parts) {
|
||||||
if (part.type === "text")
|
if (part.type === "text" && !part.ignored)
|
||||||
userMessage.parts.push({
|
userMessage.parts.push({
|
||||||
type: "text",
|
type: "text",
|
||||||
text: part.text,
|
text: part.text,
|
||||||
|
|
|
||||||
|
|
@ -150,6 +150,7 @@ export type TextPart = {
|
||||||
type: "text"
|
type: "text"
|
||||||
text: string
|
text: string
|
||||||
synthetic?: boolean
|
synthetic?: boolean
|
||||||
|
ignored?: boolean
|
||||||
time?: {
|
time?: {
|
||||||
start: number
|
start: number
|
||||||
end?: number
|
end?: number
|
||||||
|
|
@ -1233,6 +1234,7 @@ export type TextPartInput = {
|
||||||
type: "text"
|
type: "text"
|
||||||
text: string
|
text: string
|
||||||
synthetic?: boolean
|
synthetic?: boolean
|
||||||
|
ignored?: boolean
|
||||||
time?: {
|
time?: {
|
||||||
start: number
|
start: number
|
||||||
end?: number
|
end?: number
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue