diff --git a/app/create-session.tsx b/app/create-session.tsx index 87cf974..a21c5db 100644 --- a/app/create-session.tsx +++ b/app/create-session.tsx @@ -178,6 +178,11 @@ export default function CreateSessionScreen() { return; } + if (prompt.length > 50000) { + Alert.alert(t('error'), t('promptTooLong')); + return; + } + // Get source object from sourcesMap (validRecentRepos are already included in sources) const source = sourcesMap.get(selectedSource); const defaultBranch = source?.githubRepo?.defaultBranch?.displayName || 'main'; diff --git a/components/jules/create-session/prompt-input.tsx b/components/jules/create-session/prompt-input.tsx index b320dd9..b642550 100644 --- a/components/jules/create-session/prompt-input.tsx +++ b/components/jules/create-session/prompt-input.tsx @@ -31,6 +31,7 @@ export function PromptInput({ placeholderTextColor={isDark ? '#475569' : '#94a3b8'} multiline textAlignVertical="top" + maxLength={50000} /> ); diff --git a/constants/i18n.ts b/constants/i18n.ts index 1769d17..a9bbccf 100644 --- a/constants/i18n.ts +++ b/constants/i18n.ts @@ -70,6 +70,7 @@ const translations = { modeReviewDesc: 'プラン確認してから実行', startSession: 'セッションを開始する', inputError: 'リポジトリを選んで、依頼内容を書いてね!', + promptTooLong: '依頼内容が長すぎます(最大50000文字)', createSuccess: 'セッションを作成したよ!', processing: '処理中...', recentRepos: '最近使ったリポジトリ', @@ -210,6 +211,7 @@ const translations = { modeReviewDesc: 'Review plan before execution', startSession: 'Start Session', inputError: 'Please select a repository and enter your request!', + promptTooLong: 'Prompt is too long (max 50000 characters)', createSuccess: 'Session created!', processing: 'Processing...', recentRepos: 'Recent Repositories', diff --git a/docs/api/reference.md b/docs/api/reference.md index 8db5083..e100bba 100644 --- a/docs/api/reference.md +++ b/docs/api/reference.md @@ -618,8 +618,8 @@ const handleCreateSession = async () => { return; } - if (prompt.length > 5000) { - Alert.alert('Error', 'Description is too long (max 5000 characters)'); + if (prompt.length > 50000) { + Alert.alert('Error', 'Description is too long (max 50000 characters)'); return; } ```