mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-08-31 16:21:50 +03:00
fix(tui): preserve slash command semantics
This commit is contained in:
@@ -92,9 +92,17 @@ export interface SlashCommand {
|
||||
title: string
|
||||
description: string
|
||||
argHint: string
|
||||
lifecycle: SlashCommandLifecycle
|
||||
acceptsArgs: boolean
|
||||
}
|
||||
|
||||
export type SlashCommandLifecycle =
|
||||
| "side_channel"
|
||||
| "finalize_active_turn"
|
||||
| "stop_active_turn"
|
||||
| "agent_turn"
|
||||
| "agent_turn_with_args"
|
||||
|
||||
export interface SessionSummary {
|
||||
chatId: string
|
||||
title: string
|
||||
@@ -275,6 +283,7 @@ export async function fetchSlashCommands(
|
||||
title: typeof value.title === "string" ? value.title : value.command,
|
||||
description: typeof value.description === "string" ? value.description : "",
|
||||
argHint: typeof value.arg_hint === "string" ? value.arg_hint : "",
|
||||
lifecycle: value.lifecycle as SlashCommandLifecycle,
|
||||
acceptsArgs: value.accepts_args === true,
|
||||
}]
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user