mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-21 21:01:06 -05:00
Add Maestro login button
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
import { ApiConfiguration } from "./api"
|
||||
import { HistoryItem } from "./HistoryItem"
|
||||
import { MaestroUser } from "./maestro"
|
||||
|
||||
// webview will hold state
|
||||
export interface ExtensionMessage {
|
||||
@@ -21,6 +22,7 @@ export interface ExtensionState {
|
||||
claudeMessages: ClaudeMessage[]
|
||||
taskHistory: HistoryItem[]
|
||||
shouldShowAnnouncement: boolean
|
||||
maestroUser?: MaestroUser
|
||||
}
|
||||
|
||||
export interface ClaudeMessage {
|
||||
|
||||
@@ -15,6 +15,8 @@ export interface WebviewMessage {
|
||||
| "showTaskWithId"
|
||||
| "deleteTaskWithId"
|
||||
| "exportTaskWithId"
|
||||
| "didClickMaestroSignIn"
|
||||
| "didClickMaestroSignOut"
|
||||
text?: string
|
||||
askResponse?: ClaudeAskResponse
|
||||
apiConfiguration?: ApiConfiguration
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export type ApiProvider = "anthropic" | "openrouter" | "bedrock"
|
||||
export type ApiProvider = "anthropic" | "openrouter" | "bedrock" | "maestro"
|
||||
|
||||
export interface ApiHandlerOptions {
|
||||
apiModelId?: ApiModelId
|
||||
@@ -7,6 +7,7 @@ export interface ApiHandlerOptions {
|
||||
awsAccessKey?: string
|
||||
awsSecretKey?: string
|
||||
awsRegion?: string
|
||||
maestroToken?: string
|
||||
}
|
||||
|
||||
export type ApiConfiguration = ApiHandlerOptions & {
|
||||
@@ -232,3 +233,10 @@ export const openRouterModels = {
|
||||
// outputPrice: 1.5,
|
||||
// },
|
||||
} 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 = {
|
||||
...anthropicModels,
|
||||
} as const satisfies Record<string, ModelInfo>
|
||||
|
||||
10
src/shared/maestro.ts
Normal file
10
src/shared/maestro.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
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