mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
Add CRITICAL_COMMAND_RESTRICTIONS and MAIN_BRANCH_PROTECTION to generalTask prompt (#221)
- Import CRITICAL_COMMAND_RESTRICTIONS and MAIN_BRANCH_PROTECTION from promptConstants - Update processGeneralTask prompt to include safety restrictions - Align generalTask behavior with fixGitHubIssue implementation - Prevents execution of dangerous long-running or interactive commands - Enforces proper git branching practices Addresses Slack mention request to add restrictions to generalTask prompt.
This commit is contained in:
parent
12185d08a4
commit
bf391cda66
1 changed files with 9 additions and 1 deletions
|
|
@ -1,6 +1,10 @@
|
|||
import type { JobPayload } from '@roo-code-cloud/db';
|
||||
|
||||
import { runTask, type RunTaskCallbacks } from '../runTask';
|
||||
import {
|
||||
CRITICAL_COMMAND_RESTRICTIONS,
|
||||
MAIN_BRANCH_PROTECTION,
|
||||
} from '../promptConstants';
|
||||
|
||||
export async function processGeneralTask(
|
||||
jobPayload: JobPayload<'general.task'>,
|
||||
|
|
@ -17,8 +21,12 @@ export async function processGeneralTask(
|
|||
Repository: ${jobPayload.repo}
|
||||
Task: ${jobPayload.description}
|
||||
|
||||
${CRITICAL_COMMAND_RESTRICTIONS}
|
||||
|
||||
${MAIN_BRANCH_PROTECTION}
|
||||
|
||||
Please complete this task and create a pull request with your changes when finished.
|
||||
`;
|
||||
`.trim();
|
||||
|
||||
const result = await runTask({
|
||||
jobType: 'general.task',
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue