(args, context)
| 119 | progressMessage: 'creating commit and PR', |
| 120 | source: 'builtin', |
| 121 | async getPromptForCommand(args, context) { |
| 122 | // Get default branch and enhanced PR attribution |
| 123 | const [defaultBranch, prAttribution] = await Promise.all([ |
| 124 | getDefaultBranch(), |
| 125 | getEnhancedPRAttribution(context.getAppState), |
| 126 | ]) |
| 127 | let promptContent = getPromptContent(defaultBranch, prAttribution) |
| 128 | |
| 129 | // Append user instructions if args provided |
| 130 | const trimmedArgs = args?.trim() |
| 131 | if (trimmedArgs) { |
| 132 | promptContent += `\n\n## Additional instructions from user\n\n${trimmedArgs}` |
| 133 | } |
| 134 | |
| 135 | const finalContent = await executeShellCommandsInPrompt( |
| 136 | promptContent, |
| 137 | { |
| 138 | ...context, |
| 139 | getAppState() { |
| 140 | const appState = context.getAppState() |
| 141 | return { |
| 142 | ...appState, |
| 143 | toolPermissionContext: { |
| 144 | ...appState.toolPermissionContext, |
| 145 | alwaysAllowRules: { |
| 146 | ...appState.toolPermissionContext.alwaysAllowRules, |
| 147 | command: ALLOWED_TOOLS, |
| 148 | }, |
| 149 | }, |
| 150 | } |
| 151 | }, |
| 152 | }, |
| 153 | '/commit-push-pr', |
| 154 | ) |
| 155 | |
| 156 | return [{ type: 'text', text: finalContent }] |
| 157 | }, |
| 158 | } satisfies Command |
| 159 | |
| 160 | export default command |
nothing calls this directly
no test coverage detected