@oxecli/oxe 1.0.25 → 1.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config.js +2 -2
- package/dist/ui.js +13 -1
- package/package.json +1 -1
package/dist/config.js
CHANGED
|
@@ -156,8 +156,8 @@ export async function loadOrPrompt() {
|
|
|
156
156
|
// (mirrors Python's console.print() after the banner).
|
|
157
157
|
process.stdout.write("\n");
|
|
158
158
|
renderPanel("[bold white]Oxe Desktop Authentication[/bold white]\n\n" +
|
|
159
|
-
`[dim]Only valid Oxe API keys (starting with [bold]${OXE_KEY_PREFIX}[/bold])
|
|
160
|
-
"Oxe web dashboard are authorized to run this agent.\n\n" +
|
|
159
|
+
`[dim]Only valid Oxe API keys (starting with [bold]${OXE_KEY_PREFIX}[/bold])\n` +
|
|
160
|
+
"generated on your Oxe web dashboard are authorized to run this agent.\n\n" +
|
|
161
161
|
"Get your key at: [bold underline]http://localhost:5173/dashboard/api-keys[/bold underline][/dim]", "Oxe Cloud Access", "", false);
|
|
162
162
|
process.stdout.write("\n");
|
|
163
163
|
api_key = await promptApiKey("Enter Oxe API Key: ");
|
package/dist/ui.js
CHANGED
|
@@ -1014,6 +1014,18 @@ export function askBottomPrompt(label = "You", prefix = "❯", history = []) {
|
|
|
1014
1014
|
return true;
|
|
1015
1015
|
return false;
|
|
1016
1016
|
};
|
|
1017
|
+
const isModifiedEnterInput = (str, key) => {
|
|
1018
|
+
const value = str || "";
|
|
1019
|
+
const sequence = key?.sequence || "";
|
|
1020
|
+
// Some Windows terminals do not preserve modifier flags when readline
|
|
1021
|
+
// decodes Ctrl+J or Ctrl/Shift+Enter. Inspect the original bytes too.
|
|
1022
|
+
if (value === "\n" || value === "\x0a")
|
|
1023
|
+
return true;
|
|
1024
|
+
if (key?.name === "linefeed" || (key?.ctrl && key?.name === "j"))
|
|
1025
|
+
return true;
|
|
1026
|
+
return /^\x1b\[13;(?:[2-9]|\d{2,})(?:u|~)$/.test(value) ||
|
|
1027
|
+
/^\x1b\[13;(?:[2-9]|\d{2,})(?:u|~)$/.test(sequence);
|
|
1028
|
+
};
|
|
1017
1029
|
// True for a plain (unmodified) Enter: Node's "return" without modifiers,
|
|
1018
1030
|
// or the kitty-protocol encodings \x1b[13u / \x1b[13;1u (modifier flags = 1
|
|
1019
1031
|
// meaning none).
|
|
@@ -1102,7 +1114,7 @@ export function askBottomPrompt(label = "You", prefix = "❯", history = []) {
|
|
|
1102
1114
|
// must happen before plain submit detection because some terminals expose
|
|
1103
1115
|
// Shift+Enter as `return` while keeping the modifier only in the escape
|
|
1104
1116
|
// sequence.
|
|
1105
|
-
if (isNewlineKey(key) || (pasteBurst && isSubmitEnterKey(key))) {
|
|
1117
|
+
if (isNewlineKey(key) || isModifiedEnterInput(str, key) || (pasteBurst && isSubmitEnterKey(key))) {
|
|
1106
1118
|
insert("\n");
|
|
1107
1119
|
repaint();
|
|
1108
1120
|
return;
|