From 5312f96746c5457a5d340fdd35d7621a0115147e Mon Sep 17 00:00:00 2001 From: Rod Boev Date: Wed, 24 Jun 2026 09:23:17 -0400 Subject: [PATCH] fix: move _trySteer JSDoc above its function definition --- static/commands.js | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/static/commands.js b/static/commands.js index b0d1aff4..14332ce0 100644 --- a/static/commands.js +++ b/static/commands.js @@ -1216,20 +1216,6 @@ async function cmdSteer(args){ await _trySteer(msg, /*explicitSteer=*/true); } -/** - * Shared implementation for /steer and the busy_input_mode='steer' path. - * - * Tries the real steer endpoint first. On any non-accept response (no cached - * agent, agent lacks steer, stream dead, etc.) it restores the draft and keeps - * the active stream running. Steer belongs to the active run; a failed Steer - * must not be silently upgraded into Queue, Interrupt, or Stop-and-send. - * - * @param {string} msg - The steer text. - * @param {boolean} explicitSteer - True if the user explicitly invoked /steer - * (vs the busy-mode auto-fallback). Affects toast wording and draft restore. - * @returns {Promise} true when the steer was delivered, false when the - * draft was restored and the active stream was left untouched. - */ function _steerFailureMessageKey(fallback) { const key = 'steer_fail_' + (fallback || 'unknown'); return (typeof LOCALES !== 'undefined' && LOCALES.en && LOCALES.en[key]) @@ -1284,6 +1270,20 @@ function _showSteerRecovery(msg, explicitSteer, fallback) { if (typeof scrollToBottom === 'function') scrollToBottom(); } +/** + * Shared implementation for /steer and the busy_input_mode='steer' path. + * + * Tries the real steer endpoint first. On any non-accept response (no cached + * agent, agent lacks steer, stream dead, etc.) it restores the draft and keeps + * the active stream running. Steer belongs to the active run; a failed Steer + * must not be silently upgraded into Queue, Interrupt, or Stop-and-send. + * + * @param {string} msg - The steer text. + * @param {boolean} explicitSteer - True if the user explicitly invoked /steer + * (vs the busy-mode auto-fallback). Affects toast wording and draft restore. + * @returns {Promise} true when the steer was delivered, false when the + * draft was restored and the active stream was left untouched. + */ async function _trySteer(msg, explicitSteer){ let result=null; try{