mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-21 21:01:06 -05:00
Add a screen for custom prompts
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { architectMode } from "./modes"
|
||||
import { architectMode, defaultPrompts } from "../../shared/modes"
|
||||
import { getToolDescriptionsForMode } from "./tools"
|
||||
import {
|
||||
getRulesSection,
|
||||
@@ -20,7 +20,8 @@ export const ARCHITECT_PROMPT = async (
|
||||
mcpHub?: McpHub,
|
||||
diffStrategy?: DiffStrategy,
|
||||
browserViewportSize?: string,
|
||||
) => `You are Cline, a software architecture expert specializing in analyzing codebases, identifying patterns, and providing high-level technical guidance. You excel at understanding complex systems, evaluating architectural decisions, and suggesting improvements while maintaining a read-only approach to the codebase. Make sure to help the user come up with a solid implementation plan for their project and don't rush to switch to implementing code.
|
||||
customPrompt?: string,
|
||||
) => `${customPrompt || defaultPrompts[architectMode]}
|
||||
|
||||
${getSharedToolUseSection()}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Mode, askMode } from "./modes"
|
||||
import { Mode, askMode, defaultPrompts } from "../../shared/modes"
|
||||
import { getToolDescriptionsForMode } from "./tools"
|
||||
import {
|
||||
getRulesSection,
|
||||
@@ -21,7 +21,8 @@ export const ASK_PROMPT = async (
|
||||
mcpHub?: McpHub,
|
||||
diffStrategy?: DiffStrategy,
|
||||
browserViewportSize?: string,
|
||||
) => `You are Cline, a knowledgeable technical assistant focused on answering questions and providing information about software development, technology, and related topics. You can analyze code, explain concepts, and access external resources while maintaining a read-only approach to the codebase. Make sure to answer the user's questions and don't rush to switch to implementing code.
|
||||
customPrompt?: string,
|
||||
) => `${customPrompt || defaultPrompts[askMode]}
|
||||
|
||||
${getSharedToolUseSection()}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Mode, codeMode } from "./modes"
|
||||
import { Mode, codeMode, defaultPrompts } from "../../shared/modes"
|
||||
import { getToolDescriptionsForMode } from "./tools"
|
||||
import {
|
||||
getRulesSection,
|
||||
@@ -21,7 +21,8 @@ export const CODE_PROMPT = async (
|
||||
mcpHub?: McpHub,
|
||||
diffStrategy?: DiffStrategy,
|
||||
browserViewportSize?: string,
|
||||
) => `You are Cline, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.
|
||||
customPrompt?: string,
|
||||
) => `${customPrompt || defaultPrompts[codeMode]}
|
||||
|
||||
${getSharedToolUseSection()}
|
||||
|
||||
|
||||
@@ -63,15 +63,16 @@ export const SYSTEM_PROMPT = async (
|
||||
mcpHub?: McpHub,
|
||||
diffStrategy?: DiffStrategy,
|
||||
browserViewportSize?: string,
|
||||
mode: Mode = codeMode,
|
||||
mode: Mode = codeMode,
|
||||
customPrompts?: { ask?: string; code?: string; architect?: string; enhance?: string },
|
||||
) => {
|
||||
switch (mode) {
|
||||
case architectMode:
|
||||
return ARCHITECT_PROMPT(cwd, supportsComputerUse, mcpHub, diffStrategy, browserViewportSize)
|
||||
return ARCHITECT_PROMPT(cwd, supportsComputerUse, mcpHub, diffStrategy, browserViewportSize, customPrompts?.architect)
|
||||
case askMode:
|
||||
return ASK_PROMPT(cwd, supportsComputerUse, mcpHub, diffStrategy, browserViewportSize)
|
||||
return ASK_PROMPT(cwd, supportsComputerUse, mcpHub, diffStrategy, browserViewportSize, customPrompts?.ask)
|
||||
default:
|
||||
return CODE_PROMPT(cwd, supportsComputerUse, mcpHub, diffStrategy, browserViewportSize)
|
||||
return CODE_PROMPT(cwd, supportsComputerUse, mcpHub, diffStrategy, browserViewportSize, customPrompts?.code)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user