Skip to content

Commit 1ee01fc

Browse files
committed
mark after as unstable
1 parent 6e04012 commit 1ee01fc

File tree

10 files changed

+116
-124
lines changed

10 files changed

+116
-124
lines changed

apps/test-bot/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"discord.js": "catalog:discordjs",
2222
"dotenv": "^16.4.7",
2323
"ms": "^2.1.3",
24-
"zod": "^3.25.56"
24+
"zod": "^4.1.1"
2525
},
2626
"devDependencies": {
2727
"@types/ms": "^2.1.0",

apps/test-bot/src/app/commands/(developer)/run-after.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
import { CommandData, after, ChatInputCommand } from 'commandkit';
1+
import {
2+
CommandData,
3+
unstable_after as after,
4+
ChatInputCommand,
5+
} from 'commandkit';
26

37
export const command: CommandData = {
48
name: 'run-after',

apps/test-bot/src/app/commands/(general)/+ping.middleware.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {
2-
after,
2+
unstable_after as after,
33
Logger,
44
type MiddlewareContext,
55
stopMiddlewares,

apps/test-bot/src/app/commands/(general)/ping.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
MessageCommandContext,
1414
stopMiddlewares,
1515
Logger,
16-
after,
16+
unstable_after as after,
1717
} from 'commandkit';
1818

1919
export const command: CommandData = {

apps/test-bot/src/app/commands/(interactions)/confirmation.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
OnButtonKitClick,
77
} from 'commandkit';
88
import { ButtonStyle, MessageFlags } from 'discord.js';
9-
import { AiConfig, AiCommand } from '@commandkit/ai';
9+
import { AiConfig, AiCommand, ToolParameterType } from '@commandkit/ai';
1010
import { z } from 'zod';
1111

1212
export const command: CommandData = {
@@ -15,7 +15,7 @@ export const command: CommandData = {
1515
};
1616

1717
export const aiConfig = {
18-
parameters: z.object({
18+
inputSchema: z.object({
1919
message: z
2020
.string()
2121
.describe('The message to be shown in the confirmation.'),

apps/test-bot/src/app/commands/(leveling)/xp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const command: CommandData = {
1111

1212
export const aiConfig = {
1313
description: 'Get the XP of a user in a guild.',
14-
parameters: z.object({
14+
inputSchema: z.object({
1515
guildId: z.string().describe('The ID of the guild.'),
1616
userId: z.string().describe('The ID of the user.'),
1717
}),

packages/commandkit/src/app/commands/Context.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -568,28 +568,6 @@ export class Context<
568568
export class MiddlewareContext<
569569
T extends CommandExecutionMode = CommandExecutionMode,
570570
> extends Context<T, MiddlewareContextArgs> {
571-
// /**
572-
// * @private
573-
// * @internal
574-
// */
575-
// #cancel = false;
576-
577-
// /**
578-
// * Whether the command execution was cancelled.
579-
// */
580-
// public get cancelled(): boolean {
581-
// return this.#cancel;
582-
// }
583-
584-
// /**
585-
// * Cancels upcoming middleware and command execution.
586-
// * This will **not** stop any `after()` callbacks inside the command.
587-
// */
588-
// public cancel(): void {
589-
// this.#cancel = true;
590-
// stopMiddlewares();
591-
// }
592-
593571
/**
594572
* Sets command runner function to wrap the command execution.
595573
* @param fn The function to set.

packages/commandkit/src/app/interrupt/signals.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import {
66
import { eventWorkerContext } from '../events/EventWorkerContext';
77

88
/**
9-
* Stop upcoming middleware and command execution.
10-
* This will **not** stop any `after()` callbacks inside the command.
9+
* Stop upcoming middlewares and command execution.
1110
*/
1211
export function stopMiddlewares(): never {
1312
throw createCommandKitError(CommandKitErrorCodes.StopMiddlewares);

packages/commandkit/src/index.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@ export * from './commandkit';
66
export * from './components';
77
export * from './config/config';
88
export * from './context/async-context';
9-
export * from './context/environment';
9+
export {
10+
type CommandKitEnvironmentInternalData,
11+
CommandKitEnvironment,
12+
CommandKitEnvironmentType,
13+
cancelAfter,
14+
after as unstable_after,
15+
} from './context/environment';
1016
export * from './app/index';
1117
export * from './logger/DefaultLogger';
1218
export * from './logger/ILogger';

0 commit comments

Comments
 (0)