diff --git a/frontend/src/i18n/locales/en/settings.json b/frontend/src/i18n/locales/en/settings.json index bdfb1afa..606f8b46 100644 --- a/frontend/src/i18n/locales/en/settings.json +++ b/frontend/src/i18n/locales/en/settings.json @@ -41,7 +41,8 @@ "placeholder": "Select profile", "helper": "Choose the default agent configuration to use when creating a task attempt." }, - "variant": "DEFAULT" + "variant": "DEFAULT", + "defaultLabel": "Default" }, "editor": { "title": "Editor", @@ -58,7 +59,13 @@ "connectButton": "Connect GitHub Account", "manage": "Manage", "disconnect": "Disconnect", - "helper": "Connect your GitHub account to access private repositories and enable advanced Git operations." + "helper": "Connect your GitHub account to access private repositories and enable advanced Git operations.", + "or": "OR", + "pat": { + "label": "Personal Access Token", + "helper": "GitHub Personal Access Token with 'repo' permissions. Use this if OAuth permissions are insufficient for private repositories and organisation owned repositories.", + "createTokenLink": "Create token here" + } }, "notifications": { "title": "Notifications", diff --git a/frontend/src/i18n/locales/ja/settings.json b/frontend/src/i18n/locales/ja/settings.json index a6b404e2..a28dd0be 100644 --- a/frontend/src/i18n/locales/ja/settings.json +++ b/frontend/src/i18n/locales/ja/settings.json @@ -41,7 +41,8 @@ "placeholder": "プロファイルを選択", "helper": "タスク試行を作成する際に使用するデフォルトエージェント設定を選択してください。" }, - "variant": "デフォルト" + "variant": "デフォルト", + "defaultLabel": "デフォルト" }, "editor": { "title": "エディター", @@ -58,7 +59,13 @@ "connectButton": "GitHubアカウントを接続", "manage": "管理", "disconnect": "切断", - "helper": "GitHubアカウントを接続して、プライベートリポジトリへのアクセスと高度なGit操作を有効にします。" + "helper": "GitHubアカウントを接続して、プライベートリポジトリへのアクセスと高度なGit操作を有効にします。", + "or": "または", + "pat": { + "label": "個人用アクセストークン", + "helper": "「repo」権限を持つGitHub個人用アクセストークン。OAuthの権限がプライベートリポジトリや組織所有のリポジトリに対して不十分な場合に使用してください。", + "createTokenLink": "ここでトークンを作成" + } }, "notifications": { "title": "通知", diff --git a/frontend/src/pages/settings/GeneralSettings.tsx b/frontend/src/pages/settings/GeneralSettings.tsx index 52d47f93..93cf5cd1 100644 --- a/frontend/src/pages/settings/GeneralSettings.tsx +++ b/frontend/src/pages/settings/GeneralSettings.tsx @@ -22,6 +22,7 @@ import { DropdownMenuTrigger, } from '@/components/ui/dropdown-menu'; import { Label } from '@/components/ui/label'; +import { Input } from '@/components/ui/input'; import { Alert, AlertDescription } from '@/components/ui/alert'; import { Checkbox } from '@/components/ui/checkbox'; import { ChevronDown, Key, Loader2, Volume2 } from 'lucide-react'; @@ -265,7 +266,11 @@ export function GeneralSettings() { disabled={!profiles} > - + {profiles && @@ -337,7 +342,7 @@ export function GeneralSettings() { disabled > - Default + {t('settings.general.taskExecution.defaultLabel')} ); @@ -446,6 +451,45 @@ export function GeneralSettings() { )} + + + + + {t('settings.general.github.or')} + + + + + + + {t('settings.general.github.pat.label')} + + + updateConfig({ + github: { + ...config.github, + pat: e.target.value || null, + }, + }) + } + /> + + {t('settings.general.github.pat.helper')}{' '} + + {t('settings.general.github.pat.createTokenLink')} + + +
+ {t('settings.general.github.pat.helper')}{' '} + + {t('settings.general.github.pat.createTokenLink')} + +