mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
feat: add listSlashCommands method to SyncEngine
This commit is contained in:
@@ -727,6 +727,18 @@ export class SyncEngine {
|
||||
return await this.sessionRpc(sessionId, 'ripgrep', { args, cwd }) as RpcCommandResponse
|
||||
}
|
||||
|
||||
async listSlashCommands(sessionId: string, agent: string): Promise<{
|
||||
success: boolean
|
||||
commands?: Array<{ name: string; description?: string; source: 'builtin' | 'user' }>
|
||||
error?: string
|
||||
}> {
|
||||
return await this.sessionRpc(sessionId, 'listSlashCommands', { agent }) as {
|
||||
success: boolean
|
||||
commands?: Array<{ name: string; description?: string; source: 'builtin' | 'user' }>
|
||||
error?: string
|
||||
}
|
||||
}
|
||||
|
||||
private async sessionRpc(sessionId: string, method: string, params: unknown): Promise<unknown> {
|
||||
return await this.rpcCall(`${sessionId}:${method}`, params)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user