fix: include gateway plugin commands in TUI autocomplete

Co-authored-by: Se7en <285117352+se7en-agent@users.noreply.github.com>

Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
This commit is contained in:
clawsweeper
2026-05-19 03:29:40 +00:00
parent f8f1dc14f2
commit cc580e3db4

View File

@@ -704,8 +704,7 @@ export async function runTui(opts: RunTuiOptions): Promise<TuiResult> {
root.addChild(footer);
root.addChild(editor);
const resolveDynamicSlashCommandsKey = () =>
JSON.stringify([currentAgentId, sessionInfo.modelProvider ?? ""]);
const resolveDynamicSlashCommandsKey = () => currentAgentId;
const applyAutocompleteProvider = () => {
const dynamicKey = resolveDynamicSlashCommandsKey();
@@ -737,10 +736,9 @@ export async function runTui(opts: RunTuiOptions): Promise<TuiResult> {
dynamicSlashCommandsInFlightKey = key;
const requestId = ++dynamicSlashCommandsRequestId;
const agentId = currentAgentId;
const provider = sessionInfo.modelProvider;
void client.listCommands({
void client
.listCommands({
agentId,
...(provider ? { provider } : {}),
scope: "text",
includeArgs: false,
})