chore(internal): codegen related update

This commit is contained in:
stainless-app[bot] 2025-12-09 03:35:30 +00:00
parent b92dba5555
commit 2af822c637
2 changed files with 9 additions and 2 deletions

View file

@ -243,6 +243,9 @@ _T_co = TypeVar("_T_co", covariant=True)
if TYPE_CHECKING:
# This works because str.__contains__ does not accept object (either in typeshed or at runtime)
# https://github.com/hauntsaninja/useful_types/blob/5e9710f3875107d068e7679fd7fec9cfab0eff3b/useful_types/__init__.py#L285
#
# Note: index() and count() methods are intentionally omitted to allow pyright to properly
# infer TypedDict types when dict literals are used in lists assigned to SequenceNotStr.
class SequenceNotStr(Protocol[_T_co]):
@overload
def __getitem__(self, index: SupportsIndex, /) -> _T_co: ...
@ -251,8 +254,6 @@ if TYPE_CHECKING:
def __contains__(self, value: object, /) -> bool: ...
def __len__(self) -> int: ...
def __iter__(self) -> Iterator[_T_co]: ...
def index(self, value: Any, start: int = 0, stop: int = ..., /) -> int: ...
def count(self, value: Any, /) -> int: ...
def __reversed__(self) -> Iterator[_T_co]: ...
else:
# just point this to a normal `Sequence` at runtime to avoid having to special case

View file

@ -214,6 +214,8 @@ class AgentAgentItem(BaseModel):
class Agent(BaseModel):
"""Agent configuration, see https://opencode.ai/docs/agent"""
build: Optional[AgentBuild] = None
general: Optional[AgentGeneral] = None
@ -420,6 +422,8 @@ class ModeModeItem(BaseModel):
class Mode(BaseModel):
"""@deprecated Use `agent` field instead."""
build: Optional[ModeBuild] = None
plan: Optional[ModePlan] = None
@ -524,6 +528,8 @@ class Provider(BaseModel):
class Tui(BaseModel):
"""TUI specific settings"""
scroll_speed: float
"""TUI scroll speed"""