-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Feat: Workflow tool allows Kilo to run slash commands autonomously (rebased) #4935
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
YuriNachos
wants to merge
8
commits into
Kilo-Org:main
Choose a base branch
from
YuriNachos:feat-workflow-tool-for-AI-commands
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feat: Workflow tool allows Kilo to run slash commands autonomously (rebased) #4935
YuriNachos
wants to merge
8
commits into
Kilo-Org:main
from
YuriNachos:feat-workflow-tool-for-AI-commands
+2,396
−268
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Implements the execute_workflow tool enabling AI assistants to discover and execute slash command workflows stored in .kilocode/workflows/ without manual file reading. This resolves a critical limitation where workflows couldn't be properly utilized, forcing users to work around the system. What Changed Backend Infrastructure: New workflow service (src/services/workflow/workflows.ts) - Discovers and manages workflows from .kilocode/workflows/ with support for project-level and global workflows Workflow execution tool (src/core/tools/RunSlashCommandTool.ts) - Handles workflow discovery, parameter passing, approval flow, and execution with comprehensive error handling Tool description (src/core/prompts/tools/native-tools/run_slash_command.ts) - Defines tool interface for AI models with clear usage examples Experiment flag integration - Feature gated behind runSlashCommand experiment flag for gradual rollout UI Components: Extended SlashCommandItem component - Added workflow execution mode to existing component (avoiding duplication) Chat integration (ChatRow.tsx) - Displays workflow execution requests and results inline Workflow execution display - Shows workflow name, description, source badges (project/global/built-in), and optional arguments with expand/collapse support Testing: 22 comprehensive UI tests covering both command list and workflow execution modes Backend unit tests for workflow service and execution tool Integration tests ensuring proper message routing and display Why This Matters Before this change, AI assistants had to read workflow files directly to utilize them, defeating their purpose as reusable templates. Now workflows are first-class citizens with proper discovery, validation, and execution support. Key Features Automatic discovery - List available workflows without file system access Parameter support - Pass arguments to customize workflow execution Source tracking - Distinguish between project, global, and built-in workflows Approval flow - User approval required before workflow execution Error handling - Graceful handling of missing workflows and invalid parameters Experiment flag - Safe rollout behind runSlashCommand feature flag Implementation Highlights Smart architectural decision to extend existing SlashCommandItem component rather than create duplicate infrastructure, maintaining code reusability while adding workflow-specific functionality. All Kilo Code-specific changes marked with kilocode_change comments for future upstream merge compatibility. Testing All tests pass successfully: ✅ 22 SlashCommandItem tests (command list + workflow execution modes) ✅ 3 ChatRow integration tests ✅ Backend service and tool tests ✅ Type safety verified throughout
Changed translation key from RUN_SLASH_COMMAND to AUTO_EXECUTE_WORKFLOW to match experiment constant. Updated name from "Enable model-initiated slash commands" to "Enable workflow access" and description to better reflect the feature's actual behavior of accessing workflow content without approval. - Updated 18 locale files (en, ar, ko, hi, fr, tr, pl, cs, pt-BR, zh-TW, ja, nl, id, vi, uk, es, de, th, zh-CN, it) - Created changeset for release notes
- Fix experiment configuration passing in getWorkflowsForEnvironment - Enable WORKFLOW_DISCOVERY experiment by default - Use Experiments.isEnabled helper for proper fallback to defaults - This allows workflows to appear in environment details that AI agent sees
…ven when auto-execute is enabled
…ven when auto-execute is enabled
- Filter WORKFLOW_DISCOVERY from experimental settings UI - Update getWorkflowsForEnvironment to use AUTO_EXECUTE_WORKFLOW instead - Remove WORKFLOW_DISCOVERY from experiment definitions - Remove WORKFLOW_DISCOVERY from experiment type definitions - Update tests accordingly
🦋 Changeset detectedLatest commit: 1199488 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Ari4ka
approved these changes
Jan 11, 2026
Collaborator
|
Thank you! We're actually working on integrating more with upstream again with this so we're waiting for that first but I'll review after that was released! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a rebased version of #4760 from @James-Cherished, updated to work with the latest main branch.
Changes:
Closes #4760