feat: hooks

This commit is contained in:
Gab
2026-03-27 14:00:04 +11:00
parent 8e05565e84
commit c39a97bb7d
12 changed files with 208 additions and 10 deletions

View File

@@ -7,6 +7,7 @@ import type {
AppAgentsResponses,
AppLogErrors,
AppLogResponses,
AppPromptsResponses,
AppSkillsResponses,
Auth as Auth3,
AuthRemoveErrors,
@@ -3858,6 +3859,36 @@ export class App extends HeyApiClient {
...params,
})
}
/**
* List ToothFairyAI prompts
*
* Get prompts assigned to a specific agent or all prompts.
*/
public prompts<ThrowOnError extends boolean = false>(
parameters?: {
directory?: string
workspace?: string
},
options?: Options<never, ThrowOnError>,
) {
const params = buildClientParams(
[parameters],
[
{
args: [
{ in: "query", key: "directory" },
{ in: "query", key: "workspace" },
],
},
],
)
return (options?.client ?? this.client).get<AppPromptsResponses, unknown, ThrowOnError>({
url: "/prompts",
...options,
...params,
})
}
}
export class Lsp extends HeyApiClient {

View File

@@ -1919,6 +1919,7 @@ export type Agent = {
}
variant?: string
prompt?: string
goals?: string
options: {
[key: string]: unknown
}
@@ -4996,6 +4997,31 @@ export type AppSkillsResponses = {
export type AppSkillsResponse = AppSkillsResponses[keyof AppSkillsResponses]
export type AppPromptsData = {
body?: never
path?: never
query?: {
directory?: string
workspace?: string
}
url: "/prompts"
}
export type AppPromptsResponses = {
/**
* List of prompts
*/
200: Array<{
id: string
label: string
interpolation_string: string
available_to_agents?: Array<string>
description?: string
}>
}
export type AppPromptsResponse = AppPromptsResponses[keyof AppPromptsResponses]
export type LspStatusData = {
body?: never
path?: never