Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/core/config/ProviderSettingsManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ExtensionContext } from "vscode"
import { z } from "zod"

import { providerSettingsSchema, ApiConfigMeta } from "../../schemas"
import { Mode } from "../../shared/modes"
import { Mode, modes } from "../../shared/modes"

const providerSettingsWithIdSchema = providerSettingsSchema.extend({ id: z.string().optional() })

Expand All @@ -18,10 +18,16 @@ export type ProviderProfiles = z.infer<typeof providerProfilesSchema>

export class ProviderSettingsManager {
private static readonly SCOPE_PREFIX = "roo_cline_config_"
private readonly defaultConfigId = this.generateId()

private readonly defaultModeApiConfigs: Record<string, string> = Object.fromEntries(
modes.map((mode) => [mode.slug, this.defaultConfigId]),
)

private readonly defaultProviderProfiles: ProviderProfiles = {
currentApiConfigName: "default",
apiConfigs: { default: { id: this.generateId() } },
apiConfigs: { default: { id: this.defaultConfigId } },
modeApiConfigs: this.defaultModeApiConfigs,
}

private readonly context: ExtensionContext
Expand Down
4 changes: 2 additions & 2 deletions webview-ui/src/i18n/locales/ca/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"export": "Exportar historial de tasques",
"delete": "Eliminar tasca (Shift + Clic per ometre confirmació)"
},
"unpin": "desancorar",
"pin": "ancorar",
"unpin": "Desfixar",
"pin": "Fixar",
"tokenProgress": {
"availableSpace": "Espai disponible: {{amount}} tokens",
"tokensUsed": "Tokens utilitzats: {{used}} de {{total}}",
Expand Down
4 changes: 2 additions & 2 deletions webview-ui/src/i18n/locales/de/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"export": "Aufgabenverlauf exportieren",
"delete": "Aufgabe löschen (Shift + Klick zum Überspringen der Bestätigung)"
},
"unpin": "lösen",
"pin": "anheften",
"unpin": "Lösen von oben",
"pin": "Anheften",
"tokenProgress": {
"availableSpace": "Verfügbarer Speicher: {{amount}} Tokens",
"tokensUsed": "Verwendete Tokens: {{used}} von {{total}}",
Expand Down
4 changes: 2 additions & 2 deletions webview-ui/src/i18n/locales/en/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"export": "Export task history",
"delete": "Delete Task (Shift + Click to skip confirmation)"
},
"unpin": "unpin",
"pin": "pin",
"unpin": "Unpin",
"pin": "Pin",
"retry": {
"title": "Retry",
"tooltip": "Try the operation again"
Expand Down
4 changes: 2 additions & 2 deletions webview-ui/src/i18n/locales/es/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"export": "Exportar historial de tareas",
"delete": "Eliminar tarea (Shift + Clic para omitir confirmación)"
},
"unpin": "desanclar",
"pin": "anclar",
"unpin": "Desfijar",
"pin": "Fijar",
"retry": {
"title": "Reintentar",
"tooltip": "Intenta la operación de nuevo"
Expand Down
4 changes: 2 additions & 2 deletions webview-ui/src/i18n/locales/fr/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"export": "Exporter l'historique des tâches",
"delete": "Supprimer la tâche (Shift + Clic pour ignorer la confirmation)"
},
"unpin": "détacher",
"pin": "épingler",
"unpin": "Désépingler",
"pin": "Épingler",
"tokenProgress": {
"availableSpace": "Espace disponible : {{amount}} tokens",
"tokensUsed": "Tokens utilisés : {{used}} sur {{total}}",
Expand Down
4 changes: 2 additions & 2 deletions webview-ui/src/i18n/locales/hi/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"export": "कार्य इतिहास निर्यात करें",
"delete": "कार्य हटाएं (पुष्टि को छोड़ने के लिए Shift + क्लिक)"
},
"unpin": "पिन हटाएं",
"pin": "पिन करें",
"unpin": "पिन करें",
"pin": "अवपिन करें",
"tokenProgress": {
"availableSpace": "उपलब्ध स्थान: {{amount}} tokens",
"tokensUsed": "प्रयुक्त tokens: {{used}} / {{total}}",
Expand Down
4 changes: 2 additions & 2 deletions webview-ui/src/i18n/locales/it/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"export": "Esporta cronologia attività",
"delete": "Elimina attività (Shift + Clic per saltare la conferma)"
},
"unpin": "sblocca",
"pin": "blocca",
"unpin": "Rilascia",
"pin": "Fissa",
"tokenProgress": {
"availableSpace": "Spazio disponibile: {{amount}} tokens",
"tokensUsed": "Tokens utilizzati: {{used}} di {{total}}",
Expand Down
4 changes: 2 additions & 2 deletions webview-ui/src/i18n/locales/ja/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"export": "タスク履歴をエクスポート",
"delete": "タスクを削除(Shift + クリックで確認をスキップ)"
},
"unpin": "固定解除",
"pin": "固定",
"unpin": "ピン留めを解除",
"pin": "ピン留め",
"tokenProgress": {
"availableSpace": "利用可能な空き容量: {{amount}} トークン",
"tokensUsed": "使用トークン: {{used}} / {{total}}",
Expand Down
4 changes: 2 additions & 2 deletions webview-ui/src/i18n/locales/ko/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"export": "작업 기록 내보내기",
"delete": "작업 삭제 (Shift + 클릭으로 확인 생략)"
},
"unpin": "고정 해제",
"pin": "고정",
"unpin": "고정 해제하기",
"pin": "고정하기",
"tokenProgress": {
"availableSpace": "사용 가능한 공간: {{amount}} 토큰",
"tokensUsed": "사용된 토큰: {{used}} / {{total}}",
Expand Down
4 changes: 2 additions & 2 deletions webview-ui/src/i18n/locales/pl/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"export": "Eksportuj historię zadań",
"delete": "Usuń zadanie (Shift + Kliknięcie, aby pominąć potwierdzenie)"
},
"unpin": "odepnij",
"pin": "przypnij",
"unpin": "Odepnij",
"pin": "Przypnij",
"tokenProgress": {
"availableSpace": "Dostępne miejsce: {{amount}} tokenów",
"tokensUsed": "Wykorzystane tokeny: {{used}} z {{total}}",
Expand Down
4 changes: 2 additions & 2 deletions webview-ui/src/i18n/locales/pt-BR/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"export": "Exportar histórico de tarefas",
"delete": "Excluir tarefa (Shift + Clique para pular confirmação)"
},
"unpin": "desafixar",
"pin": "fixar",
"unpin": "Desfixar",
"pin": "Fixar",
"tokenProgress": {
"availableSpace": "Espaço disponível: {{amount}} tokens",
"tokensUsed": "Tokens usados: {{used}} de {{total}}",
Expand Down
4 changes: 2 additions & 2 deletions webview-ui/src/i18n/locales/tr/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"export": "Görev geçmişini dışa aktar",
"delete": "Görevi sil (Onayı atlamak için Shift + Tıkla)"
},
"unpin": "sabitlemeyi kaldır",
"pin": "sabitle",
"unpin": "Sabitlemeyi iptal et",
"pin": "Sabitle",
"tokenProgress": {
"availableSpace": "Kullanılabilir alan: {{amount}} token",
"tokensUsed": "Kullanılan tokenlar: {{used}} / {{total}}",
Expand Down
4 changes: 2 additions & 2 deletions webview-ui/src/i18n/locales/vi/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"export": "Xuất lịch sử nhiệm vụ",
"delete": "Xóa nhiệm vụ (Shift + Click để bỏ qua xác nhận)"
},
"unpin": "bỏ ghim",
"pin": "ghim",
"unpin": "Bỏ ghim khỏi đầu",
"pin": "Ghim lên đầu",
"tokenProgress": {
"availableSpace": "Không gian khả dụng: {{amount}} tokens",
"tokensUsed": "Tokens đã sử dụng: {{used}} trong {{total}}",
Expand Down
Loading