mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-22 13:21:07 -05:00
Chat modes
This commit is contained in:
@@ -4,6 +4,7 @@ import { ApiConfiguration, ApiProvider, ModelInfo } from "./api"
|
||||
import { HistoryItem } from "./HistoryItem"
|
||||
import { McpServer } from "./mcp"
|
||||
import { GitCommit } from "../utils/git"
|
||||
import { Mode } from "../core/prompts/types"
|
||||
|
||||
// webview will hold state
|
||||
export interface ExtensionMessage {
|
||||
@@ -47,6 +48,7 @@ export interface ExtensionMessage {
|
||||
}
|
||||
|
||||
export interface ApiConfigMeta {
|
||||
id: string
|
||||
name: string
|
||||
apiProvider?: ApiProvider
|
||||
}
|
||||
@@ -79,6 +81,8 @@ export interface ExtensionState {
|
||||
writeDelayMs: number
|
||||
terminalOutputLineLimit?: number
|
||||
mcpEnabled: boolean
|
||||
mode: Mode
|
||||
modeApiConfigs?: Record<Mode, string>;
|
||||
}
|
||||
|
||||
export interface ClineMessage {
|
||||
|
||||
@@ -61,6 +61,7 @@ export interface WebviewMessage {
|
||||
| "alwaysApproveResubmit"
|
||||
| "requestDelaySeconds"
|
||||
| "setApiConfigPassword"
|
||||
| "mode"
|
||||
text?: string
|
||||
disabled?: boolean
|
||||
askResponse?: ClineAskResponse
|
||||
|
||||
@@ -51,6 +51,7 @@ export interface ApiHandlerOptions {
|
||||
|
||||
export type ApiConfiguration = ApiHandlerOptions & {
|
||||
apiProvider?: ApiProvider
|
||||
id?: string // stable unique identifier
|
||||
}
|
||||
|
||||
// Models
|
||||
|
||||
5
src/shared/modes.ts
Normal file
5
src/shared/modes.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export const codeMode = 'code' as const;
|
||||
export const architectMode = 'architect' as const;
|
||||
export const askMode = 'ask' as const;
|
||||
|
||||
export type Mode = typeof codeMode | typeof architectMode | typeof askMode;
|
||||
Reference in New Issue
Block a user