kimi-code / packages /agent-core-v2 /src /agent /command /commandContribution.ts
SaylorTwift's picture
SaylorTwift HF Staff
Add files using upload-large-folder tool
68d7816 verified
Raw
History Blame Contribute Delete
469 Bytes
import { collection } from '#/_base/di/collection';
import type { ServiceIdentifier } from '#/_base/di/instantiation';
export interface CommandRunContext {
readonly args: string;
get<T>(id: ServiceIdentifier<T>): T;
}
export interface CommandContribution {
readonly name: string;
readonly description?: string;
readonly run: (ctx: CommandRunContext) => void | Promise<void>;
}
export const CommandContribution = collection<CommandContribution>('command');