VSIDE and File Conventions
Configure Visual Studio Code for optimal ProActions development with schema validation, auto-completion, and proper file organization.
File Naming Conventions
ProActions uses specific file naming conventions to enable automatic schema validation and better organization. These conventions are registered at schemastore.org for automatic IDE support.
Supported File Types
| File Type | Description | Used For |
|---|---|---|
.ai-kit.yaml | Main configuration file | Primary ProActions configuration |
.ai-kit.services.yaml | Services configuration | Service definitions (HUB, DEEPL, etc.) |
.ai-kit.menu.yaml | Menu configuration | SLASH_MENU, ONECLICK_MENU |
.ai-kit.section.yaml | Section configuration | Individual sections in SECTIONS array |
.ai-kit.template.yaml | Template configuration | Reusable step templates |
.ai-kit.action.yaml | Single action configuration | Individual action steps |
.ai-kit.step.yaml | Step configuration | Individual workflow steps |
Example File Structure
/SysConfig/
├── pro-actions.ai-kit.yaml # Main configuration
└── ProActions/
├── services.ai-kit.services.yaml # Service definitions
├── oneclick.ai-kit.menu.yaml # Oneclick menu
├── slash.ai-kit.menu.yaml # Slash command menu
└── sections/
├── headlines.ai-kit.section.yaml
├── translation.ai-kit.section.yaml
└── content.ai-kit.section.yaml
VS Code Configuration
Install Required Extension
First, install the YAML extension by Red Hat:
- Open VS Code
- Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
- Search for "YAML" by Red Hat
- Click Install
Configure YAML Settings
Create or update .vscode/settings.json in your workspace:
{
"yaml.customTags": ["!include scalar"],
"yaml.schemas": {
"https://raw.githubusercontent.com/em-al-wi/proactions-schema/main/schema/ai-kit.schema.json": [
"*.ai-kit.yaml",
"*.ai-kit.yaml*"
],
"https://raw.githubusercontent.com/em-al-wi/proactions-schema/main/schema/partial-services.schema.json": [
"*.ai-kit.serv.yaml",
"*.ai-kit.serv.yaml*",
"*.ai-kit.services.yaml",
"*.ai-kit.services.yaml*"
],
"https://raw.githubusercontent.com/em-al-wi/proactions-schema/main/schema/partial-floatingMenu.schema.json": [
"*.ai-kit.menu.yaml",
"*.ai-kit.menu.yaml*"
],
"https://raw.githubusercontent.com/em-al-wi/proactions-schema/main/schema/partial-templates.schema.json": [
"*.ai-kit.templ.yaml",
"*.ai-kit.templ.yaml*",
"*.ai-kit.template.yaml",
"*.ai-kit.template.yaml*"
],
"https://raw.githubusercontent.com/em-al-wi/proactions-schema/main/schema/partial-section.schema.json": [
"*.ai-kit.sect.yaml",
"*.ai-kit.sect.yaml*",
"*.ai-kit.section.yaml",
"*.ai-kit.section.yaml*"
],
"https://raw.githubusercontent.com/em-al-wi/proactions-schema/main/schema/partial-action.schema.json": [
"*.ai-kit.action.yaml",
"*.ai-kit.action.yaml*"
],
"https://raw.githubusercontent.com/em-al-wi/proactions-schema/main/schema/partial-step.schema.json": [
"*.ai-kit.step.yaml",
"*.ai-kit.step.yaml*"
]
}
}
Configuration Explanation
yaml.customTags
- Enables support for the
!includedirective used in ProActions YAML files - Required for modular configuration files
yaml.schemas
- Maps schema URLs to file patterns
- Provides validation and auto-completion for each file type
- Supports wildcard patterns (e.g.,
*.ai-kit.yaml*matchestest.ai-kit.yaml~backup)
Benefits of This Setup
Schema Validation
- Real-time error detection in YAML files
- Validates step names, parameters, and configuration structure
- Prevents common configuration mistakes
Auto-Completion
- IntelliSense for step names
- Parameter suggestions with descriptions
- Enum value completion for known options
Documentation on Hover
- Hover over steps to see their documentation
- View parameter descriptions
- Quick reference without leaving the editor
Splitting Configuration Files
The file naming conventions enable clean configuration splitting using !include:
Main Configuration
# pro-actions.ai-kit.yaml
AI_KIT:
# Service Definitions
SERVICES: !include /SysConfig/ProActions/services.ai-kit.services.yaml
# Menu Configurations
SLASH_MENU: !include /SysConfig/ProActions/slash.ai-kit.menu.yaml
# Sections
SECTIONS:
- !include /SysConfig/ProActions/sections/headlines.ai-kit.section.yaml
- !include /SysConfig/ProActions/sections/translation.ai-kit.section.yaml
Service Configuration
# services.ai-kit.services.yaml
HUB:
endpoint: "{BASE_URL}/swing/proactions"
target: openai
defaultBehavior: You are a helpful assistant.
DEEPL:
endpoint: /swing/proactions/proxy/forward/deepl
Menu Configuration
# text.ai-kit.menu.yaml
story:
items:
- type: 'button'
icon: 'fa fa-redo'
title: 'Rewrite'
flowRef: 'rephraseSelection'
- type: 'button'
icon: 'fa fa-compress'
title: 'Shorten'
flowRef: 'shortenSelection'
Section Configuration
# sections/headlines.ai-kit.section.yaml
section: Headlines
keywords: 'headline title'
actions:
- title: 'Suggest Headlines'
flow:
- step: HUB_COMPLETION
behavior: "Generate creative headlines"
instruction: "Based on: {textContent}"
response_format: 'list'
- step: USER_SELECT
promptText: 'Choose a headline:'
- step: REPLACE_TEXT
at: XPATH
xpath: "/doc/story/grouphead/headline/p"
Best Practices
File Organization
- Keep main config minimal - Use it only for top-level structure and includes
- Group by functionality - One section per file
- Use descriptive names -
headlines.ai-kit.section.yamlnotsect1.yaml - Organize in folders - Group related sections in subdirectories
Naming Conventions
- Be consistent - Always use the correct file suffix
- Use lowercase - File names should be lowercase with hyphens
- Be descriptive - Names should clearly indicate the file's purpose
- Avoid spaces - Use hyphens instead of spaces in file names
Troubleshooting
Schema Not Working
Problem: No auto-completion or validation
Solutions:
- Check YAML extension is installed and enabled
- Verify
.vscode/settings.jsonis in the workspace root - Reload VS Code window (Cmd/Ctrl+Shift+P → "Reload Window")
- Check file naming matches the patterns exactly
!include Not Recognized
Problem: VS Code shows errors for !include directive
Solution:
Add "yaml.customTags": ["!include scalar"] to settings
Schema Outdated
Problem: Schema doesn't reflect latest steps
Solution: The schema is automatically updated when ProActions is released. If you need the absolute latest:
- Check proactions-schema repository
- Clear VS Code's schema cache (Cmd/Ctrl+Shift+P → "Clear Editor History")
- Reload the window