* fix: intercept /sessions and /resume slash commands in WebUI (#6224) Add a native-intercept branch in the block of send() alongside the /pet special-case. When the user types /sessions or /resume, expand the sidebar and refresh the session list instead of sending the raw slash text to the agent. Root cause: the agent command registry exposes sessions/resume as non-CLI-only commands, so the autocomplete popup shows them, but the WebUI send-time dispatch had no branch to catch them, causing the literal text to be sent as a prompt. * fix(commands): use mobile-aware session-browser opener for /sessions /resume (gate follow-up) The intercept called expandSidebar() directly, which is a no-op on phone-width layouts, so /sessions and /resume silently did nothing on mobile (composer cleared, nothing shown). Use the mobile-aware _openProfileSwitchSessionBrowser() first, falling back to expandSidebar(). Reproduced + specified by the pre-release Codex gate. Co-authored-by: webtecnica <webtecnica@users.noreply.github.com> * CHANGELOG: intercept /sessions /resume slash commands (#6245) --------- Co-authored-by: webtecnica <webtecnica@users.noreply.github.com> Co-authored-by: nesquena-hermes <agent@nesquena-hermes>
This commit is contained in:
parent
d195b094bb
commit
0a31a4a1e2
2 changed files with 11 additions and 0 deletions
|
|
@ -9,6 +9,8 @@
|
|||
|
||||
### Fixed
|
||||
|
||||
- **`/sessions` and `/resume` typed in the composer now open the session browser instead of being sent as chat text.** Both commands appeared in the slash-command autocomplete (they're exposed by `/api/commands`) but the WebUI send-time dispatch didn't handle them, so they were posted to the agent as plain text. They now open the native WebUI session browser and clear the composer — on desktop and (via the mobile-aware opener) on phone-width layouts. Thanks @webtecnica. (#6245, #6224)
|
||||
|
||||
- **Z.AI GLM models now advertise the correct reasoning controls per version.** The WebUI offered the full `reasoning_effort` ladder (max/xhigh/high/medium/low/minimal) for every GLM model, but per Z.AI's API only GLM-5.2+ supports the effort ladder — GLM-4.5 through 5.1 support the binary `thinking` on/off toggle, and GLM-4.7 forces thinking on (not configurable). Reasoning controls are now gated correctly: GLM-5.2+ keeps the full ladder + None, GLM-4.5/4.6/5.0/5.1 get a two-way On/None thinking toggle (no effort levels), and GLM-4.7 shows forced thinking with no toggle. All three surfaces (config status, effort resolution, composer chip) agree across model tiers, provider aliases, and namespaces. Thanks @rh-id. (#6219)
|
||||
|
||||
- **Folder downloads now work when the WebUI is served under a subpath.** The file-tree "Download" context-menu action built an absolute `/api/folder/download?...` URL, which broke behind a reverse proxy that mounts the app under a base path (e.g. `/hermes/`). It now resolves the download URL against `document.baseURI` (matching the pattern the other subpath-aware download paths already use), so it works under any base path and is unchanged on root deployments. Thanks @steezypunk. (#6227)
|
||||
|
|
|
|||
|
|
@ -1465,6 +1465,15 @@ async function send(){
|
|||
renderMessages();
|
||||
$('msg').value='';autoResize();hideCmdDropdown();return;
|
||||
}
|
||||
if(_parsedCmd.name==='sessions' || _parsedCmd.name==='resume'){
|
||||
// Open the native WebUI session browser rather than sending as chat text (#6224).
|
||||
// Use the mobile-aware opener so phone-width layouts (where expandSidebar is a
|
||||
// no-op) actually reveal the session drawer.
|
||||
if(typeof _openProfileSwitchSessionBrowser==='function') _openProfileSwitchSessionBrowser();
|
||||
else if(typeof expandSidebar==='function') expandSidebar();
|
||||
if(typeof renderSessionList==='function') await renderSessionList();
|
||||
$('msg').value='';autoResize();hideCmdDropdown();return;
|
||||
}
|
||||
const _agentCmd=typeof getAgentCommandMetadata==='function'
|
||||
? await getAgentCommandMetadata(_parsedCmd.name)
|
||||
: null;
|
||||
|
|
|
|||
Loading…
Reference in a new issue