hermes-agent/apps/desktop/src/app/session/hooks
Brooklyn Nicholson fb44b519d7 fix(desktop): parse multiline slash commands + hand degenerate payloads back
parseSlashCommand used /^(\S+)\s*(.*)$/ where `.` can't cross a newline and
`$` anchors end-of-string, so any slash command whose arg contained a newline
(/goal <multi-line text>, a skill command with a long pasted context) failed
the whole match, parsed as an empty name, and rendered "empty slash command"
while the payload vanished — cleared from the composer and absent from the
Up-arrow history ring, which only derives from sent user messages.

- name now splits on any whitespace ([\s\S]* arg), matching the CLI and the
  gateway's split(maxsplit=1); multiline args flow to slash.exec intact
- the residual empty-name branch (bare "/", "/ text") restores the submitted
  text to the composer draft instead of eating it

Fixes #41323. Fixes #55510.
2026-07-02 11:36:21 -05:00
..
use-message-stream refactor(desktop): extract gateway-event dispatcher into its own sub-hook 2026-06-30 03:11:14 -05:00
use-prompt-actions fix(desktop): parse multiline slash commands + hand degenerate payloads back 2026-07-02 11:36:21 -05:00
use-session-actions refactor(desktop): split use-session-actions into folder + utils 2026-06-30 02:54:46 -05:00
use-context-suggestions.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
use-cwd-actions.ts style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
use-hermes-config.test.ts fix(desktop): guard configured-cwd override against active sessions 2026-07-02 01:58:19 -07:00
use-hermes-config.ts fix(desktop): guard configured-cwd override against active sessions 2026-07-02 01:58:19 -07:00
use-model-controls.test.tsx style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
use-model-controls.ts style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
use-preview-routing.test.tsx fix(desktop): stop auto-opening tool previews 2026-06-22 19:21:20 -05:00
use-preview-routing.ts fix(desktop): stop auto-opening tool previews 2026-06-22 19:21:20 -05:00
use-route-resume.test.tsx style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
use-route-resume.ts style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
use-session-actions.test.tsx fix(desktop): restore cross-wired runtime-id guard on session resume 2026-06-28 18:23:09 -05:00
use-session-list-actions.ts refactor(desktop): thin desktop-controller by extracting session-list actions 2026-06-30 01:34:12 -05:00
use-session-state-cache.test.tsx style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
use-session-state-cache.ts style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00