mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-10-08 03:07:53 +00:00
fix: fix remaining Agent type references
This commit is contained in:
parent
8607417707
commit
e1732d4af5
3 changed files with 9 additions and 9 deletions
|
|
@ -97,7 +97,7 @@ __setMockImplementation(
|
|||
|
||||
// Add mode-specific instructions after
|
||||
if (modeCustomInstructions?.trim()) {
|
||||
sections.push(`Agent-specific Instructions:\n${modeCustomInstructions}`)
|
||||
sections.push(`Mode-specific Instructions:\n${modeCustomInstructions}`)
|
||||
}
|
||||
|
||||
// Add rules
|
||||
|
|
@ -486,7 +486,7 @@ describe("SYSTEM_PROMPT", () => {
|
|||
const customModes: ModeConfig[] = [
|
||||
{
|
||||
slug: "custom-mode",
|
||||
name: "Custom Agent",
|
||||
name: "Custom Mode",
|
||||
roleDefinition: "Custom role definition",
|
||||
customInstructions: modeCustomInstructions,
|
||||
groups: ["read"] as const,
|
||||
|
|
@ -538,7 +538,7 @@ describe("SYSTEM_PROMPT", () => {
|
|||
undefined, // mcpHub
|
||||
undefined, // diffStrategy
|
||||
undefined, // browserViewportSize
|
||||
defaultModeSlug as Agent, // mode
|
||||
defaultModeSlug as Mode, // mode
|
||||
customModePrompts, // customModePrompts
|
||||
undefined, // customModes
|
||||
undefined, // globalCustomInstructions
|
||||
|
|
@ -571,7 +571,7 @@ describe("SYSTEM_PROMPT", () => {
|
|||
undefined, // mcpHub
|
||||
undefined, // diffStrategy
|
||||
undefined, // browserViewportSize
|
||||
defaultModeSlug as Agent, // mode
|
||||
defaultModeSlug as Mode, // mode
|
||||
customModePrompts, // customModePrompts
|
||||
undefined, // customModes
|
||||
undefined, // globalCustomInstructions
|
||||
|
|
@ -618,7 +618,7 @@ describe("SYSTEM_PROMPT", () => {
|
|||
|
||||
// Should not contain the tool description
|
||||
expect(prompt).not.toContain("## update_todo_list")
|
||||
// Agent instructions will still reference the tool with a fallback to markdown
|
||||
// Mode instructions will still reference the tool with a fallback to markdown
|
||||
})
|
||||
|
||||
it("should include update_todo_list tool when todoListEnabled is true", async () => {
|
||||
|
|
|
|||
|
|
@ -870,9 +870,9 @@ export class ClineProvider
|
|||
const modeExists = getModeBySlug(historyItem.mode, customModes) !== undefined
|
||||
|
||||
if (!modeExists) {
|
||||
// Agent no longer exists, fall back to default mode.
|
||||
// Mode no longer exists, fall back to default mode.
|
||||
this.log(
|
||||
`Agent '${historyItem.mode}' from history no longer exists. Falling back to default mode '${defaultModeSlug}'.`,
|
||||
`Mode '${historyItem.mode}' from history no longer exists. Falling back to default mode '${defaultModeSlug}'.`,
|
||||
)
|
||||
historyItem.mode = defaultModeSlug
|
||||
}
|
||||
|
|
@ -2269,7 +2269,7 @@ export class ClineProvider
|
|||
currentApiConfigName: stateValues.currentApiConfigName ?? "default",
|
||||
listApiConfigMeta: stateValues.listApiConfigMeta ?? [],
|
||||
pinnedApiConfigs: stateValues.pinnedApiConfigs ?? {},
|
||||
modeApiConfigs: stateValues.modeApiConfigs ?? ({} as Record<Agent, string>),
|
||||
modeApiConfigs: stateValues.modeApiConfigs ?? ({} as Record<Mode, string>),
|
||||
customModePrompts: stateValues.customModePrompts ?? {},
|
||||
customSupportPrompts: stateValues.customSupportPrompts ?? {},
|
||||
enhancementApiConfigId: stateValues.enhancementApiConfigId,
|
||||
|
|
|
|||
|
|
@ -1479,7 +1479,7 @@ export const webviewMessageHandler = async (
|
|||
break
|
||||
|
||||
case "mode":
|
||||
await provider.handleModeSwitch(message.text as Agent)
|
||||
await provider.handleModeSwitch(message.text as Mode)
|
||||
break
|
||||
case "updatePrompt":
|
||||
if (message.promptMode && message.customPrompt !== undefined) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue