@@ -7543,7 +7543,21 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea
7543
7543
}
7544
7544
}
7545
7545
7546
- vAskAI.value = "### Request:\n" + this.method + " " + this.type + " " + this.getUrl()
7546
+ var curItem = (this.isTestCaseShow != true ? this.currentRandomItem : this.remotes[this.currentDocIndex]) || {}
7547
+ var curDoc = curItem.Document || {}
7548
+ var curRecord = curItem.TestRecord || {}
7549
+ var curRandom = curItem.Random || {}
7550
+
7551
+ // var isRandom = this.isTestCaseShow != true && this.isRandomShow == true
7552
+ // var tests = this.tests[String(this.currentAccountIndex)] || {}
7553
+ // var currentResponse = (tests[isRandom ? random.documentId : document.id] || {})[
7554
+ // isRandom ? (random.id > 0 ? random.id : (random.toId + '' + random.id)) : 0
7555
+ // ]
7556
+ //
7557
+ // resStr = currentResponse != null ? JSON.stringify(currentResponse) : curRecord.response;
7558
+
7559
+ if (this.isTestCaseShow != true) {
7560
+ vAskAI.value = "### Request:\n" + this.method + " " + this.type + " " + this.getUrl()
7547
7561
+ (StringUtil.isEmpty(vHeader.value) ? '' : "\n" + StringUtil.trim(vHeader.value))
7548
7562
+ (StringUtil.isEmpty(vInput.value) ? '' : "\n\n```js\n" + StringUtil.trim(vInput.value) + '\n```')
7549
7563
+ (isCode ? "\n\n### Response: " : '')
@@ -7553,6 +7567,19 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea
7553
7567
+ (StringUtil.isEmpty(output) ? '' : '\n\n### 提示信息: \n' + StringUtil.trim(output))
7554
7568
// 太长 + (StringUtil.isEmpty(d) ? '' : '\n\n### 文档: \n' + d)
7555
7569
+ '\n'
7570
+ } else {
7571
+ vAskAI.value = "### Request:\n" + curDoc.method + " " + curDoc.type + " " + (this.getBaseUrl() + curDoc.url)
7572
+ + (StringUtil.isEmpty(curDoc.header) ? '' : "\n" + StringUtil.trim(curDoc.header))
7573
+ + (StringUtil.isEmpty(curDoc.request) ? '' : "\n\n```js\n" + StringUtil.trim(curDoc.request) + '\n```')
7574
+ + (isCode ? "\n\n### Response: " : '')
7575
+ + (StringUtil.isEmpty(curRecord.header) ? '' : '\n' + StringUtil.trim(curRecord.header))
7576
+ + (StringUtil.isEmpty(resStr) ? '' : "\n\n```js\n" + resStr + '\n```')
7577
+ + (StringUtil.isEmpty(vAskAI.value) ? '' : '\n\n' + StringUtil.trim(vAskAI.value)) + '\n'
7578
+ + (StringUtil.isEmpty(output) ? '' : '\n\n### 提示信息: \n' + StringUtil.trim(output))
7579
+ // 太长 + (StringUtil.isEmpty(d) ? '' : '\n\n### 文档: \n' + d)
7580
+ + '\n'
7581
+ }
7582
+
7556
7583
isRes = true;
7557
7584
}
7558
7585
@@ -7664,6 +7691,7 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea
7664
7691
this.uuid = crypto.randomUUID();
7665
7692
} catch (e) {
7666
7693
console.error('Failed to generate UUID:', e);
7694
+ this.uuid = '';
7667
7695
}
7668
7696
7669
7697
if (StringUtil.isEmpty(this.uuid, true)) {
0 commit comments