MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / explain

Method explain

src/plugins/chat/copilot.cpp:152–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152void Copilot::explain()
153{
154 QString prompt = "code: ```%1```\n\n"
155 "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. Task: Please explain the meaning of the input code, including the implementation principle, purpose, and precautions, etc. ";
156 if (locale == Zh)
157 prompt.append("\nPlease answer by Chineses");
158 ChatManager::instance()->requestAsync(prompt.arg(selectedText()));
159 switchToChatPage();
160}
161
162void Copilot::review()
163{

Callers

nothing calls this directly

Calls 2

requestAsyncMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected