fix(start-work): use Atlas list key in command config

This commit is contained in:
YeonGyu-Kim
2026-04-01 17:45:16 -07:00
parent f4b8e1c365
commit 51d9685571
6 changed files with 214 additions and 6 deletions
+43
View File
@@ -95,6 +95,49 @@ describe("createChatMessageHandler - /start-work integration", () => {
})
})
describe("createChatMessageHandler - /ulw-loop raw slash fallback", () => {
test("starts ultrawork loop when /ulw-loop arrives through chat.message without native command expansion", async () => {
// given
const startLoopCalls: Array<{
sessionID: string
prompt: string
options: Record<string, unknown>
}> = []
const args = createMockHandlerArgs()
args.hooks.autoSlashCommand = createAutoSlashCommandHook({ skills: [] })
args.hooks.ralphLoop = {
startLoop: (sessionID: string, prompt: string, options?: Record<string, unknown>) => {
startLoopCalls.push({ sessionID, prompt, options: options ?? {} })
return true
},
cancelLoop: () => true,
}
const handler = createChatMessageHandler(args)
const input = createMockInput("sisyphus")
const output: ChatMessageHandlerOutput = {
message: {},
parts: [{ type: "text", text: '/ulw-loop "Ship feature" --strategy=continue' }],
}
// when
await handler(input, output)
// then
expect(startLoopCalls).toEqual([
{
sessionID: "test-session",
prompt: "Ship feature",
options: {
ultrawork: true,
maxIterations: undefined,
completionPromise: undefined,
strategy: "continue",
},
},
])
})
})
function createMockInput(agent?: string, model?: { providerID: string; modelID: string }) {
return {
sessionID: "test-session",