mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-15 00:21:09 -07:00
Add extensions logging (#11261)
This commit is contained in:
@@ -223,6 +223,7 @@ describe('extensionsCommand', () => {
|
||||
|
||||
const extensionOne: GeminiCLIExtension = {
|
||||
name: 'ext-one',
|
||||
id: 'ext-one-id',
|
||||
version: '1.0.0',
|
||||
isActive: true,
|
||||
path: '/test/dir/ext-one',
|
||||
@@ -235,6 +236,7 @@ describe('extensionsCommand', () => {
|
||||
};
|
||||
const extensionTwo: GeminiCLIExtension = {
|
||||
name: 'another-ext',
|
||||
id: 'another-ext-id',
|
||||
version: '1.0.0',
|
||||
isActive: true,
|
||||
path: '/test/dir/another-ext',
|
||||
@@ -247,6 +249,7 @@ describe('extensionsCommand', () => {
|
||||
};
|
||||
const allExt: GeminiCLIExtension = {
|
||||
name: 'all-ext',
|
||||
id: 'all-ext-id',
|
||||
version: '1.0.0',
|
||||
isActive: true,
|
||||
path: '/test/dir/all-ext',
|
||||
|
||||
@@ -196,6 +196,7 @@ export interface SlashCommand {
|
||||
|
||||
// Optional metadata for extension commands
|
||||
extensionName?: string;
|
||||
extensionId?: string;
|
||||
|
||||
// The action to run. Optional for parent commands that only group sub-commands.
|
||||
action?: (
|
||||
|
||||
@@ -518,6 +518,7 @@ export const useSlashCommandProcessor = (
|
||||
command: resolvedCommandPath[0],
|
||||
subcommand,
|
||||
status: SlashCommandStatus.ERROR,
|
||||
extension_id: commandToExecute?.extensionId,
|
||||
});
|
||||
logSlashCommand(config, event);
|
||||
}
|
||||
@@ -535,6 +536,7 @@ export const useSlashCommandProcessor = (
|
||||
command: resolvedCommandPath[0],
|
||||
subcommand,
|
||||
status: SlashCommandStatus.SUCCESS,
|
||||
extension_id: commandToExecute?.extensionId,
|
||||
});
|
||||
logSlashCommand(config, event);
|
||||
}
|
||||
|
||||
@@ -57,6 +57,7 @@ describe('useExtensionUpdates', () => {
|
||||
const extensions = [
|
||||
{
|
||||
name: 'test-extension',
|
||||
id: 'test-extension-id',
|
||||
type: 'git',
|
||||
version: '1.0.0',
|
||||
path: '/some/path',
|
||||
@@ -269,6 +270,7 @@ describe('useExtensionUpdates', () => {
|
||||
const extensions = [
|
||||
{
|
||||
name: 'test-extension-1',
|
||||
id: 'test-extension-1-id',
|
||||
type: 'git',
|
||||
version: '1.0.0',
|
||||
path: '/some/path1',
|
||||
@@ -282,6 +284,8 @@ describe('useExtensionUpdates', () => {
|
||||
},
|
||||
{
|
||||
name: 'test-extension-2',
|
||||
id: 'test-extension-2-id',
|
||||
|
||||
type: 'git',
|
||||
version: '2.0.0',
|
||||
path: '/some/path2',
|
||||
|
||||
Reference in New Issue
Block a user