sdk: regenerate client types for handoff endpoint
This commit is contained in:
parent
3ec6bff038
commit
3b2550106b
3 changed files with 191 additions and 0 deletions
|
|
@ -110,6 +110,8 @@ import type {
|
|||
SessionForkResponses,
|
||||
SessionGetErrors,
|
||||
SessionGetResponses,
|
||||
SessionHandoffErrors,
|
||||
SessionHandoffResponses,
|
||||
SessionInitErrors,
|
||||
SessionInitResponses,
|
||||
SessionListResponses,
|
||||
|
|
@ -1766,6 +1768,48 @@ export class Session extends HeyApiClient {
|
|||
...params,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Handoff session
|
||||
*
|
||||
* Extract context and relevant files for another agent to continue the conversation.
|
||||
*/
|
||||
public handoff<ThrowOnError extends boolean = false>(
|
||||
parameters: {
|
||||
sessionID: string
|
||||
directory?: string
|
||||
model?: {
|
||||
providerID: string
|
||||
modelID: string
|
||||
}
|
||||
goal?: string
|
||||
},
|
||||
options?: Options<never, ThrowOnError>,
|
||||
) {
|
||||
const params = buildClientParams(
|
||||
[parameters],
|
||||
[
|
||||
{
|
||||
args: [
|
||||
{ in: "path", key: "sessionID" },
|
||||
{ in: "query", key: "directory" },
|
||||
{ in: "body", key: "model" },
|
||||
{ in: "body", key: "goal" },
|
||||
],
|
||||
},
|
||||
],
|
||||
)
|
||||
return (options?.client ?? this.client).post<SessionHandoffResponses, SessionHandoffErrors, ThrowOnError>({
|
||||
url: "/session/{sessionID}/handoff",
|
||||
...options,
|
||||
...params,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...options?.headers,
|
||||
...params.headers,
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export class Part extends HeyApiClient {
|
||||
|
|
|
|||
|
|
@ -3803,6 +3803,51 @@ export type PermissionRespondResponses = {
|
|||
|
||||
export type PermissionRespondResponse = PermissionRespondResponses[keyof PermissionRespondResponses]
|
||||
|
||||
export type SessionHandoffData = {
|
||||
body?: {
|
||||
model: {
|
||||
providerID: string
|
||||
modelID: string
|
||||
}
|
||||
goal?: string
|
||||
}
|
||||
path: {
|
||||
/**
|
||||
* Session ID
|
||||
*/
|
||||
sessionID: string
|
||||
}
|
||||
query?: {
|
||||
directory?: string
|
||||
}
|
||||
url: "/session/{sessionID}/handoff"
|
||||
}
|
||||
|
||||
export type SessionHandoffErrors = {
|
||||
/**
|
||||
* Bad request
|
||||
*/
|
||||
400: BadRequestError
|
||||
/**
|
||||
* Not found
|
||||
*/
|
||||
404: NotFoundError
|
||||
}
|
||||
|
||||
export type SessionHandoffError = SessionHandoffErrors[keyof SessionHandoffErrors]
|
||||
|
||||
export type SessionHandoffResponses = {
|
||||
/**
|
||||
* Handoff data extracted
|
||||
*/
|
||||
200: {
|
||||
text: string
|
||||
files: Array<string>
|
||||
}
|
||||
}
|
||||
|
||||
export type SessionHandoffResponse = SessionHandoffResponses[keyof SessionHandoffResponses]
|
||||
|
||||
export type PermissionReplyData = {
|
||||
body?: {
|
||||
reply: "once" | "always" | "reject"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue