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
5 changes: 5 additions & 0 deletions app/create-session.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,11 @@ export default function CreateSessionScreen() {
return;
}

if (prompt.length > 50000) {
Alert.alert(t('error'), t('promptTooLong'));
return;
}
Comment on lines +181 to +184

Copilot AI Mar 28, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR title/description says the 30-character session title truncation was removed, but this change only adds a 50,000-char limit for the prompt. The session title is still derived from the prompt and truncated to 30 chars (see hooks/use-jules-sessions.ts createSession body.title). Either update the implementation to stop truncating the title, or adjust the PR title/description to reflect that this is a prompt-length change.

Copilot uses AI. Check for mistakes.

// Get source object from sourcesMap (validRecentRepos are already included in sources)
const source = sourcesMap.get(selectedSource);
const defaultBranch = source?.githubRepo?.defaultBranch?.displayName || 'main';
Expand Down
1 change: 1 addition & 0 deletions components/jules/create-session/prompt-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export function PromptInput({
placeholderTextColor={isDark ? '#475569' : '#94a3b8'}
multiline
textAlignVertical="top"
maxLength={50000}

Copilot AI Mar 28, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 50,000 limit is now duplicated across this component and the screen-level validation. Consider extracting a shared constant (e.g., PROMPT_MAX_LENGTH) to keep UI maxLength, validation, and error messaging in sync over time.

Copilot uses AI. Check for mistakes.
/>
</View>
);
Expand Down
2 changes: 2 additions & 0 deletions constants/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ const translations = {
modeReviewDesc: 'プラン確認してから実行',
startSession: 'セッションを開始する',
inputError: 'リポジトリを選んで、依頼内容を書いてね!',
promptTooLong: '依頼内容が長すぎます(最大50000文字)',
createSuccess: 'セッションを作成したよ!',
processing: '処理中...',
recentRepos: '最近使ったリポジトリ',
Expand Down Expand Up @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions docs/api/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
```
Expand Down
Loading