{"version":3,"file":"ultraplan-entrypoint.test.d.ts","sourceRoot":"","sources":["../../src/modes/ultraplan-entrypoint.test.ts"],"names":[],"mappings":"","sourcesContent":["import { readFileSync } from \"node:fs\";\nimport { dirname, join } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { describe, expect, it } from \"vitest\";\nimport { BUILTIN_SLASH_COMMANDS } from \"../core/slash-commands.js\";\n\nconst __dirname = dirname(fileURLToPath(import.meta.url));\n\nfunction readSource(relativePath: string): string {\n\treturn readFileSync(join(__dirname, relativePath), \"utf8\");\n}\n\ndescribe(\"Ultraplan command entrypoint\", () => {\n\tit(\"registers a built-in /ultraplan slash command with explicit revision support\", () => {\n\t\tconst command = BUILTIN_SLASH_COMMANDS.find((entry) => entry.name === \"ultraplan\");\n\t\texpect(command).toBeDefined();\n\t\texpect(command?.description).toContain(\"revise\");\n\t\texpect(command?.description).toContain(\"regenerate\");\n\t});\n\n\tit(\"routes interactive mode submissions through the explicit Ultraplan command handler\", () => {\n\t\tconst source = readSource(\"interactive/interactive-mode.ts\");\n\n\t\texpect(source).toContain('if (text === \"/ultraplan\" || text.startsWith(\"/ultraplan \"))');\n\t\texpect(source).toContain(\"await this.handleUltraplanCommand(text);\");\n\t\texpect(source).toContain('args === \"apply\"');\n\t\texpect(source).toContain('args.startsWith(\"revise \") || args === \"revise\"');\n\t\texpect(source).toContain('args.startsWith(\"regenerate \") || args === \"regenerate\"');\n\t});\n});\n"]}