2025-09-23 12:50:09 -04:00
|
|
|
/**
|
|
|
|
|
* @license
|
|
|
|
|
* Copyright 2025 Google LLC
|
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
*/
|
|
|
|
|
|
2025-12-17 09:43:21 -08:00
|
|
|
import {
|
|
|
|
|
type CommandContext,
|
|
|
|
|
CommandKind,
|
|
|
|
|
type SlashCommand,
|
|
|
|
|
} from './types.js';
|
2025-09-23 12:50:09 -04:00
|
|
|
|
|
|
|
|
export const modelCommand: SlashCommand = {
|
|
|
|
|
name: 'model',
|
|
|
|
|
description: 'Opens a dialog to configure the model',
|
|
|
|
|
kind: CommandKind.BUILT_IN,
|
2025-12-01 12:29:03 -05:00
|
|
|
autoExecute: true,
|
2025-12-17 09:43:21 -08:00
|
|
|
action: async (context: CommandContext) => {
|
|
|
|
|
if (context.services.config) {
|
|
|
|
|
await context.services.config.refreshUserQuota();
|
|
|
|
|
}
|
|
|
|
|
return {
|
|
|
|
|
type: 'dialog',
|
|
|
|
|
dialog: 'model',
|
|
|
|
|
};
|
|
|
|
|
},
|
2025-09-23 12:50:09 -04:00
|
|
|
};
|