import { importExtensionModule } from "@singularity-forge/pi-coding-agent";

export { registerSFCommand } from "./commands/index.js";

export async function handleSFCommand(
	...args: Parameters<typeof import("./commands/dispatcher.js").handleSFCommand>
) {
	const { handleSFCommand: dispatch } = await importExtensionModule<
		typeof import("./commands/dispatcher.js")
	>(import.meta.url, "./commands/dispatcher.js");
	return dispatch(...args);
}

export async function fireStatusViaCommand(
	...args: Parameters<
		typeof import("./commands/handlers/core.js").fireStatusViaCommand
	>
) {
	const { fireStatusViaCommand: fireStatus } = await importExtensionModule<
		typeof import("./commands/handlers/core.js")
	>(import.meta.url, "./commands/handlers/core.js");
	return fireStatus(...args);
}
