ide на основе vs code
Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
--- description: Architecture documentation for VS Code AI Customization view. Use when working in src/vs/workbench/contrib/chat/browser/aiCustomization applyTo: 'src/vs/workbench/contrib/chat/browser/aiCustomization/**' ---
The AI Customization view provides a unified view for discovering and managing AI customization 'artifacts' (customizations that augment LLM prompts or behavior).
Examples of these include: Custom Agents, Skills, Instructions, and Prompts. It surfaces prompt files that are typically hidden in .github/ folders, user data directories, workspace settings, or exposed via extensions.
The view displays a hierarchical tree structure:
AI Customization (View Container)
└── AI Customization (Tree View)
├── Custom Agents (.agent.md files)
│ ├── Workspace
│ │ └── agent files...
│ ├── User
│ │ └── agent files...
│ └── Extensions
│ └── agent files...
├── Skills (SKILL.md files)
│ └── (same storage structure)
├── Instructions (.instructions.md files)
│ └── (same storage structure)
└── Prompts (.prompt.md files)
└── (same storage structure)Key Features:
All files are located in src/vs/workbench/contrib/chat/browser/aiCustomization/:
aiCustomization/
├── aiCustomization.ts # Constants, IDs, and MenuIds
├── aiCustomization.contribution.ts # View registration and actions
├── aiCustomizationViews.ts # Tree view pane implementation
├── aiCustomizationIcons.ts # Icon registrations
└── media/
└── aiCustomization.css # StylingAI_CUSTOMIZATION_VIEWLET_ID: View container ID for sidebarAI_CUSTOMIZATION_VIEW_ID: Unified tree view IDAI_CUSTOMIZATION_STORAGE_ID: State persistence keyAICustomizationItemMenuId: Context menu IDAICustomizationNewMenuId: New item submenu IDRegister sidebar container with:
mergeViewWithContainerWhenSingleView: truewhen: ChatContextKeys.enabled (respects AI disable setting)Register single unified tree view:
AICustomizationViewPaneChatContextKeys.enabledShows markdown links to create new items when tree is empty.
New Item Dropdown - Submenu in view title:
Refresh - ViewAction that calls view.refresh()
Collapse All - ViewAction that calls view.collapseAll()
All actions use ViewAction<AICustomizationViewPane> pattern and are gated by when: view === AI_CUSTOMIZATION_VIEW_ID.
Discriminated union with type field:
ROOT_ELEMENT - Symbol marker for type-safe root
IAICustomizationTypeItem (type: 'category')
IAICustomizationGroupItem (type: 'group')
IAICustomizationFileItem (type: 'file')
UnifiedAICustomizationDataSource implements IAsyncDataSource:
getChildren logic:
promptsService.listPromptFilesForStorage() or findAgentSkills()Skills special handling: Uses findAgentSkills() to get names from frontmatter instead of filenames
Three specialized renderers for category/group/file items:
AICustomizationViewPane extends ViewPane:
Injected services:
Initialization: 1. Subscribe to onDidChangeCustomAgents and onDidChangeSlashCommands events 2. Create WorkbenchAsyncDataTree with 3 renderers and data source 3. Register handlers: onDidOpen (double-click) → open file, onContextMenu → show menu 4. Set input to ROOT_ELEMENT and auto-expand categories
Auto-expansion:
Public API:
refresh() - Reload tree and re-expand categoriescollapseAll() - Collapse all nodesexpandAll() - Expand all nodesMenu ID: AICustomizationItemMenuId
Actions:
URI handling: Actions must handle both URI objects and serialized strings
URI.isUri(context) firstURI.parse()Context passing:
{ uri: string, name: string, promptType: PromptsType }shouldForwardArgs: true in getMenuActionsThemed icons using registerIcon(id, codicon, label):
View/Types:
Storage:
Layout: Full height view and tree container
Tree items: Flex layout with 16px icon + text, ellipsis overflow
Categories: Bold font-weight
Groups: Uppercase, small font (11px), letter-spacing, descriptionForeground color
IPromptsService:
listPromptFilesForStorage(type, storage) - Get files for a type/storage combofindAgentSkills() - Get skills with names parsed from frontmatteronDidChangeCustomAgents - Refresh on agent changesonDidChangeSlashCommands - Refresh on command changesPromptsType enum: instructions | prompt | agent | skill
PromptsStorage enum: local (workspace) | user | extension
AI Feature Gating: View gated by ChatContextKeys.enabled (respects chat.disableAIFeatures setting)
Registration: Import ./aiCustomization/aiCustomization.contribution.js in chat.contribution.ts
---
*Update this file when making architectural changes to the AI Customization view.*