mirror of
https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools.git
synced 2026-02-04 05:50:50 +00:00
nhj
more
This commit is contained in:
38
unified-ai-platform/node_modules/prompts/dist/util/action.js
generated
vendored
Normal file
38
unified-ai-platform/node_modules/prompts/dist/util/action.js
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = (key, isSelect) => {
|
||||
if (key.meta && key.name !== 'escape') return;
|
||||
|
||||
if (key.ctrl) {
|
||||
if (key.name === 'a') return 'first';
|
||||
if (key.name === 'c') return 'abort';
|
||||
if (key.name === 'd') return 'abort';
|
||||
if (key.name === 'e') return 'last';
|
||||
if (key.name === 'g') return 'reset';
|
||||
}
|
||||
|
||||
if (isSelect) {
|
||||
if (key.name === 'j') return 'down';
|
||||
if (key.name === 'k') return 'up';
|
||||
}
|
||||
|
||||
if (key.name === 'return') return 'submit';
|
||||
if (key.name === 'enter') return 'submit'; // ctrl + J
|
||||
|
||||
if (key.name === 'backspace') return 'delete';
|
||||
if (key.name === 'delete') return 'deleteForward';
|
||||
if (key.name === 'abort') return 'abort';
|
||||
if (key.name === 'escape') return 'exit';
|
||||
if (key.name === 'tab') return 'next';
|
||||
if (key.name === 'pagedown') return 'nextPage';
|
||||
if (key.name === 'pageup') return 'prevPage'; // TODO create home() in prompt types (e.g. TextPrompt)
|
||||
|
||||
if (key.name === 'home') return 'home'; // TODO create end() in prompt types (e.g. TextPrompt)
|
||||
|
||||
if (key.name === 'end') return 'end';
|
||||
if (key.name === 'up') return 'up';
|
||||
if (key.name === 'down') return 'down';
|
||||
if (key.name === 'right') return 'right';
|
||||
if (key.name === 'left') return 'left';
|
||||
return false;
|
||||
};
|
||||
39
unified-ai-platform/node_modules/prompts/lib/util/action.js
generated
vendored
Normal file
39
unified-ai-platform/node_modules/prompts/lib/util/action.js
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = (key, isSelect) => {
|
||||
if (key.meta && key.name !== 'escape') return;
|
||||
|
||||
if (key.ctrl) {
|
||||
if (key.name === 'a') return 'first';
|
||||
if (key.name === 'c') return 'abort';
|
||||
if (key.name === 'd') return 'abort';
|
||||
if (key.name === 'e') return 'last';
|
||||
if (key.name === 'g') return 'reset';
|
||||
}
|
||||
|
||||
if (isSelect) {
|
||||
if (key.name === 'j') return 'down';
|
||||
if (key.name === 'k') return 'up';
|
||||
}
|
||||
|
||||
if (key.name === 'return') return 'submit';
|
||||
if (key.name === 'enter') return 'submit'; // ctrl + J
|
||||
if (key.name === 'backspace') return 'delete';
|
||||
if (key.name === 'delete') return 'deleteForward';
|
||||
if (key.name === 'abort') return 'abort';
|
||||
if (key.name === 'escape') return 'exit';
|
||||
if (key.name === 'tab') return 'next';
|
||||
if (key.name === 'pagedown') return 'nextPage';
|
||||
if (key.name === 'pageup') return 'prevPage';
|
||||
// TODO create home() in prompt types (e.g. TextPrompt)
|
||||
if (key.name === 'home') return 'home';
|
||||
// TODO create end() in prompt types (e.g. TextPrompt)
|
||||
if (key.name === 'end') return 'end';
|
||||
|
||||
if (key.name === 'up') return 'up';
|
||||
if (key.name === 'down') return 'down';
|
||||
if (key.name === 'right') return 'right';
|
||||
if (key.name === 'left') return 'left';
|
||||
|
||||
return false;
|
||||
};
|
||||
21
unified-ai-platform/node_modules/prompts/license
generated
vendored
Normal file
21
unified-ai-platform/node_modules/prompts/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2018 Terkel Gjervig Nielsen
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
Reference in New Issue
Block a user