(_args, context)
| 94 | progressMessage: 'creating commit', |
| 95 | source: 'builtin', |
| 96 | async getPromptForCommand(_args, context) { |
| 97 | const isGit = await getIsGit() |
| 98 | const isSl = !isGit && await getIsSl() |
| 99 | const repoType = isGit ? 'git' : isSl ? 'sl' : 'git' |
| 100 | const promptContent = getPromptContent(repoType) |
| 101 | const finalContent = await executeShellCommandsInPrompt( |
| 102 | promptContent, |
| 103 | { |
| 104 | ...context, |
| 105 | getAppState() { |
| 106 | const appState = context.getAppState() |
| 107 | return { |
| 108 | ...appState, |
| 109 | toolPermissionContext: { |
| 110 | ...appState.toolPermissionContext, |
| 111 | alwaysAllowRules: { |
| 112 | ...appState.toolPermissionContext.alwaysAllowRules, |
| 113 | command: ALLOWED_TOOLS, |
| 114 | }, |
| 115 | }, |
| 116 | } |
| 117 | }, |
| 118 | }, |
| 119 | '/commit', |
| 120 | ) |
| 121 | |
| 122 | return [{ type: 'text', text: finalContent }] |
| 123 | }, |
| 124 | } satisfies Command |
| 125 | |
| 126 | export default command |
nothing calls this directly
no test coverage detected