Skip to content

Commit 0349f3e

Browse files
Include support ID when saving to file (#4483)
* Include support ID when saving to file * Update src/js/tabs/cli.js Co-authored-by: nerdCopter <[email protected]> --------- Co-authored-by: nerdCopter <[email protected]>
1 parent 7108ed7 commit 0349f3e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/js/tabs/cli.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const cli = {
2626
windowWrapper: null,
2727
},
2828
lastArrival: 0,
29+
lastSupportId: null,
2930
};
3031

3132
function removePromptHash(promptText) {
@@ -210,7 +211,13 @@ cli.initialize = function (callback) {
210211
$("a.save").on("click", function () {
211212
const filename = generateFilename("cli", "txt");
212213

213-
saveFile(filename, self.outputHistory);
214+
let content = self.outputHistory;
215+
216+
if (self.lastSupportId) {
217+
content = `# Support ID: ${self.lastSupportId}\n\n${content}`;
218+
}
219+
220+
saveFile(filename, content);
214221
});
215222

216223
$("a.clear").click(function () {
@@ -241,6 +248,7 @@ cli.initialize = function (callback) {
241248
clearInterval(delay);
242249
const text = self.outputHistory;
243250
api.submitSupportData(text, (key) => {
251+
self.lastSupportId = key;
244252
writeToOutput(i18n.getMessage("buildServerSupportRequestSubmission", [key]));
245253
});
246254
}

0 commit comments

Comments
 (0)