Skip to content

Commit 2b28b9e

Browse files
committed
docs: generate api docs
1 parent ded5032 commit 2b28b9e

18 files changed

Lines changed: 200 additions & 99 deletions
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
title: "AiCliPlugin"
3+
isDefaultIndex: false
4+
generated: true
5+
---
6+
7+
import MemberInfo from '@site/src/components/MemberInfo';
8+
import GenerationInfo from '@site/src/components/GenerationInfo';
9+
import MemberDescription from '@site/src/components/MemberDescription';
10+
11+
<!-- This file was generated from the CommandKit source. Do not modify. Instead, re-run the "docgen" script -->
12+
13+
14+
## AiCliPlugin
15+
16+
<GenerationInfo sourceFile="packages/ai/src/cli-plugin.ts" sourceLine="16" packageName="@commandkit/ai" />
17+
18+
19+
20+
```ts title="Signature"
21+
class AiCliPlugin extends CompilerPlugin {
22+
public readonly name = 'AiCliPlugin';
23+
activate(ctx: CompilerPluginRuntime) => Promise<void>;
24+
deactivate(ctx: CompilerPluginRuntime) => Promise<void>;
25+
}
26+
```
27+
* Extends: <code><a href='/docs/next/api-reference/commandkit/classes/compiler-plugin#compilerplugin'>CompilerPlugin</a></code>
28+
29+
30+
31+
<div className="members-wrapper">
32+
33+
### name
34+
35+
<MemberInfo kind="property" type={``} />
36+
37+
38+
### activate
39+
40+
<MemberInfo kind="method" type={`(ctx: <a href='/docs/next/api-reference/commandkit/classes/compiler-plugin-runtime#compilerpluginruntime'>CompilerPluginRuntime</a>) => Promise&#60;void&#62;`} />
41+
42+
43+
### deactivate
44+
45+
<MemberInfo kind="method" type={`(ctx: <a href='/docs/next/api-reference/commandkit/classes/compiler-plugin-runtime#compilerpluginruntime'>CompilerPluginRuntime</a>) => Promise&#60;void&#62;`} />
46+
47+
48+
49+
50+
</div>

‎apps/website/docs/api-reference/ai/classes/ai-plugin.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import MemberDescription from '@site/src/components/MemberDescription';
1313

1414
## AiPlugin
1515

16-
<GenerationInfo sourceFile="packages/ai/src/plugin.ts" sourceLine="39" packageName="@commandkit/ai" />
16+
<GenerationInfo sourceFile="packages/ai/src/plugin.ts" sourceLine="43" packageName="@commandkit/ai" />
1717

1818

1919

‎apps/website/docs/api-reference/ai/functions/ai.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import MemberDescription from '@site/src/components/MemberDescription';
1313

1414
## ai
1515

16-
<GenerationInfo sourceFile="packages/ai/src/index.ts" sourceLine="52" packageName="@commandkit/ai" />
16+
<GenerationInfo sourceFile="packages/ai/src/index.ts" sourceLine="53" packageName="@commandkit/ai" />
1717

1818
Defines the AI plugin for the application.
1919

‎apps/website/docs/api-reference/ai/functions/create-system-prompt.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import MemberDescription from '@site/src/components/MemberDescription';
1313

1414
## createSystemPrompt
1515

16-
<GenerationInfo sourceFile="packages/ai/src/system-prompt.ts" sourceLine="7" packageName="@commandkit/ai" />
16+
<GenerationInfo sourceFile="packages/ai/src/system-prompt.ts" sourceLine="35" packageName="@commandkit/ai" />
1717

1818
Creates the default system prompt for the AI bot based on the provided message context.
1919
This prompt includes the bot's role, current channel information, and response guidelines.

‎apps/website/docs/api-reference/ai/functions/execute-ai.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import MemberDescription from '@site/src/components/MemberDescription';
1313

1414
## executeAI
1515

16-
<GenerationInfo sourceFile="packages/ai/src/index.ts" sourceLine="42" packageName="@commandkit/ai" />
16+
<GenerationInfo sourceFile="packages/ai/src/index.ts" sourceLine="43" packageName="@commandkit/ai" />
1717

1818
Executes an AI command.
1919

‎apps/website/docs/api-reference/ai/functions/use-ai.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import MemberDescription from '@site/src/components/MemberDescription';
1313

1414
## useAI
1515

16-
<GenerationInfo sourceFile="packages/ai/src/index.ts" sourceLine="19" packageName="@commandkit/ai" />
16+
<GenerationInfo sourceFile="packages/ai/src/index.ts" sourceLine="20" packageName="@commandkit/ai" />
1717

1818
Fetches the AI plugin instance.
1919

‎apps/website/docs/api-reference/ai/functions/use-aicontext.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import MemberDescription from '@site/src/components/MemberDescription';
1313

1414
## useAIContext
1515

16-
<GenerationInfo sourceFile="packages/ai/src/index.ts" sourceLine="11" packageName="@commandkit/ai" />
16+
<GenerationInfo sourceFile="packages/ai/src/index.ts" sourceLine="12" packageName="@commandkit/ai" />
1717

1818
Retrieves the AI context.
1919

‎apps/website/docs/api-reference/ai/interfaces/ai-config.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import MemberDescription from '@site/src/components/MemberDescription';
1313

1414
## AiConfig
1515

16-
<GenerationInfo sourceFile="packages/ai/src/plugin.ts" sourceLine="20" packageName="@commandkit/ai" />
16+
<GenerationInfo sourceFile="packages/ai/src/plugin.ts" sourceLine="22" packageName="@commandkit/ai" />
1717

1818
Represents the configuration options for the AI plugin scoped to a specific command.
1919

‎apps/website/docs/api-reference/ai/interfaces/configure-ai.mdx‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ interface ConfigureAI {
2323
messageFilter?: MessageFilter;
2424
selectAiModel: SelectAiModel;
2525
prepareSystemPrompt?: (ctx: AiContext, message: Message) => Promise<string>;
26-
preparePrompt?: (
27-
ctx: AiContext,
28-
message: Message,
26+
preparePrompt?: (
27+
ctx: AiContext,
28+
message: Message,
2929
) => Promise<string | AiMessage>;
3030
onProcessingStart?: (ctx: AiContext, message: Message) => Promise<void>;
3131
onProcessingFinish?: (ctx: AiContext, message: Message) => Promise<void>;
32-
onResult?: (
33-
ctx: AiContext,
34-
message: Message,
35-
result: AIGenerateResult,
32+
onResult?: (
33+
ctx: AiContext,
34+
message: Message,
35+
result: AIGenerateResult,
3636
) => Promise<void>;
3737
onError?: (ctx: AiContext, message: Message, error: Error) => Promise<void>;
3838
}
@@ -49,24 +49,24 @@ Whether to disable the built-in tools. Default is false.
4949

5050
<MemberInfo kind="property" type={`<a href='/docs/next/api-reference/ai/types/message-filter#messagefilter'>MessageFilter</a>`} />
5151

52-
A filter function that determines whether a message should be processed by the AI.
52+
A filter function that determines whether a message should be processed by the AI.
5353
CommandKit invokes this function before processing the message.
5454
### selectAiModel
5555

5656
<MemberInfo kind="property" type={`<a href='/docs/next/api-reference/ai/types/select-ai-model#selectaimodel'>SelectAiModel</a>`} />
5757

58-
A function that selects the AI model to use based on the message.
58+
A function that selects the AI model to use based on the message.
5959
This function should return a promise that resolves to an object containing the model and options.
6060
### prepareSystemPrompt
6161

6262
<MemberInfo kind="property" type={`(ctx: <a href='/docs/next/api-reference/ai/classes/ai-context#aicontext'>AiContext</a>, message: Message) =&#62; Promise&#60;string&#62;`} />
6363

64-
A function that generates a system prompt based on the message.
65-
This function should return a promise that resolves to a string containing the system prompt.
64+
A function that generates a system prompt based on the message.
65+
This function should return a promise that resolves to a string containing the system prompt.
6666
If not provided, a default system prompt will be used.
6767
### preparePrompt
6868

69-
<MemberInfo kind="property" type={`( ctx: <a href='/docs/next/api-reference/ai/classes/ai-context#aicontext'>AiContext</a>, message: Message, ) =&#62; Promise&#60;string | <a href='/docs/next/api-reference/ai/types/ai-message#aimessage'>AiMessage</a>&#62;`} />
69+
<MemberInfo kind="property" type={`( ctx: <a href='/docs/next/api-reference/ai/classes/ai-context#aicontext'>AiContext</a>, message: Message, ) =&#62; Promise&#60;string | <a href='/docs/next/api-reference/ai/types/ai-message#aimessage'>AiMessage</a>&#62;`} />
7070

7171
A function that prepares the prompt for the AI model.
7272
### onProcessingStart
@@ -81,7 +81,7 @@ A function that gets called when the AI starts processing a message.
8181
A function that gets called when the AI finishes processing a message.
8282
### onResult
8383

84-
<MemberInfo kind="property" type={`( ctx: <a href='/docs/next/api-reference/ai/classes/ai-context#aicontext'>AiContext</a>, message: Message, result: <a href='/docs/next/api-reference/ai/types/aigenerate-result#aigenerateresult'>AIGenerateResult</a>, ) =&#62; Promise&#60;void&#62;`} />
84+
<MemberInfo kind="property" type={`( ctx: <a href='/docs/next/api-reference/ai/classes/ai-context#aicontext'>AiContext</a>, message: Message, result: <a href='/docs/next/api-reference/ai/types/aigenerate-result#aigenerateresult'>AIGenerateResult</a>, ) =&#62; Promise&#60;void&#62;`} />
8585

8686
A function that gets called upon receiving the result from the AI model.
8787
### onError
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: "CreateEmbed"
3+
isDefaultIndex: false
4+
generated: true
5+
---
6+
7+
import MemberInfo from '@site/src/components/MemberInfo';
8+
import GenerationInfo from '@site/src/components/GenerationInfo';
9+
import MemberDescription from '@site/src/components/MemberDescription';
10+
11+
<!-- This file was generated from the CommandKit source. Do not modify. Instead, re-run the "docgen" script -->
12+
13+
14+
## createEmbed
15+
16+
<GenerationInfo sourceFile="packages/ai/src/tools/create-embed.ts" sourceLine="5" packageName="@commandkit/ai" />
17+
18+
19+

0 commit comments

Comments
 (0)