mirror of
https://github.com/lencx/ChatGPT.git
synced 2024-10-01 01:06:13 -04:00
feat: the slash command is triggered by the enter key
This commit is contained in:
parent
39a8d8d297
commit
921d670f53
6
src-tauri/src/assets/cmd.js
vendored
6
src-tauri/src/assets/cmd.js
vendored
@ -86,15 +86,11 @@ async function cmdTip() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.keyCode === 32) {
|
||||
if (event.keyCode === 13 && window.__CHAT_MODEL_CMD__) {
|
||||
searchInput.value = window.__CHAT_MODEL_CMD__;
|
||||
modelDom.innerHTML = '';
|
||||
delete window.__CHAT_MODEL_CMD__;
|
||||
}
|
||||
if (event.keyCode === 13) {
|
||||
modelDom.innerHTML = '';
|
||||
delete window.__CHAT_MODEL_CMD__;
|
||||
}
|
||||
});
|
||||
|
||||
searchInput.addEventListener('input', (event) => {
|
||||
|
Loading…
Reference in New Issue
Block a user