feat(tui): /model and /setup slash commands with in-place CLI handoff
- hermes-ink: export `withInkSuspended()` + `useExternalProcess()` that pause/resume Ink around an arbitrary external process (built on the existing enterAlternateScreen/exitAlternateScreen plumbing) - tui: `launchHermesCommand(args)` spawns the `hermes` binary with inherited stdio, with `HERMES_BIN` override for non-standard launches - tui: `/model` and `/setup` slash commands invoke the CLI wizards in-place, then re-preflight `setup.status` and auto-start a session on success — no more exit-and-relaunch to finish first-run setup - setup panel now advertises those slashes instead of only pointing users back at the shell
This commit is contained in:
3
ui-tui/src/types/hermes-ink.d.ts
vendored
3
ui-tui/src/types/hermes-ink.d.ts
vendored
@@ -72,6 +72,9 @@ declare module '@hermes/ink' {
|
||||
export function render(node: React.ReactNode, options?: NodeJS.WriteStream | RenderOptions): Instance
|
||||
|
||||
export function useApp(): { readonly exit: (error?: Error) => void }
|
||||
export type RunExternalProcess = () => Promise<void>
|
||||
export function useExternalProcess(): (run: RunExternalProcess) => Promise<void>
|
||||
export function withInkSuspended(run: RunExternalProcess): Promise<void>
|
||||
export function useInput(handler: InputHandler, options?: { readonly isActive?: boolean }): void
|
||||
export function useSelection(): {
|
||||
readonly copySelection: () => string
|
||||
|
||||
Reference in New Issue
Block a user