| 170 | } |
| 171 | |
| 172 | void Copilot::tests() |
| 173 | { |
| 174 | QString prompt = "code: ```%1```\n\n" |
| 175 | "You need to automatically determine the programming language of the provided code, and write a set of unit test code for it using a popular current unit testing framework. Please ensure that the tests cover the main functionalities and edge cases, and include necessary comments."; |
| 176 | if (locale == Zh) |
| 177 | prompt.append("\nPlease answer by Chineses"); |
| 178 | ChatManager::instance()->requestAsync(prompt.arg(selectedText())); |
| 179 | switchToChatPage(); |
| 180 | } |
| 181 | |
| 182 | void Copilot::commits() |
| 183 | { |
nothing calls this directly
no test coverage detected