Spaces:
Running
Running
Update public/esltool.js
Browse files- public/esltool.js +3 -1
public/esltool.js
CHANGED
|
@@ -107,7 +107,9 @@ function ask(prompt) {
|
|
| 107 |
|
| 108 |
let currentLineString = utils.getCurrentLineString(document.activeElement);
|
| 109 |
let selectText = window.getSelection().toString();
|
| 110 |
-
prompt
|
|
|
|
|
|
|
| 111 |
utils.displayMarkdown(prompt+'...');
|
| 112 |
utils.AIComplete(prompt,{
|
| 113 |
url: '/openai/v1/chat/completions',
|
|
|
|
| 107 |
|
| 108 |
let currentLineString = utils.getCurrentLineString(document.activeElement);
|
| 109 |
let selectText = window.getSelection().toString();
|
| 110 |
+
prompt=`
|
| 111 |
+
${config.cmd || ' '
|
| 112 |
+
${prompt} **${selectText.length >= 1 ? selectText : currentLineString}** } `
|
| 113 |
utils.displayMarkdown(prompt+'...');
|
| 114 |
utils.AIComplete(prompt,{
|
| 115 |
url: '/openai/v1/chat/completions',
|