chore: generate

This commit is contained in:
opencode-agent[bot] 2026-07-24 10:22:28 +00:00
commit ae4be983cb
3 changed files with 23 additions and 18 deletions

View file

@ -242,8 +242,8 @@ export const Terminal = (props: TerminalProps) => {
const pushSize = async (cols: number, rows: number) => {
if ((await sdk().protocol) === "v1") {
return sdk().client.pty
.update({
return sdk()
.client.pty.update({
ptyID: id,
size: { cols, rows },
})
@ -251,8 +251,8 @@ export const Terminal = (props: TerminalProps) => {
debugTerminal("failed to sync terminal size", err)
})
}
return sdk().api.pty
.update({
return sdk()
.api.pty.update({
ptyID: id,
location: { directory },
size: { cols, rows },
@ -534,16 +534,16 @@ export const Terminal = (props: TerminalProps) => {
const gone = async () => {
if ((await sdk().protocol) === "v1") {
return sdk().client.pty
.get({ ptyID: id }, { throwOnError: false })
return sdk()
.client.pty.get({ ptyID: id }, { throwOnError: false })
.then((result) => result.response.status === 404)
.catch((err) => {
debugTerminal("failed to inspect terminal session", err)
return false
})
}
return sdk().api.pty
.get({ ptyID: id, location: { directory } })
return sdk()
.api.pty.get({ ptyID: id, location: { directory } })
.then((result) => result.data.status === "exited")
.catch((err) => {
if (err && typeof err === "object" && "_tag" in err && err._tag === "PtyNotFoundError") return true
@ -554,8 +554,8 @@ export const Terminal = (props: TerminalProps) => {
const connectToken = async () => {
if ((await sdk().protocol) === "v1") {
const result = await sdk().client.pty
.connectToken(
const result = await sdk()
.client.pty.connectToken(
{ ptyID: id, directory },
{
throwOnError: false,
@ -573,8 +573,8 @@ export const Terminal = (props: TerminalProps) => {
throw new Error("PTY connect ticket rejected by origin or CSRF checks. Check the server CORS config.")
throw new Error(`PTY connect ticket failed with ${result.response.status}`)
}
return sdk().api.pty
.connectToken({
return sdk()
.api.pty.connectToken({
ptyID: id,
location: { directory },
"x-opencode-ticket": "1",