mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-10-10 03:28:03 +00:00
fix: revert Agent type imports back to Mode
This commit is contained in:
parent
7230211418
commit
8607417707
10 changed files with 10 additions and 10 deletions
|
|
@ -15,7 +15,7 @@ import {
|
||||||
} from "@roo-code/types"
|
} from "@roo-code/types"
|
||||||
import { TelemetryService } from "@roo-code/telemetry"
|
import { TelemetryService } from "@roo-code/telemetry"
|
||||||
|
|
||||||
import { Agent, modes } from "../../shared/modes"
|
import { Mode, modes } from "../../shared/modes"
|
||||||
import { buildApiHandler } from "../../api"
|
import { buildApiHandler } from "../../api"
|
||||||
|
|
||||||
// Type-safe model migrations mapping
|
// Type-safe model migrations mapping
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ import { ModeConfig } from "@roo-code/types"
|
||||||
|
|
||||||
import { SYSTEM_PROMPT } from "../system"
|
import { SYSTEM_PROMPT } from "../system"
|
||||||
import { McpHub } from "../../../services/mcp/McpHub"
|
import { McpHub } from "../../../services/mcp/McpHub"
|
||||||
import { defaultModeSlug, modes, Agent } from "../../../shared/modes"
|
import { defaultModeSlug, modes, Mode } from "../../../shared/modes"
|
||||||
import "../../../utils/path"
|
import "../../../utils/path"
|
||||||
import { addCustomInstructions } from "../sections/custom-instructions"
|
import { addCustomInstructions } from "../sections/custom-instructions"
|
||||||
import { MultiSearchReplaceDiffStrategy } from "../../diff/strategies/multi-search-replace"
|
import { MultiSearchReplaceDiffStrategy } from "../../diff/strategies/multi-search-replace"
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ import { ModeConfig } from "@roo-code/types"
|
||||||
|
|
||||||
import { SYSTEM_PROMPT } from "../system"
|
import { SYSTEM_PROMPT } from "../system"
|
||||||
import { McpHub } from "../../../services/mcp/McpHub"
|
import { McpHub } from "../../../services/mcp/McpHub"
|
||||||
import { defaultModeSlug, modes, Agent } from "../../../shared/modes"
|
import { defaultModeSlug, modes, Mode } from "../../../shared/modes"
|
||||||
import "../../../utils/path"
|
import "../../../utils/path"
|
||||||
import { addCustomInstructions } from "../sections/custom-instructions"
|
import { addCustomInstructions } from "../sections/custom-instructions"
|
||||||
import { MultiSearchReplaceDiffStrategy } from "../../diff/strategies/multi-search-replace"
|
import { MultiSearchReplaceDiffStrategy } from "../../diff/strategies/multi-search-replace"
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ vi.mock("fs/promises")
|
||||||
import type { Mock } from "vitest"
|
import type { Mock } from "vitest"
|
||||||
import path from "path"
|
import path from "path"
|
||||||
import { readFile } from "fs/promises"
|
import { readFile } from "fs/promises"
|
||||||
import type { Agent } from "../../../../shared/modes" // Type-only import
|
import type { Mode } from "../../../../shared/modes" // Type-only import
|
||||||
import { loadSystemPromptFile, PromptVariables } from "../custom-system-prompt"
|
import { loadSystemPromptFile, PromptVariables } from "../custom-system-prompt"
|
||||||
|
|
||||||
// Cast the mocked readFile to the correct Mock type
|
// Cast the mocked readFile to the correct Mock type
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import fs from "fs/promises"
|
import fs from "fs/promises"
|
||||||
import path from "path"
|
import path from "path"
|
||||||
import { Agent } from "../../../shared/modes"
|
import { Mode } from "../../../shared/modes"
|
||||||
import { fileExistsAtPath } from "../../../utils/fs"
|
import { fileExistsAtPath } from "../../../utils/fs"
|
||||||
|
|
||||||
export type PromptVariables = {
|
export type PromptVariables = {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import type { ModeConfig, PromptComponent, CustomModePrompts, TodoItem } from "@
|
||||||
|
|
||||||
import type { SystemPromptSettings } from "./types"
|
import type { SystemPromptSettings } from "./types"
|
||||||
|
|
||||||
import { Agent, modes, defaultModeSlug, getModeBySlug, getGroupName, getModeSelection } from "../../shared/modes"
|
import { Mode, modes, defaultModeSlug, getModeBySlug, getGroupName, getModeSelection } from "../../shared/modes"
|
||||||
import { DiffStrategy } from "../../shared/tools"
|
import { DiffStrategy } from "../../shared/tools"
|
||||||
import { formatLanguage } from "../../shared/language"
|
import { formatLanguage } from "../../shared/language"
|
||||||
import { isEmpty } from "../../utils/object"
|
import { isEmpty } from "../../utils/object"
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import type { ToolName, ModeConfig } from "@roo-code/types"
|
||||||
|
|
||||||
import { TOOL_GROUPS, ALWAYS_AVAILABLE_TOOLS, DiffStrategy } from "../../../shared/tools"
|
import { TOOL_GROUPS, ALWAYS_AVAILABLE_TOOLS, DiffStrategy } from "../../../shared/tools"
|
||||||
import { McpHub } from "../../../services/mcp/McpHub"
|
import { McpHub } from "../../../services/mcp/McpHub"
|
||||||
import { Agent, getModeConfig, isToolAllowedForMode, getGroupName } from "../../../shared/modes"
|
import { Mode, getModeConfig, isToolAllowedForMode, getGroupName } from "../../../shared/modes"
|
||||||
|
|
||||||
import { ToolArgs } from "./types"
|
import { ToolArgs } from "./types"
|
||||||
import { getExecuteCommandDescription } from "./execute-command"
|
import { getExecuteCommandDescription } from "./execute-command"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import type { ToolName, ModeConfig } from "@roo-code/types"
|
import type { ToolName, ModeConfig } from "@roo-code/types"
|
||||||
import { toolNames as validToolNames } from "@roo-code/types"
|
import { toolNames as validToolNames } from "@roo-code/types"
|
||||||
|
|
||||||
import { Agent, isToolAllowedForMode } from "../../shared/modes"
|
import { Mode, isToolAllowedForMode } from "../../shared/modes"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if a tool name is a valid, known tool.
|
* Checks if a tool name is a valid, known tool.
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ import { findLast } from "../../shared/array"
|
||||||
import { supportPrompt } from "../../shared/support-prompt"
|
import { supportPrompt } from "../../shared/support-prompt"
|
||||||
import { GlobalFileNames } from "../../shared/globalFileNames"
|
import { GlobalFileNames } from "../../shared/globalFileNames"
|
||||||
import type { ExtensionMessage, ExtensionState, MarketplaceInstalledMetadata } from "../../shared/ExtensionMessage"
|
import type { ExtensionMessage, ExtensionState, MarketplaceInstalledMetadata } from "../../shared/ExtensionMessage"
|
||||||
import { Agent, defaultModeSlug, getModeBySlug } from "../../shared/modes"
|
import { Mode, defaultModeSlug, getModeBySlug } from "../../shared/modes"
|
||||||
import { experimentDefault } from "../../shared/experiments"
|
import { experimentDefault } from "../../shared/experiments"
|
||||||
import { formatLanguage } from "../../shared/language"
|
import { formatLanguage } from "../../shared/language"
|
||||||
import { WebviewMessage } from "../../shared/WebviewMessage"
|
import { WebviewMessage } from "../../shared/WebviewMessage"
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ import { getOpenAiModels } from "../../api/providers/openai"
|
||||||
import { getVsCodeLmModels } from "../../api/providers/vscode-lm"
|
import { getVsCodeLmModels } from "../../api/providers/vscode-lm"
|
||||||
import { openMention } from "../mentions"
|
import { openMention } from "../mentions"
|
||||||
import { getWorkspacePath } from "../../utils/path"
|
import { getWorkspacePath } from "../../utils/path"
|
||||||
import { Agent, defaultModeSlug } from "../../shared/modes"
|
import { Mode, defaultModeSlug } from "../../shared/modes"
|
||||||
import { getModels, flushModels } from "../../api/providers/fetchers/modelCache"
|
import { getModels, flushModels } from "../../api/providers/fetchers/modelCache"
|
||||||
import { GetModelsOptions } from "../../shared/api"
|
import { GetModelsOptions } from "../../shared/api"
|
||||||
import { generateSystemPrompt } from "./generateSystemPrompt"
|
import { generateSystemPrompt } from "./generateSystemPrompt"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue