fix(start-work): use Atlas list key in command config
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user