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

Method onGenerate

src/plugins/console/generateinput.cpp:114–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114void GenerateInput::onGenerate()
115{
116 auto text = d->edit->text();
117 if (text.isEmpty()) {
118 switchState(false);
119 return;
120 }
121
122 switchState(true);
123 QString prompt = "你是一个智能终端机器人,你的工作环境是deepin-os/UOS/Linux,你的任务是根据描述生成可以直接使用的终端命令,不要进行额外的回答。描述是:" + text;
124 d->llm->request(prompt);
125}
126
127void GenerateInput::switchState(bool generating)
128{

Callers

nothing calls this directly

Calls 4

switchStateFunction · 0.85
textMethod · 0.45
isEmptyMethod · 0.45
requestMethod · 0.45

Tested by

no test coverage detected