fix: address PR CI failures for Cortex integration

This commit is contained in:
Marc J Saint-jour 2026-03-12 19:35:46 -04:00
parent 8629a13aba
commit 7aa8f7d9ec

View File

@ -30,8 +30,13 @@ import type { createModelSelectionState } from "./model-selection.js";
import { extractInlineSimpleCommand } from "./reply-inline.js"; import { extractInlineSimpleCommand } from "./reply-inline.js";
import type { TypingController } from "./typing.js"; import type { TypingController } from "./typing.js";
const builtinSlashCommands = (() => { let builtinSlashCommands: Set<string> | null = null;
return listReservedChatSlashCommandNames([
function getBuiltinSlashCommands(): Set<string> {
if (builtinSlashCommands) {
return builtinSlashCommands;
}
builtinSlashCommands = listReservedChatSlashCommandNames([
"think", "think",
"verbose", "verbose",
"reasoning", "reasoning",
@ -41,7 +46,8 @@ const builtinSlashCommands = (() => {
"status", "status",
"queue", "queue",
]); ]);
})(); return builtinSlashCommands;
}
function resolveSlashCommandName(commandBodyNormalized: string): string | null { function resolveSlashCommandName(commandBodyNormalized: string): string | null {
const trimmed = commandBodyNormalized.trim(); const trimmed = commandBodyNormalized.trim();
@ -163,7 +169,7 @@ export async function handleInlineActions(params: {
allowTextCommands && allowTextCommands &&
slashCommandName !== null && slashCommandName !== null &&
// `/skill …` needs the full skill command list. // `/skill …` needs the full skill command list.
(slashCommandName === "skill" || !builtinSlashCommands.has(slashCommandName)); (slashCommandName === "skill" || !getBuiltinSlashCommands().has(slashCommandName));
const skillCommands = const skillCommands =
shouldLoadSkillCommands && params.skillCommands shouldLoadSkillCommands && params.skillCommands
? params.skillCommands ? params.skillCommands