compact-agent 1.33.1 → 1.33.3

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/index.js CHANGED
@@ -3149,29 +3149,25 @@ async function main() {
3149
3149
  promptVisibleLen: gp.__crowcoderPromptVisLen,
3150
3150
  });
3151
3151
  if (result.accepted && result.command) {
3152
- // Trailing space "fill but don't submit" (Tab
3153
- // pathway): plant the command in rl.line so the
3154
- // user can type args before Enter.
3155
- if (result.command.endsWith(' ')) {
3156
- const cmd = result.command;
3157
- try {
3158
- const rlAny = rl;
3159
- rlAny.line = cmd;
3160
- rlAny.cursor = cmd.length;
3161
- rlAny._refreshLine?.();
3162
- }
3163
- catch { /* noop */ }
3164
- }
3165
- else {
3166
- // Enter submit immediately via the queued-input
3167
- // sentinel pattern (mirrors how the space picker
3168
- // submits).
3169
- globalThis.__crowcoderQueuedInput = result.command + '\n';
3170
- try {
3171
- rl.emit('line', '');
3172
- }
3173
- catch { /* noop */ }
3152
+ // Enter on highlighted item submit. The
3153
+ // queued-input sentinel pattern (used by the
3154
+ // full-screen picker too) hands the command to the
3155
+ // main loop's input drain, which prints the
3156
+ // auto-submitting hint and runs it as if the user
3157
+ // had typed it manually.
3158
+ //
3159
+ // Tab is now a navigation key (Down arrow alias) so
3160
+ // there's no longer a "fill but don't submit"
3161
+ // sentinel to special-case here. If the user wants
3162
+ // to plant a partial command without submitting,
3163
+ // they can Esc out of the dropdown and keep typing
3164
+ // — Esc returns the current filter as result.filter,
3165
+ // which the cancel branch restores to rl.line below.
3166
+ globalThis.__crowcoderQueuedInput = result.command + '\n';
3167
+ try {
3168
+ rl.emit('line', '');
3174
3169
  }
3170
+ catch { /* noop */ }
3175
3171
  }
3176
3172
  else {
3177
3173
  // Cancelled. Restore rl.line to whatever the user