mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-11 03:31:55 +00:00
10 lines
440 B
TypeScript
10 lines
440 B
TypeScript
/** Appended to `/model` args from the TUI picker for session scope; stripped in `session` slash before `config.set`. */
|
|
export const TUI_SESSION_MODEL_FLAG = '--tui-session'
|
|
|
|
export const looksLikeSlashCommand = (text: string) => /^\/[^\s/]*(?:\s|$)/.test(text)
|
|
|
|
export const parseSlashCommand = (cmd: string) => {
|
|
const [name = '', ...rest] = cmd.slice(1).split(/\s+/)
|
|
|
|
return { arg: rest.join(' '), cmd, name: name.toLowerCase() }
|
|
}
|