mirror of
https://github.com/Heretek-AI/opencode.git
synced 2026-11-22 23:47:02 -10:00
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:
2 files changed
+4
-1
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user