@@ -7507,7 +7507,21 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea
7507
7507
7508
7508
if (type == 'ask') {
7509
7509
if (isEnter) {
7510
+ var isRes = false;
7511
+ if (StringUtil.isEmpty(vAskAI.value) && StringUtil.isNotEmpty(this.jsoncon, true) ) {
7512
+ var res = JSON.parse(this.jsoncon);
7513
+ // res = this.removeDebugInfo(res);
7514
+ delete res['trace:stack']
7515
+ delete res['debug:info|help']
7516
+ vAskAI.value = JSON.stringify(res)
7517
+ isRes = true;
7518
+ }
7519
+
7510
7520
const user_query = StringUtil.trim(vAskAI.value);
7521
+ if (StringUtil.isEmpty(user_query)) {
7522
+ return;
7523
+ }
7524
+
7511
7525
function onMessage(item) {
7512
7526
var data2 = item == null ? null : item.data
7513
7527
if (data2 == null || item.type != 'chunk') {
@@ -7554,6 +7568,9 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea
7554
7568
vOutput.value = answer;
7555
7569
markdownToHTML(answer); // vOutput.value)
7556
7570
})
7571
+
7572
+ App.uuid = null; // 解决第一次后的都不生效
7573
+ vAskAI.value = '';
7557
7574
}
7558
7575
7559
7576
function askAI() {
@@ -7605,7 +7622,7 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea
7605
7622
this.uuid = crypto.randomUUID();
7606
7623
this.request(true, REQUEST_TYPE_POST, REQUEST_TYPE_JSON, 'https://api.devin.ai/ada/query', {
7607
7624
"engine_id": "multihop",
7608
- "user_query": "<relevant_context>This query was sent from the wiki page: Overview. </relevant_context>" + user_query,
7625
+ "user_query": "<relevant_context>" + (isRes ? "这是用 HTTP 接口工具 TommyLemon/APIAuto 发请求后的响应结果,分析并" : "") + "用中文回答: </relevant_context>" + user_query,
7609
7626
"keywords": [],
7610
7627
"repo_names": [
7611
7628
"Tencent/APIJSON"
0 commit comments