refactor(commands): drop /provider, /plan handler, and clean up slash registry (#15047)

* refactor(commands): drop /provider and clean up slash registry

* refactor(commands): drop /plan special handler — use plain skill dispatch
This commit is contained in:
Teknium 2026-04-24 03:10:52 -07:00 committed by GitHub
parent b29287258a
commit b2e124d082
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 21 additions and 535 deletions

View file

@ -281,36 +281,6 @@ describe('createSlashHandler', () => {
expect(ctx.transcript.page).not.toHaveBeenCalled()
expect(ctx.transcript.sys).toHaveBeenCalledWith('no conversation yet')
})
it('handles send-type dispatch for /plan command', async () => {
const planMessage = 'Plan skill content loaded'
const ctx = buildCtx({
gateway: {
gw: {
getLogTail: vi.fn(() => ''),
request: vi.fn((method: string) => {
if (method === 'slash.exec') {
return Promise.reject(new Error('pending-input command'))
}
if (method === 'command.dispatch') {
return Promise.resolve({ type: 'send', message: planMessage })
}
return Promise.resolve({})
})
},
rpc: vi.fn(() => Promise.resolve({}))
}
})
const h = createSlashHandler(ctx)
expect(h('/plan create a REST API')).toBe(true)
await vi.waitFor(() => {
expect(ctx.transcript.send).toHaveBeenCalledWith(planMessage)
})
})
})
const buildCtx = (overrides: Partial<Ctx> = {}): Ctx => ({