mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
fix(cli): support project slash command completion (#245)
Add project-level slash command discovery with recursive nested command scanning, pass workingDirectory through slash-command handlers, and align hub/web source unions to include project commands.
This commit is contained in:
@@ -186,12 +186,12 @@ export class RpcGateway {
|
||||
|
||||
async listSlashCommands(sessionId: string, agent: string): Promise<{
|
||||
success: boolean
|
||||
commands?: Array<{ name: string; description?: string; source: 'builtin' | 'user' }>
|
||||
commands?: Array<{ name: string; description?: string; source: 'builtin' | 'user' | 'plugin' | 'project' }>
|
||||
error?: string
|
||||
}> {
|
||||
return await this.sessionRpc(sessionId, 'listSlashCommands', { agent }) as {
|
||||
success: boolean
|
||||
commands?: Array<{ name: string; description?: string; source: 'builtin' | 'user' }>
|
||||
commands?: Array<{ name: string; description?: string; source: 'builtin' | 'user' | 'plugin' | 'project' }>
|
||||
error?: string
|
||||
}
|
||||
}
|
||||
|
||||
@@ -450,7 +450,7 @@ export class SyncEngine {
|
||||
|
||||
async listSlashCommands(sessionId: string, agent: string): Promise<{
|
||||
success: boolean
|
||||
commands?: Array<{ name: string; description?: string; source: 'builtin' | 'user' }>
|
||||
commands?: Array<{ name: string; description?: string; source: 'builtin' | 'user' | 'plugin' | 'project' }>
|
||||
error?: string
|
||||
}> {
|
||||
return await this.rpcGateway.listSlashCommands(sessionId, agent)
|
||||
|
||||
Reference in New Issue
Block a user