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