feat(admin): provide actionable error messages for disabled features (#17815)

This commit is contained in:
Shreya Keshive
2026-01-30 13:05:22 -05:00
committed by GitHub
parent b611f9a519
commit f14d0c6a17
12 changed files with 228 additions and 38 deletions
+14 -6
View File
@@ -11,13 +11,15 @@ import {
CommandKind,
} from './types.js';
import {
MessageType,
type HistoryItemSkillsList,
type HistoryItemInfo,
type HistoryItemSkillsList,
MessageType,
} from '../types.js';
import { SettingScope } from '../../config/settings.js';
import { enableSkill, disableSkill } from '../../utils/skillSettings.js';
import { disableSkill, enableSkill } from '../../utils/skillSettings.js';
import { getAdminErrorMessage } from '@google/gemini-cli-core';
import { renderSkillActionFeedback } from '../../utils/skillUtils.js';
import { SettingScope } from '../../config/settings.js';
async function listAction(
context: CommandContext,
@@ -83,7 +85,10 @@ async function disableAction(
context.ui.addItem(
{
type: MessageType.ERROR,
text: 'Agent skills are disabled by your admin.',
text: getAdminErrorMessage(
'Agent skills',
context.services.config ?? undefined,
),
},
Date.now(),
);
@@ -141,7 +146,10 @@ async function enableAction(
context.ui.addItem(
{
type: MessageType.ERROR,
text: 'Agent skills are disabled by your admin.',
text: getAdminErrorMessage(
'Agent skills',
context.services.config ?? undefined,
),
},
Date.now(),
);