Skip to content

Commit 3141fde

Browse files
committed
docs: generate docs
1 parent 75397fe commit 3141fde

File tree

354 files changed

+1419
-2126
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

354 files changed

+1419
-2126
lines changed

apps/website/docs/api-reference/ai/classes/ai-context.mdx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ import MemberDescription from '@site/src/components/MemberDescription';
1313

1414
## AiContext
1515

16-
<GenerationInfo sourceFile="packages/ai/src/context.ts" sourceLine="12" packageName="@commandkit/ai" />
17-
16+
<GenerationInfo sourceFile="packages/ai/src/context.ts" sourceLine="17" packageName="@commandkit/ai" />
1817

18+
Represents the context in which an AI command is executed.
19+
This includes the parameters passed to the command, the message that triggered it,
20+
and the CommandKit instance associated with the command.
1921

2022
```ts title="Signature"
2123
class AiContext<T extends Record<string, unknown> = Record<string, unknown>> {
@@ -34,32 +36,32 @@ class AiContext<T extends Record<string, unknown> = Record<string, unknown>> {
3436

3537
<MemberInfo kind="property" type={`T`} />
3638

37-
39+
The parameters passed to the AI command.
3840
### message
3941

4042
<MemberInfo kind="property" type={`Message`} />
4143

42-
44+
The message that triggered the AI command.
4345
### client
4446

4547
<MemberInfo kind="property" type={`Client`} />
4648

47-
49+
The client instance associated with the AI command.
4850
### commandkit
4951

5052
<MemberInfo kind="property" type={`<a href='/docs/next/api-reference/commandkit/classes/command-kit#commandkit'>CommandKit</a>`} />
5153

52-
54+
The CommandKit instance associated with the AI command.
5355
### constructor
5456

5557
<MemberInfo kind="method" type={`(options: <a href='/docs/next/api-reference/ai/interfaces/ai-context-options#aicontextoptions'>AiContextOptions</a>&#60;T&#62;) => AiContext`} />
5658

57-
59+
Creates a new instance of AiContext.
5860
### setParams
5961

6062
<MemberInfo kind="method" type={`(params: T) => void`} />
6163

62-
64+
Sets the parameters for the AI context.
6365

6466

6567
</div>

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

Lines changed: 3 additions & 3 deletions
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="48" packageName="@commandkit/ai" />
16+
<GenerationInfo sourceFile="packages/ai/src/plugin.ts" sourceLine="78" packageName="@commandkit/ai" />
1717

1818

1919

@@ -27,7 +27,7 @@ class AiPlugin extends RuntimePlugin<AiPluginOptions> {
2727
onAfterCommandsLoad(ctx: CommandKitPluginRuntime) => Promise<void>;
2828
}
2929
```
30-
* Extends: <code><a href='/docs/next/api-reference/commandkit/classes/runtime-plugin#runtimeplugin'>RuntimePlugin</a>&#60;AiPluginOptions&#62;</code>
30+
* Extends: <code><a href='/docs/next/api-reference/commandkit/classes/runtime-plugin#runtimeplugin'>RuntimePlugin</a>&#60;<a href='/docs/next/api-reference/ai/interfaces/ai-plugin-options#aipluginoptions'>AiPluginOptions</a>&#62;</code>
3131

3232

3333

@@ -40,7 +40,7 @@ class AiPlugin extends RuntimePlugin<AiPluginOptions> {
4040

4141
### constructor
4242

43-
<MemberInfo kind="method" type={`(options: AiPluginOptions) => AiPlugin`} />
43+
<MemberInfo kind="method" type={`(options: <a href='/docs/next/api-reference/ai/interfaces/ai-plugin-options#aipluginoptions'>AiPluginOptions</a>) => AiPlugin`} />
4444

4545

4646
### activate

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ import MemberDescription from '@site/src/components/MemberDescription';
1313

1414
## ai
1515

16-
<GenerationInfo sourceFile="packages/ai/src/index.ts" sourceLine="4" packageName="@commandkit/ai" />
17-
16+
<GenerationInfo sourceFile="packages/ai/src/index.ts" sourceLine="9" packageName="@commandkit/ai" />
1817

18+
Defines the AI plugin for the application.
1919

2020
```ts title="Signature"
2121
function ai(options?: AiPluginOptions): void
@@ -24,5 +24,5 @@ Parameters
2424

2525
### options
2626

27-
<MemberInfo kind="parameter" type={`AiPluginOptions`} />
27+
<MemberInfo kind="parameter" type={`<a href='/docs/next/api-reference/ai/interfaces/ai-plugin-options#aipluginoptions'>AiPluginOptions</a>`} />
2828

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ import MemberDescription from '@site/src/components/MemberDescription';
1313

1414
## configureAI
1515

16-
<GenerationInfo sourceFile="packages/ai/src/plugin.ts" sourceLine="34" packageName="@commandkit/ai" />
17-
16+
<GenerationInfo sourceFile="packages/ai/src/plugin.ts" sourceLine="64" packageName="@commandkit/ai" />
1817

18+
Configures the AI plugin with the provided options.
19+
This function allows you to set a message filter, select an AI model, and generate a system prompt.
1920

2021
```ts title="Signature"
2122
function configureAI(config: ConfigureAI): void

apps/website/docs/api-reference/ai/functions/get-ai-worker-context.mdx

Lines changed: 0 additions & 22 deletions
This file was deleted.

apps/website/docs/api-reference/ai/functions/run-in-ai-worker-context.mdx

Lines changed: 0 additions & 36 deletions
This file was deleted.

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ import MemberDescription from '@site/src/components/MemberDescription';
1313

1414
## AiConfig
1515

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

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

2020
```ts title="Signature"
2121
interface AiConfig {
@@ -30,12 +30,12 @@ interface AiConfig {
3030

3131
<MemberInfo kind="property" type={`string`} />
3232

33-
33+
A description of the AI functionality provided by this command. If not given, the command's description will be used.
3434
### parameters
3535

3636
<MemberInfo kind="property" type={`any`} />
3737

38-
38+
A zod schema defining the parameters that the AI command accepts.
3939

4040

4141
</div>
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "ShowInformation"
2+
title: "AiPluginOptions"
33
isDefaultIndex: false
44
generated: true
55
---
@@ -11,12 +11,14 @@ import MemberDescription from '@site/src/components/MemberDescription';
1111
<!-- This file was generated from the CommandKit source. Do not modify. Instead, re-run the "docgen" script -->
1212

1313

14-
## showInformation
15-
16-
<GenerationInfo sourceFile="packages/commandkit/src/cli/information.ts" sourceLine="129" packageName="commandkit" />
14+
## AiPluginOptions
1715

16+
<GenerationInfo sourceFile="packages/ai/src/types.ts" sourceLine="33" packageName="@commandkit/ai" />
1817

18+
Options for the AI plugin.
1919

2020
```ts title="Signature"
21-
function showInformation(): void
21+
interface AiPluginOptions {
22+
23+
}
2224
```

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ import MemberDescription from '@site/src/components/MemberDescription';
1313

1414
## ConfigureAI
1515

16-
<GenerationInfo sourceFile="packages/ai/src/plugin.ts" sourceLine="28" packageName="@commandkit/ai" />
17-
16+
<GenerationInfo sourceFile="packages/ai/src/plugin.ts" sourceLine="40" packageName="@commandkit/ai" />
1817

18+
Represents the configuration options for the AI model.
1919

2020
```ts title="Signature"
2121
interface ConfigureAI {
@@ -31,17 +31,21 @@ interface ConfigureAI {
3131

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

34-
34+
A filter function that determines whether a message should be processed by the AI.
35+
CommandKit invokes this function before processing the message.
3536
### selectAiModel
3637

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

39-
40+
A function that selects the AI model to use based on the message.
41+
This function should return a promise that resolves to an object containing the model and options.
4042
### systemPrompt
4143

4244
<MemberInfo kind="property" type={`(message: Message) =&#62; Promise&#60;string&#62;`} />
4345

44-
46+
A function that generates a system prompt based on the message.
47+
This function should return a promise that resolves to a string containing the system prompt.
48+
If not provided, a default system prompt will be used.
4549

4650

4751
</div>

apps/website/docs/api-reference/ai/types/ai-command.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ import MemberDescription from '@site/src/components/MemberDescription';
1313

1414
## AiCommand
1515

16-
<GenerationInfo sourceFile="packages/ai/src/types.ts" sourceLine="17" packageName="@commandkit/ai" />
17-
16+
<GenerationInfo sourceFile="packages/ai/src/types.ts" sourceLine="40" packageName="@commandkit/ai" />
1817

18+
Represents a command that can be executed by the AI.
1919

2020
```ts title="Signature"
2121
type AiCommand<T extends Record<string, unknown>> = (

0 commit comments

Comments
 (0)