mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-16 13:44:44 +00:00
feat: hooks
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user