Add support for claude 1M context. close #291

This commit is contained in:
weishu
2026-03-16 08:51:40 +08:00
parent fedc8e79eb
commit ce5edc42e1
12 changed files with 103 additions and 11 deletions
+8 -2
View File
@@ -25,7 +25,7 @@ export const PERMISSION_MODES = [
] as const
export type PermissionMode = typeof PERMISSION_MODES[number]
export const MODEL_MODES = ['default', 'sonnet', 'opus'] as const
export const MODEL_MODES = ['default', 'sonnet', 'sonnet[1m]', 'opus', 'opus[1m]'] as const
export type ModelMode = typeof MODEL_MODES[number]
export type AgentFlavor = 'claude' | 'codex' | 'gemini' | 'opencode' | 'cursor'
@@ -63,7 +63,13 @@ export type PermissionModeOption = {
export const MODEL_MODE_LABELS: Record<ModelMode, string> = {
default: 'Default',
sonnet: 'Sonnet',
opus: 'Opus'
'sonnet[1m]': 'Sonnet 1M',
opus: 'Opus',
'opus[1m]': 'Opus 1M'
}
export function getModelModeLabel(mode: ModelMode): string {
return MODEL_MODE_LABELS[mode]
}
export function getPermissionModeLabel(mode: PermissionMode): string {