mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-21 21:01:06 -05:00
Refactor to support more sections in the future
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { architectMode, defaultPrompts } from "../../shared/modes"
|
||||
import { architectMode, defaultPrompts, PromptComponent } from "../../shared/modes"
|
||||
import { getToolDescriptionsForMode } from "./tools"
|
||||
import {
|
||||
getRulesSection,
|
||||
@@ -20,8 +20,8 @@ export const ARCHITECT_PROMPT = async (
|
||||
mcpHub?: McpHub,
|
||||
diffStrategy?: DiffStrategy,
|
||||
browserViewportSize?: string,
|
||||
customPrompt?: string,
|
||||
) => `${customPrompt || defaultPrompts[architectMode]}
|
||||
customPrompt?: PromptComponent,
|
||||
) => `${customPrompt?.roleDefinition || defaultPrompts[architectMode].roleDefinition}
|
||||
|
||||
${getSharedToolUseSection()}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Mode, askMode, defaultPrompts } from "../../shared/modes"
|
||||
import { Mode, askMode, defaultPrompts, PromptComponent } from "../../shared/modes"
|
||||
import { getToolDescriptionsForMode } from "./tools"
|
||||
import {
|
||||
getRulesSection,
|
||||
@@ -21,8 +21,8 @@ export const ASK_PROMPT = async (
|
||||
mcpHub?: McpHub,
|
||||
diffStrategy?: DiffStrategy,
|
||||
browserViewportSize?: string,
|
||||
customPrompt?: string,
|
||||
) => `${customPrompt || defaultPrompts[askMode]}
|
||||
customPrompt?: PromptComponent,
|
||||
) => `${customPrompt?.roleDefinition || defaultPrompts[askMode].roleDefinition}
|
||||
|
||||
${getSharedToolUseSection()}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Mode, codeMode, defaultPrompts } from "../../shared/modes"
|
||||
import { Mode, codeMode, defaultPrompts, PromptComponent } from "../../shared/modes"
|
||||
import { getToolDescriptionsForMode } from "./tools"
|
||||
import {
|
||||
getRulesSection,
|
||||
@@ -21,8 +21,8 @@ export const CODE_PROMPT = async (
|
||||
mcpHub?: McpHub,
|
||||
diffStrategy?: DiffStrategy,
|
||||
browserViewportSize?: string,
|
||||
customPrompt?: string,
|
||||
) => `${customPrompt || defaultPrompts[codeMode]}
|
||||
customPrompt?: PromptComponent,
|
||||
) => `${customPrompt?.roleDefinition || defaultPrompts[codeMode].roleDefinition}
|
||||
|
||||
${getSharedToolUseSection()}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import { CODE_PROMPT } from "./code"
|
||||
import { ARCHITECT_PROMPT } from "./architect"
|
||||
import { ASK_PROMPT } from "./ask"
|
||||
import { Mode, codeMode, architectMode, askMode } from "./modes"
|
||||
import { CustomPrompts } from "../../shared/modes"
|
||||
import fs from 'fs/promises'
|
||||
import path from 'path'
|
||||
|
||||
@@ -64,7 +65,7 @@ export const SYSTEM_PROMPT = async (
|
||||
diffStrategy?: DiffStrategy,
|
||||
browserViewportSize?: string,
|
||||
mode: Mode = codeMode,
|
||||
customPrompts?: { ask?: string; code?: string; architect?: string; enhance?: string },
|
||||
customPrompts?: CustomPrompts,
|
||||
) => {
|
||||
switch (mode) {
|
||||
case architectMode:
|
||||
|
||||
Reference in New Issue
Block a user