| 160 | } |
| 161 | |
| 162 | void Copilot::review() |
| 163 | { |
| 164 | QString prompt = "code: ```%1```\n\n" |
| 165 | "You are an intelligent programming assistant. You will answer any questions users have about programming, code, and computers, providing well-formatted, executable, accurate, and secure code, and providing detailed explanations when necessary. Now, you will start to act as an advanced expert engineer focusing on code review and software security. Please provide at least three global suggestions based on the user’s code"; |
| 166 | if (locale == Zh) |
| 167 | prompt.append("\nPlease answer by Chineses"); |
| 168 | ChatManager::instance()->requestAsync(prompt.arg(selectedText())); |
| 169 | switchToChatPage(); |
| 170 | } |
| 171 | |
| 172 | void Copilot::tests() |
| 173 | { |
nothing calls this directly
no test coverage detected