Prompt¶
10 types. Import any of them from opencode.types.
PromptAgentAttachment
¶
mention
class-attribute
instance-attribute
¶
mention: PromptMention | None = Field(
default=None, exclude_if=is_none
)
PromptFileAttachment
¶
name
class-attribute
instance-attribute
¶
name: str | None = Field(default=None, exclude_if=is_none)
description
class-attribute
instance-attribute
¶
description: str | None = Field(
default=None, exclude_if=is_none
)
mention
class-attribute
instance-attribute
¶
mention: PromptMention | None = Field(
default=None, exclude_if=is_none
)
PromptFileSource
module-attribute
¶
PromptFileSource: TypeAlias = Annotated[
Annotated[PromptFileSourceInline, Tag("inline")]
| Annotated[PromptFileSourceUri, Tag("uri")]
| Annotated[
UnknownPromptFileSource, Tag("__unknown__")
],
Discriminator(
discriminator("type", "type", ["inline", "uri"])
),
]
PromptFileSourceInline
¶
PromptFileSourceUri
¶
PromptInputFileAttachment
¶
name
class-attribute
instance-attribute
¶
name: str | None = Field(default=None, exclude_if=is_none)
description
class-attribute
instance-attribute
¶
description: str | None = Field(
default=None, exclude_if=is_none
)
mention
class-attribute
instance-attribute
¶
mention: PromptMention | None = Field(
default=None, exclude_if=is_none
)
PromptInputSkillAttachment
¶
mention
class-attribute
instance-attribute
¶
mention: PromptMention | None = Field(
default=None, exclude_if=is_none
)