@@ -7507,7 +7507,21 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea
75077507
75087508 if (type == 'ask') {
75097509 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+
75107520 const user_query = StringUtil.trim(vAskAI.value);
7521+ if (StringUtil.isEmpty(user_query)) {
7522+ return;
7523+ }
7524+
75117525 function onMessage(item) {
75127526 var data2 = item == null ? null : item.data
75137527 if (data2 == null || item.type != 'chunk') {
@@ -7554,6 +7568,9 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea
75547568 vOutput.value = answer;
75557569 markdownToHTML(answer); // vOutput.value)
75567570 })
7571+
7572+ App.uuid = null; // 解决第一次后的都不生效
7573+ vAskAI.value = '';
75577574 }
75587575
75597576 function askAI() {
@@ -7605,7 +7622,7 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea
76057622 this.uuid = crypto.randomUUID();
76067623 this.request(true, REQUEST_TYPE_POST, REQUEST_TYPE_JSON, 'https://api.devin.ai/ada/query', {
76077624 "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,
76097626 "keywords": [],
76107627 "repo_names": [
76117628 "Tencent/APIJSON"
0 commit comments