| 112 | } |
| 113 | |
| 114 | void 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 | |
| 127 | void GenerateInput::switchState(bool generating) |
| 128 | { |
nothing calls this directly
no test coverage detected