mirror of
https://github.com/anomalyco/opencode-sdk-python.git
synced 2026-04-28 12:39:54 +00:00
feat(api): api update
This commit is contained in:
parent
ada52aedd4
commit
eaaed9e5e1
5 changed files with 33 additions and 22 deletions
|
|
@ -26,6 +26,7 @@ from .text_part import TextPart as TextPart
|
|||
from .tool_part import ToolPart as ToolPart
|
||||
from .mcp_remote import McpRemote as McpRemote
|
||||
from .user_message import UserMessage as UserMessage
|
||||
from .snapshot_part import SnapshotPart as SnapshotPart
|
||||
from .app_log_params import AppLogParams as AppLogParams
|
||||
from .file_part_param import FilePartParam as FilePartParam
|
||||
from .step_start_part import StepStartPart as StepStartPart
|
||||
|
|
|
|||
|
|
@ -1,30 +1,18 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from typing import Union
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing_extensions import Annotated, TypeAlias
|
||||
|
||||
from pydantic import Field as FieldInfo
|
||||
|
||||
from .._models import BaseModel
|
||||
from .._utils import PropertyInfo
|
||||
from .file_part import FilePart
|
||||
from .text_part import TextPart
|
||||
from .tool_part import ToolPart
|
||||
from .snapshot_part import SnapshotPart
|
||||
from .step_start_part import StepStartPart
|
||||
from .step_finish_part import StepFinishPart
|
||||
|
||||
__all__ = ["Part", "UnionMember5"]
|
||||
__all__ = ["Part"]
|
||||
|
||||
|
||||
class UnionMember5(BaseModel):
|
||||
id: str
|
||||
|
||||
message_id: str = FieldInfo(alias="messageID")
|
||||
|
||||
session_id: str = FieldInfo(alias="sessionID")
|
||||
|
||||
snapshot: str
|
||||
|
||||
type: Literal["snapshot"]
|
||||
|
||||
|
||||
Part: TypeAlias = Union[TextPart, FilePart, ToolPart, StepStartPart, StepFinishPart, UnionMember5]
|
||||
Part: TypeAlias = Annotated[
|
||||
Union[TextPart, FilePart, ToolPart, StepStartPart, StepFinishPart, SnapshotPart], PropertyInfo(discriminator="type")
|
||||
]
|
||||
|
|
|
|||
21
src/opencode_ai/types/snapshot_part.py
Normal file
21
src/opencode_ai/types/snapshot_part.py
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
||||
|
||||
from typing_extensions import Literal
|
||||
|
||||
from pydantic import Field as FieldInfo
|
||||
|
||||
from .._models import BaseModel
|
||||
|
||||
__all__ = ["SnapshotPart"]
|
||||
|
||||
|
||||
class SnapshotPart(BaseModel):
|
||||
id: str
|
||||
|
||||
message_id: str = FieldInfo(alias="messageID")
|
||||
|
||||
session_id: str = FieldInfo(alias="sessionID")
|
||||
|
||||
snapshot: str
|
||||
|
||||
type: Literal["snapshot"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue