@mosaic/mosaic is now the single package providing both: - 'mosaic' binary (CLI: yolo, coord, prdy, tui, gateway, etc.) - 'mosaic-wizard' binary (installation wizard) Changes: - Move packages/cli/src/* into packages/mosaic/src/ - Convert dynamic @mosaic/mosaic imports to static relative imports - Add CLI deps (ink, react, socket.io-client, @mosaic/config) to mosaic - Add jsx: react-jsx to mosaic's tsconfig - Exclude packages/cli from workspace (pnpm-workspace.yaml) - Update install.sh to install @mosaic/mosaic instead of @mosaic/cli - Bump version to 0.0.17 This eliminates the circular dependency between @mosaic/cli and @mosaic/mosaic that was blocking the build graph.
12 lines
312 B
TypeScript
12 lines
312 B
TypeScript
import type { ParsedCommand } from '@mosaic/types';
|
|
|
|
export function parseSlashCommand(input: string): ParsedCommand | null {
|
|
const match = input.match(/^\/([a-z][a-z0-9:_-]*)\s*(.*)?$/i);
|
|
if (!match) return null;
|
|
return {
|
|
command: match[1]!,
|
|
args: match[2]?.trim() || null,
|
|
raw: input,
|
|
};
|
|
}
|