Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import { AgentWorkbenchLayout, ISessionsHostLayoutService } from '../../../../wo
import { ISessionComparisonService } from '../../../../workbench/contrib/sessions/common/sessionComparison.js';
import { CHAT_WINDOWS_ENABLED_SETTING } from '../../chatWindow/common/chatWindows.js';
import { buildSessionComparisonAccessibleContent, isJudgeSession, SessionComparisonResultFocused } from '../../../../workbench/contrib/sessions/browser/chat/sessionComparisonResult.js';
import { SESSION_ACTIVITY_BAR_SETTING, SESSIONS_CHAT_TABS_DEFAULT, SESSIONS_CHAT_TABS_SETTING, SESSIONS_DRAFTS_ENABLED_SETTING, SESSIONS_SEND_LATER_ENABLED_SETTING, SESSIONS_LIST_GROUP_EXTERNAL_SESSIONS_SETTING, SESSIONS_LIST_INBOX_ENABLED_SETTING, SESSIONS_LIST_SHOW_AUTOMATION_SESSIONS_SETTING, SessionsChatTabsMode } from '../../../../workbench/contrib/sessions/common/sessionConfig.js';
import { SESSION_ACTIVITY_BAR_SETTING, SESSIONS_CHAT_TABS_DEFAULT, SESSIONS_CHAT_TABS_SETTING, SESSIONS_DRAFTS_ENABLED_SETTING, SESSIONS_SEND_LATER_ENABLED_SETTING, SESSIONS_LIST_GROUP_EXTERNAL_SESSIONS_SETTING, SESSIONS_LIST_INBOX_ENABLED_SETTING, SESSIONS_LIST_SHOW_AUTOMATION_SESSIONS_SETTING, SESSIONS_SIDEBAR_CUSTOMIZATIONS_CATEGORIES_SETTING, SessionsChatTabsMode } from '../../../../workbench/contrib/sessions/common/sessionConfig.js';
import { CHAT_AUTOMATIONS_ENABLED_SETTING } from '../../../../workbench/contrib/chat/common/automations/automationsEnabled.js';
import { AGENT_SESSIONS_APPEARANCE_TOOLS_ENABLED_SETTING, AGENT_SESSIONS_RESPONSE_SELECTION_MENU_SETTING, AGENTS_PICKER_IN_ATTACH_CONTEXT_MENU_SETTING, COMPARE_AGENTS_ENABLED_SETTING, COMPARE_AGENTS_TOOLS_ENABLED_SETTING, ENVIRONMENT_PICKER_MANAGE_REMOTES_SETTING, ENVIRONMENT_PICKER_SETTING, NEW_SESSION_CONNECTOR_RECOMMENDATIONS_SETTING, NEW_SESSION_WELCOME_PHRASES_SETTING, WORKSPACE_OPT_OUT_SETTING } from '../../../../workbench/contrib/sessions/common/chatConstants.js';
import { logSettingExperimentTrigger } from '../../../../platform/telemetry/common/experimentTrigger.js';
Expand Down Expand Up @@ -273,6 +273,7 @@ export class SessionsChatAccessibilityHelp implements IAccessibleViewImplementat
content.push(localize('sessionsChat.inputBackground', "Use Send in Background{0} to start a new session without navigating into it. The started session appears in the Sessions list, and the composer resets for another prompt. A notification offers Open Session when the send succeeds. Enter sends and opens the session as usual. You can change the background-send shortcuts in Keyboard Shortcuts.", `<keybinding:${SEND_IN_BACKGROUND_COMMAND_ID}>`));
content.push(localize('sessionsChat.workspace', "Use Tab or Shift+Tab to navigate to the workspace picker and choose a workspace for your session. Opening the picker focuses its search input so you can immediately type to filter workspaces. If quick chats are available, you can also choose Chat to start a workspace-less chat."));
content.push(localize('sessionsChat.customizationsLocation', "The Chat: Customizations Location setting places Customizations below Sessions, at the top left of Sessions, in the Chat toolbar, or inside the input after the model pickers. Activate Customizations with Enter or Space to open its editor. Its hover contains counts and links for plugins, MCP servers, skills, instructions, and hooks. Needs attention links to customization migrations and MCP servers that require sign-in, showing up to two server names. Activate a server name to sign in directly; the sign-in count opens MCP server management. The footer offers Browse Additional and a settings gear named Change Button Location. Use Show or Focus Hover while the button is focused, then Tab or Shift+Tab to reach the links and Enter to activate them."));
content.push(localize('sessionsChat.customizationsMore', "The Customizations section below the Sessions list may show only Overview, Plugins, MCP Servers, Skills, and Instructions, followed by More, which shows how many customizations the other categories contain. Activate More with Enter or Space to show those categories in place, followed by Less, and move focus to the first category shown. Activate Less to hide them again and return focus to More. The section remembers which of the two you used last. To always show every category, set {0} to all.", SESSIONS_SIDEBAR_CUSTOMIZATIONS_CATEGORIES_SETTING));
content.push(localize('sessionsChat.pickerShortcuts', "While the new-session input has focus, open the environment picker{0}, branch picker{1}, or Branch/New Worktree picker{2}. Focus Sync Changes{3}, then press Enter to synchronize. These shortcuts are available only when the corresponding control is available and expand hidden session options before focusing them.", '<keybinding:sessions.focusNewSessionEnvironmentPicker>', '<keybinding:sessions.focusNewSessionBranchPicker>', '<keybinding:sessions.focusNewSessionWorktreePicker>', '<keybinding:sessions.focusSessionSyncAction>'));
content.push(localize('sessionsChat.removeWorkspace', "Workspace rows offer a Remove action. Use the arrow keys to focus a workspace, then Tab to reach its actions. Removed workspaces stay hidden across reloads until you browse to that workspace and successfully start a session from the new-session composer. Removing a workspace does not delete its sessions or files."));
content.push(accessor.get(IAccessibilityService).isScreenReaderOptimized()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import { SESSION_ARCHIVE_NUDGE_SETTING } from '../../../../../workbench/contrib/
import { SessionComparisonAccessibleView, SessionsChatAccessibilityHelp } from '../../browser/sessionsChatAccessibilityHelp.js';
import { CustomizationMarketplaceConfiguration } from '../../../../../platform/customizationMarketplace/common/customizationMarketplaceSources.js';
import { SESSIONS_LIST_PROMOTE_NEW_CHAT_ACTION_DEFAULT, SessionsListPromoteNewChatActionContext } from '../../../../../workbench/contrib/sessions/common/contextkeys.js';
import { SESSION_ACTIVITY_BAR_SETTING, SESSIONS_CHAT_TABS_SETTING, SESSIONS_LIST_GROUP_EXTERNAL_SESSIONS_SETTING, SESSIONS_LIST_SHOW_AUTOMATION_SESSIONS_SETTING, SessionsChatTabsMode } from '../../../../../workbench/contrib/sessions/common/sessionConfig.js';
import { SESSION_ACTIVITY_BAR_SETTING, SESSIONS_CHAT_TABS_SETTING, SESSIONS_LIST_GROUP_EXTERNAL_SESSIONS_SETTING, SESSIONS_LIST_SHOW_AUTOMATION_SESSIONS_SETTING, SESSIONS_SIDEBAR_CUSTOMIZATIONS_CATEGORIES_SETTING, SessionsChatTabsMode } from '../../../../../workbench/contrib/sessions/common/sessionConfig.js';
import { CHAT_AUTOMATIONS_ENABLED_SETTING } from '../../../../../workbench/contrib/chat/common/automations/automationsEnabled.js';
import { IAgentWorkbenchLayoutService } from '../../../../browser/workbench.js';
import { AgentWorkbenchLayout, ISessionsHostLayoutService } from '../../../../../workbench/services/sessions/browser/sessionsHostLayoutService.js';
Expand Down Expand Up @@ -94,6 +94,27 @@ suite('SessionsChatAccessibilityHelp', () => {
}, { preview: true, keyboard: true, scrolling: true, secondaryActions: true, states: true });
});

test('documents showing and hiding the other customization categories with More and Less', () => {
const instantiation = store.add(new TestInstantiationService());
const configuration = new TestConfigurationService();
store.add(configuration.onDidChangeConfigurationEmitter);
instantiation.stub(IConfigurationService, configuration);
stubContextKeyService(instantiation, configuration);
instantiation.stub(ISessionsPartService, new class extends mock<ISessionsPartService>() { }());
instantiation.stub(ISessionsService, new class extends mock<ISessionsService>() { }());
instantiation.stub(IAgentHostFilterService, { selectedHost: undefined });
instantiation.stub(IWorkbenchLayoutService, { mainContainer: mainWindow.document.createElement('div') });
instantiation.stub(ISessionsHostLayoutService, {});
const content = store.add(new SessionsChatAccessibilityHelp().getProvider(instantiation)).provideContent();

assert.deepStrictEqual({
more: content.includes('Activate More with Enter or Space to show those categories in place, followed by Less, and move focus to the first category shown.'),
less: content.includes('Activate Less to hide them again and return focus to More.'),
remembered: content.includes('The section remembers which of the two you used last.'),
allCategories: content.includes(`To always show every category, set ${SESSIONS_SIDEBAR_CUSTOMIZATIONS_CATEGORIES_SETTING} to all.`),
}, { more: true, less: true, remembered: true, allCategories: true });
});

for (const { aiDisabled, hidden, htmlEnabled } of [
{ aiDisabled: false, hidden: false, htmlEnabled: true },
{ aiDisabled: true, hidden: false, htmlEnabled: true },
Expand Down
Loading