feat(plugin): support plugin-provided tools (#34619)
This commit is contained in:
parent
a5c51e11d0
commit
194b0615e0
52 changed files with 1633 additions and 959 deletions
|
|
@ -27,12 +27,12 @@ import type {
|
|||
SessionCompactOutput,
|
||||
SessionWaitInput,
|
||||
SessionWaitOutput,
|
||||
SessionStageInput,
|
||||
SessionStageOutput,
|
||||
SessionClearInput,
|
||||
SessionClearOutput,
|
||||
SessionCommitInput,
|
||||
SessionCommitOutput,
|
||||
SessionRevertStageInput,
|
||||
SessionRevertStageOutput,
|
||||
SessionRevertClearInput,
|
||||
SessionRevertClearOutput,
|
||||
SessionRevertCommitInput,
|
||||
SessionRevertCommitOutput,
|
||||
SessionContextInput,
|
||||
SessionContextOutput,
|
||||
SessionHistoryInput,
|
||||
|
|
@ -465,8 +465,8 @@ export function make(options: ClientOptions) {
|
|||
},
|
||||
requestOptions,
|
||||
),
|
||||
stage: (input: SessionStageInput, requestOptions?: RequestOptions) =>
|
||||
request<{ readonly data: SessionStageOutput }>(
|
||||
revertStage: (input: SessionRevertStageInput, requestOptions?: RequestOptions) =>
|
||||
request<{ readonly data: SessionRevertStageOutput }>(
|
||||
{
|
||||
method: "POST",
|
||||
path: `/api/session/${encodeURIComponent(input.sessionID)}/revert/stage`,
|
||||
|
|
@ -477,8 +477,8 @@ export function make(options: ClientOptions) {
|
|||
},
|
||||
requestOptions,
|
||||
).then((value) => value.data),
|
||||
clear: (input: SessionClearInput, requestOptions?: RequestOptions) =>
|
||||
request<SessionClearOutput>(
|
||||
revertClear: (input: SessionRevertClearInput, requestOptions?: RequestOptions) =>
|
||||
request<SessionRevertClearOutput>(
|
||||
{
|
||||
method: "POST",
|
||||
path: `/api/session/${encodeURIComponent(input.sessionID)}/revert/clear`,
|
||||
|
|
@ -488,8 +488,8 @@ export function make(options: ClientOptions) {
|
|||
},
|
||||
requestOptions,
|
||||
),
|
||||
commit: (input: SessionCommitInput, requestOptions?: RequestOptions) =>
|
||||
request<SessionCommitOutput>(
|
||||
revertCommit: (input: SessionRevertCommitInput, requestOptions?: RequestOptions) =>
|
||||
request<SessionRevertCommitOutput>(
|
||||
{
|
||||
method: "POST",
|
||||
path: `/api/session/${encodeURIComponent(input.sessionID)}/revert/commit`,
|
||||
|
|
|
|||
|
|
@ -577,13 +577,13 @@ export type SessionWaitInput = { readonly sessionID: { readonly sessionID: strin
|
|||
|
||||
export type SessionWaitOutput = void
|
||||
|
||||
export type SessionStageInput = {
|
||||
export type SessionRevertStageInput = {
|
||||
readonly sessionID: { readonly sessionID: string }["sessionID"]
|
||||
readonly messageID: { readonly messageID: string; readonly files?: boolean | undefined }["messageID"]
|
||||
readonly files?: { readonly messageID: string; readonly files?: boolean | undefined }["files"]
|
||||
}
|
||||
|
||||
export type SessionStageOutput = {
|
||||
export type SessionRevertStageOutput = {
|
||||
readonly data: {
|
||||
readonly messageID: string
|
||||
readonly partID?: string
|
||||
|
|
@ -599,13 +599,13 @@ export type SessionStageOutput = {
|
|||
}
|
||||
}["data"]
|
||||
|
||||
export type SessionClearInput = { readonly sessionID: { readonly sessionID: string }["sessionID"] }
|
||||
export type SessionRevertClearInput = { readonly sessionID: { readonly sessionID: string }["sessionID"] }
|
||||
|
||||
export type SessionClearOutput = void
|
||||
export type SessionRevertClearOutput = void
|
||||
|
||||
export type SessionCommitInput = { readonly sessionID: { readonly sessionID: string }["sessionID"] }
|
||||
export type SessionRevertCommitInput = { readonly sessionID: { readonly sessionID: string }["sessionID"] }
|
||||
|
||||
export type SessionCommitOutput = void
|
||||
export type SessionRevertCommitOutput = void
|
||||
|
||||
export type SessionContextInput = { readonly sessionID: { readonly sessionID: string }["sessionID"] }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue