MCPcopy Create free account
hub / github.com/anomalyco/opencode-sdk-python / AsyncTuiResource

Class AsyncTuiResource

src/opencode_ai/resources/tui.py:97–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95
96
97class AsyncTuiResource(AsyncAPIResource):
98 @cached_property
99 def with_raw_response(self) -> AsyncTuiResourceWithRawResponse:
100 """
101 This property can be used as a prefix for any HTTP method call to return
102 the raw response object instead of the parsed content.
103
104 For more information, see https://www.github.com/sst/opencode-sdk-python#accessing-raw-response-data-eg-headers
105 """
106 return AsyncTuiResourceWithRawResponse(self)
107
108 @cached_property
109 def with_streaming_response(self) -> AsyncTuiResourceWithStreamingResponse:
110 """
111 An alternative to `.with_raw_response` that doesn't eagerly read the response body.
112
113 For more information, see https://www.github.com/sst/opencode-sdk-python#with_streaming_response
114 """
115 return AsyncTuiResourceWithStreamingResponse(self)
116
117 async def append_prompt(
118 self,
119 *,
120 text: str,
121 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
122 # The extra values given here take precedence over values defined on the client or passed to this method.
123 extra_headers: Headers | None = None,
124 extra_query: Query | None = None,
125 extra_body: Body | None = None,
126 timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
127 ) -> TuiAppendPromptResponse:
128 """
129 Append prompt to the TUI
130
131 Args:
132 extra_headers: Send extra headers
133
134 extra_query: Add additional query parameters to the request
135
136 extra_body: Add additional JSON properties to the request
137
138 timeout: Override the client-level default timeout for this request, in seconds
139 """
140 return await self._post(
141 "/tui/append-prompt",
142 body=await async_maybe_transform({"text": text}, tui_append_prompt_params.TuiAppendPromptParams),
143 options=make_request_options(
144 extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
145 ),
146 cast_to=TuiAppendPromptResponse,
147 )
148
149 async def open_help(
150 self,
151 *,
152 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
153 # The extra values given here take precedence over values defined on the client or passed to this method.
154 extra_headers: Headers | None = None,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected