registerIdeCommand function
void
registerIdeCommand({
- required LocalCommandRegistry registry,
- required TerminalView term,
- required Stream<
void> resizeEvents, - required OmnyShellService service,
- required SettingsStore settings,
Registers the :ide command (alias :edit) on registry.
Mirrors the native CLI's IdeCommand: it opens the omnyshell terminal IDE on
the connected node over a RemoteWorkspace, renders the engine's frames
into the browser terminal via an XtermTerminalDriver, and gates the AI
agent panel's run_command tool with the same command_shield the CLI uses.
term is the xterm.js surface the IDE paints onto; resizeEvents fires when
it is resized (so the IDE reflows). The raw keystroke stream is supplied by
the host through LocalCommandContext.runFullScreen when the command runs.
AI is resolved lazily (at command time) through the Hub, exactly like :ai.
Implementation
void registerIdeCommand({
required LocalCommandRegistry registry,
required TerminalView term,
required Stream<void> resizeEvents,
required OmnyShellService service,
required SettingsStore settings,
}) {
registry.register(
WebIdeCommand(
term: term,
resizeEvents: resizeEvents,
service: service,
settings: settings,
),
);
}