mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-21 21:01:06 -05:00
Add Kodu provider
This commit is contained in:
@@ -2,13 +2,17 @@
|
||||
|
||||
import { ApiConfiguration } from "./api"
|
||||
import { HistoryItem } from "./HistoryItem"
|
||||
import { MaestroUser } from "./maestro"
|
||||
|
||||
// webview will hold state
|
||||
export interface ExtensionMessage {
|
||||
type: "action" | "state" | "selectedImages"
|
||||
text?: string
|
||||
action?: "chatButtonTapped" | "settingsButtonTapped" | "historyButtonTapped" | "didBecomeVisible"
|
||||
action?:
|
||||
| "chatButtonTapped"
|
||||
| "settingsButtonTapped"
|
||||
| "historyButtonTapped"
|
||||
| "didBecomeVisible"
|
||||
| "koduCreditsFetched"
|
||||
state?: ExtensionState
|
||||
images?: string[]
|
||||
}
|
||||
@@ -22,7 +26,7 @@ export interface ExtensionState {
|
||||
claudeMessages: ClaudeMessage[]
|
||||
taskHistory: HistoryItem[]
|
||||
shouldShowAnnouncement: boolean
|
||||
maestroUser?: MaestroUser
|
||||
koduCredits?: number
|
||||
}
|
||||
|
||||
export interface ClaudeMessage {
|
||||
|
||||
@@ -15,8 +15,10 @@ export interface WebviewMessage {
|
||||
| "showTaskWithId"
|
||||
| "deleteTaskWithId"
|
||||
| "exportTaskWithId"
|
||||
| "didClickMaestroSignIn"
|
||||
| "didClickMaestroSignOut"
|
||||
| "didClickKoduSignIn"
|
||||
| "didClickKoduSignOut"
|
||||
| "didClickKoduAddCredits"
|
||||
| "fetchKoduCredits"
|
||||
text?: string
|
||||
askResponse?: ClaudeAskResponse
|
||||
apiConfiguration?: ApiConfiguration
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export type ApiProvider = "anthropic" | "openrouter" | "bedrock" | "maestro"
|
||||
export type ApiProvider = "anthropic" | "openrouter" | "bedrock" | "kodu"
|
||||
|
||||
export interface ApiHandlerOptions {
|
||||
apiModelId?: ApiModelId
|
||||
@@ -7,7 +7,8 @@ export interface ApiHandlerOptions {
|
||||
awsAccessKey?: string
|
||||
awsSecretKey?: string
|
||||
awsRegion?: string
|
||||
maestroToken?: string
|
||||
koduApiKey?: string
|
||||
koduEmail?: string
|
||||
}
|
||||
|
||||
export type ApiConfiguration = ApiHandlerOptions & {
|
||||
@@ -234,9 +235,9 @@ export const openRouterModels = {
|
||||
// },
|
||||
} as const satisfies Record<string, ModelInfo>
|
||||
|
||||
// Maestro
|
||||
export type MaestroModelId = keyof typeof maestroModels
|
||||
export const maestroDefaultModelId: MaestroModelId = "claude-3-5-sonnet-20240620"
|
||||
export const maestroModels = {
|
||||
// Kodu
|
||||
export type KoduModelId = keyof typeof koduModels
|
||||
export const koduDefaultModelId: KoduModelId = "claude-3-5-sonnet-20240620"
|
||||
export const koduModels = {
|
||||
...anthropicModels,
|
||||
} as const satisfies Record<string, ModelInfo>
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
import { z } from "zod"
|
||||
|
||||
export const MaestroUserSchema = z.object({
|
||||
id: z.string(),
|
||||
image: z.string().nullable(),
|
||||
email: z.string().email(),
|
||||
name: z.string().nullable(),
|
||||
emailVerified: z.coerce.date().nullable(),
|
||||
})
|
||||
export type MaestroUser = z.infer<typeof MaestroUserSchema>
|
||||
Reference in New Issue
Block a user