@minecraft/creator-tools
Version:
Minecraft Creator Tools command line and libraries.
20 lines (19 loc) • 1.11 kB
TypeScript
/**
* OpenFileCommand - Locate a project item by name or path (slash command: `/find`)
*
* Search-only: takes a filename / path fragment, finds the matching project
* item (by name or by `projectPath` substring), and prints its full project
* path. Intentionally NOT named `/open` — actual "open in editor" navigation
* depends on UI integration outside the ToolCommand layer, and a `/open`
* that doesn't open is more surprising than helpful. Reserve `/open` for
* when navigation is wired through `onActiveProjectItemChangeRequested`
* (see ProjectAddButton for the existing pattern).
*/
import type { IToolCommandMetadata, IToolCommandResult } from "../IToolCommand";
import { ToolCommandBase } from "../IToolCommand";
import type { IToolCommandContext } from "../IToolCommandContext";
export declare class OpenFileCommand extends ToolCommandBase {
readonly metadata: IToolCommandMetadata;
execute(context: IToolCommandContext, args: string[], _flags: Record<string, string | boolean | string[]>): Promise<IToolCommandResult>;
}
export declare const openFileCommand: OpenFileCommand;